1 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3 * Makefile.in (GDBREPLAY_OBS): New variable.
4 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
6 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
7 Daniel Jacobowitz <dan@codesourcery.com>
9 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10 (usr_store_inferior_registers): Likewise.
11 (regsets_store_inferior_registers): Likewise.
13 2008-07-31 Rolf Jansen <rj@surtec.com>
14 Pedro Alves <pedro@codesourcery.com>
16 * configure.ac: Check for memmem declaration.
17 * server.c [HAVE_MALLOC_H]: Include malloc.h.
18 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19 (disable_packet_qfThreadInfo): Unconditionally compile.
20 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
21 * configure, config.in: Regenerate.
23 2008-07-28 Doug Kwan <dougkwan@google.com>
25 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
26 (linux_write_memory): Remove declaration of errno.
28 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
30 * linux-low.c (handle_extended_wait): Do not use "status"
31 variable uninitialized.
33 2008-07-07 Pedro Alves <pedro@codesourcery.com>
35 * server.c (handle_v_attach): Inhibit reporting dll changes.
37 2008-06-27 Pedro Alves <pedro@codesourcery.com>
39 * remote-utils.c (prepare_resume_reply): If requested, don't
40 output "thread:TID" in the T stop reply.
42 * server.c (disable_packet_vCont, disable_packet_Tthread)
43 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
44 (handle_query): If requested, disable support for qC, qfThreadInfo
46 (handle_v_requests): If requested, disable support for vCont.
47 (gdbserver_show_disableable): New.
48 (main): Handle --disable-packet and --disable-packet=LIST.
50 * server.h (disable_packet_vCont, disable_packet_Tthread)
51 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
53 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
55 * server.c (gdbserver_usage): Mention --version.
57 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
59 * Makefile.in (gdbreplay.o): New rule.
61 2008-06-06 Joseph Myers <joseph@codesourcery.com>
63 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
64 message, not gdbserver.
66 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
67 Nathan Sidwell <nathan@codesourcery.com>
68 Joseph Myers <joseph@codesourcery.com>
70 * acinclude.m4: Include ../../config/acx.m4.
71 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
72 * configure, config.in: Regenerate.
73 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
74 * server.c (gdbserver_version): Print PKGVERSION.
75 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
76 (main): Adjust gdbserver_usage calls.
77 * gdbreplay.c (version, host_name): Add declarations.
78 (gdbreplay_version, gdbreplay_usage): New.
79 (main): Accept --version and --help options.
81 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
83 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
84 (arm_breakpoint_at): Handle Thumb.
85 (the_low_target): Add comment.
87 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
89 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
91 2008-05-09 Doug Evans <dje@google.com>
93 * server.h (decode_search_memory_packet): Declare.
94 * remote-utils.c (decode_search_memory_packet): New fn.
95 * server.c (handle_search_memory_1): New fn.
96 (handle_search_memory): New fn.
97 (handle_query): Process qSearch:memory packets.
99 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
101 * regcache.c (registers_length): Remove.
102 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
103 full register packet.
104 * regcache.h (registers_length): Remove prototype.
105 * server.h (PBUFSIZ): Define to 16384.
107 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
109 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
110 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
111 powerpc-64l.o, and powerpc-altivec64l.o.
112 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
113 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
114 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
115 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
116 rs6000/power-linux.xml, and rs6000/power64-linux.xml
119 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
120 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
121 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
122 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
123 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
124 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
125 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
126 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
127 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
128 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
131 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
132 (init_registers_powerpc_32l): ... this new prototype.
133 (init_registers_powerpc_32): Remove, replace by ...
134 (init_registers_powerpc_altivec32l): ... this new prototype.
135 (init_registers_powerpc_e500): Remove, replace by ...
136 (init_registers_powerpc_e500l): ... this new prototype.
137 (init_registers_ppc64): Remove, replace by ...
138 (init_registers_powerpc_64l): ... this new prototype.
139 (init_registers_powerpc_64): Remove, replace by ...
140 (init_registers_powerpc_altivec64l): ... this new prototype.
141 (ppc_num_regs): Set to 73.
142 (PT_ORIG_R3, PT_TRAP): Define if necessary.
143 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
144 (ppc_cannot_store_register): Handle orig_r3 and trap.
145 (ppc_arch_setup): Update init_registers_... calls.
146 (ppc_fill_gregset): Handle orig_r3 and trap.
148 * inferiors.c (clear_inferiors): Reset current_inferior.
150 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
152 * acinclude.m4: Add override.m4.
153 * configure: Regenerate.
155 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
157 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
158 initial call to init_register_ppc64.
160 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
162 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
163 powerpc*-*-linux* case.
164 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
166 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
168 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
169 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
171 * linux-ppc-low.c: Include <elf.h>.
172 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
173 (ppc_hwcap): New global variable.
174 (ppc_regmap): Remove __SPE__ #ifdef sections.
175 (ppc_regmap_e500): New global variable.
176 (ppc_cannot_store_register): Update __SPE__ special case.
177 (ppc_get_hwcap): New function.
178 (ppc_arch_setup): Use it to determine whether inferior supports
179 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
180 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
181 Do not access registers if target does not support AltiVec.
182 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
183 Do not access registers if target does not support SPE.
184 (target_regsets): Unconditionally include AltiVec and SPE regsets.
186 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
188 * linux-low.c (disabled_regsets, num_regsets): New.
189 (use_regsets_p): Delete.
190 (linux_wait_for_process): Clear disabled_regsets.
191 (regsets_fetch_inferior_registers): Check and set it.
192 (regsets_store_inferior_registers): Likewise.
193 (linux_fetch_registers, linux_store_registers): Do not use
195 (initialize_low): Allocate disabled_regsets.
197 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
199 * Makefile.in (LIBOBJS): New.
201 (memmem.o): New rule.
202 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
203 * configure: Regenerated.
205 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
207 * server.c (handle_query): Never return "unsupported" for
208 qXfer:features:read queries.
210 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
212 * server.c (get_features_xml): Fix inverted condition.
213 (handle_query): Always support qXfer:feature:read.
215 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
217 * server.c (wrapper_argv): New.
218 (start_inferior): Handle wrapper_argv. If set, expect an extra
220 (gdbserver_usage): Document --wrapper.
221 (main): Parse --wrapper.
223 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
225 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
226 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
227 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
228 (ppc_set_pc): Likewise.
229 (ppc_arch_setup): New function.
230 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
232 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
234 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
236 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
237 instead of linux-ppc64-low.o.
238 * linux-ppc64-low.c: Remove file.
239 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
240 (linux-ppc64-low.o): Remove rule.
242 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
243 (init_registers_powerpc_64): Likewise.
244 (ppc_regmap): Conditionally define depending on __powerpc64__.
245 (ppc_cannot_store_register): Do not special-case "fpscr" when
246 compiled on __powerpc64__.
247 (ppc_collect_ptrace_register): New function.
248 (ppc_supply_ptrace_register): New function.
249 (ppc_breakpoint): Change type to "unsigned int".
250 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
251 (the_low_target): Conditionally provide initializers for the
252 arch_setup member depending on __powerpc64__. Install
253 collect_ptrace_register and supply_ptrace_register members.
255 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
257 * regcache.h (gdbserver_xmltarget): Add extern declaration.
258 * server.c (gdbserver_xmltarget): Define.
259 (get_features_xml): Use it to replace "target.xml" and arch_string.
261 * configure.srv: Remove srv_xmltarget. Add XML files that were
262 mentioned there to srv_xmlfiles instead. Remove conditional tests
263 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
264 srv_xmlfiles and srv_regobj to include all possible choices.
265 * configure.ac (srv_xmltarget): Remove.
266 (srv_xmlfiles): Do not add "target.xml".
267 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
268 checks for supplementary target information.
269 * configure: Regenerate.
270 * Makefile.in (XML_TARGET): Remove.
271 (target.xml): Remove rule.
272 (clean): Do not clean up target.xml.
273 (.PRECIOUS): Do not mention target.xml.
275 * target.h (struct target_ops): Remove arch_string member.
276 * linux-low.c (linux_arch_string): Remove.
277 (linux_target_ops): Remove arch_string initializer.
278 * linux-low.h (struct linux_target_ops): Remove arch_string member.
279 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
280 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
281 * spu-low.c (spu_arch_string): Remove.
282 (spu_target_ops): Remove arch_string initializer.
283 * win32-low.c (win32_arch_string): Remove.
284 (win32_target_ops): Remove arch_string initializer.
285 * win32-low.h (struct win32_target_ops): Remove arch_string member.
286 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
287 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
289 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
291 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
292 by collect_ptrace_register and supply_ptrace_register hooks.
293 * linux-low.c (fetch_register): Use supply_ptrace_register callback
294 instead of checking for the_low_target.left_pad_xfer.
295 (usr_store_inferior_registers): Use collect_ptrace_register callback
296 instead of checking for the_low_target.left_pad_xfer.
298 * linux-s390-low.c (s390_collect_ptrace_register): New function.
299 (s390_supply_ptrace_register): Likewise.
300 (s390_fill_gregset): Call s390_collect_ptrace_register.
301 (the_low_target): Update.
303 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
304 (ppc_supply_ptrace_register): Likewise.
305 (the_low_target): Update.
307 * linux-i386-low.c (the_low_target): Update.
308 * linux-x86-64-low.c (the_low_target): Update.
310 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
312 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
313 reg-s390.o and reg-s390x.o.
315 * linux-low.c (new_inferior): New global variable.
316 (linux_create_inferior, linux_attach): Set it.
317 (linux_wait_for_process): Call the_low_target.arch_setup after the
318 target has stopped for the first time.
319 (initialize_low): Do not call the_low_target.arch_setup.
321 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
322 (s390_set_pc): Likewise.
323 (s390_arch_setup): New function.
324 (the_low_target): Use s390_arch_setup as arch_setup routine.
326 * regcache.c (realloc_register_cache): New function.
327 (set_register_cache): Call it for each existing regcache.
329 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
331 * server.h (init_registers): Remove prototype.
333 * linux-low.h (struct linux_target_ops): Add arch_setup field.
334 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
335 instead of init_registers ().
336 * linux-arm-low.c (init_registers_arm): Add prototype.
337 (init_registers_arm_with_iwmmxt): Likewise.
338 (the_low_target): Add initializer for arch_setup field.
339 * linux-cris-low.c (init_registers_cris): Add prototype.
340 (the_low_target): Add initializer for arch_setup field.
341 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
342 (the_low_target): Add initializer for arch_setup field.
343 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
344 (the_low_target): Add initializer for arch_setup field.
345 * linux-ia64-low.c (init_registers_ia64): Add prototype.
346 (the_low_target): Add initializer for arch_setup field.
347 * linux-m32r-low.c (init_registers_m32r): Add prototype.
348 (the_low_target): Add initializer for arch_setup field.
349 * linux-m68k-low.c (init_registers_m68k): Add prototype.
350 (the_low_target): Add initializer for arch_setup field.
351 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
352 (init_registers_mips64_linux): Likewise.
353 (the_low_target): Add initializer for arch_setup field.
354 * linux-ppc-low.c (init_registers_ppc): Add prototype.
355 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
356 (the_low_target): Add initializer for arch_setup field.
357 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
358 (init_registers_powerpc_64): Likewise.
359 (the_low_target): Add initializer for arch_setup field.
360 * linux-s390-low.c (init_registers_s390): Add prototype.
361 (init_registers_s390x): Likewise.
362 (the_low_target): Add initializer for arch_setup field.
363 * linux-sh-low.c (init_registers_sh): Add prototype.
364 (the_low_target): Add initializer for arch_setup field.
365 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
366 (the_low_target): Add initializer for arch_setup field.
367 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
368 (the_low_target): Add initializer for arch_setup field.
370 * win32-low.h (struct win32_target_ops): Add arch_setup field.
371 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
372 instead of init_registers ().
373 * win32-arm-low.c (init_registers_arm): Add prototype.
374 (the_low_target): Add initializer for arch_setup field.
375 * win32-i386-low.c (init_registers_i386): Add prototype.
376 (the_low_target): Add initializer for arch_setup field.
378 * spu-low.c (init_registers_spu): Add prototype.
379 (initialize_low): Call initialie_registers_spu () instead of
380 initialize_registers ().
382 2008-02-19 Pedro Alves <pedro@codesourcery.com>
384 * server.c (handle_v_requests): When handling the vRun and vAttach
385 packets, if already debugging a process, don't kill it. Return an
388 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
390 * server.c (handle_query): Correct length check.
392 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
394 * win32-low.c (do_initial_child_stuff): Add process handle
395 parameter. Set current_process_handle and current_process_id from the
396 parameters. Clear globals.
397 (win32_create_inferior): Don't set current_process_handle and
398 current_process_id here. Instead pass them on the call to
399 do_initial_child_stuff.
400 (win32_attach): Likewise.
401 (win32_clear_inferiors): New.
402 (win32_kill): Don't close the current process handle or the
403 current thread handle here. Instead call win32_clear_inferiors.
404 (win32_detach): Don't open a new handle to the process. Call
405 win32_clear_inferiors.
406 (win32_join): Don't rely on current_process_handle; open a new
407 handle using the process id.
408 (win32_wait): Call win32_clear_inferiors when the inferior process
411 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
413 * server.c (monitor_show_help): Add "exit".
415 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
417 * Makefile.in (SFILES): Add linux-xtensa-low.c.
418 (clean): Add reg-xtensa.c.
419 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
420 * configure.srv (xtensa*-*-linux*) New target.
421 * linux-xtensa-low.c: New.
422 * xtensa-xtregs.c: New.
424 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
426 * hostio.c: Don't include errno.h.
427 (errno_to_fileio_errno): Move to hostio-errno.
428 * hostio.c: (hostio_error): Remove the error parameter. Defer the
429 error number outputting to the target->hostio_last_error callback.
430 (hostio_packet_error): Use FILEIO_EINVAL directly.
431 (handle_open, handle_pread, hostio_error, handle_unlink): Update
432 calls to hostio_error.
433 * hostio-errno.c: New.
434 * server.h (hostio_last_error_from_errno): Declare.
435 * target.h (target_ops): Add hostio_last_error member.
436 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
437 as hostio_last_error handler.
438 * spu-low.c (spu_target_ops): Likewise.
439 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
440 (wince_hostio_last_error): New functions.
441 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
442 as hostio_last_error handler.
443 (win32_target_ops) [!_WIN32_WCE]: Register
444 hostio_last_error_from_errno as hostio_last_error handler.
445 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
446 (hostio-errno.o): New rule.
447 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
448 * configure.srv (srv_hostio_err_objs): New variable. Default to
450 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
451 * configure: Regenerate.
453 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
455 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
456 (linux_kill, linux_detach): Clean up the process list.
457 * remote-utils.c (remote_open): Improve port number parsing.
458 (putpkt_binary, input_interrupt): Only send interrupts if the target
460 * server.c (extended_protocol): Make static.
461 (attached): Define earlier.
462 (exit_requested, response_needed, program_argv): New variables.
463 (target_running): New.
464 (start_inferior): Clear attached here.
465 (attach_inferior): Set attached here.
466 (require_running): Define.
467 (handle_query): Use require_running and target_running. Implement
469 (handle_v_attach, handle_v_run): New.
470 (handle_v_requests): Use require_running. Handle vAttach and vRun.
471 (gdbserver_usage): Update.
472 (main): Redo argument parsing. Handle --debug and --multi. Handle
473 --attach along with other options or after the port. Save
474 program_argv. Support no initial program. Resynchronize
475 communication with GDB after an error. Handle "monitor exit".
476 Use require_running and target_running. Always allow the extended
477 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
478 restart in extended mode.
479 * README: Refer to the GDB manual. Update --attach usage.
481 2007-12-20 Andreas Schwab <schwab@suse.de>
483 * linux-low.c (STACK_SIZE): Define.
484 (linux_tracefork_child): Use it. Use __clone2 on ia64.
485 (linux_test_for_tracefork): Likewise.
487 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
489 * linux-low.c (linux_wait_for_event): Update messages. Do not
490 reinsert auto-delete breakpoints.
491 * mem-break.c (struct breakpoint): Change return type of handler to
493 (set_breakpoint_at): Update handler type.
494 (reinsert_breakpoint_handler): Return 1 instead of calling
496 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
498 (check_breakpoints): Delete auto-delete breakpoints and return 2.
499 * mem-break.h (set_breakpoint_at): Update handler type.
500 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
501 * win32-low.c (auto_delete_breakpoint): New.
502 (get_child_debug_event): Use it.
504 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
506 * configure.ac: Check for pread and pwrite.
507 * hostio.c (handle_pread): Fall back to lseek and read.
508 (handle_pwrite): Fall back to lseek and write.
509 * config.in, configure: Regenerated.
511 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
513 * server.c (myresume): Add own_buf argument.
514 (main): Update calls.
516 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
518 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
519 * remote-utils.c (remote_open): Do not call disable_async_io.
520 (block_async_io): Delete.
521 (unblock_async_io): Make static.
522 (initialize_async_io): New.
523 * server.c (handle_v_cont): Handle async I/O here.
524 (myresume): Likewise. Move other common resume tasks here...
525 (main): ... from here. Call initialize_async_io. Disable async
526 I/O before the main loop.
527 * server.h (initialize_async_io): Declare.
528 (block_async_io, unblock_async_io): Delete prototypes.
529 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
531 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
533 * remote-utils.c (readchar): Allow binary data in received messages.
535 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
537 * win32-low.c (attaching): New global.
538 (win32_create_inferior): Clear the `attaching' global.
539 (win32_attach): Set the `attaching' global.
540 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
541 attaching. Only set a breakpoint at the entry point if not
544 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
546 * server.c (main): Don't report dll events on the initial
547 connection on attaches.
549 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
551 * server.c (main): Relax numerical bases supported for the pid of
552 the --attach command line argument.
554 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
556 * win32-low.c (win32_attach): Call OpenProcess before
557 DebugActiveProcess, not after. Add last error output to error
560 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
562 * win32-low.c (win32_get_thread_context)
563 (win32_set_thread_context): New functions.
564 (thread_rec): Use win32_get_thread_context.
565 (continue_one_thread, win32_resume): Use win32_set_thread_context.
566 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
570 Pedro Alves <pedro_alves@portugalmail.pt>
572 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
574 (child_add_thread): Minor cleanup.
575 (child_continue): Resume artificially suspended threads before
576 calling ContinueDebugEvent.
577 (suspend_one_thread): New.
578 (fake_breakpoint_event): New.
579 (get_child_debug_event): Change return type to int. Check here if
580 gdb sent an interrupt request. If a soft interrupt was requested,
581 fake a breakpoint event. Return 0 if there is no event to handle,
583 (win32_wait): Don't check here if gdb sent an interrupt request.
584 Ensure there is a valid event to handle.
585 (win32_request_interrupt): Add soft interruption method as last
589 Pedro Alves <pedro_alves@portugalmail.pt>
591 * win32-low.h (win32_thread_info): Add descriptions to the
592 structure members. Replace `suspend_count' counter by a
594 * win32-low.c (thread_rec): Update condition of when to get the
595 context from the inferior. Rely on ContextFlags being set if it
596 has already been retrieved. Only suspend the inferior thread if
597 we haven't already. Warn if that fails.
598 (continue_one_thread): s/suspend_count/suspended/. Only call
599 ResumeThread once. Warn if that fails.
601 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
603 * win32-low.c (win32_wait): Don't read from the inferior when it
606 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
608 * Makefile.in (win32_low_h): New variable.
609 (win32-low.o): Add dependency on $(win32_low_h).
610 (win32-arm-low.o, win32-i386-low.o): New rules.
612 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
614 * hostio.c: Correct copyright year.
616 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
618 * Makefile.in (OBS): Add hostio.o.
619 (hostio.o): New rule.
620 * server.h (handle_vFile): Declare.
621 * hostio.c: New file.
622 * server.c (handle_v_requests): Take packet_len and new_packet_len
623 for binary packets. Call handle_vFile.
624 (main): Update call to handle_v_requests.
626 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
628 * linux-low.c: Include <sched.h>.
630 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
632 * linux-low.c (linux_tracefork_grandchild): New.
633 (linux_tracefork_child): Use clone.
634 (linux_test_for_tracefork): Use clone; allocate and free a stack.
636 2007-10-31 Joel Brobecker <brobecker@adacore.com>
638 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
640 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
642 * linux-low.c (handle_extended_wait): Handle unexpected signals.
644 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
646 * inferiors.c (change_inferior_id): Delete.
647 (add_pid_to_list, pull_pid_from_list): New.
648 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
649 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
650 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
651 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
652 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
653 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
654 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
655 (using_threads): Always set to 1.
656 (handle_extended_wait): New.
657 (add_process): Do not set TID.
658 (linux_create_inferior): Set must_set_ptrace_flags.
659 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
660 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
661 (linux_thread_alive): Rename TID argument to LWPID.
662 (linux_wait_for_process): Handle unknown processes. Do not use TID.
663 (linux_wait_for_event): Do not use TID or check using_threads. Update
664 call to dead_thread_notify. Call handle_extended_wait.
665 (linux_create_inferior): Use PTRACE_SETOPTIONS.
666 (send_sigstop): Delete sigstop_sent.
667 (wait_for_sigstop): Avoid TID.
668 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
669 (linux_test_for_tracefork): New.
670 (linux_lookup_signals): Use thread_db_active and
671 linux_supports_tracefork_flag.
672 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
673 * linux-low.h (get_process_thread): Avoid TID.
674 (struct process_ifo): Move thread_known and tid to the end. Remove
676 (linux_attach_lwp, thread_db_init): Update prototypes.
677 * server.h (change_inferior_id): Delete prototype.
678 (add_pid_to_list, pull_pid_from_list): New prototypes.
679 * thread-db.c (thread_db_use_events): New.
680 (find_first_thread): Rename to...
681 (find_one_thread): ...this. Update callers and messages. Do not
682 call fatal. Check thread_db_use_events. Do not call
683 change_inferior_id or new_thread_notify.
684 (maybe_attach_thread): Update. Do not call new_thread_notify.
685 (thread_db_init): Set thread_db_use_events. Check use_events.
686 * utils.c (fatal, warning): Correct message prefix.
688 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
690 * Makefile.in (clean): Remove new files.
691 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
692 (powerpc-64.o, powerpc-64.c): New rules.
693 * configure.srv: Use alternate register sets for powerpc64-*-linux*
694 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
696 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
698 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
699 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
700 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
701 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
702 (target_regsets): Add AltiVec and SPE register sets.
703 * configure.ac: Check for AltiVec and SPE.
704 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
705 (ppc_fill_vrregset, ppc_store_vrregset): New.
706 (target_regsets): Add AltiVec register set.
707 * configure: Regenerated.
709 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
711 * linux-low.c (O_LARGEFILE): Define.
712 (linux_read_memory): Use /proc/PID/mem.
713 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
714 * configure, config.in: Regenerated.
716 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
718 * linux-low.c (linux_wait_for_event): Do not pass signals while
721 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
723 * win32-low.c (create_process): New.
724 (win32_create_inferior): Use create_process instead of
725 CreateProcess. If create_process failed retry appending an ".exe"
726 suffix. Store the GetLastError result immediatelly after
727 create_process calls and use it on the call to error.
729 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
731 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
733 2007-08-23 Joel Brobecker <brobecker@adacore.com>
735 * configure.ac: Switch license to GPLv3.
737 2007-08-01 Michael Snyder <msnyder@access-company.com>
739 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
741 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
743 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
745 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
746 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
747 CloseToolhelp32Snapshot.
748 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
749 CloseToolhelp32Snapshot.
751 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
753 * server.c (main): Check for inferior exit before main loop.
755 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
757 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
758 instead of on tmp_desc.
760 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
761 Daniel Jacobowitz <dan@codesourcery.com>
763 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
764 (add_thread): Minor cleanups.
765 (clear_inferiors): Move lower in the file. Clear the DLL
767 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
768 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
769 (xml_escape_text): New.
770 * server.c (handle_query): Handle qXfer:libraries:read. Report it
772 (handle_v_cont): Report errors.
773 (gdbserver_version): Update.
774 (main): Correct size of own_buf. Do not report initial DLL events.
775 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
776 (unloaded_dll, xml_escape_text): New.
777 * win32-low.c (enum target_waitkind): Update comments.
778 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
779 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
780 (win32_EnumProcessModules, win32_GetModuleInformation)
781 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
782 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
783 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
784 (win32_Module32First, win32_Module32Next, load_toolhelp)
785 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
786 (get_child_debug_event): Handle DLL events.
787 (win32_wait): Likewise.
789 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
791 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
792 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
794 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
796 * win32-low.c (handle_output_debug_string): Ignore event if not
799 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
801 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
803 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
805 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
807 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
809 * inferiors.c (change_inferior_id): Add comment.
810 * linux-low.c (check_removed_breakpoint): Add an early
811 prototype. Improve debug output.
812 (linux_attach): Doc update.
813 (linux_detach_one_process, linux_detach): Clean up before releasing
815 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
816 * linux-low.h (struct process_info): Doc improvement.
817 * mem-break.c (delete_all_breakpoints): New.
818 * mem-break.h (delete_all_breakpoints): New prototype.
819 * thread-db.c (find_first_thread): New.
820 (thread_db_create_event): Call it instead of
821 thread_db_find_new_threads. Clean up unused variables.
822 (maybe_attach_thread): Remove first thread handling.
823 (thread_db_find_new_threads): Use find_first_thread.
824 (thread_db_get_tls_address): Likewise.
826 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
828 * thread-db.c (thread_db_find_new_threads): Add prototype.
829 (thread_db_create_event): Check for the main thread before adding
831 (maybe_attach_thread): Only enable event reporting if TID == 0.
832 (thread_db_get_tls_address): Check for new threads.
834 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
836 * linux-low.c (linux_create_inferior): Try execv before execvp.
837 * spu-low.c (spu_create_inferior): Likewise.
839 2007-06-13 Mike Frysinger <vapier@gentoo.org>
841 * linux-low.c (linux_create_inferior): Change execv to execvp.
842 * spu-low.c (spu_create_inferior): Likewies.
844 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
846 * Makefile.in (clean): Clean new files instead of deleted ones.
847 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
848 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
850 * configure.srv: Specify XML files and new regformats for MIPS and
852 * linux-mips-low.c (mips_num_regs): Set to only used registers.
853 (mips_regmap): Do not fetch $0. Remove unused registers. Add
854 an entry for the restart register.
855 (mips_cannot_fetch_register, mips_cannot_store_register)
856 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
857 register names to match the XML descriptions.
858 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
859 restart register instead of $0.
861 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
862 Markus Deuling <deuling@de.ibm.com>
864 * remote-utils.c (decode_xfer_write): New function.
865 * server.h (decode_xfer_write): Add prototype.
866 * server.c (handle_query): Add PACKET_LEN argument. Support
867 qXfer:spu:read and qXfer:spu:write packets.
868 (main): Pass packet_len to handle_query.
869 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
870 * target.h (target_ops): Add qxfer_spu.
872 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
874 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
875 accessing non-seekable spufs files.
877 2007-05-16 Markus Deuling <deuling@de.ibm.com>
879 * server.c (handle_query): Add reply for qC packet.
881 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
882 Leo Zayas <lerele@champenstudios@com>
884 * server.h (check_remote_input_interrupt_request): New function.
885 * remote_utils.c (INVALID_DESCRIPTOR): New define.
886 (remote_desc): Initialize with INVALID_DESCRIPTOR.
887 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
888 (check_remote_input_interrupt_request): New function.
889 * server.h (check_remote_input_interrupt_request): Declare.
890 * win32-low.c (winapi_DebugBreakProcess,
891 winapi_GenerateConsoleCtrlEvent): New typedefs.
892 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
894 (win32_wait): Check for remote interrupt request
895 with check_remote_input_interrupt_request.
896 (win32_request_interrupt): New function.
897 (win32_target_op): Set request_interrupt to win32_request_interrupt.
899 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
901 * win32-low.c (debug_registers_changed,
902 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
903 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
904 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
905 (thread_rec): Get context using the low target.
906 (child_add_thread): Call thread_added on the low target,
907 which does the same thing.
909 (do_initial_child_stuff): Remove debug registers references.
910 Set context using the low target. Resume threads after
911 setting the contexts.
912 (child_continue): Remove dead variable. Remove debug
913 registers references.
914 (child_fetch_inferior_registers): Go through the low target.
915 (do_child_store_inferior_registers): Remove.
916 (child_store_inferior_registers): Go through the low target.
917 (win32_resume): Remove debug registers references.
918 Set context using the low target.
919 (handle_exception): Change return type to void. Don't record
920 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
921 first chance exception.
922 (get_child_debug_event): Change return type to void. Remove
923 goto loop. Always return after waiting for debug event.
924 (win32_wait): Convert to switch statement. Handle spurious
927 * win32-i386-low.c (debug_registers_changed,
928 debug_registers_used): New.
929 (initial_stuff): Rename to ...
930 (i386_initial_stuff): ... this. Clear debug registers
932 (store_debug_registers): Delete.
933 (i386_get_thread_context): New.
934 (load_debug_registers): Delete.
935 (i386_set_thread_context): New.
936 (i386_thread_added): New.
937 (single_step): Rename to ...
938 (i386_single_step): ... this.
939 (do_fetch_inferior_registers): Rename to ...
940 (i386_fetch_inferior_register): ... this.
941 (i386_store_inferior_register): New.
942 (the_low_target): Adapt to new interface.
944 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
945 (arm_get_thread_context): New.
946 (arm_set_thread_context): New.
948 (do_fetch_inferior_registers): Rename to ...
949 (arm_fetch_inferior_register): ... this.
950 (arm_store_inferior_register): New.
951 (arm_wince_breakpoint): Reimplement as unsigned long.
952 (arm_wince_breakpoint_len): Define.
953 (the_low_target): Adapt to new interface.
955 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
956 load_debug_registers. Add get_thread_context, set_thread_context,
957 thread_added and store_inferior_register. Rename
958 fetch_inferior_registers to fetch_inferior_register.
959 (regptr): Remove declaration.
961 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
963 * linux-low.c (linux_detach): Change return type to int. Return 0.
964 * spu-low.c (spu_detach): Likewise.
966 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
968 * target.h (target_ops): Change return type of detach to int.
970 (join_inferior): New.
971 * server.c (main): Don't skip detach support on mingw32.
972 If the inferior doesn't support detaching return error.
973 Call join_inferior instead of using waitpid.
974 * linux-low.c (linux_join): New.
975 (linux_target_op): Add linux_join.
976 * spu-low.c (spu_join): New.
977 (spu_target_ops): Add spu_join.
978 * win32-low.c (win32_detach): Adapt to new interface.
979 Reopen current_process_handle before detaching. Issue a child
980 resume before detaching.
982 (win32_target_op): Add win32_join.
984 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
986 * win32-low.c (win32-attach): Fix return value.
987 * target.h (target_ops): Describe ATTACH return values.
989 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
991 * win32-low.c (GETPROCADDRESS): Define.
992 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
993 (winapi_DebugSetProcessKillOnExit): Likewise.
994 (win32_create_inferior): Force usage of ansi CreateProcessA.
995 (win32_attach): Use GETPROCADDRESS.
996 (win32_detach): Likewise.
998 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
1000 * win32-low.c (win32_wait): Don't use WSTOPSIG.
1002 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
1004 * win32-low.c: Commit leftover changes from 2007-03-29.
1006 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1008 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
1009 fields short instead of int. Add explicit padding.
1010 (i387_cache_to_fsave): Remove unnecessary casts.
1011 (i387_fsave_to_cache): Doc fix.
1012 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
1014 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
1016 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
1017 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
1019 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1021 * configure.srv (arm*-*-mingw32ce*): Move near the other
1024 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1026 * configure.ac: Add errno checking.
1027 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1028 sys/file.h and malloc.h.
1029 (AC_CHECK_DECLS): Add perror.
1030 (srv_mingwce): Handle.
1031 * configure.srv (i[34567]86-*-cygwin*): Add
1032 win32-i386-low.o to srv_tgtobj.
1033 (i[34567]86-*-mingw*): Likewise.
1034 (arm*-*-mingw32ce*): Add case.
1035 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1036 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1037 [__MINGW32CE__] (strerror): New function.
1038 [__MINGW32CE__] (errno): Define to GetLastError.
1039 [__MINGW32CE__] (COUNTOF): New macro.
1040 (remote_open): Remove extra close call.
1041 * mem-break.c (delete_breakpoint_at): New function.
1042 * mem-break.h (delete_breakpoint_at): Declare.
1043 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1044 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1045 [USE_WIN32API] (read, write): Add char* casts.
1046 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1047 * server.h: Include wincecompat.h on Windows CE.
1048 [HAVE_ERRNO_H]: Check.
1049 (perror): Declare if not declared.
1050 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1051 (perror_with_name): Remove errno declaration.
1052 * wincecompat.h: New.
1053 * wincecompat.c: New.
1055 * win32-arm-low.c: New.
1056 * win32-i386-low.c: New.
1057 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1058 (OUTMSG2): Make it safe.
1060 (COUNTOF): New macro.
1061 (NUM_REGS): Get it from the low target.
1062 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1063 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1064 (thread_rec): Let low target handle debug registers.
1065 (child_add_thread): Likewise.
1066 (child_init_thread_list): Likewise.
1067 (continue_one_thread): Likewise.
1069 (do_child_fetch_inferior_registers): Move to ...
1070 * win32-i386-low.c: ... here, and rename to ...
1071 (do_fetch_inferior_registers): ... this.
1072 * win32-low.c (child_fetch_inferior_registers):
1073 Go through the low target.
1074 (do_child_store_inferior_registers): Use regptr.
1075 (strwinerror): New function.
1076 (win32_create_inferior): Handle Windows CE.
1077 Use strwinerror instead of strerror on Windows error
1078 codes. Add program to the error output.
1079 Don't close the main thread handle on Windows CE.
1080 (win32_attach): Use coredll.dll on Windows CE.
1081 (win32_kill): Close current process and current
1083 (win32_detach): Use coredll.dll on Windows CE.
1084 (win32_resume): Let low target handle debug registers, and
1086 (handle_exception): Add/Remove initial breakpoint. Avoid
1087 non-existant WSTOPSIG on Windows CE.
1088 (win32_read_inferior_memory): Cast to remove warning.
1089 (win32_arch_string): Go through the low target.
1090 (initialize_low): Call set_breakpoint_data with the low
1091 target's breakpoint.
1092 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1093 FOP_REGNUM, mappings): Move to ...
1094 * win32-i386-low.c: ... here.
1095 * win32-low.c (win32_thread_info): Move to ...
1096 * win32-low.h: ... here.
1097 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1098 win32-arm-low.c and wincecompat.c.
1099 (all:): Add $EXEEXT.
1100 (install-only:): Likewise.
1101 (gdbserver:): Likewise.
1102 (gdbreplay:): Likewise.
1103 * config.in: Regenerate.
1104 * configure: Regenerate.
1106 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1108 * win32-low.c: Rename typedef thread_info to
1109 win32_thread_info throughout.
1111 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1113 * win32-i386-low.c: Rename to ...
1114 * win32-low.c: ... this.
1115 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1116 * Makefile.in: Likewise.
1118 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1120 * remote-utils.c (monitor_output): Constify msg parameter.
1121 * server.h (monitor_output): Likewise.
1122 * win32-i386-low.c (handle_output_debug_string): New.
1123 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1124 handle_output_debug_string.
1125 (get_child_debug_event): Likewise.
1127 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1129 * server.c (main): Correct strtoul check.
1131 2007-03-27 Jon Ringle <jon@ringle.org>
1133 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1135 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1137 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1139 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1141 * terminal.h: Check HAVE_SGTTY_H.
1143 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1145 * remote-utils.c (remote_open): Print out the assigned port number.
1147 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1149 * remote-utils.c (monitor_output): New function.
1150 * server.c (debug_threads): Define here.
1151 (monitor_show_help): New function.
1152 (handle_query): Handle qRcmd.
1153 (main): Do not handle 'd' packet.
1154 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1155 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1158 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1160 * Makefile.in (EXEEXT): New.
1161 (clean): Use $(EXEEXT).
1163 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1165 * target.h (target_ops): Rename send_signal to request_interrupt,
1166 and remove enum target_signal parameter.
1167 * linux-low.c (linux_request_interrupt): Rename from
1168 linux_send_signal, and always send SIGINT.
1169 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1170 and always send SIGINT.
1171 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1173 (input_interrupt): Likewise.
1175 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1177 * server.c (get_features_xml): Check if target implemented
1179 * win32-i386-low.c (win32_arch_string): New.
1180 (win32_target_ops): Add win32_arch_string as arch_string member.
1182 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1184 * spu-low.c (spu_arch_string): New.
1185 (spu_target_ops): Add spu_arch_string.
1187 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1189 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1190 * configure.ac: Do not check for terminal.h.
1191 * configure, config.in: Regenerated.
1193 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1195 * Makefile.in (OBS): Add $(XML_BUILTIN).
1196 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1198 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1199 (arm-with-iwmmxt.c): New.
1200 * config.in, configure: Regenerate.
1201 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1202 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1203 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1204 (arm*-*-linux*): Add iWMMXt and regset support.
1205 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1206 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1207 (arm_store_wmmxregset, target_regsets): New.
1208 * server.c (get_features_xml): Take annex argument. Check builtin
1210 (handle_query): Handle multiple annexes.
1212 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1214 * remote-utils.c [USE_WIN32API] (read, write): Define.
1215 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1218 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1220 * linux-i386-low.c (the_low_target): Set arch_string.
1221 * linux-x86-64-low.c (the_low_target): Likewise.
1222 * linux-low.c (linux_arch_string): New.
1223 (linux_target_ops): Add it.
1224 * linux-low.h (struct linux_target_ops): Add arch_string.
1225 * server.c (write_qxfer_response): Use const void * for DATA.
1226 (get_features_xml): New.
1227 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1228 * target.h (struct target_ops): Add arch_string method.
1230 2007-01-03 Denis Pilat <denis.pilat@st.com>
1231 Daniel Jacobowitz <dan@codesourcery.com>
1233 * linux-low.c (linux_kill): Handle being called with no threads.
1234 * win32-i386-low.c (win32_kill): Likewise.
1235 (get_child_debug_event): Clear current_process_handle.
1237 2006-12-30 Denis PILAT <denis.pilat@st.com>
1238 Daniel Jacobowitz <dan@codesourcery.com>
1240 * remote-utils.c (remote_open): Check the type of specified
1241 serial port devices before opening them.
1242 * server.c (main): Kill the inferior if an error occurs during
1243 the first remote_open.
1245 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1247 * README: Update supported targets.
1249 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1251 * Makefile.in (clean): Remove reg-mips64.c.
1252 (reg-mips64.c, reg-mips64.o): New rules.
1253 * configure.srv: Handle mips64. Include regset support for mips.
1254 * linux-mips-low.c (union mips_register): New.
1255 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1256 (mips_breakpoint, mips_breakpoint_at): Use int.
1257 (mips_collect_register, mips_supply_register)
1258 (mips_collect_register_32bit, mips_supply_register_32bit)
1259 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1260 (mips_store_fpregset, target_regsets): New.
1261 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1263 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1265 * configure.srv: Add target "spu*-*-*".
1266 * Makefile.in (clean): Remove reg-spu.c.
1267 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1268 * spu-low.c: New file.
1270 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1272 * configure.ac: Correct td_thr_tls_get_addr test.
1273 * configure: Regenerated.
1275 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1277 * linux-low.c (linux_wait_for_event): Reformat. Use the
1279 * remote-utils.c (decode_address_to_semicolon): New.
1280 * server.c (pass_signals, handle_general_set): New.
1281 (handle_query): Mention QPassSignals for qSupported.
1282 (main): Call handle_general_set.
1283 * server.h (pass_signals, decode_address_to_semicolon): New.
1285 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1287 * server.c (handle_query): Correct error handling for read_auxv.
1289 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1291 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1292 and srv_linux_thread_db to yes.
1293 * linux-s390-low.c (s390_fill_gregset): New function.
1294 (target_regsets): Define data structure.
1296 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1298 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1299 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1300 * config.in, configure: Regenerated.
1301 * inferiors.c (gdb_id_to_thread): New function.
1302 (gdb_id_to_thread_id): Use it.
1303 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1304 * linux-low.h (struct process_info): Add th member.
1305 (thread_db_get_tls_address): New prototype.
1306 * remote-utils.c (decode_address): Make non-static.
1307 * server.c (handle_query): Handle qGetTLSAddr.
1308 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1309 * target.h (struct target_ops): Add get_tls_address.
1310 * thread-db.c (maybe_attach_thread): Save the thread handle.
1311 (thread_db_get_tls_address): New.
1313 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1315 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1316 (linux_resume_one_process): Take a siginfo_t *. Update all
1317 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1318 (struct pending_signals): Add a siginfo_t.
1319 (linux_wait_for_process): Always set last_status.
1320 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1321 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1322 * linux-low.h (struct process_info): Add last_status.
1324 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1326 * remote-utils.c (try_rle): New function.
1327 (putpkt_binary): Use it.
1329 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1331 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1332 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1333 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1334 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1335 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1338 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1340 * server.c (terminal_fd): New variable.
1341 (old_foreground_pgrp): Likewise.
1342 (restore_old_foreground_pgrp): New function.
1343 (start_inferior): Record the terminal file descriptor in terminal_fd
1344 and its original foreground group in old_foreground_pgrp. Register
1345 restore_old_foreground_pgrp with atexit().
1347 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1349 * server.c (handle_query): Correct qPart to qXfer.
1351 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1353 * configure.ac: Check for more headers which are missing on
1354 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1355 * configure.srv: Add Cygwin and mingw32.
1356 * remote-utils.c: Don't include headers unconditionally which
1357 are missing on mingw32. Include <winsock.h> for mingw32.
1358 (remote_open): Adjust for mingw32 support. Flush
1359 standard error after writing to it.
1360 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1361 (unblock_async_io, enable_async_io, disable_async_io)
1362 (readchar, getpkt): Update for Winsock support.
1363 (prepare_resume_reply): Expect a protocol signal number.
1364 * server.c: Disable <sys/wait.h> on mingw32.
1365 (start_inferior): Adjust for mingw32 support. Flush
1366 standard error after writing to it.
1367 (attach_inferior): Likewise. Use protocol signal
1369 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1371 * win32-i386-low.c: New file.
1372 * Makefile.in (XM_CLIBS): Set.
1373 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1374 (win32-i386-low.o): New dependency rule.
1375 * linux-low.c (linux_wait): Use target signal numbers.
1376 * target.h (struct target_ops): Doc fix.
1377 * server.h (target_signal_to_name): New prototype.
1378 * gdbreplay.c: Don't include headers unconditionally which
1379 are missing on mingw32. Include <winsock.h> for mingw32.
1380 (remote_close, remote_open): Adjust for Winsock support.
1381 * configure, config.in: Regenerated.
1383 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1385 * server.c (decode_xfer_read, write_qxfer_response): New.
1386 (handle_query): Take a packet length argument. Handle
1387 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1388 the qSupported response.
1389 (main): Update call to handle_query.
1391 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1393 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1394 (putpkt_binary): Renamed from putpkt and adjusted for binary
1396 (putpkt): New wrapper for putpkt_binary.
1397 (readchar): Don't mask off the high bit.
1398 (decode_X_packet): New function.
1399 * server.c (main): Call putpkt_binary if a handler sets the packet
1400 length. Save the length of the incoming packet. Handle 'X'.
1401 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1403 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1405 * server.c (handle_query): Handle qSupported.
1407 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1409 * remote-utils.c (all_symbols_looked_up): New variable.
1410 (look_up_one_symbol): Check it.
1411 * server.h (look_up_one_symbol): New declaration.
1412 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1414 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1416 * Makefile.in (linux-arm-low.o): Update dependencies.
1417 * linux-arm-low.c: Include "gdb_proc_service.h".
1418 (PTRACE_GET_THREAD_AREA): Define.
1419 (ps_get_thread_area): New function.
1421 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1423 * configure.srv (m68k*-*-uclinux*): New target.
1424 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1425 (linux_resume_one_process): Remove extraneous cast.
1426 (linux_read_offsets): New.
1427 (linux_target_op): Add linux_read_offsets on mmuless systems.
1428 * server.c (handle_query): Add qOffsets logic.
1429 * target.h (struct target_ops): Add read_offsets.
1431 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1433 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1434 (PTRACE_GET_THREAD_AREA): Define.
1435 (ps_get_thread_area): New function.
1436 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1437 (linux-x86-64-low.o): Update.
1439 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1441 * configure.ac: Remove checks for prfpregset_t.
1442 * gdb_proc_service.h: New file.
1443 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1444 new "gdb_proc_service.h".
1445 * proc-service.c: Likewise.
1446 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1447 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1448 * Makefile.in (gdb_proc_service_h): Updated.
1449 * configure, config.in: Regenerated.
1451 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1453 * remote-utils.c (prepare_resume_reply): Move declaration
1454 of gdb_id_from_wait to the top of the block.
1456 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1458 * linux-low.c (regsets_store_inferior_registers): Read the regset
1459 from the target before filling it.
1461 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1463 * server.c (attach_inferior): Return SIGTRAP for a successful
1466 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1468 * Makefile.in (OBS): Add version.o.
1469 (STAGESTUFF): Delete.
1470 (version.o): Add dependencies.
1471 (version.c): Replace rule.
1472 (clean): Remove version.c.
1473 * server.c (gdbserver_version): New.
1474 (gdbserver_usage): Use printf.
1475 (main): Handle --version and --help.
1476 * server.h (version, host_name): Add declarations.
1478 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1490 * linux-x86-64-low.c:
1493 * linux-ppc64-low.c:
1502 * linux-crisv32-low.c:
1514 * gdbserver.1: Add (C) after Copyright. Update the FSF
1517 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1519 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1520 (arm_breakpoint_at): Recognize both breakpoints.
1521 (the_low_target): Use the correct breakpoint instruction.
1523 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1525 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1526 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1527 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1528 (the_low_target): Update.
1530 2005-10-25 Andreas Schwab <schwab@suse.de>
1532 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1534 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1535 (ia64_num_regs): Reduce to 462.
1537 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1539 * acinclude.m4: Correct quoting.
1540 * aclocal.m4: Regenerated.
1542 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1543 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1544 (thread_db_init): Call thread_db_err_str.
1545 * configure.ac: Check for TD_VERSION.
1546 * config.in, configure: Regenerated.
1548 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1550 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1552 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1554 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1555 is not available. Define HAVE_PTRACE_GETREGS if it is.
1556 * config.in, configure: Regenerated.
1557 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1558 * linux-i386-low.c, linux-m68k-low.c: Update to use
1559 HAVE_PTRACE_GETREGS.
1560 * linux-low.c (regsets_fetch_inferior_registers)
1561 (regsets_store_inferior_registers): Only return 0 if we processed
1563 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1564 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1566 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1568 * inferiors.c (struct thread_info): Add gdb_id.
1569 (add_thread): Add gdb_id argument.
1570 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1571 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1572 calls to add_thread.
1573 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1574 * server.c (handle_query): Use thread_to_gdb_id.
1575 (handle_v_cont, main): Use gdb_id_to_thread_id.
1576 * server.h (add_thread): Update prototype.
1577 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1580 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1582 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1583 left-padded registers.
1584 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1585 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1587 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1589 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1590 * configure: Regenerate.
1591 * config.in: Regenerate.
1592 * server.h (NEED_DECLARATION_STRERROR):
1593 Replace with !HAVE_DECL_STRERROR.
1595 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1597 * linux-low.c (linux_wait, linux_send_signal): Don't test
1598 an unsigned long variable for > 0 if it could be MAX_ULONG.
1599 * server.c (myresume): Likewise.
1600 * target.c (set_desired_inferior): Likewise.
1602 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1604 * configure.ac: Simplify and improve check for socklen_t.
1605 * configure, config.in: Regenerate.
1607 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1609 * acconfig.h: Remove.
1610 * configure.ac: Add a test for socklen_t. Use three-argument
1611 AC_DEFINE throughout.
1612 * config.in: Regenerated using autoheader 2.59.
1613 * configure: Regenerated.
1615 * gdbreplay.c (socklen_t): Provide a default.
1616 (remote_open): Use socklen_t.
1617 * remote-utils.c (socklen_t): Provide a default.
1618 (remote_open): Use socklen_t.
1619 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1622 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1624 * linux-low.c (linux_read_memory, linux_write_memory)
1625 (linux_read_auxv): Likewise.
1626 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1627 (check_mem_write): Likewise.
1628 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1630 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1631 (registers_from_string, register_data): Likewise.
1632 * server.c (handle_query, main): Likewise.
1633 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1634 (decode_M_packet): Likewise.
1635 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1636 * target.h (struct target_ops): Update read_memory, write_memory,
1638 (read_inferior_memory, write_inferior_memory): Update.
1639 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1641 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1642 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1643 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1644 linux-s390-low.c, linux-sh-low.c: Update for changes in
1645 read_inferior_memory and the_low_target->breakpoint.
1647 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1649 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1650 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1651 * configure.srv: Add powerpc64-*-linux*.
1652 * linux-ppc64-low.c: New file.
1654 2005-05-23 Orjan Friberg <orjanf@axis.com>
1656 * linux-cris-low.c: New file with support for CRIS.
1657 * linux-crisv32-low.c: Ditto for CRISv32.
1658 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1659 (clean): Add reg-cris.c and reg-crisv32.c.
1660 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1661 reg-crisv32.o, and reg-crisv32.c to make rules.
1662 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1665 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1667 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1668 of sizeof (PTRACE_XFER_TYPE).
1669 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1671 2005-05-12 Orjan Friberg <orjanf@axis.com>
1673 * target.h (struct target_ops): Add insert_watchpoint,
1674 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1675 pointers for hardware watchpoint support.
1676 * linux-low.h (struct linux_target_ops): Ditto.
1677 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1678 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1679 to linux_target_ops.
1680 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1682 * server.c (main): Recognize 'Z' and 'z' packets.
1684 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1686 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1687 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1688 (the_low_target): Add new members.
1690 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1692 * proc-service.c (ps_lgetregs): Search all_processes instead of
1695 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1697 * server.c (start_inferior): Change return type to int.
1698 (attach_inferior): Change sigptr to int *.
1699 (handle_v_cont, handle_v_requests): Change signal to int *.
1700 (main): Change signal to int.
1702 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1704 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1705 * configure.srv: Add m32r*-*-linux*.
1706 * linux-m32r-low.c: New file.
1708 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1710 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1712 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1714 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1715 Take unsigned long arguments for PIDs.
1716 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1717 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1718 (wait_for_sigstop, linux_resume_one_process)
1719 (regsets_fetch_inferior_registers, linux_send_signal)
1720 (linux_read_auxv): Likewise. Update the types of variables holding
1721 PIDs. Update format string specifiers.
1722 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1723 * remote-utils.c (prepare_resume_reply): Likewise.
1724 * server.c (cont_thread, general_thread, step_thread)
1725 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1727 (handle_query): Update format specifiers.
1728 (handle_v_cont, main): Use strtoul for thread IDs.
1729 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1730 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1731 (general_thread, step_thread, thread_from_wait)
1732 (old_thread_from_wait): Update.
1733 * target.h (struct thread_resume): Use unsigned long for THREAD.
1734 (struct target_ops): Use unsigned long for arguments to attach and
1737 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1739 * acinclude.m4: Include bfd/bfd.m4 directly.
1740 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1741 <agriffis@toolchain.org>.
1742 * aclocal.m4, configure: Regenerated.
1744 2005-01-07 Andrew Cagney <cagney@gnu.org>
1746 * configure.ac: Rename configure.in, require autoconf 2.59.
1747 * configure: Re-generate.
1749 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1751 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1753 * aclocal.m4: Regenerated.
1754 * configure: Regenerated.
1756 2004-11-21 Andreas Schwab <schwab@suse.de>
1758 * linux-m68k-low.c (m68k_num_gregs): Define.
1759 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1760 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1761 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1762 (m68k_breakpoint_at): New. Add to the_low_target.
1764 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1765 srv_linux_thread_db to yes.
1767 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1769 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1770 (ARCH_SET_FS): Likewise.
1771 (ARCH_GET_FS): Likewise.
1772 (ARCH_GET_GS): Likewise.
1774 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1776 * linux-i386-low.c (ps_get_thread_area): New.
1777 * linux-x86-64-low.c (ps_get_thread_area): New.
1778 * linux-low.c: Include <sys/syscall.h>.
1779 (linux_kill_one_process): Don't kill the first thread here.
1780 (linux_kill): Kill the first thread here.
1781 (kill_lwp): New function.
1782 (send_sigstop, linux_send_signal): Use it.
1783 * proc-service.c: Clean up #ifdefs.
1784 (fpregset_info): Delete.
1785 (ps_lgetregs): Update and enable implementation.
1786 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1788 * remote-utils.c (struct sym_cache, symbol_cache): New.
1789 (input_interrupt): Print a clearer message.
1790 (async_io_enabled): New variable.
1791 (enable_async_io, disable_async_io): Use it. Update comments.
1792 (look_up_one_symbol): Use the symbol cache.
1793 * thread-db.c (thread_db_look_up_symbols): New function.
1794 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1796 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1798 * configure.in: Test for -rdynamic.
1799 * configure: Regenerated.
1800 * Makefile (INTERNAL_LDFLAGS): New.
1801 (gdbserver, gdbreplay): Use it.
1803 2004-09-02 Andrew Cagney <cagney@gnu.org>
1805 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1807 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1809 * linux-low.c (linux_wait): Clear all_processes list also.
1811 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1813 * linux-low.c: Include <errno.h>. Remove extern declaration of
1816 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1818 * gdbreplay.c, server.h, utils.c: Update copyright years.
1820 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1822 * server.c (main): Print child status or termination signal from
1823 variable 'signal', not 'sig'.
1825 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1827 * linux-low.c (linux_read_memory): Change return type to
1828 int. Check for and return error from ptrace().
1829 * target.c (read_inferior_memory): Change return type to int. Pass
1830 back return status from the_target->read_memory().
1831 * target.h (struct target_ops): Adapt *read_memory() prototype.
1833 (read_inferior_memory): Adapt prototype.
1834 * server.c (main): Return an error packet if
1835 read_inferior_memory() returns an error.
1837 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1839 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1840 Unify with other clean targets.
1842 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1844 * server.c (handle_v_cont): Call set_desired_inferior.
1846 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1848 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1850 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1852 * linux-low.c (linux_wait): Unblock async I/O.
1853 (linux_resume): Block and enable async I/O.
1854 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1855 * server.h (block_async_io, unblock_async_io): Add prototypes.
1857 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1859 * remote-utils.c (remote_open): Print a status notice after
1861 * server.c (attach_inferior): Print a status notice after
1864 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1866 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1868 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1870 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1872 * server.c, target.h: Update copyright years.
1874 2004-02-25 Roland McGrath <roland@redhat.com>
1876 * target.h (struct target_ops): New member `read_auxv'.
1877 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1878 * linux-low.c (linux_read_auxv): New function.
1879 (linux_target_ops): Initialize `read_auxv' member to that.
1881 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1883 Committed by Jim Blandy <jimb@redhat.com>.
1885 * linux-s390-low.c (s390_num_regs): Update.
1886 (s390_regmap): Remove control registers. Use __s390x__ predefine
1887 instead of GPR_SIZE to distiguish s390 and s390x targets.
1889 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1891 * linux-low.c: Update copyright year.
1892 (check_removed_breakpoint): Clear pending_is_breakpoint.
1893 (linux_set_resume_request, linux_queue_one_thread)
1894 (resume_status_pending_p): New functions.
1895 (linux_continue_one_thread): Use process->resume.
1896 (linux_resume): Only resume threads if there are no pending events.
1897 * linux-low.h (struct process_info): Add resume request
1900 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1902 * regcache.c (new_register_cache): Clear the allocated register
1903 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1905 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1907 * linux-low.c (linux_resume): Take a struct thread_resume *
1909 (linux_wait): Update call.
1910 (resume_ptr): New static variable.
1911 (linux_continue_one_thread): Renamed from
1912 linux_continue_one_process. Use resume_ptr.
1913 (linux_resume): Use linux_continue_one_thread.
1914 * server.c (handle_v_cont, handle_v_requests): New functions.
1915 (myresume): New function.
1916 (main): Handle 'v' case.
1917 * target.h (struct thread_resume): New type.
1918 (struct target_ops): Change argument of "resume" to struct
1920 (myresume): Delete macro.
1922 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1924 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1925 (uninstall): Support DESTDIR.
1927 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1929 * configure.srv: Add xscale*linux copy of arm*linux entry.
1931 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1933 * linux-arm-low.c (arm_reinsert_addr): New function.
1934 (the_low_target): Add arm_reinsert_addr.
1936 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1938 * mem-break.c: Remove whitespace at end of file.
1940 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1942 * configure.in: Check whether we need to prototype strerror.
1943 * server.h: Optionally prototype strerror.
1944 * gdbreplay.c (perror_with_name): Use strerror.
1945 * linux-low.c (linux_attach_lwp): Use strerror.
1946 * utils.c (perror_with_name): Use strerror.
1947 * config.in, configure: Regenerated.
1949 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1951 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1952 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1954 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1956 * Makefile.in (SFILES): Update.
1957 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1958 low-sun3.c: Remove files.
1960 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1962 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1963 (linux_detach_one_process, linux_detach): New functions.
1964 (linux_target_ops): Add linux_detach.
1965 * server.c (main): Handle 'D' packet.
1966 * target.h (struct target_ops): Add "detach" member.
1967 (detach_inferior): Define.
1969 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1971 From Kelley Cook <kelleycook@wideopenwest.com>:
1972 * configure.srv: Accept i[34567]86 variants.
1974 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1976 * linux-low.c (linux_wait_for_event): Correct comment typos.
1977 (linux_resume_one_process): Call check_removed_breakpoint.
1978 (linux_send_signal): New function.
1979 (linux_target_ops): Add linux_send_signal.
1980 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1982 * target.h (struct target_ops): Add send_signal.
1984 2003-05-29 Jim Blandy <jimb@redhat.com>
1986 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1987 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1988 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1989 away part of the register's value.
1991 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1993 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1994 (linux_wait_for_event, linux_init_signals): Likewise.
1996 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1998 * configure.in: Check for stdlib.h.
1999 * configure: Regenerated.
2000 * config.in: Regenerated.
2002 2003-01-04 Andreas Schwab <schwab@suse.de>
2004 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
2006 2003-01-02 Andrew Cagney <ac131313@redhat.com>
2008 * Makefile.in: Remove obsolete code.
2010 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
2012 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
2013 defined(PT_FPR0_HI).
2015 2002-11-17 Stuart Hughes <seh@zee2.com>
2017 * linux-arm-low.c (arm_num_regs): Increase.
2018 (arm_regmap): Include status register.
2020 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2022 * linux-low.c (register_addr): Remove incorrect -1 check.
2024 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2026 * linux-low.c (linux_create_inferior): Call setpgid. Return
2028 (unstopped_p, linux_signal_pid): Remove.
2029 (linux_target_ops): Remove linux_signal_pid.
2030 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2031 global instead of target method.
2032 * target.h (struct target_ops): Remove signal_pid. Update comment
2033 for create_inferior.
2034 * server.c (signal_pid): New variable.
2035 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2036 gdbserver. Set the child to be the foreground process group.
2037 (attach_inferior): Set signal_pid.
2039 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2041 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2043 2002-08-20 Jim Blandy <jimb@redhat.com>
2045 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2048 2002-08-01 Andrew Cagney <cagney@redhat.com>
2050 * Makefile.in: Make chill references obsolete.
2052 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2054 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2055 * configure: Regenerate.
2056 * config.in: Regenerate.
2058 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2060 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2061 (perror_with_name, remote_close, remote_open, expect, play): Static.
2063 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2065 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2066 byte offsets instead of an array of indexes.
2067 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2069 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2071 * regcache.c: Add comment.
2073 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2075 * thread-db.c: New file.
2076 * proc-service.c: New file.
2077 * acinclude.m4: New file.
2078 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2079 proc-service.o, and thread-db.o.
2080 (linux-low.o): Add USE_THREAD_DB.
2081 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2082 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2083 * aclocal.m4: Regenerated.
2084 * config.in: Regenerated.
2085 * configure: Regenerated.
2086 * configure.in: Check for proc_service.h, sys/procfs.h,
2087 thread_db.h, and linux/elf.h headrs.
2088 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2089 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2090 Check for -lthread_db and thread support.
2091 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2092 PowerPC, and SuperH.
2093 * i387-fp.c: Constify arguments.
2094 * i387-fp.h: Likewise.
2095 * inferiors.c: (struct thread_info): Renamed from
2096 `struct inferior_info'. Remove PID member. Use generic inferior
2097 list header. All uses updated.
2098 (inferiors, signal_pid): Removed.
2099 (all_threads): New variable.
2100 (get_thread): Define.
2101 (add_inferior_to_list): New function.
2102 (for_each_inferior): New function.
2103 (change_inferior_id): New function.
2104 (add_inferior): Removed.
2105 (remove_inferior): New function.
2106 (add_thread): New function.
2107 (free_one_thread): New function.
2108 (remove_thread): New function.
2109 (clear_inferiors): Use for_each_inferior and free_one_thread.
2110 (find_inferior): New function.
2111 (find_inferior_id): New function.
2112 (inferior_target_data): Update argument type.
2113 (set_inferior_target_data): Likewise.
2114 (inferior_regcache_data): Likewise.
2115 (set_inferior_regcache_data): Likewise.
2116 * linux-low.c (linux_bp_reinsert): Remove.
2117 (all_processes, stopping_threads, using_thrads)
2118 (struct pending_signals, debug_threads, pid_of): New.
2119 (inferior_pid): Replace with macro.
2120 (struct inferior_linux_data): Remove.
2121 (get_stop_pc, add_process): New functions.
2122 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2123 Use add_process and add_thread.
2124 (linux_attach_lwp): New function, based on old linux_attach. Use
2125 add_process and add_thread. Set stop_expected for new threads.
2126 (linux_attach): New function.
2127 (linux_kill_one_process): New function.
2128 (linux_kill): Kill all LWPs.
2129 (linux_thread_alive): Use find_inferior_id.
2130 (check_removed_breakpoints, status_pending_p): New functions.
2131 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2132 Update. Use WNOHANG. Wait for cloned processes also. Update process
2133 struct for the found process.
2134 (linux_wait_for_event): New function.
2135 (linux_wait): Use it. Support LWPs.
2136 (send_sigstop, wait_for_sigstop, stop_all_processes)
2137 (linux_resume_one_process, linux_continue_one_process): New functions.
2138 (linux_resume): Support LWPs.
2139 (REGISTER_RAW_SIZE): Remove.
2140 (fetch_register): Use register_size instead. Call supply_register.
2141 (usr_store_inferior_registers): Likewise. Call collect_register.
2143 (regsets_fetch_inferior_registers): Improve error message.
2144 (regsets_store_inferior_registers): Add debugging.
2145 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2146 (unstopped_p, linux_signal_pid): New functions.
2147 (linux_target_ops): Add linux_signal_pid.
2148 (linux_init_signals): New function.
2149 (initialize_low): Call it. Initialize using_threads.
2150 * regcache.c (inferior_regcache_data): Add valid
2152 (get_regcache): Fetch registers lazily. Add fetch argument
2153 and update all callers.
2154 (regcache_invalidate_one, regcache_invalidate): New
2156 (new_register_cache): Renamed from create_register_cache.
2157 Return the new regcache.
2158 (free_register_cache): Change argument to a void *.
2159 (registers_to_string, registers_from_string): Call get_regcache
2160 with fetch flag set.
2161 (register_data): Make static. Pass fetch flag to get_regcache.
2162 (supply_register): Call get_regcache with fetch flag clear.
2163 (collect_register): Call get_regcache with fetch flag set.
2164 (collect_register_as_string): New function.
2165 * regcache.h: Update.
2166 * remote-utils.c (putpkt): Flush after debug output and use
2168 Handle input interrupts while waiting for an ACK.
2169 (input_interrupt): Use signal_pid method.
2170 (getpkt): Flush after debug output and use stderr.
2171 (outreg): Use collect_register_as_string.
2172 (new_thread_notify, dead_thread_notify): New functions.
2173 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2175 (look_up_one_symbol): Flush after debug output.
2176 * server.c (step_thread, server_waiting): New variables.
2177 (start_inferior): Don't use signal_pid. Update call to mywait.
2178 (attach_inferior): Update call to mywait.
2179 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2180 (main): Don't fetch/store registers explicitly. Use
2181 set_desired_inferior. Support proposed ``Hs'' packet. Update
2184 (struct inferior_list, struct_inferior_list_entry): New.
2185 * target.c (set_desired_inferior): New.
2186 (write_inferior_memory): Constify.
2187 (mywait): New function.
2189 (struct target_ops): New signal_pid method.
2190 (mywait): Removed macro, added prototype.
2192 * linux-low.h (regset_func): Removed.
2193 (regset_fill_func, regset_store_func): New.
2194 (enum regset_type): New.
2195 (struct regset_info): Add type field. Use new operation types.
2196 (struct linux_target_ops): stop_pc renamed to get_pc.
2197 Add decr_pc_after_break and breakpoint_at.
2198 (get_process, get_thread_proess, get_process_thread)
2199 (strut process_info, all_processes, linux_attach_lwp)
2200 (thread_db_init): New.
2202 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2203 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2204 (the_low_target): Add new members.
2205 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2206 (i386_store_fpxregset): Constify.
2207 (target_regsets): Add new kind identifier.
2208 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2209 (i386_set_pc): Add debugging.
2210 (i386_breakpoint_at): New function.
2211 (the_low_target): Add new members.
2212 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2213 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2214 (mips_breakpoint_at): New.
2215 (the_low_target): Add new members.
2216 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2217 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2218 (the_low_target): Add new members.
2219 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2220 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2221 (the_low_target): Add new members.
2222 * linux-x86-64-low.c (target_regsets): Add new kind
2225 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2227 From Martin Pool <mbp@samba.org>:
2228 * server.c (gdbserver_usage): New function.
2231 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2233 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2236 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2238 * Makefile.in: Remove obsolete code.
2240 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2242 * linux-low.c (regsets_fetch_inferior_registers),
2243 (regsets_store_inferior_registers): Removed cast to int from
2245 * regcache.h: Added declaration of struct inferior_info.
2247 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2249 * inferiors.c (struct inferior_info): Add regcache_data.
2250 (add_inferior): Call create_register_cache.
2251 (clear_inferiors): Call free_register_cache.
2252 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2253 * regcache.c (struct inferior_regcache_data): New.
2254 (registers): Remove.
2255 (get_regcache): New function.
2256 (create_register_cache, free_register_cache): New functions.
2257 (set_register_cache): Don't initialize the register cache here.
2258 (registers_to_string, registers_from_string, register_data): Call
2260 * regcache.h: Add prototypes.
2261 * server.h: Likewise.
2263 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2265 * mem-break.c: New file.
2266 * mem-break.h: New file.
2267 * Makefile.in: Add mem-break.o rule; update server.h
2269 * inferiors.c (struct inferior_info): Add target_data
2271 (clear_inferiors): Free target_data member if set.
2272 (inferior_target_data, set_inferior_target_data): New functions.
2273 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2274 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2275 * linux-low.c (linux_bp_reinsert): New variable.
2276 (struct inferior_linux_data): New.
2277 (linux_create_inferior): Use set_inferior_target_data.
2278 (linux_attach): Likewise. Call add_inferior.
2279 (linux_wait_for_one_inferior): New function.
2280 (linux_wait): Call it.
2281 (linux_write_memory): Add const.
2282 (initialize_low): Call set_breakpoint_data.
2283 * linux-low.h (struct linux_target_ops): Add breakpoint
2285 * server.c (attach_inferior): Remove extra add_inferior
2287 * server.h: Include mem-break.h. Update inferior.c
2289 * target.c (read_inferior_memory)
2290 (write_inferior_memory): New functions.
2291 * target.h (read_inferior_memory)
2292 (write_inferior_memory): Change macros to prototypes.
2293 (struct target_ops): Update comments. Add const to write_memory
2296 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2298 * linux-low.c (usr_store_inferior_registers): Support
2299 registers which are allowed to fail to store.
2300 * linux-low.h (linux_target_ops): Likewise.
2301 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2302 (ppc_cannot_store_register): FPSCR may not be storable.
2304 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2306 * server.h: Include <string.h> if HAVE_STRING_H.
2307 * ChangeLog: Correct paths in last ChangeLog entry.
2309 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2311 * linux-low.h: Remove obsolete prototypes.
2312 (struct linux_target_ops): New.
2313 (extern the_low_target): New.
2314 * linux-low.c (num_regs, regmap): Remove declarations.
2315 (register_addr): Use the_low_target explicitly.
2316 (fetch_register): Likewise.
2317 (usr_fetch_inferior_registers): Likewise.
2318 (usr_store_inferior_registers): Likewise.
2319 * linux-arm-low.c (num_regs): Remove.
2320 (arm_num_regs): Define.
2321 (arm_regmap): Renamed from regmap, made static.
2322 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2324 (arm_cannot_store_register): Renamed from cannot_store_register,
2326 (the_low_target): New.
2327 * linux-i386-low.c (num_regs): Remove.
2328 (i386_num_regs): Define.
2329 (i386_regmap): Renamed from regmap, made static.
2330 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2332 (i386_cannot_store_register): Renamed from cannot_store_register,
2334 (the_low_target): New.
2335 * linux-ia64-low.c (num_regs): Remove.
2336 (ia64_num_regs): Define.
2337 (ia64_regmap): Renamed from regmap, made static.
2338 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2340 (ia64_cannot_store_register): Renamed from cannot_store_register,
2342 (the_low_target): New.
2343 * linux-m68k-low.c (num_regs): Remove.
2344 (m68k_num_regs): Define.
2345 (m68k_regmap): Renamed from regmap, made static.
2346 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2348 (m68k_cannot_store_register): Renamed from cannot_store_register,
2350 (the_low_target): New.
2351 * linux-mips-low.c (num_regs): Remove.
2352 (mips_num_regs): Define.
2353 (mips_regmap): Renamed from regmap, made static.
2354 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2356 (mips_cannot_store_register): Renamed from cannot_store_register,
2358 (the_low_target): New.
2359 * linux-ppc-low.c (num_regs): Remove.
2360 (ppc_num_regs): Define.
2361 (ppc_regmap): Renamed from regmap, made static.
2362 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2364 (ppc_cannot_store_register): Renamed from cannot_store_register,
2366 (the_low_target): New.
2367 * linux-s390-low.c (num_regs): Remove.
2368 (s390_num_regs): Define.
2369 (s390_regmap): Renamed from regmap, made static.
2370 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2372 (s390_cannot_store_register): Renamed from cannot_store_register,
2374 (the_low_target): New.
2375 * linux-sh-low.c (num_regs): Remove.
2376 (sh_num_regs): Define.
2377 (sh_regmap): Renamed from regmap, made static.
2378 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2380 (sh_cannot_store_register): Renamed from cannot_store_register,
2382 (the_low_target): New.
2383 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2384 (the_low_target): New.
2386 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2388 * Makefile.in: Add stamp-h target.
2389 * configure.in: Create stamp-h.
2390 * configure: Regenerated.
2392 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2394 * inferiors.c: New file.
2395 * target.c: New file.
2396 * target.h: New file.
2397 * Makefile.in: Add target.o and inferiors.o. Update
2399 * linux-low.c (inferior_pid): New static variable,
2400 moved from server.c.
2401 (linux_create_inferior): Renamed from create_inferior.
2402 Call add_inferior. Return 0 on success instead of a PID.
2403 (linux_attach): Renamed from myattach.
2404 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2405 (linux_thread_alive): Renamed from mythread_alive.
2406 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2408 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2409 (regsets_store_inferior_registers): Correct error message.
2410 Add missing ``return 0''.
2411 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2412 (linux_store_registers): Renamed from store_inferior_registers.
2413 (linux_read_memory): Renamed from read_inferior_memory.
2414 (linux_write_memory): Renamed from write_inferior_memory.
2415 (linux_target_ops): New structure.
2416 (initialize_low): Call set_target_ops ().
2417 * remote-utils.c (unhexify): New function.
2418 (hexify): New function.
2419 (input_interrupt): Send signals to ``signal_pid''.
2420 * server.c (inferior_pid): Remove.
2421 (start_inferior): Update create_inferior call.
2422 (attach_inferior): Call add_inferior.
2423 (handle_query): New function.
2424 (main): Call handle_query for `q' packets.
2425 * server.h: Include "target.h". Remove obsolete prototypes.
2426 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2428 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2430 * Makefile.in: Add WARN_CFLAGS. Update configury
2432 * configure.in: Check for <string.h>
2433 * configure: Regenerate.
2434 * config.in: Regenerate.
2435 * gdbreplay.c: Include needed system headers.
2436 (remote_open): Remove strchr prototype.
2437 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2438 * regcache.c (supply_register): Change buf argument to const void *.
2439 (supply_register_by_name): Likewise.
2440 (collect_register): Change buf argument to void *.
2441 (collect_register_by_name): Likewise.
2442 * regcache.h: Add missing prototypes.
2443 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2444 * server.c (handle_query): New function.
2445 (attached): New static variable, moved out of main.
2446 (main): Quiet longjmp clobber warnings.
2447 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2448 * utils.c (error): Remove NORETURN.