1 2008-12-12 Doug Evans <dje@google.com>
3 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
6 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8 2008-12-09 Doug Evans <dje@google.com>
10 * linux-low.h (struct process_info): Delete member tid, unused.
11 * thread-db.c (find_one_thread): Update.
12 (maybe_attach_thread): Update.
14 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16 * target.h (struct target_ops): Add qxfer_osdata member.
17 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19 (linux_qxfer_osdata): New functions.
20 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
22 * server.c (handle_query): Handle "qXfer:osdata:read:".
23 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
24 (buffer_xml_printf): New functions.
25 * server.h (struct buffer): New.
26 (buffer_grow_str, buffer_grow_str0): New macros.
27 (buffer_grow, buffer_free, buffer_init, buffer_finish)
28 (buffer_xml_printf): Declare.
30 2008-11-24 Doug Evans <dje@google.com>
32 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
34 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
36 * server.c (handle_v_run): Always use the supplied argument list.
38 2008-11-19 Bob Wilson <bob.wilson@acm.org>
40 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
41 (xtensa_regmap_table): Add entry for scompare1.
43 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
45 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
46 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
47 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
48 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
49 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
50 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
51 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
52 XML target descriptions.
53 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
54 when inferior is running on an ISA 2.05 or later processor. Add
55 special case to return offset for full 64-bit slot of FPSCR when
58 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
60 * Makefile.in (SFILES, clean): Added sparc64 files.
61 (reg-sparc64.o, reg-sparc64.c): New.
62 * configure.srv (sparc*-*-linux*): New configuration.
63 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
64 syscall arguments for SPARC.
65 (regsets_store_inferior_registers): Likewise.
66 * linux-sparc-low.c: New file.
68 2008-10-21 Doug Evans <dje@google.com>
70 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
71 (READLINE_DIR,READLINE_DEP): Delete.
72 (INTERNAL_CFLAGS): Update.
75 2008-10-10 Pedro Alves <pedro@codesourcery.com>
77 * server.c (handle_v_run): If GDB didn't specify an argv, use the
78 whole argv from the last run, not just argv[0].
80 2008-09-08 Pedro Alves <pedro@codesourcery.com>
82 * regcache.c (new_register_cache): Return NULL if the register
83 cache size isn't known yet.
84 (free_register_cache): Avoid dereferencing a NULL regcache.
86 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
88 * configure.srv: Merge MIPS and MIPS64.
90 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
92 * Makefile.in (uninstall): Apply $(EXEEXT) too.
94 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
96 * Makefile.in: Add required vsx dependencies.
98 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
99 Declare init_registers_powerpc_vsx32l.
100 Declare init_registers_powerpc_vsx64l.
101 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
102 (ppc_arch_setup): Check for VSX in hwcap.
103 (ppc_fill_vsxregset): New function.
104 (ppc_store_vsxregset): New function.
105 Add new VSX entry in regset_info target_regsets.
107 * configure.srv: Add new VSX dependencies.
109 2008-08-12 Pedro Alves <pedro@codesourcery.com>
111 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
112 (remote_open): Set or clear transport_is_reliable.
113 (putpkt_binary): Don't expect acks in noack mode.
114 (getpkt): Don't send ack/nac in noack mode.
115 * server.c (handle_general_set): Handle QStartNoAckMode.
116 (handle_query): If connected by tcp pass QStartNoAckMode+ in
118 (main): Reset noack_mode on every connection.
119 * server.h (noack_mode): Declare.
121 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
123 * Makefile.in (GDBREPLAY_OBS): New variable.
124 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
126 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
127 Daniel Jacobowitz <dan@codesourcery.com>
129 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
130 (usr_store_inferior_registers): Likewise.
131 (regsets_store_inferior_registers): Likewise.
133 2008-07-31 Rolf Jansen <rj@surtec.com>
134 Pedro Alves <pedro@codesourcery.com>
136 * configure.ac: Check for memmem declaration.
137 * server.c [HAVE_MALLOC_H]: Include malloc.h.
138 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
139 (disable_packet_qfThreadInfo): Unconditionally compile.
140 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
141 * configure, config.in: Regenerate.
143 2008-07-28 Doug Kwan <dougkwan@google.com>
145 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
146 (linux_write_memory): Remove declaration of errno.
148 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
150 * linux-low.c (handle_extended_wait): Do not use "status"
151 variable uninitialized.
153 2008-07-07 Pedro Alves <pedro@codesourcery.com>
155 * server.c (handle_v_attach): Inhibit reporting dll changes.
157 2008-06-27 Pedro Alves <pedro@codesourcery.com>
159 * remote-utils.c (prepare_resume_reply): If requested, don't
160 output "thread:TID" in the T stop reply.
162 * server.c (disable_packet_vCont, disable_packet_Tthread)
163 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
164 (handle_query): If requested, disable support for qC, qfThreadInfo
166 (handle_v_requests): If requested, disable support for vCont.
167 (gdbserver_show_disableable): New.
168 (main): Handle --disable-packet and --disable-packet=LIST.
170 * server.h (disable_packet_vCont, disable_packet_Tthread)
171 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
173 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
175 * server.c (gdbserver_usage): Mention --version.
177 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
179 * Makefile.in (gdbreplay.o): New rule.
181 2008-06-06 Joseph Myers <joseph@codesourcery.com>
183 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
184 message, not gdbserver.
186 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
187 Nathan Sidwell <nathan@codesourcery.com>
188 Joseph Myers <joseph@codesourcery.com>
190 * acinclude.m4: Include ../../config/acx.m4.
191 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
192 * configure, config.in: Regenerate.
193 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
194 * server.c (gdbserver_version): Print PKGVERSION.
195 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
196 (main): Adjust gdbserver_usage calls.
197 * gdbreplay.c (version, host_name): Add declarations.
198 (gdbreplay_version, gdbreplay_usage): New.
199 (main): Accept --version and --help options.
201 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
203 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
204 (arm_breakpoint_at): Handle Thumb.
205 (the_low_target): Add comment.
207 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
209 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
211 2008-05-09 Doug Evans <dje@google.com>
213 * server.h (decode_search_memory_packet): Declare.
214 * remote-utils.c (decode_search_memory_packet): New fn.
215 * server.c (handle_search_memory_1): New fn.
216 (handle_search_memory): New fn.
217 (handle_query): Process qSearch:memory packets.
219 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
221 * regcache.c (registers_length): Remove.
222 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
223 full register packet.
224 * regcache.h (registers_length): Remove prototype.
225 * server.h (PBUFSIZ): Define to 16384.
227 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
229 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
230 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
231 powerpc-64l.o, and powerpc-altivec64l.o.
232 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
233 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
234 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
235 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
236 rs6000/power-linux.xml, and rs6000/power64-linux.xml
239 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
240 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
241 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
242 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
243 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
244 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
245 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
246 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
247 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
248 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
251 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
252 (init_registers_powerpc_32l): ... this new prototype.
253 (init_registers_powerpc_32): Remove, replace by ...
254 (init_registers_powerpc_altivec32l): ... this new prototype.
255 (init_registers_powerpc_e500): Remove, replace by ...
256 (init_registers_powerpc_e500l): ... this new prototype.
257 (init_registers_ppc64): Remove, replace by ...
258 (init_registers_powerpc_64l): ... this new prototype.
259 (init_registers_powerpc_64): Remove, replace by ...
260 (init_registers_powerpc_altivec64l): ... this new prototype.
261 (ppc_num_regs): Set to 73.
262 (PT_ORIG_R3, PT_TRAP): Define if necessary.
263 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
264 (ppc_cannot_store_register): Handle orig_r3 and trap.
265 (ppc_arch_setup): Update init_registers_... calls.
266 (ppc_fill_gregset): Handle orig_r3 and trap.
268 * inferiors.c (clear_inferiors): Reset current_inferior.
270 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
272 * acinclude.m4: Add override.m4.
273 * configure: Regenerate.
275 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
277 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
278 initial call to init_register_ppc64.
280 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
282 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
283 powerpc*-*-linux* case.
284 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
286 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
288 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
289 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
291 * linux-ppc-low.c: Include <elf.h>.
292 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
293 (ppc_hwcap): New global variable.
294 (ppc_regmap): Remove __SPE__ #ifdef sections.
295 (ppc_regmap_e500): New global variable.
296 (ppc_cannot_store_register): Update __SPE__ special case.
297 (ppc_get_hwcap): New function.
298 (ppc_arch_setup): Use it to determine whether inferior supports
299 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
300 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
301 Do not access registers if target does not support AltiVec.
302 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
303 Do not access registers if target does not support SPE.
304 (target_regsets): Unconditionally include AltiVec and SPE regsets.
306 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
308 * linux-low.c (disabled_regsets, num_regsets): New.
309 (use_regsets_p): Delete.
310 (linux_wait_for_process): Clear disabled_regsets.
311 (regsets_fetch_inferior_registers): Check and set it.
312 (regsets_store_inferior_registers): Likewise.
313 (linux_fetch_registers, linux_store_registers): Do not use
315 (initialize_low): Allocate disabled_regsets.
317 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
319 * Makefile.in (LIBOBJS): New.
321 (memmem.o): New rule.
322 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
323 * configure: Regenerated.
325 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
327 * server.c (handle_query): Never return "unsupported" for
328 qXfer:features:read queries.
330 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
332 * server.c (get_features_xml): Fix inverted condition.
333 (handle_query): Always support qXfer:feature:read.
335 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
337 * server.c (wrapper_argv): New.
338 (start_inferior): Handle wrapper_argv. If set, expect an extra
340 (gdbserver_usage): Document --wrapper.
341 (main): Parse --wrapper.
343 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
345 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
346 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
347 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
348 (ppc_set_pc): Likewise.
349 (ppc_arch_setup): New function.
350 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
352 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
354 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
356 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
357 instead of linux-ppc64-low.o.
358 * linux-ppc64-low.c: Remove file.
359 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
360 (linux-ppc64-low.o): Remove rule.
362 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
363 (init_registers_powerpc_64): Likewise.
364 (ppc_regmap): Conditionally define depending on __powerpc64__.
365 (ppc_cannot_store_register): Do not special-case "fpscr" when
366 compiled on __powerpc64__.
367 (ppc_collect_ptrace_register): New function.
368 (ppc_supply_ptrace_register): New function.
369 (ppc_breakpoint): Change type to "unsigned int".
370 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
371 (the_low_target): Conditionally provide initializers for the
372 arch_setup member depending on __powerpc64__. Install
373 collect_ptrace_register and supply_ptrace_register members.
375 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
377 * regcache.h (gdbserver_xmltarget): Add extern declaration.
378 * server.c (gdbserver_xmltarget): Define.
379 (get_features_xml): Use it to replace "target.xml" and arch_string.
381 * configure.srv: Remove srv_xmltarget. Add XML files that were
382 mentioned there to srv_xmlfiles instead. Remove conditional tests
383 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
384 srv_xmlfiles and srv_regobj to include all possible choices.
385 * configure.ac (srv_xmltarget): Remove.
386 (srv_xmlfiles): Do not add "target.xml".
387 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
388 checks for supplementary target information.
389 * configure: Regenerate.
390 * Makefile.in (XML_TARGET): Remove.
391 (target.xml): Remove rule.
392 (clean): Do not clean up target.xml.
393 (.PRECIOUS): Do not mention target.xml.
395 * target.h (struct target_ops): Remove arch_string member.
396 * linux-low.c (linux_arch_string): Remove.
397 (linux_target_ops): Remove arch_string initializer.
398 * linux-low.h (struct linux_target_ops): Remove arch_string member.
399 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
400 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
401 * spu-low.c (spu_arch_string): Remove.
402 (spu_target_ops): Remove arch_string initializer.
403 * win32-low.c (win32_arch_string): Remove.
404 (win32_target_ops): Remove arch_string initializer.
405 * win32-low.h (struct win32_target_ops): Remove arch_string member.
406 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
407 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
409 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
411 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
412 by collect_ptrace_register and supply_ptrace_register hooks.
413 * linux-low.c (fetch_register): Use supply_ptrace_register callback
414 instead of checking for the_low_target.left_pad_xfer.
415 (usr_store_inferior_registers): Use collect_ptrace_register callback
416 instead of checking for the_low_target.left_pad_xfer.
418 * linux-s390-low.c (s390_collect_ptrace_register): New function.
419 (s390_supply_ptrace_register): Likewise.
420 (s390_fill_gregset): Call s390_collect_ptrace_register.
421 (the_low_target): Update.
423 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
424 (ppc_supply_ptrace_register): Likewise.
425 (the_low_target): Update.
427 * linux-i386-low.c (the_low_target): Update.
428 * linux-x86-64-low.c (the_low_target): Update.
430 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
432 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
433 reg-s390.o and reg-s390x.o.
435 * linux-low.c (new_inferior): New global variable.
436 (linux_create_inferior, linux_attach): Set it.
437 (linux_wait_for_process): Call the_low_target.arch_setup after the
438 target has stopped for the first time.
439 (initialize_low): Do not call the_low_target.arch_setup.
441 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
442 (s390_set_pc): Likewise.
443 (s390_arch_setup): New function.
444 (the_low_target): Use s390_arch_setup as arch_setup routine.
446 * regcache.c (realloc_register_cache): New function.
447 (set_register_cache): Call it for each existing regcache.
449 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
451 * server.h (init_registers): Remove prototype.
453 * linux-low.h (struct linux_target_ops): Add arch_setup field.
454 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
455 instead of init_registers ().
456 * linux-arm-low.c (init_registers_arm): Add prototype.
457 (init_registers_arm_with_iwmmxt): Likewise.
458 (the_low_target): Add initializer for arch_setup field.
459 * linux-cris-low.c (init_registers_cris): Add prototype.
460 (the_low_target): Add initializer for arch_setup field.
461 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
462 (the_low_target): Add initializer for arch_setup field.
463 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
464 (the_low_target): Add initializer for arch_setup field.
465 * linux-ia64-low.c (init_registers_ia64): Add prototype.
466 (the_low_target): Add initializer for arch_setup field.
467 * linux-m32r-low.c (init_registers_m32r): Add prototype.
468 (the_low_target): Add initializer for arch_setup field.
469 * linux-m68k-low.c (init_registers_m68k): Add prototype.
470 (the_low_target): Add initializer for arch_setup field.
471 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
472 (init_registers_mips64_linux): Likewise.
473 (the_low_target): Add initializer for arch_setup field.
474 * linux-ppc-low.c (init_registers_ppc): Add prototype.
475 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
476 (the_low_target): Add initializer for arch_setup field.
477 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
478 (init_registers_powerpc_64): Likewise.
479 (the_low_target): Add initializer for arch_setup field.
480 * linux-s390-low.c (init_registers_s390): Add prototype.
481 (init_registers_s390x): Likewise.
482 (the_low_target): Add initializer for arch_setup field.
483 * linux-sh-low.c (init_registers_sh): Add prototype.
484 (the_low_target): Add initializer for arch_setup field.
485 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
486 (the_low_target): Add initializer for arch_setup field.
487 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
488 (the_low_target): Add initializer for arch_setup field.
490 * win32-low.h (struct win32_target_ops): Add arch_setup field.
491 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
492 instead of init_registers ().
493 * win32-arm-low.c (init_registers_arm): Add prototype.
494 (the_low_target): Add initializer for arch_setup field.
495 * win32-i386-low.c (init_registers_i386): Add prototype.
496 (the_low_target): Add initializer for arch_setup field.
498 * spu-low.c (init_registers_spu): Add prototype.
499 (initialize_low): Call initialie_registers_spu () instead of
500 initialize_registers ().
502 2008-02-19 Pedro Alves <pedro@codesourcery.com>
504 * server.c (handle_v_requests): When handling the vRun and vAttach
505 packets, if already debugging a process, don't kill it. Return an
508 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
510 * server.c (handle_query): Correct length check.
512 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
514 * win32-low.c (do_initial_child_stuff): Add process handle
515 parameter. Set current_process_handle and current_process_id from the
516 parameters. Clear globals.
517 (win32_create_inferior): Don't set current_process_handle and
518 current_process_id here. Instead pass them on the call to
519 do_initial_child_stuff.
520 (win32_attach): Likewise.
521 (win32_clear_inferiors): New.
522 (win32_kill): Don't close the current process handle or the
523 current thread handle here. Instead call win32_clear_inferiors.
524 (win32_detach): Don't open a new handle to the process. Call
525 win32_clear_inferiors.
526 (win32_join): Don't rely on current_process_handle; open a new
527 handle using the process id.
528 (win32_wait): Call win32_clear_inferiors when the inferior process
531 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
533 * server.c (monitor_show_help): Add "exit".
535 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
537 * Makefile.in (SFILES): Add linux-xtensa-low.c.
538 (clean): Add reg-xtensa.c.
539 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
540 * configure.srv (xtensa*-*-linux*) New target.
541 * linux-xtensa-low.c: New.
542 * xtensa-xtregs.c: New.
544 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
546 * hostio.c: Don't include errno.h.
547 (errno_to_fileio_errno): Move to hostio-errno.
548 * hostio.c: (hostio_error): Remove the error parameter. Defer the
549 error number outputting to the target->hostio_last_error callback.
550 (hostio_packet_error): Use FILEIO_EINVAL directly.
551 (handle_open, handle_pread, hostio_error, handle_unlink): Update
552 calls to hostio_error.
553 * hostio-errno.c: New.
554 * server.h (hostio_last_error_from_errno): Declare.
555 * target.h (target_ops): Add hostio_last_error member.
556 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
557 as hostio_last_error handler.
558 * spu-low.c (spu_target_ops): Likewise.
559 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
560 (wince_hostio_last_error): New functions.
561 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
562 as hostio_last_error handler.
563 (win32_target_ops) [!_WIN32_WCE]: Register
564 hostio_last_error_from_errno as hostio_last_error handler.
565 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
566 (hostio-errno.o): New rule.
567 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
568 * configure.srv (srv_hostio_err_objs): New variable. Default to
570 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
571 * configure: Regenerate.
573 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
575 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
576 (linux_kill, linux_detach): Clean up the process list.
577 * remote-utils.c (remote_open): Improve port number parsing.
578 (putpkt_binary, input_interrupt): Only send interrupts if the target
580 * server.c (extended_protocol): Make static.
581 (attached): Define earlier.
582 (exit_requested, response_needed, program_argv): New variables.
583 (target_running): New.
584 (start_inferior): Clear attached here.
585 (attach_inferior): Set attached here.
586 (require_running): Define.
587 (handle_query): Use require_running and target_running. Implement
589 (handle_v_attach, handle_v_run): New.
590 (handle_v_requests): Use require_running. Handle vAttach and vRun.
591 (gdbserver_usage): Update.
592 (main): Redo argument parsing. Handle --debug and --multi. Handle
593 --attach along with other options or after the port. Save
594 program_argv. Support no initial program. Resynchronize
595 communication with GDB after an error. Handle "monitor exit".
596 Use require_running and target_running. Always allow the extended
597 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
598 restart in extended mode.
599 * README: Refer to the GDB manual. Update --attach usage.
601 2007-12-20 Andreas Schwab <schwab@suse.de>
603 * linux-low.c (STACK_SIZE): Define.
604 (linux_tracefork_child): Use it. Use __clone2 on ia64.
605 (linux_test_for_tracefork): Likewise.
607 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
609 * linux-low.c (linux_wait_for_event): Update messages. Do not
610 reinsert auto-delete breakpoints.
611 * mem-break.c (struct breakpoint): Change return type of handler to
613 (set_breakpoint_at): Update handler type.
614 (reinsert_breakpoint_handler): Return 1 instead of calling
616 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
618 (check_breakpoints): Delete auto-delete breakpoints and return 2.
619 * mem-break.h (set_breakpoint_at): Update handler type.
620 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
621 * win32-low.c (auto_delete_breakpoint): New.
622 (get_child_debug_event): Use it.
624 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
626 * configure.ac: Check for pread and pwrite.
627 * hostio.c (handle_pread): Fall back to lseek and read.
628 (handle_pwrite): Fall back to lseek and write.
629 * config.in, configure: Regenerated.
631 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
633 * server.c (myresume): Add own_buf argument.
634 (main): Update calls.
636 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
638 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
639 * remote-utils.c (remote_open): Do not call disable_async_io.
640 (block_async_io): Delete.
641 (unblock_async_io): Make static.
642 (initialize_async_io): New.
643 * server.c (handle_v_cont): Handle async I/O here.
644 (myresume): Likewise. Move other common resume tasks here...
645 (main): ... from here. Call initialize_async_io. Disable async
646 I/O before the main loop.
647 * server.h (initialize_async_io): Declare.
648 (block_async_io, unblock_async_io): Delete prototypes.
649 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
651 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
653 * remote-utils.c (readchar): Allow binary data in received messages.
655 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
657 * win32-low.c (attaching): New global.
658 (win32_create_inferior): Clear the `attaching' global.
659 (win32_attach): Set the `attaching' global.
660 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
661 attaching. Only set a breakpoint at the entry point if not
664 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
666 * server.c (main): Don't report dll events on the initial
667 connection on attaches.
669 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
671 * server.c (main): Relax numerical bases supported for the pid of
672 the --attach command line argument.
674 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
676 * win32-low.c (win32_attach): Call OpenProcess before
677 DebugActiveProcess, not after. Add last error output to error
680 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
682 * win32-low.c (win32_get_thread_context)
683 (win32_set_thread_context): New functions.
684 (thread_rec): Use win32_get_thread_context.
685 (continue_one_thread, win32_resume): Use win32_set_thread_context.
686 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
690 Pedro Alves <pedro_alves@portugalmail.pt>
692 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
694 (child_add_thread): Minor cleanup.
695 (child_continue): Resume artificially suspended threads before
696 calling ContinueDebugEvent.
697 (suspend_one_thread): New.
698 (fake_breakpoint_event): New.
699 (get_child_debug_event): Change return type to int. Check here if
700 gdb sent an interrupt request. If a soft interrupt was requested,
701 fake a breakpoint event. Return 0 if there is no event to handle,
703 (win32_wait): Don't check here if gdb sent an interrupt request.
704 Ensure there is a valid event to handle.
705 (win32_request_interrupt): Add soft interruption method as last
709 Pedro Alves <pedro_alves@portugalmail.pt>
711 * win32-low.h (win32_thread_info): Add descriptions to the
712 structure members. Replace `suspend_count' counter by a
714 * win32-low.c (thread_rec): Update condition of when to get the
715 context from the inferior. Rely on ContextFlags being set if it
716 has already been retrieved. Only suspend the inferior thread if
717 we haven't already. Warn if that fails.
718 (continue_one_thread): s/suspend_count/suspended/. Only call
719 ResumeThread once. Warn if that fails.
721 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
723 * win32-low.c (win32_wait): Don't read from the inferior when it
726 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
728 * Makefile.in (win32_low_h): New variable.
729 (win32-low.o): Add dependency on $(win32_low_h).
730 (win32-arm-low.o, win32-i386-low.o): New rules.
732 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
734 * hostio.c: Correct copyright year.
736 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
738 * Makefile.in (OBS): Add hostio.o.
739 (hostio.o): New rule.
740 * server.h (handle_vFile): Declare.
741 * hostio.c: New file.
742 * server.c (handle_v_requests): Take packet_len and new_packet_len
743 for binary packets. Call handle_vFile.
744 (main): Update call to handle_v_requests.
746 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
748 * linux-low.c: Include <sched.h>.
750 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
752 * linux-low.c (linux_tracefork_grandchild): New.
753 (linux_tracefork_child): Use clone.
754 (linux_test_for_tracefork): Use clone; allocate and free a stack.
756 2007-10-31 Joel Brobecker <brobecker@adacore.com>
758 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
760 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
762 * linux-low.c (handle_extended_wait): Handle unexpected signals.
764 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
766 * inferiors.c (change_inferior_id): Delete.
767 (add_pid_to_list, pull_pid_from_list): New.
768 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
769 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
770 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
771 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
772 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
773 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
774 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
775 (using_threads): Always set to 1.
776 (handle_extended_wait): New.
777 (add_process): Do not set TID.
778 (linux_create_inferior): Set must_set_ptrace_flags.
779 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
780 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
781 (linux_thread_alive): Rename TID argument to LWPID.
782 (linux_wait_for_process): Handle unknown processes. Do not use TID.
783 (linux_wait_for_event): Do not use TID or check using_threads. Update
784 call to dead_thread_notify. Call handle_extended_wait.
785 (linux_create_inferior): Use PTRACE_SETOPTIONS.
786 (send_sigstop): Delete sigstop_sent.
787 (wait_for_sigstop): Avoid TID.
788 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
789 (linux_test_for_tracefork): New.
790 (linux_lookup_signals): Use thread_db_active and
791 linux_supports_tracefork_flag.
792 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
793 * linux-low.h (get_process_thread): Avoid TID.
794 (struct process_ifo): Move thread_known and tid to the end. Remove
796 (linux_attach_lwp, thread_db_init): Update prototypes.
797 * server.h (change_inferior_id): Delete prototype.
798 (add_pid_to_list, pull_pid_from_list): New prototypes.
799 * thread-db.c (thread_db_use_events): New.
800 (find_first_thread): Rename to...
801 (find_one_thread): ...this. Update callers and messages. Do not
802 call fatal. Check thread_db_use_events. Do not call
803 change_inferior_id or new_thread_notify.
804 (maybe_attach_thread): Update. Do not call new_thread_notify.
805 (thread_db_init): Set thread_db_use_events. Check use_events.
806 * utils.c (fatal, warning): Correct message prefix.
808 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
810 * Makefile.in (clean): Remove new files.
811 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
812 (powerpc-64.o, powerpc-64.c): New rules.
813 * configure.srv: Use alternate register sets for powerpc64-*-linux*
814 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
816 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
818 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
819 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
820 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
821 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
822 (target_regsets): Add AltiVec and SPE register sets.
823 * configure.ac: Check for AltiVec and SPE.
824 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
825 (ppc_fill_vrregset, ppc_store_vrregset): New.
826 (target_regsets): Add AltiVec register set.
827 * configure: Regenerated.
829 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
831 * linux-low.c (O_LARGEFILE): Define.
832 (linux_read_memory): Use /proc/PID/mem.
833 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
834 * configure, config.in: Regenerated.
836 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
838 * linux-low.c (linux_wait_for_event): Do not pass signals while
841 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
843 * win32-low.c (create_process): New.
844 (win32_create_inferior): Use create_process instead of
845 CreateProcess. If create_process failed retry appending an ".exe"
846 suffix. Store the GetLastError result immediatelly after
847 create_process calls and use it on the call to error.
849 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
851 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
853 2007-08-23 Joel Brobecker <brobecker@adacore.com>
855 * configure.ac: Switch license to GPLv3.
857 2007-08-01 Michael Snyder <msnyder@access-company.com>
859 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
861 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
863 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
865 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
866 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
867 CloseToolhelp32Snapshot.
868 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
869 CloseToolhelp32Snapshot.
871 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
873 * server.c (main): Check for inferior exit before main loop.
875 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
877 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
878 instead of on tmp_desc.
880 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
881 Daniel Jacobowitz <dan@codesourcery.com>
883 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
884 (add_thread): Minor cleanups.
885 (clear_inferiors): Move lower in the file. Clear the DLL
887 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
888 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
889 (xml_escape_text): New.
890 * server.c (handle_query): Handle qXfer:libraries:read. Report it
892 (handle_v_cont): Report errors.
893 (gdbserver_version): Update.
894 (main): Correct size of own_buf. Do not report initial DLL events.
895 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
896 (unloaded_dll, xml_escape_text): New.
897 * win32-low.c (enum target_waitkind): Update comments.
898 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
899 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
900 (win32_EnumProcessModules, win32_GetModuleInformation)
901 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
902 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
903 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
904 (win32_Module32First, win32_Module32Next, load_toolhelp)
905 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
906 (get_child_debug_event): Handle DLL events.
907 (win32_wait): Likewise.
909 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
911 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
912 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
914 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
916 * win32-low.c (handle_output_debug_string): Ignore event if not
919 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
921 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
923 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
925 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
927 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
929 * inferiors.c (change_inferior_id): Add comment.
930 * linux-low.c (check_removed_breakpoint): Add an early
931 prototype. Improve debug output.
932 (linux_attach): Doc update.
933 (linux_detach_one_process, linux_detach): Clean up before releasing
935 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
936 * linux-low.h (struct process_info): Doc improvement.
937 * mem-break.c (delete_all_breakpoints): New.
938 * mem-break.h (delete_all_breakpoints): New prototype.
939 * thread-db.c (find_first_thread): New.
940 (thread_db_create_event): Call it instead of
941 thread_db_find_new_threads. Clean up unused variables.
942 (maybe_attach_thread): Remove first thread handling.
943 (thread_db_find_new_threads): Use find_first_thread.
944 (thread_db_get_tls_address): Likewise.
946 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
948 * thread-db.c (thread_db_find_new_threads): Add prototype.
949 (thread_db_create_event): Check for the main thread before adding
951 (maybe_attach_thread): Only enable event reporting if TID == 0.
952 (thread_db_get_tls_address): Check for new threads.
954 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
956 * linux-low.c (linux_create_inferior): Try execv before execvp.
957 * spu-low.c (spu_create_inferior): Likewise.
959 2007-06-13 Mike Frysinger <vapier@gentoo.org>
961 * linux-low.c (linux_create_inferior): Change execv to execvp.
962 * spu-low.c (spu_create_inferior): Likewies.
964 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
966 * Makefile.in (clean): Clean new files instead of deleted ones.
967 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
968 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
970 * configure.srv: Specify XML files and new regformats for MIPS and
972 * linux-mips-low.c (mips_num_regs): Set to only used registers.
973 (mips_regmap): Do not fetch $0. Remove unused registers. Add
974 an entry for the restart register.
975 (mips_cannot_fetch_register, mips_cannot_store_register)
976 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
977 register names to match the XML descriptions.
978 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
979 restart register instead of $0.
981 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
982 Markus Deuling <deuling@de.ibm.com>
984 * remote-utils.c (decode_xfer_write): New function.
985 * server.h (decode_xfer_write): Add prototype.
986 * server.c (handle_query): Add PACKET_LEN argument. Support
987 qXfer:spu:read and qXfer:spu:write packets.
988 (main): Pass packet_len to handle_query.
989 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
990 * target.h (target_ops): Add qxfer_spu.
992 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
994 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
995 accessing non-seekable spufs files.
997 2007-05-16 Markus Deuling <deuling@de.ibm.com>
999 * server.c (handle_query): Add reply for qC packet.
1001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1002 Leo Zayas <lerele@champenstudios@com>
1004 * server.h (check_remote_input_interrupt_request): New function.
1005 * remote_utils.c (INVALID_DESCRIPTOR): New define.
1006 (remote_desc): Initialize with INVALID_DESCRIPTOR.
1007 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
1008 (check_remote_input_interrupt_request): New function.
1009 * server.h (check_remote_input_interrupt_request): Declare.
1010 * win32-low.c (winapi_DebugBreakProcess,
1011 winapi_GenerateConsoleCtrlEvent): New typedefs.
1012 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
1014 (win32_wait): Check for remote interrupt request
1015 with check_remote_input_interrupt_request.
1016 (win32_request_interrupt): New function.
1017 (win32_target_op): Set request_interrupt to win32_request_interrupt.
1019 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1021 * win32-low.c (debug_registers_changed,
1022 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
1023 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
1024 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
1025 (thread_rec): Get context using the low target.
1026 (child_add_thread): Call thread_added on the low target,
1027 which does the same thing.
1029 (do_initial_child_stuff): Remove debug registers references.
1030 Set context using the low target. Resume threads after
1031 setting the contexts.
1032 (child_continue): Remove dead variable. Remove debug
1033 registers references.
1034 (child_fetch_inferior_registers): Go through the low target.
1035 (do_child_store_inferior_registers): Remove.
1036 (child_store_inferior_registers): Go through the low target.
1037 (win32_resume): Remove debug registers references.
1038 Set context using the low target.
1039 (handle_exception): Change return type to void. Don't record
1040 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
1041 first chance exception.
1042 (get_child_debug_event): Change return type to void. Remove
1043 goto loop. Always return after waiting for debug event.
1044 (win32_wait): Convert to switch statement. Handle spurious
1047 * win32-i386-low.c (debug_registers_changed,
1048 debug_registers_used): New.
1049 (initial_stuff): Rename to ...
1050 (i386_initial_stuff): ... this. Clear debug registers
1052 (store_debug_registers): Delete.
1053 (i386_get_thread_context): New.
1054 (load_debug_registers): Delete.
1055 (i386_set_thread_context): New.
1056 (i386_thread_added): New.
1057 (single_step): Rename to ...
1058 (i386_single_step): ... this.
1059 (do_fetch_inferior_registers): Rename to ...
1060 (i386_fetch_inferior_register): ... this.
1061 (i386_store_inferior_register): New.
1062 (the_low_target): Adapt to new interface.
1064 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
1065 (arm_get_thread_context): New.
1066 (arm_set_thread_context): New.
1068 (do_fetch_inferior_registers): Rename to ...
1069 (arm_fetch_inferior_register): ... this.
1070 (arm_store_inferior_register): New.
1071 (arm_wince_breakpoint): Reimplement as unsigned long.
1072 (arm_wince_breakpoint_len): Define.
1073 (the_low_target): Adapt to new interface.
1075 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1076 load_debug_registers. Add get_thread_context, set_thread_context,
1077 thread_added and store_inferior_register. Rename
1078 fetch_inferior_registers to fetch_inferior_register.
1079 (regptr): Remove declaration.
1081 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1083 * linux-low.c (linux_detach): Change return type to int. Return 0.
1084 * spu-low.c (spu_detach): Likewise.
1086 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1088 * target.h (target_ops): Change return type of detach to int.
1090 (join_inferior): New.
1091 * server.c (main): Don't skip detach support on mingw32.
1092 If the inferior doesn't support detaching return error.
1093 Call join_inferior instead of using waitpid.
1094 * linux-low.c (linux_join): New.
1095 (linux_target_op): Add linux_join.
1096 * spu-low.c (spu_join): New.
1097 (spu_target_ops): Add spu_join.
1098 * win32-low.c (win32_detach): Adapt to new interface.
1099 Reopen current_process_handle before detaching. Issue a child
1100 resume before detaching.
1102 (win32_target_op): Add win32_join.
1104 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1106 * win32-low.c (win32-attach): Fix return value.
1107 * target.h (target_ops): Describe ATTACH return values.
1109 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1111 * win32-low.c (GETPROCADDRESS): Define.
1112 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1113 (winapi_DebugSetProcessKillOnExit): Likewise.
1114 (win32_create_inferior): Force usage of ansi CreateProcessA.
1115 (win32_attach): Use GETPROCADDRESS.
1116 (win32_detach): Likewise.
1118 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1120 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1122 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1124 * win32-low.c: Commit leftover changes from 2007-03-29.
1126 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1128 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1129 fields short instead of int. Add explicit padding.
1130 (i387_cache_to_fsave): Remove unnecessary casts.
1131 (i387_fsave_to_cache): Doc fix.
1132 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1134 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1136 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1137 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1139 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1141 * configure.srv (arm*-*-mingw32ce*): Move near the other
1144 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1146 * configure.ac: Add errno checking.
1147 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1148 sys/file.h and malloc.h.
1149 (AC_CHECK_DECLS): Add perror.
1150 (srv_mingwce): Handle.
1151 * configure.srv (i[34567]86-*-cygwin*): Add
1152 win32-i386-low.o to srv_tgtobj.
1153 (i[34567]86-*-mingw*): Likewise.
1154 (arm*-*-mingw32ce*): Add case.
1155 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1156 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1157 [__MINGW32CE__] (strerror): New function.
1158 [__MINGW32CE__] (errno): Define to GetLastError.
1159 [__MINGW32CE__] (COUNTOF): New macro.
1160 (remote_open): Remove extra close call.
1161 * mem-break.c (delete_breakpoint_at): New function.
1162 * mem-break.h (delete_breakpoint_at): Declare.
1163 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1164 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1165 [USE_WIN32API] (read, write): Add char* casts.
1166 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1167 * server.h: Include wincecompat.h on Windows CE.
1168 [HAVE_ERRNO_H]: Check.
1169 (perror): Declare if not declared.
1170 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1171 (perror_with_name): Remove errno declaration.
1172 * wincecompat.h: New.
1173 * wincecompat.c: New.
1175 * win32-arm-low.c: New.
1176 * win32-i386-low.c: New.
1177 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1178 (OUTMSG2): Make it safe.
1180 (COUNTOF): New macro.
1181 (NUM_REGS): Get it from the low target.
1182 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1183 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1184 (thread_rec): Let low target handle debug registers.
1185 (child_add_thread): Likewise.
1186 (child_init_thread_list): Likewise.
1187 (continue_one_thread): Likewise.
1189 (do_child_fetch_inferior_registers): Move to ...
1190 * win32-i386-low.c: ... here, and rename to ...
1191 (do_fetch_inferior_registers): ... this.
1192 * win32-low.c (child_fetch_inferior_registers):
1193 Go through the low target.
1194 (do_child_store_inferior_registers): Use regptr.
1195 (strwinerror): New function.
1196 (win32_create_inferior): Handle Windows CE.
1197 Use strwinerror instead of strerror on Windows error
1198 codes. Add program to the error output.
1199 Don't close the main thread handle on Windows CE.
1200 (win32_attach): Use coredll.dll on Windows CE.
1201 (win32_kill): Close current process and current
1203 (win32_detach): Use coredll.dll on Windows CE.
1204 (win32_resume): Let low target handle debug registers, and
1206 (handle_exception): Add/Remove initial breakpoint. Avoid
1207 non-existant WSTOPSIG on Windows CE.
1208 (win32_read_inferior_memory): Cast to remove warning.
1209 (win32_arch_string): Go through the low target.
1210 (initialize_low): Call set_breakpoint_data with the low
1211 target's breakpoint.
1212 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1213 FOP_REGNUM, mappings): Move to ...
1214 * win32-i386-low.c: ... here.
1215 * win32-low.c (win32_thread_info): Move to ...
1216 * win32-low.h: ... here.
1217 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1218 win32-arm-low.c and wincecompat.c.
1219 (all:): Add $EXEEXT.
1220 (install-only:): Likewise.
1221 (gdbserver:): Likewise.
1222 (gdbreplay:): Likewise.
1223 * config.in: Regenerate.
1224 * configure: Regenerate.
1226 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1228 * win32-low.c: Rename typedef thread_info to
1229 win32_thread_info throughout.
1231 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1233 * win32-i386-low.c: Rename to ...
1234 * win32-low.c: ... this.
1235 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1236 * Makefile.in: Likewise.
1238 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1240 * remote-utils.c (monitor_output): Constify msg parameter.
1241 * server.h (monitor_output): Likewise.
1242 * win32-i386-low.c (handle_output_debug_string): New.
1243 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1244 handle_output_debug_string.
1245 (get_child_debug_event): Likewise.
1247 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1249 * server.c (main): Correct strtoul check.
1251 2007-03-27 Jon Ringle <jon@ringle.org>
1253 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1255 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1257 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1259 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1261 * terminal.h: Check HAVE_SGTTY_H.
1263 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1265 * remote-utils.c (remote_open): Print out the assigned port number.
1267 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1269 * remote-utils.c (monitor_output): New function.
1270 * server.c (debug_threads): Define here.
1271 (monitor_show_help): New function.
1272 (handle_query): Handle qRcmd.
1273 (main): Do not handle 'd' packet.
1274 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1275 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1278 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1280 * Makefile.in (EXEEXT): New.
1281 (clean): Use $(EXEEXT).
1283 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1285 * target.h (target_ops): Rename send_signal to request_interrupt,
1286 and remove enum target_signal parameter.
1287 * linux-low.c (linux_request_interrupt): Rename from
1288 linux_send_signal, and always send SIGINT.
1289 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1290 and always send SIGINT.
1291 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1293 (input_interrupt): Likewise.
1295 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1297 * server.c (get_features_xml): Check if target implemented
1299 * win32-i386-low.c (win32_arch_string): New.
1300 (win32_target_ops): Add win32_arch_string as arch_string member.
1302 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1304 * spu-low.c (spu_arch_string): New.
1305 (spu_target_ops): Add spu_arch_string.
1307 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1309 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1310 * configure.ac: Do not check for terminal.h.
1311 * configure, config.in: Regenerated.
1313 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1315 * Makefile.in (OBS): Add $(XML_BUILTIN).
1316 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1318 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1319 (arm-with-iwmmxt.c): New.
1320 * config.in, configure: Regenerate.
1321 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1322 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1323 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1324 (arm*-*-linux*): Add iWMMXt and regset support.
1325 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1326 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1327 (arm_store_wmmxregset, target_regsets): New.
1328 * server.c (get_features_xml): Take annex argument. Check builtin
1330 (handle_query): Handle multiple annexes.
1332 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1334 * remote-utils.c [USE_WIN32API] (read, write): Define.
1335 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1338 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1340 * linux-i386-low.c (the_low_target): Set arch_string.
1341 * linux-x86-64-low.c (the_low_target): Likewise.
1342 * linux-low.c (linux_arch_string): New.
1343 (linux_target_ops): Add it.
1344 * linux-low.h (struct linux_target_ops): Add arch_string.
1345 * server.c (write_qxfer_response): Use const void * for DATA.
1346 (get_features_xml): New.
1347 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1348 * target.h (struct target_ops): Add arch_string method.
1350 2007-01-03 Denis Pilat <denis.pilat@st.com>
1351 Daniel Jacobowitz <dan@codesourcery.com>
1353 * linux-low.c (linux_kill): Handle being called with no threads.
1354 * win32-i386-low.c (win32_kill): Likewise.
1355 (get_child_debug_event): Clear current_process_handle.
1357 2006-12-30 Denis PILAT <denis.pilat@st.com>
1358 Daniel Jacobowitz <dan@codesourcery.com>
1360 * remote-utils.c (remote_open): Check the type of specified
1361 serial port devices before opening them.
1362 * server.c (main): Kill the inferior if an error occurs during
1363 the first remote_open.
1365 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1367 * README: Update supported targets.
1369 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1371 * Makefile.in (clean): Remove reg-mips64.c.
1372 (reg-mips64.c, reg-mips64.o): New rules.
1373 * configure.srv: Handle mips64. Include regset support for mips.
1374 * linux-mips-low.c (union mips_register): New.
1375 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1376 (mips_breakpoint, mips_breakpoint_at): Use int.
1377 (mips_collect_register, mips_supply_register)
1378 (mips_collect_register_32bit, mips_supply_register_32bit)
1379 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1380 (mips_store_fpregset, target_regsets): New.
1381 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1383 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1385 * configure.srv: Add target "spu*-*-*".
1386 * Makefile.in (clean): Remove reg-spu.c.
1387 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1388 * spu-low.c: New file.
1390 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1392 * configure.ac: Correct td_thr_tls_get_addr test.
1393 * configure: Regenerated.
1395 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1397 * linux-low.c (linux_wait_for_event): Reformat. Use the
1399 * remote-utils.c (decode_address_to_semicolon): New.
1400 * server.c (pass_signals, handle_general_set): New.
1401 (handle_query): Mention QPassSignals for qSupported.
1402 (main): Call handle_general_set.
1403 * server.h (pass_signals, decode_address_to_semicolon): New.
1405 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1407 * server.c (handle_query): Correct error handling for read_auxv.
1409 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1411 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1412 and srv_linux_thread_db to yes.
1413 * linux-s390-low.c (s390_fill_gregset): New function.
1414 (target_regsets): Define data structure.
1416 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1418 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1419 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1420 * config.in, configure: Regenerated.
1421 * inferiors.c (gdb_id_to_thread): New function.
1422 (gdb_id_to_thread_id): Use it.
1423 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1424 * linux-low.h (struct process_info): Add th member.
1425 (thread_db_get_tls_address): New prototype.
1426 * remote-utils.c (decode_address): Make non-static.
1427 * server.c (handle_query): Handle qGetTLSAddr.
1428 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1429 * target.h (struct target_ops): Add get_tls_address.
1430 * thread-db.c (maybe_attach_thread): Save the thread handle.
1431 (thread_db_get_tls_address): New.
1433 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1435 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1436 (linux_resume_one_process): Take a siginfo_t *. Update all
1437 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1438 (struct pending_signals): Add a siginfo_t.
1439 (linux_wait_for_process): Always set last_status.
1440 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1441 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1442 * linux-low.h (struct process_info): Add last_status.
1444 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1446 * remote-utils.c (try_rle): New function.
1447 (putpkt_binary): Use it.
1449 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1451 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1452 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1453 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1454 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1455 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1458 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1460 * server.c (terminal_fd): New variable.
1461 (old_foreground_pgrp): Likewise.
1462 (restore_old_foreground_pgrp): New function.
1463 (start_inferior): Record the terminal file descriptor in terminal_fd
1464 and its original foreground group in old_foreground_pgrp. Register
1465 restore_old_foreground_pgrp with atexit().
1467 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1469 * server.c (handle_query): Correct qPart to qXfer.
1471 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1473 * configure.ac: Check for more headers which are missing on
1474 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1475 * configure.srv: Add Cygwin and mingw32.
1476 * remote-utils.c: Don't include headers unconditionally which
1477 are missing on mingw32. Include <winsock.h> for mingw32.
1478 (remote_open): Adjust for mingw32 support. Flush
1479 standard error after writing to it.
1480 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1481 (unblock_async_io, enable_async_io, disable_async_io)
1482 (readchar, getpkt): Update for Winsock support.
1483 (prepare_resume_reply): Expect a protocol signal number.
1484 * server.c: Disable <sys/wait.h> on mingw32.
1485 (start_inferior): Adjust for mingw32 support. Flush
1486 standard error after writing to it.
1487 (attach_inferior): Likewise. Use protocol signal
1489 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1491 * win32-i386-low.c: New file.
1492 * Makefile.in (XM_CLIBS): Set.
1493 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1494 (win32-i386-low.o): New dependency rule.
1495 * linux-low.c (linux_wait): Use target signal numbers.
1496 * target.h (struct target_ops): Doc fix.
1497 * server.h (target_signal_to_name): New prototype.
1498 * gdbreplay.c: Don't include headers unconditionally which
1499 are missing on mingw32. Include <winsock.h> for mingw32.
1500 (remote_close, remote_open): Adjust for Winsock support.
1501 * configure, config.in: Regenerated.
1503 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1505 * server.c (decode_xfer_read, write_qxfer_response): New.
1506 (handle_query): Take a packet length argument. Handle
1507 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1508 the qSupported response.
1509 (main): Update call to handle_query.
1511 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1513 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1514 (putpkt_binary): Renamed from putpkt and adjusted for binary
1516 (putpkt): New wrapper for putpkt_binary.
1517 (readchar): Don't mask off the high bit.
1518 (decode_X_packet): New function.
1519 * server.c (main): Call putpkt_binary if a handler sets the packet
1520 length. Save the length of the incoming packet. Handle 'X'.
1521 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1523 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1525 * server.c (handle_query): Handle qSupported.
1527 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1529 * remote-utils.c (all_symbols_looked_up): New variable.
1530 (look_up_one_symbol): Check it.
1531 * server.h (look_up_one_symbol): New declaration.
1532 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1534 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1536 * Makefile.in (linux-arm-low.o): Update dependencies.
1537 * linux-arm-low.c: Include "gdb_proc_service.h".
1538 (PTRACE_GET_THREAD_AREA): Define.
1539 (ps_get_thread_area): New function.
1541 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1543 * configure.srv (m68k*-*-uclinux*): New target.
1544 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1545 (linux_resume_one_process): Remove extraneous cast.
1546 (linux_read_offsets): New.
1547 (linux_target_op): Add linux_read_offsets on mmuless systems.
1548 * server.c (handle_query): Add qOffsets logic.
1549 * target.h (struct target_ops): Add read_offsets.
1551 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1553 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1554 (PTRACE_GET_THREAD_AREA): Define.
1555 (ps_get_thread_area): New function.
1556 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1557 (linux-x86-64-low.o): Update.
1559 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1561 * configure.ac: Remove checks for prfpregset_t.
1562 * gdb_proc_service.h: New file.
1563 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1564 new "gdb_proc_service.h".
1565 * proc-service.c: Likewise.
1566 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1567 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1568 * Makefile.in (gdb_proc_service_h): Updated.
1569 * configure, config.in: Regenerated.
1571 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1573 * remote-utils.c (prepare_resume_reply): Move declaration
1574 of gdb_id_from_wait to the top of the block.
1576 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1578 * linux-low.c (regsets_store_inferior_registers): Read the regset
1579 from the target before filling it.
1581 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1583 * server.c (attach_inferior): Return SIGTRAP for a successful
1586 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1588 * Makefile.in (OBS): Add version.o.
1589 (STAGESTUFF): Delete.
1590 (version.o): Add dependencies.
1591 (version.c): Replace rule.
1592 (clean): Remove version.c.
1593 * server.c (gdbserver_version): New.
1594 (gdbserver_usage): Use printf.
1595 (main): Handle --version and --help.
1596 * server.h (version, host_name): Add declarations.
1598 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1610 * linux-x86-64-low.c:
1613 * linux-ppc64-low.c:
1622 * linux-crisv32-low.c:
1634 * gdbserver.1: Add (C) after Copyright. Update the FSF
1637 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1639 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1640 (arm_breakpoint_at): Recognize both breakpoints.
1641 (the_low_target): Use the correct breakpoint instruction.
1643 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1645 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1646 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1647 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1648 (the_low_target): Update.
1650 2005-10-25 Andreas Schwab <schwab@suse.de>
1652 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1654 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1655 (ia64_num_regs): Reduce to 462.
1657 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1659 * acinclude.m4: Correct quoting.
1660 * aclocal.m4: Regenerated.
1662 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1663 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1664 (thread_db_init): Call thread_db_err_str.
1665 * configure.ac: Check for TD_VERSION.
1666 * config.in, configure: Regenerated.
1668 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1670 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1672 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1674 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1675 is not available. Define HAVE_PTRACE_GETREGS if it is.
1676 * config.in, configure: Regenerated.
1677 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1678 * linux-i386-low.c, linux-m68k-low.c: Update to use
1679 HAVE_PTRACE_GETREGS.
1680 * linux-low.c (regsets_fetch_inferior_registers)
1681 (regsets_store_inferior_registers): Only return 0 if we processed
1683 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1684 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1686 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1688 * inferiors.c (struct thread_info): Add gdb_id.
1689 (add_thread): Add gdb_id argument.
1690 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1691 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1692 calls to add_thread.
1693 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1694 * server.c (handle_query): Use thread_to_gdb_id.
1695 (handle_v_cont, main): Use gdb_id_to_thread_id.
1696 * server.h (add_thread): Update prototype.
1697 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1700 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1702 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1703 left-padded registers.
1704 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1705 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1707 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1709 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1710 * configure: Regenerate.
1711 * config.in: Regenerate.
1712 * server.h (NEED_DECLARATION_STRERROR):
1713 Replace with !HAVE_DECL_STRERROR.
1715 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1717 * linux-low.c (linux_wait, linux_send_signal): Don't test
1718 an unsigned long variable for > 0 if it could be MAX_ULONG.
1719 * server.c (myresume): Likewise.
1720 * target.c (set_desired_inferior): Likewise.
1722 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1724 * configure.ac: Simplify and improve check for socklen_t.
1725 * configure, config.in: Regenerate.
1727 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1729 * acconfig.h: Remove.
1730 * configure.ac: Add a test for socklen_t. Use three-argument
1731 AC_DEFINE throughout.
1732 * config.in: Regenerated using autoheader 2.59.
1733 * configure: Regenerated.
1735 * gdbreplay.c (socklen_t): Provide a default.
1736 (remote_open): Use socklen_t.
1737 * remote-utils.c (socklen_t): Provide a default.
1738 (remote_open): Use socklen_t.
1739 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1742 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1744 * linux-low.c (linux_read_memory, linux_write_memory)
1745 (linux_read_auxv): Likewise.
1746 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1747 (check_mem_write): Likewise.
1748 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1750 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1751 (registers_from_string, register_data): Likewise.
1752 * server.c (handle_query, main): Likewise.
1753 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1754 (decode_M_packet): Likewise.
1755 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1756 * target.h (struct target_ops): Update read_memory, write_memory,
1758 (read_inferior_memory, write_inferior_memory): Update.
1759 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1761 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1762 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1763 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1764 linux-s390-low.c, linux-sh-low.c: Update for changes in
1765 read_inferior_memory and the_low_target->breakpoint.
1767 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1769 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1770 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1771 * configure.srv: Add powerpc64-*-linux*.
1772 * linux-ppc64-low.c: New file.
1774 2005-05-23 Orjan Friberg <orjanf@axis.com>
1776 * linux-cris-low.c: New file with support for CRIS.
1777 * linux-crisv32-low.c: Ditto for CRISv32.
1778 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1779 (clean): Add reg-cris.c and reg-crisv32.c.
1780 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1781 reg-crisv32.o, and reg-crisv32.c to make rules.
1782 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1785 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1787 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1788 of sizeof (PTRACE_XFER_TYPE).
1789 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1791 2005-05-12 Orjan Friberg <orjanf@axis.com>
1793 * target.h (struct target_ops): Add insert_watchpoint,
1794 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1795 pointers for hardware watchpoint support.
1796 * linux-low.h (struct linux_target_ops): Ditto.
1797 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1798 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1799 to linux_target_ops.
1800 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1802 * server.c (main): Recognize 'Z' and 'z' packets.
1804 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1806 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1807 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1808 (the_low_target): Add new members.
1810 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1812 * proc-service.c (ps_lgetregs): Search all_processes instead of
1815 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1817 * server.c (start_inferior): Change return type to int.
1818 (attach_inferior): Change sigptr to int *.
1819 (handle_v_cont, handle_v_requests): Change signal to int *.
1820 (main): Change signal to int.
1822 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1824 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1825 * configure.srv: Add m32r*-*-linux*.
1826 * linux-m32r-low.c: New file.
1828 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1830 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1832 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1834 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1835 Take unsigned long arguments for PIDs.
1836 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1837 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1838 (wait_for_sigstop, linux_resume_one_process)
1839 (regsets_fetch_inferior_registers, linux_send_signal)
1840 (linux_read_auxv): Likewise. Update the types of variables holding
1841 PIDs. Update format string specifiers.
1842 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1843 * remote-utils.c (prepare_resume_reply): Likewise.
1844 * server.c (cont_thread, general_thread, step_thread)
1845 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1847 (handle_query): Update format specifiers.
1848 (handle_v_cont, main): Use strtoul for thread IDs.
1849 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1850 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1851 (general_thread, step_thread, thread_from_wait)
1852 (old_thread_from_wait): Update.
1853 * target.h (struct thread_resume): Use unsigned long for THREAD.
1854 (struct target_ops): Use unsigned long for arguments to attach and
1857 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1859 * acinclude.m4: Include bfd/bfd.m4 directly.
1860 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1861 <agriffis@toolchain.org>.
1862 * aclocal.m4, configure: Regenerated.
1864 2005-01-07 Andrew Cagney <cagney@gnu.org>
1866 * configure.ac: Rename configure.in, require autoconf 2.59.
1867 * configure: Re-generate.
1869 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1871 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1873 * aclocal.m4: Regenerated.
1874 * configure: Regenerated.
1876 2004-11-21 Andreas Schwab <schwab@suse.de>
1878 * linux-m68k-low.c (m68k_num_gregs): Define.
1879 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1880 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1881 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1882 (m68k_breakpoint_at): New. Add to the_low_target.
1884 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1885 srv_linux_thread_db to yes.
1887 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1889 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1890 (ARCH_SET_FS): Likewise.
1891 (ARCH_GET_FS): Likewise.
1892 (ARCH_GET_GS): Likewise.
1894 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1896 * linux-i386-low.c (ps_get_thread_area): New.
1897 * linux-x86-64-low.c (ps_get_thread_area): New.
1898 * linux-low.c: Include <sys/syscall.h>.
1899 (linux_kill_one_process): Don't kill the first thread here.
1900 (linux_kill): Kill the first thread here.
1901 (kill_lwp): New function.
1902 (send_sigstop, linux_send_signal): Use it.
1903 * proc-service.c: Clean up #ifdefs.
1904 (fpregset_info): Delete.
1905 (ps_lgetregs): Update and enable implementation.
1906 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1908 * remote-utils.c (struct sym_cache, symbol_cache): New.
1909 (input_interrupt): Print a clearer message.
1910 (async_io_enabled): New variable.
1911 (enable_async_io, disable_async_io): Use it. Update comments.
1912 (look_up_one_symbol): Use the symbol cache.
1913 * thread-db.c (thread_db_look_up_symbols): New function.
1914 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1916 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1918 * configure.in: Test for -rdynamic.
1919 * configure: Regenerated.
1920 * Makefile (INTERNAL_LDFLAGS): New.
1921 (gdbserver, gdbreplay): Use it.
1923 2004-09-02 Andrew Cagney <cagney@gnu.org>
1925 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1927 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1929 * linux-low.c (linux_wait): Clear all_processes list also.
1931 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1933 * linux-low.c: Include <errno.h>. Remove extern declaration of
1936 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1938 * gdbreplay.c, server.h, utils.c: Update copyright years.
1940 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1942 * server.c (main): Print child status or termination signal from
1943 variable 'signal', not 'sig'.
1945 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1947 * linux-low.c (linux_read_memory): Change return type to
1948 int. Check for and return error from ptrace().
1949 * target.c (read_inferior_memory): Change return type to int. Pass
1950 back return status from the_target->read_memory().
1951 * target.h (struct target_ops): Adapt *read_memory() prototype.
1953 (read_inferior_memory): Adapt prototype.
1954 * server.c (main): Return an error packet if
1955 read_inferior_memory() returns an error.
1957 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1959 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1960 Unify with other clean targets.
1962 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1964 * server.c (handle_v_cont): Call set_desired_inferior.
1966 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1968 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1970 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1972 * linux-low.c (linux_wait): Unblock async I/O.
1973 (linux_resume): Block and enable async I/O.
1974 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1975 * server.h (block_async_io, unblock_async_io): Add prototypes.
1977 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1979 * remote-utils.c (remote_open): Print a status notice after
1981 * server.c (attach_inferior): Print a status notice after
1984 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1986 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1988 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1990 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1992 * server.c, target.h: Update copyright years.
1994 2004-02-25 Roland McGrath <roland@redhat.com>
1996 * target.h (struct target_ops): New member `read_auxv'.
1997 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1998 * linux-low.c (linux_read_auxv): New function.
1999 (linux_target_ops): Initialize `read_auxv' member to that.
2001 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2003 Committed by Jim Blandy <jimb@redhat.com>.
2005 * linux-s390-low.c (s390_num_regs): Update.
2006 (s390_regmap): Remove control registers. Use __s390x__ predefine
2007 instead of GPR_SIZE to distiguish s390 and s390x targets.
2009 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
2011 * linux-low.c: Update copyright year.
2012 (check_removed_breakpoint): Clear pending_is_breakpoint.
2013 (linux_set_resume_request, linux_queue_one_thread)
2014 (resume_status_pending_p): New functions.
2015 (linux_continue_one_thread): Use process->resume.
2016 (linux_resume): Only resume threads if there are no pending events.
2017 * linux-low.h (struct process_info): Add resume request
2020 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
2022 * regcache.c (new_register_cache): Clear the allocated register
2023 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2025 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
2027 * linux-low.c (linux_resume): Take a struct thread_resume *
2029 (linux_wait): Update call.
2030 (resume_ptr): New static variable.
2031 (linux_continue_one_thread): Renamed from
2032 linux_continue_one_process. Use resume_ptr.
2033 (linux_resume): Use linux_continue_one_thread.
2034 * server.c (handle_v_cont, handle_v_requests): New functions.
2035 (myresume): New function.
2036 (main): Handle 'v' case.
2037 * target.h (struct thread_resume): New type.
2038 (struct target_ops): Change argument of "resume" to struct
2040 (myresume): Delete macro.
2042 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
2044 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
2045 (uninstall): Support DESTDIR.
2047 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
2049 * configure.srv: Add xscale*linux copy of arm*linux entry.
2051 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
2053 * linux-arm-low.c (arm_reinsert_addr): New function.
2054 (the_low_target): Add arm_reinsert_addr.
2056 2003-07-08 Mark Kettenis <kettenis@gnu.org>
2058 * mem-break.c: Remove whitespace at end of file.
2060 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2062 * configure.in: Check whether we need to prototype strerror.
2063 * server.h: Optionally prototype strerror.
2064 * gdbreplay.c (perror_with_name): Use strerror.
2065 * linux-low.c (linux_attach_lwp): Use strerror.
2066 * utils.c (perror_with_name): Use strerror.
2067 * config.in, configure: Regenerated.
2069 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2071 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2072 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2074 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2076 * Makefile.in (SFILES): Update.
2077 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2078 low-sun3.c: Remove files.
2080 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2082 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2083 (linux_detach_one_process, linux_detach): New functions.
2084 (linux_target_ops): Add linux_detach.
2085 * server.c (main): Handle 'D' packet.
2086 * target.h (struct target_ops): Add "detach" member.
2087 (detach_inferior): Define.
2089 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2091 From Kelley Cook <kelleycook@wideopenwest.com>:
2092 * configure.srv: Accept i[34567]86 variants.
2094 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2096 * linux-low.c (linux_wait_for_event): Correct comment typos.
2097 (linux_resume_one_process): Call check_removed_breakpoint.
2098 (linux_send_signal): New function.
2099 (linux_target_ops): Add linux_send_signal.
2100 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2102 * target.h (struct target_ops): Add send_signal.
2104 2003-05-29 Jim Blandy <jimb@redhat.com>
2106 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2107 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2108 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2109 away part of the register's value.
2111 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2113 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2114 (linux_wait_for_event, linux_init_signals): Likewise.
2116 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2118 * configure.in: Check for stdlib.h.
2119 * configure: Regenerated.
2120 * config.in: Regenerated.
2122 2003-01-04 Andreas Schwab <schwab@suse.de>
2124 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2126 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2128 * Makefile.in: Remove obsolete code.
2130 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2132 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2133 defined(PT_FPR0_HI).
2135 2002-11-17 Stuart Hughes <seh@zee2.com>
2137 * linux-arm-low.c (arm_num_regs): Increase.
2138 (arm_regmap): Include status register.
2140 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2142 * linux-low.c (register_addr): Remove incorrect -1 check.
2144 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2146 * linux-low.c (linux_create_inferior): Call setpgid. Return
2148 (unstopped_p, linux_signal_pid): Remove.
2149 (linux_target_ops): Remove linux_signal_pid.
2150 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2151 global instead of target method.
2152 * target.h (struct target_ops): Remove signal_pid. Update comment
2153 for create_inferior.
2154 * server.c (signal_pid): New variable.
2155 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2156 gdbserver. Set the child to be the foreground process group.
2157 (attach_inferior): Set signal_pid.
2159 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2161 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2163 2002-08-20 Jim Blandy <jimb@redhat.com>
2165 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2168 2002-08-01 Andrew Cagney <cagney@redhat.com>
2170 * Makefile.in: Make chill references obsolete.
2172 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2174 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2175 * configure: Regenerate.
2176 * config.in: Regenerate.
2178 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2180 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2181 (perror_with_name, remote_close, remote_open, expect, play): Static.
2183 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2185 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2186 byte offsets instead of an array of indexes.
2187 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2189 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2191 * regcache.c: Add comment.
2193 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2195 * thread-db.c: New file.
2196 * proc-service.c: New file.
2197 * acinclude.m4: New file.
2198 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2199 proc-service.o, and thread-db.o.
2200 (linux-low.o): Add USE_THREAD_DB.
2201 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2202 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2203 * aclocal.m4: Regenerated.
2204 * config.in: Regenerated.
2205 * configure: Regenerated.
2206 * configure.in: Check for proc_service.h, sys/procfs.h,
2207 thread_db.h, and linux/elf.h headrs.
2208 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2209 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2210 Check for -lthread_db and thread support.
2211 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2212 PowerPC, and SuperH.
2213 * i387-fp.c: Constify arguments.
2214 * i387-fp.h: Likewise.
2215 * inferiors.c: (struct thread_info): Renamed from
2216 `struct inferior_info'. Remove PID member. Use generic inferior
2217 list header. All uses updated.
2218 (inferiors, signal_pid): Removed.
2219 (all_threads): New variable.
2220 (get_thread): Define.
2221 (add_inferior_to_list): New function.
2222 (for_each_inferior): New function.
2223 (change_inferior_id): New function.
2224 (add_inferior): Removed.
2225 (remove_inferior): New function.
2226 (add_thread): New function.
2227 (free_one_thread): New function.
2228 (remove_thread): New function.
2229 (clear_inferiors): Use for_each_inferior and free_one_thread.
2230 (find_inferior): New function.
2231 (find_inferior_id): New function.
2232 (inferior_target_data): Update argument type.
2233 (set_inferior_target_data): Likewise.
2234 (inferior_regcache_data): Likewise.
2235 (set_inferior_regcache_data): Likewise.
2236 * linux-low.c (linux_bp_reinsert): Remove.
2237 (all_processes, stopping_threads, using_thrads)
2238 (struct pending_signals, debug_threads, pid_of): New.
2239 (inferior_pid): Replace with macro.
2240 (struct inferior_linux_data): Remove.
2241 (get_stop_pc, add_process): New functions.
2242 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2243 Use add_process and add_thread.
2244 (linux_attach_lwp): New function, based on old linux_attach. Use
2245 add_process and add_thread. Set stop_expected for new threads.
2246 (linux_attach): New function.
2247 (linux_kill_one_process): New function.
2248 (linux_kill): Kill all LWPs.
2249 (linux_thread_alive): Use find_inferior_id.
2250 (check_removed_breakpoints, status_pending_p): New functions.
2251 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2252 Update. Use WNOHANG. Wait for cloned processes also. Update process
2253 struct for the found process.
2254 (linux_wait_for_event): New function.
2255 (linux_wait): Use it. Support LWPs.
2256 (send_sigstop, wait_for_sigstop, stop_all_processes)
2257 (linux_resume_one_process, linux_continue_one_process): New functions.
2258 (linux_resume): Support LWPs.
2259 (REGISTER_RAW_SIZE): Remove.
2260 (fetch_register): Use register_size instead. Call supply_register.
2261 (usr_store_inferior_registers): Likewise. Call collect_register.
2263 (regsets_fetch_inferior_registers): Improve error message.
2264 (regsets_store_inferior_registers): Add debugging.
2265 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2266 (unstopped_p, linux_signal_pid): New functions.
2267 (linux_target_ops): Add linux_signal_pid.
2268 (linux_init_signals): New function.
2269 (initialize_low): Call it. Initialize using_threads.
2270 * regcache.c (inferior_regcache_data): Add valid
2272 (get_regcache): Fetch registers lazily. Add fetch argument
2273 and update all callers.
2274 (regcache_invalidate_one, regcache_invalidate): New
2276 (new_register_cache): Renamed from create_register_cache.
2277 Return the new regcache.
2278 (free_register_cache): Change argument to a void *.
2279 (registers_to_string, registers_from_string): Call get_regcache
2280 with fetch flag set.
2281 (register_data): Make static. Pass fetch flag to get_regcache.
2282 (supply_register): Call get_regcache with fetch flag clear.
2283 (collect_register): Call get_regcache with fetch flag set.
2284 (collect_register_as_string): New function.
2285 * regcache.h: Update.
2286 * remote-utils.c (putpkt): Flush after debug output and use
2288 Handle input interrupts while waiting for an ACK.
2289 (input_interrupt): Use signal_pid method.
2290 (getpkt): Flush after debug output and use stderr.
2291 (outreg): Use collect_register_as_string.
2292 (new_thread_notify, dead_thread_notify): New functions.
2293 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2295 (look_up_one_symbol): Flush after debug output.
2296 * server.c (step_thread, server_waiting): New variables.
2297 (start_inferior): Don't use signal_pid. Update call to mywait.
2298 (attach_inferior): Update call to mywait.
2299 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2300 (main): Don't fetch/store registers explicitly. Use
2301 set_desired_inferior. Support proposed ``Hs'' packet. Update
2304 (struct inferior_list, struct_inferior_list_entry): New.
2305 * target.c (set_desired_inferior): New.
2306 (write_inferior_memory): Constify.
2307 (mywait): New function.
2309 (struct target_ops): New signal_pid method.
2310 (mywait): Removed macro, added prototype.
2312 * linux-low.h (regset_func): Removed.
2313 (regset_fill_func, regset_store_func): New.
2314 (enum regset_type): New.
2315 (struct regset_info): Add type field. Use new operation types.
2316 (struct linux_target_ops): stop_pc renamed to get_pc.
2317 Add decr_pc_after_break and breakpoint_at.
2318 (get_process, get_thread_proess, get_process_thread)
2319 (strut process_info, all_processes, linux_attach_lwp)
2320 (thread_db_init): New.
2322 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2323 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2324 (the_low_target): Add new members.
2325 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2326 (i386_store_fpxregset): Constify.
2327 (target_regsets): Add new kind identifier.
2328 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2329 (i386_set_pc): Add debugging.
2330 (i386_breakpoint_at): New function.
2331 (the_low_target): Add new members.
2332 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2333 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2334 (mips_breakpoint_at): New.
2335 (the_low_target): Add new members.
2336 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2337 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2338 (the_low_target): Add new members.
2339 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2340 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2341 (the_low_target): Add new members.
2342 * linux-x86-64-low.c (target_regsets): Add new kind
2345 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2347 From Martin Pool <mbp@samba.org>:
2348 * server.c (gdbserver_usage): New function.
2351 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2353 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2356 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2358 * Makefile.in: Remove obsolete code.
2360 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2362 * linux-low.c (regsets_fetch_inferior_registers),
2363 (regsets_store_inferior_registers): Removed cast to int from
2365 * regcache.h: Added declaration of struct inferior_info.
2367 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2369 * inferiors.c (struct inferior_info): Add regcache_data.
2370 (add_inferior): Call create_register_cache.
2371 (clear_inferiors): Call free_register_cache.
2372 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2373 * regcache.c (struct inferior_regcache_data): New.
2374 (registers): Remove.
2375 (get_regcache): New function.
2376 (create_register_cache, free_register_cache): New functions.
2377 (set_register_cache): Don't initialize the register cache here.
2378 (registers_to_string, registers_from_string, register_data): Call
2380 * regcache.h: Add prototypes.
2381 * server.h: Likewise.
2383 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2385 * mem-break.c: New file.
2386 * mem-break.h: New file.
2387 * Makefile.in: Add mem-break.o rule; update server.h
2389 * inferiors.c (struct inferior_info): Add target_data
2391 (clear_inferiors): Free target_data member if set.
2392 (inferior_target_data, set_inferior_target_data): New functions.
2393 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2394 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2395 * linux-low.c (linux_bp_reinsert): New variable.
2396 (struct inferior_linux_data): New.
2397 (linux_create_inferior): Use set_inferior_target_data.
2398 (linux_attach): Likewise. Call add_inferior.
2399 (linux_wait_for_one_inferior): New function.
2400 (linux_wait): Call it.
2401 (linux_write_memory): Add const.
2402 (initialize_low): Call set_breakpoint_data.
2403 * linux-low.h (struct linux_target_ops): Add breakpoint
2405 * server.c (attach_inferior): Remove extra add_inferior
2407 * server.h: Include mem-break.h. Update inferior.c
2409 * target.c (read_inferior_memory)
2410 (write_inferior_memory): New functions.
2411 * target.h (read_inferior_memory)
2412 (write_inferior_memory): Change macros to prototypes.
2413 (struct target_ops): Update comments. Add const to write_memory
2416 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2418 * linux-low.c (usr_store_inferior_registers): Support
2419 registers which are allowed to fail to store.
2420 * linux-low.h (linux_target_ops): Likewise.
2421 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2422 (ppc_cannot_store_register): FPSCR may not be storable.
2424 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2426 * server.h: Include <string.h> if HAVE_STRING_H.
2427 * ChangeLog: Correct paths in last ChangeLog entry.
2429 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2431 * linux-low.h: Remove obsolete prototypes.
2432 (struct linux_target_ops): New.
2433 (extern the_low_target): New.
2434 * linux-low.c (num_regs, regmap): Remove declarations.
2435 (register_addr): Use the_low_target explicitly.
2436 (fetch_register): Likewise.
2437 (usr_fetch_inferior_registers): Likewise.
2438 (usr_store_inferior_registers): Likewise.
2439 * linux-arm-low.c (num_regs): Remove.
2440 (arm_num_regs): Define.
2441 (arm_regmap): Renamed from regmap, made static.
2442 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2444 (arm_cannot_store_register): Renamed from cannot_store_register,
2446 (the_low_target): New.
2447 * linux-i386-low.c (num_regs): Remove.
2448 (i386_num_regs): Define.
2449 (i386_regmap): Renamed from regmap, made static.
2450 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2452 (i386_cannot_store_register): Renamed from cannot_store_register,
2454 (the_low_target): New.
2455 * linux-ia64-low.c (num_regs): Remove.
2456 (ia64_num_regs): Define.
2457 (ia64_regmap): Renamed from regmap, made static.
2458 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2460 (ia64_cannot_store_register): Renamed from cannot_store_register,
2462 (the_low_target): New.
2463 * linux-m68k-low.c (num_regs): Remove.
2464 (m68k_num_regs): Define.
2465 (m68k_regmap): Renamed from regmap, made static.
2466 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2468 (m68k_cannot_store_register): Renamed from cannot_store_register,
2470 (the_low_target): New.
2471 * linux-mips-low.c (num_regs): Remove.
2472 (mips_num_regs): Define.
2473 (mips_regmap): Renamed from regmap, made static.
2474 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2476 (mips_cannot_store_register): Renamed from cannot_store_register,
2478 (the_low_target): New.
2479 * linux-ppc-low.c (num_regs): Remove.
2480 (ppc_num_regs): Define.
2481 (ppc_regmap): Renamed from regmap, made static.
2482 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2484 (ppc_cannot_store_register): Renamed from cannot_store_register,
2486 (the_low_target): New.
2487 * linux-s390-low.c (num_regs): Remove.
2488 (s390_num_regs): Define.
2489 (s390_regmap): Renamed from regmap, made static.
2490 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2492 (s390_cannot_store_register): Renamed from cannot_store_register,
2494 (the_low_target): New.
2495 * linux-sh-low.c (num_regs): Remove.
2496 (sh_num_regs): Define.
2497 (sh_regmap): Renamed from regmap, made static.
2498 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2500 (sh_cannot_store_register): Renamed from cannot_store_register,
2502 (the_low_target): New.
2503 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2504 (the_low_target): New.
2506 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2508 * Makefile.in: Add stamp-h target.
2509 * configure.in: Create stamp-h.
2510 * configure: Regenerated.
2512 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2514 * inferiors.c: New file.
2515 * target.c: New file.
2516 * target.h: New file.
2517 * Makefile.in: Add target.o and inferiors.o. Update
2519 * linux-low.c (inferior_pid): New static variable,
2520 moved from server.c.
2521 (linux_create_inferior): Renamed from create_inferior.
2522 Call add_inferior. Return 0 on success instead of a PID.
2523 (linux_attach): Renamed from myattach.
2524 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2525 (linux_thread_alive): Renamed from mythread_alive.
2526 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2528 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2529 (regsets_store_inferior_registers): Correct error message.
2530 Add missing ``return 0''.
2531 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2532 (linux_store_registers): Renamed from store_inferior_registers.
2533 (linux_read_memory): Renamed from read_inferior_memory.
2534 (linux_write_memory): Renamed from write_inferior_memory.
2535 (linux_target_ops): New structure.
2536 (initialize_low): Call set_target_ops ().
2537 * remote-utils.c (unhexify): New function.
2538 (hexify): New function.
2539 (input_interrupt): Send signals to ``signal_pid''.
2540 * server.c (inferior_pid): Remove.
2541 (start_inferior): Update create_inferior call.
2542 (attach_inferior): Call add_inferior.
2543 (handle_query): New function.
2544 (main): Call handle_query for `q' packets.
2545 * server.h: Include "target.h". Remove obsolete prototypes.
2546 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2548 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2550 * Makefile.in: Add WARN_CFLAGS. Update configury
2552 * configure.in: Check for <string.h>
2553 * configure: Regenerate.
2554 * config.in: Regenerate.
2555 * gdbreplay.c: Include needed system headers.
2556 (remote_open): Remove strchr prototype.
2557 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2558 * regcache.c (supply_register): Change buf argument to const void *.
2559 (supply_register_by_name): Likewise.
2560 (collect_register): Change buf argument to void *.
2561 (collect_register_by_name): Likewise.
2562 * regcache.h: Add missing prototypes.
2563 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2564 * server.c (handle_query): New function.
2565 (attached): New static variable, moved out of main.
2566 (main): Quiet longjmp clobber warnings.
2567 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2568 * utils.c (error): Remove NORETURN.