1 2008-10-21 Doug Evans <dje@google.com>
3 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
4 (READLINE_DIR,READLINE_DEP): Delete.
5 (INTERNAL_CFLAGS): Update.
8 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11 whole argv from the last run, not just argv[0].
13 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15 * regcache.c (new_register_cache): Return NULL if the register
16 cache size isn't known yet.
17 (free_register_cache): Avoid dereferencing a NULL regcache.
19 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
21 * configure.srv: Merge MIPS and MIPS64.
23 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
25 * Makefile.in (uninstall): Apply $(EXEEXT) too.
27 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
29 * Makefile.in: Add required vsx dependencies.
31 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
32 Declare init_registers_powerpc_vsx32l.
33 Declare init_registers_powerpc_vsx64l.
34 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
35 (ppc_arch_setup): Check for VSX in hwcap.
36 (ppc_fill_vsxregset): New function.
37 (ppc_store_vsxregset): New function.
38 Add new VSX entry in regset_info target_regsets.
40 * configure.srv: Add new VSX dependencies.
42 2008-08-12 Pedro Alves <pedro@codesourcery.com>
44 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
45 (remote_open): Set or clear transport_is_reliable.
46 (putpkt_binary): Don't expect acks in noack mode.
47 (getpkt): Don't send ack/nac in noack mode.
48 * server.c (handle_general_set): Handle QStartNoAckMode.
49 (handle_query): If connected by tcp pass QStartNoAckMode+ in
51 (main): Reset noack_mode on every connection.
52 * server.h (noack_mode): Declare.
54 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
56 * Makefile.in (GDBREPLAY_OBS): New variable.
57 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
59 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
60 Daniel Jacobowitz <dan@codesourcery.com>
62 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
63 (usr_store_inferior_registers): Likewise.
64 (regsets_store_inferior_registers): Likewise.
66 2008-07-31 Rolf Jansen <rj@surtec.com>
67 Pedro Alves <pedro@codesourcery.com>
69 * configure.ac: Check for memmem declaration.
70 * server.c [HAVE_MALLOC_H]: Include malloc.h.
71 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
72 (disable_packet_qfThreadInfo): Unconditionally compile.
73 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
74 * configure, config.in: Regenerate.
76 2008-07-28 Doug Kwan <dougkwan@google.com>
78 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
79 (linux_write_memory): Remove declaration of errno.
81 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
83 * linux-low.c (handle_extended_wait): Do not use "status"
84 variable uninitialized.
86 2008-07-07 Pedro Alves <pedro@codesourcery.com>
88 * server.c (handle_v_attach): Inhibit reporting dll changes.
90 2008-06-27 Pedro Alves <pedro@codesourcery.com>
92 * remote-utils.c (prepare_resume_reply): If requested, don't
93 output "thread:TID" in the T stop reply.
95 * server.c (disable_packet_vCont, disable_packet_Tthread)
96 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
97 (handle_query): If requested, disable support for qC, qfThreadInfo
99 (handle_v_requests): If requested, disable support for vCont.
100 (gdbserver_show_disableable): New.
101 (main): Handle --disable-packet and --disable-packet=LIST.
103 * server.h (disable_packet_vCont, disable_packet_Tthread)
104 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
106 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
108 * server.c (gdbserver_usage): Mention --version.
110 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
112 * Makefile.in (gdbreplay.o): New rule.
114 2008-06-06 Joseph Myers <joseph@codesourcery.com>
116 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
117 message, not gdbserver.
119 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
120 Nathan Sidwell <nathan@codesourcery.com>
121 Joseph Myers <joseph@codesourcery.com>
123 * acinclude.m4: Include ../../config/acx.m4.
124 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
125 * configure, config.in: Regenerate.
126 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
127 * server.c (gdbserver_version): Print PKGVERSION.
128 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
129 (main): Adjust gdbserver_usage calls.
130 * gdbreplay.c (version, host_name): Add declarations.
131 (gdbreplay_version, gdbreplay_usage): New.
132 (main): Accept --version and --help options.
134 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
136 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
137 (arm_breakpoint_at): Handle Thumb.
138 (the_low_target): Add comment.
140 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
142 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
144 2008-05-09 Doug Evans <dje@google.com>
146 * server.h (decode_search_memory_packet): Declare.
147 * remote-utils.c (decode_search_memory_packet): New fn.
148 * server.c (handle_search_memory_1): New fn.
149 (handle_search_memory): New fn.
150 (handle_query): Process qSearch:memory packets.
152 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
154 * regcache.c (registers_length): Remove.
155 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
156 full register packet.
157 * regcache.h (registers_length): Remove prototype.
158 * server.h (PBUFSIZ): Define to 16384.
160 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
162 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
163 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
164 powerpc-64l.o, and powerpc-altivec64l.o.
165 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
166 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
167 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
168 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
169 rs6000/power-linux.xml, and rs6000/power64-linux.xml
172 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
173 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
174 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
175 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
176 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
177 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
178 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
179 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
180 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
181 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
184 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
185 (init_registers_powerpc_32l): ... this new prototype.
186 (init_registers_powerpc_32): Remove, replace by ...
187 (init_registers_powerpc_altivec32l): ... this new prototype.
188 (init_registers_powerpc_e500): Remove, replace by ...
189 (init_registers_powerpc_e500l): ... this new prototype.
190 (init_registers_ppc64): Remove, replace by ...
191 (init_registers_powerpc_64l): ... this new prototype.
192 (init_registers_powerpc_64): Remove, replace by ...
193 (init_registers_powerpc_altivec64l): ... this new prototype.
194 (ppc_num_regs): Set to 73.
195 (PT_ORIG_R3, PT_TRAP): Define if necessary.
196 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
197 (ppc_cannot_store_register): Handle orig_r3 and trap.
198 (ppc_arch_setup): Update init_registers_... calls.
199 (ppc_fill_gregset): Handle orig_r3 and trap.
201 * inferiors.c (clear_inferiors): Reset current_inferior.
203 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
205 * acinclude.m4: Add override.m4.
206 * configure: Regenerate.
208 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
210 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
211 initial call to init_register_ppc64.
213 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
215 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
216 powerpc*-*-linux* case.
217 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
219 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
221 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
222 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
224 * linux-ppc-low.c: Include <elf.h>.
225 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
226 (ppc_hwcap): New global variable.
227 (ppc_regmap): Remove __SPE__ #ifdef sections.
228 (ppc_regmap_e500): New global variable.
229 (ppc_cannot_store_register): Update __SPE__ special case.
230 (ppc_get_hwcap): New function.
231 (ppc_arch_setup): Use it to determine whether inferior supports
232 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
233 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
234 Do not access registers if target does not support AltiVec.
235 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
236 Do not access registers if target does not support SPE.
237 (target_regsets): Unconditionally include AltiVec and SPE regsets.
239 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
241 * linux-low.c (disabled_regsets, num_regsets): New.
242 (use_regsets_p): Delete.
243 (linux_wait_for_process): Clear disabled_regsets.
244 (regsets_fetch_inferior_registers): Check and set it.
245 (regsets_store_inferior_registers): Likewise.
246 (linux_fetch_registers, linux_store_registers): Do not use
248 (initialize_low): Allocate disabled_regsets.
250 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
252 * Makefile.in (LIBOBJS): New.
254 (memmem.o): New rule.
255 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
256 * configure: Regenerated.
258 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
260 * server.c (handle_query): Never return "unsupported" for
261 qXfer:features:read queries.
263 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
265 * server.c (get_features_xml): Fix inverted condition.
266 (handle_query): Always support qXfer:feature:read.
268 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
270 * server.c (wrapper_argv): New.
271 (start_inferior): Handle wrapper_argv. If set, expect an extra
273 (gdbserver_usage): Document --wrapper.
274 (main): Parse --wrapper.
276 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
278 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
279 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
280 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
281 (ppc_set_pc): Likewise.
282 (ppc_arch_setup): New function.
283 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
285 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
287 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
289 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
290 instead of linux-ppc64-low.o.
291 * linux-ppc64-low.c: Remove file.
292 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
293 (linux-ppc64-low.o): Remove rule.
295 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
296 (init_registers_powerpc_64): Likewise.
297 (ppc_regmap): Conditionally define depending on __powerpc64__.
298 (ppc_cannot_store_register): Do not special-case "fpscr" when
299 compiled on __powerpc64__.
300 (ppc_collect_ptrace_register): New function.
301 (ppc_supply_ptrace_register): New function.
302 (ppc_breakpoint): Change type to "unsigned int".
303 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
304 (the_low_target): Conditionally provide initializers for the
305 arch_setup member depending on __powerpc64__. Install
306 collect_ptrace_register and supply_ptrace_register members.
308 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
310 * regcache.h (gdbserver_xmltarget): Add extern declaration.
311 * server.c (gdbserver_xmltarget): Define.
312 (get_features_xml): Use it to replace "target.xml" and arch_string.
314 * configure.srv: Remove srv_xmltarget. Add XML files that were
315 mentioned there to srv_xmlfiles instead. Remove conditional tests
316 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
317 srv_xmlfiles and srv_regobj to include all possible choices.
318 * configure.ac (srv_xmltarget): Remove.
319 (srv_xmlfiles): Do not add "target.xml".
320 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
321 checks for supplementary target information.
322 * configure: Regenerate.
323 * Makefile.in (XML_TARGET): Remove.
324 (target.xml): Remove rule.
325 (clean): Do not clean up target.xml.
326 (.PRECIOUS): Do not mention target.xml.
328 * target.h (struct target_ops): Remove arch_string member.
329 * linux-low.c (linux_arch_string): Remove.
330 (linux_target_ops): Remove arch_string initializer.
331 * linux-low.h (struct linux_target_ops): Remove arch_string member.
332 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
333 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
334 * spu-low.c (spu_arch_string): Remove.
335 (spu_target_ops): Remove arch_string initializer.
336 * win32-low.c (win32_arch_string): Remove.
337 (win32_target_ops): Remove arch_string initializer.
338 * win32-low.h (struct win32_target_ops): Remove arch_string member.
339 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
340 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
342 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
344 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
345 by collect_ptrace_register and supply_ptrace_register hooks.
346 * linux-low.c (fetch_register): Use supply_ptrace_register callback
347 instead of checking for the_low_target.left_pad_xfer.
348 (usr_store_inferior_registers): Use collect_ptrace_register callback
349 instead of checking for the_low_target.left_pad_xfer.
351 * linux-s390-low.c (s390_collect_ptrace_register): New function.
352 (s390_supply_ptrace_register): Likewise.
353 (s390_fill_gregset): Call s390_collect_ptrace_register.
354 (the_low_target): Update.
356 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
357 (ppc_supply_ptrace_register): Likewise.
358 (the_low_target): Update.
360 * linux-i386-low.c (the_low_target): Update.
361 * linux-x86-64-low.c (the_low_target): Update.
363 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
365 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
366 reg-s390.o and reg-s390x.o.
368 * linux-low.c (new_inferior): New global variable.
369 (linux_create_inferior, linux_attach): Set it.
370 (linux_wait_for_process): Call the_low_target.arch_setup after the
371 target has stopped for the first time.
372 (initialize_low): Do not call the_low_target.arch_setup.
374 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
375 (s390_set_pc): Likewise.
376 (s390_arch_setup): New function.
377 (the_low_target): Use s390_arch_setup as arch_setup routine.
379 * regcache.c (realloc_register_cache): New function.
380 (set_register_cache): Call it for each existing regcache.
382 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
384 * server.h (init_registers): Remove prototype.
386 * linux-low.h (struct linux_target_ops): Add arch_setup field.
387 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
388 instead of init_registers ().
389 * linux-arm-low.c (init_registers_arm): Add prototype.
390 (init_registers_arm_with_iwmmxt): Likewise.
391 (the_low_target): Add initializer for arch_setup field.
392 * linux-cris-low.c (init_registers_cris): Add prototype.
393 (the_low_target): Add initializer for arch_setup field.
394 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
395 (the_low_target): Add initializer for arch_setup field.
396 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
397 (the_low_target): Add initializer for arch_setup field.
398 * linux-ia64-low.c (init_registers_ia64): Add prototype.
399 (the_low_target): Add initializer for arch_setup field.
400 * linux-m32r-low.c (init_registers_m32r): Add prototype.
401 (the_low_target): Add initializer for arch_setup field.
402 * linux-m68k-low.c (init_registers_m68k): Add prototype.
403 (the_low_target): Add initializer for arch_setup field.
404 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
405 (init_registers_mips64_linux): Likewise.
406 (the_low_target): Add initializer for arch_setup field.
407 * linux-ppc-low.c (init_registers_ppc): Add prototype.
408 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
409 (the_low_target): Add initializer for arch_setup field.
410 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
411 (init_registers_powerpc_64): Likewise.
412 (the_low_target): Add initializer for arch_setup field.
413 * linux-s390-low.c (init_registers_s390): Add prototype.
414 (init_registers_s390x): Likewise.
415 (the_low_target): Add initializer for arch_setup field.
416 * linux-sh-low.c (init_registers_sh): Add prototype.
417 (the_low_target): Add initializer for arch_setup field.
418 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
419 (the_low_target): Add initializer for arch_setup field.
420 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
421 (the_low_target): Add initializer for arch_setup field.
423 * win32-low.h (struct win32_target_ops): Add arch_setup field.
424 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
425 instead of init_registers ().
426 * win32-arm-low.c (init_registers_arm): Add prototype.
427 (the_low_target): Add initializer for arch_setup field.
428 * win32-i386-low.c (init_registers_i386): Add prototype.
429 (the_low_target): Add initializer for arch_setup field.
431 * spu-low.c (init_registers_spu): Add prototype.
432 (initialize_low): Call initialie_registers_spu () instead of
433 initialize_registers ().
435 2008-02-19 Pedro Alves <pedro@codesourcery.com>
437 * server.c (handle_v_requests): When handling the vRun and vAttach
438 packets, if already debugging a process, don't kill it. Return an
441 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
443 * server.c (handle_query): Correct length check.
445 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
447 * win32-low.c (do_initial_child_stuff): Add process handle
448 parameter. Set current_process_handle and current_process_id from the
449 parameters. Clear globals.
450 (win32_create_inferior): Don't set current_process_handle and
451 current_process_id here. Instead pass them on the call to
452 do_initial_child_stuff.
453 (win32_attach): Likewise.
454 (win32_clear_inferiors): New.
455 (win32_kill): Don't close the current process handle or the
456 current thread handle here. Instead call win32_clear_inferiors.
457 (win32_detach): Don't open a new handle to the process. Call
458 win32_clear_inferiors.
459 (win32_join): Don't rely on current_process_handle; open a new
460 handle using the process id.
461 (win32_wait): Call win32_clear_inferiors when the inferior process
464 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
466 * server.c (monitor_show_help): Add "exit".
468 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
470 * Makefile.in (SFILES): Add linux-xtensa-low.c.
471 (clean): Add reg-xtensa.c.
472 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
473 * configure.srv (xtensa*-*-linux*) New target.
474 * linux-xtensa-low.c: New.
475 * xtensa-xtregs.c: New.
477 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
479 * hostio.c: Don't include errno.h.
480 (errno_to_fileio_errno): Move to hostio-errno.
481 * hostio.c: (hostio_error): Remove the error parameter. Defer the
482 error number outputting to the target->hostio_last_error callback.
483 (hostio_packet_error): Use FILEIO_EINVAL directly.
484 (handle_open, handle_pread, hostio_error, handle_unlink): Update
485 calls to hostio_error.
486 * hostio-errno.c: New.
487 * server.h (hostio_last_error_from_errno): Declare.
488 * target.h (target_ops): Add hostio_last_error member.
489 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
490 as hostio_last_error handler.
491 * spu-low.c (spu_target_ops): Likewise.
492 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
493 (wince_hostio_last_error): New functions.
494 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
495 as hostio_last_error handler.
496 (win32_target_ops) [!_WIN32_WCE]: Register
497 hostio_last_error_from_errno as hostio_last_error handler.
498 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
499 (hostio-errno.o): New rule.
500 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
501 * configure.srv (srv_hostio_err_objs): New variable. Default to
503 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
504 * configure: Regenerate.
506 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
508 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
509 (linux_kill, linux_detach): Clean up the process list.
510 * remote-utils.c (remote_open): Improve port number parsing.
511 (putpkt_binary, input_interrupt): Only send interrupts if the target
513 * server.c (extended_protocol): Make static.
514 (attached): Define earlier.
515 (exit_requested, response_needed, program_argv): New variables.
516 (target_running): New.
517 (start_inferior): Clear attached here.
518 (attach_inferior): Set attached here.
519 (require_running): Define.
520 (handle_query): Use require_running and target_running. Implement
522 (handle_v_attach, handle_v_run): New.
523 (handle_v_requests): Use require_running. Handle vAttach and vRun.
524 (gdbserver_usage): Update.
525 (main): Redo argument parsing. Handle --debug and --multi. Handle
526 --attach along with other options or after the port. Save
527 program_argv. Support no initial program. Resynchronize
528 communication with GDB after an error. Handle "monitor exit".
529 Use require_running and target_running. Always allow the extended
530 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
531 restart in extended mode.
532 * README: Refer to the GDB manual. Update --attach usage.
534 2007-12-20 Andreas Schwab <schwab@suse.de>
536 * linux-low.c (STACK_SIZE): Define.
537 (linux_tracefork_child): Use it. Use __clone2 on ia64.
538 (linux_test_for_tracefork): Likewise.
540 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
542 * linux-low.c (linux_wait_for_event): Update messages. Do not
543 reinsert auto-delete breakpoints.
544 * mem-break.c (struct breakpoint): Change return type of handler to
546 (set_breakpoint_at): Update handler type.
547 (reinsert_breakpoint_handler): Return 1 instead of calling
549 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
551 (check_breakpoints): Delete auto-delete breakpoints and return 2.
552 * mem-break.h (set_breakpoint_at): Update handler type.
553 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
554 * win32-low.c (auto_delete_breakpoint): New.
555 (get_child_debug_event): Use it.
557 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
559 * configure.ac: Check for pread and pwrite.
560 * hostio.c (handle_pread): Fall back to lseek and read.
561 (handle_pwrite): Fall back to lseek and write.
562 * config.in, configure: Regenerated.
564 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
566 * server.c (myresume): Add own_buf argument.
567 (main): Update calls.
569 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
571 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
572 * remote-utils.c (remote_open): Do not call disable_async_io.
573 (block_async_io): Delete.
574 (unblock_async_io): Make static.
575 (initialize_async_io): New.
576 * server.c (handle_v_cont): Handle async I/O here.
577 (myresume): Likewise. Move other common resume tasks here...
578 (main): ... from here. Call initialize_async_io. Disable async
579 I/O before the main loop.
580 * server.h (initialize_async_io): Declare.
581 (block_async_io, unblock_async_io): Delete prototypes.
582 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
584 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
586 * remote-utils.c (readchar): Allow binary data in received messages.
588 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
590 * win32-low.c (attaching): New global.
591 (win32_create_inferior): Clear the `attaching' global.
592 (win32_attach): Set the `attaching' global.
593 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
594 attaching. Only set a breakpoint at the entry point if not
597 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
599 * server.c (main): Don't report dll events on the initial
600 connection on attaches.
602 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
604 * server.c (main): Relax numerical bases supported for the pid of
605 the --attach command line argument.
607 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
609 * win32-low.c (win32_attach): Call OpenProcess before
610 DebugActiveProcess, not after. Add last error output to error
613 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
615 * win32-low.c (win32_get_thread_context)
616 (win32_set_thread_context): New functions.
617 (thread_rec): Use win32_get_thread_context.
618 (continue_one_thread, win32_resume): Use win32_set_thread_context.
619 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
623 Pedro Alves <pedro_alves@portugalmail.pt>
625 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
627 (child_add_thread): Minor cleanup.
628 (child_continue): Resume artificially suspended threads before
629 calling ContinueDebugEvent.
630 (suspend_one_thread): New.
631 (fake_breakpoint_event): New.
632 (get_child_debug_event): Change return type to int. Check here if
633 gdb sent an interrupt request. If a soft interrupt was requested,
634 fake a breakpoint event. Return 0 if there is no event to handle,
636 (win32_wait): Don't check here if gdb sent an interrupt request.
637 Ensure there is a valid event to handle.
638 (win32_request_interrupt): Add soft interruption method as last
642 Pedro Alves <pedro_alves@portugalmail.pt>
644 * win32-low.h (win32_thread_info): Add descriptions to the
645 structure members. Replace `suspend_count' counter by a
647 * win32-low.c (thread_rec): Update condition of when to get the
648 context from the inferior. Rely on ContextFlags being set if it
649 has already been retrieved. Only suspend the inferior thread if
650 we haven't already. Warn if that fails.
651 (continue_one_thread): s/suspend_count/suspended/. Only call
652 ResumeThread once. Warn if that fails.
654 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
656 * win32-low.c (win32_wait): Don't read from the inferior when it
659 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
661 * Makefile.in (win32_low_h): New variable.
662 (win32-low.o): Add dependency on $(win32_low_h).
663 (win32-arm-low.o, win32-i386-low.o): New rules.
665 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
667 * hostio.c: Correct copyright year.
669 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
671 * Makefile.in (OBS): Add hostio.o.
672 (hostio.o): New rule.
673 * server.h (handle_vFile): Declare.
674 * hostio.c: New file.
675 * server.c (handle_v_requests): Take packet_len and new_packet_len
676 for binary packets. Call handle_vFile.
677 (main): Update call to handle_v_requests.
679 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
681 * linux-low.c: Include <sched.h>.
683 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
685 * linux-low.c (linux_tracefork_grandchild): New.
686 (linux_tracefork_child): Use clone.
687 (linux_test_for_tracefork): Use clone; allocate and free a stack.
689 2007-10-31 Joel Brobecker <brobecker@adacore.com>
691 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
693 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
695 * linux-low.c (handle_extended_wait): Handle unexpected signals.
697 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
699 * inferiors.c (change_inferior_id): Delete.
700 (add_pid_to_list, pull_pid_from_list): New.
701 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
702 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
703 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
704 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
705 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
706 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
707 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
708 (using_threads): Always set to 1.
709 (handle_extended_wait): New.
710 (add_process): Do not set TID.
711 (linux_create_inferior): Set must_set_ptrace_flags.
712 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
713 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
714 (linux_thread_alive): Rename TID argument to LWPID.
715 (linux_wait_for_process): Handle unknown processes. Do not use TID.
716 (linux_wait_for_event): Do not use TID or check using_threads. Update
717 call to dead_thread_notify. Call handle_extended_wait.
718 (linux_create_inferior): Use PTRACE_SETOPTIONS.
719 (send_sigstop): Delete sigstop_sent.
720 (wait_for_sigstop): Avoid TID.
721 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
722 (linux_test_for_tracefork): New.
723 (linux_lookup_signals): Use thread_db_active and
724 linux_supports_tracefork_flag.
725 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
726 * linux-low.h (get_process_thread): Avoid TID.
727 (struct process_ifo): Move thread_known and tid to the end. Remove
729 (linux_attach_lwp, thread_db_init): Update prototypes.
730 * server.h (change_inferior_id): Delete prototype.
731 (add_pid_to_list, pull_pid_from_list): New prototypes.
732 * thread-db.c (thread_db_use_events): New.
733 (find_first_thread): Rename to...
734 (find_one_thread): ...this. Update callers and messages. Do not
735 call fatal. Check thread_db_use_events. Do not call
736 change_inferior_id or new_thread_notify.
737 (maybe_attach_thread): Update. Do not call new_thread_notify.
738 (thread_db_init): Set thread_db_use_events. Check use_events.
739 * utils.c (fatal, warning): Correct message prefix.
741 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
743 * Makefile.in (clean): Remove new files.
744 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
745 (powerpc-64.o, powerpc-64.c): New rules.
746 * configure.srv: Use alternate register sets for powerpc64-*-linux*
747 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
749 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
751 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
752 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
753 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
754 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
755 (target_regsets): Add AltiVec and SPE register sets.
756 * configure.ac: Check for AltiVec and SPE.
757 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
758 (ppc_fill_vrregset, ppc_store_vrregset): New.
759 (target_regsets): Add AltiVec register set.
760 * configure: Regenerated.
762 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
764 * linux-low.c (O_LARGEFILE): Define.
765 (linux_read_memory): Use /proc/PID/mem.
766 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
767 * configure, config.in: Regenerated.
769 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
771 * linux-low.c (linux_wait_for_event): Do not pass signals while
774 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
776 * win32-low.c (create_process): New.
777 (win32_create_inferior): Use create_process instead of
778 CreateProcess. If create_process failed retry appending an ".exe"
779 suffix. Store the GetLastError result immediatelly after
780 create_process calls and use it on the call to error.
782 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
784 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
786 2007-08-23 Joel Brobecker <brobecker@adacore.com>
788 * configure.ac: Switch license to GPLv3.
790 2007-08-01 Michael Snyder <msnyder@access-company.com>
792 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
794 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
796 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
798 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
799 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
800 CloseToolhelp32Snapshot.
801 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
802 CloseToolhelp32Snapshot.
804 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
806 * server.c (main): Check for inferior exit before main loop.
808 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
810 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
811 instead of on tmp_desc.
813 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
814 Daniel Jacobowitz <dan@codesourcery.com>
816 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
817 (add_thread): Minor cleanups.
818 (clear_inferiors): Move lower in the file. Clear the DLL
820 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
821 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
822 (xml_escape_text): New.
823 * server.c (handle_query): Handle qXfer:libraries:read. Report it
825 (handle_v_cont): Report errors.
826 (gdbserver_version): Update.
827 (main): Correct size of own_buf. Do not report initial DLL events.
828 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
829 (unloaded_dll, xml_escape_text): New.
830 * win32-low.c (enum target_waitkind): Update comments.
831 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
832 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
833 (win32_EnumProcessModules, win32_GetModuleInformation)
834 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
835 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
836 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
837 (win32_Module32First, win32_Module32Next, load_toolhelp)
838 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
839 (get_child_debug_event): Handle DLL events.
840 (win32_wait): Likewise.
842 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
844 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
845 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
847 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
849 * win32-low.c (handle_output_debug_string): Ignore event if not
852 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
854 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
856 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
858 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
860 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
862 * inferiors.c (change_inferior_id): Add comment.
863 * linux-low.c (check_removed_breakpoint): Add an early
864 prototype. Improve debug output.
865 (linux_attach): Doc update.
866 (linux_detach_one_process, linux_detach): Clean up before releasing
868 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
869 * linux-low.h (struct process_info): Doc improvement.
870 * mem-break.c (delete_all_breakpoints): New.
871 * mem-break.h (delete_all_breakpoints): New prototype.
872 * thread-db.c (find_first_thread): New.
873 (thread_db_create_event): Call it instead of
874 thread_db_find_new_threads. Clean up unused variables.
875 (maybe_attach_thread): Remove first thread handling.
876 (thread_db_find_new_threads): Use find_first_thread.
877 (thread_db_get_tls_address): Likewise.
879 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
881 * thread-db.c (thread_db_find_new_threads): Add prototype.
882 (thread_db_create_event): Check for the main thread before adding
884 (maybe_attach_thread): Only enable event reporting if TID == 0.
885 (thread_db_get_tls_address): Check for new threads.
887 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
889 * linux-low.c (linux_create_inferior): Try execv before execvp.
890 * spu-low.c (spu_create_inferior): Likewise.
892 2007-06-13 Mike Frysinger <vapier@gentoo.org>
894 * linux-low.c (linux_create_inferior): Change execv to execvp.
895 * spu-low.c (spu_create_inferior): Likewies.
897 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
899 * Makefile.in (clean): Clean new files instead of deleted ones.
900 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
901 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
903 * configure.srv: Specify XML files and new regformats for MIPS and
905 * linux-mips-low.c (mips_num_regs): Set to only used registers.
906 (mips_regmap): Do not fetch $0. Remove unused registers. Add
907 an entry for the restart register.
908 (mips_cannot_fetch_register, mips_cannot_store_register)
909 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
910 register names to match the XML descriptions.
911 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
912 restart register instead of $0.
914 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
915 Markus Deuling <deuling@de.ibm.com>
917 * remote-utils.c (decode_xfer_write): New function.
918 * server.h (decode_xfer_write): Add prototype.
919 * server.c (handle_query): Add PACKET_LEN argument. Support
920 qXfer:spu:read and qXfer:spu:write packets.
921 (main): Pass packet_len to handle_query.
922 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
923 * target.h (target_ops): Add qxfer_spu.
925 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
927 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
928 accessing non-seekable spufs files.
930 2007-05-16 Markus Deuling <deuling@de.ibm.com>
932 * server.c (handle_query): Add reply for qC packet.
934 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
935 Leo Zayas <lerele@champenstudios@com>
937 * server.h (check_remote_input_interrupt_request): New function.
938 * remote_utils.c (INVALID_DESCRIPTOR): New define.
939 (remote_desc): Initialize with INVALID_DESCRIPTOR.
940 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
941 (check_remote_input_interrupt_request): New function.
942 * server.h (check_remote_input_interrupt_request): Declare.
943 * win32-low.c (winapi_DebugBreakProcess,
944 winapi_GenerateConsoleCtrlEvent): New typedefs.
945 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
947 (win32_wait): Check for remote interrupt request
948 with check_remote_input_interrupt_request.
949 (win32_request_interrupt): New function.
950 (win32_target_op): Set request_interrupt to win32_request_interrupt.
952 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
954 * win32-low.c (debug_registers_changed,
955 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
956 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
957 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
958 (thread_rec): Get context using the low target.
959 (child_add_thread): Call thread_added on the low target,
960 which does the same thing.
962 (do_initial_child_stuff): Remove debug registers references.
963 Set context using the low target. Resume threads after
964 setting the contexts.
965 (child_continue): Remove dead variable. Remove debug
966 registers references.
967 (child_fetch_inferior_registers): Go through the low target.
968 (do_child_store_inferior_registers): Remove.
969 (child_store_inferior_registers): Go through the low target.
970 (win32_resume): Remove debug registers references.
971 Set context using the low target.
972 (handle_exception): Change return type to void. Don't record
973 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
974 first chance exception.
975 (get_child_debug_event): Change return type to void. Remove
976 goto loop. Always return after waiting for debug event.
977 (win32_wait): Convert to switch statement. Handle spurious
980 * win32-i386-low.c (debug_registers_changed,
981 debug_registers_used): New.
982 (initial_stuff): Rename to ...
983 (i386_initial_stuff): ... this. Clear debug registers
985 (store_debug_registers): Delete.
986 (i386_get_thread_context): New.
987 (load_debug_registers): Delete.
988 (i386_set_thread_context): New.
989 (i386_thread_added): New.
990 (single_step): Rename to ...
991 (i386_single_step): ... this.
992 (do_fetch_inferior_registers): Rename to ...
993 (i386_fetch_inferior_register): ... this.
994 (i386_store_inferior_register): New.
995 (the_low_target): Adapt to new interface.
997 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
998 (arm_get_thread_context): New.
999 (arm_set_thread_context): New.
1001 (do_fetch_inferior_registers): Rename to ...
1002 (arm_fetch_inferior_register): ... this.
1003 (arm_store_inferior_register): New.
1004 (arm_wince_breakpoint): Reimplement as unsigned long.
1005 (arm_wince_breakpoint_len): Define.
1006 (the_low_target): Adapt to new interface.
1008 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
1009 load_debug_registers. Add get_thread_context, set_thread_context,
1010 thread_added and store_inferior_register. Rename
1011 fetch_inferior_registers to fetch_inferior_register.
1012 (regptr): Remove declaration.
1014 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1016 * linux-low.c (linux_detach): Change return type to int. Return 0.
1017 * spu-low.c (spu_detach): Likewise.
1019 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1021 * target.h (target_ops): Change return type of detach to int.
1023 (join_inferior): New.
1024 * server.c (main): Don't skip detach support on mingw32.
1025 If the inferior doesn't support detaching return error.
1026 Call join_inferior instead of using waitpid.
1027 * linux-low.c (linux_join): New.
1028 (linux_target_op): Add linux_join.
1029 * spu-low.c (spu_join): New.
1030 (spu_target_ops): Add spu_join.
1031 * win32-low.c (win32_detach): Adapt to new interface.
1032 Reopen current_process_handle before detaching. Issue a child
1033 resume before detaching.
1035 (win32_target_op): Add win32_join.
1037 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1039 * win32-low.c (win32-attach): Fix return value.
1040 * target.h (target_ops): Describe ATTACH return values.
1042 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1044 * win32-low.c (GETPROCADDRESS): Define.
1045 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
1046 (winapi_DebugSetProcessKillOnExit): Likewise.
1047 (win32_create_inferior): Force usage of ansi CreateProcessA.
1048 (win32_attach): Use GETPROCADDRESS.
1049 (win32_detach): Likewise.
1051 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1053 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1055 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1057 * win32-low.c: Commit leftover changes from 2007-03-29.
1059 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1061 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1062 fields short instead of int. Add explicit padding.
1063 (i387_cache_to_fsave): Remove unnecessary casts.
1064 (i387_fsave_to_cache): Doc fix.
1065 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1067 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1069 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1070 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1072 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1074 * configure.srv (arm*-*-mingw32ce*): Move near the other
1077 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1079 * configure.ac: Add errno checking.
1080 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1081 sys/file.h and malloc.h.
1082 (AC_CHECK_DECLS): Add perror.
1083 (srv_mingwce): Handle.
1084 * configure.srv (i[34567]86-*-cygwin*): Add
1085 win32-i386-low.o to srv_tgtobj.
1086 (i[34567]86-*-mingw*): Likewise.
1087 (arm*-*-mingw32ce*): Add case.
1088 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1089 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1090 [__MINGW32CE__] (strerror): New function.
1091 [__MINGW32CE__] (errno): Define to GetLastError.
1092 [__MINGW32CE__] (COUNTOF): New macro.
1093 (remote_open): Remove extra close call.
1094 * mem-break.c (delete_breakpoint_at): New function.
1095 * mem-break.h (delete_breakpoint_at): Declare.
1096 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1097 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1098 [USE_WIN32API] (read, write): Add char* casts.
1099 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1100 * server.h: Include wincecompat.h on Windows CE.
1101 [HAVE_ERRNO_H]: Check.
1102 (perror): Declare if not declared.
1103 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1104 (perror_with_name): Remove errno declaration.
1105 * wincecompat.h: New.
1106 * wincecompat.c: New.
1108 * win32-arm-low.c: New.
1109 * win32-i386-low.c: New.
1110 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1111 (OUTMSG2): Make it safe.
1113 (COUNTOF): New macro.
1114 (NUM_REGS): Get it from the low target.
1115 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1116 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1117 (thread_rec): Let low target handle debug registers.
1118 (child_add_thread): Likewise.
1119 (child_init_thread_list): Likewise.
1120 (continue_one_thread): Likewise.
1122 (do_child_fetch_inferior_registers): Move to ...
1123 * win32-i386-low.c: ... here, and rename to ...
1124 (do_fetch_inferior_registers): ... this.
1125 * win32-low.c (child_fetch_inferior_registers):
1126 Go through the low target.
1127 (do_child_store_inferior_registers): Use regptr.
1128 (strwinerror): New function.
1129 (win32_create_inferior): Handle Windows CE.
1130 Use strwinerror instead of strerror on Windows error
1131 codes. Add program to the error output.
1132 Don't close the main thread handle on Windows CE.
1133 (win32_attach): Use coredll.dll on Windows CE.
1134 (win32_kill): Close current process and current
1136 (win32_detach): Use coredll.dll on Windows CE.
1137 (win32_resume): Let low target handle debug registers, and
1139 (handle_exception): Add/Remove initial breakpoint. Avoid
1140 non-existant WSTOPSIG on Windows CE.
1141 (win32_read_inferior_memory): Cast to remove warning.
1142 (win32_arch_string): Go through the low target.
1143 (initialize_low): Call set_breakpoint_data with the low
1144 target's breakpoint.
1145 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1146 FOP_REGNUM, mappings): Move to ...
1147 * win32-i386-low.c: ... here.
1148 * win32-low.c (win32_thread_info): Move to ...
1149 * win32-low.h: ... here.
1150 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1151 win32-arm-low.c and wincecompat.c.
1152 (all:): Add $EXEEXT.
1153 (install-only:): Likewise.
1154 (gdbserver:): Likewise.
1155 (gdbreplay:): Likewise.
1156 * config.in: Regenerate.
1157 * configure: Regenerate.
1159 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1161 * win32-low.c: Rename typedef thread_info to
1162 win32_thread_info throughout.
1164 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1166 * win32-i386-low.c: Rename to ...
1167 * win32-low.c: ... this.
1168 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1169 * Makefile.in: Likewise.
1171 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1173 * remote-utils.c (monitor_output): Constify msg parameter.
1174 * server.h (monitor_output): Likewise.
1175 * win32-i386-low.c (handle_output_debug_string): New.
1176 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1177 handle_output_debug_string.
1178 (get_child_debug_event): Likewise.
1180 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1182 * server.c (main): Correct strtoul check.
1184 2007-03-27 Jon Ringle <jon@ringle.org>
1186 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1188 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1190 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1192 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1194 * terminal.h: Check HAVE_SGTTY_H.
1196 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1198 * remote-utils.c (remote_open): Print out the assigned port number.
1200 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1202 * remote-utils.c (monitor_output): New function.
1203 * server.c (debug_threads): Define here.
1204 (monitor_show_help): New function.
1205 (handle_query): Handle qRcmd.
1206 (main): Do not handle 'd' packet.
1207 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1208 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1211 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1213 * Makefile.in (EXEEXT): New.
1214 (clean): Use $(EXEEXT).
1216 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1218 * target.h (target_ops): Rename send_signal to request_interrupt,
1219 and remove enum target_signal parameter.
1220 * linux-low.c (linux_request_interrupt): Rename from
1221 linux_send_signal, and always send SIGINT.
1222 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1223 and always send SIGINT.
1224 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1226 (input_interrupt): Likewise.
1228 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1230 * server.c (get_features_xml): Check if target implemented
1232 * win32-i386-low.c (win32_arch_string): New.
1233 (win32_target_ops): Add win32_arch_string as arch_string member.
1235 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1237 * spu-low.c (spu_arch_string): New.
1238 (spu_target_ops): Add spu_arch_string.
1240 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1242 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1243 * configure.ac: Do not check for terminal.h.
1244 * configure, config.in: Regenerated.
1246 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1248 * Makefile.in (OBS): Add $(XML_BUILTIN).
1249 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1251 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1252 (arm-with-iwmmxt.c): New.
1253 * config.in, configure: Regenerate.
1254 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1255 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1256 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1257 (arm*-*-linux*): Add iWMMXt and regset support.
1258 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1259 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1260 (arm_store_wmmxregset, target_regsets): New.
1261 * server.c (get_features_xml): Take annex argument. Check builtin
1263 (handle_query): Handle multiple annexes.
1265 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1267 * remote-utils.c [USE_WIN32API] (read, write): Define.
1268 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1271 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1273 * linux-i386-low.c (the_low_target): Set arch_string.
1274 * linux-x86-64-low.c (the_low_target): Likewise.
1275 * linux-low.c (linux_arch_string): New.
1276 (linux_target_ops): Add it.
1277 * linux-low.h (struct linux_target_ops): Add arch_string.
1278 * server.c (write_qxfer_response): Use const void * for DATA.
1279 (get_features_xml): New.
1280 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1281 * target.h (struct target_ops): Add arch_string method.
1283 2007-01-03 Denis Pilat <denis.pilat@st.com>
1284 Daniel Jacobowitz <dan@codesourcery.com>
1286 * linux-low.c (linux_kill): Handle being called with no threads.
1287 * win32-i386-low.c (win32_kill): Likewise.
1288 (get_child_debug_event): Clear current_process_handle.
1290 2006-12-30 Denis PILAT <denis.pilat@st.com>
1291 Daniel Jacobowitz <dan@codesourcery.com>
1293 * remote-utils.c (remote_open): Check the type of specified
1294 serial port devices before opening them.
1295 * server.c (main): Kill the inferior if an error occurs during
1296 the first remote_open.
1298 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1300 * README: Update supported targets.
1302 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1304 * Makefile.in (clean): Remove reg-mips64.c.
1305 (reg-mips64.c, reg-mips64.o): New rules.
1306 * configure.srv: Handle mips64. Include regset support for mips.
1307 * linux-mips-low.c (union mips_register): New.
1308 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1309 (mips_breakpoint, mips_breakpoint_at): Use int.
1310 (mips_collect_register, mips_supply_register)
1311 (mips_collect_register_32bit, mips_supply_register_32bit)
1312 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1313 (mips_store_fpregset, target_regsets): New.
1314 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1316 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1318 * configure.srv: Add target "spu*-*-*".
1319 * Makefile.in (clean): Remove reg-spu.c.
1320 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1321 * spu-low.c: New file.
1323 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1325 * configure.ac: Correct td_thr_tls_get_addr test.
1326 * configure: Regenerated.
1328 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1330 * linux-low.c (linux_wait_for_event): Reformat. Use the
1332 * remote-utils.c (decode_address_to_semicolon): New.
1333 * server.c (pass_signals, handle_general_set): New.
1334 (handle_query): Mention QPassSignals for qSupported.
1335 (main): Call handle_general_set.
1336 * server.h (pass_signals, decode_address_to_semicolon): New.
1338 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1340 * server.c (handle_query): Correct error handling for read_auxv.
1342 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1344 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1345 and srv_linux_thread_db to yes.
1346 * linux-s390-low.c (s390_fill_gregset): New function.
1347 (target_regsets): Define data structure.
1349 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1351 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1352 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1353 * config.in, configure: Regenerated.
1354 * inferiors.c (gdb_id_to_thread): New function.
1355 (gdb_id_to_thread_id): Use it.
1356 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1357 * linux-low.h (struct process_info): Add th member.
1358 (thread_db_get_tls_address): New prototype.
1359 * remote-utils.c (decode_address): Make non-static.
1360 * server.c (handle_query): Handle qGetTLSAddr.
1361 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1362 * target.h (struct target_ops): Add get_tls_address.
1363 * thread-db.c (maybe_attach_thread): Save the thread handle.
1364 (thread_db_get_tls_address): New.
1366 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1368 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1369 (linux_resume_one_process): Take a siginfo_t *. Update all
1370 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1371 (struct pending_signals): Add a siginfo_t.
1372 (linux_wait_for_process): Always set last_status.
1373 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1374 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1375 * linux-low.h (struct process_info): Add last_status.
1377 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1379 * remote-utils.c (try_rle): New function.
1380 (putpkt_binary): Use it.
1382 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1384 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1385 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1386 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1387 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1388 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1391 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1393 * server.c (terminal_fd): New variable.
1394 (old_foreground_pgrp): Likewise.
1395 (restore_old_foreground_pgrp): New function.
1396 (start_inferior): Record the terminal file descriptor in terminal_fd
1397 and its original foreground group in old_foreground_pgrp. Register
1398 restore_old_foreground_pgrp with atexit().
1400 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1402 * server.c (handle_query): Correct qPart to qXfer.
1404 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1406 * configure.ac: Check for more headers which are missing on
1407 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1408 * configure.srv: Add Cygwin and mingw32.
1409 * remote-utils.c: Don't include headers unconditionally which
1410 are missing on mingw32. Include <winsock.h> for mingw32.
1411 (remote_open): Adjust for mingw32 support. Flush
1412 standard error after writing to it.
1413 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1414 (unblock_async_io, enable_async_io, disable_async_io)
1415 (readchar, getpkt): Update for Winsock support.
1416 (prepare_resume_reply): Expect a protocol signal number.
1417 * server.c: Disable <sys/wait.h> on mingw32.
1418 (start_inferior): Adjust for mingw32 support. Flush
1419 standard error after writing to it.
1420 (attach_inferior): Likewise. Use protocol signal
1422 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1424 * win32-i386-low.c: New file.
1425 * Makefile.in (XM_CLIBS): Set.
1426 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1427 (win32-i386-low.o): New dependency rule.
1428 * linux-low.c (linux_wait): Use target signal numbers.
1429 * target.h (struct target_ops): Doc fix.
1430 * server.h (target_signal_to_name): New prototype.
1431 * gdbreplay.c: Don't include headers unconditionally which
1432 are missing on mingw32. Include <winsock.h> for mingw32.
1433 (remote_close, remote_open): Adjust for Winsock support.
1434 * configure, config.in: Regenerated.
1436 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1438 * server.c (decode_xfer_read, write_qxfer_response): New.
1439 (handle_query): Take a packet length argument. Handle
1440 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1441 the qSupported response.
1442 (main): Update call to handle_query.
1444 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1446 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1447 (putpkt_binary): Renamed from putpkt and adjusted for binary
1449 (putpkt): New wrapper for putpkt_binary.
1450 (readchar): Don't mask off the high bit.
1451 (decode_X_packet): New function.
1452 * server.c (main): Call putpkt_binary if a handler sets the packet
1453 length. Save the length of the incoming packet. Handle 'X'.
1454 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1456 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1458 * server.c (handle_query): Handle qSupported.
1460 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1462 * remote-utils.c (all_symbols_looked_up): New variable.
1463 (look_up_one_symbol): Check it.
1464 * server.h (look_up_one_symbol): New declaration.
1465 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1467 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1469 * Makefile.in (linux-arm-low.o): Update dependencies.
1470 * linux-arm-low.c: Include "gdb_proc_service.h".
1471 (PTRACE_GET_THREAD_AREA): Define.
1472 (ps_get_thread_area): New function.
1474 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1476 * configure.srv (m68k*-*-uclinux*): New target.
1477 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1478 (linux_resume_one_process): Remove extraneous cast.
1479 (linux_read_offsets): New.
1480 (linux_target_op): Add linux_read_offsets on mmuless systems.
1481 * server.c (handle_query): Add qOffsets logic.
1482 * target.h (struct target_ops): Add read_offsets.
1484 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1486 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1487 (PTRACE_GET_THREAD_AREA): Define.
1488 (ps_get_thread_area): New function.
1489 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1490 (linux-x86-64-low.o): Update.
1492 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1494 * configure.ac: Remove checks for prfpregset_t.
1495 * gdb_proc_service.h: New file.
1496 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1497 new "gdb_proc_service.h".
1498 * proc-service.c: Likewise.
1499 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1500 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1501 * Makefile.in (gdb_proc_service_h): Updated.
1502 * configure, config.in: Regenerated.
1504 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1506 * remote-utils.c (prepare_resume_reply): Move declaration
1507 of gdb_id_from_wait to the top of the block.
1509 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1511 * linux-low.c (regsets_store_inferior_registers): Read the regset
1512 from the target before filling it.
1514 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1516 * server.c (attach_inferior): Return SIGTRAP for a successful
1519 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1521 * Makefile.in (OBS): Add version.o.
1522 (STAGESTUFF): Delete.
1523 (version.o): Add dependencies.
1524 (version.c): Replace rule.
1525 (clean): Remove version.c.
1526 * server.c (gdbserver_version): New.
1527 (gdbserver_usage): Use printf.
1528 (main): Handle --version and --help.
1529 * server.h (version, host_name): Add declarations.
1531 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1543 * linux-x86-64-low.c:
1546 * linux-ppc64-low.c:
1555 * linux-crisv32-low.c:
1567 * gdbserver.1: Add (C) after Copyright. Update the FSF
1570 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1572 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1573 (arm_breakpoint_at): Recognize both breakpoints.
1574 (the_low_target): Use the correct breakpoint instruction.
1576 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1578 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1579 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1580 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1581 (the_low_target): Update.
1583 2005-10-25 Andreas Schwab <schwab@suse.de>
1585 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1587 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1588 (ia64_num_regs): Reduce to 462.
1590 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1592 * acinclude.m4: Correct quoting.
1593 * aclocal.m4: Regenerated.
1595 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1596 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1597 (thread_db_init): Call thread_db_err_str.
1598 * configure.ac: Check for TD_VERSION.
1599 * config.in, configure: Regenerated.
1601 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1603 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1605 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1607 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1608 is not available. Define HAVE_PTRACE_GETREGS if it is.
1609 * config.in, configure: Regenerated.
1610 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1611 * linux-i386-low.c, linux-m68k-low.c: Update to use
1612 HAVE_PTRACE_GETREGS.
1613 * linux-low.c (regsets_fetch_inferior_registers)
1614 (regsets_store_inferior_registers): Only return 0 if we processed
1616 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1617 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1619 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1621 * inferiors.c (struct thread_info): Add gdb_id.
1622 (add_thread): Add gdb_id argument.
1623 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1624 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1625 calls to add_thread.
1626 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1627 * server.c (handle_query): Use thread_to_gdb_id.
1628 (handle_v_cont, main): Use gdb_id_to_thread_id.
1629 * server.h (add_thread): Update prototype.
1630 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1633 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1635 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1636 left-padded registers.
1637 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1638 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1640 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1642 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1643 * configure: Regenerate.
1644 * config.in: Regenerate.
1645 * server.h (NEED_DECLARATION_STRERROR):
1646 Replace with !HAVE_DECL_STRERROR.
1648 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1650 * linux-low.c (linux_wait, linux_send_signal): Don't test
1651 an unsigned long variable for > 0 if it could be MAX_ULONG.
1652 * server.c (myresume): Likewise.
1653 * target.c (set_desired_inferior): Likewise.
1655 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1657 * configure.ac: Simplify and improve check for socklen_t.
1658 * configure, config.in: Regenerate.
1660 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1662 * acconfig.h: Remove.
1663 * configure.ac: Add a test for socklen_t. Use three-argument
1664 AC_DEFINE throughout.
1665 * config.in: Regenerated using autoheader 2.59.
1666 * configure: Regenerated.
1668 * gdbreplay.c (socklen_t): Provide a default.
1669 (remote_open): Use socklen_t.
1670 * remote-utils.c (socklen_t): Provide a default.
1671 (remote_open): Use socklen_t.
1672 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1675 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1677 * linux-low.c (linux_read_memory, linux_write_memory)
1678 (linux_read_auxv): Likewise.
1679 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1680 (check_mem_write): Likewise.
1681 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1683 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1684 (registers_from_string, register_data): Likewise.
1685 * server.c (handle_query, main): Likewise.
1686 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1687 (decode_M_packet): Likewise.
1688 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1689 * target.h (struct target_ops): Update read_memory, write_memory,
1691 (read_inferior_memory, write_inferior_memory): Update.
1692 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1694 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1695 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1696 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1697 linux-s390-low.c, linux-sh-low.c: Update for changes in
1698 read_inferior_memory and the_low_target->breakpoint.
1700 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1702 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1703 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1704 * configure.srv: Add powerpc64-*-linux*.
1705 * linux-ppc64-low.c: New file.
1707 2005-05-23 Orjan Friberg <orjanf@axis.com>
1709 * linux-cris-low.c: New file with support for CRIS.
1710 * linux-crisv32-low.c: Ditto for CRISv32.
1711 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1712 (clean): Add reg-cris.c and reg-crisv32.c.
1713 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1714 reg-crisv32.o, and reg-crisv32.c to make rules.
1715 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1718 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1720 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1721 of sizeof (PTRACE_XFER_TYPE).
1722 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1724 2005-05-12 Orjan Friberg <orjanf@axis.com>
1726 * target.h (struct target_ops): Add insert_watchpoint,
1727 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1728 pointers for hardware watchpoint support.
1729 * linux-low.h (struct linux_target_ops): Ditto.
1730 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1731 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1732 to linux_target_ops.
1733 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1735 * server.c (main): Recognize 'Z' and 'z' packets.
1737 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1739 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1740 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1741 (the_low_target): Add new members.
1743 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1745 * proc-service.c (ps_lgetregs): Search all_processes instead of
1748 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1750 * server.c (start_inferior): Change return type to int.
1751 (attach_inferior): Change sigptr to int *.
1752 (handle_v_cont, handle_v_requests): Change signal to int *.
1753 (main): Change signal to int.
1755 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1757 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1758 * configure.srv: Add m32r*-*-linux*.
1759 * linux-m32r-low.c: New file.
1761 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1763 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1765 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1767 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1768 Take unsigned long arguments for PIDs.
1769 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1770 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1771 (wait_for_sigstop, linux_resume_one_process)
1772 (regsets_fetch_inferior_registers, linux_send_signal)
1773 (linux_read_auxv): Likewise. Update the types of variables holding
1774 PIDs. Update format string specifiers.
1775 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1776 * remote-utils.c (prepare_resume_reply): Likewise.
1777 * server.c (cont_thread, general_thread, step_thread)
1778 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1780 (handle_query): Update format specifiers.
1781 (handle_v_cont, main): Use strtoul for thread IDs.
1782 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1783 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1784 (general_thread, step_thread, thread_from_wait)
1785 (old_thread_from_wait): Update.
1786 * target.h (struct thread_resume): Use unsigned long for THREAD.
1787 (struct target_ops): Use unsigned long for arguments to attach and
1790 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1792 * acinclude.m4: Include bfd/bfd.m4 directly.
1793 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1794 <agriffis@toolchain.org>.
1795 * aclocal.m4, configure: Regenerated.
1797 2005-01-07 Andrew Cagney <cagney@gnu.org>
1799 * configure.ac: Rename configure.in, require autoconf 2.59.
1800 * configure: Re-generate.
1802 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1804 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1806 * aclocal.m4: Regenerated.
1807 * configure: Regenerated.
1809 2004-11-21 Andreas Schwab <schwab@suse.de>
1811 * linux-m68k-low.c (m68k_num_gregs): Define.
1812 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1813 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1814 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1815 (m68k_breakpoint_at): New. Add to the_low_target.
1817 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1818 srv_linux_thread_db to yes.
1820 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1822 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1823 (ARCH_SET_FS): Likewise.
1824 (ARCH_GET_FS): Likewise.
1825 (ARCH_GET_GS): Likewise.
1827 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1829 * linux-i386-low.c (ps_get_thread_area): New.
1830 * linux-x86-64-low.c (ps_get_thread_area): New.
1831 * linux-low.c: Include <sys/syscall.h>.
1832 (linux_kill_one_process): Don't kill the first thread here.
1833 (linux_kill): Kill the first thread here.
1834 (kill_lwp): New function.
1835 (send_sigstop, linux_send_signal): Use it.
1836 * proc-service.c: Clean up #ifdefs.
1837 (fpregset_info): Delete.
1838 (ps_lgetregs): Update and enable implementation.
1839 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1841 * remote-utils.c (struct sym_cache, symbol_cache): New.
1842 (input_interrupt): Print a clearer message.
1843 (async_io_enabled): New variable.
1844 (enable_async_io, disable_async_io): Use it. Update comments.
1845 (look_up_one_symbol): Use the symbol cache.
1846 * thread-db.c (thread_db_look_up_symbols): New function.
1847 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1849 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1851 * configure.in: Test for -rdynamic.
1852 * configure: Regenerated.
1853 * Makefile (INTERNAL_LDFLAGS): New.
1854 (gdbserver, gdbreplay): Use it.
1856 2004-09-02 Andrew Cagney <cagney@gnu.org>
1858 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1860 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1862 * linux-low.c (linux_wait): Clear all_processes list also.
1864 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1866 * linux-low.c: Include <errno.h>. Remove extern declaration of
1869 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1871 * gdbreplay.c, server.h, utils.c: Update copyright years.
1873 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1875 * server.c (main): Print child status or termination signal from
1876 variable 'signal', not 'sig'.
1878 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1880 * linux-low.c (linux_read_memory): Change return type to
1881 int. Check for and return error from ptrace().
1882 * target.c (read_inferior_memory): Change return type to int. Pass
1883 back return status from the_target->read_memory().
1884 * target.h (struct target_ops): Adapt *read_memory() prototype.
1886 (read_inferior_memory): Adapt prototype.
1887 * server.c (main): Return an error packet if
1888 read_inferior_memory() returns an error.
1890 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1892 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1893 Unify with other clean targets.
1895 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1897 * server.c (handle_v_cont): Call set_desired_inferior.
1899 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1901 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1903 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1905 * linux-low.c (linux_wait): Unblock async I/O.
1906 (linux_resume): Block and enable async I/O.
1907 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1908 * server.h (block_async_io, unblock_async_io): Add prototypes.
1910 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1912 * remote-utils.c (remote_open): Print a status notice after
1914 * server.c (attach_inferior): Print a status notice after
1917 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1919 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1921 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1923 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1925 * server.c, target.h: Update copyright years.
1927 2004-02-25 Roland McGrath <roland@redhat.com>
1929 * target.h (struct target_ops): New member `read_auxv'.
1930 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1931 * linux-low.c (linux_read_auxv): New function.
1932 (linux_target_ops): Initialize `read_auxv' member to that.
1934 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1936 Committed by Jim Blandy <jimb@redhat.com>.
1938 * linux-s390-low.c (s390_num_regs): Update.
1939 (s390_regmap): Remove control registers. Use __s390x__ predefine
1940 instead of GPR_SIZE to distiguish s390 and s390x targets.
1942 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1944 * linux-low.c: Update copyright year.
1945 (check_removed_breakpoint): Clear pending_is_breakpoint.
1946 (linux_set_resume_request, linux_queue_one_thread)
1947 (resume_status_pending_p): New functions.
1948 (linux_continue_one_thread): Use process->resume.
1949 (linux_resume): Only resume threads if there are no pending events.
1950 * linux-low.h (struct process_info): Add resume request
1953 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1955 * regcache.c (new_register_cache): Clear the allocated register
1956 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1958 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1960 * linux-low.c (linux_resume): Take a struct thread_resume *
1962 (linux_wait): Update call.
1963 (resume_ptr): New static variable.
1964 (linux_continue_one_thread): Renamed from
1965 linux_continue_one_process. Use resume_ptr.
1966 (linux_resume): Use linux_continue_one_thread.
1967 * server.c (handle_v_cont, handle_v_requests): New functions.
1968 (myresume): New function.
1969 (main): Handle 'v' case.
1970 * target.h (struct thread_resume): New type.
1971 (struct target_ops): Change argument of "resume" to struct
1973 (myresume): Delete macro.
1975 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1977 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1978 (uninstall): Support DESTDIR.
1980 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1982 * configure.srv: Add xscale*linux copy of arm*linux entry.
1984 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1986 * linux-arm-low.c (arm_reinsert_addr): New function.
1987 (the_low_target): Add arm_reinsert_addr.
1989 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1991 * mem-break.c: Remove whitespace at end of file.
1993 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1995 * configure.in: Check whether we need to prototype strerror.
1996 * server.h: Optionally prototype strerror.
1997 * gdbreplay.c (perror_with_name): Use strerror.
1998 * linux-low.c (linux_attach_lwp): Use strerror.
1999 * utils.c (perror_with_name): Use strerror.
2000 * config.in, configure: Regenerated.
2002 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
2004 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
2005 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
2007 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
2009 * Makefile.in (SFILES): Update.
2010 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
2011 low-sun3.c: Remove files.
2013 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
2015 * linux-low.c: Move comment to linux_thread_alive where it belonged.
2016 (linux_detach_one_process, linux_detach): New functions.
2017 (linux_target_ops): Add linux_detach.
2018 * server.c (main): Handle 'D' packet.
2019 * target.h (struct target_ops): Add "detach" member.
2020 (detach_inferior): Define.
2022 2003-06-13 Mark Kettenis <kettenis@gnu.org>
2024 From Kelley Cook <kelleycook@wideopenwest.com>:
2025 * configure.srv: Accept i[34567]86 variants.
2027 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2029 * linux-low.c (linux_wait_for_event): Correct comment typos.
2030 (linux_resume_one_process): Call check_removed_breakpoint.
2031 (linux_send_signal): New function.
2032 (linux_target_ops): Add linux_send_signal.
2033 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
2035 * target.h (struct target_ops): Add send_signal.
2037 2003-05-29 Jim Blandy <jimb@redhat.com>
2039 * linux-low.c (usr_store_inferior_registers): Transfer buf in
2040 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
2041 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
2042 away part of the register's value.
2044 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
2046 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
2047 (linux_wait_for_event, linux_init_signals): Likewise.
2049 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
2051 * configure.in: Check for stdlib.h.
2052 * configure: Regenerated.
2053 * config.in: Regenerated.
2055 2003-01-04 Andreas Schwab <schwab@suse.de>
2057 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2059 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2061 * Makefile.in: Remove obsolete code.
2063 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2065 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2066 defined(PT_FPR0_HI).
2068 2002-11-17 Stuart Hughes <seh@zee2.com>
2070 * linux-arm-low.c (arm_num_regs): Increase.
2071 (arm_regmap): Include status register.
2073 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2075 * linux-low.c (register_addr): Remove incorrect -1 check.
2077 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2079 * linux-low.c (linux_create_inferior): Call setpgid. Return
2081 (unstopped_p, linux_signal_pid): Remove.
2082 (linux_target_ops): Remove linux_signal_pid.
2083 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2084 global instead of target method.
2085 * target.h (struct target_ops): Remove signal_pid. Update comment
2086 for create_inferior.
2087 * server.c (signal_pid): New variable.
2088 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2089 gdbserver. Set the child to be the foreground process group.
2090 (attach_inferior): Set signal_pid.
2092 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2094 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2096 2002-08-20 Jim Blandy <jimb@redhat.com>
2098 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2101 2002-08-01 Andrew Cagney <cagney@redhat.com>
2103 * Makefile.in: Make chill references obsolete.
2105 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2107 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2108 * configure: Regenerate.
2109 * config.in: Regenerate.
2111 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2113 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2114 (perror_with_name, remote_close, remote_open, expect, play): Static.
2116 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2118 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2119 byte offsets instead of an array of indexes.
2120 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2122 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2124 * regcache.c: Add comment.
2126 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2128 * thread-db.c: New file.
2129 * proc-service.c: New file.
2130 * acinclude.m4: New file.
2131 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2132 proc-service.o, and thread-db.o.
2133 (linux-low.o): Add USE_THREAD_DB.
2134 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2135 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2136 * aclocal.m4: Regenerated.
2137 * config.in: Regenerated.
2138 * configure: Regenerated.
2139 * configure.in: Check for proc_service.h, sys/procfs.h,
2140 thread_db.h, and linux/elf.h headrs.
2141 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2142 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2143 Check for -lthread_db and thread support.
2144 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2145 PowerPC, and SuperH.
2146 * i387-fp.c: Constify arguments.
2147 * i387-fp.h: Likewise.
2148 * inferiors.c: (struct thread_info): Renamed from
2149 `struct inferior_info'. Remove PID member. Use generic inferior
2150 list header. All uses updated.
2151 (inferiors, signal_pid): Removed.
2152 (all_threads): New variable.
2153 (get_thread): Define.
2154 (add_inferior_to_list): New function.
2155 (for_each_inferior): New function.
2156 (change_inferior_id): New function.
2157 (add_inferior): Removed.
2158 (remove_inferior): New function.
2159 (add_thread): New function.
2160 (free_one_thread): New function.
2161 (remove_thread): New function.
2162 (clear_inferiors): Use for_each_inferior and free_one_thread.
2163 (find_inferior): New function.
2164 (find_inferior_id): New function.
2165 (inferior_target_data): Update argument type.
2166 (set_inferior_target_data): Likewise.
2167 (inferior_regcache_data): Likewise.
2168 (set_inferior_regcache_data): Likewise.
2169 * linux-low.c (linux_bp_reinsert): Remove.
2170 (all_processes, stopping_threads, using_thrads)
2171 (struct pending_signals, debug_threads, pid_of): New.
2172 (inferior_pid): Replace with macro.
2173 (struct inferior_linux_data): Remove.
2174 (get_stop_pc, add_process): New functions.
2175 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2176 Use add_process and add_thread.
2177 (linux_attach_lwp): New function, based on old linux_attach. Use
2178 add_process and add_thread. Set stop_expected for new threads.
2179 (linux_attach): New function.
2180 (linux_kill_one_process): New function.
2181 (linux_kill): Kill all LWPs.
2182 (linux_thread_alive): Use find_inferior_id.
2183 (check_removed_breakpoints, status_pending_p): New functions.
2184 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2185 Update. Use WNOHANG. Wait for cloned processes also. Update process
2186 struct for the found process.
2187 (linux_wait_for_event): New function.
2188 (linux_wait): Use it. Support LWPs.
2189 (send_sigstop, wait_for_sigstop, stop_all_processes)
2190 (linux_resume_one_process, linux_continue_one_process): New functions.
2191 (linux_resume): Support LWPs.
2192 (REGISTER_RAW_SIZE): Remove.
2193 (fetch_register): Use register_size instead. Call supply_register.
2194 (usr_store_inferior_registers): Likewise. Call collect_register.
2196 (regsets_fetch_inferior_registers): Improve error message.
2197 (regsets_store_inferior_registers): Add debugging.
2198 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2199 (unstopped_p, linux_signal_pid): New functions.
2200 (linux_target_ops): Add linux_signal_pid.
2201 (linux_init_signals): New function.
2202 (initialize_low): Call it. Initialize using_threads.
2203 * regcache.c (inferior_regcache_data): Add valid
2205 (get_regcache): Fetch registers lazily. Add fetch argument
2206 and update all callers.
2207 (regcache_invalidate_one, regcache_invalidate): New
2209 (new_register_cache): Renamed from create_register_cache.
2210 Return the new regcache.
2211 (free_register_cache): Change argument to a void *.
2212 (registers_to_string, registers_from_string): Call get_regcache
2213 with fetch flag set.
2214 (register_data): Make static. Pass fetch flag to get_regcache.
2215 (supply_register): Call get_regcache with fetch flag clear.
2216 (collect_register): Call get_regcache with fetch flag set.
2217 (collect_register_as_string): New function.
2218 * regcache.h: Update.
2219 * remote-utils.c (putpkt): Flush after debug output and use
2221 Handle input interrupts while waiting for an ACK.
2222 (input_interrupt): Use signal_pid method.
2223 (getpkt): Flush after debug output and use stderr.
2224 (outreg): Use collect_register_as_string.
2225 (new_thread_notify, dead_thread_notify): New functions.
2226 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2228 (look_up_one_symbol): Flush after debug output.
2229 * server.c (step_thread, server_waiting): New variables.
2230 (start_inferior): Don't use signal_pid. Update call to mywait.
2231 (attach_inferior): Update call to mywait.
2232 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2233 (main): Don't fetch/store registers explicitly. Use
2234 set_desired_inferior. Support proposed ``Hs'' packet. Update
2237 (struct inferior_list, struct_inferior_list_entry): New.
2238 * target.c (set_desired_inferior): New.
2239 (write_inferior_memory): Constify.
2240 (mywait): New function.
2242 (struct target_ops): New signal_pid method.
2243 (mywait): Removed macro, added prototype.
2245 * linux-low.h (regset_func): Removed.
2246 (regset_fill_func, regset_store_func): New.
2247 (enum regset_type): New.
2248 (struct regset_info): Add type field. Use new operation types.
2249 (struct linux_target_ops): stop_pc renamed to get_pc.
2250 Add decr_pc_after_break and breakpoint_at.
2251 (get_process, get_thread_proess, get_process_thread)
2252 (strut process_info, all_processes, linux_attach_lwp)
2253 (thread_db_init): New.
2255 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2256 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2257 (the_low_target): Add new members.
2258 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2259 (i386_store_fpxregset): Constify.
2260 (target_regsets): Add new kind identifier.
2261 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2262 (i386_set_pc): Add debugging.
2263 (i386_breakpoint_at): New function.
2264 (the_low_target): Add new members.
2265 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2266 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2267 (mips_breakpoint_at): New.
2268 (the_low_target): Add new members.
2269 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2270 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2271 (the_low_target): Add new members.
2272 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2273 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2274 (the_low_target): Add new members.
2275 * linux-x86-64-low.c (target_regsets): Add new kind
2278 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2280 From Martin Pool <mbp@samba.org>:
2281 * server.c (gdbserver_usage): New function.
2284 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2286 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2289 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2291 * Makefile.in: Remove obsolete code.
2293 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2295 * linux-low.c (regsets_fetch_inferior_registers),
2296 (regsets_store_inferior_registers): Removed cast to int from
2298 * regcache.h: Added declaration of struct inferior_info.
2300 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2302 * inferiors.c (struct inferior_info): Add regcache_data.
2303 (add_inferior): Call create_register_cache.
2304 (clear_inferiors): Call free_register_cache.
2305 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2306 * regcache.c (struct inferior_regcache_data): New.
2307 (registers): Remove.
2308 (get_regcache): New function.
2309 (create_register_cache, free_register_cache): New functions.
2310 (set_register_cache): Don't initialize the register cache here.
2311 (registers_to_string, registers_from_string, register_data): Call
2313 * regcache.h: Add prototypes.
2314 * server.h: Likewise.
2316 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2318 * mem-break.c: New file.
2319 * mem-break.h: New file.
2320 * Makefile.in: Add mem-break.o rule; update server.h
2322 * inferiors.c (struct inferior_info): Add target_data
2324 (clear_inferiors): Free target_data member if set.
2325 (inferior_target_data, set_inferior_target_data): New functions.
2326 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2327 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2328 * linux-low.c (linux_bp_reinsert): New variable.
2329 (struct inferior_linux_data): New.
2330 (linux_create_inferior): Use set_inferior_target_data.
2331 (linux_attach): Likewise. Call add_inferior.
2332 (linux_wait_for_one_inferior): New function.
2333 (linux_wait): Call it.
2334 (linux_write_memory): Add const.
2335 (initialize_low): Call set_breakpoint_data.
2336 * linux-low.h (struct linux_target_ops): Add breakpoint
2338 * server.c (attach_inferior): Remove extra add_inferior
2340 * server.h: Include mem-break.h. Update inferior.c
2342 * target.c (read_inferior_memory)
2343 (write_inferior_memory): New functions.
2344 * target.h (read_inferior_memory)
2345 (write_inferior_memory): Change macros to prototypes.
2346 (struct target_ops): Update comments. Add const to write_memory
2349 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2351 * linux-low.c (usr_store_inferior_registers): Support
2352 registers which are allowed to fail to store.
2353 * linux-low.h (linux_target_ops): Likewise.
2354 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2355 (ppc_cannot_store_register): FPSCR may not be storable.
2357 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2359 * server.h: Include <string.h> if HAVE_STRING_H.
2360 * ChangeLog: Correct paths in last ChangeLog entry.
2362 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2364 * linux-low.h: Remove obsolete prototypes.
2365 (struct linux_target_ops): New.
2366 (extern the_low_target): New.
2367 * linux-low.c (num_regs, regmap): Remove declarations.
2368 (register_addr): Use the_low_target explicitly.
2369 (fetch_register): Likewise.
2370 (usr_fetch_inferior_registers): Likewise.
2371 (usr_store_inferior_registers): Likewise.
2372 * linux-arm-low.c (num_regs): Remove.
2373 (arm_num_regs): Define.
2374 (arm_regmap): Renamed from regmap, made static.
2375 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2377 (arm_cannot_store_register): Renamed from cannot_store_register,
2379 (the_low_target): New.
2380 * linux-i386-low.c (num_regs): Remove.
2381 (i386_num_regs): Define.
2382 (i386_regmap): Renamed from regmap, made static.
2383 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2385 (i386_cannot_store_register): Renamed from cannot_store_register,
2387 (the_low_target): New.
2388 * linux-ia64-low.c (num_regs): Remove.
2389 (ia64_num_regs): Define.
2390 (ia64_regmap): Renamed from regmap, made static.
2391 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2393 (ia64_cannot_store_register): Renamed from cannot_store_register,
2395 (the_low_target): New.
2396 * linux-m68k-low.c (num_regs): Remove.
2397 (m68k_num_regs): Define.
2398 (m68k_regmap): Renamed from regmap, made static.
2399 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2401 (m68k_cannot_store_register): Renamed from cannot_store_register,
2403 (the_low_target): New.
2404 * linux-mips-low.c (num_regs): Remove.
2405 (mips_num_regs): Define.
2406 (mips_regmap): Renamed from regmap, made static.
2407 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2409 (mips_cannot_store_register): Renamed from cannot_store_register,
2411 (the_low_target): New.
2412 * linux-ppc-low.c (num_regs): Remove.
2413 (ppc_num_regs): Define.
2414 (ppc_regmap): Renamed from regmap, made static.
2415 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2417 (ppc_cannot_store_register): Renamed from cannot_store_register,
2419 (the_low_target): New.
2420 * linux-s390-low.c (num_regs): Remove.
2421 (s390_num_regs): Define.
2422 (s390_regmap): Renamed from regmap, made static.
2423 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2425 (s390_cannot_store_register): Renamed from cannot_store_register,
2427 (the_low_target): New.
2428 * linux-sh-low.c (num_regs): Remove.
2429 (sh_num_regs): Define.
2430 (sh_regmap): Renamed from regmap, made static.
2431 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2433 (sh_cannot_store_register): Renamed from cannot_store_register,
2435 (the_low_target): New.
2436 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2437 (the_low_target): New.
2439 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2441 * Makefile.in: Add stamp-h target.
2442 * configure.in: Create stamp-h.
2443 * configure: Regenerated.
2445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2447 * inferiors.c: New file.
2448 * target.c: New file.
2449 * target.h: New file.
2450 * Makefile.in: Add target.o and inferiors.o. Update
2452 * linux-low.c (inferior_pid): New static variable,
2453 moved from server.c.
2454 (linux_create_inferior): Renamed from create_inferior.
2455 Call add_inferior. Return 0 on success instead of a PID.
2456 (linux_attach): Renamed from myattach.
2457 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2458 (linux_thread_alive): Renamed from mythread_alive.
2459 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2461 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2462 (regsets_store_inferior_registers): Correct error message.
2463 Add missing ``return 0''.
2464 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2465 (linux_store_registers): Renamed from store_inferior_registers.
2466 (linux_read_memory): Renamed from read_inferior_memory.
2467 (linux_write_memory): Renamed from write_inferior_memory.
2468 (linux_target_ops): New structure.
2469 (initialize_low): Call set_target_ops ().
2470 * remote-utils.c (unhexify): New function.
2471 (hexify): New function.
2472 (input_interrupt): Send signals to ``signal_pid''.
2473 * server.c (inferior_pid): Remove.
2474 (start_inferior): Update create_inferior call.
2475 (attach_inferior): Call add_inferior.
2476 (handle_query): New function.
2477 (main): Call handle_query for `q' packets.
2478 * server.h: Include "target.h". Remove obsolete prototypes.
2479 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2481 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2483 * Makefile.in: Add WARN_CFLAGS. Update configury
2485 * configure.in: Check for <string.h>
2486 * configure: Regenerate.
2487 * config.in: Regenerate.
2488 * gdbreplay.c: Include needed system headers.
2489 (remote_open): Remove strchr prototype.
2490 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2491 * regcache.c (supply_register): Change buf argument to const void *.
2492 (supply_register_by_name): Likewise.
2493 (collect_register): Change buf argument to void *.
2494 (collect_register_by_name): Likewise.
2495 * regcache.h: Add missing prototypes.
2496 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2497 * server.c (handle_query): New function.
2498 (attached): New static variable, moved out of main.
2499 (main): Quiet longjmp clobber warnings.
2500 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2501 * utils.c (error): Remove NORETURN.