1 2009-01-15 Doug Evans <dje@google.com>
3 * gdbreplay.c (perror_with_name): Make arg const char *.
4 * server.h (target_signal_to_name): Make return type const char *.
5 * thread-db.c (thread_db_err_str): Make return type const char *.
6 * utils.c (perror_with_name): Make arg const char *.
8 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11 when handling a EXIT_PROCESS_DEBUG_EVENT.
13 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15 * gdbreplay.c (gdbreplay_version): Update copyright year.
16 * server.c (gdbserver_version): Likewise.
18 2009-01-05 Doug Evans <dje@google.com>
20 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
21 (handle_extended_wait): Improve comment.
23 2008-12-13 Doug Evans <dje@google.com>
25 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
26 * server.h (ATTR_MALLOC): New macro.
27 (xmalloc,xcalloc,xstrdup): Declare.
28 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
33 * remote-utils.c: Ditto.
38 2008-12-12 Doug Evans <dje@google.com>
40 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
43 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
45 2008-12-09 Doug Evans <dje@google.com>
47 * linux-low.h (struct process_info): Delete member tid, unused.
48 * thread-db.c (find_one_thread): Update.
49 (maybe_attach_thread): Update.
51 2008-12-02 Pedro Alves <pedro@codesourcery.com>
53 * target.h (struct target_ops): Add qxfer_osdata member.
54 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
56 (linux_qxfer_osdata): New functions.
57 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
59 * server.c (handle_query): Handle "qXfer:osdata:read:".
60 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
61 (buffer_xml_printf): New functions.
62 * server.h (struct buffer): New.
63 (buffer_grow_str, buffer_grow_str0): New macros.
64 (buffer_grow, buffer_free, buffer_init, buffer_finish)
65 (buffer_xml_printf): Declare.
67 2008-11-24 Doug Evans <dje@google.com>
69 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
71 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
73 * server.c (handle_v_run): Always use the supplied argument list.
75 2008-11-19 Bob Wilson <bob.wilson@acm.org>
77 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
78 (xtensa_regmap_table): Add entry for scompare1.
80 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
82 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
83 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
84 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
85 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
86 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
87 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
88 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
89 XML target descriptions.
90 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
91 when inferior is running on an ISA 2.05 or later processor. Add
92 special case to return offset for full 64-bit slot of FPSCR when
95 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
97 * Makefile.in (SFILES, clean): Added sparc64 files.
98 (reg-sparc64.o, reg-sparc64.c): New.
99 * configure.srv (sparc*-*-linux*): New configuration.
100 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
101 syscall arguments for SPARC.
102 (regsets_store_inferior_registers): Likewise.
103 * linux-sparc-low.c: New file.
105 2008-10-21 Doug Evans <dje@google.com>
107 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
108 (READLINE_DIR,READLINE_DEP): Delete.
109 (INTERNAL_CFLAGS): Update.
112 2008-10-10 Pedro Alves <pedro@codesourcery.com>
114 * server.c (handle_v_run): If GDB didn't specify an argv, use the
115 whole argv from the last run, not just argv[0].
117 2008-09-08 Pedro Alves <pedro@codesourcery.com>
119 * regcache.c (new_register_cache): Return NULL if the register
120 cache size isn't known yet.
121 (free_register_cache): Avoid dereferencing a NULL regcache.
123 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
125 * configure.srv: Merge MIPS and MIPS64.
127 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
129 * Makefile.in (uninstall): Apply $(EXEEXT) too.
131 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
133 * Makefile.in: Add required vsx dependencies.
135 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
136 Declare init_registers_powerpc_vsx32l.
137 Declare init_registers_powerpc_vsx64l.
138 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
139 (ppc_arch_setup): Check for VSX in hwcap.
140 (ppc_fill_vsxregset): New function.
141 (ppc_store_vsxregset): New function.
142 Add new VSX entry in regset_info target_regsets.
144 * configure.srv: Add new VSX dependencies.
146 2008-08-12 Pedro Alves <pedro@codesourcery.com>
148 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
149 (remote_open): Set or clear transport_is_reliable.
150 (putpkt_binary): Don't expect acks in noack mode.
151 (getpkt): Don't send ack/nac in noack mode.
152 * server.c (handle_general_set): Handle QStartNoAckMode.
153 (handle_query): If connected by tcp pass QStartNoAckMode+ in
155 (main): Reset noack_mode on every connection.
156 * server.h (noack_mode): Declare.
158 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
160 * Makefile.in (GDBREPLAY_OBS): New variable.
161 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
163 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
164 Daniel Jacobowitz <dan@codesourcery.com>
166 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
167 (usr_store_inferior_registers): Likewise.
168 (regsets_store_inferior_registers): Likewise.
170 2008-07-31 Rolf Jansen <rj@surtec.com>
171 Pedro Alves <pedro@codesourcery.com>
173 * configure.ac: Check for memmem declaration.
174 * server.c [HAVE_MALLOC_H]: Include malloc.h.
175 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
176 (disable_packet_qfThreadInfo): Unconditionally compile.
177 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
178 * configure, config.in: Regenerate.
180 2008-07-28 Doug Kwan <dougkwan@google.com>
182 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
183 (linux_write_memory): Remove declaration of errno.
185 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
187 * linux-low.c (handle_extended_wait): Do not use "status"
188 variable uninitialized.
190 2008-07-07 Pedro Alves <pedro@codesourcery.com>
192 * server.c (handle_v_attach): Inhibit reporting dll changes.
194 2008-06-27 Pedro Alves <pedro@codesourcery.com>
196 * remote-utils.c (prepare_resume_reply): If requested, don't
197 output "thread:TID" in the T stop reply.
199 * server.c (disable_packet_vCont, disable_packet_Tthread)
200 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
201 (handle_query): If requested, disable support for qC, qfThreadInfo
203 (handle_v_requests): If requested, disable support for vCont.
204 (gdbserver_show_disableable): New.
205 (main): Handle --disable-packet and --disable-packet=LIST.
207 * server.h (disable_packet_vCont, disable_packet_Tthread)
208 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
210 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
212 * server.c (gdbserver_usage): Mention --version.
214 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
216 * Makefile.in (gdbreplay.o): New rule.
218 2008-06-06 Joseph Myers <joseph@codesourcery.com>
220 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
221 message, not gdbserver.
223 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
224 Nathan Sidwell <nathan@codesourcery.com>
225 Joseph Myers <joseph@codesourcery.com>
227 * acinclude.m4: Include ../../config/acx.m4.
228 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
229 * configure, config.in: Regenerate.
230 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
231 * server.c (gdbserver_version): Print PKGVERSION.
232 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
233 (main): Adjust gdbserver_usage calls.
234 * gdbreplay.c (version, host_name): Add declarations.
235 (gdbreplay_version, gdbreplay_usage): New.
236 (main): Accept --version and --help options.
238 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
240 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
241 (arm_breakpoint_at): Handle Thumb.
242 (the_low_target): Add comment.
244 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
246 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
248 2008-05-09 Doug Evans <dje@google.com>
250 * server.h (decode_search_memory_packet): Declare.
251 * remote-utils.c (decode_search_memory_packet): New fn.
252 * server.c (handle_search_memory_1): New fn.
253 (handle_search_memory): New fn.
254 (handle_query): Process qSearch:memory packets.
256 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
258 * regcache.c (registers_length): Remove.
259 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
260 full register packet.
261 * regcache.h (registers_length): Remove prototype.
262 * server.h (PBUFSIZ): Define to 16384.
264 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
266 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
267 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
268 powerpc-64l.o, and powerpc-altivec64l.o.
269 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
270 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
271 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
272 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
273 rs6000/power-linux.xml, and rs6000/power64-linux.xml
276 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
277 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
278 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
279 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
280 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
281 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
282 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
283 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
284 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
285 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
288 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
289 (init_registers_powerpc_32l): ... this new prototype.
290 (init_registers_powerpc_32): Remove, replace by ...
291 (init_registers_powerpc_altivec32l): ... this new prototype.
292 (init_registers_powerpc_e500): Remove, replace by ...
293 (init_registers_powerpc_e500l): ... this new prototype.
294 (init_registers_ppc64): Remove, replace by ...
295 (init_registers_powerpc_64l): ... this new prototype.
296 (init_registers_powerpc_64): Remove, replace by ...
297 (init_registers_powerpc_altivec64l): ... this new prototype.
298 (ppc_num_regs): Set to 73.
299 (PT_ORIG_R3, PT_TRAP): Define if necessary.
300 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
301 (ppc_cannot_store_register): Handle orig_r3 and trap.
302 (ppc_arch_setup): Update init_registers_... calls.
303 (ppc_fill_gregset): Handle orig_r3 and trap.
305 * inferiors.c (clear_inferiors): Reset current_inferior.
307 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
309 * acinclude.m4: Add override.m4.
310 * configure: Regenerate.
312 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
314 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
315 initial call to init_register_ppc64.
317 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
319 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
320 powerpc*-*-linux* case.
321 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
323 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
325 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
326 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
328 * linux-ppc-low.c: Include <elf.h>.
329 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
330 (ppc_hwcap): New global variable.
331 (ppc_regmap): Remove __SPE__ #ifdef sections.
332 (ppc_regmap_e500): New global variable.
333 (ppc_cannot_store_register): Update __SPE__ special case.
334 (ppc_get_hwcap): New function.
335 (ppc_arch_setup): Use it to determine whether inferior supports
336 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
337 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
338 Do not access registers if target does not support AltiVec.
339 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
340 Do not access registers if target does not support SPE.
341 (target_regsets): Unconditionally include AltiVec and SPE regsets.
343 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
345 * linux-low.c (disabled_regsets, num_regsets): New.
346 (use_regsets_p): Delete.
347 (linux_wait_for_process): Clear disabled_regsets.
348 (regsets_fetch_inferior_registers): Check and set it.
349 (regsets_store_inferior_registers): Likewise.
350 (linux_fetch_registers, linux_store_registers): Do not use
352 (initialize_low): Allocate disabled_regsets.
354 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
356 * Makefile.in (LIBOBJS): New.
358 (memmem.o): New rule.
359 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
360 * configure: Regenerated.
362 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
364 * server.c (handle_query): Never return "unsupported" for
365 qXfer:features:read queries.
367 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
369 * server.c (get_features_xml): Fix inverted condition.
370 (handle_query): Always support qXfer:feature:read.
372 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
374 * server.c (wrapper_argv): New.
375 (start_inferior): Handle wrapper_argv. If set, expect an extra
377 (gdbserver_usage): Document --wrapper.
378 (main): Parse --wrapper.
380 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
382 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
383 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
384 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
385 (ppc_set_pc): Likewise.
386 (ppc_arch_setup): New function.
387 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
389 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
391 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
393 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
394 instead of linux-ppc64-low.o.
395 * linux-ppc64-low.c: Remove file.
396 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
397 (linux-ppc64-low.o): Remove rule.
399 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
400 (init_registers_powerpc_64): Likewise.
401 (ppc_regmap): Conditionally define depending on __powerpc64__.
402 (ppc_cannot_store_register): Do not special-case "fpscr" when
403 compiled on __powerpc64__.
404 (ppc_collect_ptrace_register): New function.
405 (ppc_supply_ptrace_register): New function.
406 (ppc_breakpoint): Change type to "unsigned int".
407 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
408 (the_low_target): Conditionally provide initializers for the
409 arch_setup member depending on __powerpc64__. Install
410 collect_ptrace_register and supply_ptrace_register members.
412 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
414 * regcache.h (gdbserver_xmltarget): Add extern declaration.
415 * server.c (gdbserver_xmltarget): Define.
416 (get_features_xml): Use it to replace "target.xml" and arch_string.
418 * configure.srv: Remove srv_xmltarget. Add XML files that were
419 mentioned there to srv_xmlfiles instead. Remove conditional tests
420 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
421 srv_xmlfiles and srv_regobj to include all possible choices.
422 * configure.ac (srv_xmltarget): Remove.
423 (srv_xmlfiles): Do not add "target.xml".
424 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
425 checks for supplementary target information.
426 * configure: Regenerate.
427 * Makefile.in (XML_TARGET): Remove.
428 (target.xml): Remove rule.
429 (clean): Do not clean up target.xml.
430 (.PRECIOUS): Do not mention target.xml.
432 * target.h (struct target_ops): Remove arch_string member.
433 * linux-low.c (linux_arch_string): Remove.
434 (linux_target_ops): Remove arch_string initializer.
435 * linux-low.h (struct linux_target_ops): Remove arch_string member.
436 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
437 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
438 * spu-low.c (spu_arch_string): Remove.
439 (spu_target_ops): Remove arch_string initializer.
440 * win32-low.c (win32_arch_string): Remove.
441 (win32_target_ops): Remove arch_string initializer.
442 * win32-low.h (struct win32_target_ops): Remove arch_string member.
443 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
444 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
446 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
448 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
449 by collect_ptrace_register and supply_ptrace_register hooks.
450 * linux-low.c (fetch_register): Use supply_ptrace_register callback
451 instead of checking for the_low_target.left_pad_xfer.
452 (usr_store_inferior_registers): Use collect_ptrace_register callback
453 instead of checking for the_low_target.left_pad_xfer.
455 * linux-s390-low.c (s390_collect_ptrace_register): New function.
456 (s390_supply_ptrace_register): Likewise.
457 (s390_fill_gregset): Call s390_collect_ptrace_register.
458 (the_low_target): Update.
460 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
461 (ppc_supply_ptrace_register): Likewise.
462 (the_low_target): Update.
464 * linux-i386-low.c (the_low_target): Update.
465 * linux-x86-64-low.c (the_low_target): Update.
467 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
469 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
470 reg-s390.o and reg-s390x.o.
472 * linux-low.c (new_inferior): New global variable.
473 (linux_create_inferior, linux_attach): Set it.
474 (linux_wait_for_process): Call the_low_target.arch_setup after the
475 target has stopped for the first time.
476 (initialize_low): Do not call the_low_target.arch_setup.
478 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
479 (s390_set_pc): Likewise.
480 (s390_arch_setup): New function.
481 (the_low_target): Use s390_arch_setup as arch_setup routine.
483 * regcache.c (realloc_register_cache): New function.
484 (set_register_cache): Call it for each existing regcache.
486 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
488 * server.h (init_registers): Remove prototype.
490 * linux-low.h (struct linux_target_ops): Add arch_setup field.
491 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
492 instead of init_registers ().
493 * linux-arm-low.c (init_registers_arm): Add prototype.
494 (init_registers_arm_with_iwmmxt): Likewise.
495 (the_low_target): Add initializer for arch_setup field.
496 * linux-cris-low.c (init_registers_cris): Add prototype.
497 (the_low_target): Add initializer for arch_setup field.
498 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
499 (the_low_target): Add initializer for arch_setup field.
500 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
501 (the_low_target): Add initializer for arch_setup field.
502 * linux-ia64-low.c (init_registers_ia64): Add prototype.
503 (the_low_target): Add initializer for arch_setup field.
504 * linux-m32r-low.c (init_registers_m32r): Add prototype.
505 (the_low_target): Add initializer for arch_setup field.
506 * linux-m68k-low.c (init_registers_m68k): Add prototype.
507 (the_low_target): Add initializer for arch_setup field.
508 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
509 (init_registers_mips64_linux): Likewise.
510 (the_low_target): Add initializer for arch_setup field.
511 * linux-ppc-low.c (init_registers_ppc): Add prototype.
512 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
513 (the_low_target): Add initializer for arch_setup field.
514 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
515 (init_registers_powerpc_64): Likewise.
516 (the_low_target): Add initializer for arch_setup field.
517 * linux-s390-low.c (init_registers_s390): Add prototype.
518 (init_registers_s390x): Likewise.
519 (the_low_target): Add initializer for arch_setup field.
520 * linux-sh-low.c (init_registers_sh): Add prototype.
521 (the_low_target): Add initializer for arch_setup field.
522 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
523 (the_low_target): Add initializer for arch_setup field.
524 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
525 (the_low_target): Add initializer for arch_setup field.
527 * win32-low.h (struct win32_target_ops): Add arch_setup field.
528 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
529 instead of init_registers ().
530 * win32-arm-low.c (init_registers_arm): Add prototype.
531 (the_low_target): Add initializer for arch_setup field.
532 * win32-i386-low.c (init_registers_i386): Add prototype.
533 (the_low_target): Add initializer for arch_setup field.
535 * spu-low.c (init_registers_spu): Add prototype.
536 (initialize_low): Call initialie_registers_spu () instead of
537 initialize_registers ().
539 2008-02-19 Pedro Alves <pedro@codesourcery.com>
541 * server.c (handle_v_requests): When handling the vRun and vAttach
542 packets, if already debugging a process, don't kill it. Return an
545 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
547 * server.c (handle_query): Correct length check.
549 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
551 * win32-low.c (do_initial_child_stuff): Add process handle
552 parameter. Set current_process_handle and current_process_id from the
553 parameters. Clear globals.
554 (win32_create_inferior): Don't set current_process_handle and
555 current_process_id here. Instead pass them on the call to
556 do_initial_child_stuff.
557 (win32_attach): Likewise.
558 (win32_clear_inferiors): New.
559 (win32_kill): Don't close the current process handle or the
560 current thread handle here. Instead call win32_clear_inferiors.
561 (win32_detach): Don't open a new handle to the process. Call
562 win32_clear_inferiors.
563 (win32_join): Don't rely on current_process_handle; open a new
564 handle using the process id.
565 (win32_wait): Call win32_clear_inferiors when the inferior process
568 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
570 * server.c (monitor_show_help): Add "exit".
572 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
574 * Makefile.in (SFILES): Add linux-xtensa-low.c.
575 (clean): Add reg-xtensa.c.
576 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
577 * configure.srv (xtensa*-*-linux*) New target.
578 * linux-xtensa-low.c: New.
579 * xtensa-xtregs.c: New.
581 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
583 * hostio.c: Don't include errno.h.
584 (errno_to_fileio_errno): Move to hostio-errno.
585 * hostio.c: (hostio_error): Remove the error parameter. Defer the
586 error number outputting to the target->hostio_last_error callback.
587 (hostio_packet_error): Use FILEIO_EINVAL directly.
588 (handle_open, handle_pread, hostio_error, handle_unlink): Update
589 calls to hostio_error.
590 * hostio-errno.c: New.
591 * server.h (hostio_last_error_from_errno): Declare.
592 * target.h (target_ops): Add hostio_last_error member.
593 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
594 as hostio_last_error handler.
595 * spu-low.c (spu_target_ops): Likewise.
596 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
597 (wince_hostio_last_error): New functions.
598 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
599 as hostio_last_error handler.
600 (win32_target_ops) [!_WIN32_WCE]: Register
601 hostio_last_error_from_errno as hostio_last_error handler.
602 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
603 (hostio-errno.o): New rule.
604 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
605 * configure.srv (srv_hostio_err_objs): New variable. Default to
607 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
608 * configure: Regenerate.
610 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
612 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
613 (linux_kill, linux_detach): Clean up the process list.
614 * remote-utils.c (remote_open): Improve port number parsing.
615 (putpkt_binary, input_interrupt): Only send interrupts if the target
617 * server.c (extended_protocol): Make static.
618 (attached): Define earlier.
619 (exit_requested, response_needed, program_argv): New variables.
620 (target_running): New.
621 (start_inferior): Clear attached here.
622 (attach_inferior): Set attached here.
623 (require_running): Define.
624 (handle_query): Use require_running and target_running. Implement
626 (handle_v_attach, handle_v_run): New.
627 (handle_v_requests): Use require_running. Handle vAttach and vRun.
628 (gdbserver_usage): Update.
629 (main): Redo argument parsing. Handle --debug and --multi. Handle
630 --attach along with other options or after the port. Save
631 program_argv. Support no initial program. Resynchronize
632 communication with GDB after an error. Handle "monitor exit".
633 Use require_running and target_running. Always allow the extended
634 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
635 restart in extended mode.
636 * README: Refer to the GDB manual. Update --attach usage.
638 2007-12-20 Andreas Schwab <schwab@suse.de>
640 * linux-low.c (STACK_SIZE): Define.
641 (linux_tracefork_child): Use it. Use __clone2 on ia64.
642 (linux_test_for_tracefork): Likewise.
644 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
646 * linux-low.c (linux_wait_for_event): Update messages. Do not
647 reinsert auto-delete breakpoints.
648 * mem-break.c (struct breakpoint): Change return type of handler to
650 (set_breakpoint_at): Update handler type.
651 (reinsert_breakpoint_handler): Return 1 instead of calling
653 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
655 (check_breakpoints): Delete auto-delete breakpoints and return 2.
656 * mem-break.h (set_breakpoint_at): Update handler type.
657 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
658 * win32-low.c (auto_delete_breakpoint): New.
659 (get_child_debug_event): Use it.
661 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
663 * configure.ac: Check for pread and pwrite.
664 * hostio.c (handle_pread): Fall back to lseek and read.
665 (handle_pwrite): Fall back to lseek and write.
666 * config.in, configure: Regenerated.
668 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
670 * server.c (myresume): Add own_buf argument.
671 (main): Update calls.
673 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
675 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
676 * remote-utils.c (remote_open): Do not call disable_async_io.
677 (block_async_io): Delete.
678 (unblock_async_io): Make static.
679 (initialize_async_io): New.
680 * server.c (handle_v_cont): Handle async I/O here.
681 (myresume): Likewise. Move other common resume tasks here...
682 (main): ... from here. Call initialize_async_io. Disable async
683 I/O before the main loop.
684 * server.h (initialize_async_io): Declare.
685 (block_async_io, unblock_async_io): Delete prototypes.
686 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
688 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
690 * remote-utils.c (readchar): Allow binary data in received messages.
692 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
694 * win32-low.c (attaching): New global.
695 (win32_create_inferior): Clear the `attaching' global.
696 (win32_attach): Set the `attaching' global.
697 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
698 attaching. Only set a breakpoint at the entry point if not
701 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
703 * server.c (main): Don't report dll events on the initial
704 connection on attaches.
706 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
708 * server.c (main): Relax numerical bases supported for the pid of
709 the --attach command line argument.
711 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
713 * win32-low.c (win32_attach): Call OpenProcess before
714 DebugActiveProcess, not after. Add last error output to error
717 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
719 * win32-low.c (win32_get_thread_context)
720 (win32_set_thread_context): New functions.
721 (thread_rec): Use win32_get_thread_context.
722 (continue_one_thread, win32_resume): Use win32_set_thread_context.
723 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
727 Pedro Alves <pedro_alves@portugalmail.pt>
729 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
731 (child_add_thread): Minor cleanup.
732 (child_continue): Resume artificially suspended threads before
733 calling ContinueDebugEvent.
734 (suspend_one_thread): New.
735 (fake_breakpoint_event): New.
736 (get_child_debug_event): Change return type to int. Check here if
737 gdb sent an interrupt request. If a soft interrupt was requested,
738 fake a breakpoint event. Return 0 if there is no event to handle,
740 (win32_wait): Don't check here if gdb sent an interrupt request.
741 Ensure there is a valid event to handle.
742 (win32_request_interrupt): Add soft interruption method as last
746 Pedro Alves <pedro_alves@portugalmail.pt>
748 * win32-low.h (win32_thread_info): Add descriptions to the
749 structure members. Replace `suspend_count' counter by a
751 * win32-low.c (thread_rec): Update condition of when to get the
752 context from the inferior. Rely on ContextFlags being set if it
753 has already been retrieved. Only suspend the inferior thread if
754 we haven't already. Warn if that fails.
755 (continue_one_thread): s/suspend_count/suspended/. Only call
756 ResumeThread once. Warn if that fails.
758 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
760 * win32-low.c (win32_wait): Don't read from the inferior when it
763 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
765 * Makefile.in (win32_low_h): New variable.
766 (win32-low.o): Add dependency on $(win32_low_h).
767 (win32-arm-low.o, win32-i386-low.o): New rules.
769 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
771 * hostio.c: Correct copyright year.
773 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
775 * Makefile.in (OBS): Add hostio.o.
776 (hostio.o): New rule.
777 * server.h (handle_vFile): Declare.
778 * hostio.c: New file.
779 * server.c (handle_v_requests): Take packet_len and new_packet_len
780 for binary packets. Call handle_vFile.
781 (main): Update call to handle_v_requests.
783 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
785 * linux-low.c: Include <sched.h>.
787 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
789 * linux-low.c (linux_tracefork_grandchild): New.
790 (linux_tracefork_child): Use clone.
791 (linux_test_for_tracefork): Use clone; allocate and free a stack.
793 2007-10-31 Joel Brobecker <brobecker@adacore.com>
795 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
797 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
799 * linux-low.c (handle_extended_wait): Handle unexpected signals.
801 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
803 * inferiors.c (change_inferior_id): Delete.
804 (add_pid_to_list, pull_pid_from_list): New.
805 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
806 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
807 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
808 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
809 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
810 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
811 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
812 (using_threads): Always set to 1.
813 (handle_extended_wait): New.
814 (add_process): Do not set TID.
815 (linux_create_inferior): Set must_set_ptrace_flags.
816 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
817 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
818 (linux_thread_alive): Rename TID argument to LWPID.
819 (linux_wait_for_process): Handle unknown processes. Do not use TID.
820 (linux_wait_for_event): Do not use TID or check using_threads. Update
821 call to dead_thread_notify. Call handle_extended_wait.
822 (linux_create_inferior): Use PTRACE_SETOPTIONS.
823 (send_sigstop): Delete sigstop_sent.
824 (wait_for_sigstop): Avoid TID.
825 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
826 (linux_test_for_tracefork): New.
827 (linux_lookup_signals): Use thread_db_active and
828 linux_supports_tracefork_flag.
829 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
830 * linux-low.h (get_process_thread): Avoid TID.
831 (struct process_ifo): Move thread_known and tid to the end. Remove
833 (linux_attach_lwp, thread_db_init): Update prototypes.
834 * server.h (change_inferior_id): Delete prototype.
835 (add_pid_to_list, pull_pid_from_list): New prototypes.
836 * thread-db.c (thread_db_use_events): New.
837 (find_first_thread): Rename to...
838 (find_one_thread): ...this. Update callers and messages. Do not
839 call fatal. Check thread_db_use_events. Do not call
840 change_inferior_id or new_thread_notify.
841 (maybe_attach_thread): Update. Do not call new_thread_notify.
842 (thread_db_init): Set thread_db_use_events. Check use_events.
843 * utils.c (fatal, warning): Correct message prefix.
845 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
847 * Makefile.in (clean): Remove new files.
848 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
849 (powerpc-64.o, powerpc-64.c): New rules.
850 * configure.srv: Use alternate register sets for powerpc64-*-linux*
851 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
853 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
855 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
856 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
857 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
858 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
859 (target_regsets): Add AltiVec and SPE register sets.
860 * configure.ac: Check for AltiVec and SPE.
861 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
862 (ppc_fill_vrregset, ppc_store_vrregset): New.
863 (target_regsets): Add AltiVec register set.
864 * configure: Regenerated.
866 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
868 * linux-low.c (O_LARGEFILE): Define.
869 (linux_read_memory): Use /proc/PID/mem.
870 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
871 * configure, config.in: Regenerated.
873 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
875 * linux-low.c (linux_wait_for_event): Do not pass signals while
878 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
880 * win32-low.c (create_process): New.
881 (win32_create_inferior): Use create_process instead of
882 CreateProcess. If create_process failed retry appending an ".exe"
883 suffix. Store the GetLastError result immediatelly after
884 create_process calls and use it on the call to error.
886 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
888 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
890 2007-08-23 Joel Brobecker <brobecker@adacore.com>
892 * configure.ac: Switch license to GPLv3.
894 2007-08-01 Michael Snyder <msnyder@access-company.com>
896 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
898 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
900 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
902 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
903 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
904 CloseToolhelp32Snapshot.
905 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
906 CloseToolhelp32Snapshot.
908 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
910 * server.c (main): Check for inferior exit before main loop.
912 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
914 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
915 instead of on tmp_desc.
917 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
918 Daniel Jacobowitz <dan@codesourcery.com>
920 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
921 (add_thread): Minor cleanups.
922 (clear_inferiors): Move lower in the file. Clear the DLL
924 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
925 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
926 (xml_escape_text): New.
927 * server.c (handle_query): Handle qXfer:libraries:read. Report it
929 (handle_v_cont): Report errors.
930 (gdbserver_version): Update.
931 (main): Correct size of own_buf. Do not report initial DLL events.
932 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
933 (unloaded_dll, xml_escape_text): New.
934 * win32-low.c (enum target_waitkind): Update comments.
935 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
936 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
937 (win32_EnumProcessModules, win32_GetModuleInformation)
938 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
939 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
940 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
941 (win32_Module32First, win32_Module32Next, load_toolhelp)
942 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
943 (get_child_debug_event): Handle DLL events.
944 (win32_wait): Likewise.
946 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
948 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
949 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
951 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
953 * win32-low.c (handle_output_debug_string): Ignore event if not
956 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
958 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
960 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
962 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
964 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
966 * inferiors.c (change_inferior_id): Add comment.
967 * linux-low.c (check_removed_breakpoint): Add an early
968 prototype. Improve debug output.
969 (linux_attach): Doc update.
970 (linux_detach_one_process, linux_detach): Clean up before releasing
972 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
973 * linux-low.h (struct process_info): Doc improvement.
974 * mem-break.c (delete_all_breakpoints): New.
975 * mem-break.h (delete_all_breakpoints): New prototype.
976 * thread-db.c (find_first_thread): New.
977 (thread_db_create_event): Call it instead of
978 thread_db_find_new_threads. Clean up unused variables.
979 (maybe_attach_thread): Remove first thread handling.
980 (thread_db_find_new_threads): Use find_first_thread.
981 (thread_db_get_tls_address): Likewise.
983 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
985 * thread-db.c (thread_db_find_new_threads): Add prototype.
986 (thread_db_create_event): Check for the main thread before adding
988 (maybe_attach_thread): Only enable event reporting if TID == 0.
989 (thread_db_get_tls_address): Check for new threads.
991 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
993 * linux-low.c (linux_create_inferior): Try execv before execvp.
994 * spu-low.c (spu_create_inferior): Likewise.
996 2007-06-13 Mike Frysinger <vapier@gentoo.org>
998 * linux-low.c (linux_create_inferior): Change execv to execvp.
999 * spu-low.c (spu_create_inferior): Likewies.
1001 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1003 * Makefile.in (clean): Clean new files instead of deleted ones.
1004 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1005 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1007 * configure.srv: Specify XML files and new regformats for MIPS and
1009 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1010 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1011 an entry for the restart register.
1012 (mips_cannot_fetch_register, mips_cannot_store_register)
1013 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1014 register names to match the XML descriptions.
1015 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1016 restart register instead of $0.
1018 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1019 Markus Deuling <deuling@de.ibm.com>
1021 * remote-utils.c (decode_xfer_write): New function.
1022 * server.h (decode_xfer_write): Add prototype.
1023 * server.c (handle_query): Add PACKET_LEN argument. Support
1024 qXfer:spu:read and qXfer:spu:write packets.
1025 (main): Pass packet_len to handle_query.
1026 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1027 * target.h (target_ops): Add qxfer_spu.
1029 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1031 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1032 accessing non-seekable spufs files.
1034 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1036 * server.c (handle_query): Add reply for qC packet.
1038 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1039 Leo Zayas <lerele@champenstudios@com>
1041 * server.h (check_remote_input_interrupt_request): New function.
1042 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1043 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1044 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1045 (check_remote_input_interrupt_request): New function.
1046 * server.h (check_remote_input_interrupt_request): Declare.
1047 * win32-low.c (winapi_DebugBreakProcess,
1048 winapi_GenerateConsoleCtrlEvent): New typedefs.
1049 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1051 (win32_wait): Check for remote interrupt request
1052 with check_remote_input_interrupt_request.
1053 (win32_request_interrupt): New function.
1054 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1056 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1058 * win32-low.c (debug_registers_changed,
1059 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1060 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1061 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1062 (thread_rec): Get context using the low target.
1063 (child_add_thread): Call thread_added on the low target,
1064 which does the same thing.
1066 (do_initial_child_stuff): Remove debug registers references.
1067 Set context using the low target. Resume threads after
1068 setting the contexts.
1069 (child_continue): Remove dead variable. Remove debug
1070 registers references.
1071 (child_fetch_inferior_registers): Go through the low target.
1072 (do_child_store_inferior_registers): Remove.
1073 (child_store_inferior_registers): Go through the low target.
1074 (win32_resume): Remove debug registers references.
1075 Set context using the low target.
1076 (handle_exception): Change return type to void. Don't record
1077 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1078 first chance exception.
1079 (get_child_debug_event): Change return type to void. Remove
1080 goto loop. Always return after waiting for debug event.
1081 (win32_wait): Convert to switch statement. Handle spurious
1084 * win32-i386-low.c (debug_registers_changed,
1085 debug_registers_used): New.
1086 (initial_stuff): Rename to ...
1087 (i386_initial_stuff): ... this. Clear debug registers
1089 (store_debug_registers): Delete.
1090 (i386_get_thread_context): New.
1091 (load_debug_registers): Delete.
1092 (i386_set_thread_context): New.
1093 (i386_thread_added): New.
1094 (single_step): Rename to ...
1095 (i386_single_step): ... this.
1096 (do_fetch_inferior_registers): Rename to ...
1097 (i386_fetch_inferior_register): ... this.
1098 (i386_store_inferior_register): New.
1099 (the_low_target): Adapt to new interface.
1101 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1102 (arm_get_thread_context): New.
1103 (arm_set_thread_context): New.
1105 (do_fetch_inferior_registers): Rename to ...
1106 (arm_fetch_inferior_register): ... this.
1107 (arm_store_inferior_register): New.
1108 (arm_wince_breakpoint): Reimplement as unsigned long.
1109 (arm_wince_breakpoint_len): Define.
1110 (the_low_target): Adapt to new interface.
1112 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1113 load_debug_registers. Add get_thread_context, set_thread_context,
1114 thread_added and store_inferior_register. Rename
1115 fetch_inferior_registers to fetch_inferior_register.
1116 (regptr): Remove declaration.
1118 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1120 * linux-low.c (linux_detach): Change return type to int. Return 0.
1121 * spu-low.c (spu_detach): Likewise.
1123 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1125 * target.h (target_ops): Change return type of detach to int.
1127 (join_inferior): New.
1128 * server.c (main): Don't skip detach support on mingw32.
1129 If the inferior doesn't support detaching return error.
1130 Call join_inferior instead of using waitpid.
1131 * linux-low.c (linux_join): New.
1132 (linux_target_op): Add linux_join.
1133 * spu-low.c (spu_join): New.
1134 (spu_target_ops): Add spu_join.
1135 * win32-low.c (win32_detach): Adapt to new interface.
1136 Reopen current_process_handle before detaching. Issue a child
1137 resume before detaching.
1139 (win32_target_op): Add win32_join.
1141 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1143 * win32-low.c (win32-attach): Fix return value.
1144 * target.h (target_ops): Describe ATTACH return values.
1146 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1148 * win32-low.c (GETPROCADDRESS): Define.
1149 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1150 (winapi_DebugSetProcessKillOnExit): Likewise.
1151 (win32_create_inferior): Force usage of ansi CreateProcessA.
1152 (win32_attach): Use GETPROCADDRESS.
1153 (win32_detach): Likewise.
1155 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1157 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1159 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1161 * win32-low.c: Commit leftover changes from 2007-03-29.
1163 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1165 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1166 fields short instead of int. Add explicit padding.
1167 (i387_cache_to_fsave): Remove unnecessary casts.
1168 (i387_fsave_to_cache): Doc fix.
1169 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1171 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1173 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1174 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1176 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1178 * configure.srv (arm*-*-mingw32ce*): Move near the other
1181 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1183 * configure.ac: Add errno checking.
1184 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1185 sys/file.h and malloc.h.
1186 (AC_CHECK_DECLS): Add perror.
1187 (srv_mingwce): Handle.
1188 * configure.srv (i[34567]86-*-cygwin*): Add
1189 win32-i386-low.o to srv_tgtobj.
1190 (i[34567]86-*-mingw*): Likewise.
1191 (arm*-*-mingw32ce*): Add case.
1192 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1193 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1194 [__MINGW32CE__] (strerror): New function.
1195 [__MINGW32CE__] (errno): Define to GetLastError.
1196 [__MINGW32CE__] (COUNTOF): New macro.
1197 (remote_open): Remove extra close call.
1198 * mem-break.c (delete_breakpoint_at): New function.
1199 * mem-break.h (delete_breakpoint_at): Declare.
1200 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1201 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1202 [USE_WIN32API] (read, write): Add char* casts.
1203 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1204 * server.h: Include wincecompat.h on Windows CE.
1205 [HAVE_ERRNO_H]: Check.
1206 (perror): Declare if not declared.
1207 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1208 (perror_with_name): Remove errno declaration.
1209 * wincecompat.h: New.
1210 * wincecompat.c: New.
1212 * win32-arm-low.c: New.
1213 * win32-i386-low.c: New.
1214 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1215 (OUTMSG2): Make it safe.
1217 (COUNTOF): New macro.
1218 (NUM_REGS): Get it from the low target.
1219 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1220 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1221 (thread_rec): Let low target handle debug registers.
1222 (child_add_thread): Likewise.
1223 (child_init_thread_list): Likewise.
1224 (continue_one_thread): Likewise.
1226 (do_child_fetch_inferior_registers): Move to ...
1227 * win32-i386-low.c: ... here, and rename to ...
1228 (do_fetch_inferior_registers): ... this.
1229 * win32-low.c (child_fetch_inferior_registers):
1230 Go through the low target.
1231 (do_child_store_inferior_registers): Use regptr.
1232 (strwinerror): New function.
1233 (win32_create_inferior): Handle Windows CE.
1234 Use strwinerror instead of strerror on Windows error
1235 codes. Add program to the error output.
1236 Don't close the main thread handle on Windows CE.
1237 (win32_attach): Use coredll.dll on Windows CE.
1238 (win32_kill): Close current process and current
1240 (win32_detach): Use coredll.dll on Windows CE.
1241 (win32_resume): Let low target handle debug registers, and
1243 (handle_exception): Add/Remove initial breakpoint. Avoid
1244 non-existant WSTOPSIG on Windows CE.
1245 (win32_read_inferior_memory): Cast to remove warning.
1246 (win32_arch_string): Go through the low target.
1247 (initialize_low): Call set_breakpoint_data with the low
1248 target's breakpoint.
1249 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1250 FOP_REGNUM, mappings): Move to ...
1251 * win32-i386-low.c: ... here.
1252 * win32-low.c (win32_thread_info): Move to ...
1253 * win32-low.h: ... here.
1254 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1255 win32-arm-low.c and wincecompat.c.
1256 (all:): Add $EXEEXT.
1257 (install-only:): Likewise.
1258 (gdbserver:): Likewise.
1259 (gdbreplay:): Likewise.
1260 * config.in: Regenerate.
1261 * configure: Regenerate.
1263 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1265 * win32-low.c: Rename typedef thread_info to
1266 win32_thread_info throughout.
1268 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1270 * win32-i386-low.c: Rename to ...
1271 * win32-low.c: ... this.
1272 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1273 * Makefile.in: Likewise.
1275 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1277 * remote-utils.c (monitor_output): Constify msg parameter.
1278 * server.h (monitor_output): Likewise.
1279 * win32-i386-low.c (handle_output_debug_string): New.
1280 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1281 handle_output_debug_string.
1282 (get_child_debug_event): Likewise.
1284 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1286 * server.c (main): Correct strtoul check.
1288 2007-03-27 Jon Ringle <jon@ringle.org>
1290 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1292 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1294 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1296 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1298 * terminal.h: Check HAVE_SGTTY_H.
1300 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1302 * remote-utils.c (remote_open): Print out the assigned port number.
1304 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1306 * remote-utils.c (monitor_output): New function.
1307 * server.c (debug_threads): Define here.
1308 (monitor_show_help): New function.
1309 (handle_query): Handle qRcmd.
1310 (main): Do not handle 'd' packet.
1311 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1312 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1315 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1317 * Makefile.in (EXEEXT): New.
1318 (clean): Use $(EXEEXT).
1320 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1322 * target.h (target_ops): Rename send_signal to request_interrupt,
1323 and remove enum target_signal parameter.
1324 * linux-low.c (linux_request_interrupt): Rename from
1325 linux_send_signal, and always send SIGINT.
1326 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1327 and always send SIGINT.
1328 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1330 (input_interrupt): Likewise.
1332 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1334 * server.c (get_features_xml): Check if target implemented
1336 * win32-i386-low.c (win32_arch_string): New.
1337 (win32_target_ops): Add win32_arch_string as arch_string member.
1339 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1341 * spu-low.c (spu_arch_string): New.
1342 (spu_target_ops): Add spu_arch_string.
1344 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1346 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1347 * configure.ac: Do not check for terminal.h.
1348 * configure, config.in: Regenerated.
1350 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1352 * Makefile.in (OBS): Add $(XML_BUILTIN).
1353 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1355 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1356 (arm-with-iwmmxt.c): New.
1357 * config.in, configure: Regenerate.
1358 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1359 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1360 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1361 (arm*-*-linux*): Add iWMMXt and regset support.
1362 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1363 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1364 (arm_store_wmmxregset, target_regsets): New.
1365 * server.c (get_features_xml): Take annex argument. Check builtin
1367 (handle_query): Handle multiple annexes.
1369 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1371 * remote-utils.c [USE_WIN32API] (read, write): Define.
1372 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1375 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1377 * linux-i386-low.c (the_low_target): Set arch_string.
1378 * linux-x86-64-low.c (the_low_target): Likewise.
1379 * linux-low.c (linux_arch_string): New.
1380 (linux_target_ops): Add it.
1381 * linux-low.h (struct linux_target_ops): Add arch_string.
1382 * server.c (write_qxfer_response): Use const void * for DATA.
1383 (get_features_xml): New.
1384 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1385 * target.h (struct target_ops): Add arch_string method.
1387 2007-01-03 Denis Pilat <denis.pilat@st.com>
1388 Daniel Jacobowitz <dan@codesourcery.com>
1390 * linux-low.c (linux_kill): Handle being called with no threads.
1391 * win32-i386-low.c (win32_kill): Likewise.
1392 (get_child_debug_event): Clear current_process_handle.
1394 2006-12-30 Denis PILAT <denis.pilat@st.com>
1395 Daniel Jacobowitz <dan@codesourcery.com>
1397 * remote-utils.c (remote_open): Check the type of specified
1398 serial port devices before opening them.
1399 * server.c (main): Kill the inferior if an error occurs during
1400 the first remote_open.
1402 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1404 * README: Update supported targets.
1406 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1408 * Makefile.in (clean): Remove reg-mips64.c.
1409 (reg-mips64.c, reg-mips64.o): New rules.
1410 * configure.srv: Handle mips64. Include regset support for mips.
1411 * linux-mips-low.c (union mips_register): New.
1412 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1413 (mips_breakpoint, mips_breakpoint_at): Use int.
1414 (mips_collect_register, mips_supply_register)
1415 (mips_collect_register_32bit, mips_supply_register_32bit)
1416 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1417 (mips_store_fpregset, target_regsets): New.
1418 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1420 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1422 * configure.srv: Add target "spu*-*-*".
1423 * Makefile.in (clean): Remove reg-spu.c.
1424 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1425 * spu-low.c: New file.
1427 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1429 * configure.ac: Correct td_thr_tls_get_addr test.
1430 * configure: Regenerated.
1432 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1434 * linux-low.c (linux_wait_for_event): Reformat. Use the
1436 * remote-utils.c (decode_address_to_semicolon): New.
1437 * server.c (pass_signals, handle_general_set): New.
1438 (handle_query): Mention QPassSignals for qSupported.
1439 (main): Call handle_general_set.
1440 * server.h (pass_signals, decode_address_to_semicolon): New.
1442 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1444 * server.c (handle_query): Correct error handling for read_auxv.
1446 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1448 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1449 and srv_linux_thread_db to yes.
1450 * linux-s390-low.c (s390_fill_gregset): New function.
1451 (target_regsets): Define data structure.
1453 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1455 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1456 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1457 * config.in, configure: Regenerated.
1458 * inferiors.c (gdb_id_to_thread): New function.
1459 (gdb_id_to_thread_id): Use it.
1460 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1461 * linux-low.h (struct process_info): Add th member.
1462 (thread_db_get_tls_address): New prototype.
1463 * remote-utils.c (decode_address): Make non-static.
1464 * server.c (handle_query): Handle qGetTLSAddr.
1465 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1466 * target.h (struct target_ops): Add get_tls_address.
1467 * thread-db.c (maybe_attach_thread): Save the thread handle.
1468 (thread_db_get_tls_address): New.
1470 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1472 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1473 (linux_resume_one_process): Take a siginfo_t *. Update all
1474 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1475 (struct pending_signals): Add a siginfo_t.
1476 (linux_wait_for_process): Always set last_status.
1477 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1478 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1479 * linux-low.h (struct process_info): Add last_status.
1481 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1483 * remote-utils.c (try_rle): New function.
1484 (putpkt_binary): Use it.
1486 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1488 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1489 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1490 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1491 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1492 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1495 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1497 * server.c (terminal_fd): New variable.
1498 (old_foreground_pgrp): Likewise.
1499 (restore_old_foreground_pgrp): New function.
1500 (start_inferior): Record the terminal file descriptor in terminal_fd
1501 and its original foreground group in old_foreground_pgrp. Register
1502 restore_old_foreground_pgrp with atexit().
1504 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1506 * server.c (handle_query): Correct qPart to qXfer.
1508 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1510 * configure.ac: Check for more headers which are missing on
1511 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1512 * configure.srv: Add Cygwin and mingw32.
1513 * remote-utils.c: Don't include headers unconditionally which
1514 are missing on mingw32. Include <winsock.h> for mingw32.
1515 (remote_open): Adjust for mingw32 support. Flush
1516 standard error after writing to it.
1517 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1518 (unblock_async_io, enable_async_io, disable_async_io)
1519 (readchar, getpkt): Update for Winsock support.
1520 (prepare_resume_reply): Expect a protocol signal number.
1521 * server.c: Disable <sys/wait.h> on mingw32.
1522 (start_inferior): Adjust for mingw32 support. Flush
1523 standard error after writing to it.
1524 (attach_inferior): Likewise. Use protocol signal
1526 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1528 * win32-i386-low.c: New file.
1529 * Makefile.in (XM_CLIBS): Set.
1530 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1531 (win32-i386-low.o): New dependency rule.
1532 * linux-low.c (linux_wait): Use target signal numbers.
1533 * target.h (struct target_ops): Doc fix.
1534 * server.h (target_signal_to_name): New prototype.
1535 * gdbreplay.c: Don't include headers unconditionally which
1536 are missing on mingw32. Include <winsock.h> for mingw32.
1537 (remote_close, remote_open): Adjust for Winsock support.
1538 * configure, config.in: Regenerated.
1540 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1542 * server.c (decode_xfer_read, write_qxfer_response): New.
1543 (handle_query): Take a packet length argument. Handle
1544 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1545 the qSupported response.
1546 (main): Update call to handle_query.
1548 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1550 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1551 (putpkt_binary): Renamed from putpkt and adjusted for binary
1553 (putpkt): New wrapper for putpkt_binary.
1554 (readchar): Don't mask off the high bit.
1555 (decode_X_packet): New function.
1556 * server.c (main): Call putpkt_binary if a handler sets the packet
1557 length. Save the length of the incoming packet. Handle 'X'.
1558 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1560 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1562 * server.c (handle_query): Handle qSupported.
1564 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1566 * remote-utils.c (all_symbols_looked_up): New variable.
1567 (look_up_one_symbol): Check it.
1568 * server.h (look_up_one_symbol): New declaration.
1569 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1571 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1573 * Makefile.in (linux-arm-low.o): Update dependencies.
1574 * linux-arm-low.c: Include "gdb_proc_service.h".
1575 (PTRACE_GET_THREAD_AREA): Define.
1576 (ps_get_thread_area): New function.
1578 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1580 * configure.srv (m68k*-*-uclinux*): New target.
1581 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1582 (linux_resume_one_process): Remove extraneous cast.
1583 (linux_read_offsets): New.
1584 (linux_target_op): Add linux_read_offsets on mmuless systems.
1585 * server.c (handle_query): Add qOffsets logic.
1586 * target.h (struct target_ops): Add read_offsets.
1588 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1590 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1591 (PTRACE_GET_THREAD_AREA): Define.
1592 (ps_get_thread_area): New function.
1593 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1594 (linux-x86-64-low.o): Update.
1596 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1598 * configure.ac: Remove checks for prfpregset_t.
1599 * gdb_proc_service.h: New file.
1600 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1601 new "gdb_proc_service.h".
1602 * proc-service.c: Likewise.
1603 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1604 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1605 * Makefile.in (gdb_proc_service_h): Updated.
1606 * configure, config.in: Regenerated.
1608 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1610 * remote-utils.c (prepare_resume_reply): Move declaration
1611 of gdb_id_from_wait to the top of the block.
1613 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1615 * linux-low.c (regsets_store_inferior_registers): Read the regset
1616 from the target before filling it.
1618 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1620 * server.c (attach_inferior): Return SIGTRAP for a successful
1623 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1625 * Makefile.in (OBS): Add version.o.
1626 (STAGESTUFF): Delete.
1627 (version.o): Add dependencies.
1628 (version.c): Replace rule.
1629 (clean): Remove version.c.
1630 * server.c (gdbserver_version): New.
1631 (gdbserver_usage): Use printf.
1632 (main): Handle --version and --help.
1633 * server.h (version, host_name): Add declarations.
1635 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1647 * linux-x86-64-low.c:
1650 * linux-ppc64-low.c:
1659 * linux-crisv32-low.c:
1671 * gdbserver.1: Add (C) after Copyright. Update the FSF
1674 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1676 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1677 (arm_breakpoint_at): Recognize both breakpoints.
1678 (the_low_target): Use the correct breakpoint instruction.
1680 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1682 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1683 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1684 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1685 (the_low_target): Update.
1687 2005-10-25 Andreas Schwab <schwab@suse.de>
1689 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1691 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1692 (ia64_num_regs): Reduce to 462.
1694 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1696 * acinclude.m4: Correct quoting.
1697 * aclocal.m4: Regenerated.
1699 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1700 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1701 (thread_db_init): Call thread_db_err_str.
1702 * configure.ac: Check for TD_VERSION.
1703 * config.in, configure: Regenerated.
1705 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1707 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1709 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1711 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1712 is not available. Define HAVE_PTRACE_GETREGS if it is.
1713 * config.in, configure: Regenerated.
1714 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1715 * linux-i386-low.c, linux-m68k-low.c: Update to use
1716 HAVE_PTRACE_GETREGS.
1717 * linux-low.c (regsets_fetch_inferior_registers)
1718 (regsets_store_inferior_registers): Only return 0 if we processed
1720 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1721 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1723 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1725 * inferiors.c (struct thread_info): Add gdb_id.
1726 (add_thread): Add gdb_id argument.
1727 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1728 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1729 calls to add_thread.
1730 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1731 * server.c (handle_query): Use thread_to_gdb_id.
1732 (handle_v_cont, main): Use gdb_id_to_thread_id.
1733 * server.h (add_thread): Update prototype.
1734 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1737 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1739 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1740 left-padded registers.
1741 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1742 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1744 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1746 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1747 * configure: Regenerate.
1748 * config.in: Regenerate.
1749 * server.h (NEED_DECLARATION_STRERROR):
1750 Replace with !HAVE_DECL_STRERROR.
1752 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1754 * linux-low.c (linux_wait, linux_send_signal): Don't test
1755 an unsigned long variable for > 0 if it could be MAX_ULONG.
1756 * server.c (myresume): Likewise.
1757 * target.c (set_desired_inferior): Likewise.
1759 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1761 * configure.ac: Simplify and improve check for socklen_t.
1762 * configure, config.in: Regenerate.
1764 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1766 * acconfig.h: Remove.
1767 * configure.ac: Add a test for socklen_t. Use three-argument
1768 AC_DEFINE throughout.
1769 * config.in: Regenerated using autoheader 2.59.
1770 * configure: Regenerated.
1772 * gdbreplay.c (socklen_t): Provide a default.
1773 (remote_open): Use socklen_t.
1774 * remote-utils.c (socklen_t): Provide a default.
1775 (remote_open): Use socklen_t.
1776 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1779 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1781 * linux-low.c (linux_read_memory, linux_write_memory)
1782 (linux_read_auxv): Likewise.
1783 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1784 (check_mem_write): Likewise.
1785 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1787 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1788 (registers_from_string, register_data): Likewise.
1789 * server.c (handle_query, main): Likewise.
1790 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1791 (decode_M_packet): Likewise.
1792 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1793 * target.h (struct target_ops): Update read_memory, write_memory,
1795 (read_inferior_memory, write_inferior_memory): Update.
1796 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1798 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1799 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1800 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1801 linux-s390-low.c, linux-sh-low.c: Update for changes in
1802 read_inferior_memory and the_low_target->breakpoint.
1804 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1806 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1807 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1808 * configure.srv: Add powerpc64-*-linux*.
1809 * linux-ppc64-low.c: New file.
1811 2005-05-23 Orjan Friberg <orjanf@axis.com>
1813 * linux-cris-low.c: New file with support for CRIS.
1814 * linux-crisv32-low.c: Ditto for CRISv32.
1815 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1816 (clean): Add reg-cris.c and reg-crisv32.c.
1817 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1818 reg-crisv32.o, and reg-crisv32.c to make rules.
1819 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1822 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1824 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1825 of sizeof (PTRACE_XFER_TYPE).
1826 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1828 2005-05-12 Orjan Friberg <orjanf@axis.com>
1830 * target.h (struct target_ops): Add insert_watchpoint,
1831 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1832 pointers for hardware watchpoint support.
1833 * linux-low.h (struct linux_target_ops): Ditto.
1834 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1835 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1836 to linux_target_ops.
1837 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1839 * server.c (main): Recognize 'Z' and 'z' packets.
1841 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1843 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1844 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1845 (the_low_target): Add new members.
1847 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1849 * proc-service.c (ps_lgetregs): Search all_processes instead of
1852 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1854 * server.c (start_inferior): Change return type to int.
1855 (attach_inferior): Change sigptr to int *.
1856 (handle_v_cont, handle_v_requests): Change signal to int *.
1857 (main): Change signal to int.
1859 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1861 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1862 * configure.srv: Add m32r*-*-linux*.
1863 * linux-m32r-low.c: New file.
1865 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1867 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1869 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1871 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1872 Take unsigned long arguments for PIDs.
1873 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1874 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1875 (wait_for_sigstop, linux_resume_one_process)
1876 (regsets_fetch_inferior_registers, linux_send_signal)
1877 (linux_read_auxv): Likewise. Update the types of variables holding
1878 PIDs. Update format string specifiers.
1879 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1880 * remote-utils.c (prepare_resume_reply): Likewise.
1881 * server.c (cont_thread, general_thread, step_thread)
1882 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1884 (handle_query): Update format specifiers.
1885 (handle_v_cont, main): Use strtoul for thread IDs.
1886 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1887 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1888 (general_thread, step_thread, thread_from_wait)
1889 (old_thread_from_wait): Update.
1890 * target.h (struct thread_resume): Use unsigned long for THREAD.
1891 (struct target_ops): Use unsigned long for arguments to attach and
1894 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1896 * acinclude.m4: Include bfd/bfd.m4 directly.
1897 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1898 <agriffis@toolchain.org>.
1899 * aclocal.m4, configure: Regenerated.
1901 2005-01-07 Andrew Cagney <cagney@gnu.org>
1903 * configure.ac: Rename configure.in, require autoconf 2.59.
1904 * configure: Re-generate.
1906 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1908 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1910 * aclocal.m4: Regenerated.
1911 * configure: Regenerated.
1913 2004-11-21 Andreas Schwab <schwab@suse.de>
1915 * linux-m68k-low.c (m68k_num_gregs): Define.
1916 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1917 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1918 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1919 (m68k_breakpoint_at): New. Add to the_low_target.
1921 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1922 srv_linux_thread_db to yes.
1924 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1926 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1927 (ARCH_SET_FS): Likewise.
1928 (ARCH_GET_FS): Likewise.
1929 (ARCH_GET_GS): Likewise.
1931 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1933 * linux-i386-low.c (ps_get_thread_area): New.
1934 * linux-x86-64-low.c (ps_get_thread_area): New.
1935 * linux-low.c: Include <sys/syscall.h>.
1936 (linux_kill_one_process): Don't kill the first thread here.
1937 (linux_kill): Kill the first thread here.
1938 (kill_lwp): New function.
1939 (send_sigstop, linux_send_signal): Use it.
1940 * proc-service.c: Clean up #ifdefs.
1941 (fpregset_info): Delete.
1942 (ps_lgetregs): Update and enable implementation.
1943 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1945 * remote-utils.c (struct sym_cache, symbol_cache): New.
1946 (input_interrupt): Print a clearer message.
1947 (async_io_enabled): New variable.
1948 (enable_async_io, disable_async_io): Use it. Update comments.
1949 (look_up_one_symbol): Use the symbol cache.
1950 * thread-db.c (thread_db_look_up_symbols): New function.
1951 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1953 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1955 * configure.in: Test for -rdynamic.
1956 * configure: Regenerated.
1957 * Makefile (INTERNAL_LDFLAGS): New.
1958 (gdbserver, gdbreplay): Use it.
1960 2004-09-02 Andrew Cagney <cagney@gnu.org>
1962 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1964 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1966 * linux-low.c (linux_wait): Clear all_processes list also.
1968 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1970 * linux-low.c: Include <errno.h>. Remove extern declaration of
1973 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1975 * gdbreplay.c, server.h, utils.c: Update copyright years.
1977 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1979 * server.c (main): Print child status or termination signal from
1980 variable 'signal', not 'sig'.
1982 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1984 * linux-low.c (linux_read_memory): Change return type to
1985 int. Check for and return error from ptrace().
1986 * target.c (read_inferior_memory): Change return type to int. Pass
1987 back return status from the_target->read_memory().
1988 * target.h (struct target_ops): Adapt *read_memory() prototype.
1990 (read_inferior_memory): Adapt prototype.
1991 * server.c (main): Return an error packet if
1992 read_inferior_memory() returns an error.
1994 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1996 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1997 Unify with other clean targets.
1999 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2001 * server.c (handle_v_cont): Call set_desired_inferior.
2003 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2005 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2007 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2009 * linux-low.c (linux_wait): Unblock async I/O.
2010 (linux_resume): Block and enable async I/O.
2011 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2012 * server.h (block_async_io, unblock_async_io): Add prototypes.
2014 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2016 * remote-utils.c (remote_open): Print a status notice after
2018 * server.c (attach_inferior): Print a status notice after
2021 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2023 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2025 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2027 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2029 * server.c, target.h: Update copyright years.
2031 2004-02-25 Roland McGrath <roland@redhat.com>
2033 * target.h (struct target_ops): New member `read_auxv'.
2034 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2035 * linux-low.c (linux_read_auxv): New function.
2036 (linux_target_ops): Initialize `read_auxv' member to that.
2038 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2040 Committed by Jim Blandy <jimb@redhat.com>.
2042 * linux-s390-low.c (s390_num_regs): Update.
2043 (s390_regmap): Remove control registers. Use __s390x__ predefine
2044 instead of GPR_SIZE to distiguish s390 and s390x targets.
2046 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2048 * linux-low.c: Update copyright year.
2049 (check_removed_breakpoint): Clear pending_is_breakpoint.
2050 (linux_set_resume_request, linux_queue_one_thread)
2051 (resume_status_pending_p): New functions.
2052 (linux_continue_one_thread): Use process->resume.
2053 (linux_resume): Only resume threads if there are no pending events.
2054 * linux-low.h (struct process_info): Add resume request
2057 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2059 * regcache.c (new_register_cache): Clear the allocated register
2060 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2062 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2064 * linux-low.c (linux_resume): Take a struct thread_resume *
2066 (linux_wait): Update call.
2067 (resume_ptr): New static variable.
2068 (linux_continue_one_thread): Renamed from
2069 linux_continue_one_process. Use resume_ptr.
2070 (linux_resume): Use linux_continue_one_thread.
2071 * server.c (handle_v_cont, handle_v_requests): New functions.
2072 (myresume): New function.
2073 (main): Handle 'v' case.
2074 * target.h (struct thread_resume): New type.
2075 (struct target_ops): Change argument of "resume" to struct
2077 (myresume): Delete macro.
2079 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2081 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2082 (uninstall): Support DESTDIR.
2084 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2086 * configure.srv: Add xscale*linux copy of arm*linux entry.
2088 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2090 * linux-arm-low.c (arm_reinsert_addr): New function.
2091 (the_low_target): Add arm_reinsert_addr.
2093 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2095 * mem-break.c: Remove whitespace at end of file.
2097 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2099 * configure.in: Check whether we need to prototype strerror.
2100 * server.h: Optionally prototype strerror.
2101 * gdbreplay.c (perror_with_name): Use strerror.
2102 * linux-low.c (linux_attach_lwp): Use strerror.
2103 * utils.c (perror_with_name): Use strerror.
2104 * config.in, configure: Regenerated.
2106 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2108 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2109 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2111 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2113 * Makefile.in (SFILES): Update.
2114 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2115 low-sun3.c: Remove files.
2117 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2119 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2120 (linux_detach_one_process, linux_detach): New functions.
2121 (linux_target_ops): Add linux_detach.
2122 * server.c (main): Handle 'D' packet.
2123 * target.h (struct target_ops): Add "detach" member.
2124 (detach_inferior): Define.
2126 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2128 From Kelley Cook <kelleycook@wideopenwest.com>:
2129 * configure.srv: Accept i[34567]86 variants.
2131 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2133 * linux-low.c (linux_wait_for_event): Correct comment typos.
2134 (linux_resume_one_process): Call check_removed_breakpoint.
2135 (linux_send_signal): New function.
2136 (linux_target_ops): Add linux_send_signal.
2137 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2139 * target.h (struct target_ops): Add send_signal.
2141 2003-05-29 Jim Blandy <jimb@redhat.com>
2143 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2144 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2145 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2146 away part of the register's value.
2148 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2150 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2151 (linux_wait_for_event, linux_init_signals): Likewise.
2153 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2155 * configure.in: Check for stdlib.h.
2156 * configure: Regenerated.
2157 * config.in: Regenerated.
2159 2003-01-04 Andreas Schwab <schwab@suse.de>
2161 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2163 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2165 * Makefile.in: Remove obsolete code.
2167 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2169 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2170 defined(PT_FPR0_HI).
2172 2002-11-17 Stuart Hughes <seh@zee2.com>
2174 * linux-arm-low.c (arm_num_regs): Increase.
2175 (arm_regmap): Include status register.
2177 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2179 * linux-low.c (register_addr): Remove incorrect -1 check.
2181 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2183 * linux-low.c (linux_create_inferior): Call setpgid. Return
2185 (unstopped_p, linux_signal_pid): Remove.
2186 (linux_target_ops): Remove linux_signal_pid.
2187 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2188 global instead of target method.
2189 * target.h (struct target_ops): Remove signal_pid. Update comment
2190 for create_inferior.
2191 * server.c (signal_pid): New variable.
2192 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2193 gdbserver. Set the child to be the foreground process group.
2194 (attach_inferior): Set signal_pid.
2196 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2198 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2200 2002-08-20 Jim Blandy <jimb@redhat.com>
2202 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2205 2002-08-01 Andrew Cagney <cagney@redhat.com>
2207 * Makefile.in: Make chill references obsolete.
2209 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2211 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2212 * configure: Regenerate.
2213 * config.in: Regenerate.
2215 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2217 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2218 (perror_with_name, remote_close, remote_open, expect, play): Static.
2220 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2222 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2223 byte offsets instead of an array of indexes.
2224 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2226 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2228 * regcache.c: Add comment.
2230 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2232 * thread-db.c: New file.
2233 * proc-service.c: New file.
2234 * acinclude.m4: New file.
2235 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2236 proc-service.o, and thread-db.o.
2237 (linux-low.o): Add USE_THREAD_DB.
2238 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2239 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2240 * aclocal.m4: Regenerated.
2241 * config.in: Regenerated.
2242 * configure: Regenerated.
2243 * configure.in: Check for proc_service.h, sys/procfs.h,
2244 thread_db.h, and linux/elf.h headrs.
2245 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2246 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2247 Check for -lthread_db and thread support.
2248 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2249 PowerPC, and SuperH.
2250 * i387-fp.c: Constify arguments.
2251 * i387-fp.h: Likewise.
2252 * inferiors.c: (struct thread_info): Renamed from
2253 `struct inferior_info'. Remove PID member. Use generic inferior
2254 list header. All uses updated.
2255 (inferiors, signal_pid): Removed.
2256 (all_threads): New variable.
2257 (get_thread): Define.
2258 (add_inferior_to_list): New function.
2259 (for_each_inferior): New function.
2260 (change_inferior_id): New function.
2261 (add_inferior): Removed.
2262 (remove_inferior): New function.
2263 (add_thread): New function.
2264 (free_one_thread): New function.
2265 (remove_thread): New function.
2266 (clear_inferiors): Use for_each_inferior and free_one_thread.
2267 (find_inferior): New function.
2268 (find_inferior_id): New function.
2269 (inferior_target_data): Update argument type.
2270 (set_inferior_target_data): Likewise.
2271 (inferior_regcache_data): Likewise.
2272 (set_inferior_regcache_data): Likewise.
2273 * linux-low.c (linux_bp_reinsert): Remove.
2274 (all_processes, stopping_threads, using_thrads)
2275 (struct pending_signals, debug_threads, pid_of): New.
2276 (inferior_pid): Replace with macro.
2277 (struct inferior_linux_data): Remove.
2278 (get_stop_pc, add_process): New functions.
2279 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2280 Use add_process and add_thread.
2281 (linux_attach_lwp): New function, based on old linux_attach. Use
2282 add_process and add_thread. Set stop_expected for new threads.
2283 (linux_attach): New function.
2284 (linux_kill_one_process): New function.
2285 (linux_kill): Kill all LWPs.
2286 (linux_thread_alive): Use find_inferior_id.
2287 (check_removed_breakpoints, status_pending_p): New functions.
2288 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2289 Update. Use WNOHANG. Wait for cloned processes also. Update process
2290 struct for the found process.
2291 (linux_wait_for_event): New function.
2292 (linux_wait): Use it. Support LWPs.
2293 (send_sigstop, wait_for_sigstop, stop_all_processes)
2294 (linux_resume_one_process, linux_continue_one_process): New functions.
2295 (linux_resume): Support LWPs.
2296 (REGISTER_RAW_SIZE): Remove.
2297 (fetch_register): Use register_size instead. Call supply_register.
2298 (usr_store_inferior_registers): Likewise. Call collect_register.
2300 (regsets_fetch_inferior_registers): Improve error message.
2301 (regsets_store_inferior_registers): Add debugging.
2302 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2303 (unstopped_p, linux_signal_pid): New functions.
2304 (linux_target_ops): Add linux_signal_pid.
2305 (linux_init_signals): New function.
2306 (initialize_low): Call it. Initialize using_threads.
2307 * regcache.c (inferior_regcache_data): Add valid
2309 (get_regcache): Fetch registers lazily. Add fetch argument
2310 and update all callers.
2311 (regcache_invalidate_one, regcache_invalidate): New
2313 (new_register_cache): Renamed from create_register_cache.
2314 Return the new regcache.
2315 (free_register_cache): Change argument to a void *.
2316 (registers_to_string, registers_from_string): Call get_regcache
2317 with fetch flag set.
2318 (register_data): Make static. Pass fetch flag to get_regcache.
2319 (supply_register): Call get_regcache with fetch flag clear.
2320 (collect_register): Call get_regcache with fetch flag set.
2321 (collect_register_as_string): New function.
2322 * regcache.h: Update.
2323 * remote-utils.c (putpkt): Flush after debug output and use
2325 Handle input interrupts while waiting for an ACK.
2326 (input_interrupt): Use signal_pid method.
2327 (getpkt): Flush after debug output and use stderr.
2328 (outreg): Use collect_register_as_string.
2329 (new_thread_notify, dead_thread_notify): New functions.
2330 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2332 (look_up_one_symbol): Flush after debug output.
2333 * server.c (step_thread, server_waiting): New variables.
2334 (start_inferior): Don't use signal_pid. Update call to mywait.
2335 (attach_inferior): Update call to mywait.
2336 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2337 (main): Don't fetch/store registers explicitly. Use
2338 set_desired_inferior. Support proposed ``Hs'' packet. Update
2341 (struct inferior_list, struct_inferior_list_entry): New.
2342 * target.c (set_desired_inferior): New.
2343 (write_inferior_memory): Constify.
2344 (mywait): New function.
2346 (struct target_ops): New signal_pid method.
2347 (mywait): Removed macro, added prototype.
2349 * linux-low.h (regset_func): Removed.
2350 (regset_fill_func, regset_store_func): New.
2351 (enum regset_type): New.
2352 (struct regset_info): Add type field. Use new operation types.
2353 (struct linux_target_ops): stop_pc renamed to get_pc.
2354 Add decr_pc_after_break and breakpoint_at.
2355 (get_process, get_thread_proess, get_process_thread)
2356 (strut process_info, all_processes, linux_attach_lwp)
2357 (thread_db_init): New.
2359 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2360 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2361 (the_low_target): Add new members.
2362 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2363 (i386_store_fpxregset): Constify.
2364 (target_regsets): Add new kind identifier.
2365 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2366 (i386_set_pc): Add debugging.
2367 (i386_breakpoint_at): New function.
2368 (the_low_target): Add new members.
2369 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2370 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2371 (mips_breakpoint_at): New.
2372 (the_low_target): Add new members.
2373 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2374 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2375 (the_low_target): Add new members.
2376 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2377 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2378 (the_low_target): Add new members.
2379 * linux-x86-64-low.c (target_regsets): Add new kind
2382 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2384 From Martin Pool <mbp@samba.org>:
2385 * server.c (gdbserver_usage): New function.
2388 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2390 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2393 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2395 * Makefile.in: Remove obsolete code.
2397 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2399 * linux-low.c (regsets_fetch_inferior_registers),
2400 (regsets_store_inferior_registers): Removed cast to int from
2402 * regcache.h: Added declaration of struct inferior_info.
2404 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2406 * inferiors.c (struct inferior_info): Add regcache_data.
2407 (add_inferior): Call create_register_cache.
2408 (clear_inferiors): Call free_register_cache.
2409 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2410 * regcache.c (struct inferior_regcache_data): New.
2411 (registers): Remove.
2412 (get_regcache): New function.
2413 (create_register_cache, free_register_cache): New functions.
2414 (set_register_cache): Don't initialize the register cache here.
2415 (registers_to_string, registers_from_string, register_data): Call
2417 * regcache.h: Add prototypes.
2418 * server.h: Likewise.
2420 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2422 * mem-break.c: New file.
2423 * mem-break.h: New file.
2424 * Makefile.in: Add mem-break.o rule; update server.h
2426 * inferiors.c (struct inferior_info): Add target_data
2428 (clear_inferiors): Free target_data member if set.
2429 (inferior_target_data, set_inferior_target_data): New functions.
2430 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2431 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2432 * linux-low.c (linux_bp_reinsert): New variable.
2433 (struct inferior_linux_data): New.
2434 (linux_create_inferior): Use set_inferior_target_data.
2435 (linux_attach): Likewise. Call add_inferior.
2436 (linux_wait_for_one_inferior): New function.
2437 (linux_wait): Call it.
2438 (linux_write_memory): Add const.
2439 (initialize_low): Call set_breakpoint_data.
2440 * linux-low.h (struct linux_target_ops): Add breakpoint
2442 * server.c (attach_inferior): Remove extra add_inferior
2444 * server.h: Include mem-break.h. Update inferior.c
2446 * target.c (read_inferior_memory)
2447 (write_inferior_memory): New functions.
2448 * target.h (read_inferior_memory)
2449 (write_inferior_memory): Change macros to prototypes.
2450 (struct target_ops): Update comments. Add const to write_memory
2453 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2455 * linux-low.c (usr_store_inferior_registers): Support
2456 registers which are allowed to fail to store.
2457 * linux-low.h (linux_target_ops): Likewise.
2458 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2459 (ppc_cannot_store_register): FPSCR may not be storable.
2461 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2463 * server.h: Include <string.h> if HAVE_STRING_H.
2464 * ChangeLog: Correct paths in last ChangeLog entry.
2466 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2468 * linux-low.h: Remove obsolete prototypes.
2469 (struct linux_target_ops): New.
2470 (extern the_low_target): New.
2471 * linux-low.c (num_regs, regmap): Remove declarations.
2472 (register_addr): Use the_low_target explicitly.
2473 (fetch_register): Likewise.
2474 (usr_fetch_inferior_registers): Likewise.
2475 (usr_store_inferior_registers): Likewise.
2476 * linux-arm-low.c (num_regs): Remove.
2477 (arm_num_regs): Define.
2478 (arm_regmap): Renamed from regmap, made static.
2479 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2481 (arm_cannot_store_register): Renamed from cannot_store_register,
2483 (the_low_target): New.
2484 * linux-i386-low.c (num_regs): Remove.
2485 (i386_num_regs): Define.
2486 (i386_regmap): Renamed from regmap, made static.
2487 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2489 (i386_cannot_store_register): Renamed from cannot_store_register,
2491 (the_low_target): New.
2492 * linux-ia64-low.c (num_regs): Remove.
2493 (ia64_num_regs): Define.
2494 (ia64_regmap): Renamed from regmap, made static.
2495 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2497 (ia64_cannot_store_register): Renamed from cannot_store_register,
2499 (the_low_target): New.
2500 * linux-m68k-low.c (num_regs): Remove.
2501 (m68k_num_regs): Define.
2502 (m68k_regmap): Renamed from regmap, made static.
2503 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2505 (m68k_cannot_store_register): Renamed from cannot_store_register,
2507 (the_low_target): New.
2508 * linux-mips-low.c (num_regs): Remove.
2509 (mips_num_regs): Define.
2510 (mips_regmap): Renamed from regmap, made static.
2511 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2513 (mips_cannot_store_register): Renamed from cannot_store_register,
2515 (the_low_target): New.
2516 * linux-ppc-low.c (num_regs): Remove.
2517 (ppc_num_regs): Define.
2518 (ppc_regmap): Renamed from regmap, made static.
2519 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2521 (ppc_cannot_store_register): Renamed from cannot_store_register,
2523 (the_low_target): New.
2524 * linux-s390-low.c (num_regs): Remove.
2525 (s390_num_regs): Define.
2526 (s390_regmap): Renamed from regmap, made static.
2527 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2529 (s390_cannot_store_register): Renamed from cannot_store_register,
2531 (the_low_target): New.
2532 * linux-sh-low.c (num_regs): Remove.
2533 (sh_num_regs): Define.
2534 (sh_regmap): Renamed from regmap, made static.
2535 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2537 (sh_cannot_store_register): Renamed from cannot_store_register,
2539 (the_low_target): New.
2540 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2541 (the_low_target): New.
2543 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2545 * Makefile.in: Add stamp-h target.
2546 * configure.in: Create stamp-h.
2547 * configure: Regenerated.
2549 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2551 * inferiors.c: New file.
2552 * target.c: New file.
2553 * target.h: New file.
2554 * Makefile.in: Add target.o and inferiors.o. Update
2556 * linux-low.c (inferior_pid): New static variable,
2557 moved from server.c.
2558 (linux_create_inferior): Renamed from create_inferior.
2559 Call add_inferior. Return 0 on success instead of a PID.
2560 (linux_attach): Renamed from myattach.
2561 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2562 (linux_thread_alive): Renamed from mythread_alive.
2563 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2565 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2566 (regsets_store_inferior_registers): Correct error message.
2567 Add missing ``return 0''.
2568 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2569 (linux_store_registers): Renamed from store_inferior_registers.
2570 (linux_read_memory): Renamed from read_inferior_memory.
2571 (linux_write_memory): Renamed from write_inferior_memory.
2572 (linux_target_ops): New structure.
2573 (initialize_low): Call set_target_ops ().
2574 * remote-utils.c (unhexify): New function.
2575 (hexify): New function.
2576 (input_interrupt): Send signals to ``signal_pid''.
2577 * server.c (inferior_pid): Remove.
2578 (start_inferior): Update create_inferior call.
2579 (attach_inferior): Call add_inferior.
2580 (handle_query): New function.
2581 (main): Call handle_query for `q' packets.
2582 * server.h: Include "target.h". Remove obsolete prototypes.
2583 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2585 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2587 * Makefile.in: Add WARN_CFLAGS. Update configury
2589 * configure.in: Check for <string.h>
2590 * configure: Regenerate.
2591 * config.in: Regenerate.
2592 * gdbreplay.c: Include needed system headers.
2593 (remote_open): Remove strchr prototype.
2594 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2595 * regcache.c (supply_register): Change buf argument to const void *.
2596 (supply_register_by_name): Likewise.
2597 (collect_register): Change buf argument to void *.
2598 (collect_register_by_name): Likewise.
2599 * regcache.h: Add missing prototypes.
2600 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2601 * server.c (handle_query): New function.
2602 (attached): New static variable, moved out of main.
2603 (main): Quiet longjmp clobber warnings.
2604 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2605 * utils.c (error): Remove NORETURN.