1 2008-07-28 Doug Kwan <dougkwan@google.com>
3 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
4 (linux_write_memory): Remove declaration of errno.
6 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8 * linux-low.c (handle_extended_wait): Do not use "status"
9 variable uninitialized.
11 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13 * server.c (handle_v_attach): Inhibit reporting dll changes.
15 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17 * remote-utils.c (prepare_resume_reply): If requested, don't
18 output "thread:TID" in the T stop reply.
20 * server.c (disable_packet_vCont, disable_packet_Tthread)
21 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
22 (handle_query): If requested, disable support for qC, qfThreadInfo
24 (handle_v_requests): If requested, disable support for vCont.
25 (gdbserver_show_disableable): New.
26 (main): Handle --disable-packet and --disable-packet=LIST.
28 * server.h (disable_packet_vCont, disable_packet_Tthread)
29 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
31 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
33 * server.c (gdbserver_usage): Mention --version.
35 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
37 * Makefile.in (gdbreplay.o): New rule.
39 2008-06-06 Joseph Myers <joseph@codesourcery.com>
41 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
42 message, not gdbserver.
44 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
45 Nathan Sidwell <nathan@codesourcery.com>
46 Joseph Myers <joseph@codesourcery.com>
48 * acinclude.m4: Include ../../config/acx.m4.
49 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
50 * configure, config.in: Regenerate.
51 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
52 * server.c (gdbserver_version): Print PKGVERSION.
53 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
54 (main): Adjust gdbserver_usage calls.
55 * gdbreplay.c (version, host_name): Add declarations.
56 (gdbreplay_version, gdbreplay_usage): New.
57 (main): Accept --version and --help options.
59 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
61 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
62 (arm_breakpoint_at): Handle Thumb.
63 (the_low_target): Add comment.
65 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
67 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
69 2008-05-09 Doug Evans <dje@google.com>
71 * server.h (decode_search_memory_packet): Declare.
72 * remote-utils.c (decode_search_memory_packet): New fn.
73 * server.c (handle_search_memory_1): New fn.
74 (handle_search_memory): New fn.
75 (handle_query): Process qSearch:memory packets.
77 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
79 * regcache.c (registers_length): Remove.
80 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
82 * regcache.h (registers_length): Remove prototype.
83 * server.h (PBUFSIZ): Define to 16384.
85 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
87 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
88 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
89 powerpc-64l.o, and powerpc-altivec64l.o.
90 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
91 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
92 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
93 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
94 rs6000/power-linux.xml, and rs6000/power64-linux.xml
97 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
98 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
99 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
100 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
101 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
102 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
103 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
104 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
105 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
106 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
109 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
110 (init_registers_powerpc_32l): ... this new prototype.
111 (init_registers_powerpc_32): Remove, replace by ...
112 (init_registers_powerpc_altivec32l): ... this new prototype.
113 (init_registers_powerpc_e500): Remove, replace by ...
114 (init_registers_powerpc_e500l): ... this new prototype.
115 (init_registers_ppc64): Remove, replace by ...
116 (init_registers_powerpc_64l): ... this new prototype.
117 (init_registers_powerpc_64): Remove, replace by ...
118 (init_registers_powerpc_altivec64l): ... this new prototype.
119 (ppc_num_regs): Set to 73.
120 (PT_ORIG_R3, PT_TRAP): Define if necessary.
121 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
122 (ppc_cannot_store_register): Handle orig_r3 and trap.
123 (ppc_arch_setup): Update init_registers_... calls.
124 (ppc_fill_gregset): Handle orig_r3 and trap.
126 * inferiors.c (clear_inferiors): Reset current_inferior.
128 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
130 * acinclude.m4: Add override.m4.
131 * configure: Regenerate.
133 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
135 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
136 initial call to init_register_ppc64.
138 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
140 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
141 powerpc*-*-linux* case.
142 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
144 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
146 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
147 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
149 * linux-ppc-low.c: Include <elf.h>.
150 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
151 (ppc_hwcap): New global variable.
152 (ppc_regmap): Remove __SPE__ #ifdef sections.
153 (ppc_regmap_e500): New global variable.
154 (ppc_cannot_store_register): Update __SPE__ special case.
155 (ppc_get_hwcap): New function.
156 (ppc_arch_setup): Use it to determine whether inferior supports
157 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
158 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
159 Do not access registers if target does not support AltiVec.
160 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
161 Do not access registers if target does not support SPE.
162 (target_regsets): Unconditionally include AltiVec and SPE regsets.
164 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
166 * linux-low.c (disabled_regsets, num_regsets): New.
167 (use_regsets_p): Delete.
168 (linux_wait_for_process): Clear disabled_regsets.
169 (regsets_fetch_inferior_registers): Check and set it.
170 (regsets_store_inferior_registers): Likewise.
171 (linux_fetch_registers, linux_store_registers): Do not use
173 (initialize_low): Allocate disabled_regsets.
175 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
177 * Makefile.in (LIBOBJS): New.
179 (memmem.o): New rule.
180 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
181 * configure: Regenerated.
183 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
185 * server.c (handle_query): Never return "unsupported" for
186 qXfer:features:read queries.
188 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
190 * server.c (get_features_xml): Fix inverted condition.
191 (handle_query): Always support qXfer:feature:read.
193 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
195 * server.c (wrapper_argv): New.
196 (start_inferior): Handle wrapper_argv. If set, expect an extra
198 (gdbserver_usage): Document --wrapper.
199 (main): Parse --wrapper.
201 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
203 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
204 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
205 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
206 (ppc_set_pc): Likewise.
207 (ppc_arch_setup): New function.
208 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
210 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
212 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
214 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
215 instead of linux-ppc64-low.o.
216 * linux-ppc64-low.c: Remove file.
217 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
218 (linux-ppc64-low.o): Remove rule.
220 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
221 (init_registers_powerpc_64): Likewise.
222 (ppc_regmap): Conditionally define depending on __powerpc64__.
223 (ppc_cannot_store_register): Do not special-case "fpscr" when
224 compiled on __powerpc64__.
225 (ppc_collect_ptrace_register): New function.
226 (ppc_supply_ptrace_register): New function.
227 (ppc_breakpoint): Change type to "unsigned int".
228 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
229 (the_low_target): Conditionally provide initializers for the
230 arch_setup member depending on __powerpc64__. Install
231 collect_ptrace_register and supply_ptrace_register members.
233 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
235 * regcache.h (gdbserver_xmltarget): Add extern declaration.
236 * server.c (gdbserver_xmltarget): Define.
237 (get_features_xml): Use it to replace "target.xml" and arch_string.
239 * configure.srv: Remove srv_xmltarget. Add XML files that were
240 mentioned there to srv_xmlfiles instead. Remove conditional tests
241 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
242 srv_xmlfiles and srv_regobj to include all possible choices.
243 * configure.ac (srv_xmltarget): Remove.
244 (srv_xmlfiles): Do not add "target.xml".
245 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
246 checks for supplementary target information.
247 * configure: Regenerate.
248 * Makefile.in (XML_TARGET): Remove.
249 (target.xml): Remove rule.
250 (clean): Do not clean up target.xml.
251 (.PRECIOUS): Do not mention target.xml.
253 * target.h (struct target_ops): Remove arch_string member.
254 * linux-low.c (linux_arch_string): Remove.
255 (linux_target_ops): Remove arch_string initializer.
256 * linux-low.h (struct linux_target_ops): Remove arch_string member.
257 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
258 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
259 * spu-low.c (spu_arch_string): Remove.
260 (spu_target_ops): Remove arch_string initializer.
261 * win32-low.c (win32_arch_string): Remove.
262 (win32_target_ops): Remove arch_string initializer.
263 * win32-low.h (struct win32_target_ops): Remove arch_string member.
264 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
265 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
267 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
269 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
270 by collect_ptrace_register and supply_ptrace_register hooks.
271 * linux-low.c (fetch_register): Use supply_ptrace_register callback
272 instead of checking for the_low_target.left_pad_xfer.
273 (usr_store_inferior_registers): Use collect_ptrace_register callback
274 instead of checking for the_low_target.left_pad_xfer.
276 * linux-s390-low.c (s390_collect_ptrace_register): New function.
277 (s390_supply_ptrace_register): Likewise.
278 (s390_fill_gregset): Call s390_collect_ptrace_register.
279 (the_low_target): Update.
281 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
282 (ppc_supply_ptrace_register): Likewise.
283 (the_low_target): Update.
285 * linux-i386-low.c (the_low_target): Update.
286 * linux-x86-64-low.c (the_low_target): Update.
288 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
290 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
291 reg-s390.o and reg-s390x.o.
293 * linux-low.c (new_inferior): New global variable.
294 (linux_create_inferior, linux_attach): Set it.
295 (linux_wait_for_process): Call the_low_target.arch_setup after the
296 target has stopped for the first time.
297 (initialize_low): Do not call the_low_target.arch_setup.
299 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
300 (s390_set_pc): Likewise.
301 (s390_arch_setup): New function.
302 (the_low_target): Use s390_arch_setup as arch_setup routine.
304 * regcache.c (realloc_register_cache): New function.
305 (set_register_cache): Call it for each existing regcache.
307 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
309 * server.h (init_registers): Remove prototype.
311 * linux-low.h (struct linux_target_ops): Add arch_setup field.
312 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
313 instead of init_registers ().
314 * linux-arm-low.c (init_registers_arm): Add prototype.
315 (init_registers_arm_with_iwmmxt): Likewise.
316 (the_low_target): Add initializer for arch_setup field.
317 * linux-cris-low.c (init_registers_cris): Add prototype.
318 (the_low_target): Add initializer for arch_setup field.
319 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
320 (the_low_target): Add initializer for arch_setup field.
321 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
322 (the_low_target): Add initializer for arch_setup field.
323 * linux-ia64-low.c (init_registers_ia64): Add prototype.
324 (the_low_target): Add initializer for arch_setup field.
325 * linux-m32r-low.c (init_registers_m32r): Add prototype.
326 (the_low_target): Add initializer for arch_setup field.
327 * linux-m68k-low.c (init_registers_m68k): Add prototype.
328 (the_low_target): Add initializer for arch_setup field.
329 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
330 (init_registers_mips64_linux): Likewise.
331 (the_low_target): Add initializer for arch_setup field.
332 * linux-ppc-low.c (init_registers_ppc): Add prototype.
333 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
334 (the_low_target): Add initializer for arch_setup field.
335 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
336 (init_registers_powerpc_64): Likewise.
337 (the_low_target): Add initializer for arch_setup field.
338 * linux-s390-low.c (init_registers_s390): Add prototype.
339 (init_registers_s390x): Likewise.
340 (the_low_target): Add initializer for arch_setup field.
341 * linux-sh-low.c (init_registers_sh): Add prototype.
342 (the_low_target): Add initializer for arch_setup field.
343 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
344 (the_low_target): Add initializer for arch_setup field.
345 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
346 (the_low_target): Add initializer for arch_setup field.
348 * win32-low.h (struct win32_target_ops): Add arch_setup field.
349 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
350 instead of init_registers ().
351 * win32-arm-low.c (init_registers_arm): Add prototype.
352 (the_low_target): Add initializer for arch_setup field.
353 * win32-i386-low.c (init_registers_i386): Add prototype.
354 (the_low_target): Add initializer for arch_setup field.
356 * spu-low.c (init_registers_spu): Add prototype.
357 (initialize_low): Call initialie_registers_spu () instead of
358 initialize_registers ().
360 2008-02-19 Pedro Alves <pedro@codesourcery.com>
362 * server.c (handle_v_requests): When handling the vRun and vAttach
363 packets, if already debugging a process, don't kill it. Return an
366 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
368 * server.c (handle_query): Correct length check.
370 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
372 * win32-low.c (do_initial_child_stuff): Add process handle
373 parameter. Set current_process_handle and current_process_id from the
374 parameters. Clear globals.
375 (win32_create_inferior): Don't set current_process_handle and
376 current_process_id here. Instead pass them on the call to
377 do_initial_child_stuff.
378 (win32_attach): Likewise.
379 (win32_clear_inferiors): New.
380 (win32_kill): Don't close the current process handle or the
381 current thread handle here. Instead call win32_clear_inferiors.
382 (win32_detach): Don't open a new handle to the process. Call
383 win32_clear_inferiors.
384 (win32_join): Don't rely on current_process_handle; open a new
385 handle using the process id.
386 (win32_wait): Call win32_clear_inferiors when the inferior process
389 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
391 * server.c (monitor_show_help): Add "exit".
393 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
395 * Makefile.in (SFILES): Add linux-xtensa-low.c.
396 (clean): Add reg-xtensa.c.
397 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
398 * configure.srv (xtensa*-*-linux*) New target.
399 * linux-xtensa-low.c: New.
400 * xtensa-xtregs.c: New.
402 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
404 * hostio.c: Don't include errno.h.
405 (errno_to_fileio_errno): Move to hostio-errno.
406 * hostio.c: (hostio_error): Remove the error parameter. Defer the
407 error number outputting to the target->hostio_last_error callback.
408 (hostio_packet_error): Use FILEIO_EINVAL directly.
409 (handle_open, handle_pread, hostio_error, handle_unlink): Update
410 calls to hostio_error.
411 * hostio-errno.c: New.
412 * server.h (hostio_last_error_from_errno): Declare.
413 * target.h (target_ops): Add hostio_last_error member.
414 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
415 as hostio_last_error handler.
416 * spu-low.c (spu_target_ops): Likewise.
417 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
418 (wince_hostio_last_error): New functions.
419 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
420 as hostio_last_error handler.
421 (win32_target_ops) [!_WIN32_WCE]: Register
422 hostio_last_error_from_errno as hostio_last_error handler.
423 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
424 (hostio-errno.o): New rule.
425 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
426 * configure.srv (srv_hostio_err_objs): New variable. Default to
428 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
429 * configure: Regenerate.
431 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
433 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
434 (linux_kill, linux_detach): Clean up the process list.
435 * remote-utils.c (remote_open): Improve port number parsing.
436 (putpkt_binary, input_interrupt): Only send interrupts if the target
438 * server.c (extended_protocol): Make static.
439 (attached): Define earlier.
440 (exit_requested, response_needed, program_argv): New variables.
441 (target_running): New.
442 (start_inferior): Clear attached here.
443 (attach_inferior): Set attached here.
444 (require_running): Define.
445 (handle_query): Use require_running and target_running. Implement
447 (handle_v_attach, handle_v_run): New.
448 (handle_v_requests): Use require_running. Handle vAttach and vRun.
449 (gdbserver_usage): Update.
450 (main): Redo argument parsing. Handle --debug and --multi. Handle
451 --attach along with other options or after the port. Save
452 program_argv. Support no initial program. Resynchronize
453 communication with GDB after an error. Handle "monitor exit".
454 Use require_running and target_running. Always allow the extended
455 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
456 restart in extended mode.
457 * README: Refer to the GDB manual. Update --attach usage.
459 2007-12-20 Andreas Schwab <schwab@suse.de>
461 * linux-low.c (STACK_SIZE): Define.
462 (linux_tracefork_child): Use it. Use __clone2 on ia64.
463 (linux_test_for_tracefork): Likewise.
465 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
467 * linux-low.c (linux_wait_for_event): Update messages. Do not
468 reinsert auto-delete breakpoints.
469 * mem-break.c (struct breakpoint): Change return type of handler to
471 (set_breakpoint_at): Update handler type.
472 (reinsert_breakpoint_handler): Return 1 instead of calling
474 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
476 (check_breakpoints): Delete auto-delete breakpoints and return 2.
477 * mem-break.h (set_breakpoint_at): Update handler type.
478 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
479 * win32-low.c (auto_delete_breakpoint): New.
480 (get_child_debug_event): Use it.
482 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
484 * configure.ac: Check for pread and pwrite.
485 * hostio.c (handle_pread): Fall back to lseek and read.
486 (handle_pwrite): Fall back to lseek and write.
487 * config.in, configure: Regenerated.
489 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
491 * server.c (myresume): Add own_buf argument.
492 (main): Update calls.
494 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
496 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
497 * remote-utils.c (remote_open): Do not call disable_async_io.
498 (block_async_io): Delete.
499 (unblock_async_io): Make static.
500 (initialize_async_io): New.
501 * server.c (handle_v_cont): Handle async I/O here.
502 (myresume): Likewise. Move other common resume tasks here...
503 (main): ... from here. Call initialize_async_io. Disable async
504 I/O before the main loop.
505 * server.h (initialize_async_io): Declare.
506 (block_async_io, unblock_async_io): Delete prototypes.
507 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
509 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
511 * remote-utils.c (readchar): Allow binary data in received messages.
513 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
515 * win32-low.c (attaching): New global.
516 (win32_create_inferior): Clear the `attaching' global.
517 (win32_attach): Set the `attaching' global.
518 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
519 attaching. Only set a breakpoint at the entry point if not
522 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
524 * server.c (main): Don't report dll events on the initial
525 connection on attaches.
527 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
529 * server.c (main): Relax numerical bases supported for the pid of
530 the --attach command line argument.
532 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
534 * win32-low.c (win32_attach): Call OpenProcess before
535 DebugActiveProcess, not after. Add last error output to error
538 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
540 * win32-low.c (win32_get_thread_context)
541 (win32_set_thread_context): New functions.
542 (thread_rec): Use win32_get_thread_context.
543 (continue_one_thread, win32_resume): Use win32_set_thread_context.
544 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
548 Pedro Alves <pedro_alves@portugalmail.pt>
550 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
552 (child_add_thread): Minor cleanup.
553 (child_continue): Resume artificially suspended threads before
554 calling ContinueDebugEvent.
555 (suspend_one_thread): New.
556 (fake_breakpoint_event): New.
557 (get_child_debug_event): Change return type to int. Check here if
558 gdb sent an interrupt request. If a soft interrupt was requested,
559 fake a breakpoint event. Return 0 if there is no event to handle,
561 (win32_wait): Don't check here if gdb sent an interrupt request.
562 Ensure there is a valid event to handle.
563 (win32_request_interrupt): Add soft interruption method as last
567 Pedro Alves <pedro_alves@portugalmail.pt>
569 * win32-low.h (win32_thread_info): Add descriptions to the
570 structure members. Replace `suspend_count' counter by a
572 * win32-low.c (thread_rec): Update condition of when to get the
573 context from the inferior. Rely on ContextFlags being set if it
574 has already been retrieved. Only suspend the inferior thread if
575 we haven't already. Warn if that fails.
576 (continue_one_thread): s/suspend_count/suspended/. Only call
577 ResumeThread once. Warn if that fails.
579 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
581 * win32-low.c (win32_wait): Don't read from the inferior when it
584 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
586 * Makefile.in (win32_low_h): New variable.
587 (win32-low.o): Add dependency on $(win32_low_h).
588 (win32-arm-low.o, win32-i386-low.o): New rules.
590 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
592 * hostio.c: Correct copyright year.
594 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
596 * Makefile.in (OBS): Add hostio.o.
597 (hostio.o): New rule.
598 * server.h (handle_vFile): Declare.
599 * hostio.c: New file.
600 * server.c (handle_v_requests): Take packet_len and new_packet_len
601 for binary packets. Call handle_vFile.
602 (main): Update call to handle_v_requests.
604 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
606 * linux-low.c: Include <sched.h>.
608 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
610 * linux-low.c (linux_tracefork_grandchild): New.
611 (linux_tracefork_child): Use clone.
612 (linux_test_for_tracefork): Use clone; allocate and free a stack.
614 2007-10-31 Joel Brobecker <brobecker@adacore.com>
616 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
618 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
620 * linux-low.c (handle_extended_wait): Handle unexpected signals.
622 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
624 * inferiors.c (change_inferior_id): Delete.
625 (add_pid_to_list, pull_pid_from_list): New.
626 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
627 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
628 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
629 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
630 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
631 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
632 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
633 (using_threads): Always set to 1.
634 (handle_extended_wait): New.
635 (add_process): Do not set TID.
636 (linux_create_inferior): Set must_set_ptrace_flags.
637 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
638 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
639 (linux_thread_alive): Rename TID argument to LWPID.
640 (linux_wait_for_process): Handle unknown processes. Do not use TID.
641 (linux_wait_for_event): Do not use TID or check using_threads. Update
642 call to dead_thread_notify. Call handle_extended_wait.
643 (linux_create_inferior): Use PTRACE_SETOPTIONS.
644 (send_sigstop): Delete sigstop_sent.
645 (wait_for_sigstop): Avoid TID.
646 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
647 (linux_test_for_tracefork): New.
648 (linux_lookup_signals): Use thread_db_active and
649 linux_supports_tracefork_flag.
650 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
651 * linux-low.h (get_process_thread): Avoid TID.
652 (struct process_ifo): Move thread_known and tid to the end. Remove
654 (linux_attach_lwp, thread_db_init): Update prototypes.
655 * server.h (change_inferior_id): Delete prototype.
656 (add_pid_to_list, pull_pid_from_list): New prototypes.
657 * thread-db.c (thread_db_use_events): New.
658 (find_first_thread): Rename to...
659 (find_one_thread): ...this. Update callers and messages. Do not
660 call fatal. Check thread_db_use_events. Do not call
661 change_inferior_id or new_thread_notify.
662 (maybe_attach_thread): Update. Do not call new_thread_notify.
663 (thread_db_init): Set thread_db_use_events. Check use_events.
664 * utils.c (fatal, warning): Correct message prefix.
666 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
668 * Makefile.in (clean): Remove new files.
669 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
670 (powerpc-64.o, powerpc-64.c): New rules.
671 * configure.srv: Use alternate register sets for powerpc64-*-linux*
672 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
674 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
676 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
677 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
678 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
679 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
680 (target_regsets): Add AltiVec and SPE register sets.
681 * configure.ac: Check for AltiVec and SPE.
682 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
683 (ppc_fill_vrregset, ppc_store_vrregset): New.
684 (target_regsets): Add AltiVec register set.
685 * configure: Regenerated.
687 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
689 * linux-low.c (O_LARGEFILE): Define.
690 (linux_read_memory): Use /proc/PID/mem.
691 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
692 * configure, config.in: Regenerated.
694 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
696 * linux-low.c (linux_wait_for_event): Do not pass signals while
699 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
701 * win32-low.c (create_process): New.
702 (win32_create_inferior): Use create_process instead of
703 CreateProcess. If create_process failed retry appending an ".exe"
704 suffix. Store the GetLastError result immediatelly after
705 create_process calls and use it on the call to error.
707 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
709 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
711 2007-08-23 Joel Brobecker <brobecker@adacore.com>
713 * configure.ac: Switch license to GPLv3.
715 2007-08-01 Michael Snyder <msnyder@access-company.com>
717 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
719 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
721 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
723 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
724 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
725 CloseToolhelp32Snapshot.
726 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
727 CloseToolhelp32Snapshot.
729 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
731 * server.c (main): Check for inferior exit before main loop.
733 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
735 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
736 instead of on tmp_desc.
738 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
739 Daniel Jacobowitz <dan@codesourcery.com>
741 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
742 (add_thread): Minor cleanups.
743 (clear_inferiors): Move lower in the file. Clear the DLL
745 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
746 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
747 (xml_escape_text): New.
748 * server.c (handle_query): Handle qXfer:libraries:read. Report it
750 (handle_v_cont): Report errors.
751 (gdbserver_version): Update.
752 (main): Correct size of own_buf. Do not report initial DLL events.
753 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
754 (unloaded_dll, xml_escape_text): New.
755 * win32-low.c (enum target_waitkind): Update comments.
756 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
757 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
758 (win32_EnumProcessModules, win32_GetModuleInformation)
759 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
760 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
761 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
762 (win32_Module32First, win32_Module32Next, load_toolhelp)
763 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
764 (get_child_debug_event): Handle DLL events.
765 (win32_wait): Likewise.
767 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
769 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
770 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
772 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
774 * win32-low.c (handle_output_debug_string): Ignore event if not
777 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
779 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
781 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
783 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
785 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
787 * inferiors.c (change_inferior_id): Add comment.
788 * linux-low.c (check_removed_breakpoint): Add an early
789 prototype. Improve debug output.
790 (linux_attach): Doc update.
791 (linux_detach_one_process, linux_detach): Clean up before releasing
793 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
794 * linux-low.h (struct process_info): Doc improvement.
795 * mem-break.c (delete_all_breakpoints): New.
796 * mem-break.h (delete_all_breakpoints): New prototype.
797 * thread-db.c (find_first_thread): New.
798 (thread_db_create_event): Call it instead of
799 thread_db_find_new_threads. Clean up unused variables.
800 (maybe_attach_thread): Remove first thread handling.
801 (thread_db_find_new_threads): Use find_first_thread.
802 (thread_db_get_tls_address): Likewise.
804 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
806 * thread-db.c (thread_db_find_new_threads): Add prototype.
807 (thread_db_create_event): Check for the main thread before adding
809 (maybe_attach_thread): Only enable event reporting if TID == 0.
810 (thread_db_get_tls_address): Check for new threads.
812 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
814 * linux-low.c (linux_create_inferior): Try execv before execvp.
815 * spu-low.c (spu_create_inferior): Likewise.
817 2007-06-13 Mike Frysinger <vapier@gentoo.org>
819 * linux-low.c (linux_create_inferior): Change execv to execvp.
820 * spu-low.c (spu_create_inferior): Likewies.
822 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
824 * Makefile.in (clean): Clean new files instead of deleted ones.
825 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
826 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
828 * configure.srv: Specify XML files and new regformats for MIPS and
830 * linux-mips-low.c (mips_num_regs): Set to only used registers.
831 (mips_regmap): Do not fetch $0. Remove unused registers. Add
832 an entry for the restart register.
833 (mips_cannot_fetch_register, mips_cannot_store_register)
834 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
835 register names to match the XML descriptions.
836 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
837 restart register instead of $0.
839 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
840 Markus Deuling <deuling@de.ibm.com>
842 * remote-utils.c (decode_xfer_write): New function.
843 * server.h (decode_xfer_write): Add prototype.
844 * server.c (handle_query): Add PACKET_LEN argument. Support
845 qXfer:spu:read and qXfer:spu:write packets.
846 (main): Pass packet_len to handle_query.
847 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
848 * target.h (target_ops): Add qxfer_spu.
850 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
852 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
853 accessing non-seekable spufs files.
855 2007-05-16 Markus Deuling <deuling@de.ibm.com>
857 * server.c (handle_query): Add reply for qC packet.
859 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
860 Leo Zayas <lerele@champenstudios@com>
862 * server.h (check_remote_input_interrupt_request): New function.
863 * remote_utils.c (INVALID_DESCRIPTOR): New define.
864 (remote_desc): Initialize with INVALID_DESCRIPTOR.
865 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
866 (check_remote_input_interrupt_request): New function.
867 * server.h (check_remote_input_interrupt_request): Declare.
868 * win32-low.c (winapi_DebugBreakProcess,
869 winapi_GenerateConsoleCtrlEvent): New typedefs.
870 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
872 (win32_wait): Check for remote interrupt request
873 with check_remote_input_interrupt_request.
874 (win32_request_interrupt): New function.
875 (win32_target_op): Set request_interrupt to win32_request_interrupt.
877 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
879 * win32-low.c (debug_registers_changed,
880 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
881 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
882 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
883 (thread_rec): Get context using the low target.
884 (child_add_thread): Call thread_added on the low target,
885 which does the same thing.
887 (do_initial_child_stuff): Remove debug registers references.
888 Set context using the low target. Resume threads after
889 setting the contexts.
890 (child_continue): Remove dead variable. Remove debug
891 registers references.
892 (child_fetch_inferior_registers): Go through the low target.
893 (do_child_store_inferior_registers): Remove.
894 (child_store_inferior_registers): Go through the low target.
895 (win32_resume): Remove debug registers references.
896 Set context using the low target.
897 (handle_exception): Change return type to void. Don't record
898 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
899 first chance exception.
900 (get_child_debug_event): Change return type to void. Remove
901 goto loop. Always return after waiting for debug event.
902 (win32_wait): Convert to switch statement. Handle spurious
905 * win32-i386-low.c (debug_registers_changed,
906 debug_registers_used): New.
907 (initial_stuff): Rename to ...
908 (i386_initial_stuff): ... this. Clear debug registers
910 (store_debug_registers): Delete.
911 (i386_get_thread_context): New.
912 (load_debug_registers): Delete.
913 (i386_set_thread_context): New.
914 (i386_thread_added): New.
915 (single_step): Rename to ...
916 (i386_single_step): ... this.
917 (do_fetch_inferior_registers): Rename to ...
918 (i386_fetch_inferior_register): ... this.
919 (i386_store_inferior_register): New.
920 (the_low_target): Adapt to new interface.
922 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
923 (arm_get_thread_context): New.
924 (arm_set_thread_context): New.
926 (do_fetch_inferior_registers): Rename to ...
927 (arm_fetch_inferior_register): ... this.
928 (arm_store_inferior_register): New.
929 (arm_wince_breakpoint): Reimplement as unsigned long.
930 (arm_wince_breakpoint_len): Define.
931 (the_low_target): Adapt to new interface.
933 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
934 load_debug_registers. Add get_thread_context, set_thread_context,
935 thread_added and store_inferior_register. Rename
936 fetch_inferior_registers to fetch_inferior_register.
937 (regptr): Remove declaration.
939 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
941 * linux-low.c (linux_detach): Change return type to int. Return 0.
942 * spu-low.c (spu_detach): Likewise.
944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
946 * target.h (target_ops): Change return type of detach to int.
948 (join_inferior): New.
949 * server.c (main): Don't skip detach support on mingw32.
950 If the inferior doesn't support detaching return error.
951 Call join_inferior instead of using waitpid.
952 * linux-low.c (linux_join): New.
953 (linux_target_op): Add linux_join.
954 * spu-low.c (spu_join): New.
955 (spu_target_ops): Add spu_join.
956 * win32-low.c (win32_detach): Adapt to new interface.
957 Reopen current_process_handle before detaching. Issue a child
958 resume before detaching.
960 (win32_target_op): Add win32_join.
962 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
964 * win32-low.c (win32-attach): Fix return value.
965 * target.h (target_ops): Describe ATTACH return values.
967 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
969 * win32-low.c (GETPROCADDRESS): Define.
970 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
971 (winapi_DebugSetProcessKillOnExit): Likewise.
972 (win32_create_inferior): Force usage of ansi CreateProcessA.
973 (win32_attach): Use GETPROCADDRESS.
974 (win32_detach): Likewise.
976 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
978 * win32-low.c (win32_wait): Don't use WSTOPSIG.
980 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
982 * win32-low.c: Commit leftover changes from 2007-03-29.
984 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
986 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
987 fields short instead of int. Add explicit padding.
988 (i387_cache_to_fsave): Remove unnecessary casts.
989 (i387_fsave_to_cache): Doc fix.
990 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
992 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
994 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
995 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
997 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
999 * configure.srv (arm*-*-mingw32ce*): Move near the other
1002 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
1004 * configure.ac: Add errno checking.
1005 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
1006 sys/file.h and malloc.h.
1007 (AC_CHECK_DECLS): Add perror.
1008 (srv_mingwce): Handle.
1009 * configure.srv (i[34567]86-*-cygwin*): Add
1010 win32-i386-low.o to srv_tgtobj.
1011 (i[34567]86-*-mingw*): Likewise.
1012 (arm*-*-mingw32ce*): Add case.
1013 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1014 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
1015 [__MINGW32CE__] (strerror): New function.
1016 [__MINGW32CE__] (errno): Define to GetLastError.
1017 [__MINGW32CE__] (COUNTOF): New macro.
1018 (remote_open): Remove extra close call.
1019 * mem-break.c (delete_breakpoint_at): New function.
1020 * mem-break.h (delete_breakpoint_at): Declare.
1021 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
1022 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
1023 [USE_WIN32API] (read, write): Add char* casts.
1024 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
1025 * server.h: Include wincecompat.h on Windows CE.
1026 [HAVE_ERRNO_H]: Check.
1027 (perror): Declare if not declared.
1028 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
1029 (perror_with_name): Remove errno declaration.
1030 * wincecompat.h: New.
1031 * wincecompat.c: New.
1033 * win32-arm-low.c: New.
1034 * win32-i386-low.c: New.
1035 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
1036 (OUTMSG2): Make it safe.
1038 (COUNTOF): New macro.
1039 (NUM_REGS): Get it from the low target.
1040 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
1041 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
1042 (thread_rec): Let low target handle debug registers.
1043 (child_add_thread): Likewise.
1044 (child_init_thread_list): Likewise.
1045 (continue_one_thread): Likewise.
1047 (do_child_fetch_inferior_registers): Move to ...
1048 * win32-i386-low.c: ... here, and rename to ...
1049 (do_fetch_inferior_registers): ... this.
1050 * win32-low.c (child_fetch_inferior_registers):
1051 Go through the low target.
1052 (do_child_store_inferior_registers): Use regptr.
1053 (strwinerror): New function.
1054 (win32_create_inferior): Handle Windows CE.
1055 Use strwinerror instead of strerror on Windows error
1056 codes. Add program to the error output.
1057 Don't close the main thread handle on Windows CE.
1058 (win32_attach): Use coredll.dll on Windows CE.
1059 (win32_kill): Close current process and current
1061 (win32_detach): Use coredll.dll on Windows CE.
1062 (win32_resume): Let low target handle debug registers, and
1064 (handle_exception): Add/Remove initial breakpoint. Avoid
1065 non-existant WSTOPSIG on Windows CE.
1066 (win32_read_inferior_memory): Cast to remove warning.
1067 (win32_arch_string): Go through the low target.
1068 (initialize_low): Call set_breakpoint_data with the low
1069 target's breakpoint.
1070 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
1071 FOP_REGNUM, mappings): Move to ...
1072 * win32-i386-low.c: ... here.
1073 * win32-low.c (win32_thread_info): Move to ...
1074 * win32-low.h: ... here.
1075 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
1076 win32-arm-low.c and wincecompat.c.
1077 (all:): Add $EXEEXT.
1078 (install-only:): Likewise.
1079 (gdbserver:): Likewise.
1080 (gdbreplay:): Likewise.
1081 * config.in: Regenerate.
1082 * configure: Regenerate.
1084 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1086 * win32-low.c: Rename typedef thread_info to
1087 win32_thread_info throughout.
1089 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
1091 * win32-i386-low.c: Rename to ...
1092 * win32-low.c: ... this.
1093 * configure.srv: Replace win32-i386-low.o with win32-low.o.
1094 * Makefile.in: Likewise.
1096 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
1098 * remote-utils.c (monitor_output): Constify msg parameter.
1099 * server.h (monitor_output): Likewise.
1100 * win32-i386-low.c (handle_output_debug_string): New.
1101 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
1102 handle_output_debug_string.
1103 (get_child_debug_event): Likewise.
1105 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
1107 * server.c (main): Correct strtoul check.
1109 2007-03-27 Jon Ringle <jon@ringle.org>
1111 * linux-low.c: Check __ARCH_HAS_MMU__ also.
1113 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
1115 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
1117 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1119 * terminal.h: Check HAVE_SGTTY_H.
1121 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
1123 * remote-utils.c (remote_open): Print out the assigned port number.
1125 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
1127 * remote-utils.c (monitor_output): New function.
1128 * server.c (debug_threads): Define here.
1129 (monitor_show_help): New function.
1130 (handle_query): Handle qRcmd.
1131 (main): Do not handle 'd' packet.
1132 * server.h (debug_threads, remote_debug, monitor_output): Declare.
1133 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
1136 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1138 * Makefile.in (EXEEXT): New.
1139 (clean): Use $(EXEEXT).
1141 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1143 * target.h (target_ops): Rename send_signal to request_interrupt,
1144 and remove enum target_signal parameter.
1145 * linux-low.c (linux_request_interrupt): Rename from
1146 linux_send_signal, and always send SIGINT.
1147 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
1148 and always send SIGINT.
1149 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
1151 (input_interrupt): Likewise.
1153 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
1155 * server.c (get_features_xml): Check if target implemented
1157 * win32-i386-low.c (win32_arch_string): New.
1158 (win32_target_ops): Add win32_arch_string as arch_string member.
1160 2007-02-22 Markus Deuling <deuling@de.ibm.com>
1162 * spu-low.c (spu_arch_string): New.
1163 (spu_target_ops): Add spu_arch_string.
1165 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
1167 * remote-utils.c: Remove HAVE_TERMINAL_H check.
1168 * configure.ac: Do not check for terminal.h.
1169 * configure, config.in: Regenerated.
1171 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1173 * Makefile.in (OBS): Add $(XML_BUILTIN).
1174 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
1176 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
1177 (arm-with-iwmmxt.c): New.
1178 * config.in, configure: Regenerate.
1179 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
1180 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
1181 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
1182 (arm*-*-linux*): Add iWMMXt and regset support.
1183 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
1184 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
1185 (arm_store_wmmxregset, target_regsets): New.
1186 * server.c (get_features_xml): Take annex argument. Check builtin
1188 (handle_query): Handle multiple annexes.
1190 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1192 * remote-utils.c [USE_WIN32API] (read, write): Define.
1193 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
1196 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
1198 * linux-i386-low.c (the_low_target): Set arch_string.
1199 * linux-x86-64-low.c (the_low_target): Likewise.
1200 * linux-low.c (linux_arch_string): New.
1201 (linux_target_ops): Add it.
1202 * linux-low.h (struct linux_target_ops): Add arch_string.
1203 * server.c (write_qxfer_response): Use const void * for DATA.
1204 (get_features_xml): New.
1205 (handle_query): Handle qXfer:features:read. Report it for qSupported.
1206 * target.h (struct target_ops): Add arch_string method.
1208 2007-01-03 Denis Pilat <denis.pilat@st.com>
1209 Daniel Jacobowitz <dan@codesourcery.com>
1211 * linux-low.c (linux_kill): Handle being called with no threads.
1212 * win32-i386-low.c (win32_kill): Likewise.
1213 (get_child_debug_event): Clear current_process_handle.
1215 2006-12-30 Denis PILAT <denis.pilat@st.com>
1216 Daniel Jacobowitz <dan@codesourcery.com>
1218 * remote-utils.c (remote_open): Check the type of specified
1219 serial port devices before opening them.
1220 * server.c (main): Kill the inferior if an error occurs during
1221 the first remote_open.
1223 2006-12-05 Markus Deuling <deuling@de.ibm.com>
1225 * README: Update supported targets.
1227 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
1229 * Makefile.in (clean): Remove reg-mips64.c.
1230 (reg-mips64.c, reg-mips64.o): New rules.
1231 * configure.srv: Handle mips64. Include regset support for mips.
1232 * linux-mips-low.c (union mips_register): New.
1233 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
1234 (mips_breakpoint, mips_breakpoint_at): Use int.
1235 (mips_collect_register, mips_supply_register)
1236 (mips_collect_register_32bit, mips_supply_register_32bit)
1237 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1238 (mips_store_fpregset, target_regsets): New.
1239 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
1241 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1243 * configure.srv: Add target "spu*-*-*".
1244 * Makefile.in (clean): Remove reg-spu.c.
1245 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
1246 * spu-low.c: New file.
1248 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1250 * configure.ac: Correct td_thr_tls_get_addr test.
1251 * configure: Regenerated.
1253 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
1255 * linux-low.c (linux_wait_for_event): Reformat. Use the
1257 * remote-utils.c (decode_address_to_semicolon): New.
1258 * server.c (pass_signals, handle_general_set): New.
1259 (handle_query): Mention QPassSignals for qSupported.
1260 (main): Call handle_general_set.
1261 * server.h (pass_signals, decode_address_to_semicolon): New.
1263 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
1265 * server.c (handle_query): Correct error handling for read_auxv.
1267 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
1269 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
1270 and srv_linux_thread_db to yes.
1271 * linux-s390-low.c (s390_fill_gregset): New function.
1272 (target_regsets): Define data structure.
1274 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
1276 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
1277 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
1278 * config.in, configure: Regenerated.
1279 * inferiors.c (gdb_id_to_thread): New function.
1280 (gdb_id_to_thread_id): Use it.
1281 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
1282 * linux-low.h (struct process_info): Add th member.
1283 (thread_db_get_tls_address): New prototype.
1284 * remote-utils.c (decode_address): Make non-static.
1285 * server.c (handle_query): Handle qGetTLSAddr.
1286 * server.h (gdb_id_to_thread, decode_address): New prototypes.
1287 * target.h (struct target_ops): Add get_tls_address.
1288 * thread-db.c (maybe_attach_thread): Save the thread handle.
1289 (thread_db_get_tls_address): New.
1291 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
1293 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
1294 (linux_resume_one_process): Take a siginfo_t *. Update all
1295 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
1296 (struct pending_signals): Add a siginfo_t.
1297 (linux_wait_for_process): Always set last_status.
1298 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
1299 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
1300 * linux-low.h (struct process_info): Add last_status.
1302 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
1304 * remote-utils.c (try_rle): New function.
1305 (putpkt_binary): Use it.
1307 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
1309 * Makefile.in (clean): Clean reg-x86-64-linux.c.
1310 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
1311 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
1312 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
1313 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
1316 2006-08-08 Richard Sandiford <richard@codesourcery.com>
1318 * server.c (terminal_fd): New variable.
1319 (old_foreground_pgrp): Likewise.
1320 (restore_old_foreground_pgrp): New function.
1321 (start_inferior): Record the terminal file descriptor in terminal_fd
1322 and its original foreground group in old_foreground_pgrp. Register
1323 restore_old_foreground_pgrp with atexit().
1325 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
1327 * server.c (handle_query): Correct qPart to qXfer.
1329 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
1331 * configure.ac: Check for more headers which are missing on
1332 Windows. Automatically supply -lwsock32 and USE_WIN32API.
1333 * configure.srv: Add Cygwin and mingw32.
1334 * remote-utils.c: Don't include headers unconditionally which
1335 are missing on mingw32. Include <winsock.h> for mingw32.
1336 (remote_open): Adjust for mingw32 support. Flush
1337 standard error after writing to it.
1338 (remote_close, putpkt_binary, input_interrupt, block_async_io)
1339 (unblock_async_io, enable_async_io, disable_async_io)
1340 (readchar, getpkt): Update for Winsock support.
1341 (prepare_resume_reply): Expect a protocol signal number.
1342 * server.c: Disable <sys/wait.h> on mingw32.
1343 (start_inferior): Adjust for mingw32 support. Flush
1344 standard error after writing to it.
1345 (attach_inferior): Likewise. Use protocol signal
1347 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
1349 * win32-i386-low.c: New file.
1350 * Makefile.in (XM_CLIBS): Set.
1351 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
1352 (win32-i386-low.o): New dependency rule.
1353 * linux-low.c (linux_wait): Use target signal numbers.
1354 * target.h (struct target_ops): Doc fix.
1355 * server.h (target_signal_to_name): New prototype.
1356 * gdbreplay.c: Don't include headers unconditionally which
1357 are missing on mingw32. Include <winsock.h> for mingw32.
1358 (remote_close, remote_open): Adjust for Winsock support.
1359 * configure, config.in: Regenerated.
1361 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
1363 * server.c (decode_xfer_read, write_qxfer_response): New.
1364 (handle_query): Take a packet length argument. Handle
1365 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
1366 the qSupported response.
1367 (main): Update call to handle_query.
1369 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
1371 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
1372 (putpkt_binary): Renamed from putpkt and adjusted for binary
1374 (putpkt): New wrapper for putpkt_binary.
1375 (readchar): Don't mask off the high bit.
1376 (decode_X_packet): New function.
1377 * server.c (main): Call putpkt_binary if a handler sets the packet
1378 length. Save the length of the incoming packet. Handle 'X'.
1379 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
1381 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
1383 * server.c (handle_query): Handle qSupported.
1385 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1387 * remote-utils.c (all_symbols_looked_up): New variable.
1388 (look_up_one_symbol): Check it.
1389 * server.h (look_up_one_symbol): New declaration.
1390 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
1392 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
1394 * Makefile.in (linux-arm-low.o): Update dependencies.
1395 * linux-arm-low.c: Include "gdb_proc_service.h".
1396 (PTRACE_GET_THREAD_AREA): Define.
1397 (ps_get_thread_area): New function.
1399 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
1401 * configure.srv (m68k*-*-uclinux*): New target.
1402 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
1403 (linux_resume_one_process): Remove extraneous cast.
1404 (linux_read_offsets): New.
1405 (linux_target_op): Add linux_read_offsets on mmuless systems.
1406 * server.c (handle_query): Add qOffsets logic.
1407 * target.h (struct target_ops): Add read_offsets.
1409 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1411 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
1412 (PTRACE_GET_THREAD_AREA): Define.
1413 (ps_get_thread_area): New function.
1414 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
1415 (linux-x86-64-low.o): Update.
1417 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
1419 * configure.ac: Remove checks for prfpregset_t.
1420 * gdb_proc_service.h: New file.
1421 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
1422 new "gdb_proc_service.h".
1423 * proc-service.c: Likewise.
1424 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
1425 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
1426 * Makefile.in (gdb_proc_service_h): Updated.
1427 * configure, config.in: Regenerated.
1429 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1431 * remote-utils.c (prepare_resume_reply): Move declaration
1432 of gdb_id_from_wait to the top of the block.
1434 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
1436 * linux-low.c (regsets_store_inferior_registers): Read the regset
1437 from the target before filling it.
1439 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
1441 * server.c (attach_inferior): Return SIGTRAP for a successful
1444 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1446 * Makefile.in (OBS): Add version.o.
1447 (STAGESTUFF): Delete.
1448 (version.o): Add dependencies.
1449 (version.c): Replace rule.
1450 (clean): Remove version.c.
1451 * server.c (gdbserver_version): New.
1452 (gdbserver_usage): Use printf.
1453 (main): Handle --version and --help.
1454 * server.h (version, host_name): Add declarations.
1456 2005-12-23 Eli Zaretskii <eliz@gnu.org>
1468 * linux-x86-64-low.c:
1471 * linux-ppc64-low.c:
1480 * linux-crisv32-low.c:
1492 * gdbserver.1: Add (C) after Copyright. Update the FSF
1495 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
1497 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
1498 (arm_breakpoint_at): Recognize both breakpoints.
1499 (the_low_target): Use the correct breakpoint instruction.
1501 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1503 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
1504 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
1505 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
1506 (the_low_target): Update.
1508 2005-10-25 Andreas Schwab <schwab@suse.de>
1510 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
1512 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
1513 (ia64_num_regs): Reduce to 462.
1515 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
1517 * acinclude.m4: Correct quoting.
1518 * aclocal.m4: Regenerated.
1520 Suggested by SZOKOVACS Robert <szo@ies.hu>:
1521 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
1522 (thread_db_init): Call thread_db_err_str.
1523 * configure.ac: Check for TD_VERSION.
1524 * config.in, configure: Regenerated.
1526 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1528 * server.h (error, fatal, warning): Add ATTR_FORMAT.
1530 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1532 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
1533 is not available. Define HAVE_PTRACE_GETREGS if it is.
1534 * config.in, configure: Regenerated.
1535 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
1536 * linux-i386-low.c, linux-m68k-low.c: Update to use
1537 HAVE_PTRACE_GETREGS.
1538 * linux-low.c (regsets_fetch_inferior_registers)
1539 (regsets_store_inferior_registers): Only return 0 if we processed
1541 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
1542 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
1544 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1546 * inferiors.c (struct thread_info): Add gdb_id.
1547 (add_thread): Add gdb_id argument.
1548 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
1549 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
1550 calls to add_thread.
1551 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
1552 * server.c (handle_query): Use thread_to_gdb_id.
1553 (handle_v_cont, main): Use gdb_id_to_thread_id.
1554 * server.h (add_thread): Update prototype.
1555 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
1558 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
1560 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
1561 left-padded registers.
1562 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
1563 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
1565 2005-07-01 Steve Ellcey <sje@cup.hp.com>
1567 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
1568 * configure: Regenerate.
1569 * config.in: Regenerate.
1570 * server.h (NEED_DECLARATION_STRERROR):
1571 Replace with !HAVE_DECL_STRERROR.
1573 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
1575 * linux-low.c (linux_wait, linux_send_signal): Don't test
1576 an unsigned long variable for > 0 if it could be MAX_ULONG.
1577 * server.c (myresume): Likewise.
1578 * target.c (set_desired_inferior): Likewise.
1580 2005-06-13 Mark Kettenis <kettenis@gnu.org>
1582 * configure.ac: Simplify and improve check for socklen_t.
1583 * configure, config.in: Regenerate.
1585 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
1587 * acconfig.h: Remove.
1588 * configure.ac: Add a test for socklen_t. Use three-argument
1589 AC_DEFINE throughout.
1590 * config.in: Regenerated using autoheader 2.59.
1591 * configure: Regenerated.
1593 * gdbreplay.c (socklen_t): Provide a default.
1594 (remote_open): Use socklen_t.
1595 * remote-utils.c (socklen_t): Provide a default.
1596 (remote_open): Use socklen_t.
1597 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
1600 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
1602 * linux-low.c (linux_read_memory, linux_write_memory)
1603 (linux_read_auxv): Likewise.
1604 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
1605 (check_mem_write): Likewise.
1606 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
1608 * regcache.c (struct inferior_rgcache_data, registers_to_string)
1609 (registers_from_string, register_data): Likewise.
1610 * server.c (handle_query, main): Likewise.
1611 * server.h (convert_ascii_to_int, convert_int_to_ascii)
1612 (decode_M_packet): Likewise.
1613 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
1614 * target.h (struct target_ops): Update read_memory, write_memory,
1616 (read_inferior_memory, write_inferior_memory): Update.
1617 * linux-low.h (struct linux_target_ops): Change type of breakpoint
1619 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
1620 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
1621 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
1622 linux-s390-low.c, linux-sh-low.c: Update for changes in
1623 read_inferior_memory and the_low_target->breakpoint.
1625 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
1627 * Makefile.in (SFILES): Add linux-ppc64-low.c.
1628 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
1629 * configure.srv: Add powerpc64-*-linux*.
1630 * linux-ppc64-low.c: New file.
1632 2005-05-23 Orjan Friberg <orjanf@axis.com>
1634 * linux-cris-low.c: New file with support for CRIS.
1635 * linux-crisv32-low.c: Ditto for CRISv32.
1636 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
1637 (clean): Add reg-cris.c and reg-crisv32.c.
1638 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
1639 reg-crisv32.o, and reg-crisv32.c to make rules.
1640 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
1643 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
1645 * linux-low.c (fetch_register): Ensure buffer size is a multiple
1646 of sizeof (PTRACE_XFER_TYPE).
1647 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
1649 2005-05-12 Orjan Friberg <orjanf@axis.com>
1651 * target.h (struct target_ops): Add insert_watchpoint,
1652 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
1653 pointers for hardware watchpoint support.
1654 * linux-low.h (struct linux_target_ops): Ditto.
1655 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
1656 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
1657 to linux_target_ops.
1658 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
1660 * server.c (main): Recognize 'Z' and 'z' packets.
1662 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
1664 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
1665 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
1666 (the_low_target): Add new members.
1668 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1670 * proc-service.c (ps_lgetregs): Search all_processes instead of
1673 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1675 * server.c (start_inferior): Change return type to int.
1676 (attach_inferior): Change sigptr to int *.
1677 (handle_v_cont, handle_v_requests): Change signal to int *.
1678 (main): Change signal to int.
1680 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
1682 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
1683 * configure.srv: Add m32r*-*-linux*.
1684 * linux-m32r-low.c: New file.
1686 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1688 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
1690 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1692 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
1693 Take unsigned long arguments for PIDs.
1694 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
1695 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
1696 (wait_for_sigstop, linux_resume_one_process)
1697 (regsets_fetch_inferior_registers, linux_send_signal)
1698 (linux_read_auxv): Likewise. Update the types of variables holding
1699 PIDs. Update format string specifiers.
1700 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
1701 * remote-utils.c (prepare_resume_reply): Likewise.
1702 * server.c (cont_thread, general_thread, step_thread)
1703 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
1705 (handle_query): Update format specifiers.
1706 (handle_v_cont, main): Use strtoul for thread IDs.
1707 * server.h (struct inferior_list_entry): Use unsigned long for ID.
1708 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
1709 (general_thread, step_thread, thread_from_wait)
1710 (old_thread_from_wait): Update.
1711 * target.h (struct thread_resume): Use unsigned long for THREAD.
1712 (struct target_ops): Use unsigned long for arguments to attach and
1715 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1717 * acinclude.m4: Include bfd/bfd.m4 directly.
1718 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
1719 <agriffis@toolchain.org>.
1720 * aclocal.m4, configure: Regenerated.
1722 2005-01-07 Andrew Cagney <cagney@gnu.org>
1724 * configure.ac: Rename configure.in, require autoconf 2.59.
1725 * configure: Re-generate.
1727 2004-12-08 Daniel Jacobowitz <dan@debian.org>
1729 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
1731 * aclocal.m4: Regenerated.
1732 * configure: Regenerated.
1734 2004-11-21 Andreas Schwab <schwab@suse.de>
1736 * linux-m68k-low.c (m68k_num_gregs): Define.
1737 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
1738 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
1739 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
1740 (m68k_breakpoint_at): New. Add to the_low_target.
1742 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
1743 srv_linux_thread_db to yes.
1745 2004-10-20 Joel Brobecker <brobecker@gnat.com>
1747 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
1748 (ARCH_SET_FS): Likewise.
1749 (ARCH_GET_FS): Likewise.
1750 (ARCH_GET_GS): Likewise.
1752 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1754 * linux-i386-low.c (ps_get_thread_area): New.
1755 * linux-x86-64-low.c (ps_get_thread_area): New.
1756 * linux-low.c: Include <sys/syscall.h>.
1757 (linux_kill_one_process): Don't kill the first thread here.
1758 (linux_kill): Kill the first thread here.
1759 (kill_lwp): New function.
1760 (send_sigstop, linux_send_signal): Use it.
1761 * proc-service.c: Clean up #ifdefs.
1762 (fpregset_info): Delete.
1763 (ps_lgetregs): Update and enable implementation.
1764 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
1766 * remote-utils.c (struct sym_cache, symbol_cache): New.
1767 (input_interrupt): Print a clearer message.
1768 (async_io_enabled): New variable.
1769 (enable_async_io, disable_async_io): Use it. Update comments.
1770 (look_up_one_symbol): Use the symbol cache.
1771 * thread-db.c (thread_db_look_up_symbols): New function.
1772 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
1774 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1776 * configure.in: Test for -rdynamic.
1777 * configure: Regenerated.
1778 * Makefile (INTERNAL_LDFLAGS): New.
1779 (gdbserver, gdbreplay): Use it.
1781 2004-09-02 Andrew Cagney <cagney@gnu.org>
1783 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
1785 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
1787 * linux-low.c (linux_wait): Clear all_processes list also.
1789 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1791 * linux-low.c: Include <errno.h>. Remove extern declaration of
1794 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
1796 * gdbreplay.c, server.h, utils.c: Update copyright years.
1798 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1800 * server.c (main): Print child status or termination signal from
1801 variable 'signal', not 'sig'.
1803 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
1805 * linux-low.c (linux_read_memory): Change return type to
1806 int. Check for and return error from ptrace().
1807 * target.c (read_inferior_memory): Change return type to int. Pass
1808 back return status from the_target->read_memory().
1809 * target.h (struct target_ops): Adapt *read_memory() prototype.
1811 (read_inferior_memory): Adapt prototype.
1812 * server.c (main): Return an error packet if
1813 read_inferior_memory() returns an error.
1815 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
1817 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
1818 Unify with other clean targets.
1820 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1822 * server.c (handle_v_cont): Call set_desired_inferior.
1824 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1826 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
1828 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1830 * linux-low.c (linux_wait): Unblock async I/O.
1831 (linux_resume): Block and enable async I/O.
1832 * remote-utils.c (block_async_io, unblock_async_io): New functions.
1833 * server.h (block_async_io, unblock_async_io): Add prototypes.
1835 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1837 * remote-utils.c (remote_open): Print a status notice after
1839 * server.c (attach_inferior): Print a status notice after
1842 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
1844 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
1846 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
1848 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
1850 * server.c, target.h: Update copyright years.
1852 2004-02-25 Roland McGrath <roland@redhat.com>
1854 * target.h (struct target_ops): New member `read_auxv'.
1855 * server.c (handle_query): Handle qPart:auxv:read: query using that.
1856 * linux-low.c (linux_read_auxv): New function.
1857 (linux_target_ops): Initialize `read_auxv' member to that.
1859 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1861 Committed by Jim Blandy <jimb@redhat.com>.
1863 * linux-s390-low.c (s390_num_regs): Update.
1864 (s390_regmap): Remove control registers. Use __s390x__ predefine
1865 instead of GPR_SIZE to distiguish s390 and s390x targets.
1867 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
1869 * linux-low.c: Update copyright year.
1870 (check_removed_breakpoint): Clear pending_is_breakpoint.
1871 (linux_set_resume_request, linux_queue_one_thread)
1872 (resume_status_pending_p): New functions.
1873 (linux_continue_one_thread): Use process->resume.
1874 (linux_resume): Only resume threads if there are no pending events.
1875 * linux-low.h (struct process_info): Add resume request
1878 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
1880 * regcache.c (new_register_cache): Clear the allocated register
1881 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1883 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
1885 * linux-low.c (linux_resume): Take a struct thread_resume *
1887 (linux_wait): Update call.
1888 (resume_ptr): New static variable.
1889 (linux_continue_one_thread): Renamed from
1890 linux_continue_one_process. Use resume_ptr.
1891 (linux_resume): Use linux_continue_one_thread.
1892 * server.c (handle_v_cont, handle_v_requests): New functions.
1893 (myresume): New function.
1894 (main): Handle 'v' case.
1895 * target.h (struct thread_resume): New type.
1896 (struct target_ops): Change argument of "resume" to struct
1898 (myresume): Delete macro.
1900 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
1902 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
1903 (uninstall): Support DESTDIR.
1905 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
1907 * configure.srv: Add xscale*linux copy of arm*linux entry.
1909 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
1911 * linux-arm-low.c (arm_reinsert_addr): New function.
1912 (the_low_target): Add arm_reinsert_addr.
1914 2003-07-08 Mark Kettenis <kettenis@gnu.org>
1916 * mem-break.c: Remove whitespace at end of file.
1918 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1920 * configure.in: Check whether we need to prototype strerror.
1921 * server.h: Optionally prototype strerror.
1922 * gdbreplay.c (perror_with_name): Use strerror.
1923 * linux-low.c (linux_attach_lwp): Use strerror.
1924 * utils.c (perror_with_name): Use strerror.
1925 * config.in, configure: Regenerated.
1927 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
1929 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
1930 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
1932 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
1934 * Makefile.in (SFILES): Update.
1935 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
1936 low-sun3.c: Remove files.
1938 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
1940 * linux-low.c: Move comment to linux_thread_alive where it belonged.
1941 (linux_detach_one_process, linux_detach): New functions.
1942 (linux_target_ops): Add linux_detach.
1943 * server.c (main): Handle 'D' packet.
1944 * target.h (struct target_ops): Add "detach" member.
1945 (detach_inferior): Define.
1947 2003-06-13 Mark Kettenis <kettenis@gnu.org>
1949 From Kelley Cook <kelleycook@wideopenwest.com>:
1950 * configure.srv: Accept i[34567]86 variants.
1952 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1954 * linux-low.c (linux_wait_for_event): Correct comment typos.
1955 (linux_resume_one_process): Call check_removed_breakpoint.
1956 (linux_send_signal): New function.
1957 (linux_target_ops): Add linux_send_signal.
1958 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
1960 * target.h (struct target_ops): Add send_signal.
1962 2003-05-29 Jim Blandy <jimb@redhat.com>
1964 * linux-low.c (usr_store_inferior_registers): Transfer buf in
1965 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
1966 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
1967 away part of the register's value.
1969 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
1971 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
1972 (linux_wait_for_event, linux_init_signals): Likewise.
1974 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
1976 * configure.in: Check for stdlib.h.
1977 * configure: Regenerated.
1978 * config.in: Regenerated.
1980 2003-01-04 Andreas Schwab <schwab@suse.de>
1982 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
1984 2003-01-02 Andrew Cagney <ac131313@redhat.com>
1986 * Makefile.in: Remove obsolete code.
1988 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
1990 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
1991 defined(PT_FPR0_HI).
1993 2002-11-17 Stuart Hughes <seh@zee2.com>
1995 * linux-arm-low.c (arm_num_regs): Increase.
1996 (arm_regmap): Include status register.
1998 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
2000 * linux-low.c (register_addr): Remove incorrect -1 check.
2002 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
2004 * linux-low.c (linux_create_inferior): Call setpgid. Return
2006 (unstopped_p, linux_signal_pid): Remove.
2007 (linux_target_ops): Remove linux_signal_pid.
2008 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
2009 global instead of target method.
2010 * target.h (struct target_ops): Remove signal_pid. Update comment
2011 for create_inferior.
2012 * server.c (signal_pid): New variable.
2013 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
2014 gdbserver. Set the child to be the foreground process group.
2015 (attach_inferior): Set signal_pid.
2017 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
2019 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
2021 2002-08-20 Jim Blandy <jimb@redhat.com>
2023 * Makefile.in (LDFLAGS): Allow the configure script to establish a
2026 2002-08-01 Andrew Cagney <cagney@redhat.com>
2028 * Makefile.in: Make chill references obsolete.
2030 2002-07-24 Kevin Buettner <kevinb@redhat.com>
2032 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
2033 * configure: Regenerate.
2034 * config.in: Regenerate.
2036 2002-07-09 David O'Brien <obrien@FreeBSD.org>
2038 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
2039 (perror_with_name, remote_close, remote_open, expect, play): Static.
2041 2002-07-04 Michal Ludvig <mludvig@suse.cz>
2043 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
2044 byte offsets instead of an array of indexes.
2045 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
2047 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
2049 * regcache.c: Add comment.
2051 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
2053 * thread-db.c: New file.
2054 * proc-service.c: New file.
2055 * acinclude.m4: New file.
2056 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
2057 proc-service.o, and thread-db.o.
2058 (linux-low.o): Add USE_THREAD_DB.
2059 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
2060 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
2061 * aclocal.m4: Regenerated.
2062 * config.in: Regenerated.
2063 * configure: Regenerated.
2064 * configure.in: Check for proc_service.h, sys/procfs.h,
2065 thread_db.h, and linux/elf.h headrs.
2066 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
2067 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
2068 Check for -lthread_db and thread support.
2069 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
2070 PowerPC, and SuperH.
2071 * i387-fp.c: Constify arguments.
2072 * i387-fp.h: Likewise.
2073 * inferiors.c: (struct thread_info): Renamed from
2074 `struct inferior_info'. Remove PID member. Use generic inferior
2075 list header. All uses updated.
2076 (inferiors, signal_pid): Removed.
2077 (all_threads): New variable.
2078 (get_thread): Define.
2079 (add_inferior_to_list): New function.
2080 (for_each_inferior): New function.
2081 (change_inferior_id): New function.
2082 (add_inferior): Removed.
2083 (remove_inferior): New function.
2084 (add_thread): New function.
2085 (free_one_thread): New function.
2086 (remove_thread): New function.
2087 (clear_inferiors): Use for_each_inferior and free_one_thread.
2088 (find_inferior): New function.
2089 (find_inferior_id): New function.
2090 (inferior_target_data): Update argument type.
2091 (set_inferior_target_data): Likewise.
2092 (inferior_regcache_data): Likewise.
2093 (set_inferior_regcache_data): Likewise.
2094 * linux-low.c (linux_bp_reinsert): Remove.
2095 (all_processes, stopping_threads, using_thrads)
2096 (struct pending_signals, debug_threads, pid_of): New.
2097 (inferior_pid): Replace with macro.
2098 (struct inferior_linux_data): Remove.
2099 (get_stop_pc, add_process): New functions.
2100 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
2101 Use add_process and add_thread.
2102 (linux_attach_lwp): New function, based on old linux_attach. Use
2103 add_process and add_thread. Set stop_expected for new threads.
2104 (linux_attach): New function.
2105 (linux_kill_one_process): New function.
2106 (linux_kill): Kill all LWPs.
2107 (linux_thread_alive): Use find_inferior_id.
2108 (check_removed_breakpoints, status_pending_p): New functions.
2109 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
2110 Update. Use WNOHANG. Wait for cloned processes also. Update process
2111 struct for the found process.
2112 (linux_wait_for_event): New function.
2113 (linux_wait): Use it. Support LWPs.
2114 (send_sigstop, wait_for_sigstop, stop_all_processes)
2115 (linux_resume_one_process, linux_continue_one_process): New functions.
2116 (linux_resume): Support LWPs.
2117 (REGISTER_RAW_SIZE): Remove.
2118 (fetch_register): Use register_size instead. Call supply_register.
2119 (usr_store_inferior_registers): Likewise. Call collect_register.
2121 (regsets_fetch_inferior_registers): Improve error message.
2122 (regsets_store_inferior_registers): Add debugging.
2123 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
2124 (unstopped_p, linux_signal_pid): New functions.
2125 (linux_target_ops): Add linux_signal_pid.
2126 (linux_init_signals): New function.
2127 (initialize_low): Call it. Initialize using_threads.
2128 * regcache.c (inferior_regcache_data): Add valid
2130 (get_regcache): Fetch registers lazily. Add fetch argument
2131 and update all callers.
2132 (regcache_invalidate_one, regcache_invalidate): New
2134 (new_register_cache): Renamed from create_register_cache.
2135 Return the new regcache.
2136 (free_register_cache): Change argument to a void *.
2137 (registers_to_string, registers_from_string): Call get_regcache
2138 with fetch flag set.
2139 (register_data): Make static. Pass fetch flag to get_regcache.
2140 (supply_register): Call get_regcache with fetch flag clear.
2141 (collect_register): Call get_regcache with fetch flag set.
2142 (collect_register_as_string): New function.
2143 * regcache.h: Update.
2144 * remote-utils.c (putpkt): Flush after debug output and use
2146 Handle input interrupts while waiting for an ACK.
2147 (input_interrupt): Use signal_pid method.
2148 (getpkt): Flush after debug output and use stderr.
2149 (outreg): Use collect_register_as_string.
2150 (new_thread_notify, dead_thread_notify): New functions.
2151 (prepare_resume_reply): Check using_threads. Set thread_from_wait
2153 (look_up_one_symbol): Flush after debug output.
2154 * server.c (step_thread, server_waiting): New variables.
2155 (start_inferior): Don't use signal_pid. Update call to mywait.
2156 (attach_inferior): Update call to mywait.
2157 (handle_query): Handle qfThreadInfo and qsThreadInfo.
2158 (main): Don't fetch/store registers explicitly. Use
2159 set_desired_inferior. Support proposed ``Hs'' packet. Update
2162 (struct inferior_list, struct_inferior_list_entry): New.
2163 * target.c (set_desired_inferior): New.
2164 (write_inferior_memory): Constify.
2165 (mywait): New function.
2167 (struct target_ops): New signal_pid method.
2168 (mywait): Removed macro, added prototype.
2170 * linux-low.h (regset_func): Removed.
2171 (regset_fill_func, regset_store_func): New.
2172 (enum regset_type): New.
2173 (struct regset_info): Add type field. Use new operation types.
2174 (struct linux_target_ops): stop_pc renamed to get_pc.
2175 Add decr_pc_after_break and breakpoint_at.
2176 (get_process, get_thread_proess, get_process_thread)
2177 (strut process_info, all_processes, linux_attach_lwp)
2178 (thread_db_init): New.
2180 * linux-arm-low.c (arm_get_pc, arm_set_pc,
2181 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
2182 (the_low_target): Add new members.
2183 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
2184 (i386_store_fpxregset): Constify.
2185 (target_regsets): Add new kind identifier.
2186 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
2187 (i386_set_pc): Add debugging.
2188 (i386_breakpoint_at): New function.
2189 (the_low_target): Add new members.
2190 * linux-mips-low.c (mips_get_pc, mips_set_pc)
2191 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
2192 (mips_breakpoint_at): New.
2193 (the_low_target): Add new members.
2194 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
2195 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
2196 (the_low_target): Add new members.
2197 * linux-sh-low.c (sh_get_pc, sh_set_pc)
2198 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
2199 (the_low_target): Add new members.
2200 * linux-x86-64-low.c (target_regsets): Add new kind
2203 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
2205 From Martin Pool <mbp@samba.org>:
2206 * server.c (gdbserver_usage): New function.
2209 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
2211 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
2214 2002-05-04 Andrew Cagney <ac131313@redhat.com>
2216 * Makefile.in: Remove obsolete code.
2218 2002-04-24 Michal Ludvig <mludvig@suse.cz>
2220 * linux-low.c (regsets_fetch_inferior_registers),
2221 (regsets_store_inferior_registers): Removed cast to int from
2223 * regcache.h: Added declaration of struct inferior_info.
2225 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2227 * inferiors.c (struct inferior_info): Add regcache_data.
2228 (add_inferior): Call create_register_cache.
2229 (clear_inferiors): Call free_register_cache.
2230 (inferior_regcache_data, set_inferior_regcache_data): New functions.
2231 * regcache.c (struct inferior_regcache_data): New.
2232 (registers): Remove.
2233 (get_regcache): New function.
2234 (create_register_cache, free_register_cache): New functions.
2235 (set_register_cache): Don't initialize the register cache here.
2236 (registers_to_string, registers_from_string, register_data): Call
2238 * regcache.h: Add prototypes.
2239 * server.h: Likewise.
2241 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
2243 * mem-break.c: New file.
2244 * mem-break.h: New file.
2245 * Makefile.in: Add mem-break.o rule; update server.h
2247 * inferiors.c (struct inferior_info): Add target_data
2249 (clear_inferiors): Free target_data member if set.
2250 (inferior_target_data, set_inferior_target_data): New functions.
2251 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
2252 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
2253 * linux-low.c (linux_bp_reinsert): New variable.
2254 (struct inferior_linux_data): New.
2255 (linux_create_inferior): Use set_inferior_target_data.
2256 (linux_attach): Likewise. Call add_inferior.
2257 (linux_wait_for_one_inferior): New function.
2258 (linux_wait): Call it.
2259 (linux_write_memory): Add const.
2260 (initialize_low): Call set_breakpoint_data.
2261 * linux-low.h (struct linux_target_ops): Add breakpoint
2263 * server.c (attach_inferior): Remove extra add_inferior
2265 * server.h: Include mem-break.h. Update inferior.c
2267 * target.c (read_inferior_memory)
2268 (write_inferior_memory): New functions.
2269 * target.h (read_inferior_memory)
2270 (write_inferior_memory): Change macros to prototypes.
2271 (struct target_ops): Update comments. Add const to write_memory
2274 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
2276 * linux-low.c (usr_store_inferior_registers): Support
2277 registers which are allowed to fail to store.
2278 * linux-low.h (linux_target_ops): Likewise.
2279 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
2280 (ppc_cannot_store_register): FPSCR may not be storable.
2282 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2284 * server.h: Include <string.h> if HAVE_STRING_H.
2285 * ChangeLog: Correct paths in last ChangeLog entry.
2287 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2289 * linux-low.h: Remove obsolete prototypes.
2290 (struct linux_target_ops): New.
2291 (extern the_low_target): New.
2292 * linux-low.c (num_regs, regmap): Remove declarations.
2293 (register_addr): Use the_low_target explicitly.
2294 (fetch_register): Likewise.
2295 (usr_fetch_inferior_registers): Likewise.
2296 (usr_store_inferior_registers): Likewise.
2297 * linux-arm-low.c (num_regs): Remove.
2298 (arm_num_regs): Define.
2299 (arm_regmap): Renamed from regmap, made static.
2300 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
2302 (arm_cannot_store_register): Renamed from cannot_store_register,
2304 (the_low_target): New.
2305 * linux-i386-low.c (num_regs): Remove.
2306 (i386_num_regs): Define.
2307 (i386_regmap): Renamed from regmap, made static.
2308 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
2310 (i386_cannot_store_register): Renamed from cannot_store_register,
2312 (the_low_target): New.
2313 * linux-ia64-low.c (num_regs): Remove.
2314 (ia64_num_regs): Define.
2315 (ia64_regmap): Renamed from regmap, made static.
2316 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
2318 (ia64_cannot_store_register): Renamed from cannot_store_register,
2320 (the_low_target): New.
2321 * linux-m68k-low.c (num_regs): Remove.
2322 (m68k_num_regs): Define.
2323 (m68k_regmap): Renamed from regmap, made static.
2324 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
2326 (m68k_cannot_store_register): Renamed from cannot_store_register,
2328 (the_low_target): New.
2329 * linux-mips-low.c (num_regs): Remove.
2330 (mips_num_regs): Define.
2331 (mips_regmap): Renamed from regmap, made static.
2332 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
2334 (mips_cannot_store_register): Renamed from cannot_store_register,
2336 (the_low_target): New.
2337 * linux-ppc-low.c (num_regs): Remove.
2338 (ppc_num_regs): Define.
2339 (ppc_regmap): Renamed from regmap, made static.
2340 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
2342 (ppc_cannot_store_register): Renamed from cannot_store_register,
2344 (the_low_target): New.
2345 * linux-s390-low.c (num_regs): Remove.
2346 (s390_num_regs): Define.
2347 (s390_regmap): Renamed from regmap, made static.
2348 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
2350 (s390_cannot_store_register): Renamed from cannot_store_register,
2352 (the_low_target): New.
2353 * linux-sh-low.c (num_regs): Remove.
2354 (sh_num_regs): Define.
2355 (sh_regmap): Renamed from regmap, made static.
2356 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
2358 (sh_cannot_store_register): Renamed from cannot_store_register,
2360 (the_low_target): New.
2361 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
2362 (the_low_target): New.
2364 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2366 * Makefile.in: Add stamp-h target.
2367 * configure.in: Create stamp-h.
2368 * configure: Regenerated.
2370 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2372 * inferiors.c: New file.
2373 * target.c: New file.
2374 * target.h: New file.
2375 * Makefile.in: Add target.o and inferiors.o. Update
2377 * linux-low.c (inferior_pid): New static variable,
2378 moved from server.c.
2379 (linux_create_inferior): Renamed from create_inferior.
2380 Call add_inferior. Return 0 on success instead of a PID.
2381 (linux_attach): Renamed from myattach.
2382 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
2383 (linux_thread_alive): Renamed from mythread_alive.
2384 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
2386 (linux_resume): Renamed from myresume. Add missing ``return 0''.
2387 (regsets_store_inferior_registers): Correct error message.
2388 Add missing ``return 0''.
2389 (linux_fetch_registers): Renamed from fetch_inferior_registers.
2390 (linux_store_registers): Renamed from store_inferior_registers.
2391 (linux_read_memory): Renamed from read_inferior_memory.
2392 (linux_write_memory): Renamed from write_inferior_memory.
2393 (linux_target_ops): New structure.
2394 (initialize_low): Call set_target_ops ().
2395 * remote-utils.c (unhexify): New function.
2396 (hexify): New function.
2397 (input_interrupt): Send signals to ``signal_pid''.
2398 * server.c (inferior_pid): Remove.
2399 (start_inferior): Update create_inferior call.
2400 (attach_inferior): Call add_inferior.
2401 (handle_query): New function.
2402 (main): Call handle_query for `q' packets.
2403 * server.h: Include "target.h". Remove obsolete prototypes.
2404 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
2406 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
2408 * Makefile.in: Add WARN_CFLAGS. Update configury
2410 * configure.in: Check for <string.h>
2411 * configure: Regenerate.
2412 * config.in: Regenerate.
2413 * gdbreplay.c: Include needed system headers.
2414 (remote_open): Remove strchr prototype.
2415 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
2416 * regcache.c (supply_register): Change buf argument to const void *.
2417 (supply_register_by_name): Likewise.
2418 (collect_register): Change buf argument to void *.
2419 (collect_register_by_name): Likewise.
2420 * regcache.h: Add missing prototypes.
2421 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
2422 * server.c (handle_query): New function.
2423 (attached): New static variable, moved out of main.
2424 (main): Quiet longjmp clobber warnings.
2425 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
2426 * utils.c (error): Remove NORETURN.