1 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3 * server.c (handle_query): Report qXfer:siginfo:read and
4 qXfer:siginfo:write as supported and handle them.
5 * target.h (struct target_ops) <qxfer_siginfo>: New field.
6 * linux-low.c (linux_xfer_siginfo): New.
7 (linux_target_ops): Set it.
9 2009-01-26 Pedro Alves <pedro@codesourcery.com>
11 * server.c (gdbserver_usage): Mention --remote-debug.
12 (main): Accept '--remote-debug' switch.
14 2009-01-18 Doug Evans <dje@google.com>
16 * regcache.c (new_register_cache): No need to check result of xcalloc.
17 * server.c (handle_search_memory): Back out calls to xmalloc,
18 result is checked and error is returned to user upon failure.
19 (handle_query): Ditto. Add more checks for result of malloc.
20 (handle_v_cont): Check result of malloc, report error back to
22 (handle_v_run): Ditto. Call freeargv.
23 * server.h (freeargv): Declare.
24 * utils.c (freeargv): New fn.
26 2009-01-15 Doug Evans <dje@google.com>
28 * gdbreplay.c (perror_with_name): Make arg const char *.
29 * server.h (target_signal_to_name): Make return type const char *.
30 * thread-db.c (thread_db_err_str): Make return type const char *.
31 * utils.c (perror_with_name): Make arg const char *.
33 2009-01-14 Pedro Alves <pedro@codesourcery.com>
35 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
36 when handling a EXIT_PROCESS_DEBUG_EVENT.
38 2009-01-06 Joel Brobecker <brobecker@adacore.com>
40 * gdbreplay.c (gdbreplay_version): Update copyright year.
41 * server.c (gdbserver_version): Likewise.
43 2009-01-05 Doug Evans <dje@google.com>
45 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
46 (handle_extended_wait): Improve comment.
48 2008-12-13 Doug Evans <dje@google.com>
50 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
51 * server.h (ATTR_MALLOC): New macro.
52 (xmalloc,xcalloc,xstrdup): Declare.
53 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
58 * remote-utils.c: Ditto.
63 2008-12-12 Doug Evans <dje@google.com>
65 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
68 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
70 2008-12-09 Doug Evans <dje@google.com>
72 * linux-low.h (struct process_info): Delete member tid, unused.
73 * thread-db.c (find_one_thread): Update.
74 (maybe_attach_thread): Update.
76 2008-12-02 Pedro Alves <pedro@codesourcery.com>
78 * target.h (struct target_ops): Add qxfer_osdata member.
79 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
81 (linux_qxfer_osdata): New functions.
82 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
84 * server.c (handle_query): Handle "qXfer:osdata:read:".
85 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
86 (buffer_xml_printf): New functions.
87 * server.h (struct buffer): New.
88 (buffer_grow_str, buffer_grow_str0): New macros.
89 (buffer_grow, buffer_free, buffer_init, buffer_finish)
90 (buffer_xml_printf): Declare.
92 2008-11-24 Doug Evans <dje@google.com>
94 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
96 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
98 * server.c (handle_v_run): Always use the supplied argument list.
100 2008-11-19 Bob Wilson <bob.wilson@acm.org>
102 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
103 (xtensa_regmap_table): Add entry for scompare1.
105 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
107 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
108 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
109 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
110 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
111 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
112 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
113 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
114 XML target descriptions.
115 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
116 when inferior is running on an ISA 2.05 or later processor. Add
117 special case to return offset for full 64-bit slot of FPSCR when
120 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
122 * Makefile.in (SFILES, clean): Added sparc64 files.
123 (reg-sparc64.o, reg-sparc64.c): New.
124 * configure.srv (sparc*-*-linux*): New configuration.
125 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
126 syscall arguments for SPARC.
127 (regsets_store_inferior_registers): Likewise.
128 * linux-sparc-low.c: New file.
130 2008-10-21 Doug Evans <dje@google.com>
132 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
133 (READLINE_DIR,READLINE_DEP): Delete.
134 (INTERNAL_CFLAGS): Update.
137 2008-10-10 Pedro Alves <pedro@codesourcery.com>
139 * server.c (handle_v_run): If GDB didn't specify an argv, use the
140 whole argv from the last run, not just argv[0].
142 2008-09-08 Pedro Alves <pedro@codesourcery.com>
144 * regcache.c (new_register_cache): Return NULL if the register
145 cache size isn't known yet.
146 (free_register_cache): Avoid dereferencing a NULL regcache.
148 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
150 * configure.srv: Merge MIPS and MIPS64.
152 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
154 * Makefile.in (uninstall): Apply $(EXEEXT) too.
156 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
158 * Makefile.in: Add required vsx dependencies.
160 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
161 Declare init_registers_powerpc_vsx32l.
162 Declare init_registers_powerpc_vsx64l.
163 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
164 (ppc_arch_setup): Check for VSX in hwcap.
165 (ppc_fill_vsxregset): New function.
166 (ppc_store_vsxregset): New function.
167 Add new VSX entry in regset_info target_regsets.
169 * configure.srv: Add new VSX dependencies.
171 2008-08-12 Pedro Alves <pedro@codesourcery.com>
173 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
174 (remote_open): Set or clear transport_is_reliable.
175 (putpkt_binary): Don't expect acks in noack mode.
176 (getpkt): Don't send ack/nac in noack mode.
177 * server.c (handle_general_set): Handle QStartNoAckMode.
178 (handle_query): If connected by tcp pass QStartNoAckMode+ in
180 (main): Reset noack_mode on every connection.
181 * server.h (noack_mode): Declare.
183 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
185 * Makefile.in (GDBREPLAY_OBS): New variable.
186 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
188 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
189 Daniel Jacobowitz <dan@codesourcery.com>
191 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
192 (usr_store_inferior_registers): Likewise.
193 (regsets_store_inferior_registers): Likewise.
195 2008-07-31 Rolf Jansen <rj@surtec.com>
196 Pedro Alves <pedro@codesourcery.com>
198 * configure.ac: Check for memmem declaration.
199 * server.c [HAVE_MALLOC_H]: Include malloc.h.
200 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
201 (disable_packet_qfThreadInfo): Unconditionally compile.
202 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
203 * configure, config.in: Regenerate.
205 2008-07-28 Doug Kwan <dougkwan@google.com>
207 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
208 (linux_write_memory): Remove declaration of errno.
210 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
212 * linux-low.c (handle_extended_wait): Do not use "status"
213 variable uninitialized.
215 2008-07-07 Pedro Alves <pedro@codesourcery.com>
217 * server.c (handle_v_attach): Inhibit reporting dll changes.
219 2008-06-27 Pedro Alves <pedro@codesourcery.com>
221 * remote-utils.c (prepare_resume_reply): If requested, don't
222 output "thread:TID" in the T stop reply.
224 * server.c (disable_packet_vCont, disable_packet_Tthread)
225 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
226 (handle_query): If requested, disable support for qC, qfThreadInfo
228 (handle_v_requests): If requested, disable support for vCont.
229 (gdbserver_show_disableable): New.
230 (main): Handle --disable-packet and --disable-packet=LIST.
232 * server.h (disable_packet_vCont, disable_packet_Tthread)
233 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
235 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
237 * server.c (gdbserver_usage): Mention --version.
239 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
241 * Makefile.in (gdbreplay.o): New rule.
243 2008-06-06 Joseph Myers <joseph@codesourcery.com>
245 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
246 message, not gdbserver.
248 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
249 Nathan Sidwell <nathan@codesourcery.com>
250 Joseph Myers <joseph@codesourcery.com>
252 * acinclude.m4: Include ../../config/acx.m4.
253 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
254 * configure, config.in: Regenerate.
255 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
256 * server.c (gdbserver_version): Print PKGVERSION.
257 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
258 (main): Adjust gdbserver_usage calls.
259 * gdbreplay.c (version, host_name): Add declarations.
260 (gdbreplay_version, gdbreplay_usage): New.
261 (main): Accept --version and --help options.
263 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
265 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
266 (arm_breakpoint_at): Handle Thumb.
267 (the_low_target): Add comment.
269 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
271 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
273 2008-05-09 Doug Evans <dje@google.com>
275 * server.h (decode_search_memory_packet): Declare.
276 * remote-utils.c (decode_search_memory_packet): New fn.
277 * server.c (handle_search_memory_1): New fn.
278 (handle_search_memory): New fn.
279 (handle_query): Process qSearch:memory packets.
281 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
283 * regcache.c (registers_length): Remove.
284 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
285 full register packet.
286 * regcache.h (registers_length): Remove prototype.
287 * server.h (PBUFSIZ): Define to 16384.
289 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
291 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
292 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
293 powerpc-64l.o, and powerpc-altivec64l.o.
294 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
295 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
296 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
297 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
298 rs6000/power-linux.xml, and rs6000/power64-linux.xml
301 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
302 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
303 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
304 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
305 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
306 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
307 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
308 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
309 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
310 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
313 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
314 (init_registers_powerpc_32l): ... this new prototype.
315 (init_registers_powerpc_32): Remove, replace by ...
316 (init_registers_powerpc_altivec32l): ... this new prototype.
317 (init_registers_powerpc_e500): Remove, replace by ...
318 (init_registers_powerpc_e500l): ... this new prototype.
319 (init_registers_ppc64): Remove, replace by ...
320 (init_registers_powerpc_64l): ... this new prototype.
321 (init_registers_powerpc_64): Remove, replace by ...
322 (init_registers_powerpc_altivec64l): ... this new prototype.
323 (ppc_num_regs): Set to 73.
324 (PT_ORIG_R3, PT_TRAP): Define if necessary.
325 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
326 (ppc_cannot_store_register): Handle orig_r3 and trap.
327 (ppc_arch_setup): Update init_registers_... calls.
328 (ppc_fill_gregset): Handle orig_r3 and trap.
330 * inferiors.c (clear_inferiors): Reset current_inferior.
332 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
334 * acinclude.m4: Add override.m4.
335 * configure: Regenerate.
337 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
339 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
340 initial call to init_register_ppc64.
342 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
344 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
345 powerpc*-*-linux* case.
346 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
348 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
350 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
351 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
353 * linux-ppc-low.c: Include <elf.h>.
354 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
355 (ppc_hwcap): New global variable.
356 (ppc_regmap): Remove __SPE__ #ifdef sections.
357 (ppc_regmap_e500): New global variable.
358 (ppc_cannot_store_register): Update __SPE__ special case.
359 (ppc_get_hwcap): New function.
360 (ppc_arch_setup): Use it to determine whether inferior supports
361 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
362 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
363 Do not access registers if target does not support AltiVec.
364 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
365 Do not access registers if target does not support SPE.
366 (target_regsets): Unconditionally include AltiVec and SPE regsets.
368 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
370 * linux-low.c (disabled_regsets, num_regsets): New.
371 (use_regsets_p): Delete.
372 (linux_wait_for_process): Clear disabled_regsets.
373 (regsets_fetch_inferior_registers): Check and set it.
374 (regsets_store_inferior_registers): Likewise.
375 (linux_fetch_registers, linux_store_registers): Do not use
377 (initialize_low): Allocate disabled_regsets.
379 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
381 * Makefile.in (LIBOBJS): New.
383 (memmem.o): New rule.
384 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
385 * configure: Regenerated.
387 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
389 * server.c (handle_query): Never return "unsupported" for
390 qXfer:features:read queries.
392 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
394 * server.c (get_features_xml): Fix inverted condition.
395 (handle_query): Always support qXfer:feature:read.
397 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
399 * server.c (wrapper_argv): New.
400 (start_inferior): Handle wrapper_argv. If set, expect an extra
402 (gdbserver_usage): Document --wrapper.
403 (main): Parse --wrapper.
405 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
407 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
408 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
409 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
410 (ppc_set_pc): Likewise.
411 (ppc_arch_setup): New function.
412 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
414 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
416 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
418 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
419 instead of linux-ppc64-low.o.
420 * linux-ppc64-low.c: Remove file.
421 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
422 (linux-ppc64-low.o): Remove rule.
424 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
425 (init_registers_powerpc_64): Likewise.
426 (ppc_regmap): Conditionally define depending on __powerpc64__.
427 (ppc_cannot_store_register): Do not special-case "fpscr" when
428 compiled on __powerpc64__.
429 (ppc_collect_ptrace_register): New function.
430 (ppc_supply_ptrace_register): New function.
431 (ppc_breakpoint): Change type to "unsigned int".
432 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
433 (the_low_target): Conditionally provide initializers for the
434 arch_setup member depending on __powerpc64__. Install
435 collect_ptrace_register and supply_ptrace_register members.
437 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
439 * regcache.h (gdbserver_xmltarget): Add extern declaration.
440 * server.c (gdbserver_xmltarget): Define.
441 (get_features_xml): Use it to replace "target.xml" and arch_string.
443 * configure.srv: Remove srv_xmltarget. Add XML files that were
444 mentioned there to srv_xmlfiles instead. Remove conditional tests
445 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
446 srv_xmlfiles and srv_regobj to include all possible choices.
447 * configure.ac (srv_xmltarget): Remove.
448 (srv_xmlfiles): Do not add "target.xml".
449 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
450 checks for supplementary target information.
451 * configure: Regenerate.
452 * Makefile.in (XML_TARGET): Remove.
453 (target.xml): Remove rule.
454 (clean): Do not clean up target.xml.
455 (.PRECIOUS): Do not mention target.xml.
457 * target.h (struct target_ops): Remove arch_string member.
458 * linux-low.c (linux_arch_string): Remove.
459 (linux_target_ops): Remove arch_string initializer.
460 * linux-low.h (struct linux_target_ops): Remove arch_string member.
461 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
462 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
463 * spu-low.c (spu_arch_string): Remove.
464 (spu_target_ops): Remove arch_string initializer.
465 * win32-low.c (win32_arch_string): Remove.
466 (win32_target_ops): Remove arch_string initializer.
467 * win32-low.h (struct win32_target_ops): Remove arch_string member.
468 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
469 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
471 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
473 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
474 by collect_ptrace_register and supply_ptrace_register hooks.
475 * linux-low.c (fetch_register): Use supply_ptrace_register callback
476 instead of checking for the_low_target.left_pad_xfer.
477 (usr_store_inferior_registers): Use collect_ptrace_register callback
478 instead of checking for the_low_target.left_pad_xfer.
480 * linux-s390-low.c (s390_collect_ptrace_register): New function.
481 (s390_supply_ptrace_register): Likewise.
482 (s390_fill_gregset): Call s390_collect_ptrace_register.
483 (the_low_target): Update.
485 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
486 (ppc_supply_ptrace_register): Likewise.
487 (the_low_target): Update.
489 * linux-i386-low.c (the_low_target): Update.
490 * linux-x86-64-low.c (the_low_target): Update.
492 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
494 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
495 reg-s390.o and reg-s390x.o.
497 * linux-low.c (new_inferior): New global variable.
498 (linux_create_inferior, linux_attach): Set it.
499 (linux_wait_for_process): Call the_low_target.arch_setup after the
500 target has stopped for the first time.
501 (initialize_low): Do not call the_low_target.arch_setup.
503 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
504 (s390_set_pc): Likewise.
505 (s390_arch_setup): New function.
506 (the_low_target): Use s390_arch_setup as arch_setup routine.
508 * regcache.c (realloc_register_cache): New function.
509 (set_register_cache): Call it for each existing regcache.
511 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
513 * server.h (init_registers): Remove prototype.
515 * linux-low.h (struct linux_target_ops): Add arch_setup field.
516 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
517 instead of init_registers ().
518 * linux-arm-low.c (init_registers_arm): Add prototype.
519 (init_registers_arm_with_iwmmxt): Likewise.
520 (the_low_target): Add initializer for arch_setup field.
521 * linux-cris-low.c (init_registers_cris): Add prototype.
522 (the_low_target): Add initializer for arch_setup field.
523 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
524 (the_low_target): Add initializer for arch_setup field.
525 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
526 (the_low_target): Add initializer for arch_setup field.
527 * linux-ia64-low.c (init_registers_ia64): Add prototype.
528 (the_low_target): Add initializer for arch_setup field.
529 * linux-m32r-low.c (init_registers_m32r): Add prototype.
530 (the_low_target): Add initializer for arch_setup field.
531 * linux-m68k-low.c (init_registers_m68k): Add prototype.
532 (the_low_target): Add initializer for arch_setup field.
533 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
534 (init_registers_mips64_linux): Likewise.
535 (the_low_target): Add initializer for arch_setup field.
536 * linux-ppc-low.c (init_registers_ppc): Add prototype.
537 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
538 (the_low_target): Add initializer for arch_setup field.
539 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
540 (init_registers_powerpc_64): Likewise.
541 (the_low_target): Add initializer for arch_setup field.
542 * linux-s390-low.c (init_registers_s390): Add prototype.
543 (init_registers_s390x): Likewise.
544 (the_low_target): Add initializer for arch_setup field.
545 * linux-sh-low.c (init_registers_sh): Add prototype.
546 (the_low_target): Add initializer for arch_setup field.
547 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
548 (the_low_target): Add initializer for arch_setup field.
549 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
550 (the_low_target): Add initializer for arch_setup field.
552 * win32-low.h (struct win32_target_ops): Add arch_setup field.
553 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
554 instead of init_registers ().
555 * win32-arm-low.c (init_registers_arm): Add prototype.
556 (the_low_target): Add initializer for arch_setup field.
557 * win32-i386-low.c (init_registers_i386): Add prototype.
558 (the_low_target): Add initializer for arch_setup field.
560 * spu-low.c (init_registers_spu): Add prototype.
561 (initialize_low): Call initialie_registers_spu () instead of
562 initialize_registers ().
564 2008-02-19 Pedro Alves <pedro@codesourcery.com>
566 * server.c (handle_v_requests): When handling the vRun and vAttach
567 packets, if already debugging a process, don't kill it. Return an
570 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
572 * server.c (handle_query): Correct length check.
574 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
576 * win32-low.c (do_initial_child_stuff): Add process handle
577 parameter. Set current_process_handle and current_process_id from the
578 parameters. Clear globals.
579 (win32_create_inferior): Don't set current_process_handle and
580 current_process_id here. Instead pass them on the call to
581 do_initial_child_stuff.
582 (win32_attach): Likewise.
583 (win32_clear_inferiors): New.
584 (win32_kill): Don't close the current process handle or the
585 current thread handle here. Instead call win32_clear_inferiors.
586 (win32_detach): Don't open a new handle to the process. Call
587 win32_clear_inferiors.
588 (win32_join): Don't rely on current_process_handle; open a new
589 handle using the process id.
590 (win32_wait): Call win32_clear_inferiors when the inferior process
593 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
595 * server.c (monitor_show_help): Add "exit".
597 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
599 * Makefile.in (SFILES): Add linux-xtensa-low.c.
600 (clean): Add reg-xtensa.c.
601 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
602 * configure.srv (xtensa*-*-linux*) New target.
603 * linux-xtensa-low.c: New.
604 * xtensa-xtregs.c: New.
606 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
608 * hostio.c: Don't include errno.h.
609 (errno_to_fileio_errno): Move to hostio-errno.
610 * hostio.c: (hostio_error): Remove the error parameter. Defer the
611 error number outputting to the target->hostio_last_error callback.
612 (hostio_packet_error): Use FILEIO_EINVAL directly.
613 (handle_open, handle_pread, hostio_error, handle_unlink): Update
614 calls to hostio_error.
615 * hostio-errno.c: New.
616 * server.h (hostio_last_error_from_errno): Declare.
617 * target.h (target_ops): Add hostio_last_error member.
618 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
619 as hostio_last_error handler.
620 * spu-low.c (spu_target_ops): Likewise.
621 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
622 (wince_hostio_last_error): New functions.
623 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
624 as hostio_last_error handler.
625 (win32_target_ops) [!_WIN32_WCE]: Register
626 hostio_last_error_from_errno as hostio_last_error handler.
627 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
628 (hostio-errno.o): New rule.
629 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
630 * configure.srv (srv_hostio_err_objs): New variable. Default to
632 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
633 * configure: Regenerate.
635 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
637 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
638 (linux_kill, linux_detach): Clean up the process list.
639 * remote-utils.c (remote_open): Improve port number parsing.
640 (putpkt_binary, input_interrupt): Only send interrupts if the target
642 * server.c (extended_protocol): Make static.
643 (attached): Define earlier.
644 (exit_requested, response_needed, program_argv): New variables.
645 (target_running): New.
646 (start_inferior): Clear attached here.
647 (attach_inferior): Set attached here.
648 (require_running): Define.
649 (handle_query): Use require_running and target_running. Implement
651 (handle_v_attach, handle_v_run): New.
652 (handle_v_requests): Use require_running. Handle vAttach and vRun.
653 (gdbserver_usage): Update.
654 (main): Redo argument parsing. Handle --debug and --multi. Handle
655 --attach along with other options or after the port. Save
656 program_argv. Support no initial program. Resynchronize
657 communication with GDB after an error. Handle "monitor exit".
658 Use require_running and target_running. Always allow the extended
659 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
660 restart in extended mode.
661 * README: Refer to the GDB manual. Update --attach usage.
663 2007-12-20 Andreas Schwab <schwab@suse.de>
665 * linux-low.c (STACK_SIZE): Define.
666 (linux_tracefork_child): Use it. Use __clone2 on ia64.
667 (linux_test_for_tracefork): Likewise.
669 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
671 * linux-low.c (linux_wait_for_event): Update messages. Do not
672 reinsert auto-delete breakpoints.
673 * mem-break.c (struct breakpoint): Change return type of handler to
675 (set_breakpoint_at): Update handler type.
676 (reinsert_breakpoint_handler): Return 1 instead of calling
678 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
680 (check_breakpoints): Delete auto-delete breakpoints and return 2.
681 * mem-break.h (set_breakpoint_at): Update handler type.
682 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
683 * win32-low.c (auto_delete_breakpoint): New.
684 (get_child_debug_event): Use it.
686 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
688 * configure.ac: Check for pread and pwrite.
689 * hostio.c (handle_pread): Fall back to lseek and read.
690 (handle_pwrite): Fall back to lseek and write.
691 * config.in, configure: Regenerated.
693 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
695 * server.c (myresume): Add own_buf argument.
696 (main): Update calls.
698 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
700 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
701 * remote-utils.c (remote_open): Do not call disable_async_io.
702 (block_async_io): Delete.
703 (unblock_async_io): Make static.
704 (initialize_async_io): New.
705 * server.c (handle_v_cont): Handle async I/O here.
706 (myresume): Likewise. Move other common resume tasks here...
707 (main): ... from here. Call initialize_async_io. Disable async
708 I/O before the main loop.
709 * server.h (initialize_async_io): Declare.
710 (block_async_io, unblock_async_io): Delete prototypes.
711 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
713 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
715 * remote-utils.c (readchar): Allow binary data in received messages.
717 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
719 * win32-low.c (attaching): New global.
720 (win32_create_inferior): Clear the `attaching' global.
721 (win32_attach): Set the `attaching' global.
722 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
723 attaching. Only set a breakpoint at the entry point if not
726 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
728 * server.c (main): Don't report dll events on the initial
729 connection on attaches.
731 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
733 * server.c (main): Relax numerical bases supported for the pid of
734 the --attach command line argument.
736 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
738 * win32-low.c (win32_attach): Call OpenProcess before
739 DebugActiveProcess, not after. Add last error output to error
742 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
744 * win32-low.c (win32_get_thread_context)
745 (win32_set_thread_context): New functions.
746 (thread_rec): Use win32_get_thread_context.
747 (continue_one_thread, win32_resume): Use win32_set_thread_context.
748 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
752 Pedro Alves <pedro_alves@portugalmail.pt>
754 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
756 (child_add_thread): Minor cleanup.
757 (child_continue): Resume artificially suspended threads before
758 calling ContinueDebugEvent.
759 (suspend_one_thread): New.
760 (fake_breakpoint_event): New.
761 (get_child_debug_event): Change return type to int. Check here if
762 gdb sent an interrupt request. If a soft interrupt was requested,
763 fake a breakpoint event. Return 0 if there is no event to handle,
765 (win32_wait): Don't check here if gdb sent an interrupt request.
766 Ensure there is a valid event to handle.
767 (win32_request_interrupt): Add soft interruption method as last
771 Pedro Alves <pedro_alves@portugalmail.pt>
773 * win32-low.h (win32_thread_info): Add descriptions to the
774 structure members. Replace `suspend_count' counter by a
776 * win32-low.c (thread_rec): Update condition of when to get the
777 context from the inferior. Rely on ContextFlags being set if it
778 has already been retrieved. Only suspend the inferior thread if
779 we haven't already. Warn if that fails.
780 (continue_one_thread): s/suspend_count/suspended/. Only call
781 ResumeThread once. Warn if that fails.
783 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
785 * win32-low.c (win32_wait): Don't read from the inferior when it
788 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
790 * Makefile.in (win32_low_h): New variable.
791 (win32-low.o): Add dependency on $(win32_low_h).
792 (win32-arm-low.o, win32-i386-low.o): New rules.
794 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
796 * hostio.c: Correct copyright year.
798 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
800 * Makefile.in (OBS): Add hostio.o.
801 (hostio.o): New rule.
802 * server.h (handle_vFile): Declare.
803 * hostio.c: New file.
804 * server.c (handle_v_requests): Take packet_len and new_packet_len
805 for binary packets. Call handle_vFile.
806 (main): Update call to handle_v_requests.
808 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
810 * linux-low.c: Include <sched.h>.
812 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
814 * linux-low.c (linux_tracefork_grandchild): New.
815 (linux_tracefork_child): Use clone.
816 (linux_test_for_tracefork): Use clone; allocate and free a stack.
818 2007-10-31 Joel Brobecker <brobecker@adacore.com>
820 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
822 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
824 * linux-low.c (handle_extended_wait): Handle unexpected signals.
826 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
828 * inferiors.c (change_inferior_id): Delete.
829 (add_pid_to_list, pull_pid_from_list): New.
830 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
831 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
832 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
833 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
834 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
835 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
836 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
837 (using_threads): Always set to 1.
838 (handle_extended_wait): New.
839 (add_process): Do not set TID.
840 (linux_create_inferior): Set must_set_ptrace_flags.
841 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
842 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
843 (linux_thread_alive): Rename TID argument to LWPID.
844 (linux_wait_for_process): Handle unknown processes. Do not use TID.
845 (linux_wait_for_event): Do not use TID or check using_threads. Update
846 call to dead_thread_notify. Call handle_extended_wait.
847 (linux_create_inferior): Use PTRACE_SETOPTIONS.
848 (send_sigstop): Delete sigstop_sent.
849 (wait_for_sigstop): Avoid TID.
850 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
851 (linux_test_for_tracefork): New.
852 (linux_lookup_signals): Use thread_db_active and
853 linux_supports_tracefork_flag.
854 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
855 * linux-low.h (get_process_thread): Avoid TID.
856 (struct process_ifo): Move thread_known and tid to the end. Remove
858 (linux_attach_lwp, thread_db_init): Update prototypes.
859 * server.h (change_inferior_id): Delete prototype.
860 (add_pid_to_list, pull_pid_from_list): New prototypes.
861 * thread-db.c (thread_db_use_events): New.
862 (find_first_thread): Rename to...
863 (find_one_thread): ...this. Update callers and messages. Do not
864 call fatal. Check thread_db_use_events. Do not call
865 change_inferior_id or new_thread_notify.
866 (maybe_attach_thread): Update. Do not call new_thread_notify.
867 (thread_db_init): Set thread_db_use_events. Check use_events.
868 * utils.c (fatal, warning): Correct message prefix.
870 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
872 * Makefile.in (clean): Remove new files.
873 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
874 (powerpc-64.o, powerpc-64.c): New rules.
875 * configure.srv: Use alternate register sets for powerpc64-*-linux*
876 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
878 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
880 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
881 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
882 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
883 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
884 (target_regsets): Add AltiVec and SPE register sets.
885 * configure.ac: Check for AltiVec and SPE.
886 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
887 (ppc_fill_vrregset, ppc_store_vrregset): New.
888 (target_regsets): Add AltiVec register set.
889 * configure: Regenerated.
891 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
893 * linux-low.c (O_LARGEFILE): Define.
894 (linux_read_memory): Use /proc/PID/mem.
895 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
896 * configure, config.in: Regenerated.
898 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
900 * linux-low.c (linux_wait_for_event): Do not pass signals while
903 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
905 * win32-low.c (create_process): New.
906 (win32_create_inferior): Use create_process instead of
907 CreateProcess. If create_process failed retry appending an ".exe"
908 suffix. Store the GetLastError result immediatelly after
909 create_process calls and use it on the call to error.
911 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
913 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
915 2007-08-23 Joel Brobecker <brobecker@adacore.com>
917 * configure.ac: Switch license to GPLv3.
919 2007-08-01 Michael Snyder <msnyder@access-company.com>
921 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
923 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
925 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
927 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
928 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
929 CloseToolhelp32Snapshot.
930 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
931 CloseToolhelp32Snapshot.
933 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
935 * server.c (main): Check for inferior exit before main loop.
937 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
939 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
940 instead of on tmp_desc.
942 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
943 Daniel Jacobowitz <dan@codesourcery.com>
945 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
946 (add_thread): Minor cleanups.
947 (clear_inferiors): Move lower in the file. Clear the DLL
949 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
950 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
951 (xml_escape_text): New.
952 * server.c (handle_query): Handle qXfer:libraries:read. Report it
954 (handle_v_cont): Report errors.
955 (gdbserver_version): Update.
956 (main): Correct size of own_buf. Do not report initial DLL events.
957 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
958 (unloaded_dll, xml_escape_text): New.
959 * win32-low.c (enum target_waitkind): Update comments.
960 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
961 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
962 (win32_EnumProcessModules, win32_GetModuleInformation)
963 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
964 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
965 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
966 (win32_Module32First, win32_Module32Next, load_toolhelp)
967 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
968 (get_child_debug_event): Handle DLL events.
969 (win32_wait): Likewise.
971 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
973 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
974 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
976 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
978 * win32-low.c (handle_output_debug_string): Ignore event if not
981 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
983 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
985 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
987 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
989 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
991 * inferiors.c (change_inferior_id): Add comment.
992 * linux-low.c (check_removed_breakpoint): Add an early
993 prototype. Improve debug output.
994 (linux_attach): Doc update.
995 (linux_detach_one_process, linux_detach): Clean up before releasing
997 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
998 * linux-low.h (struct process_info): Doc improvement.
999 * mem-break.c (delete_all_breakpoints): New.
1000 * mem-break.h (delete_all_breakpoints): New prototype.
1001 * thread-db.c (find_first_thread): New.
1002 (thread_db_create_event): Call it instead of
1003 thread_db_find_new_threads. Clean up unused variables.
1004 (maybe_attach_thread): Remove first thread handling.
1005 (thread_db_find_new_threads): Use find_first_thread.
1006 (thread_db_get_tls_address): Likewise.
1008 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
1010 * thread-db.c (thread_db_find_new_threads): Add prototype.
1011 (thread_db_create_event): Check for the main thread before adding
1013 (maybe_attach_thread): Only enable event reporting if TID == 0.
1014 (thread_db_get_tls_address): Check for new threads.
1016 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
1018 * linux-low.c (linux_create_inferior): Try execv before execvp.
1019 * spu-low.c (spu_create_inferior): Likewise.
1021 2007-06-13 Mike Frysinger <vapier@gentoo.org>
1023 * linux-low.c (linux_create_inferior): Change execv to execvp.
1024 * spu-low.c (spu_create_inferior): Likewies.
1026 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
1028 * Makefile.in (clean): Clean new files instead of deleted ones.
1029 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
1030 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
1032 * configure.srv: Specify XML files and new regformats for MIPS and
1034 * linux-mips-low.c (mips_num_regs): Set to only used registers.
1035 (mips_regmap): Do not fetch $0. Remove unused registers. Add
1036 an entry for the restart register.
1037 (mips_cannot_fetch_register, mips_cannot_store_register)
1038 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
1039 register names to match the XML descriptions.
1040 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
1041 restart register instead of $0.
1043 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1044 Markus Deuling <deuling@de.ibm.com>
1046 * remote-utils.c (decode_xfer_write): New function.
1047 * server.h (decode_xfer_write): Add prototype.
1048 * server.c (handle_query): Add PACKET_LEN argument. Support
1049 qXfer:spu:read and qXfer:spu:write packets.
1050 (main): Pass packet_len to handle_query.
1051 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1052 * target.h (target_ops): Add qxfer_spu.
1054 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1056 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1057 accessing non-seekable spufs files.
1059 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1061 * server.c (handle_query): Add reply for qC packet.
1063 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1064 Leo Zayas <lerele@champenstudios@com>
1066 * server.h (check_remote_input_interrupt_request): New function.
1067 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1068 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1069 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1070 (check_remote_input_interrupt_request): New function.
1071 * server.h (check_remote_input_interrupt_request): Declare.
1072 * win32-low.c (winapi_DebugBreakProcess,
1073 winapi_GenerateConsoleCtrlEvent): New typedefs.
1074 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1076 (win32_wait): Check for remote interrupt request
1077 with check_remote_input_interrupt_request.
1078 (win32_request_interrupt): New function.
1079 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1081 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1083 * win32-low.c (debug_registers_changed,
1084 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1085 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1086 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1087 (thread_rec): Get context using the low target.
1088 (child_add_thread): Call thread_added on the low target,
1089 which does the same thing.
1091 (do_initial_child_stuff): Remove debug registers references.
1092 Set context using the low target. Resume threads after
1093 setting the contexts.
1094 (child_continue): Remove dead variable. Remove debug
1095 registers references.
1096 (child_fetch_inferior_registers): Go through the low target.
1097 (do_child_store_inferior_registers): Remove.
1098 (child_store_inferior_registers): Go through the low target.
1099 (win32_resume): Remove debug registers references.
1100 Set context using the low target.
1101 (handle_exception): Change return type to void. Don't record
1102 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1103 first chance exception.
1104 (get_child_debug_event): Change return type to void. Remove
1105 goto loop. Always return after waiting for debug event.
1106 (win32_wait): Convert to switch statement. Handle spurious
1109 * win32-i386-low.c (debug_registers_changed,
1110 debug_registers_used): New.
1111 (initial_stuff): Rename to ...
1112 (i386_initial_stuff): ... this. Clear debug registers
1114 (store_debug_registers): Delete.
1115 (i386_get_thread_context): New.
1116 (load_debug_registers): Delete.
1117 (i386_set_thread_context): New.
1118 (i386_thread_added): New.
1119 (single_step): Rename to ...
1120 (i386_single_step): ... this.
1121 (do_fetch_inferior_registers): Rename to ...
1122 (i386_fetch_inferior_register): ... this.
1123 (i386_store_inferior_register): New.
1124 (the_low_target): Adapt to new interface.
1126 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1127 (arm_get_thread_context): New.
1128 (arm_set_thread_context): New.
1130 (do_fetch_inferior_registers): Rename to ...
1131 (arm_fetch_inferior_register): ... this.
1132 (arm_store_inferior_register): New.
1133 (arm_wince_breakpoint): Reimplement as unsigned long.
1134 (arm_wince_breakpoint_len): Define.
1135 (the_low_target): Adapt to new interface.
1137 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1138 load_debug_registers. Add get_thread_context, set_thread_context,
1139 thread_added and store_inferior_register. Rename
1140 fetch_inferior_registers to fetch_inferior_register.
1141 (regptr): Remove declaration.
1143 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1145 * linux-low.c (linux_detach): Change return type to int. Return 0.
1146 * spu-low.c (spu_detach): Likewise.
1148 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1150 * target.h (target_ops): Change return type of detach to int.
1152 (join_inferior): New.
1153 * server.c (main): Don't skip detach support on mingw32.
1154 If the inferior doesn't support detaching return error.
1155 Call join_inferior instead of using waitpid.
1156 * linux-low.c (linux_join): New.
1157 (linux_target_op): Add linux_join.
1158 * spu-low.c (spu_join): New.
1159 (spu_target_ops): Add spu_join.
1160 * win32-low.c (win32_detach): Adapt to new interface.
1161 Reopen current_process_handle before detaching. Issue a child
1162 resume before detaching.
1164 (win32_target_op): Add win32_join.
1166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1168 * win32-low.c (win32-attach): Fix return value.
1169 * target.h (target_ops): Describe ATTACH return values.
1171 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1173 * win32-low.c (GETPROCADDRESS): Define.
1174 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1175 (winapi_DebugSetProcessKillOnExit): Likewise.
1176 (win32_create_inferior): Force usage of ansi CreateProcessA.
1177 (win32_attach): Use GETPROCADDRESS.
1178 (win32_detach): Likewise.
1180 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1182 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1184 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1186 * win32-low.c: Commit leftover changes from 2007-03-29.
1188 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1190 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1191 fields short instead of int. Add explicit padding.
1192 (i387_cache_to_fsave): Remove unnecessary casts.
1193 (i387_fsave_to_cache): Doc fix.
1194 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1196 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1198 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1199 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1201 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1203 * configure.srv (arm*-*-mingw32ce*): Move near the other
1206 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1208 * configure.ac: Add errno checking.
1209 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1210 sys/file.h and malloc.h.
1211 (AC_CHECK_DECLS): Add perror.
1212 (srv_mingwce): Handle.
1213 * configure.srv (i[34567]86-*-cygwin*): Add
1214 win32-i386-low.o to srv_tgtobj.
1215 (i[34567]86-*-mingw*): Likewise.
1216 (arm*-*-mingw32ce*): Add case.
1217 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1218 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1219 [__MINGW32CE__] (strerror): New function.
1220 [__MINGW32CE__] (errno): Define to GetLastError.
1221 [__MINGW32CE__] (COUNTOF): New macro.
1222 (remote_open): Remove extra close call.
1223 * mem-break.c (delete_breakpoint_at): New function.
1224 * mem-break.h (delete_breakpoint_at): Declare.
1225 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1226 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1227 [USE_WIN32API] (read, write): Add char* casts.
1228 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1229 * server.h: Include wincecompat.h on Windows CE.
1230 [HAVE_ERRNO_H]: Check.
1231 (perror): Declare if not declared.
1232 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1233 (perror_with_name): Remove errno declaration.
1234 * wincecompat.h: New.
1235 * wincecompat.c: New.
1237 * win32-arm-low.c: New.
1238 * win32-i386-low.c: New.
1239 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1240 (OUTMSG2): Make it safe.
1242 (COUNTOF): New macro.
1243 (NUM_REGS): Get it from the low target.
1244 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1245 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1246 (thread_rec): Let low target handle debug registers.
1247 (child_add_thread): Likewise.
1248 (child_init_thread_list): Likewise.
1249 (continue_one_thread): Likewise.
1251 (do_child_fetch_inferior_registers): Move to ...
1252 * win32-i386-low.c: ... here, and rename to ...
1253 (do_fetch_inferior_registers): ... this.
1254 * win32-low.c (child_fetch_inferior_registers):
1255 Go through the low target.
1256 (do_child_store_inferior_registers): Use regptr.
1257 (strwinerror): New function.
1258 (win32_create_inferior): Handle Windows CE.
1259 Use strwinerror instead of strerror on Windows error
1260 codes. Add program to the error output.
1261 Don't close the main thread handle on Windows CE.
1262 (win32_attach): Use coredll.dll on Windows CE.
1263 (win32_kill): Close current process and current
1265 (win32_detach): Use coredll.dll on Windows CE.
1266 (win32_resume): Let low target handle debug registers, and
1268 (handle_exception): Add/Remove initial breakpoint. Avoid
1269 non-existant WSTOPSIG on Windows CE.
1270 (win32_read_inferior_memory): Cast to remove warning.
1271 (win32_arch_string): Go through the low target.
1272 (initialize_low): Call set_breakpoint_data with the low
1273 target's breakpoint.
1274 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1275 FOP_REGNUM, mappings): Move to ...
1276 * win32-i386-low.c: ... here.
1277 * win32-low.c (win32_thread_info): Move to ...
1278 * win32-low.h: ... here.
1279 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1280 win32-arm-low.c and wincecompat.c.
1281 (all:): Add $EXEEXT.
1282 (install-only:): Likewise.
1283 (gdbserver:): Likewise.
1284 (gdbreplay:): Likewise.
1285 * config.in: Regenerate.
1286 * configure: Regenerate.
1288 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1290 * win32-low.c: Rename typedef thread_info to
1291 win32_thread_info throughout.
1293 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1295 * win32-i386-low.c: Rename to ...
1296 * win32-low.c: ... this.
1297 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1298 * Makefile.in: Likewise.
1300 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1302 * remote-utils.c (monitor_output): Constify msg parameter.
1303 * server.h (monitor_output): Likewise.
1304 * win32-i386-low.c (handle_output_debug_string): New.
1305 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1306 handle_output_debug_string.
1307 (get_child_debug_event): Likewise.
1309 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1311 * server.c (main): Correct strtoul check.
1313 2007-03-27 Jon Ringle <jon@ringle.org>
1315 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1317 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1319 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1321 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1323 * terminal.h: Check HAVE_SGTTY_H.
1325 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1327 * remote-utils.c (remote_open): Print out the assigned port number.
1329 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1331 * remote-utils.c (monitor_output): New function.
1332 * server.c (debug_threads): Define here.
1333 (monitor_show_help): New function.
1334 (handle_query): Handle qRcmd.
1335 (main): Do not handle 'd' packet.
1336 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1337 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1340 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1342 * Makefile.in (EXEEXT): New.
1343 (clean): Use $(EXEEXT).
1345 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1347 * target.h (target_ops): Rename send_signal to request_interrupt,
1348 and remove enum target_signal parameter.
1349 * linux-low.c (linux_request_interrupt): Rename from
1350 linux_send_signal, and always send SIGINT.
1351 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1352 and always send SIGINT.
1353 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1355 (input_interrupt): Likewise.
1357 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1359 * server.c (get_features_xml): Check if target implemented
1361 * win32-i386-low.c (win32_arch_string): New.
1362 (win32_target_ops): Add win32_arch_string as arch_string member.
1364 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1366 * spu-low.c (spu_arch_string): New.
1367 (spu_target_ops): Add spu_arch_string.
1369 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1371 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1372 * configure.ac: Do not check for terminal.h.
1373 * configure, config.in: Regenerated.
1375 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1377 * Makefile.in (OBS): Add $(XML_BUILTIN).
1378 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1380 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1381 (arm-with-iwmmxt.c): New.
1382 * config.in, configure: Regenerate.
1383 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1384 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1385 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1386 (arm*-*-linux*): Add iWMMXt and regset support.
1387 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1388 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1389 (arm_store_wmmxregset, target_regsets): New.
1390 * server.c (get_features_xml): Take annex argument. Check builtin
1392 (handle_query): Handle multiple annexes.
1394 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1396 * remote-utils.c [USE_WIN32API] (read, write): Define.
1397 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1400 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1402 * linux-i386-low.c (the_low_target): Set arch_string.
1403 * linux-x86-64-low.c (the_low_target): Likewise.
1404 * linux-low.c (linux_arch_string): New.
1405 (linux_target_ops): Add it.
1406 * linux-low.h (struct linux_target_ops): Add arch_string.
1407 * server.c (write_qxfer_response): Use const void * for DATA.
1408 (get_features_xml): New.
1409 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1410 * target.h (struct target_ops): Add arch_string method.
1412 2007-01-03 Denis Pilat <denis.pilat@st.com>
1413 Daniel Jacobowitz <dan@codesourcery.com>
1415 * linux-low.c (linux_kill): Handle being called with no threads.
1416 * win32-i386-low.c (win32_kill): Likewise.
1417 (get_child_debug_event): Clear current_process_handle.
1419 2006-12-30 Denis PILAT <denis.pilat@st.com>
1420 Daniel Jacobowitz <dan@codesourcery.com>
1422 * remote-utils.c (remote_open): Check the type of specified
1423 serial port devices before opening them.
1424 * server.c (main): Kill the inferior if an error occurs during
1425 the first remote_open.
1427 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1429 * README: Update supported targets.
1431 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1433 * Makefile.in (clean): Remove reg-mips64.c.
1434 (reg-mips64.c, reg-mips64.o): New rules.
1435 * configure.srv: Handle mips64. Include regset support for mips.
1436 * linux-mips-low.c (union mips_register): New.
1437 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1438 (mips_breakpoint, mips_breakpoint_at): Use int.
1439 (mips_collect_register, mips_supply_register)
1440 (mips_collect_register_32bit, mips_supply_register_32bit)
1441 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1442 (mips_store_fpregset, target_regsets): New.
1443 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1445 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1447 * configure.srv: Add target "spu*-*-*".
1448 * Makefile.in (clean): Remove reg-spu.c.
1449 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1450 * spu-low.c: New file.
1452 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1454 * configure.ac: Correct td_thr_tls_get_addr test.
1455 * configure: Regenerated.
1457 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1459 * linux-low.c (linux_wait_for_event): Reformat. Use the
1461 * remote-utils.c (decode_address_to_semicolon): New.
1462 * server.c (pass_signals, handle_general_set): New.
1463 (handle_query): Mention QPassSignals for qSupported.
1464 (main): Call handle_general_set.
1465 * server.h (pass_signals, decode_address_to_semicolon): New.
1467 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1469 * server.c (handle_query): Correct error handling for read_auxv.
1471 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1473 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1474 and srv_linux_thread_db to yes.
1475 * linux-s390-low.c (s390_fill_gregset): New function.
1476 (target_regsets): Define data structure.
1478 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1480 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1481 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1482 * config.in, configure: Regenerated.
1483 * inferiors.c (gdb_id_to_thread): New function.
1484 (gdb_id_to_thread_id): Use it.
1485 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1486 * linux-low.h (struct process_info): Add th member.
1487 (thread_db_get_tls_address): New prototype.
1488 * remote-utils.c (decode_address): Make non-static.
1489 * server.c (handle_query): Handle qGetTLSAddr.
1490 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1491 * target.h (struct target_ops): Add get_tls_address.
1492 * thread-db.c (maybe_attach_thread): Save the thread handle.
1493 (thread_db_get_tls_address): New.
1495 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1497 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1498 (linux_resume_one_process): Take a siginfo_t *. Update all
1499 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1500 (struct pending_signals): Add a siginfo_t.
1501 (linux_wait_for_process): Always set last_status.
1502 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1503 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1504 * linux-low.h (struct process_info): Add last_status.
1506 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1508 * remote-utils.c (try_rle): New function.
1509 (putpkt_binary): Use it.
1511 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1513 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1514 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1515 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1516 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1517 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1520 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1522 * server.c (terminal_fd): New variable.
1523 (old_foreground_pgrp): Likewise.
1524 (restore_old_foreground_pgrp): New function.
1525 (start_inferior): Record the terminal file descriptor in terminal_fd
1526 and its original foreground group in old_foreground_pgrp. Register
1527 restore_old_foreground_pgrp with atexit().
1529 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1531 * server.c (handle_query): Correct qPart to qXfer.
1533 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1535 * configure.ac: Check for more headers which are missing on
1536 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1537 * configure.srv: Add Cygwin and mingw32.
1538 * remote-utils.c: Don't include headers unconditionally which
1539 are missing on mingw32. Include <winsock.h> for mingw32.
1540 (remote_open): Adjust for mingw32 support. Flush
1541 standard error after writing to it.
1542 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1543 (unblock_async_io, enable_async_io, disable_async_io)
1544 (readchar, getpkt): Update for Winsock support.
1545 (prepare_resume_reply): Expect a protocol signal number.
1546 * server.c: Disable <sys/wait.h> on mingw32.
1547 (start_inferior): Adjust for mingw32 support. Flush
1548 standard error after writing to it.
1549 (attach_inferior): Likewise. Use protocol signal
1551 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1553 * win32-i386-low.c: New file.
1554 * Makefile.in (XM_CLIBS): Set.
1555 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1556 (win32-i386-low.o): New dependency rule.
1557 * linux-low.c (linux_wait): Use target signal numbers.
1558 * target.h (struct target_ops): Doc fix.
1559 * server.h (target_signal_to_name): New prototype.
1560 * gdbreplay.c: Don't include headers unconditionally which
1561 are missing on mingw32. Include <winsock.h> for mingw32.
1562 (remote_close, remote_open): Adjust for Winsock support.
1563 * configure, config.in: Regenerated.
1565 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1567 * server.c (decode_xfer_read, write_qxfer_response): New.
1568 (handle_query): Take a packet length argument. Handle
1569 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1570 the qSupported response.
1571 (main): Update call to handle_query.
1573 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1575 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1576 (putpkt_binary): Renamed from putpkt and adjusted for binary
1578 (putpkt): New wrapper for putpkt_binary.
1579 (readchar): Don't mask off the high bit.
1580 (decode_X_packet): New function.
1581 * server.c (main): Call putpkt_binary if a handler sets the packet
1582 length. Save the length of the incoming packet. Handle 'X'.
1583 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1585 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1587 * server.c (handle_query): Handle qSupported.
1589 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1591 * remote-utils.c (all_symbols_looked_up): New variable.
1592 (look_up_one_symbol): Check it.
1593 * server.h (look_up_one_symbol): New declaration.
1594 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1596 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1598 * Makefile.in (linux-arm-low.o): Update dependencies.
1599 * linux-arm-low.c: Include "gdb_proc_service.h".
1600 (PTRACE_GET_THREAD_AREA): Define.
1601 (ps_get_thread_area): New function.
1603 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1605 * configure.srv (m68k*-*-uclinux*): New target.
1606 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1607 (linux_resume_one_process): Remove extraneous cast.
1608 (linux_read_offsets): New.
1609 (linux_target_op): Add linux_read_offsets on mmuless systems.
1610 * server.c (handle_query): Add qOffsets logic.
1611 * target.h (struct target_ops): Add read_offsets.
1613 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1615 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1616 (PTRACE_GET_THREAD_AREA): Define.
1617 (ps_get_thread_area): New function.
1618 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1619 (linux-x86-64-low.o): Update.
1621 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1623 * configure.ac: Remove checks for prfpregset_t.
1624 * gdb_proc_service.h: New file.
1625 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1626 new "gdb_proc_service.h".
1627 * proc-service.c: Likewise.
1628 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1629 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1630 * Makefile.in (gdb_proc_service_h): Updated.
1631 * configure, config.in: Regenerated.
1633 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1635 * remote-utils.c (prepare_resume_reply): Move declaration
1636 of gdb_id_from_wait to the top of the block.
1638 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1640 * linux-low.c (regsets_store_inferior_registers): Read the regset
1641 from the target before filling it.
1643 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1645 * server.c (attach_inferior): Return SIGTRAP for a successful
1648 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1650 * Makefile.in (OBS): Add version.o.
1651 (STAGESTUFF): Delete.
1652 (version.o): Add dependencies.
1653 (version.c): Replace rule.
1654 (clean): Remove version.c.
1655 * server.c (gdbserver_version): New.
1656 (gdbserver_usage): Use printf.
1657 (main): Handle --version and --help.
1658 * server.h (version, host_name): Add declarations.
1660 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1672 * linux-x86-64-low.c:
1675 * linux-ppc64-low.c:
1684 * linux-crisv32-low.c:
1696 * gdbserver.1: Add (C) after Copyright. Update the FSF
1699 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1701 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1702 (arm_breakpoint_at): Recognize both breakpoints.
1703 (the_low_target): Use the correct breakpoint instruction.
1705 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1707 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1708 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1709 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1710 (the_low_target): Update.
1712 2005-10-25 Andreas Schwab <schwab@suse.de>
1714 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1716 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1717 (ia64_num_regs): Reduce to 462.
1719 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1721 * acinclude.m4: Correct quoting.
1722 * aclocal.m4: Regenerated.
1724 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1725 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1726 (thread_db_init): Call thread_db_err_str.
1727 * configure.ac: Check for TD_VERSION.
1728 * config.in, configure: Regenerated.
1730 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1732 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1734 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1736 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1737 is not available. Define HAVE_PTRACE_GETREGS if it is.
1738 * config.in, configure: Regenerated.
1739 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1740 * linux-i386-low.c, linux-m68k-low.c: Update to use
1741 HAVE_PTRACE_GETREGS.
1742 * linux-low.c (regsets_fetch_inferior_registers)
1743 (regsets_store_inferior_registers): Only return 0 if we processed
1745 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1746 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1748 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1750 * inferiors.c (struct thread_info): Add gdb_id.
1751 (add_thread): Add gdb_id argument.
1752 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1753 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1754 calls to add_thread.
1755 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1756 * server.c (handle_query): Use thread_to_gdb_id.
1757 (handle_v_cont, main): Use gdb_id_to_thread_id.
1758 * server.h (add_thread): Update prototype.
1759 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1762 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1764 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1765 left-padded registers.
1766 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1767 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1769 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1771 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1772 * configure: Regenerate.
1773 * config.in: Regenerate.
1774 * server.h (NEED_DECLARATION_STRERROR):
1775 Replace with !HAVE_DECL_STRERROR.
1777 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1779 * linux-low.c (linux_wait, linux_send_signal): Don't test
1780 an unsigned long variable for > 0 if it could be MAX_ULONG.
1781 * server.c (myresume): Likewise.
1782 * target.c (set_desired_inferior): Likewise.
1784 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1786 * configure.ac: Simplify and improve check for socklen_t.
1787 * configure, config.in: Regenerate.
1789 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1791 * acconfig.h: Remove.
1792 * configure.ac: Add a test for socklen_t. Use three-argument
1793 AC_DEFINE throughout.
1794 * config.in: Regenerated using autoheader 2.59.
1795 * configure: Regenerated.
1797 * gdbreplay.c (socklen_t): Provide a default.
1798 (remote_open): Use socklen_t.
1799 * remote-utils.c (socklen_t): Provide a default.
1800 (remote_open): Use socklen_t.
1801 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1804 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1806 * linux-low.c (linux_read_memory, linux_write_memory)
1807 (linux_read_auxv): Likewise.
1808 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1809 (check_mem_write): Likewise.
1810 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1812 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1813 (registers_from_string, register_data): Likewise.
1814 * server.c (handle_query, main): Likewise.
1815 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1816 (decode_M_packet): Likewise.
1817 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1818 * target.h (struct target_ops): Update read_memory, write_memory,
1820 (read_inferior_memory, write_inferior_memory): Update.
1821 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1823 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1824 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1825 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1826 linux-s390-low.c, linux-sh-low.c: Update for changes in
1827 read_inferior_memory and the_low_target->breakpoint.
1829 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1831 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1832 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1833 * configure.srv: Add powerpc64-*-linux*.
1834 * linux-ppc64-low.c: New file.
1836 2005-05-23 Orjan Friberg <orjanf@axis.com>
1838 * linux-cris-low.c: New file with support for CRIS.
1839 * linux-crisv32-low.c: Ditto for CRISv32.
1840 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1841 (clean): Add reg-cris.c and reg-crisv32.c.
1842 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1843 reg-crisv32.o, and reg-crisv32.c to make rules.
1844 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1847 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1849 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1850 of sizeof (PTRACE_XFER_TYPE).
1851 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1853 2005-05-12 Orjan Friberg <orjanf@axis.com>
1855 * target.h (struct target_ops): Add insert_watchpoint,
1856 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1857 pointers for hardware watchpoint support.
1858 * linux-low.h (struct linux_target_ops): Ditto.
1859 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1860 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1861 to linux_target_ops.
1862 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1864 * server.c (main): Recognize 'Z' and 'z' packets.
1866 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1868 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1869 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1870 (the_low_target): Add new members.
1872 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1874 * proc-service.c (ps_lgetregs): Search all_processes instead of
1877 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1879 * server.c (start_inferior): Change return type to int.
1880 (attach_inferior): Change sigptr to int *.
1881 (handle_v_cont, handle_v_requests): Change signal to int *.
1882 (main): Change signal to int.
1884 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1886 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1887 * configure.srv: Add m32r*-*-linux*.
1888 * linux-m32r-low.c: New file.
1890 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1892 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1894 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1896 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1897 Take unsigned long arguments for PIDs.
1898 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1899 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1900 (wait_for_sigstop, linux_resume_one_process)
1901 (regsets_fetch_inferior_registers, linux_send_signal)
1902 (linux_read_auxv): Likewise. Update the types of variables holding
1903 PIDs. Update format string specifiers.
1904 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1905 * remote-utils.c (prepare_resume_reply): Likewise.
1906 * server.c (cont_thread, general_thread, step_thread)
1907 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1909 (handle_query): Update format specifiers.
1910 (handle_v_cont, main): Use strtoul for thread IDs.
1911 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1912 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1913 (general_thread, step_thread, thread_from_wait)
1914 (old_thread_from_wait): Update.
1915 * target.h (struct thread_resume): Use unsigned long for THREAD.
1916 (struct target_ops): Use unsigned long for arguments to attach and
1919 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1921 * acinclude.m4: Include bfd/bfd.m4 directly.
1922 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1923 <agriffis@toolchain.org>.
1924 * aclocal.m4, configure: Regenerated.
1926 2005-01-07 Andrew Cagney <cagney@gnu.org>
1928 * configure.ac: Rename configure.in, require autoconf 2.59.
1929 * configure: Re-generate.
1931 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1933 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1935 * aclocal.m4: Regenerated.
1936 * configure: Regenerated.
1938 2004-11-21 Andreas Schwab <schwab@suse.de>
1940 * linux-m68k-low.c (m68k_num_gregs): Define.
1941 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1942 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1943 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1944 (m68k_breakpoint_at): New. Add to the_low_target.
1946 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1947 srv_linux_thread_db to yes.
1949 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1951 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1952 (ARCH_SET_FS): Likewise.
1953 (ARCH_GET_FS): Likewise.
1954 (ARCH_GET_GS): Likewise.
1956 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1958 * linux-i386-low.c (ps_get_thread_area): New.
1959 * linux-x86-64-low.c (ps_get_thread_area): New.
1960 * linux-low.c: Include <sys/syscall.h>.
1961 (linux_kill_one_process): Don't kill the first thread here.
1962 (linux_kill): Kill the first thread here.
1963 (kill_lwp): New function.
1964 (send_sigstop, linux_send_signal): Use it.
1965 * proc-service.c: Clean up #ifdefs.
1966 (fpregset_info): Delete.
1967 (ps_lgetregs): Update and enable implementation.
1968 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1970 * remote-utils.c (struct sym_cache, symbol_cache): New.
1971 (input_interrupt): Print a clearer message.
1972 (async_io_enabled): New variable.
1973 (enable_async_io, disable_async_io): Use it. Update comments.
1974 (look_up_one_symbol): Use the symbol cache.
1975 * thread-db.c (thread_db_look_up_symbols): New function.
1976 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1978 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1980 * configure.in: Test for -rdynamic.
1981 * configure: Regenerated.
1982 * Makefile (INTERNAL_LDFLAGS): New.
1983 (gdbserver, gdbreplay): Use it.
1985 2004-09-02 Andrew Cagney <cagney@gnu.org>
1987 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1989 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1991 * linux-low.c (linux_wait): Clear all_processes list also.
1993 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1995 * linux-low.c: Include <errno.h>. Remove extern declaration of
1998 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
2000 * gdbreplay.c, server.h, utils.c: Update copyright years.
2002 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2004 * server.c (main): Print child status or termination signal from
2005 variable 'signal', not 'sig'.
2007 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
2009 * linux-low.c (linux_read_memory): Change return type to
2010 int. Check for and return error from ptrace().
2011 * target.c (read_inferior_memory): Change return type to int. Pass
2012 back return status from the_target->read_memory().
2013 * target.h (struct target_ops): Adapt *read_memory() prototype.
2015 (read_inferior_memory): Adapt prototype.
2016 * server.c (main): Return an error packet if
2017 read_inferior_memory() returns an error.
2019 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
2021 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
2022 Unify with other clean targets.
2024 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2026 * server.c (handle_v_cont): Call set_desired_inferior.
2028 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2030 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
2032 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2034 * linux-low.c (linux_wait): Unblock async I/O.
2035 (linux_resume): Block and enable async I/O.
2036 * remote-utils.c (block_async_io, unblock_async_io): New functions.
2037 * server.h (block_async_io, unblock_async_io): Add prototypes.
2039 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2041 * remote-utils.c (remote_open): Print a status notice after
2043 * server.c (attach_inferior): Print a status notice after
2046 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2048 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2050 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2052 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2054 * server.c, target.h: Update copyright years.
2056 2004-02-25 Roland McGrath <roland@redhat.com>
2058 * target.h (struct target_ops): New member `read_auxv'.
2059 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2060 * linux-low.c (linux_read_auxv): New function.
2061 (linux_target_ops): Initialize `read_auxv' member to that.
2063 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2065 Committed by Jim Blandy <jimb@redhat.com>.
2067 * linux-s390-low.c (s390_num_regs): Update.
2068 (s390_regmap): Remove control registers. Use __s390x__ predefine
2069 instead of GPR_SIZE to distiguish s390 and s390x targets.
2071 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2073 * linux-low.c: Update copyright year.
2074 (check_removed_breakpoint): Clear pending_is_breakpoint.
2075 (linux_set_resume_request, linux_queue_one_thread)
2076 (resume_status_pending_p): New functions.
2077 (linux_continue_one_thread): Use process->resume.
2078 (linux_resume): Only resume threads if there are no pending events.
2079 * linux-low.h (struct process_info): Add resume request
2082 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2084 * regcache.c (new_register_cache): Clear the allocated register
2085 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2087 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2089 * linux-low.c (linux_resume): Take a struct thread_resume *
2091 (linux_wait): Update call.
2092 (resume_ptr): New static variable.
2093 (linux_continue_one_thread): Renamed from
2094 linux_continue_one_process. Use resume_ptr.
2095 (linux_resume): Use linux_continue_one_thread.
2096 * server.c (handle_v_cont, handle_v_requests): New functions.
2097 (myresume): New function.
2098 (main): Handle 'v' case.
2099 * target.h (struct thread_resume): New type.
2100 (struct target_ops): Change argument of "resume" to struct
2102 (myresume): Delete macro.
2104 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2106 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2107 (uninstall): Support DESTDIR.
2109 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2111 * configure.srv: Add xscale*linux copy of arm*linux entry.
2113 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2115 * linux-arm-low.c (arm_reinsert_addr): New function.
2116 (the_low_target): Add arm_reinsert_addr.
2118 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2120 * mem-break.c: Remove whitespace at end of file.
2122 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2124 * configure.in: Check whether we need to prototype strerror.
2125 * server.h: Optionally prototype strerror.
2126 * gdbreplay.c (perror_with_name): Use strerror.
2127 * linux-low.c (linux_attach_lwp): Use strerror.
2128 * utils.c (perror_with_name): Use strerror.
2129 * config.in, configure: Regenerated.
2131 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2133 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2134 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2136 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2138 * Makefile.in (SFILES): Update.
2139 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2140 low-sun3.c: Remove files.
2142 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2144 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2145 (linux_detach_one_process, linux_detach): New functions.
2146 (linux_target_ops): Add linux_detach.
2147 * server.c (main): Handle 'D' packet.
2148 * target.h (struct target_ops): Add "detach" member.
2149 (detach_inferior): Define.
2151 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2153 From Kelley Cook <kelleycook@wideopenwest.com>:
2154 * configure.srv: Accept i[34567]86 variants.
2156 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2158 * linux-low.c (linux_wait_for_event): Correct comment typos.
2159 (linux_resume_one_process): Call check_removed_breakpoint.
2160 (linux_send_signal): New function.
2161 (linux_target_ops): Add linux_send_signal.
2162 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2164 * target.h (struct target_ops): Add send_signal.
2166 2003-05-29 Jim Blandy <jimb@redhat.com>
2168 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2169 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2170 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2171 away part of the register's value.
2173 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2175 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2176 (linux_wait_for_event, linux_init_signals): Likewise.
2178 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2180 * configure.in: Check for stdlib.h.
2181 * configure: Regenerated.
2182 * config.in: Regenerated.
2184 2003-01-04 Andreas Schwab <schwab@suse.de>
2186 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2188 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2190 * Makefile.in: Remove obsolete code.
2192 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2194 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2195 defined(PT_FPR0_HI).
2197 2002-11-17 Stuart Hughes <seh@zee2.com>
2199 * linux-arm-low.c (arm_num_regs): Increase.
2200 (arm_regmap): Include status register.
2202 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2204 * linux-low.c (register_addr): Remove incorrect -1 check.
2206 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2208 * linux-low.c (linux_create_inferior): Call setpgid. Return
2210 (unstopped_p, linux_signal_pid): Remove.
2211 (linux_target_ops): Remove linux_signal_pid.
2212 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2213 global instead of target method.
2214 * target.h (struct target_ops): Remove signal_pid. Update comment
2215 for create_inferior.
2216 * server.c (signal_pid): New variable.
2217 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2218 gdbserver. Set the child to be the foreground process group.
2219 (attach_inferior): Set signal_pid.
2221 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2223 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2225 2002-08-20 Jim Blandy <jimb@redhat.com>
2227 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2230 2002-08-01 Andrew Cagney <cagney@redhat.com>
2232 * Makefile.in: Make chill references obsolete.
2234 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2236 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2237 * configure: Regenerate.
2238 * config.in: Regenerate.
2240 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2242 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2243 (perror_with_name, remote_close, remote_open, expect, play): Static.
2245 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2247 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2248 byte offsets instead of an array of indexes.
2249 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2251 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2253 * regcache.c: Add comment.
2255 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2257 * thread-db.c: New file.
2258 * proc-service.c: New file.
2259 * acinclude.m4: New file.
2260 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2261 proc-service.o, and thread-db.o.
2262 (linux-low.o): Add USE_THREAD_DB.
2263 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2264 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2265 * aclocal.m4: Regenerated.
2266 * config.in: Regenerated.
2267 * configure: Regenerated.
2268 * configure.in: Check for proc_service.h, sys/procfs.h,
2269 thread_db.h, and linux/elf.h headrs.
2270 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2271 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2272 Check for -lthread_db and thread support.
2273 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2274 PowerPC, and SuperH.
2275 * i387-fp.c: Constify arguments.
2276 * i387-fp.h: Likewise.
2277 * inferiors.c: (struct thread_info): Renamed from
2278 `struct inferior_info'. Remove PID member. Use generic inferior
2279 list header. All uses updated.
2280 (inferiors, signal_pid): Removed.
2281 (all_threads): New variable.
2282 (get_thread): Define.
2283 (add_inferior_to_list): New function.
2284 (for_each_inferior): New function.
2285 (change_inferior_id): New function.
2286 (add_inferior): Removed.
2287 (remove_inferior): New function.
2288 (add_thread): New function.
2289 (free_one_thread): New function.
2290 (remove_thread): New function.
2291 (clear_inferiors): Use for_each_inferior and free_one_thread.
2292 (find_inferior): New function.
2293 (find_inferior_id): New function.
2294 (inferior_target_data): Update argument type.
2295 (set_inferior_target_data): Likewise.
2296 (inferior_regcache_data): Likewise.
2297 (set_inferior_regcache_data): Likewise.
2298 * linux-low.c (linux_bp_reinsert): Remove.
2299 (all_processes, stopping_threads, using_thrads)
2300 (struct pending_signals, debug_threads, pid_of): New.
2301 (inferior_pid): Replace with macro.
2302 (struct inferior_linux_data): Remove.
2303 (get_stop_pc, add_process): New functions.
2304 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2305 Use add_process and add_thread.
2306 (linux_attach_lwp): New function, based on old linux_attach. Use
2307 add_process and add_thread. Set stop_expected for new threads.
2308 (linux_attach): New function.
2309 (linux_kill_one_process): New function.
2310 (linux_kill): Kill all LWPs.
2311 (linux_thread_alive): Use find_inferior_id.
2312 (check_removed_breakpoints, status_pending_p): New functions.
2313 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2314 Update. Use WNOHANG. Wait for cloned processes also. Update process
2315 struct for the found process.
2316 (linux_wait_for_event): New function.
2317 (linux_wait): Use it. Support LWPs.
2318 (send_sigstop, wait_for_sigstop, stop_all_processes)
2319 (linux_resume_one_process, linux_continue_one_process): New functions.
2320 (linux_resume): Support LWPs.
2321 (REGISTER_RAW_SIZE): Remove.
2322 (fetch_register): Use register_size instead. Call supply_register.
2323 (usr_store_inferior_registers): Likewise. Call collect_register.
2325 (regsets_fetch_inferior_registers): Improve error message.
2326 (regsets_store_inferior_registers): Add debugging.
2327 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2328 (unstopped_p, linux_signal_pid): New functions.
2329 (linux_target_ops): Add linux_signal_pid.
2330 (linux_init_signals): New function.
2331 (initialize_low): Call it. Initialize using_threads.
2332 * regcache.c (inferior_regcache_data): Add valid
2334 (get_regcache): Fetch registers lazily. Add fetch argument
2335 and update all callers.
2336 (regcache_invalidate_one, regcache_invalidate): New
2338 (new_register_cache): Renamed from create_register_cache.
2339 Return the new regcache.
2340 (free_register_cache): Change argument to a void *.
2341 (registers_to_string, registers_from_string): Call get_regcache
2342 with fetch flag set.
2343 (register_data): Make static. Pass fetch flag to get_regcache.
2344 (supply_register): Call get_regcache with fetch flag clear.
2345 (collect_register): Call get_regcache with fetch flag set.
2346 (collect_register_as_string): New function.
2347 * regcache.h: Update.
2348 * remote-utils.c (putpkt): Flush after debug output and use
2350 Handle input interrupts while waiting for an ACK.
2351 (input_interrupt): Use signal_pid method.
2352 (getpkt): Flush after debug output and use stderr.
2353 (outreg): Use collect_register_as_string.
2354 (new_thread_notify, dead_thread_notify): New functions.
2355 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2357 (look_up_one_symbol): Flush after debug output.
2358 * server.c (step_thread, server_waiting): New variables.
2359 (start_inferior): Don't use signal_pid. Update call to mywait.
2360 (attach_inferior): Update call to mywait.
2361 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2362 (main): Don't fetch/store registers explicitly. Use
2363 set_desired_inferior. Support proposed ``Hs'' packet. Update
2366 (struct inferior_list, struct_inferior_list_entry): New.
2367 * target.c (set_desired_inferior): New.
2368 (write_inferior_memory): Constify.
2369 (mywait): New function.
2371 (struct target_ops): New signal_pid method.
2372 (mywait): Removed macro, added prototype.
2374 * linux-low.h (regset_func): Removed.
2375 (regset_fill_func, regset_store_func): New.
2376 (enum regset_type): New.
2377 (struct regset_info): Add type field. Use new operation types.
2378 (struct linux_target_ops): stop_pc renamed to get_pc.
2379 Add decr_pc_after_break and breakpoint_at.
2380 (get_process, get_thread_proess, get_process_thread)
2381 (strut process_info, all_processes, linux_attach_lwp)
2382 (thread_db_init): New.
2384 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2385 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2386 (the_low_target): Add new members.
2387 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2388 (i386_store_fpxregset): Constify.
2389 (target_regsets): Add new kind identifier.
2390 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2391 (i386_set_pc): Add debugging.
2392 (i386_breakpoint_at): New function.
2393 (the_low_target): Add new members.
2394 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2395 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2396 (mips_breakpoint_at): New.
2397 (the_low_target): Add new members.
2398 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2399 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2400 (the_low_target): Add new members.
2401 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2402 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2403 (the_low_target): Add new members.
2404 * linux-x86-64-low.c (target_regsets): Add new kind
2407 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2409 From Martin Pool <mbp@samba.org>:
2410 * server.c (gdbserver_usage): New function.
2413 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2415 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2418 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2420 * Makefile.in: Remove obsolete code.
2422 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2424 * linux-low.c (regsets_fetch_inferior_registers),
2425 (regsets_store_inferior_registers): Removed cast to int from
2427 * regcache.h: Added declaration of struct inferior_info.
2429 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2431 * inferiors.c (struct inferior_info): Add regcache_data.
2432 (add_inferior): Call create_register_cache.
2433 (clear_inferiors): Call free_register_cache.
2434 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2435 * regcache.c (struct inferior_regcache_data): New.
2436 (registers): Remove.
2437 (get_regcache): New function.
2438 (create_register_cache, free_register_cache): New functions.
2439 (set_register_cache): Don't initialize the register cache here.
2440 (registers_to_string, registers_from_string, register_data): Call
2442 * regcache.h: Add prototypes.
2443 * server.h: Likewise.
2445 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2447 * mem-break.c: New file.
2448 * mem-break.h: New file.
2449 * Makefile.in: Add mem-break.o rule; update server.h
2451 * inferiors.c (struct inferior_info): Add target_data
2453 (clear_inferiors): Free target_data member if set.
2454 (inferior_target_data, set_inferior_target_data): New functions.
2455 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2456 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2457 * linux-low.c (linux_bp_reinsert): New variable.
2458 (struct inferior_linux_data): New.
2459 (linux_create_inferior): Use set_inferior_target_data.
2460 (linux_attach): Likewise. Call add_inferior.
2461 (linux_wait_for_one_inferior): New function.
2462 (linux_wait): Call it.
2463 (linux_write_memory): Add const.
2464 (initialize_low): Call set_breakpoint_data.
2465 * linux-low.h (struct linux_target_ops): Add breakpoint
2467 * server.c (attach_inferior): Remove extra add_inferior
2469 * server.h: Include mem-break.h. Update inferior.c
2471 * target.c (read_inferior_memory)
2472 (write_inferior_memory): New functions.
2473 * target.h (read_inferior_memory)
2474 (write_inferior_memory): Change macros to prototypes.
2475 (struct target_ops): Update comments. Add const to write_memory
2478 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2480 * linux-low.c (usr_store_inferior_registers): Support
2481 registers which are allowed to fail to store.
2482 * linux-low.h (linux_target_ops): Likewise.
2483 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2484 (ppc_cannot_store_register): FPSCR may not be storable.
2486 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2488 * server.h: Include <string.h> if HAVE_STRING_H.
2489 * ChangeLog: Correct paths in last ChangeLog entry.
2491 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2493 * linux-low.h: Remove obsolete prototypes.
2494 (struct linux_target_ops): New.
2495 (extern the_low_target): New.
2496 * linux-low.c (num_regs, regmap): Remove declarations.
2497 (register_addr): Use the_low_target explicitly.
2498 (fetch_register): Likewise.
2499 (usr_fetch_inferior_registers): Likewise.
2500 (usr_store_inferior_registers): Likewise.
2501 * linux-arm-low.c (num_regs): Remove.
2502 (arm_num_regs): Define.
2503 (arm_regmap): Renamed from regmap, made static.
2504 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2506 (arm_cannot_store_register): Renamed from cannot_store_register,
2508 (the_low_target): New.
2509 * linux-i386-low.c (num_regs): Remove.
2510 (i386_num_regs): Define.
2511 (i386_regmap): Renamed from regmap, made static.
2512 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2514 (i386_cannot_store_register): Renamed from cannot_store_register,
2516 (the_low_target): New.
2517 * linux-ia64-low.c (num_regs): Remove.
2518 (ia64_num_regs): Define.
2519 (ia64_regmap): Renamed from regmap, made static.
2520 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2522 (ia64_cannot_store_register): Renamed from cannot_store_register,
2524 (the_low_target): New.
2525 * linux-m68k-low.c (num_regs): Remove.
2526 (m68k_num_regs): Define.
2527 (m68k_regmap): Renamed from regmap, made static.
2528 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2530 (m68k_cannot_store_register): Renamed from cannot_store_register,
2532 (the_low_target): New.
2533 * linux-mips-low.c (num_regs): Remove.
2534 (mips_num_regs): Define.
2535 (mips_regmap): Renamed from regmap, made static.
2536 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2538 (mips_cannot_store_register): Renamed from cannot_store_register,
2540 (the_low_target): New.
2541 * linux-ppc-low.c (num_regs): Remove.
2542 (ppc_num_regs): Define.
2543 (ppc_regmap): Renamed from regmap, made static.
2544 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2546 (ppc_cannot_store_register): Renamed from cannot_store_register,
2548 (the_low_target): New.
2549 * linux-s390-low.c (num_regs): Remove.
2550 (s390_num_regs): Define.
2551 (s390_regmap): Renamed from regmap, made static.
2552 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2554 (s390_cannot_store_register): Renamed from cannot_store_register,
2556 (the_low_target): New.
2557 * linux-sh-low.c (num_regs): Remove.
2558 (sh_num_regs): Define.
2559 (sh_regmap): Renamed from regmap, made static.
2560 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2562 (sh_cannot_store_register): Renamed from cannot_store_register,
2564 (the_low_target): New.
2565 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2566 (the_low_target): New.
2568 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2570 * Makefile.in: Add stamp-h target.
2571 * configure.in: Create stamp-h.
2572 * configure: Regenerated.
2574 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2576 * inferiors.c: New file.
2577 * target.c: New file.
2578 * target.h: New file.
2579 * Makefile.in: Add target.o and inferiors.o. Update
2581 * linux-low.c (inferior_pid): New static variable,
2582 moved from server.c.
2583 (linux_create_inferior): Renamed from create_inferior.
2584 Call add_inferior. Return 0 on success instead of a PID.
2585 (linux_attach): Renamed from myattach.
2586 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2587 (linux_thread_alive): Renamed from mythread_alive.
2588 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2590 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2591 (regsets_store_inferior_registers): Correct error message.
2592 Add missing ``return 0''.
2593 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2594 (linux_store_registers): Renamed from store_inferior_registers.
2595 (linux_read_memory): Renamed from read_inferior_memory.
2596 (linux_write_memory): Renamed from write_inferior_memory.
2597 (linux_target_ops): New structure.
2598 (initialize_low): Call set_target_ops ().
2599 * remote-utils.c (unhexify): New function.
2600 (hexify): New function.
2601 (input_interrupt): Send signals to ``signal_pid''.
2602 * server.c (inferior_pid): Remove.
2603 (start_inferior): Update create_inferior call.
2604 (attach_inferior): Call add_inferior.
2605 (handle_query): New function.
2606 (main): Call handle_query for `q' packets.
2607 * server.h: Include "target.h". Remove obsolete prototypes.
2608 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2610 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2612 * Makefile.in: Add WARN_CFLAGS. Update configury
2614 * configure.in: Check for <string.h>
2615 * configure: Regenerate.
2616 * config.in: Regenerate.
2617 * gdbreplay.c: Include needed system headers.
2618 (remote_open): Remove strchr prototype.
2619 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2620 * regcache.c (supply_register): Change buf argument to const void *.
2621 (supply_register_by_name): Likewise.
2622 (collect_register): Change buf argument to void *.
2623 (collect_register_by_name): Likewise.
2624 * regcache.h: Add missing prototypes.
2625 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2626 * server.c (handle_query): New function.
2627 (attached): New static variable, moved out of main.
2628 (main): Quiet longjmp clobber warnings.
2629 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2630 * utils.c (error): Remove NORETURN.