1 2008-12-13 Doug Evans <dje@google.com>
3 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
5 2008-12-13 Doug Evans <dje@google.com>
7 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8 * server.h (ATTR_MALLOC): New macro.
9 (xmalloc,xcalloc,xstrdup): Declare.
10 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15 * remote-utils.c: Ditto.
20 2008-12-12 Doug Evans <dje@google.com>
22 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
25 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
27 2008-12-09 Doug Evans <dje@google.com>
29 * linux-low.h (struct process_info): Delete member tid, unused.
30 * thread-db.c (find_one_thread): Update.
31 (maybe_attach_thread): Update.
33 2008-12-02 Pedro Alves <pedro@codesourcery.com>
35 * target.h (struct target_ops): Add qxfer_osdata member.
36 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
38 (linux_qxfer_osdata): New functions.
39 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
41 * server.c (handle_query): Handle "qXfer:osdata:read:".
42 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
43 (buffer_xml_printf): New functions.
44 * server.h (struct buffer): New.
45 (buffer_grow_str, buffer_grow_str0): New macros.
46 (buffer_grow, buffer_free, buffer_init, buffer_finish)
47 (buffer_xml_printf): Declare.
49 2008-11-24 Doug Evans <dje@google.com>
51 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
53 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
55 * server.c (handle_v_run): Always use the supplied argument list.
57 2008-11-19 Bob Wilson <bob.wilson@acm.org>
59 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
60 (xtensa_regmap_table): Add entry for scompare1.
62 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
64 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
65 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
66 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
67 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
68 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
69 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
70 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
71 XML target descriptions.
72 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
73 when inferior is running on an ISA 2.05 or later processor. Add
74 special case to return offset for full 64-bit slot of FPSCR when
77 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
79 * Makefile.in (SFILES, clean): Added sparc64 files.
80 (reg-sparc64.o, reg-sparc64.c): New.
81 * configure.srv (sparc*-*-linux*): New configuration.
82 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
83 syscall arguments for SPARC.
84 (regsets_store_inferior_registers): Likewise.
85 * linux-sparc-low.c: New file.
87 2008-10-21 Doug Evans <dje@google.com>
89 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
90 (READLINE_DIR,READLINE_DEP): Delete.
91 (INTERNAL_CFLAGS): Update.
94 2008-10-10 Pedro Alves <pedro@codesourcery.com>
96 * server.c (handle_v_run): If GDB didn't specify an argv, use the
97 whole argv from the last run, not just argv[0].
99 2008-09-08 Pedro Alves <pedro@codesourcery.com>
101 * regcache.c (new_register_cache): Return NULL if the register
102 cache size isn't known yet.
103 (free_register_cache): Avoid dereferencing a NULL regcache.
105 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
107 * configure.srv: Merge MIPS and MIPS64.
109 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
111 * Makefile.in (uninstall): Apply $(EXEEXT) too.
113 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
115 * Makefile.in: Add required vsx dependencies.
117 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
118 Declare init_registers_powerpc_vsx32l.
119 Declare init_registers_powerpc_vsx64l.
120 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
121 (ppc_arch_setup): Check for VSX in hwcap.
122 (ppc_fill_vsxregset): New function.
123 (ppc_store_vsxregset): New function.
124 Add new VSX entry in regset_info target_regsets.
126 * configure.srv: Add new VSX dependencies.
128 2008-08-12 Pedro Alves <pedro@codesourcery.com>
130 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
131 (remote_open): Set or clear transport_is_reliable.
132 (putpkt_binary): Don't expect acks in noack mode.
133 (getpkt): Don't send ack/nac in noack mode.
134 * server.c (handle_general_set): Handle QStartNoAckMode.
135 (handle_query): If connected by tcp pass QStartNoAckMode+ in
137 (main): Reset noack_mode on every connection.
138 * server.h (noack_mode): Declare.
140 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
142 * Makefile.in (GDBREPLAY_OBS): New variable.
143 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
145 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
146 Daniel Jacobowitz <dan@codesourcery.com>
148 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
149 (usr_store_inferior_registers): Likewise.
150 (regsets_store_inferior_registers): Likewise.
152 2008-07-31 Rolf Jansen <rj@surtec.com>
153 Pedro Alves <pedro@codesourcery.com>
155 * configure.ac: Check for memmem declaration.
156 * server.c [HAVE_MALLOC_H]: Include malloc.h.
157 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
158 (disable_packet_qfThreadInfo): Unconditionally compile.
159 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
160 * configure, config.in: Regenerate.
162 2008-07-28 Doug Kwan <dougkwan@google.com>
164 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
165 (linux_write_memory): Remove declaration of errno.
167 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
169 * linux-low.c (handle_extended_wait): Do not use "status"
170 variable uninitialized.
172 2008-07-07 Pedro Alves <pedro@codesourcery.com>
174 * server.c (handle_v_attach): Inhibit reporting dll changes.
176 2008-06-27 Pedro Alves <pedro@codesourcery.com>
178 * remote-utils.c (prepare_resume_reply): If requested, don't
179 output "thread:TID" in the T stop reply.
181 * server.c (disable_packet_vCont, disable_packet_Tthread)
182 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
183 (handle_query): If requested, disable support for qC, qfThreadInfo
185 (handle_v_requests): If requested, disable support for vCont.
186 (gdbserver_show_disableable): New.
187 (main): Handle --disable-packet and --disable-packet=LIST.
189 * server.h (disable_packet_vCont, disable_packet_Tthread)
190 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
192 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
194 * server.c (gdbserver_usage): Mention --version.
196 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
198 * Makefile.in (gdbreplay.o): New rule.
200 2008-06-06 Joseph Myers <joseph@codesourcery.com>
202 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
203 message, not gdbserver.
205 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
206 Nathan Sidwell <nathan@codesourcery.com>
207 Joseph Myers <joseph@codesourcery.com>
209 * acinclude.m4: Include ../../config/acx.m4.
210 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
211 * configure, config.in: Regenerate.
212 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
213 * server.c (gdbserver_version): Print PKGVERSION.
214 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
215 (main): Adjust gdbserver_usage calls.
216 * gdbreplay.c (version, host_name): Add declarations.
217 (gdbreplay_version, gdbreplay_usage): New.
218 (main): Accept --version and --help options.
220 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
222 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
223 (arm_breakpoint_at): Handle Thumb.
224 (the_low_target): Add comment.
226 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
228 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
230 2008-05-09 Doug Evans <dje@google.com>
232 * server.h (decode_search_memory_packet): Declare.
233 * remote-utils.c (decode_search_memory_packet): New fn.
234 * server.c (handle_search_memory_1): New fn.
235 (handle_search_memory): New fn.
236 (handle_query): Process qSearch:memory packets.
238 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
240 * regcache.c (registers_length): Remove.
241 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
242 full register packet.
243 * regcache.h (registers_length): Remove prototype.
244 * server.h (PBUFSIZ): Define to 16384.
246 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
248 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
249 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
250 powerpc-64l.o, and powerpc-altivec64l.o.
251 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
252 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
253 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
254 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
255 rs6000/power-linux.xml, and rs6000/power64-linux.xml
258 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
259 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
260 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
261 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
262 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
263 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
264 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
265 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
266 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
267 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
270 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
271 (init_registers_powerpc_32l): ... this new prototype.
272 (init_registers_powerpc_32): Remove, replace by ...
273 (init_registers_powerpc_altivec32l): ... this new prototype.
274 (init_registers_powerpc_e500): Remove, replace by ...
275 (init_registers_powerpc_e500l): ... this new prototype.
276 (init_registers_ppc64): Remove, replace by ...
277 (init_registers_powerpc_64l): ... this new prototype.
278 (init_registers_powerpc_64): Remove, replace by ...
279 (init_registers_powerpc_altivec64l): ... this new prototype.
280 (ppc_num_regs): Set to 73.
281 (PT_ORIG_R3, PT_TRAP): Define if necessary.
282 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
283 (ppc_cannot_store_register): Handle orig_r3 and trap.
284 (ppc_arch_setup): Update init_registers_... calls.
285 (ppc_fill_gregset): Handle orig_r3 and trap.
287 * inferiors.c (clear_inferiors): Reset current_inferior.
289 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
291 * acinclude.m4: Add override.m4.
292 * configure: Regenerate.
294 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
296 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
297 initial call to init_register_ppc64.
299 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
301 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
302 powerpc*-*-linux* case.
303 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
305 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
307 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
308 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
310 * linux-ppc-low.c: Include <elf.h>.
311 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
312 (ppc_hwcap): New global variable.
313 (ppc_regmap): Remove __SPE__ #ifdef sections.
314 (ppc_regmap_e500): New global variable.
315 (ppc_cannot_store_register): Update __SPE__ special case.
316 (ppc_get_hwcap): New function.
317 (ppc_arch_setup): Use it to determine whether inferior supports
318 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
319 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
320 Do not access registers if target does not support AltiVec.
321 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
322 Do not access registers if target does not support SPE.
323 (target_regsets): Unconditionally include AltiVec and SPE regsets.
325 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
327 * linux-low.c (disabled_regsets, num_regsets): New.
328 (use_regsets_p): Delete.
329 (linux_wait_for_process): Clear disabled_regsets.
330 (regsets_fetch_inferior_registers): Check and set it.
331 (regsets_store_inferior_registers): Likewise.
332 (linux_fetch_registers, linux_store_registers): Do not use
334 (initialize_low): Allocate disabled_regsets.
336 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
338 * Makefile.in (LIBOBJS): New.
340 (memmem.o): New rule.
341 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
342 * configure: Regenerated.
344 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
346 * server.c (handle_query): Never return "unsupported" for
347 qXfer:features:read queries.
349 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
351 * server.c (get_features_xml): Fix inverted condition.
352 (handle_query): Always support qXfer:feature:read.
354 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
356 * server.c (wrapper_argv): New.
357 (start_inferior): Handle wrapper_argv. If set, expect an extra
359 (gdbserver_usage): Document --wrapper.
360 (main): Parse --wrapper.
362 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
364 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
365 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
366 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
367 (ppc_set_pc): Likewise.
368 (ppc_arch_setup): New function.
369 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
371 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
373 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
375 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
376 instead of linux-ppc64-low.o.
377 * linux-ppc64-low.c: Remove file.
378 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
379 (linux-ppc64-low.o): Remove rule.
381 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
382 (init_registers_powerpc_64): Likewise.
383 (ppc_regmap): Conditionally define depending on __powerpc64__.
384 (ppc_cannot_store_register): Do not special-case "fpscr" when
385 compiled on __powerpc64__.
386 (ppc_collect_ptrace_register): New function.
387 (ppc_supply_ptrace_register): New function.
388 (ppc_breakpoint): Change type to "unsigned int".
389 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
390 (the_low_target): Conditionally provide initializers for the
391 arch_setup member depending on __powerpc64__. Install
392 collect_ptrace_register and supply_ptrace_register members.
394 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
396 * regcache.h (gdbserver_xmltarget): Add extern declaration.
397 * server.c (gdbserver_xmltarget): Define.
398 (get_features_xml): Use it to replace "target.xml" and arch_string.
400 * configure.srv: Remove srv_xmltarget. Add XML files that were
401 mentioned there to srv_xmlfiles instead. Remove conditional tests
402 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
403 srv_xmlfiles and srv_regobj to include all possible choices.
404 * configure.ac (srv_xmltarget): Remove.
405 (srv_xmlfiles): Do not add "target.xml".
406 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
407 checks for supplementary target information.
408 * configure: Regenerate.
409 * Makefile.in (XML_TARGET): Remove.
410 (target.xml): Remove rule.
411 (clean): Do not clean up target.xml.
412 (.PRECIOUS): Do not mention target.xml.
414 * target.h (struct target_ops): Remove arch_string member.
415 * linux-low.c (linux_arch_string): Remove.
416 (linux_target_ops): Remove arch_string initializer.
417 * linux-low.h (struct linux_target_ops): Remove arch_string member.
418 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
419 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
420 * spu-low.c (spu_arch_string): Remove.
421 (spu_target_ops): Remove arch_string initializer.
422 * win32-low.c (win32_arch_string): Remove.
423 (win32_target_ops): Remove arch_string initializer.
424 * win32-low.h (struct win32_target_ops): Remove arch_string member.
425 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
426 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
428 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
430 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
431 by collect_ptrace_register and supply_ptrace_register hooks.
432 * linux-low.c (fetch_register): Use supply_ptrace_register callback
433 instead of checking for the_low_target.left_pad_xfer.
434 (usr_store_inferior_registers): Use collect_ptrace_register callback
435 instead of checking for the_low_target.left_pad_xfer.
437 * linux-s390-low.c (s390_collect_ptrace_register): New function.
438 (s390_supply_ptrace_register): Likewise.
439 (s390_fill_gregset): Call s390_collect_ptrace_register.
440 (the_low_target): Update.
442 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
443 (ppc_supply_ptrace_register): Likewise.
444 (the_low_target): Update.
446 * linux-i386-low.c (the_low_target): Update.
447 * linux-x86-64-low.c (the_low_target): Update.
449 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
451 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
452 reg-s390.o and reg-s390x.o.
454 * linux-low.c (new_inferior): New global variable.
455 (linux_create_inferior, linux_attach): Set it.
456 (linux_wait_for_process): Call the_low_target.arch_setup after the
457 target has stopped for the first time.
458 (initialize_low): Do not call the_low_target.arch_setup.
460 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
461 (s390_set_pc): Likewise.
462 (s390_arch_setup): New function.
463 (the_low_target): Use s390_arch_setup as arch_setup routine.
465 * regcache.c (realloc_register_cache): New function.
466 (set_register_cache): Call it for each existing regcache.
468 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
470 * server.h (init_registers): Remove prototype.
472 * linux-low.h (struct linux_target_ops): Add arch_setup field.
473 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
474 instead of init_registers ().
475 * linux-arm-low.c (init_registers_arm): Add prototype.
476 (init_registers_arm_with_iwmmxt): Likewise.
477 (the_low_target): Add initializer for arch_setup field.
478 * linux-cris-low.c (init_registers_cris): Add prototype.
479 (the_low_target): Add initializer for arch_setup field.
480 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
481 (the_low_target): Add initializer for arch_setup field.
482 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
483 (the_low_target): Add initializer for arch_setup field.
484 * linux-ia64-low.c (init_registers_ia64): Add prototype.
485 (the_low_target): Add initializer for arch_setup field.
486 * linux-m32r-low.c (init_registers_m32r): Add prototype.
487 (the_low_target): Add initializer for arch_setup field.
488 * linux-m68k-low.c (init_registers_m68k): Add prototype.
489 (the_low_target): Add initializer for arch_setup field.
490 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
491 (init_registers_mips64_linux): Likewise.
492 (the_low_target): Add initializer for arch_setup field.
493 * linux-ppc-low.c (init_registers_ppc): Add prototype.
494 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
495 (the_low_target): Add initializer for arch_setup field.
496 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
497 (init_registers_powerpc_64): Likewise.
498 (the_low_target): Add initializer for arch_setup field.
499 * linux-s390-low.c (init_registers_s390): Add prototype.
500 (init_registers_s390x): Likewise.
501 (the_low_target): Add initializer for arch_setup field.
502 * linux-sh-low.c (init_registers_sh): Add prototype.
503 (the_low_target): Add initializer for arch_setup field.
504 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
505 (the_low_target): Add initializer for arch_setup field.
506 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
507 (the_low_target): Add initializer for arch_setup field.
509 * win32-low.h (struct win32_target_ops): Add arch_setup field.
510 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
511 instead of init_registers ().
512 * win32-arm-low.c (init_registers_arm): Add prototype.
513 (the_low_target): Add initializer for arch_setup field.
514 * win32-i386-low.c (init_registers_i386): Add prototype.
515 (the_low_target): Add initializer for arch_setup field.
517 * spu-low.c (init_registers_spu): Add prototype.
518 (initialize_low): Call initialie_registers_spu () instead of
519 initialize_registers ().
521 2008-02-19 Pedro Alves <pedro@codesourcery.com>
523 * server.c (handle_v_requests): When handling the vRun and vAttach
524 packets, if already debugging a process, don't kill it. Return an
527 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
529 * server.c (handle_query): Correct length check.
531 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
533 * win32-low.c (do_initial_child_stuff): Add process handle
534 parameter. Set current_process_handle and current_process_id from the
535 parameters. Clear globals.
536 (win32_create_inferior): Don't set current_process_handle and
537 current_process_id here. Instead pass them on the call to
538 do_initial_child_stuff.
539 (win32_attach): Likewise.
540 (win32_clear_inferiors): New.
541 (win32_kill): Don't close the current process handle or the
542 current thread handle here. Instead call win32_clear_inferiors.
543 (win32_detach): Don't open a new handle to the process. Call
544 win32_clear_inferiors.
545 (win32_join): Don't rely on current_process_handle; open a new
546 handle using the process id.
547 (win32_wait): Call win32_clear_inferiors when the inferior process
550 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
552 * server.c (monitor_show_help): Add "exit".
554 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
556 * Makefile.in (SFILES): Add linux-xtensa-low.c.
557 (clean): Add reg-xtensa.c.
558 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
559 * configure.srv (xtensa*-*-linux*) New target.
560 * linux-xtensa-low.c: New.
561 * xtensa-xtregs.c: New.
563 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
565 * hostio.c: Don't include errno.h.
566 (errno_to_fileio_errno): Move to hostio-errno.
567 * hostio.c: (hostio_error): Remove the error parameter. Defer the
568 error number outputting to the target->hostio_last_error callback.
569 (hostio_packet_error): Use FILEIO_EINVAL directly.
570 (handle_open, handle_pread, hostio_error, handle_unlink): Update
571 calls to hostio_error.
572 * hostio-errno.c: New.
573 * server.h (hostio_last_error_from_errno): Declare.
574 * target.h (target_ops): Add hostio_last_error member.
575 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
576 as hostio_last_error handler.
577 * spu-low.c (spu_target_ops): Likewise.
578 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
579 (wince_hostio_last_error): New functions.
580 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
581 as hostio_last_error handler.
582 (win32_target_ops) [!_WIN32_WCE]: Register
583 hostio_last_error_from_errno as hostio_last_error handler.
584 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
585 (hostio-errno.o): New rule.
586 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
587 * configure.srv (srv_hostio_err_objs): New variable. Default to
589 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
590 * configure: Regenerate.
592 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
594 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
595 (linux_kill, linux_detach): Clean up the process list.
596 * remote-utils.c (remote_open): Improve port number parsing.
597 (putpkt_binary, input_interrupt): Only send interrupts if the target
599 * server.c (extended_protocol): Make static.
600 (attached): Define earlier.
601 (exit_requested, response_needed, program_argv): New variables.
602 (target_running): New.
603 (start_inferior): Clear attached here.
604 (attach_inferior): Set attached here.
605 (require_running): Define.
606 (handle_query): Use require_running and target_running. Implement
608 (handle_v_attach, handle_v_run): New.
609 (handle_v_requests): Use require_running. Handle vAttach and vRun.
610 (gdbserver_usage): Update.
611 (main): Redo argument parsing. Handle --debug and --multi. Handle
612 --attach along with other options or after the port. Save
613 program_argv. Support no initial program. Resynchronize
614 communication with GDB after an error. Handle "monitor exit".
615 Use require_running and target_running. Always allow the extended
616 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
617 restart in extended mode.
618 * README: Refer to the GDB manual. Update --attach usage.
620 2007-12-20 Andreas Schwab <schwab@suse.de>
622 * linux-low.c (STACK_SIZE): Define.
623 (linux_tracefork_child): Use it. Use __clone2 on ia64.
624 (linux_test_for_tracefork): Likewise.
626 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
628 * linux-low.c (linux_wait_for_event): Update messages. Do not
629 reinsert auto-delete breakpoints.
630 * mem-break.c (struct breakpoint): Change return type of handler to
632 (set_breakpoint_at): Update handler type.
633 (reinsert_breakpoint_handler): Return 1 instead of calling
635 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
637 (check_breakpoints): Delete auto-delete breakpoints and return 2.
638 * mem-break.h (set_breakpoint_at): Update handler type.
639 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
640 * win32-low.c (auto_delete_breakpoint): New.
641 (get_child_debug_event): Use it.
643 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
645 * configure.ac: Check for pread and pwrite.
646 * hostio.c (handle_pread): Fall back to lseek and read.
647 (handle_pwrite): Fall back to lseek and write.
648 * config.in, configure: Regenerated.
650 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
652 * server.c (myresume): Add own_buf argument.
653 (main): Update calls.
655 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
657 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
658 * remote-utils.c (remote_open): Do not call disable_async_io.
659 (block_async_io): Delete.
660 (unblock_async_io): Make static.
661 (initialize_async_io): New.
662 * server.c (handle_v_cont): Handle async I/O here.
663 (myresume): Likewise. Move other common resume tasks here...
664 (main): ... from here. Call initialize_async_io. Disable async
665 I/O before the main loop.
666 * server.h (initialize_async_io): Declare.
667 (block_async_io, unblock_async_io): Delete prototypes.
668 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
670 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
672 * remote-utils.c (readchar): Allow binary data in received messages.
674 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
676 * win32-low.c (attaching): New global.
677 (win32_create_inferior): Clear the `attaching' global.
678 (win32_attach): Set the `attaching' global.
679 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
680 attaching. Only set a breakpoint at the entry point if not
683 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
685 * server.c (main): Don't report dll events on the initial
686 connection on attaches.
688 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
690 * server.c (main): Relax numerical bases supported for the pid of
691 the --attach command line argument.
693 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
695 * win32-low.c (win32_attach): Call OpenProcess before
696 DebugActiveProcess, not after. Add last error output to error
699 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
701 * win32-low.c (win32_get_thread_context)
702 (win32_set_thread_context): New functions.
703 (thread_rec): Use win32_get_thread_context.
704 (continue_one_thread, win32_resume): Use win32_set_thread_context.
705 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
709 Pedro Alves <pedro_alves@portugalmail.pt>
711 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
713 (child_add_thread): Minor cleanup.
714 (child_continue): Resume artificially suspended threads before
715 calling ContinueDebugEvent.
716 (suspend_one_thread): New.
717 (fake_breakpoint_event): New.
718 (get_child_debug_event): Change return type to int. Check here if
719 gdb sent an interrupt request. If a soft interrupt was requested,
720 fake a breakpoint event. Return 0 if there is no event to handle,
722 (win32_wait): Don't check here if gdb sent an interrupt request.
723 Ensure there is a valid event to handle.
724 (win32_request_interrupt): Add soft interruption method as last
728 Pedro Alves <pedro_alves@portugalmail.pt>
730 * win32-low.h (win32_thread_info): Add descriptions to the
731 structure members. Replace `suspend_count' counter by a
733 * win32-low.c (thread_rec): Update condition of when to get the
734 context from the inferior. Rely on ContextFlags being set if it
735 has already been retrieved. Only suspend the inferior thread if
736 we haven't already. Warn if that fails.
737 (continue_one_thread): s/suspend_count/suspended/. Only call
738 ResumeThread once. Warn if that fails.
740 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
742 * win32-low.c (win32_wait): Don't read from the inferior when it
745 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
747 * Makefile.in (win32_low_h): New variable.
748 (win32-low.o): Add dependency on $(win32_low_h).
749 (win32-arm-low.o, win32-i386-low.o): New rules.
751 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
753 * hostio.c: Correct copyright year.
755 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
757 * Makefile.in (OBS): Add hostio.o.
758 (hostio.o): New rule.
759 * server.h (handle_vFile): Declare.
760 * hostio.c: New file.
761 * server.c (handle_v_requests): Take packet_len and new_packet_len
762 for binary packets. Call handle_vFile.
763 (main): Update call to handle_v_requests.
765 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
767 * linux-low.c: Include <sched.h>.
769 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
771 * linux-low.c (linux_tracefork_grandchild): New.
772 (linux_tracefork_child): Use clone.
773 (linux_test_for_tracefork): Use clone; allocate and free a stack.
775 2007-10-31 Joel Brobecker <brobecker@adacore.com>
777 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
779 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
781 * linux-low.c (handle_extended_wait): Handle unexpected signals.
783 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
785 * inferiors.c (change_inferior_id): Delete.
786 (add_pid_to_list, pull_pid_from_list): New.
787 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
788 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
789 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
790 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
791 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
792 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
793 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
794 (using_threads): Always set to 1.
795 (handle_extended_wait): New.
796 (add_process): Do not set TID.
797 (linux_create_inferior): Set must_set_ptrace_flags.
798 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
799 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
800 (linux_thread_alive): Rename TID argument to LWPID.
801 (linux_wait_for_process): Handle unknown processes. Do not use TID.
802 (linux_wait_for_event): Do not use TID or check using_threads. Update
803 call to dead_thread_notify. Call handle_extended_wait.
804 (linux_create_inferior): Use PTRACE_SETOPTIONS.
805 (send_sigstop): Delete sigstop_sent.
806 (wait_for_sigstop): Avoid TID.
807 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
808 (linux_test_for_tracefork): New.
809 (linux_lookup_signals): Use thread_db_active and
810 linux_supports_tracefork_flag.
811 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
812 * linux-low.h (get_process_thread): Avoid TID.
813 (struct process_ifo): Move thread_known and tid to the end. Remove
815 (linux_attach_lwp, thread_db_init): Update prototypes.
816 * server.h (change_inferior_id): Delete prototype.
817 (add_pid_to_list, pull_pid_from_list): New prototypes.
818 * thread-db.c (thread_db_use_events): New.
819 (find_first_thread): Rename to...
820 (find_one_thread): ...this. Update callers and messages. Do not
821 call fatal. Check thread_db_use_events. Do not call
822 change_inferior_id or new_thread_notify.
823 (maybe_attach_thread): Update. Do not call new_thread_notify.
824 (thread_db_init): Set thread_db_use_events. Check use_events.
825 * utils.c (fatal, warning): Correct message prefix.
827 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
829 * Makefile.in (clean): Remove new files.
830 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
831 (powerpc-64.o, powerpc-64.c): New rules.
832 * configure.srv: Use alternate register sets for powerpc64-*-linux*
833 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
835 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
837 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
838 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
839 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
840 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
841 (target_regsets): Add AltiVec and SPE register sets.
842 * configure.ac: Check for AltiVec and SPE.
843 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
844 (ppc_fill_vrregset, ppc_store_vrregset): New.
845 (target_regsets): Add AltiVec register set.
846 * configure: Regenerated.
848 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
850 * linux-low.c (O_LARGEFILE): Define.
851 (linux_read_memory): Use /proc/PID/mem.
852 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
853 * configure, config.in: Regenerated.
855 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
857 * linux-low.c (linux_wait_for_event): Do not pass signals while
860 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
862 * win32-low.c (create_process): New.
863 (win32_create_inferior): Use create_process instead of
864 CreateProcess. If create_process failed retry appending an ".exe"
865 suffix. Store the GetLastError result immediatelly after
866 create_process calls and use it on the call to error.
868 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
870 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
872 2007-08-23 Joel Brobecker <brobecker@adacore.com>
874 * configure.ac: Switch license to GPLv3.
876 2007-08-01 Michael Snyder <msnyder@access-company.com>
878 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
880 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
882 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
884 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
885 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
886 CloseToolhelp32Snapshot.
887 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
888 CloseToolhelp32Snapshot.
890 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
892 * server.c (main): Check for inferior exit before main loop.
894 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
896 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
897 instead of on tmp_desc.
899 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
900 Daniel Jacobowitz <dan@codesourcery.com>
902 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
903 (add_thread): Minor cleanups.
904 (clear_inferiors): Move lower in the file. Clear the DLL
906 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
907 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
908 (xml_escape_text): New.
909 * server.c (handle_query): Handle qXfer:libraries:read. Report it
911 (handle_v_cont): Report errors.
912 (gdbserver_version): Update.
913 (main): Correct size of own_buf. Do not report initial DLL events.
914 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
915 (unloaded_dll, xml_escape_text): New.
916 * win32-low.c (enum target_waitkind): Update comments.
917 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
918 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
919 (win32_EnumProcessModules, win32_GetModuleInformation)
920 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
921 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
922 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
923 (win32_Module32First, win32_Module32Next, load_toolhelp)
924 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
925 (get_child_debug_event): Handle DLL events.
926 (win32_wait): Likewise.
928 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
930 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
931 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
933 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
935 * win32-low.c (handle_output_debug_string): Ignore event if not
938 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
940 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
942 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
944 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
946 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
948 * inferiors.c (change_inferior_id): Add comment.
949 * linux-low.c (check_removed_breakpoint): Add an early
950 prototype. Improve debug output.
951 (linux_attach): Doc update.
952 (linux_detach_one_process, linux_detach): Clean up before releasing
954 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
955 * linux-low.h (struct process_info): Doc improvement.
956 * mem-break.c (delete_all_breakpoints): New.
957 * mem-break.h (delete_all_breakpoints): New prototype.
958 * thread-db.c (find_first_thread): New.
959 (thread_db_create_event): Call it instead of
960 thread_db_find_new_threads. Clean up unused variables.
961 (maybe_attach_thread): Remove first thread handling.
962 (thread_db_find_new_threads): Use find_first_thread.
963 (thread_db_get_tls_address): Likewise.
965 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
967 * thread-db.c (thread_db_find_new_threads): Add prototype.
968 (thread_db_create_event): Check for the main thread before adding
970 (maybe_attach_thread): Only enable event reporting if TID == 0.
971 (thread_db_get_tls_address): Check for new threads.
973 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
975 * linux-low.c (linux_create_inferior): Try execv before execvp.
976 * spu-low.c (spu_create_inferior): Likewise.
978 2007-06-13 Mike Frysinger <vapier@gentoo.org>
980 * linux-low.c (linux_create_inferior): Change execv to execvp.
981 * spu-low.c (spu_create_inferior): Likewies.
983 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
985 * Makefile.in (clean): Clean new files instead of deleted ones.
986 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
987 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
989 * configure.srv: Specify XML files and new regformats for MIPS and
991 * linux-mips-low.c (mips_num_regs): Set to only used registers.
992 (mips_regmap): Do not fetch $0. Remove unused registers. Add
993 an entry for the restart register.
994 (mips_cannot_fetch_register, mips_cannot_store_register)
995 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
996 register names to match the XML descriptions.
997 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
998 restart register instead of $0.
1000 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1001 Markus Deuling <deuling@de.ibm.com>
1003 * remote-utils.c (decode_xfer_write): New function.
1004 * server.h (decode_xfer_write): Add prototype.
1005 * server.c (handle_query): Add PACKET_LEN argument. Support
1006 qXfer:spu:read and qXfer:spu:write packets.
1007 (main): Pass packet_len to handle_query.
1008 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
1009 * target.h (target_ops): Add qxfer_spu.
1011 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
1013 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
1014 accessing non-seekable spufs files.
1016 2007-05-16 Markus Deuling <deuling@de.ibm.com>
1018 * server.c (handle_query): Add reply for qC packet.
1020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1021 Leo Zayas <lerele@champenstudios@com>
1023 * server.h (check_remote_input_interrupt_request): New function.
1024 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1025 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1026 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1027 (check_remote_input_interrupt_request): New function.
1028 * server.h (check_remote_input_interrupt_request): Declare.
1029 * win32-low.c (winapi_DebugBreakProcess,
1030 winapi_GenerateConsoleCtrlEvent): New typedefs.
1031 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1033 (win32_wait): Check for remote interrupt request
1034 with check_remote_input_interrupt_request.
1035 (win32_request_interrupt): New function.
1036 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1038 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1040 * win32-low.c (debug_registers_changed,
1041 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1042 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1043 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1044 (thread_rec): Get context using the low target.
1045 (child_add_thread): Call thread_added on the low target,
1046 which does the same thing.
1048 (do_initial_child_stuff): Remove debug registers references.
1049 Set context using the low target. Resume threads after
1050 setting the contexts.
1051 (child_continue): Remove dead variable. Remove debug
1052 registers references.
1053 (child_fetch_inferior_registers): Go through the low target.
1054 (do_child_store_inferior_registers): Remove.
1055 (child_store_inferior_registers): Go through the low target.
1056 (win32_resume): Remove debug registers references.
1057 Set context using the low target.
1058 (handle_exception): Change return type to void. Don't record
1059 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1060 first chance exception.
1061 (get_child_debug_event): Change return type to void. Remove
1062 goto loop. Always return after waiting for debug event.
1063 (win32_wait): Convert to switch statement. Handle spurious
1066 * win32-i386-low.c (debug_registers_changed,
1067 debug_registers_used): New.
1068 (initial_stuff): Rename to ...
1069 (i386_initial_stuff): ... this. Clear debug registers
1071 (store_debug_registers): Delete.
1072 (i386_get_thread_context): New.
1073 (load_debug_registers): Delete.
1074 (i386_set_thread_context): New.
1075 (i386_thread_added): New.
1076 (single_step): Rename to ...
1077 (i386_single_step): ... this.
1078 (do_fetch_inferior_registers): Rename to ...
1079 (i386_fetch_inferior_register): ... this.
1080 (i386_store_inferior_register): New.
1081 (the_low_target): Adapt to new interface.
1083 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1084 (arm_get_thread_context): New.
1085 (arm_set_thread_context): New.
1087 (do_fetch_inferior_registers): Rename to ...
1088 (arm_fetch_inferior_register): ... this.
1089 (arm_store_inferior_register): New.
1090 (arm_wince_breakpoint): Reimplement as unsigned long.
1091 (arm_wince_breakpoint_len): Define.
1092 (the_low_target): Adapt to new interface.
1094 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1095 load_debug_registers. Add get_thread_context, set_thread_context,
1096 thread_added and store_inferior_register. Rename
1097 fetch_inferior_registers to fetch_inferior_register.
1098 (regptr): Remove declaration.
1100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1102 * linux-low.c (linux_detach): Change return type to int. Return 0.
1103 * spu-low.c (spu_detach): Likewise.
1105 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1107 * target.h (target_ops): Change return type of detach to int.
1109 (join_inferior): New.
1110 * server.c (main): Don't skip detach support on mingw32.
1111 If the inferior doesn't support detaching return error.
1112 Call join_inferior instead of using waitpid.
1113 * linux-low.c (linux_join): New.
1114 (linux_target_op): Add linux_join.
1115 * spu-low.c (spu_join): New.
1116 (spu_target_ops): Add spu_join.
1117 * win32-low.c (win32_detach): Adapt to new interface.
1118 Reopen current_process_handle before detaching. Issue a child
1119 resume before detaching.
1121 (win32_target_op): Add win32_join.
1123 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1125 * win32-low.c (win32-attach): Fix return value.
1126 * target.h (target_ops): Describe ATTACH return values.
1128 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1130 * win32-low.c (GETPROCADDRESS): Define.
1131 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1132 (winapi_DebugSetProcessKillOnExit): Likewise.
1133 (win32_create_inferior): Force usage of ansi CreateProcessA.
1134 (win32_attach): Use GETPROCADDRESS.
1135 (win32_detach): Likewise.
1137 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1139 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1141 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1143 * win32-low.c: Commit leftover changes from 2007-03-29.
1145 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1147 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1148 fields short instead of int. Add explicit padding.
1149 (i387_cache_to_fsave): Remove unnecessary casts.
1150 (i387_fsave_to_cache): Doc fix.
1151 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1153 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1155 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1156 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1158 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1160 * configure.srv (arm*-*-mingw32ce*): Move near the other
1163 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1165 * configure.ac: Add errno checking.
1166 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1167 sys/file.h and malloc.h.
1168 (AC_CHECK_DECLS): Add perror.
1169 (srv_mingwce): Handle.
1170 * configure.srv (i[34567]86-*-cygwin*): Add
1171 win32-i386-low.o to srv_tgtobj.
1172 (i[34567]86-*-mingw*): Likewise.
1173 (arm*-*-mingw32ce*): Add case.
1174 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1175 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1176 [__MINGW32CE__] (strerror): New function.
1177 [__MINGW32CE__] (errno): Define to GetLastError.
1178 [__MINGW32CE__] (COUNTOF): New macro.
1179 (remote_open): Remove extra close call.
1180 * mem-break.c (delete_breakpoint_at): New function.
1181 * mem-break.h (delete_breakpoint_at): Declare.
1182 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1183 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1184 [USE_WIN32API] (read, write): Add char* casts.
1185 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1186 * server.h: Include wincecompat.h on Windows CE.
1187 [HAVE_ERRNO_H]: Check.
1188 (perror): Declare if not declared.
1189 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1190 (perror_with_name): Remove errno declaration.
1191 * wincecompat.h: New.
1192 * wincecompat.c: New.
1194 * win32-arm-low.c: New.
1195 * win32-i386-low.c: New.
1196 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1197 (OUTMSG2): Make it safe.
1199 (COUNTOF): New macro.
1200 (NUM_REGS): Get it from the low target.
1201 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1202 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1203 (thread_rec): Let low target handle debug registers.
1204 (child_add_thread): Likewise.
1205 (child_init_thread_list): Likewise.
1206 (continue_one_thread): Likewise.
1208 (do_child_fetch_inferior_registers): Move to ...
1209 * win32-i386-low.c: ... here, and rename to ...
1210 (do_fetch_inferior_registers): ... this.
1211 * win32-low.c (child_fetch_inferior_registers):
1212 Go through the low target.
1213 (do_child_store_inferior_registers): Use regptr.
1214 (strwinerror): New function.
1215 (win32_create_inferior): Handle Windows CE.
1216 Use strwinerror instead of strerror on Windows error
1217 codes. Add program to the error output.
1218 Don't close the main thread handle on Windows CE.
1219 (win32_attach): Use coredll.dll on Windows CE.
1220 (win32_kill): Close current process and current
1222 (win32_detach): Use coredll.dll on Windows CE.
1223 (win32_resume): Let low target handle debug registers, and
1225 (handle_exception): Add/Remove initial breakpoint. Avoid
1226 non-existant WSTOPSIG on Windows CE.
1227 (win32_read_inferior_memory): Cast to remove warning.
1228 (win32_arch_string): Go through the low target.
1229 (initialize_low): Call set_breakpoint_data with the low
1230 target's breakpoint.
1231 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1232 FOP_REGNUM, mappings): Move to ...
1233 * win32-i386-low.c: ... here.
1234 * win32-low.c (win32_thread_info): Move to ...
1235 * win32-low.h: ... here.
1236 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1237 win32-arm-low.c and wincecompat.c.
1238 (all:): Add $EXEEXT.
1239 (install-only:): Likewise.
1240 (gdbserver:): Likewise.
1241 (gdbreplay:): Likewise.
1242 * config.in: Regenerate.
1243 * configure: Regenerate.
1245 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1247 * win32-low.c: Rename typedef thread_info to
1248 win32_thread_info throughout.
1250 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1252 * win32-i386-low.c: Rename to ...
1253 * win32-low.c: ... this.
1254 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1255 * Makefile.in: Likewise.
1257 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1259 * remote-utils.c (monitor_output): Constify msg parameter.
1260 * server.h (monitor_output): Likewise.
1261 * win32-i386-low.c (handle_output_debug_string): New.
1262 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1263 handle_output_debug_string.
1264 (get_child_debug_event): Likewise.
1266 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1268 * server.c (main): Correct strtoul check.
1270 2007-03-27 Jon Ringle <jon@ringle.org>
1272 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1274 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1276 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1278 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1280 * terminal.h: Check HAVE_SGTTY_H.
1282 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1284 * remote-utils.c (remote_open): Print out the assigned port number.
1286 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1288 * remote-utils.c (monitor_output): New function.
1289 * server.c (debug_threads): Define here.
1290 (monitor_show_help): New function.
1291 (handle_query): Handle qRcmd.
1292 (main): Do not handle 'd' packet.
1293 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1294 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1297 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1299 * Makefile.in (EXEEXT): New.
1300 (clean): Use $(EXEEXT).
1302 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1304 * target.h (target_ops): Rename send_signal to request_interrupt,
1305 and remove enum target_signal parameter.
1306 * linux-low.c (linux_request_interrupt): Rename from
1307 linux_send_signal, and always send SIGINT.
1308 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1309 and always send SIGINT.
1310 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1312 (input_interrupt): Likewise.
1314 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1316 * server.c (get_features_xml): Check if target implemented
1318 * win32-i386-low.c (win32_arch_string): New.
1319 (win32_target_ops): Add win32_arch_string as arch_string member.
1321 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1323 * spu-low.c (spu_arch_string): New.
1324 (spu_target_ops): Add spu_arch_string.
1326 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1328 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1329 * configure.ac: Do not check for terminal.h.
1330 * configure, config.in: Regenerated.
1332 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1334 * Makefile.in (OBS): Add $(XML_BUILTIN).
1335 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1337 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1338 (arm-with-iwmmxt.c): New.
1339 * config.in, configure: Regenerate.
1340 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1341 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1342 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1343 (arm*-*-linux*): Add iWMMXt and regset support.
1344 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1345 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1346 (arm_store_wmmxregset, target_regsets): New.
1347 * server.c (get_features_xml): Take annex argument. Check builtin
1349 (handle_query): Handle multiple annexes.
1351 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1353 * remote-utils.c [USE_WIN32API] (read, write): Define.
1354 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1357 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1359 * linux-i386-low.c (the_low_target): Set arch_string.
1360 * linux-x86-64-low.c (the_low_target): Likewise.
1361 * linux-low.c (linux_arch_string): New.
1362 (linux_target_ops): Add it.
1363 * linux-low.h (struct linux_target_ops): Add arch_string.
1364 * server.c (write_qxfer_response): Use const void * for DATA.
1365 (get_features_xml): New.
1366 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1367 * target.h (struct target_ops): Add arch_string method.
1369 2007-01-03 Denis Pilat <denis.pilat@st.com>
1370 Daniel Jacobowitz <dan@codesourcery.com>
1372 * linux-low.c (linux_kill): Handle being called with no threads.
1373 * win32-i386-low.c (win32_kill): Likewise.
1374 (get_child_debug_event): Clear current_process_handle.
1376 2006-12-30 Denis PILAT <denis.pilat@st.com>
1377 Daniel Jacobowitz <dan@codesourcery.com>
1379 * remote-utils.c (remote_open): Check the type of specified
1380 serial port devices before opening them.
1381 * server.c (main): Kill the inferior if an error occurs during
1382 the first remote_open.
1384 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1386 * README: Update supported targets.
1388 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1390 * Makefile.in (clean): Remove reg-mips64.c.
1391 (reg-mips64.c, reg-mips64.o): New rules.
1392 * configure.srv: Handle mips64. Include regset support for mips.
1393 * linux-mips-low.c (union mips_register): New.
1394 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1395 (mips_breakpoint, mips_breakpoint_at): Use int.
1396 (mips_collect_register, mips_supply_register)
1397 (mips_collect_register_32bit, mips_supply_register_32bit)
1398 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1399 (mips_store_fpregset, target_regsets): New.
1400 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1402 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1404 * configure.srv: Add target "spu*-*-*".
1405 * Makefile.in (clean): Remove reg-spu.c.
1406 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1407 * spu-low.c: New file.
1409 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1411 * configure.ac: Correct td_thr_tls_get_addr test.
1412 * configure: Regenerated.
1414 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1416 * linux-low.c (linux_wait_for_event): Reformat. Use the
1418 * remote-utils.c (decode_address_to_semicolon): New.
1419 * server.c (pass_signals, handle_general_set): New.
1420 (handle_query): Mention QPassSignals for qSupported.
1421 (main): Call handle_general_set.
1422 * server.h (pass_signals, decode_address_to_semicolon): New.
1424 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1426 * server.c (handle_query): Correct error handling for read_auxv.
1428 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1430 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1431 and srv_linux_thread_db to yes.
1432 * linux-s390-low.c (s390_fill_gregset): New function.
1433 (target_regsets): Define data structure.
1435 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1437 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1438 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1439 * config.in, configure: Regenerated.
1440 * inferiors.c (gdb_id_to_thread): New function.
1441 (gdb_id_to_thread_id): Use it.
1442 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1443 * linux-low.h (struct process_info): Add th member.
1444 (thread_db_get_tls_address): New prototype.
1445 * remote-utils.c (decode_address): Make non-static.
1446 * server.c (handle_query): Handle qGetTLSAddr.
1447 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1448 * target.h (struct target_ops): Add get_tls_address.
1449 * thread-db.c (maybe_attach_thread): Save the thread handle.
1450 (thread_db_get_tls_address): New.
1452 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1454 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1455 (linux_resume_one_process): Take a siginfo_t *. Update all
1456 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1457 (struct pending_signals): Add a siginfo_t.
1458 (linux_wait_for_process): Always set last_status.
1459 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1460 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1461 * linux-low.h (struct process_info): Add last_status.
1463 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1465 * remote-utils.c (try_rle): New function.
1466 (putpkt_binary): Use it.
1468 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1470 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1471 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1472 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1473 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1474 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1477 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1479 * server.c (terminal_fd): New variable.
1480 (old_foreground_pgrp): Likewise.
1481 (restore_old_foreground_pgrp): New function.
1482 (start_inferior): Record the terminal file descriptor in terminal_fd
1483 and its original foreground group in old_foreground_pgrp. Register
1484 restore_old_foreground_pgrp with atexit().
1486 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1488 * server.c (handle_query): Correct qPart to qXfer.
1490 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1492 * configure.ac: Check for more headers which are missing on
1493 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1494 * configure.srv: Add Cygwin and mingw32.
1495 * remote-utils.c: Don't include headers unconditionally which
1496 are missing on mingw32. Include <winsock.h> for mingw32.
1497 (remote_open): Adjust for mingw32 support. Flush
1498 standard error after writing to it.
1499 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1500 (unblock_async_io, enable_async_io, disable_async_io)
1501 (readchar, getpkt): Update for Winsock support.
1502 (prepare_resume_reply): Expect a protocol signal number.
1503 * server.c: Disable <sys/wait.h> on mingw32.
1504 (start_inferior): Adjust for mingw32 support. Flush
1505 standard error after writing to it.
1506 (attach_inferior): Likewise. Use protocol signal
1508 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1510 * win32-i386-low.c: New file.
1511 * Makefile.in (XM_CLIBS): Set.
1512 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1513 (win32-i386-low.o): New dependency rule.
1514 * linux-low.c (linux_wait): Use target signal numbers.
1515 * target.h (struct target_ops): Doc fix.
1516 * server.h (target_signal_to_name): New prototype.
1517 * gdbreplay.c: Don't include headers unconditionally which
1518 are missing on mingw32. Include <winsock.h> for mingw32.
1519 (remote_close, remote_open): Adjust for Winsock support.
1520 * configure, config.in: Regenerated.
1522 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1524 * server.c (decode_xfer_read, write_qxfer_response): New.
1525 (handle_query): Take a packet length argument. Handle
1526 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1527 the qSupported response.
1528 (main): Update call to handle_query.
1530 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1532 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1533 (putpkt_binary): Renamed from putpkt and adjusted for binary
1535 (putpkt): New wrapper for putpkt_binary.
1536 (readchar): Don't mask off the high bit.
1537 (decode_X_packet): New function.
1538 * server.c (main): Call putpkt_binary if a handler sets the packet
1539 length. Save the length of the incoming packet. Handle 'X'.
1540 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1542 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1544 * server.c (handle_query): Handle qSupported.
1546 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1548 * remote-utils.c (all_symbols_looked_up): New variable.
1549 (look_up_one_symbol): Check it.
1550 * server.h (look_up_one_symbol): New declaration.
1551 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1553 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1555 * Makefile.in (linux-arm-low.o): Update dependencies.
1556 * linux-arm-low.c: Include "gdb_proc_service.h".
1557 (PTRACE_GET_THREAD_AREA): Define.
1558 (ps_get_thread_area): New function.
1560 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1562 * configure.srv (m68k*-*-uclinux*): New target.
1563 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1564 (linux_resume_one_process): Remove extraneous cast.
1565 (linux_read_offsets): New.
1566 (linux_target_op): Add linux_read_offsets on mmuless systems.
1567 * server.c (handle_query): Add qOffsets logic.
1568 * target.h (struct target_ops): Add read_offsets.
1570 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1572 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1573 (PTRACE_GET_THREAD_AREA): Define.
1574 (ps_get_thread_area): New function.
1575 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1576 (linux-x86-64-low.o): Update.
1578 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1580 * configure.ac: Remove checks for prfpregset_t.
1581 * gdb_proc_service.h: New file.
1582 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1583 new "gdb_proc_service.h".
1584 * proc-service.c: Likewise.
1585 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1586 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1587 * Makefile.in (gdb_proc_service_h): Updated.
1588 * configure, config.in: Regenerated.
1590 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1592 * remote-utils.c (prepare_resume_reply): Move declaration
1593 of gdb_id_from_wait to the top of the block.
1595 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1597 * linux-low.c (regsets_store_inferior_registers): Read the regset
1598 from the target before filling it.
1600 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1602 * server.c (attach_inferior): Return SIGTRAP for a successful
1605 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1607 * Makefile.in (OBS): Add version.o.
1608 (STAGESTUFF): Delete.
1609 (version.o): Add dependencies.
1610 (version.c): Replace rule.
1611 (clean): Remove version.c.
1612 * server.c (gdbserver_version): New.
1613 (gdbserver_usage): Use printf.
1614 (main): Handle --version and --help.
1615 * server.h (version, host_name): Add declarations.
1617 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1629 * linux-x86-64-low.c:
1632 * linux-ppc64-low.c:
1641 * linux-crisv32-low.c:
1653 * gdbserver.1: Add (C) after Copyright. Update the FSF
1656 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1658 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1659 (arm_breakpoint_at): Recognize both breakpoints.
1660 (the_low_target): Use the correct breakpoint instruction.
1662 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1664 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1665 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1666 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1667 (the_low_target): Update.
1669 2005-10-25 Andreas Schwab <schwab@suse.de>
1671 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1673 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1674 (ia64_num_regs): Reduce to 462.
1676 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1678 * acinclude.m4: Correct quoting.
1679 * aclocal.m4: Regenerated.
1681 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1682 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1683 (thread_db_init): Call thread_db_err_str.
1684 * configure.ac: Check for TD_VERSION.
1685 * config.in, configure: Regenerated.
1687 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1689 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1691 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1693 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1694 is not available. Define HAVE_PTRACE_GETREGS if it is.
1695 * config.in, configure: Regenerated.
1696 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1697 * linux-i386-low.c, linux-m68k-low.c: Update to use
1698 HAVE_PTRACE_GETREGS.
1699 * linux-low.c (regsets_fetch_inferior_registers)
1700 (regsets_store_inferior_registers): Only return 0 if we processed
1702 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1703 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1705 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1707 * inferiors.c (struct thread_info): Add gdb_id.
1708 (add_thread): Add gdb_id argument.
1709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1710 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1711 calls to add_thread.
1712 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1713 * server.c (handle_query): Use thread_to_gdb_id.
1714 (handle_v_cont, main): Use gdb_id_to_thread_id.
1715 * server.h (add_thread): Update prototype.
1716 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1719 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1721 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1722 left-padded registers.
1723 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1724 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1726 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1728 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1729 * configure: Regenerate.
1730 * config.in: Regenerate.
1731 * server.h (NEED_DECLARATION_STRERROR):
1732 Replace with !HAVE_DECL_STRERROR.
1734 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1736 * linux-low.c (linux_wait, linux_send_signal): Don't test
1737 an unsigned long variable for > 0 if it could be MAX_ULONG.
1738 * server.c (myresume): Likewise.
1739 * target.c (set_desired_inferior): Likewise.
1741 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1743 * configure.ac: Simplify and improve check for socklen_t.
1744 * configure, config.in: Regenerate.
1746 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1748 * acconfig.h: Remove.
1749 * configure.ac: Add a test for socklen_t. Use three-argument
1750 AC_DEFINE throughout.
1751 * config.in: Regenerated using autoheader 2.59.
1752 * configure: Regenerated.
1754 * gdbreplay.c (socklen_t): Provide a default.
1755 (remote_open): Use socklen_t.
1756 * remote-utils.c (socklen_t): Provide a default.
1757 (remote_open): Use socklen_t.
1758 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1761 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1763 * linux-low.c (linux_read_memory, linux_write_memory)
1764 (linux_read_auxv): Likewise.
1765 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1766 (check_mem_write): Likewise.
1767 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1769 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1770 (registers_from_string, register_data): Likewise.
1771 * server.c (handle_query, main): Likewise.
1772 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1773 (decode_M_packet): Likewise.
1774 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1775 * target.h (struct target_ops): Update read_memory, write_memory,
1777 (read_inferior_memory, write_inferior_memory): Update.
1778 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1780 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1781 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1782 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1783 linux-s390-low.c, linux-sh-low.c: Update for changes in
1784 read_inferior_memory and the_low_target->breakpoint.
1786 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1788 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1789 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1790 * configure.srv: Add powerpc64-*-linux*.
1791 * linux-ppc64-low.c: New file.
1793 2005-05-23 Orjan Friberg <orjanf@axis.com>
1795 * linux-cris-low.c: New file with support for CRIS.
1796 * linux-crisv32-low.c: Ditto for CRISv32.
1797 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1798 (clean): Add reg-cris.c and reg-crisv32.c.
1799 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1800 reg-crisv32.o, and reg-crisv32.c to make rules.
1801 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1804 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1806 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1807 of sizeof (PTRACE_XFER_TYPE).
1808 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1810 2005-05-12 Orjan Friberg <orjanf@axis.com>
1812 * target.h (struct target_ops): Add insert_watchpoint,
1813 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1814 pointers for hardware watchpoint support.
1815 * linux-low.h (struct linux_target_ops): Ditto.
1816 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1817 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1818 to linux_target_ops.
1819 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1821 * server.c (main): Recognize 'Z' and 'z' packets.
1823 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1825 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1826 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1827 (the_low_target): Add new members.
1829 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1831 * proc-service.c (ps_lgetregs): Search all_processes instead of
1834 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1836 * server.c (start_inferior): Change return type to int.
1837 (attach_inferior): Change sigptr to int *.
1838 (handle_v_cont, handle_v_requests): Change signal to int *.
1839 (main): Change signal to int.
1841 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1843 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1844 * configure.srv: Add m32r*-*-linux*.
1845 * linux-m32r-low.c: New file.
1847 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1849 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1851 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1853 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1854 Take unsigned long arguments for PIDs.
1855 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1856 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1857 (wait_for_sigstop, linux_resume_one_process)
1858 (regsets_fetch_inferior_registers, linux_send_signal)
1859 (linux_read_auxv): Likewise. Update the types of variables holding
1860 PIDs. Update format string specifiers.
1861 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1862 * remote-utils.c (prepare_resume_reply): Likewise.
1863 * server.c (cont_thread, general_thread, step_thread)
1864 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1866 (handle_query): Update format specifiers.
1867 (handle_v_cont, main): Use strtoul for thread IDs.
1868 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1869 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1870 (general_thread, step_thread, thread_from_wait)
1871 (old_thread_from_wait): Update.
1872 * target.h (struct thread_resume): Use unsigned long for THREAD.
1873 (struct target_ops): Use unsigned long for arguments to attach and
1876 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1878 * acinclude.m4: Include bfd/bfd.m4 directly.
1879 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1880 <agriffis@toolchain.org>.
1881 * aclocal.m4, configure: Regenerated.
1883 2005-01-07 Andrew Cagney <cagney@gnu.org>
1885 * configure.ac: Rename configure.in, require autoconf 2.59.
1886 * configure: Re-generate.
1888 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1890 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1892 * aclocal.m4: Regenerated.
1893 * configure: Regenerated.
1895 2004-11-21 Andreas Schwab <schwab@suse.de>
1897 * linux-m68k-low.c (m68k_num_gregs): Define.
1898 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1899 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1900 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1901 (m68k_breakpoint_at): New. Add to the_low_target.
1903 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1904 srv_linux_thread_db to yes.
1906 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1908 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1909 (ARCH_SET_FS): Likewise.
1910 (ARCH_GET_FS): Likewise.
1911 (ARCH_GET_GS): Likewise.
1913 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1915 * linux-i386-low.c (ps_get_thread_area): New.
1916 * linux-x86-64-low.c (ps_get_thread_area): New.
1917 * linux-low.c: Include <sys/syscall.h>.
1918 (linux_kill_one_process): Don't kill the first thread here.
1919 (linux_kill): Kill the first thread here.
1920 (kill_lwp): New function.
1921 (send_sigstop, linux_send_signal): Use it.
1922 * proc-service.c: Clean up #ifdefs.
1923 (fpregset_info): Delete.
1924 (ps_lgetregs): Update and enable implementation.
1925 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1927 * remote-utils.c (struct sym_cache, symbol_cache): New.
1928 (input_interrupt): Print a clearer message.
1929 (async_io_enabled): New variable.
1930 (enable_async_io, disable_async_io): Use it. Update comments.
1931 (look_up_one_symbol): Use the symbol cache.
1932 * thread-db.c (thread_db_look_up_symbols): New function.
1933 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1935 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1937 * configure.in: Test for -rdynamic.
1938 * configure: Regenerated.
1939 * Makefile (INTERNAL_LDFLAGS): New.
1940 (gdbserver, gdbreplay): Use it.
1942 2004-09-02 Andrew Cagney <cagney@gnu.org>
1944 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1946 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1948 * linux-low.c (linux_wait): Clear all_processes list also.
1950 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1952 * linux-low.c: Include <errno.h>. Remove extern declaration of
1955 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1957 * gdbreplay.c, server.h, utils.c: Update copyright years.
1959 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1961 * server.c (main): Print child status or termination signal from
1962 variable 'signal', not 'sig'.
1964 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1966 * linux-low.c (linux_read_memory): Change return type to
1967 int. Check for and return error from ptrace().
1968 * target.c (read_inferior_memory): Change return type to int. Pass
1969 back return status from the_target->read_memory().
1970 * target.h (struct target_ops): Adapt *read_memory() prototype.
1972 (read_inferior_memory): Adapt prototype.
1973 * server.c (main): Return an error packet if
1974 read_inferior_memory() returns an error.
1976 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1978 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1979 Unify with other clean targets.
1981 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1983 * server.c (handle_v_cont): Call set_desired_inferior.
1985 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1987 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1989 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1991 * linux-low.c (linux_wait): Unblock async I/O.
1992 (linux_resume): Block and enable async I/O.
1993 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1994 * server.h (block_async_io, unblock_async_io): Add prototypes.
1996 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1998 * remote-utils.c (remote_open): Print a status notice after
2000 * server.c (attach_inferior): Print a status notice after
2003 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
2005 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
2007 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
2009 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
2011 * server.c, target.h: Update copyright years.
2013 2004-02-25 Roland McGrath <roland@redhat.com>
2015 * target.h (struct target_ops): New member `read_auxv'.
2016 * server.c (handle_query): Handle qPart:auxv:read: query using that.
2017 * linux-low.c (linux_read_auxv): New function.
2018 (linux_target_ops): Initialize `read_auxv' member to that.
2020 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2022 Committed by Jim Blandy <jimb@redhat.com>.
2024 * linux-s390-low.c (s390_num_regs): Update.
2025 (s390_regmap): Remove control registers. Use __s390x__ predefine
2026 instead of GPR_SIZE to distiguish s390 and s390x targets.
2028 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2030 * linux-low.c: Update copyright year.
2031 (check_removed_breakpoint): Clear pending_is_breakpoint.
2032 (linux_set_resume_request, linux_queue_one_thread)
2033 (resume_status_pending_p): New functions.
2034 (linux_continue_one_thread): Use process->resume.
2035 (linux_resume): Only resume threads if there are no pending events.
2036 * linux-low.h (struct process_info): Add resume request
2039 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2041 * regcache.c (new_register_cache): Clear the allocated register
2042 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2044 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2046 * linux-low.c (linux_resume): Take a struct thread_resume *
2048 (linux_wait): Update call.
2049 (resume_ptr): New static variable.
2050 (linux_continue_one_thread): Renamed from
2051 linux_continue_one_process. Use resume_ptr.
2052 (linux_resume): Use linux_continue_one_thread.
2053 * server.c (handle_v_cont, handle_v_requests): New functions.
2054 (myresume): New function.
2055 (main): Handle 'v' case.
2056 * target.h (struct thread_resume): New type.
2057 (struct target_ops): Change argument of "resume" to struct
2059 (myresume): Delete macro.
2061 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2063 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2064 (uninstall): Support DESTDIR.
2066 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2068 * configure.srv: Add xscale*linux copy of arm*linux entry.
2070 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2072 * linux-arm-low.c (arm_reinsert_addr): New function.
2073 (the_low_target): Add arm_reinsert_addr.
2075 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2077 * mem-break.c: Remove whitespace at end of file.
2079 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2081 * configure.in: Check whether we need to prototype strerror.
2082 * server.h: Optionally prototype strerror.
2083 * gdbreplay.c (perror_with_name): Use strerror.
2084 * linux-low.c (linux_attach_lwp): Use strerror.
2085 * utils.c (perror_with_name): Use strerror.
2086 * config.in, configure: Regenerated.
2088 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2090 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2091 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2093 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2095 * Makefile.in (SFILES): Update.
2096 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2097 low-sun3.c: Remove files.
2099 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2101 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2102 (linux_detach_one_process, linux_detach): New functions.
2103 (linux_target_ops): Add linux_detach.
2104 * server.c (main): Handle 'D' packet.
2105 * target.h (struct target_ops): Add "detach" member.
2106 (detach_inferior): Define.
2108 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2110 From Kelley Cook <kelleycook@wideopenwest.com>:
2111 * configure.srv: Accept i[34567]86 variants.
2113 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2115 * linux-low.c (linux_wait_for_event): Correct comment typos.
2116 (linux_resume_one_process): Call check_removed_breakpoint.
2117 (linux_send_signal): New function.
2118 (linux_target_ops): Add linux_send_signal.
2119 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2121 * target.h (struct target_ops): Add send_signal.
2123 2003-05-29 Jim Blandy <jimb@redhat.com>
2125 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2126 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2127 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2128 away part of the register's value.
2130 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2132 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2133 (linux_wait_for_event, linux_init_signals): Likewise.
2135 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2137 * configure.in: Check for stdlib.h.
2138 * configure: Regenerated.
2139 * config.in: Regenerated.
2141 2003-01-04 Andreas Schwab <schwab@suse.de>
2143 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2145 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2147 * Makefile.in: Remove obsolete code.
2149 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2151 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2152 defined(PT_FPR0_HI).
2154 2002-11-17 Stuart Hughes <seh@zee2.com>
2156 * linux-arm-low.c (arm_num_regs): Increase.
2157 (arm_regmap): Include status register.
2159 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2161 * linux-low.c (register_addr): Remove incorrect -1 check.
2163 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2165 * linux-low.c (linux_create_inferior): Call setpgid. Return
2167 (unstopped_p, linux_signal_pid): Remove.
2168 (linux_target_ops): Remove linux_signal_pid.
2169 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2170 global instead of target method.
2171 * target.h (struct target_ops): Remove signal_pid. Update comment
2172 for create_inferior.
2173 * server.c (signal_pid): New variable.
2174 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2175 gdbserver. Set the child to be the foreground process group.
2176 (attach_inferior): Set signal_pid.
2178 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2180 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2182 2002-08-20 Jim Blandy <jimb@redhat.com>
2184 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2187 2002-08-01 Andrew Cagney <cagney@redhat.com>
2189 * Makefile.in: Make chill references obsolete.
2191 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2193 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2194 * configure: Regenerate.
2195 * config.in: Regenerate.
2197 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2199 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2200 (perror_with_name, remote_close, remote_open, expect, play): Static.
2202 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2204 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2205 byte offsets instead of an array of indexes.
2206 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2208 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2210 * regcache.c: Add comment.
2212 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2214 * thread-db.c: New file.
2215 * proc-service.c: New file.
2216 * acinclude.m4: New file.
2217 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2218 proc-service.o, and thread-db.o.
2219 (linux-low.o): Add USE_THREAD_DB.
2220 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2221 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2222 * aclocal.m4: Regenerated.
2223 * config.in: Regenerated.
2224 * configure: Regenerated.
2225 * configure.in: Check for proc_service.h, sys/procfs.h,
2226 thread_db.h, and linux/elf.h headrs.
2227 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2228 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2229 Check for -lthread_db and thread support.
2230 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2231 PowerPC, and SuperH.
2232 * i387-fp.c: Constify arguments.
2233 * i387-fp.h: Likewise.
2234 * inferiors.c: (struct thread_info): Renamed from
2235 `struct inferior_info'. Remove PID member. Use generic inferior
2236 list header. All uses updated.
2237 (inferiors, signal_pid): Removed.
2238 (all_threads): New variable.
2239 (get_thread): Define.
2240 (add_inferior_to_list): New function.
2241 (for_each_inferior): New function.
2242 (change_inferior_id): New function.
2243 (add_inferior): Removed.
2244 (remove_inferior): New function.
2245 (add_thread): New function.
2246 (free_one_thread): New function.
2247 (remove_thread): New function.
2248 (clear_inferiors): Use for_each_inferior and free_one_thread.
2249 (find_inferior): New function.
2250 (find_inferior_id): New function.
2251 (inferior_target_data): Update argument type.
2252 (set_inferior_target_data): Likewise.
2253 (inferior_regcache_data): Likewise.
2254 (set_inferior_regcache_data): Likewise.
2255 * linux-low.c (linux_bp_reinsert): Remove.
2256 (all_processes, stopping_threads, using_thrads)
2257 (struct pending_signals, debug_threads, pid_of): New.
2258 (inferior_pid): Replace with macro.
2259 (struct inferior_linux_data): Remove.
2260 (get_stop_pc, add_process): New functions.
2261 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2262 Use add_process and add_thread.
2263 (linux_attach_lwp): New function, based on old linux_attach. Use
2264 add_process and add_thread. Set stop_expected for new threads.
2265 (linux_attach): New function.
2266 (linux_kill_one_process): New function.
2267 (linux_kill): Kill all LWPs.
2268 (linux_thread_alive): Use find_inferior_id.
2269 (check_removed_breakpoints, status_pending_p): New functions.
2270 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2271 Update. Use WNOHANG. Wait for cloned processes also. Update process
2272 struct for the found process.
2273 (linux_wait_for_event): New function.
2274 (linux_wait): Use it. Support LWPs.
2275 (send_sigstop, wait_for_sigstop, stop_all_processes)
2276 (linux_resume_one_process, linux_continue_one_process): New functions.
2277 (linux_resume): Support LWPs.
2278 (REGISTER_RAW_SIZE): Remove.
2279 (fetch_register): Use register_size instead. Call supply_register.
2280 (usr_store_inferior_registers): Likewise. Call collect_register.
2282 (regsets_fetch_inferior_registers): Improve error message.
2283 (regsets_store_inferior_registers): Add debugging.
2284 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2285 (unstopped_p, linux_signal_pid): New functions.
2286 (linux_target_ops): Add linux_signal_pid.
2287 (linux_init_signals): New function.
2288 (initialize_low): Call it. Initialize using_threads.
2289 * regcache.c (inferior_regcache_data): Add valid
2291 (get_regcache): Fetch registers lazily. Add fetch argument
2292 and update all callers.
2293 (regcache_invalidate_one, regcache_invalidate): New
2295 (new_register_cache): Renamed from create_register_cache.
2296 Return the new regcache.
2297 (free_register_cache): Change argument to a void *.
2298 (registers_to_string, registers_from_string): Call get_regcache
2299 with fetch flag set.
2300 (register_data): Make static. Pass fetch flag to get_regcache.
2301 (supply_register): Call get_regcache with fetch flag clear.
2302 (collect_register): Call get_regcache with fetch flag set.
2303 (collect_register_as_string): New function.
2304 * regcache.h: Update.
2305 * remote-utils.c (putpkt): Flush after debug output and use
2307 Handle input interrupts while waiting for an ACK.
2308 (input_interrupt): Use signal_pid method.
2309 (getpkt): Flush after debug output and use stderr.
2310 (outreg): Use collect_register_as_string.
2311 (new_thread_notify, dead_thread_notify): New functions.
2312 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2314 (look_up_one_symbol): Flush after debug output.
2315 * server.c (step_thread, server_waiting): New variables.
2316 (start_inferior): Don't use signal_pid. Update call to mywait.
2317 (attach_inferior): Update call to mywait.
2318 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2319 (main): Don't fetch/store registers explicitly. Use
2320 set_desired_inferior. Support proposed ``Hs'' packet. Update
2323 (struct inferior_list, struct_inferior_list_entry): New.
2324 * target.c (set_desired_inferior): New.
2325 (write_inferior_memory): Constify.
2326 (mywait): New function.
2328 (struct target_ops): New signal_pid method.
2329 (mywait): Removed macro, added prototype.
2331 * linux-low.h (regset_func): Removed.
2332 (regset_fill_func, regset_store_func): New.
2333 (enum regset_type): New.
2334 (struct regset_info): Add type field. Use new operation types.
2335 (struct linux_target_ops): stop_pc renamed to get_pc.
2336 Add decr_pc_after_break and breakpoint_at.
2337 (get_process, get_thread_proess, get_process_thread)
2338 (strut process_info, all_processes, linux_attach_lwp)
2339 (thread_db_init): New.
2341 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2342 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2343 (the_low_target): Add new members.
2344 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2345 (i386_store_fpxregset): Constify.
2346 (target_regsets): Add new kind identifier.
2347 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2348 (i386_set_pc): Add debugging.
2349 (i386_breakpoint_at): New function.
2350 (the_low_target): Add new members.
2351 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2352 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2353 (mips_breakpoint_at): New.
2354 (the_low_target): Add new members.
2355 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2356 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2357 (the_low_target): Add new members.
2358 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2359 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2360 (the_low_target): Add new members.
2361 * linux-x86-64-low.c (target_regsets): Add new kind
2364 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2366 From Martin Pool <mbp@samba.org>:
2367 * server.c (gdbserver_usage): New function.
2370 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2372 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2375 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2377 * Makefile.in: Remove obsolete code.
2379 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2381 * linux-low.c (regsets_fetch_inferior_registers),
2382 (regsets_store_inferior_registers): Removed cast to int from
2384 * regcache.h: Added declaration of struct inferior_info.
2386 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2388 * inferiors.c (struct inferior_info): Add regcache_data.
2389 (add_inferior): Call create_register_cache.
2390 (clear_inferiors): Call free_register_cache.
2391 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2392 * regcache.c (struct inferior_regcache_data): New.
2393 (registers): Remove.
2394 (get_regcache): New function.
2395 (create_register_cache, free_register_cache): New functions.
2396 (set_register_cache): Don't initialize the register cache here.
2397 (registers_to_string, registers_from_string, register_data): Call
2399 * regcache.h: Add prototypes.
2400 * server.h: Likewise.
2402 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2404 * mem-break.c: New file.
2405 * mem-break.h: New file.
2406 * Makefile.in: Add mem-break.o rule; update server.h
2408 * inferiors.c (struct inferior_info): Add target_data
2410 (clear_inferiors): Free target_data member if set.
2411 (inferior_target_data, set_inferior_target_data): New functions.
2412 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2413 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2414 * linux-low.c (linux_bp_reinsert): New variable.
2415 (struct inferior_linux_data): New.
2416 (linux_create_inferior): Use set_inferior_target_data.
2417 (linux_attach): Likewise. Call add_inferior.
2418 (linux_wait_for_one_inferior): New function.
2419 (linux_wait): Call it.
2420 (linux_write_memory): Add const.
2421 (initialize_low): Call set_breakpoint_data.
2422 * linux-low.h (struct linux_target_ops): Add breakpoint
2424 * server.c (attach_inferior): Remove extra add_inferior
2426 * server.h: Include mem-break.h. Update inferior.c
2428 * target.c (read_inferior_memory)
2429 (write_inferior_memory): New functions.
2430 * target.h (read_inferior_memory)
2431 (write_inferior_memory): Change macros to prototypes.
2432 (struct target_ops): Update comments. Add const to write_memory
2435 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2437 * linux-low.c (usr_store_inferior_registers): Support
2438 registers which are allowed to fail to store.
2439 * linux-low.h (linux_target_ops): Likewise.
2440 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2441 (ppc_cannot_store_register): FPSCR may not be storable.
2443 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2445 * server.h: Include <string.h> if HAVE_STRING_H.
2446 * ChangeLog: Correct paths in last ChangeLog entry.
2448 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2450 * linux-low.h: Remove obsolete prototypes.
2451 (struct linux_target_ops): New.
2452 (extern the_low_target): New.
2453 * linux-low.c (num_regs, regmap): Remove declarations.
2454 (register_addr): Use the_low_target explicitly.
2455 (fetch_register): Likewise.
2456 (usr_fetch_inferior_registers): Likewise.
2457 (usr_store_inferior_registers): Likewise.
2458 * linux-arm-low.c (num_regs): Remove.
2459 (arm_num_regs): Define.
2460 (arm_regmap): Renamed from regmap, made static.
2461 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2463 (arm_cannot_store_register): Renamed from cannot_store_register,
2465 (the_low_target): New.
2466 * linux-i386-low.c (num_regs): Remove.
2467 (i386_num_regs): Define.
2468 (i386_regmap): Renamed from regmap, made static.
2469 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2471 (i386_cannot_store_register): Renamed from cannot_store_register,
2473 (the_low_target): New.
2474 * linux-ia64-low.c (num_regs): Remove.
2475 (ia64_num_regs): Define.
2476 (ia64_regmap): Renamed from regmap, made static.
2477 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2479 (ia64_cannot_store_register): Renamed from cannot_store_register,
2481 (the_low_target): New.
2482 * linux-m68k-low.c (num_regs): Remove.
2483 (m68k_num_regs): Define.
2484 (m68k_regmap): Renamed from regmap, made static.
2485 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2487 (m68k_cannot_store_register): Renamed from cannot_store_register,
2489 (the_low_target): New.
2490 * linux-mips-low.c (num_regs): Remove.
2491 (mips_num_regs): Define.
2492 (mips_regmap): Renamed from regmap, made static.
2493 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2495 (mips_cannot_store_register): Renamed from cannot_store_register,
2497 (the_low_target): New.
2498 * linux-ppc-low.c (num_regs): Remove.
2499 (ppc_num_regs): Define.
2500 (ppc_regmap): Renamed from regmap, made static.
2501 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2503 (ppc_cannot_store_register): Renamed from cannot_store_register,
2505 (the_low_target): New.
2506 * linux-s390-low.c (num_regs): Remove.
2507 (s390_num_regs): Define.
2508 (s390_regmap): Renamed from regmap, made static.
2509 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2511 (s390_cannot_store_register): Renamed from cannot_store_register,
2513 (the_low_target): New.
2514 * linux-sh-low.c (num_regs): Remove.
2515 (sh_num_regs): Define.
2516 (sh_regmap): Renamed from regmap, made static.
2517 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2519 (sh_cannot_store_register): Renamed from cannot_store_register,
2521 (the_low_target): New.
2522 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2523 (the_low_target): New.
2525 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2527 * Makefile.in: Add stamp-h target.
2528 * configure.in: Create stamp-h.
2529 * configure: Regenerated.
2531 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2533 * inferiors.c: New file.
2534 * target.c: New file.
2535 * target.h: New file.
2536 * Makefile.in: Add target.o and inferiors.o. Update
2538 * linux-low.c (inferior_pid): New static variable,
2539 moved from server.c.
2540 (linux_create_inferior): Renamed from create_inferior.
2541 Call add_inferior. Return 0 on success instead of a PID.
2542 (linux_attach): Renamed from myattach.
2543 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2544 (linux_thread_alive): Renamed from mythread_alive.
2545 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2547 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2548 (regsets_store_inferior_registers): Correct error message.
2549 Add missing ``return 0''.
2550 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2551 (linux_store_registers): Renamed from store_inferior_registers.
2552 (linux_read_memory): Renamed from read_inferior_memory.
2553 (linux_write_memory): Renamed from write_inferior_memory.
2554 (linux_target_ops): New structure.
2555 (initialize_low): Call set_target_ops ().
2556 * remote-utils.c (unhexify): New function.
2557 (hexify): New function.
2558 (input_interrupt): Send signals to ``signal_pid''.
2559 * server.c (inferior_pid): Remove.
2560 (start_inferior): Update create_inferior call.
2561 (attach_inferior): Call add_inferior.
2562 (handle_query): New function.
2563 (main): Call handle_query for `q' packets.
2564 * server.h: Include "target.h". Remove obsolete prototypes.
2565 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2567 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2569 * Makefile.in: Add WARN_CFLAGS. Update configury
2571 * configure.in: Check for <string.h>
2572 * configure: Regenerate.
2573 * config.in: Regenerate.
2574 * gdbreplay.c: Include needed system headers.
2575 (remote_open): Remove strchr prototype.
2576 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2577 * regcache.c (supply_register): Change buf argument to const void *.
2578 (supply_register_by_name): Likewise.
2579 (collect_register): Change buf argument to void *.
2580 (collect_register_by_name): Likewise.
2581 * regcache.h: Add missing prototypes.
2582 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2583 * server.c (handle_query): New function.
2584 (attached): New static variable, moved out of main.
2585 (main): Quiet longjmp clobber warnings.
2586 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2587 * utils.c (error): Remove NORETURN.