1 2011-07-22 Pedro Alves <pedro@codesourcery.com>
3 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5 (i386_remove_aligned_watchpoint): Ditto.
6 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7 fit part of the watchpoint in the debug registers.
8 (i386_update_inferior_debug_regs): New.
9 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10 registers, and only update the inferior on success.
11 (i386_low_remove_watchpoint): Ditto.
13 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
15 * linux-low.c (compare_ints, unique, list_threads, show_process,
16 linux_core_of_thread): Delete.
17 (linux_target_ops): Change linux_core_of_thread to
18 linux_common_core_of_thread.
19 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
20 * utils.c (malloc_failure): Change type of argument.
21 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
22 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
23 common/linux-osdata.c, common/ptid.c and common/buffer.c.
24 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
25 (IPA_OBJS): Add common-utils-ipa.o.
26 (ptid_h, linux_osdata_h): New macros.
27 (server_h): Add common/common-utils.h, common/xml-utils.h,
28 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
30 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
31 ptid.o, buffer.o): New rules.
32 (linux-low.o): Add common/linux-osdata.h as a dependency.
33 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
34 * configure.ac: Add AC_HEADER_DIRENT check.
35 * config.in: Regenerate.
36 * configure: Regenerate.
37 * remote-utils.c (xml_escape_text): Delete.
38 (buffer_grow, buffer_free, buffer_init, buffer_finish,
39 buffer_xml_printf): Move to common/buffer.c.
40 * server.c (main): Remove call to initialize_inferiors.
41 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
42 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
43 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
44 internal_error, gdb_assert, gdb_assert_fail): Delete.
45 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
46 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
48 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
49 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
50 initialize_inferiors): Delete.
52 2011-07-20 Pedro Alves <pedro@codesourcery.com>
54 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
57 2011-05-31 Pedro Alves <pedro@codesourcery.com>
59 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
61 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
63 2011-05-26 Yao Qi <yao@codesourcery.com>
65 * Makefile.in (thread-db.o): Track dependence to
66 common/gdb_thread_db.h.
67 * thread-db.c: include gdb_thread_db.h from right place.
69 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
71 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
72 __FILE__ and __LINE__ to internal_error.
74 2011-05-13 Doug Evans <dje@google.com>
76 * thread-db.c (try_thread_db_load_from_sdir): New function.
77 (try_thread_db_load_from_dir): New function.
78 (thread_db_load_search): Handle $sdir, ignore $pdir.
79 Remove trying of system directories if search of
80 libthread-db-search-path fails, that is now done via $sdir.
82 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
84 * server.c (handle_query): Add EnableDisableTracepoints to the list
85 of supported features.
86 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
88 (cmd_qtenable_disable): New.
89 (cmd_qtstart): Install tracepoints even if disabled.
90 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
91 receiving a QTEnable or QTDisable packet.
92 (gdb_collect): Skip data collection if fast tracepoint is disabled.
93 (ust_marker_to_static_tracepoint): Do not ignore disabled static
95 (gdb_probe): Skip data collection if static tracepoint is disabled.
97 2011-05-10 Doug Evans <dje@google.com>
99 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
101 2011-05-04 Doug Evans <dje@google.com>
103 * linux-low.c (linux_join): Skip process lookup.
104 * spu-low.c (spu_join): Ditto.
105 * server.c (join_inferiors_callback): Delete.
106 (process_serial_event): For 'D' packet (detach) call join_inferior
109 2011-05-04 Joseph Myers <joseph@codesourcery.com>
111 * README: Don't mention xscale*-*-linux*.
112 * configure.srv (xscale*-*-linux*): Don't handle target.
114 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
116 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
118 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
119 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
120 (i386_emit_void_call_2): Likewise.
122 2011-04-26 Yao Qi <yao@codesourcery.com>
124 * linux-low.c: Move common macros to linux-ptrace.h.
125 Include linux-ptrace.h.
126 * Makefile.in (linux_ptrace_h): New.
127 (linux-low.o): Depends on linux-ptrace.h.
129 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
131 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
132 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
133 (remote_prepare): New function with most of the TCP code from ...
134 (remote_open): ... here. Detect PORT here unconditionally. Move also
135 setting transport_is_reliable.
136 * server.c (run_once): New variable.
137 (gdbserver_usage): Document it.
138 (main): Set run_once for `--once'. Call remote_prepare. Exit after
139 the first run if RUN_ONCE.
140 * server.h (run_once, remote_prepare): New declarations.
142 2011-04-19 Tom Tromey <tromey@redhat.com>
144 * win32-low.c (handle_load_dll): Remove duplicate "the".
146 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
148 Remove support for old Cygwin 1.5 versions.
149 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
150 function to avoid warning.
151 (win32_add_one_solib): Use cygwin_conv_path function to avoid
154 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
156 * gdbserver/server.h (Macro _): Define it if not available.
158 2011-03-14 Michael Snyder <msnyder@vmware.com>
160 * hostio.c (handle_close): Remove unnecessary null test.
162 2011-03-10 Joel Brobecker <brobecker@adacore.com>
164 * Makefile.in (maintainer-clean realclean distclean): Remove
165 "make ... subdir_do" command.
167 2011-03-10 Michael Snyder <msnyder@vmware.com>
169 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
171 * server.c (handle_v_run): Free alloced buffer on early return.
173 2011-03-09 Yao Qi <yao@codesourcery.com>
176 2011-03-04 Yao Qi <yao@codesourcery.com>
178 * Makefile.in: Remove GNU make feature --directory.
180 2011-03-05 Yao Qi <yao@codesourcery.com>
182 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
183 (subdir_do): New make target. Copied from gdb/Makefile.
184 (maintainer-clean, realclean, distclean, clean): Call corresponding
185 make targets in common/Makefile.
187 2011-02-11 Yao Qi <yao@codesourcery.com>
189 * configure.ac: Call AC_PROG_RANLIB.
190 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
191 * configure: Regenerate.
193 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
195 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
197 2011-03-06 Yao Qi <yao@codesourcery.com>
199 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
201 2011-03-05 Yao Qi <yao@codesourcery.com>
203 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
204 (subdir_do): New make target. Copied from gdb/Makefile.
205 (maintainer-clean, realclean, distclean, clean): Call corresponding
206 make targets in common/Makefile.
208 2011-03-04 Yao Qi <yao@codesourcery.com>
210 * Makefile.in: Remove GNU make feature --directory.
212 2011-03-04 Michael Snyder <msnyder@vmware.com>
214 * server.c (queue_stop_reply): Call xmalloc not malloc.
216 2011-03-02 Michael Snyder <msnyder@vmware.com>
218 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
220 2011-02-28 Michael Snyder <msnyder@vmware.com>
222 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
223 (cmd_qtframe): Ditto.
224 (cmd_qtbuffer): Ditto.
225 (cmd_bigqtbuffer): Ditto.
227 * utils.c (decimal2str): Initialize 'width' to nine, then
230 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
232 * hostio.c (require_data): Free *data, not data.
234 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
236 * hostio.c (require_data): Use free, not xfree.
238 2011-02-27 Michael Snyder <msnyder@vmware.com>
240 * server.c (handle_query): Discard unused value.
242 * hostio.c (require_data): Free malloc memory before returning
245 2011-02-26 Michael Snyder <msnyder@vmware.com>
247 * linux-low.c (list_threads): Call closedir for dirent.
249 2011-02-27 Michael Snyder <msnyder@vmware.com>
251 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
252 a case statement falls through.
254 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
256 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
259 2011-02-26 Michael Snyder <msnyder@vmware.com>
261 * utils.c (decimal2str): Eliminate dead code and dead param.
262 (pulongest): Drop dead param from call to decimal2str.
265 2011-02-24 Joel Brobecker <brobecker@adacore.com>
267 Revert the following patch (not approved yet):
268 2011-02-21 Hui Zhu <teawater@gmail.com>
269 * tracepoint.c (tp_printf): New function.
270 (eval_agent_expr): Handle gdb_agent_op_printf.
272 2011-02-21 Hui Zhu <teawater@gmail.com>
274 * tracepoint.c (tp_printf): New function.
275 (eval_agent_expr): Handle gdb_agent_op_printf.
277 2011-02-18 Tom Tromey <tromey@redhat.com>
279 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
280 (tracepoint.o): Likewise.
281 * tracepoint.c (enum gdb_agent_op): Use ax.def.
282 (gdb_agent_op_names): Likewise.
284 2011-02-18 Tom Tromey <tromey@redhat.com>
286 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
287 gdb_agent_op_rot>: New constants.
288 (gdb_agent_op_names): Add pick and roll.
289 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
292 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
294 * aclocal.m4: Regenerated with aclocal-1.11.1.
296 2011-02-14 Pedro Alves <pedro@codesourcery.com>
298 * server.c (handle_qxfer_traceframe_info): New.
299 (qxfer_packets): Register "traceframe-info".
300 (handle_query): Report support for qXfer:traceframe-info:read+.
301 * tracepoint.c (match_blocktype): New.
302 (traceframe_find_block_type): Rename to ...
303 (traceframe_walk_blocks): ... this. Add callback filter argument,
305 (traceframe_find_block_type): New, reimplemented on top of
306 traceframe_walk_blocks.
307 (build_traceframe_info_xml): New.
308 (traceframe_read_info): New.
309 * server.h (traceframe_read_info): Declare.
311 2011-02-11 Yao Qi <yao@codesourcery.com>
313 * configure.ac: Call AC_PROG_RANLIB.
314 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
315 * configure: Regenerate.
317 2011-02-07 Pedro Alves <pedro@codesourcery.com>
319 * server.c (gdb_read_memory): Change return semantics to allow
321 (handle_search_memory_1): Adjust.
322 (process_serial_event) <'m' packet>: Handle partial transfers.
323 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
325 2011-01-28 Pedro Alves <pedro@codesourcery.com>
327 * regcache.c (init_register_cache): Initialize
328 regcache->register_status.
329 (free_register_cache): Release regcache->register_status.
330 (regcache_cpy): Copy register_status.
331 (registers_to_string): Print 'x's for unavailable registers.
332 (supply_register): Mark the register's status valid or
333 unavailable, depending on whether a buffer was passed in or not.
334 (supply_register_zeroed): New.
335 (supply_regblock): Mark the registers' status valid or
336 unavailable, depending on whether a buffer was passed in or not.
337 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
338 (struct regcache): New `register_status' field.
339 (supply_register_zeroed): Declare.
340 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
341 supply_register_zeroed, rather than passing a NULL buffer to
343 * tracepoint.c (fetch_traceframe_registers): Update comment.
345 2011-01-28 Pedro Alves <pedro@codesourcery.com>
347 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
350 2011-01-25 Pedro Alves <pedro@codesourcery.com>
352 * server.h (decode_xfer_write): Change prototype.
353 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
354 and don't extract the annex here.
355 * server.c (decode_xfer_read): Remove `annex' parameter,
356 and don't extract the annex here.
359 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
360 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
361 (handle_qxfer_statictrace): New functions, abstracted out from
362 handle_query, and made to use the struct qxfer interface.
363 (handle_threads_qxfer_proper): Rename to ...
364 (handle_qxfer_threads_proper): ... this.
365 (handle_threads_qxfer): Rename to ...
366 (handle_qxfer_threads): ... this. Adjust.
367 (qxfer_packets): New array.
368 (handle_qxfer): New function.
369 (handle_query): Use handle_qxfer.
371 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
373 * gdbreplay.c: Shorten lines of >= 80 columns.
374 * linux-low.c: Ditto.
375 * linux-ppc-low.c: Ditto.
376 * linux-s390-low.c: Ditto.
377 * linux-sparc-low.c: Ditto.
378 * linux-x86-low.c: Ditto.
379 * linux-xtensa-low.c: Ditto.
380 * mem-break.c: Ditto.
383 * remote-utils.c: Ditto.
386 * thread-db.c: Ditto.
387 * tracepoint.c: Ditto.
389 * win32-low.h: Ditto.
391 2011-01-05 Joel Brobecker <brobecker@adacore.com>
393 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
396 2011-01-01 Joel Brobecker <brobecker@adacore.com>
398 * server.c (gdbserver_version): Update copyright year in version
400 * gdbreplay.c (gdbreplay_version): Ditto.
402 2010-12-29 Jie Zhang <jie.zhang@analog.com>
404 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
405 * linux-bfin-low.c: New file.
406 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
407 PT_DATA_ADDR for BFIN targets.
408 * Makefile.in (SFILES): Add linux-bfin-low.c.
409 (clean): Remove reg-bfin.c.
410 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
411 * README: Mention supported Blackfin targets.
413 2010-12-23 Mike Frysinger <vapier@gentoo.org>
415 * .gitignore: New file.
417 2010-11-16 Mike Frysinger <vapier@gentoo.org>
419 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
421 2010-10-22 Jie Zhang <jie@codesourcery.com>
423 * Makefile.in: Add FLAGS_TO_PASS variable.
424 (install): Remove dependency of install-only and recursively
425 invoke make for install-only.
427 2010-10-04 Doug Evans <dje@google.com>
429 * Makefile.in (uninstall): Use $(DESTDIR).
431 2010-09-24 Pedro Alves <pedro@codesourcery.com>
435 * linux-x86-low.c (compat_siginfo_from_siginfo)
436 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
437 si_code is < 0. Check for si_code == SI_TIMER before checking for
440 2010-09-13 Joel Brobecker <brobecker@adacore.com>
442 * lynx-i386-low.c: New file.
443 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
445 2010-09-13 Joel Brobecker <brobecker@adacore.com>
447 * lynx-low.c (ptrace_request_to_str): Remove handling for
448 request values that have been removed in LynxOS 5.x.
450 2010-09-13 Joel Brobecker <brobecker@adacore.com>
452 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
455 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
457 * configure.ac: Add --enable-inprocess-agent option.
458 * configure: Rebuilt.
460 2010-09-06 Yao Qi <yao@codesourcery.com>
462 * linux-low.c (linux_kill): Remove unused variable.
463 (linux_stabilize_threads): Likewise.
464 * server.c (start_inferior): Likewise.
465 (queue_stop_reply_callback): Likewise.
466 * tracepoint.c (do_action_at_tracepoint): Likewise.
468 2010-09-06 Yao Qi <yao@codesourcery.com>
470 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
473 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
475 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
477 2010-09-06 Pedro Alves <pedro@codesourcery.com>
479 * Makefile.in (install-only): Replace $IPA_DEPFILES with
482 2010-09-01 Joel Brobecker <brobecker@adacore.com>
484 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
485 gdbserver/lynx-ppc-low.c: New files.
486 * Makefile.in (lynx_low_h): New variable.
487 (lynx-low.o, lynx-ppc-low.o): New rules.
488 * configure.ac: On LynxOS, link with -lnetinet.
489 * configure.srv: Add handling of powerpc-*-lynxos* targets.
490 * configure: regenerate.
492 2010-09-01 Joel Brobecker <brobecker@adacore.com>
494 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
495 * configure.ac: Add check for vasprintf and vsnprintf.
496 * configure, config.in: Regenerate.
497 * server.h (vasprintf, vsnprintf): Add conditional declarations.
499 2010-09-01 Joel Brobecker <brobecker@adacore.com>
501 * gdbreplay.c: Move include of alloca.h up, next to include of
503 * server.h: Add include of malloc.h.
504 * mem-break.c: Remove include of malloc.h.
505 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
507 2010-09-01 Joel Brobecker <brobecker@adacore.com>
509 * Makefile.in (memmem.o): Build with -Wno-error.
511 2010-09-01 Joel Brobecker <brobecker@adacore.com>
513 * utils.c (xsnprintf): Make non-static.
514 * server.h: Add xsnprintf declaration.
515 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
516 replace calls to snprintf by calls to xsnprintf throughout.
518 2010-09-01 Joel Brobecker <brobecker@adacore.com>
520 * configure.ac: Add configure check for alloca.
521 * configure, config.in: Regenerate.
522 * server.h: Include alloca.h if it exists.
523 * gdbreplay.c: Include alloca.h if it exists.
525 2010-08-28 Pedro Alves <pedro@codesourcery.com>
527 * linux-low.c (__SIGRTMIN): Define if not already defined.
528 (linux_create_inferior): Check for __ANDROID__ rather than
530 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
531 are already deferred.
532 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
533 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
534 stopped and already has a pending signal to report.
535 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
536 a pending signal to report or is moving out of a jump pad.
537 (linux_init_signals): Check for __ANDROID__ rather than
540 2010-08-28 Pedro Alves <pedro@codesourcery.com>
542 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
543 debug_threads check. Avoid a linear search when not doing debug
546 2010-08-27 Pedro Alves <pedro@codesourcery.com>
548 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
549 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
550 (struct file_handler) <fd>: Change type to gdb_fildes_t.
551 (process_event): Change local fd's type to gdb_fildes_t.
552 (create_file_handler): Adjust prototype.
553 (delete_file_handler): Adjust prototype.
554 (handle_file_event): Adjust prototype. Use pfildes.
555 (create_file_event): Adjsut prototype.
556 * remote-utils.c (remote_desc, listen_desc): Change type to
558 * server.h: New gdb_fildes_t typedef.
559 [USE_WIN32API]: Include winsock2.h.
560 (delete_file_handler, add_file_handler): Adjust prototypes.
562 * utils.c (pfildes): New.
564 2010-08-27 Pedro Alves <pedro@codesourcery.com>
566 * configure.ac (build_warnings): Add -Wno-char-subscripts.
567 * configure: Regenerate.
569 2010-08-27 Pedro Alves <pedro@codesourcery.com>
571 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
572 (linux_done_accessing_memory): ... this.
573 (linux_target_ops): Adjust.
574 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
575 * nto-low.c (nto_target_ops): Adjust comment.
576 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
577 * spu-low.c (spu_target_ops): Adjust comment.
578 * target.h (target_ops): Rename unprepare_to_access_memory field
579 to done_accessing_memory.
580 (unprepare_to_access_memory): Rename to ...
581 (done_accessing_memory): ... this.
583 2010-08-26 Pedro Alves <pedro@codesourcery.com>
585 * linux-low.c (linux_prepare_to_access_memory): New.
586 (linux_unprepare_to_access_memory): New.
587 (linux_target_ops): Install them.
588 * server.c (read_memory): Rename to ...
589 (gdb_read_memory): ... this. Use
590 prepare_to_access_memory/prepare_to_access_memory.
591 (write_memory): Rename to ...
592 (gdb_write_memory): ... this. Use
593 prepare_to_access_memory/prepare_to_access_memory.
594 (handle_search_memory_1): Adjust.
595 (process_serial_event): Adjust.
596 * target.h (struct target_ops): New fields
597 prepare_to_access_memory and unprepare_to_access_memory.
598 (prepare_to_access_memory, unprepare_to_access_memory): New.
599 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
600 prepare_to_access_memory/prepare_to_access_memory.
601 * nto-low.c (nto_target_ops): Adjust.
602 * spu-low.c (spu_target_ops): Adjust.
603 * win32-low.c (win32_target_ops): Adjust.
605 2010-08-26 Pedro Alves <pedro@codesourcery.com>
607 * Makefile.in (WARN_CFLAGS): Get it from configure.
608 (WERROR_CFLAGS): New.
609 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
610 * configure.ac: Introduce --enable-werror, which adds -Werror to
611 the compiler command line. Enabled by default. Disable with
612 --disable-werror. Add -Wdeclaration-after-statement
613 Wpointer-arith and -Wformat-nonliteral to warning flags.
614 * configure: Regenerate.
616 2010-08-26 Pedro Alves <pedro@codesourcery.com>
618 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
620 2010-08-26 Pedro Alves <pedro@codesourcery.com>
622 * gdbreplay.c (remote_error): New.
624 (expect): Use gdbchar. Check for error reading from GDB.
625 Clarify sync error output.
626 (play): Check for errors writing to GDB.
627 * linux-low.c (sigchld_handler): Really ignore `write' errors.
628 * remote-utils.c (getpkt): Check for errors writing to the remote
631 2010-08-25 Pedro Alves <pedro@codesourcery.com>
633 * linux-low.c (linux_wait_1): Move non-debugging code out of
634 `debug_threads' control.
636 2010-08-25 Pedro Alves <pedro@codesourcery.com>
638 * linux-low.c (linux_wait_1): Don't set last_status here.
639 * server.c (push_event, queue_stop_reply_callback): Assert we're
640 not pushing a TARGET_WAITKIND_IGNORE event.
641 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
642 (myresume, handle_target_event): Set the thread's last_resume_kind
643 and last_status from the target returned status.
645 2010-08-25 Pedro Alves <pedro@codesourcery.com>
649 * linux-x86-low.c (update_debug_registers_callback): New.
650 (i386_dr_low_set_addr): Use it.
651 (i386_dr_low_get_addr): New.
652 (i386_dr_low_set_control): Use update_debug_registers_callback.
653 (i386_dr_low_get_control): New.
654 (i386_dr_low_get_status): Adjust.
655 * linux-low.c (linux_stop_lwp): New.
656 * linux-low.h (linux_stop_lwp): Declare.
658 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
659 argument instead of a i386_debug_reg_state.
660 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
661 a i386_debug_reg_state.
662 (i386_insert_aligned_watchpoint): Adjust.
663 (i386_remove_aligned_watchpoint): Adjust.
664 (i386_low_stopped_data_address): Read the debug registers from the
665 inferior instead of from the mirrors.
666 * i386-low.h (struct i386_debug_reg_state): Extend comment.
667 (i386_dr_low_get_addr): Declare.
668 (i386_dr_low_get_control): Declare.
669 (i386_dr_low_get_status): Change prototype.
671 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
672 (i386_dr_low_get_addr): New.
673 (i386_dr_low_get_control): New.
674 (i386_dr_low_get_status): Adjust prototype. Return
676 (i386_initial_stuff): Clear dr_status_mirror and
678 (i386_get_thread_context): Adjust.
679 (i386_set_thread_context): Adjust.
680 (i386_thread_added): Adjust.
682 2010-08-24 Pedro Alves <pedro@codesourcery.com>
684 * linux-low.h (linux_thread_area): Delete declaration.
686 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
688 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
689 after its termination.
691 2010-08-09 Pedro Alves <pedro@codesourcery.com>
693 * linux-low.c (gdb_wants_lwp_stopped): Delete.
694 (gdb_wants_all_stopped): Delete.
695 (linux_wait_1): Don't call them.
696 * server.c (handle_v_cont): Tag all threads as want-stopped.
697 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
698 stopped as "client-wants-stopped".
700 2010-07-31 Pedro Alves <pedro@codesourcery.com>
702 * Makefile.in (signals_h): New.
703 (server_h): Depend on it.
704 (server.o): Don't depend on $(signals_def).
705 (signals.o): Depend on $(signals_def).
707 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
709 * Makefile.in (signals_def): New.
710 (server_h): Append include/gdb/signals.h and signals_def.
711 (server.o): Append signals_def.
713 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
715 * server.c (handle_target_event): Use target_signal_to_host for
716 resume_info.sig initialization.
717 * target.h (struct thread_resume) <sig>: New comment.
719 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
721 * server.c (handle_query): strcpy() the returned string from paddress()
722 instead of sprintf().
723 * utils.c (paddress): Return phex_nz().
725 2010-07-07 Joel Brobecker <brobecker@adacore.com>
727 * server.c (handle_v_cont): Call mourn_inferior if process
729 (myresume): Likewise.
731 2010-07-01 Pedro Alves <pedro@codesourcery.com>
733 Static tracepoints, and integration with UST.
735 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
736 * mem-break.c (uninsert_all_breakpoints)
737 (reinsert_all_breakpoints): New.
738 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
739 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
740 (gdb_agent_ust_loaded, helper_thread_id)
741 (gdb_agent_helper_thread_id): New macros.
742 (struct ipa_sym_addresses): Add addr_ust_loaded,
743 addr_helper_thread_id, addr_cmd_buf.
744 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
745 (in_process_agent_loaded_ust): New.
746 (write_e_ust_not_loaded): New.
747 (maybe_write_ipa_ust_not_loaded): New.
748 (struct collect_static_trace_data_action): New.
749 (enum tracepoint_type) <static_tracepoint>: New.
750 (struct tracepoint) <handle>: Mention static tracepoints.
751 (struct static_tracepoint_ctx): New.
753 (add_tracepoint_action): Handle static tracepoint actions.
754 (unprobe_marker_at): New.
755 (clear_installed_tracepoints): Handle static tracepoints.
756 (cmd_qtdp): Handle static tracepoints.
757 (probe_marker_at): New.
758 (cmd_qtstart): Handle static tracepoints.
759 (response_tracepoint): Handle static tracepoints.
760 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
761 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
762 (get_context_regcache): Handle static tracepoints.
763 (do_action_at_tracepoint): Handle static tracepoint actions.
764 (traceframe_find_block_type): Handle static trace data blocks.
765 (traceframe_read_sdata): New.
766 (download_tracepoints): Download static tracepoint actions.
767 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
768 (GDB_PROBE_NAME): New.
773 (ust_marker_to_static_tracepoint): New.
775 (collect_ust_data_at_tracepoint): New.
776 (gdb_ust_probe): New.
777 (UNIX_PATH_MAX, SOCK_DIR): New.
778 (gdb_ust_connect_sync_socket): New.
779 (resume_thread, stop_thread): New.
780 (run_inferior_command): New.
781 (init_named_socket): New.
782 (gdb_ust_socket_init): New.
783 (cstr_to_hexstr): New.
785 (first_marker, next_marker): New.
786 (response_ust_marker): New.
787 (cmd_qtfstm, cmd_qtsstm): New.
788 (unprobe_marker_at, probe_marker_at): New.
789 (cmd_qtstmat, gdb_ust_thread): New.
791 (initialize_tracepoint_ftlib): Call gdb_ust_init.
792 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
794 (x86_64_st_collect_regmap): New.
795 (X86_64_NUM_ST_COLLECT_GREGS): New.
796 (AMD64_RIP_REGNUM): New.
797 (supply_static_tracepoint_registers): New.
798 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
800 (i386_st_collect_regmap): New.
801 (i386_NUM_ST_COLLECT_GREGS): New.
802 (supply_static_tracepoint_registers): New.
803 * server.c (handle_query): Handle qXfer:statictrace:read.
804 <qSupported>: Report support for StaticTracepoints, and
805 qXfer:statictrace:read features.
806 * server.h (traceframe_read_sdata)
807 (supply_static_tracepoint_registers): Declare.
808 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
809 (unpack_varlen_hex): Include in IPA build.
810 * Makefile.in (ustlibs, ustinc): New.
811 (IPA_OBJS): Add remote-utils-ipa.o.
812 ($(IPA_LIB)): Link -ldl and -lpthread.
814 (IPAGENT_CFLAGS): Add UST_CFLAGS.
815 * config.in, configure: Regenerate.
817 2010-06-20 Ian Lance Taylor <iant@google.com>
818 Pedro Alves <pedro@codesourcery.com>
820 * linux-x86-low.c (always_true): Delete.
821 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
822 trying to fool the compiler with always_true.
824 2010-06-20 Pedro Alves <pedro@codesourcery.com>
826 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
827 conditions in gdbserver.
829 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
831 * spu-low.c (spu_read_memory): Wrap around local store limit.
832 (spu_write_memory): Likewise.
834 2010-06-15 Pedro Alves <pedro@codesourcery.com>
836 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
837 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
839 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
841 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
842 uses with LONGEST uses.
844 2010-06-14 Stan Shebs <stan@codesourcery.com>
845 Pedro Alves <pedro@codesourcery.com>
849 * linux-x86-low.c: Include limits.h.
854 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
855 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
856 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
857 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
858 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
859 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
860 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
861 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
862 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
863 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
864 (amd64_emit_void_call_2): New.
865 (amd64_emit_ops): New.
866 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
867 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
868 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
869 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
870 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
871 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
872 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
873 (i386_emit_call, i386_emit_reg, i386_emit_pop)
874 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
875 (i386_emit_stack_adjust, i386_emit_int_call_1)
876 (i386_emit_void_call_2): New.
877 (i386_emit_ops): New.
879 (the_low_target): Install x86_emit_ops.
880 * server.h (struct emit_ops): New.
881 (get_raw_reg_func_addr): Declare.
882 (current_insn_ptr, emit_error): Declare.
883 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
884 (set_trace_state_variable_value): New defines.
885 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
886 addr_get_trace_state_variable_value and
887 addr_set_trace_state_variable_value.
888 (symbol_list): New fields for get_raw_reg,
889 get_trace_state_variable_value and set_trace_state_variable_value.
890 (condfn): New typedef.
891 (struct tracepoint): New field `compiled_cond'.
892 (do_action_at_tracepoint): Clear compiled_cond.
893 (get_trace_state_variable_value, set_trace_state_variable_value):
895 (condition_true_at_tracepoint): If there's a compiled condition,
897 (current_insn_ptr, emit_error): New globals.
898 (struct bytecode_address): New.
899 (get_raw_reg_func_addr): New.
900 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
901 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
902 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
903 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
904 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
905 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
906 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
907 (compile_tracepoint_condition, compile_bytecodes): New.
908 * target.h (emit_ops): Forward declare.
909 (struct target_ops): New field emit_ops.
910 (target_emit_ops): New.
911 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
912 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
913 * linux-low.c (linux_emit_ops): New.
914 (linux_target_ops): Install it.
915 * linux-low.h (struct linux_target_ops): New field emit_ops.
917 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
919 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
920 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
922 2010-06-01 Pedro Alves <pedro@codesourcery.com>
923 Stan Shebs <stan@codesourcery.com>
925 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
926 (all): Depend on $(extra_libraries).
927 (install-only): Install the IPA.
928 (IPA_OBJS, IPA_LIB): New.
929 (clean): Remove the IPA lib.
930 (IPAGENT_CFLAGS): New.
931 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
932 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
933 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
934 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
935 * configure.ac: Check for atomic builtins support in the compiler.
936 (IPA_DEPFILES, extra_libraries): Define.
937 * configure.srv (ipa_obj): Add description.
938 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
939 (i[34567]86-*-linux*): Set ipa_obj.
940 (x86_64-*-linux*): Set ipa_obj.
941 * linux-low.c (stabilizing_threads): New.
942 (supports_fast_tracepoints): New.
943 (linux_detach): Stabilize threads before detaching.
944 (handle_tracepoints): Handle internal tracing breakpoints. Assert
945 the lwp is either not stabilizing, or is moving out of a jump pad.
946 (linux_fast_tracepoint_collecting): New.
947 (maybe_move_out_of_jump_pad): New.
948 (enqueue_one_deferred_signal): New.
949 (dequeue_one_deferred_signal): New.
950 (linux_wait_for_event_1): If moving out of a jump pad, defer
951 pending signals to later.
952 (linux_stabilize_threads): New.
953 (linux_wait_1): Check if threads need moving out of jump pads, and
955 (stuck_in_jump_pad_callback): New.
956 (move_out_of_jump_pad_callback): New.
958 (linux_resume_one_lwp): Handle moving out of jump pads.
959 (linux_set_resume_request): Dequeue deferred signals.
960 (need_step_over_p): Also step over fast tracepoint jumps.
961 (start_step_over): Also uninsert fast tracepoint jumps.
962 (finish_step_over): Also reinsert fast tracepoint jumps.
963 (linux_install_fast_tracepoint_jump): New.
964 (linux_target_ops): Install linux_stabilize_threads and
965 linux_install_fast_tracepoint_jump_pad.
966 * linux-low.h (linux_target_ops) <get_thread_area,
967 install_fast_tracepoint_jump_pad>: New fields.
968 (struct lwp_info) <collecting_fast_tracepoint,
969 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
970 (linux_get_thread_area): Declare.
971 * linux-x86-low.c (jump_insn): New.
972 (x86_get_thread_area): New.
975 (amd64_install_fast_tracepoint_jump_pad): New.
976 (i386_install_fast_tracepoint_jump_pad): New.
977 (x86_install_fast_tracepoint_jump_pad): New.
978 (the_low_target): Install x86_get_thread_area and
979 x86_install_fast_tracepoint_jump_pad.
980 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
981 (struct fast_tracepoint_jump): New.
982 (fast_tracepoint_jump_insn): New.
983 (fast_tracepoint_jump_shadow): New.
984 (find_fast_tracepoint_jump_at): New.
985 (fast_tracepoint_jump_here): New.
986 (delete_fast_tracepoint_jump): New.
987 (set_fast_tracepoint_jump): New.
988 (uninsert_fast_tracepoint_jumps_at): New.
989 (reinsert_fast_tracepoint_jumps_at): New.
990 (set_breakpoint_at): Use write_inferior_memory.
991 (uninsert_raw_breakpoint): Use write_inferior_memory.
992 (check_mem_read): Mask out fast tracepoint jumps.
993 (check_mem_write): Mask out fast tracepoint jumps.
994 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
995 (set_fast_tracepoint_jump): Declare.
996 (delete_fast_tracepoint_jump)
997 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
998 (reinsert_fast_tracepoint_jumps_at): Declare.
999 * regcache.c: Don't compile many functions when building the
1000 in-process agent library.
1001 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1002 the register buffer in the heap.
1003 (free_register_cache): If the register buffer isn't owned by the
1004 regcache, don't free it.
1005 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1006 pre-existing register caches.
1007 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1009 (convert_ascii_to_int): : Constify `from' parameter type.
1010 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1011 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1012 the needed buffer in-place.
1013 (relocate_instruction): New.
1014 * server.c (handle_query) <qSymbols>: If the target supports
1015 tracepoints, give it a chance of looking up symbols. Report
1016 support for fast tracepoints.
1017 (handle_status): Stabilize threads.
1018 (process_serial_event): Adjust.
1019 * server.h (struct fast_tracepoint_jump): Forward declare.
1020 (struct process_info) <fast_tracepoint_jumps>: New field.
1021 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1022 (decode_X_packet, decode_M_packet): Adjust.
1023 (relocate_instruction): Declare.
1024 (in_process_agent_loaded): Declare.
1025 (tracepoint_look_up_symbols): Declare.
1026 (struct fast_tpoint_collect_status): Declare.
1027 (fast_tracepoint_collecting): Declare.
1028 (force_unlock_trace_buffer): Declare.
1029 (handle_tracepoint_bkpts): Declare.
1030 (initialize_low_tracepoint)
1031 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1032 * target.h (struct target_ops) <stabilize_threads,
1033 install_fast_tracepoint_jump_pad>: New fields.
1034 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1035 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1036 [HAVE_STDINT_H]: Include stdint.h.
1037 (trace_debug_1): Rename to ...
1038 (trace_vdebug): ... this.
1039 (trace_debug): Rename to ...
1040 (trace_debug_1): ... this. Add `level' parameter.
1042 (ATTR_USED, ATTR_NOINLINE): New.
1043 (IP_AGENT_EXPORT): New.
1044 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1045 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1046 (about_to_request_buffer_space, trace_buffer_is_full)
1047 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1048 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1049 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1050 (traceframe_write_count, traceframes_created)
1051 (trace_state_variables)
1052 New renaming defines.
1053 (struct ipa_sym_addresses): New.
1054 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1056 (ipa_sym_addrs): New.
1057 (all_tracepoint_symbols_looked_up): New.
1058 (in_process_agent_loaded): New.
1059 (write_e_ipa_not_loaded): New.
1060 (maybe_write_ipa_not_loaded): New.
1061 (tracepoint_look_up_symbols): New.
1062 (debug_threads) [IN_PROCESS_AGENT]: New.
1063 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1064 (UNKNOWN_SIDE_EFFECTS): New.
1065 (stop_tracing): New.
1066 (flush_trace_buffer): New.
1067 (stop_tracing_bkpt): New.
1068 (flush_trace_buffer_bkpt): New.
1069 (read_inferior_integer): New.
1070 (read_inferior_uinteger): New.
1071 (read_inferior_data_pointer): New.
1072 (write_inferior_data_pointer): New.
1073 (write_inferior_integer): New.
1074 (write_inferior_uinteger): New.
1075 (struct collect_static_trace_data_action): Delete.
1076 (enum tracepoint_type): New.
1077 (struct tracepoint) <type>: New field `type'.
1078 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1079 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1080 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1081 (tracepoints): Use IP_AGENT_EXPORT.
1082 (last_tracepoint): Don't include in the IPA.
1083 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1084 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1085 (alloced_trace_state_variables): New.
1086 (trace_state_variables): Use IP_AGENT_EXPORT.
1087 (traceframe_t): Delete unused variable.
1088 (circular_trace_buffer): Don't include in the IPA.
1089 (trace_buffer_start): Delete.
1090 (struct trace_buffer_control): New.
1091 (trace_buffer_free): Delete.
1092 (struct ipa_trace_buffer_control): New.
1093 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1094 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1096 (trace_buffer_ctrl): New.
1097 (TRACE_BUFFER_CTRL_CURR): New.
1098 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1099 Reimplement as macros.
1100 (trace_buffer_wrap): Delete.
1101 (traceframe_write_count, traceframe_read_count)
1102 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1103 (struct tracepoint_hit_ctx) <type>: New field.
1104 (struct fast_tracepoint_ctx): New.
1105 (memory_barrier): New.
1107 (record_tracepoint_error): Update atomically in the IPA.
1108 (clear_inferior_trace_buffer): New.
1109 (about_to_request_buffer_space): New.
1110 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1111 updating the same buffer.
1112 (add_tracepoint): Default the tracepoint's type to trap
1113 tracepoint, and orig_size to -1.
1114 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1116 (create_trace_state_variable): New parameter `gdb'. Handle it.
1117 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1118 (cmd_qtdp): Handle fast tracepoints.
1120 (max_jump_pad_size): New.
1121 (gdb_jump_pad_head): New.
1122 (get_jump_space_head): New.
1123 (claim_jump_space): New.
1124 (sort_tracepoints): New.
1125 (MAX_JUMP_SIZE): New.
1126 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1128 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1129 support. Upload fast traceframes, and delete internal IPA
1131 (stop_tracing_handler): New.
1132 (flush_trace_buffer_handler): New.
1133 (cmd_qtstop): Upload fast tracepoints.
1134 (response_tracepoint): Handle fast tracepoints.
1135 (tracepoint_finished_step): Upload fast traceframes. Set the
1136 tracepoint hit context's tracepoint type.
1137 (handle_tracepoint_bkpts): New.
1138 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1139 type. Add comment about fast tracepoints.
1140 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1141 non-existing action_str field.
1142 (get_context_regcache): Handle fast tracepoints.
1143 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1145 (fast_tracepoint_from_jump_pad_address): New.
1146 (fast_tracepoint_from_ipa_tpoint_address): New.
1147 (collecting_t): New.
1148 (force_unlock_trace_buffer): New.
1149 (fast_tracepoint_collecting): New.
1152 (write_inferior_data_ptr): New.
1153 (target_tp_heap): New.
1154 (target_malloc): New.
1155 (download_agent_expr): New.
1157 (download_tracepoints): New.
1158 (download_trace_state_variables): New.
1159 (upload_fast_traceframes): New.
1160 (IPA_FIRST_TRACEFRAME): New.
1161 (IPA_NEXT_TRACEFRAME_1): New.
1162 (IPA_NEXT_TRACEFRAME): New.
1163 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1164 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1165 (gdb_jump_pad_buffer_end): New.
1166 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1167 (initialize_tracepoint): Adjust.
1168 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1169 buffer. Initialize the low module.
1170 * utils.c (PREFIX, TOOLNAME): New.
1171 (malloc_failure): Use PREFIX.
1172 (error): In the IPA, an error causes an exit.
1173 (fatal, warning): Use PREFIX.
1174 (internal_error): Use TOOLNAME.
1175 (NUMCELLS): Increase to 10.
1176 * configure, config.in: Regenerate.
1178 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1180 * server.c (handle_query) <qSupported>: Do two passes over the
1181 qSupported string to avoid nesting strtok.
1183 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1185 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1187 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1189 * configure: Regenerate.
1190 * proc-service.list: New.
1192 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1194 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1197 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1199 * gdbreplay.c (remote_open): Check error return from socket() call by
1200 its equality to -1 not by it being negative.
1201 * remote-utils.c (remote_open): Likewise.
1203 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1205 * config.h: Regenerate.
1207 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1209 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1210 doesn't provide PTRACE_GET_THREAD_AREA.
1212 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1214 * linux-m68k-low.c: Include <asm/ptrace.h>
1215 (ps_get_thread_area): Implement.
1217 2010-05-03 Doug Evans <dje@google.com>
1219 * event-loop.c (struct callback_event): New struct.
1220 (callback_list): New global.
1221 (append_callback_event, delete_callback_event): New functions.
1222 (process_callback): New function.
1223 (start_event_loop): Call it.
1224 * remote-utils.c (NOT_SCHEDULED): Define.
1225 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1226 moved out of readchar.
1227 (readchar): Rewrite. Call reschedule before returning.
1228 (reset_readchar): New function.
1229 (remote_close): Call it.
1230 (process_remaining, reschedule): New functions.
1231 * server.h (callback_handler_func): New typedef.
1232 (append_callback_event, delete_callback_event): Declare.
1234 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1236 * proc-service.c (ps_pglobal_lookup): Use
1237 thread_db_look_up_one_symbol.
1238 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1239 parameter. Use it instead of all_symbols_looked_up.
1240 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1242 (all_symbols_looked_up): Don't declare.
1243 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1244 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1246 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1247 Set all_symbols_looked_up here.
1248 (thread_db_look_up_one_symbol): New.
1249 (thread_db_get_tls_address): Adjust.
1250 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1251 thread_db object on the heap, and tentatively set it in the
1253 (thread_db_init): Don't set all_symbols_looked_up here.
1254 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1256 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1258 * linux-low.c (linux_kill, linux_detach): Adjust.
1259 (status_pending_p_callback): Remove redundant statement. Check
1260 for !TARGET_WAITIKIND_IGNORE, instead of
1261 TARGET_WAITKIND_STOPPED.
1262 (handle_tracepoints): Make sure LWP is locked. Adjust.
1263 (linux_wait_for_event_1): Adjust.
1264 (linux_cancel_breakpoints): New.
1265 (unsuspend_one_lwp): New.
1266 (unsuspend_all_lwps): New.
1267 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1268 (send_sigstop_callback): Change return type to int, add new
1269 `except' parameter and handle it.
1270 (suspend_and_send_sigstop_callback): New.
1271 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1272 pass them down. If SUSPEND, also increment the lwp's suspend
1274 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1275 (need_step_over_p): Don't consider suspended LWPs.
1276 (start_step_over): Adjust.
1277 (proceed_one_lwp): Change return type to int, add new `except'
1278 parameter and handle it.
1279 (unsuspend_and_proceed_one_lwp): New.
1280 (proceed_all_lwps): Use find_inferior instead of
1282 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1283 also decrement the suspend count of LWPs. Pass `except' down,
1284 instead of hacking its suspend count.
1285 (linux_pause_all): Add `freeze' parameter. Adjust.
1286 (linux_unpause_all): New.
1287 (linux_target_ops): Install linux_unpause_all.
1288 * server.c (handle_status): Adjust.
1289 * target.h (struct target_ops): New fields `unpause_all' and
1290 `cancel_breakpoints'. Add new parameter to `pause_all'.
1291 (pause_all): Add new `freeze' parameter.
1293 (cancel_breakpoints): New.
1294 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1296 (cmd_qtstart): Pause threads.
1297 (stop_tracing): Pause threads, and cancel breakpoints.
1298 * win32-low.c (win32_target_ops): Adjust.
1300 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1302 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1303 the inferior right away from here...
1304 (linux_wait_1): ... to here, and adjust to check the thread's
1305 last_resume_kind instead of the lwp's step or stop_expected flags.
1307 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1309 * README: Use consistent `GDB' and `GDBserver' spellings.
1311 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1313 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1314 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1315 (linux_detach_one_lwp): Assume the lwp is stopped.
1316 (any_thread_of): Delete.
1317 (linux_detach): Stop all lwps here. Don't blindly delete all
1319 (delete_lwp_callback): New.
1320 (linux_mourn): Delete all lwps of the process that is gone.
1321 (linux_wait_1): Don't delete the last lwp of the process here.
1322 * mem-break.h (mark_breakpoints_out): Declare.
1323 * mem-break.c (mark_breakpoints_out): New.
1324 (free_all_breakpoints): Use it.
1325 * server.c (handle_target_event): If the process is gone, mark
1327 * thread-db.c (struct thread_db) <create_bp>: New field.
1328 (thread_db_enable_reporting): Fix prototype. Store a thread event
1329 breakpoint reference in the thread_db struct.
1330 (thread_db_load_search): Clear the thread_db object.
1331 (try_thread_db_load_1): Ditto.
1332 (switch_to_process): New.
1333 (disable_thread_event_reporting): Use it.
1334 (remove_thread_event_breakpoints): New.
1335 (thread_db_detach, thread_db_mourn): Use it.
1337 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1339 * linux-low.c (linux_enable_event_reporting): New.
1340 (linux_wait_for_event_1, handle_extended_wait): Use it.
1342 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1344 * linux-low.c (linux_kill_one_lwp, linux_kill)
1345 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1346 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1347 SIGSTOP even if the LWP is stopped.
1348 (send_sigstop_callback): New.
1349 (stop_all_lwps): Use send_sigstop_callback instead.
1350 (linux_resume_one_thread): Adjust.
1351 (proceed_one_lwp): Still proceed an LWP that the client has
1352 requested to stop, if we haven't reported it as stopped yet. Make
1353 sure that LWPs the client want stopped, have a pending SIGSTOP.
1355 2010-04-26 Doug Evans <dje@google.com>
1357 * server.c (handle_general_set): Make static.
1359 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1360 Print received char after testing for error/eof instead of before.
1361 (input_interrupt): Tweak comment.
1363 2010-04-23 Doug Evans <dje@google.com>
1365 * server.c (start_inferior): Print inferior argv if --debug.
1367 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1369 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1370 * nto-x86-low.c: Include server.h
1372 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1374 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1375 be consistent with other sources of this directory.
1376 (init_registers_amd64): Correct name of source file of this function
1379 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1381 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1384 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1386 * win32-i386-low.c: Add 64-bit support.
1387 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1388 (init_registers_amd64): Declare.
1389 (mappings): Add 64-bit version of array.
1390 (init_windows_x86): New function.
1391 (the_low_target): Change init_arch field to init_windows_x86.
1393 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1395 * win32-low.c: Adapt to support also 64-bit architecture.
1396 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1397 (get_image_name): Use SIZE_T type for local variable `done'.
1398 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1399 (toolhelp_get_dll_name): Idem.
1400 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1401 Use uintptr_t typecast to avoid warning.
1402 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1403 (handle_exception): Use phex_nz to avoid warning.
1404 (win32_wait): Remove unused local variable `process'.
1406 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1408 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1411 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1413 * configure.ac: Use `ws2_32' library for srv_mingw.
1414 * configure: Regenerate.
1415 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1416 * remote-utils.c: Likewise.
1418 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1420 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1421 if __x86_64__ is defined.
1423 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1425 * configure: Regenerate.
1427 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1429 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1430 * target.h (target_ops): New get_tib_address field.
1431 * win32-low.h (win32_thread_info): Add thread_local_base field.
1432 * win32-low.c (child_add_thread): Add tlb argument.
1433 Set thread_local_base field to TLB.
1434 (get_child_debug_event): Adapt to child_add_thread change.
1435 (win32_get_tib_address): New function.
1436 (win32_target_ops): Set get_tib_address field to
1437 win32_get_tib_address.
1438 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1440 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1442 * linux-low.c (linux_mourn): Also remove the process.
1443 * server.c (handle_target_event): Don't remove the process here.
1444 * nto-low.c (nto_mourn): New.
1445 (nto_target_ops): Install it.
1446 * spu-low.c (spu_mourn): New.
1447 (spu_target_ops): Install it.
1448 * win32-low.c (win32_mourn): New.
1449 (win32_target_ops): Install it.
1451 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1453 * server.h (buffer_xml_printf): Remove redundant `;'.
1455 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1457 * regcache.c (set_register_cache): Invalidate regcaches before
1458 changing the register cache layout.
1459 (regcache_invalidate_one): Allow a NULL regcache.
1460 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1461 regcaches before changing the register cache layout or the target
1464 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1466 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1467 variable warning on Linux/x86-64.
1469 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1471 GDBserver disconnected tracing support.
1473 * linux-low.c (linux_remove_process): Delete.
1474 (add_lwp): Don't set last_resume_kind here.
1475 (linux_kill): Use `mourn'.
1476 (linux_detach): Use `thread_db_detach', and `mourn'.
1478 (linux_attach_lwp_1): Adjust comment.
1479 (linux_attach): last_resume_kind moved the thread_info; adjust.
1480 (status_pending_p_callback): Adjust.
1481 (linux_wait_for_event_1): Adjust.
1482 (count_events_callback, select_singlestep_lwp_callback)
1483 (select_event_lwp_callback, cancel_breakpoints_callback)
1484 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1485 (proceed_one_lwp): Adjust.
1486 (linux_async): Add debug output.
1487 (linux_thread_stopped): New.
1488 (linux_pause_all): New.
1489 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1491 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1492 (thread_db_free): Delete declaration.
1493 (thread_db_detach, thread_db_mourn): Declare.
1494 * thread-db.c (thread_db_init): Use thread_db_mourn.
1495 (thread_db_free): Delete, split in two.
1496 (disable_thread_event_reporting): New.
1497 (thread_db_detach): New.
1498 (thread_db_mourn): New.
1500 * server.h (struct thread_info) <last_resume_kind>: New field.
1501 <attached>: Add comment.
1502 <gdb_detached>: New field.
1503 (handler_func): Change return type to int.
1504 (handle_serial_event, handle_target_event): Ditto.
1505 (gdb_connected): Declare.
1507 (disconnected_tracing): Declare.
1508 (stop_tracing): Declare.
1510 * server.c (handle_query) <qSupported>: Report support for
1511 disconnected tracing.
1512 (queue_stop_reply_callback): Account for running threads.
1513 (gdb_wants_thread_stopped): New.
1514 (gdb_wants_all_threads_stopped): New.
1515 (gdb_reattached_process): New.
1516 (handle_status): Clear the `gdb_detached' flag of all processes.
1517 In all-stop, stop all threads.
1518 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1519 (process_serial_event): If the remote connection breaks, or if an
1520 exit was forced with "monitor exit", force an event loop exit.
1521 Handle disconnected tracing on detach.
1522 (handle_serial_event): Adjust.
1523 (handle_target_event): If GDB isn't connected, forward events back
1524 to the inferior, unless the last process exited, in which case,
1525 exit gdbserver. Adjust interface.
1527 * remote-utils.c (remote_open): Don't block in accept. Instead
1528 register an event loop source on the listen socket file
1529 descriptor. Refactor bits into ...
1530 (listen_desc): ... this new global.
1531 (gdb_connected): ... this new function.
1532 (enable_async_notification): ... this new function.
1533 (handle_accept_event): ... this new function.
1534 (remote_close): Clear remote_desc.
1536 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1538 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1540 (mourn_inferior): Define.
1541 (target_process_qsupported): Avoid the dangling else problem.
1542 (thread_stopped): Define.
1543 (pause_all): Define.
1544 (target_waitstatus_to_string): Declare.
1545 * target.c (target_waitstatus_to_string): New.
1547 * tracepoint.c (tracing): Make extern.
1548 (disconnected_tracing): New.
1549 (stop_tracing): Make extern. Handle tracing stops due to GDB
1551 (cmd_qtdisconnected): New.
1552 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1553 (handle_tracepoint_general_set): Handle QTDisconnected.
1555 * event-loop.c (event_handler_func): Change return type to int.
1556 (process_event): Bail out if the event handler wants the event
1558 (handle_file_event): Ditto.
1559 (start_event_loop): Bail out if the event handler wants the event
1562 * nto-low.c (nto_target_ops): Adjust.
1563 * spu-low.c (spu_wait): Don't remove the process here.
1564 (spu_target_ops): Adjust.
1565 * win32-low.c (win32_wait): Don't remove the process here.
1566 (win32_target_ops): Adjust.
1568 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1570 * regcache.c (realloc_register_cache): Invalidate inferior's
1571 regcache before recreating it.
1573 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1575 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1577 2010-04-09 Stan Shebs <stan@codesourcery.com>
1578 Pedro Alves <pedro@codesourcery.com>
1580 * server.h (LONGEST): New.
1581 (struct thread_info) <while_stepping>: New field.
1582 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1584 (initialize_tracepoint, handle_tracepoint_general_set)
1585 (handle_tracepoint_query, tracepoint_finished_step)
1586 (tracepoint_was_hit, release_while_stepping_state_list):
1587 (current_traceframe): Declare.
1588 * server.c (handle_general_set): Handle tracepoint packets.
1590 (write_memory): New.
1591 (handle_search_memory_1): Use read_memory.
1592 (handle_query): Report support for conditional tracepoints, trace
1593 state variables, and tracepoint sources. Handle tracepoint
1595 (main): Initialize the tracepoints module.
1596 (process_serial_event): Handle traceframe reads/writes.
1598 * linux-low.c (handle_tracepoints): New.
1599 (linux_wait_1): Call it.
1600 (linux_resume_one_lwp): Handle while-stepping.
1601 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1602 (linux_target_ops): Install them.
1603 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1605 * linux-x86-low.c (x86_supports_tracepoints): New.
1606 (the_low_target). Install it.
1608 * mem-break.h (delete_breakpoint): Declare.
1609 * mem-break.c (delete_breakpoint): Make external.
1611 * target.h (struct target_ops): Add `supports_tracepoints',
1612 `read_pc', and `write_pc' fields.
1613 (target_supports_tracepoints): Define.
1614 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1617 * regcache.h (struct regcache) <registers_owned>: New field.
1618 (init_register_cache, regcache_cpy): Declare.
1619 (regcache_read_pc, regcache_write_pc): Declare.
1620 (register_cache_size): Declare.
1621 (supply_regblock): Declare.
1622 * regcache.c (init_register_cache): New.
1623 (new_register_cache): Use it.
1624 (regcache_cpy): New.
1625 (register_cache_size): New.
1626 (supply_regblock): New.
1627 (regcache_read_pc, regcache_write_pc): New.
1629 * tracepoint.c: New.
1631 * Makefile.in (OBS): Add tracepoint.o.
1632 (tracepoint.o): New rule.
1634 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1636 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1638 (i386-mmx.c): Likewise.
1639 (i386-mmx-linux.o): Likewise.
1640 (i386-mmx-linux.c): Likewise.
1642 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1643 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1644 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1645 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1647 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1648 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1649 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1651 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1653 * Makefile.in (clean): Updated.
1655 (i386-avx.c): Likewise.
1656 (i386-avx-linux.o): Likewise.
1657 (i386-avx-linux.c): Likewise.
1658 (amd64-avx.o): Likewise.
1659 (amd64-avx.c): Likewise.
1660 (amd64-avx-linux.o): Likewise.
1661 (amd64-avx-linux.c): Likewise.
1663 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1664 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1665 (srv_amd64_regobj): Add amd64-avx.o.
1666 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1667 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1668 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1669 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1670 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1671 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1672 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1674 * i387-fp.c: Include "i386-xstate.h".
1676 (i387_cache_to_xsave): Likewise.
1677 (i387_xsave_to_cache): Likewise.
1678 (x86_xcr0): Likewise.
1680 * i387-fp.h (i387_cache_to_xsave): Likewise.
1681 (i387_xsave_to_cache): Likewise.
1682 (x86_xcr0): Likewise.
1684 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1685 * linux-crisv32-low.c (target_regsets): Likewise.
1686 * linux-m68k-low.c (target_regsets): Likewise.
1687 * linux-mips-low.c (target_regsets): Likewise.
1688 * linux-ppc-low.c (target_regsets): Likewise.
1689 * linux-s390-low.c (target_regsets): Likewise.
1690 * linux-sh-low.c (target_regsets): Likewise.
1691 * linux-sparc-low.c (target_regsets): Likewise.
1692 * linux-xtensa-low.c (target_regsets): Likewise.
1694 * linux-low.c: Include <sys/uio.h>.
1695 (regsets_fetch_inferior_registers): Support nt_type.
1696 (regsets_store_inferior_registers): Likewise.
1697 (linux_process_qsupported): New.
1698 (linux_target_ops): Add linux_process_qsupported.
1700 * linux-low.h (regset_info): Add nt_type.
1701 (linux_target_ops): Add process_qsupported.
1703 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1705 (init_registers_i386_avx_linux): New.
1706 (init_registers_amd64_avx_linux): Likewise.
1707 (xmltarget_i386_linux_no_xml): Likewise.
1708 (xmltarget_amd64_linux_no_xml): Likewise.
1709 (PTRACE_GETREGSET): Likewise.
1710 (PTRACE_SETREGSET): Likewise.
1711 (x86_fill_xstateregset): Likewise.
1712 (x86_store_xstateregset): Likewise.
1713 (use_xml): Likewise.
1714 (x86_linux_update_xmltarget): Likewise.
1715 (x86_linux_process_qsupported): Likewise.
1716 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1717 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1718 init_registers_i386_linux here. Call
1719 x86_linux_update_xmltarget.
1720 (the_low_target): Add x86_linux_process_qsupported.
1722 * server.c (handle_query): Call target_process_qsupported.
1724 * target.h (target_ops): Add process_qsupported.
1725 (target_process_qsupported): New.
1727 2010-04-03 Pedro Alves <pedro@codesourcery.com>
1729 * inferiors.c (add_thread): Set last_status kind to
1730 TARGET_WAITKIND_IGNORE.
1731 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1732 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1733 (linux_wait_1): Move `thread' local definition to block that uses
1734 it. Don't NULL initialize `event_child'.
1735 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1736 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1737 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1739 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1741 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1742 an extended waitstatus, or by a watchpoint.
1743 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1744 thread was stepping or has been stopped by a watchpoint.
1746 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1748 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1749 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1750 of another, then delete the previous, and validate all
1752 (validate_inserted_breakpoint): New.
1753 (delete_disabled_breakpoints): New.
1754 (validate_breakpoints): New.
1755 (check_mem_read): Validate breakpoints before trusting their
1756 shadow. Delete disabled breakpoints.
1757 (check_mem_write): Validate breakpoints before trusting they
1758 should be inserted. Delete disabled breakpoints.
1759 * mem-break.h (validate_breakpoints):
1760 * server.c (handle_query): Validate breakpoints when we see a
1763 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1765 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1766 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1767 if we could tell there's a GDB breakpoint at stop_pc.
1768 (need_step_over_p): Don't do a step over if we find a GDB
1769 breakpoint at the resume PC.
1771 * mem-break.c (struct raw_breakpoint): New.
1772 (enum bkpt_type): New type `gdb_breakpoint'.
1773 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1774 fields. New field `raw'.
1775 (find_raw_breakpoint_at): New.
1776 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1778 (set_breakpoint_at): Adjust.
1779 (delete_raw_breakpoint): New.
1780 (release_breakpoint): New.
1781 (delete_breakpoint): Rename to...
1782 (delete_breakpoint_1): ... this. Add proc parameter. Use
1783 release_breakpoint. Return ENOENT.
1784 (delete_breakpoint): Reimplement.
1785 (find_breakpoint_at): Delete.
1786 (find_gdb_breakpoint_at): New.
1787 (delete_breakpoint_at): Delete.
1788 (set_gdb_breakpoint_at): New.
1789 (delete_gdb_breakpoint_at): New.
1790 (gdb_breakpoint_here): New.
1791 (set_reinsert_breakpoint): Use release_breakpoint.
1792 (uninsert_breakpoint): Rename to ...
1793 (uninsert_raw_breakpoint): ... this.
1794 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1795 (reinsert_raw_breakpoint): Change parameter type to
1797 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1799 (check_breakpoints): Adjust. Use release_breakpoint.
1800 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1801 (breakpoint_inserted_here): Ditto.
1802 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1803 Don't trust the breakpoint's shadow if it is not inserted.
1804 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1805 (delete_all_breakpoints): Adjust.
1806 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1807 use delete_breakpoint_1.
1809 * mem-break.h (breakpoints_supported): Delete declaration.
1810 (set_gdb_breakpoint_at): Declare.
1811 (gdb_breakpoint_here): Declare.
1812 (delete_breakpoint_at): Delete.
1813 (delete_gdb_breakpoint_at): Declare.
1815 * server.h (struct raw_breakpoint): Forward declare.
1816 (struct process_info): New field `raw_breakpoints'.
1818 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1821 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1823 * linux-low.c (status_pending_p_callback): Fix comment.
1824 (linux_wait_for_event_1): Move most of the internal breakpoint
1825 handling from here...
1826 (linux_wait_1): ... to here.
1827 (count_events_callback): New.
1828 (select_singlestep_lwp_callback): New.
1829 (select_event_lwp_callback): New.
1830 (cancel_breakpoints_callback): New.
1831 (select_event_lwp): New.
1832 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1833 priority to all LWPs that have had events that should be reported
1834 to the client. Cancel breakpoints when about to reporting the
1835 event to the client, not while stopping lwps. No longer cancel
1836 finished single-steps here.
1837 (cancel_finished_single_step): Delete.
1838 (cancel_finished_single_steps): Delete.
1840 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1842 * mem-break.c (enum bkpt_type): New.
1843 (struct breakpoint): New field `type'.
1844 (set_breakpoint_at): Change return type to struct breakpoint
1845 pointer. Set type to `other_breakpoint' by default.
1846 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1847 in the breakpoint list.
1848 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1849 (reinsert_breakpoint): Rename to ...
1850 (reinsert_raw_breakpoint): ... this.
1851 (reinsert_breakpoints_at): Adjust.
1852 * mem-break.h (struct breakpoint): Declare.
1853 (set_breakpoint_at): Change return type to struct breakpoint
1856 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1858 * server.c (handle_query): Assign, not compare.
1860 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1862 Teach linux gdbserver to step-over-breakpoints.
1864 * linux-low.c (can_hardware_single_step): New.
1865 (supports_breakpoints): New.
1866 (handle_extended_wait): If stopping threads, read the stop pc of
1869 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1870 low target doesn't support retrieving the PC.
1871 (add_lwp): Set last_resume_kind to resume_continue.
1872 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1873 (linux_attach): Don't clear stop_expected. Set the lwp's
1874 last_resume_kind to resume_stop.
1875 (linux_detach_one_lwp): Don't check for removed breakpoints.
1876 (check_removed_breakpoint): Delete.
1877 (status_pending_p): Rename to ...
1878 (status_pending_p_callback): ... this. Don't check for removed
1879 breakpoints. Don't consider threads that are stopped from GDB's
1881 (linux_wait_for_lwp): Always read the stop_pc here.
1882 (cancel_breakpoint): New.
1883 (step_over_bkpt): New global.
1884 (linux_wait_for_event_1): Implement stepping over breakpoints.
1885 (gdb_wants_lwp_stopped): New.
1886 (gdb_wants_all_stopped): New.
1887 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1888 single-step traps here. Store the thread's last reported target
1890 (send_sigstop): Don't clear stop_expected. Always set it,
1892 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1893 (cancel_finished_single_step): New.
1894 (cancel_finished_single_steps): New.
1895 (wait_for_sigstop): Don't cancel finished single-step traps here.
1896 (linux_resume_one_lwp): Don't check for removed breakpoints.
1897 Don't set `step' on non-hardware step archs.
1898 (linux_set_resume_request): Ignore resume_stop requests if already
1899 stopping or stopped. Set the lwp's last_resume_kind.
1900 (resume_status_pending_p): Don't check for removed breakpoints.
1901 (need_step_over_p): New.
1902 (start_step_over): New.
1903 (finish_step_over): New.
1904 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1905 requests. Clear the thread's last reported target waitstatus.
1906 Don't use the `suspended' flag. Don't consider pending breakpoints.
1907 (linux_resume): Start a step-over if necessary.
1908 (proceed_one_lwp): New.
1909 (proceed_all_lwps): New.
1910 (unstop_all_lwps): New.
1911 * linux-low.h (struct lwp_info): Rewrite comment for the
1912 `suspended' flag. Add the `stop_pc' field. Delete the
1913 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1914 Add `'last_resume_kind' and `need_step_over' fields.
1915 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1916 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1917 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1918 (set_raw_breakpoint_at): New.
1919 (set_breakpoint_at): Rewrite to use it.
1920 (reinsert_breakpoint_handler): Delete.
1921 (set_reinsert_breakpoint): New.
1922 (reinsert_breakpoint_by_bp): Delete.
1923 (delete_reinsert_breakpoints): New.
1924 (uninsert_breakpoint): Rewrite.
1925 (uninsert_breakpoints_at): New.
1926 (reinsert_breakpoint): Rewrite.
1927 (reinsert_breakpoints_at): New.
1928 (check_breakpoints): Rewrite.
1929 (breakpoint_here): New.
1930 (breakpoint_inserted_here): New.
1931 (check_mem_read): Adjust.
1932 * mem-break.h (breakpoints_supported, breakpoint_here)
1933 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1934 (reinsert_breakpoint_by_bp): Delete declaration.
1935 (delete_reinsert_breakpoints): Declare.
1936 (reinsert_breakpoint): Delete declaration.
1937 (reinsert_breakpoints_at): Declare.
1938 (uninsert_breakpoint): Delete declaration.
1939 (uninsert_breakpoints_at): Declare.
1940 (check_breakpoints): Adjust prototype.
1941 * server.h: Adjust include order.
1942 (struct thread_info): Declare here. Add a `last_status' field.
1944 2010-03-23 Michael Snyder <msnyder@vmware.com>
1946 * server.c (crc32): New function.
1947 (handle_query): Add handling for 'qCRC:' request.
1949 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1951 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1952 lwp had been stopped by a watchpoint.
1954 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1956 * server.h (internal_error): Declare.
1957 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1958 * utils.c (internal_error): New function.
1960 2010-03-15 Andreas Schwab <schwab@redhat.com>
1962 * configure.srv: Fix typo setting srv_regobj.
1964 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1966 * linux-low.c (fetch_register): Avoid passing a non string literal
1968 (usr_store_inferior_registers): Ditto.
1970 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1972 * linux-low.c (linux_write_memory): Bail out early if peeking
1975 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1977 * linux-low.h (struct lwp_info): New fields
1978 `stopped_by_watchpoint' and `stopped_data_address'.
1979 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1980 here, and cache them in the lwp object.
1981 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1983 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1985 (linux_stopped_by_watchpoint): Rewrite.
1986 (linux_stopped_data_address): Rewrite.
1988 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1990 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1991 switching the current inferior, not before.
1993 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1995 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1996 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1997 i386-linux.c and amd64-linux.c.
1998 (reg-i386.o): Removed.
1999 (reg-i386.c): Likewise.
2000 (reg-i386-linux.o): Likewise.
2001 (reg-i386-linux.c): Likewise.
2002 (reg-x86-64.o): Likewise.
2003 (reg-x86-64.c): Likewise.
2004 (reg-x86-64-linux.o): Likewise.
2005 (reg-x86-64-linux.c): Likewise.
2008 (i386-linux.o): Likewise.
2009 (i386-linux.c): Likewise.
2010 (amd64.o): Likewise.
2011 (amd64.c): Likewise.
2012 (amd64-linux.o): Likewise.
2013 (amd64-linux.c): Likewise.
2015 * configure.srv (srv_i386_regobj): New.
2016 (srv_i386_linux_regobj): Likewise.
2017 (srv_amd64_regobj): Likewise.
2018 (srv_amd64_linux_regobj): Likewise.
2019 (srv_i386_32bit_xmlfiles): Likewise.
2020 (srv_i386_64bit_xmlfiles): Likewise.
2021 (srv_i386_xmlfiles): Likewise.
2022 (srv_amd64_xmlfiles): Likewise.
2023 (srv_i386_linux_xmlfiles): Likewise.
2024 (srv_amd64_linux_xmlfiles): Likewise.
2025 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2026 srv_xmlfiles to $srv_i386_xmlfiles.
2027 (i[34567]86-*-mingw32ce*): Likewise.
2028 (i[34567]86-*-mingw*): Likewise.
2029 (i[34567]86-*-nto*): Likewise.
2030 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2031 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2032 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2033 (x86_64-*-linux*): Likewise.
2035 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2036 (init_registers_amd64_linux): New.
2037 (x86_arch_setup): Replace init_registers_x86_64_linux with
2038 init_registers_amd64_linux.
2040 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2042 * configure.ac: Check for libdl. If it is not available link against
2043 static libthread_db.
2044 * configure: Regenerate.
2046 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2050 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2051 handing a read watchpoint.
2052 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2054 2010-02-12 Doug Evans <dje@google.com>
2056 * linux-low.c (linux_supports_tracefork_flag): Document.
2057 (linux_look_up_symbols): Add comment.
2059 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2061 * regcache.c (supply_register): Clear regcache if buf is NULL.
2063 2010-02-02 Nicolas Roche <roche@sourceware.org>
2064 Joel Brobecker <brobecker@adacore.com>
2066 * inferiors.c (find_inferior): Add function documentation.
2067 (unloaded_dll): Handle the case where the unloaded dll has not
2068 been previously registered in the dll list.
2070 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2072 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2073 (thumb2_breakpoint): New.
2074 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2076 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2078 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2079 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2082 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2084 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2086 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2088 * linux-s390-low.c (s390_collect_ptrace_register)
2089 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2091 2010-01-21 Doug Evans <dje@google.com>
2093 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2094 (PTRACE_ARG4_TYPE): New macro.
2095 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2096 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2097 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2098 (usr_store_inferior_registers): Ditto.
2099 (linux_read_memory, linux_write_memory): Ditto.
2100 (linux_test_for_tracefork): Ditto.
2102 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2103 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2105 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2107 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2110 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2112 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2113 prototype to take a regcache. Adjust.
2115 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2117 * regcache.h (struct thread_info): Forward declare.
2118 (struct regcache): New.
2119 (new_register_cache): Adjust prototype.
2120 (get_thread_regcache): Declare.
2121 (free_register_cache): Adjust prototype.
2122 (registers_to_string, registers_from_string): Ditto.
2123 (supply_register, supply_register_by_name, collect_register)
2124 (collect_register_as_string, collect_register_by_name): Ditto.
2125 * regcache.c (struct inferior_regcache_data): Delete.
2126 (get_regcache): Rename to ...
2127 (get_thread_regcache): ... this. Adjust. Switch inferior before
2129 (regcache_invalidate_one): Adjust.
2130 (regcache_invalidate): Fix prototype.
2131 (new_register_cache): Return the new register cache.
2132 (free_register_cache): Change prototype.
2133 (realloc_register_cache): Adjust.
2134 (registers_to_string): Change prototype to take a regcache. Adjust.
2135 (registers_from_string): Ditto.
2136 (register_data): Ditto.
2137 (supply_register): Ditto.
2138 (supply_register_by_name): Ditto.
2139 (collect_register): Ditto.
2140 (collect_register_as_string): Ditto.
2141 (collect_register_by_name): Ditto.
2142 * server.c (process_serial_event): Adjust.
2143 * linux-low.h (regset_fill_func, regset_store_func): Change
2145 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2147 * linux-low.c (get_stop_pc): Adjust.
2148 (check_removed_breakpoint): Adjust.
2149 (linux_wait_for_event): Adjust.
2150 (linux_resume_one_lwp): Adjust.
2151 (fetch_register): Add regcache parameter. Adjust.
2152 (usr_store_inferior_registers): Ditto.
2153 (regsets_fetch_inferior_registers): Ditto.
2154 (regsets_store_inferior_registers): Ditto.
2155 (linux_fetch_registers, linux_store_registers): Ditto.
2156 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2158 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2159 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2160 prototype to take a regcache.
2161 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2162 * remote-utils.c (convert_ascii_to_int, outreg)
2163 (prepare_resume_reply): Change prototype to take a regcache.
2165 * target.h (struct target_ops) <fetch_registers, store_registers>:
2166 Change prototype to take a regcache.
2167 (fetch_inferior_registers, store_inferior_registers): Change
2168 prototype to take a regcache. Adjust.
2169 * proc-service.c (ps_lgetregs): Adjust.
2170 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2171 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2172 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2173 take a regcache. Adjust.
2174 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2175 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2176 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2177 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2178 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2179 (cris_cannot_fetch_register):
2180 (cris_breakpoint_at): Change prototype to take a regcache.
2182 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2183 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2184 to take a regcache. Adjust.
2185 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2187 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2188 take a regcache. Adjust.
2189 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2190 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2191 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2192 * linux-mips-low.c (mips_get_pc):
2193 (mips_set_pc): Change prototype to take a regcache. Adjust.
2194 (mips_reinsert_addr): Adjust.
2195 (mips_collect_register): Change prototype to take a regcache.
2197 (mips_supply_register):
2198 (mips_collect_register_32bit, mips_supply_register_32bit)
2199 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2200 (mips_store_fpregset): Ditto.
2201 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2203 (parse_spufs_run): Adjust.
2204 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2205 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2206 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2207 take a regcache. Adjust.
2208 * linux-s390-low.c (s390_collect_ptrace_register)
2209 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2210 (s390_set_pc): Change prototype to take a regcache. Adjust.
2211 (s390_arch_setup): Adjust.
2212 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2213 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2214 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2215 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2216 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2218 (sparc_breakpoint_at): Adjust.
2219 * linux-xtensa-low.c (xtensa_fill_gregset):
2220 (xtensa_store_gregset):
2221 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2222 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2223 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2224 prototype to take a regcache. Adjust.
2225 * win32-arm-low.c (arm_fetch_inferior_register)
2226 (arm_store_inferior_register): Change prototype to take a
2228 * win32-i386-low.c (i386_fetch_inferior_register)
2229 (i386_store_inferior_register): Change prototype to take a
2231 * win32-low.c (child_fetch_inferior_registers)
2232 (child_store_inferior_registers): Change prototype to take a
2234 (win32_wait): Adjust.
2235 (win32_fetch_inferior_registers): Change prototype to take a
2237 (win32_store_inferior_registers): Adjust.
2238 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2239 store_inferior_register>: Change prototype to take a regcache.
2241 2010-01-20 Doug Evans <dje@google.com>
2243 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2245 (linux_wait_for_event1, linux_init_signals): Ditto.
2246 (W_STOPCODE): Provide definition if missing.
2248 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2250 * linux-low.c (linux_core_of_thread): New.
2251 (compare_ints, show_process, list_threads): New.
2252 (linux_qxfer_osdata): Report threads and cores.
2253 (linux_target_op): Register linux_core_of_thread.
2254 * remote-utils.c (prepare_resume_reply): Report the core.
2255 (buffer_xml_printf): Support %d specifier.
2256 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2258 (handle_query): Handle qXfer:threads. Announce availability
2260 * target.h (struct target_ops): New field core_of_thread.
2262 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2264 * Makefile.in (clean): Remove new generated files.
2265 (reg-s390.o, reg-s390.c): Remove rules.
2266 (reg-s390x.o, reg-s390x.c): Likewise.
2267 (s390-linux32.o, s390-linux32.c): Add rules.
2268 (s390-linux64.o, s390-linux64.c): Likewise.
2269 (s390x-linux64.o, s390x-linux64.c): Likewise.
2270 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2271 * linux-s390-low.c: Include <elf.h>.
2272 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2273 (init_registers_s390): Remove prototype.
2274 (init_registers_s390x): Likewise.
2275 (init_registers_s390_linux32): Add prototype.
2276 (init_registers_s390_linux64): Likewise.
2277 (init_registers_s390x_linux64): Likewise.
2278 (s390_num_regs_3264): New define.
2279 (s390_regmap_3264): New global variable.
2280 (s390_cannot_fetch_register): Remove obsolete check.
2281 (s390_cannot_store_register): Likewise.
2282 (s390_collect_ptrace_register): Handle upper/lower register halves.
2283 (s390_supply_ptrace_register): Likewise.
2284 (s390_fill_gregset): Update to register number changes.
2285 (s390_get_hwcap): New routine.
2286 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2287 Install appropriate regmap and register set.
2289 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2291 * server.c (gdbserver_version): Update copyright year to 2010.
2292 * gdbreplay.c (gdbreplay_version): Likewise.
2294 2009-12-28 Doug Evans <dje@google.com>
2296 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2297 elf/external.h. Include <elf.h> instead but only if necessary.
2299 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2301 * linux-low.c (linux_remove_process): Remove `detaching'
2302 parameter. Don't release/detach from thread_db here.
2303 (linux_kill): Release/detach from thread_db here, ...
2304 (linux_detach): ... and here, before actually detaching.
2305 (linux_wait_1): ... and here, when a process exits.
2306 * thread-db.c (any_thread_of): New.
2307 (thread_db_free): Switch the current inferior to a thread of the
2310 2009-12-21 Doug Evans <dje@google.com>
2312 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2314 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2315 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2316 warning ifndef __NR_tkill. Move setting of errno there too.
2317 Delete unnecessary resetting of errno after syscall.
2318 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2320 * configure.ac: Check for dladdr.
2321 * config.in: Regenerate.
2322 * configure: Regenerate.
2323 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2324 (try_thread_db_load): Update.
2326 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2328 2009-12-18 Doug Evans <dje@google.com>
2330 * event-loop.c: Include unistd.h if it exists.
2332 * linux-low.c (my_waitpid): Move definition away from being in
2333 between linux_tracefork_child/linux_test_for_tracefork.
2335 * gdb_proc_service.h (psaddr_t): Fix type.
2336 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2337 signature to match glibc.
2339 2009-12-16 Doug Evans <dje@google.com>
2341 * linux-low.c (linux_read_memory): Fix argument to read.
2343 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2345 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2346 events, don't leave current_inferior pointing at null.
2348 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2350 * win32-low.c (LOG): Delete.
2351 (OUTMSG): Output to stderr.
2352 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2353 on compile time LOG macro.
2354 (win32_wait): Fix debug output.
2356 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2358 * win32-low.c (win32_add_one_solib): If the dll name is
2359 "ntdll.dll", prepend the system directory to the dll path.
2361 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2363 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2365 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2366 Vladimir Prus <vladimir@codesourcery.com>
2368 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2369 * configure.ac: Check for __mcoldfire__ and set
2370 gdb_cv_m68k_is_coldfire.
2371 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2372 reg-cf.o and reg-m68k.o.
2373 * configure: Regenerated.
2375 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2377 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2378 Pass it to thread_db_free.
2379 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2380 proper `detaching' argument to linux_remove_process.
2381 * linux-low.h (thread_db_free): Add `detaching' parameter.
2382 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2384 (thread_db_free): Add `detaching' parameter. Only
2385 call td_ta_clear_event if detaching from process.
2387 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2389 * thread-db.c (thread_db_free): Fix typo.
2391 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2394 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2396 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2398 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2399 with an i686 compiler.
2400 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2402 * configure: Rebuilt.
2404 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2408 * server.c (handle_search_memory_1): Correct read_addr initialization
2409 in loop for searching subsequent chunks.
2411 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2413 * configure.ac: New --with-libthread-db option.
2414 * thread-db.c: Allow direct dependence on libthread_db.
2415 (thread_db_free): Adjust.
2416 * config.in: Regenerate.
2417 * configure: Likewise.
2419 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2422 * thread-db.c (attach_thread): New function.
2423 (maybe_attach_thread): Return success/failure.
2424 (find_new_threads_callback): Adjust.
2425 (thread_db_find_new_threads): Loop until no new threads.
2427 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2429 * proc-service.c (ps_lgetregs): Formatting.
2431 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2433 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2434 * configure.ac: Adjust.
2435 * linux-low.h (struct process_info_private): Move members to struct
2437 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2438 * linux-low.c (linux_remove_process): Adjust.
2439 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2440 * server.c (handle_query): Move code ...
2441 (handle_monitor_command): ... here. New function.
2442 * target.h (struct target_ops): New member.
2443 * thread-db.c (struct thread_db): New.
2444 (libthread_db_search_path): New variable.
2445 (thread_db_create_event, thread_db_enable_reporting)
2446 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2447 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2448 (try_thread_db_load_1, dladdr_to_soname): New functions.
2449 (try_thread_db_load, thread_db_load_search): New functions.
2450 (thread_db_init): Search for libthread_db.
2451 (thread_db_free): New function.
2452 (thread_db_handle_monitor_command): Likewise.
2453 * config.in: Regenerate.
2454 * configure: Regenerate.
2456 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2458 * spu-low.c (spu_kill): Wait for inferior to terminate.
2459 Call clear_inferiors.
2460 (spu_detach): Call clear_inferiors.
2462 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2464 * aclocal.m4: Regenerate.
2465 * config.in: Likewise.
2466 * configure: Likewise.
2468 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2470 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2471 (parse_spufs_run): New function.
2472 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2473 (ppc_breakpoint_at): Handle SPU breakpoints.
2475 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2477 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2478 (SPUFS_MAGIC): Define.
2479 (spu_enumerate_spu_ids): New function.
2480 (linux_qxfer_spu): New function.
2481 (linux_target_ops): Install linux_qxfer_spu.
2483 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2485 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2486 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2487 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2488 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2489 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2490 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2491 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2492 (init_registers_powerpc_cell32l): Add prototype.
2493 (init_registers_powerpc_cell64l): Likewise.
2494 (ppc_arch_setup): Detect Cell/B.E. architecture.
2496 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2498 * Makefile.in (datarootdir): New variable.
2500 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2502 * linux-low.c (linux_write_memory): Update debugging output.
2503 * Makefile.in (clean): Add new descriptions.
2504 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2505 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2506 * configure.srv: Add new files for arm*-*-linux*.
2507 * linux-arm-low.c: Add new declarations.
2508 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2509 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2510 (HWCAP_VFPv3D16): New.
2511 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2512 instead of __IWMMXT__.
2513 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2514 (arm_arch_setup): New.
2515 (target_regsets): Remove #ifdef. Add VFP regset.
2516 (the_low_target): Use arm_arch_setup.
2518 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2520 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2521 the main thread again.
2523 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2525 Adding Neutrino gdbserver.
2526 * configure: Regenerated.
2527 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2528 * configure.srv (i[34567]86-*-nto*): New target.
2529 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2530 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2531 (nto_comctrl) [__QNX__]: New function.
2532 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2534 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2536 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2539 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2540 Pedro Alves <pedro@codesourcery.com>
2542 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2543 don't support CONTEXT_EXTENDED_REGISTERS.
2544 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2545 (the_low_target): Install them.
2546 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2547 failing with ERROR_PIPE_NOT_CONNECTED.
2549 2009-06-30 Doug Evans <dje@google.com>
2550 Pierre Muller <muller@ics.u-strasbg.fr>
2552 Add h/w watchpoint support to x86-linux, win32-i386.
2553 * Makefile.in (SFILES): Add i386-low.c
2554 (i386_low_h): Define.
2555 (i386-low.o): Add dependencies.
2556 (linux-x86-low.o): Add i386-low.h dependency.
2557 (win32-i386-low.o): Ditto.
2558 * i386-low.c: New file.
2559 * i386-low.h: New file.
2560 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2561 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2562 * linux-low.c (linux_add_process): Initialize arch_private.
2563 (linux_remove_process): Free arch_private.
2564 (add_lwp): Initialize arch_private.
2565 (delete_lwp): Free arch_private.
2566 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2568 * linux-low.h (process_info_private): New member arch_private.
2569 (lwp_info): New member arch_private.
2570 (linux_target_ops): New members new_process, new_thread,
2572 (ptid_of): New macro.
2573 * linux-x86-low.c: Include stddef.h, i386-low.h.
2574 (arch_process_info): New struct.
2575 (arch_lwp_info): New struct.
2576 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2577 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2578 (i386_dr_low_get_status): New function.
2579 (x86_insert_point, x86_remove_point): New functions.
2580 (x86_stopped_by_watchpoint): New function.
2581 (x86_stopped_data_address): New function.
2582 (x86_linux_new_process, x86_linux_new_thread): New functions.
2583 (x86_linux_prepare_to_resume): New function.
2584 (the_low_target): Add entries for insert_point, remove_point,
2585 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2587 * server.c (debug_hw_points): New global.
2588 (monitor_show_help): Document set debug-hw-points.
2589 (handle_query): Process "set debug-hw-points".
2590 * server.h (debug_hw_points): Declare.
2591 (paddress): Declare.
2592 * utils.c (NUMCELLS, CELLSIZE): New macros.
2593 (get_sell, xsnprintf, paddress): New functions.
2594 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2595 remove_point, stopped_by_watchpoint, stopped_data_address.
2596 * win32-i386-low.c: Include i386-low.h.
2597 (debug_reg_state): Replaces dr.
2598 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2599 (i386_dr_low_get_status): New function.
2600 (i386_insert_point, i386_remove_point): New functions.
2601 (i386_stopped_by_watchpoint): New function.
2602 (i386_stopped_data_address): New function.
2603 (i386_initial_stuff): Update.
2604 (get_thread_context,set_thread_context,i386_thread_added): Update.
2605 (the_low_target): Add entries for insert_point,
2606 remove_point, stopped_by_watchpoint, stopped_data_address.
2607 * win32-low.c (win32_insert_watchpoint): New function.
2608 (win32_remove_watchpoint): New function.
2609 (win32_stopped_by_watchpoint): New function.
2610 (win32_stopped_data_address): New function.
2611 (win32_target_ops): Add entries for insert_watchpoint,
2612 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2613 * win32-low.h (win32_target_ops): New members insert_point,
2614 remove_point, stopped_by_watchpoint, stopped_data_address.
2616 2009-06-25 Pedro Alves <pedro@codesourcery.com>
2618 * server.c (process_serial_event): Re-return unsupported, not
2619 error, if the type isn't recognized. Re-allow supporting only
2620 insert or remove packets. Also call require_running for
2621 breakpoints. Add missing break statement to default case. Tidy.
2622 * target.h (struct target_ops): Rename insert_watchpoint to
2623 insert_point, and remove_watchpoint to remove_point.
2625 * linux-low.h (struct linux_target_ops): Likewise.
2626 * linux-low.c (linux_insert_watchpoint): Rename to ...
2627 (linux_insert_point): ... this. Adjust.
2628 (linux_remove_watchpoint): Rename to ...
2629 (linux_remove_point): ... this. Adjust.
2630 (linux_target_ops): Adjust.
2631 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2632 (cris_insert_point): ... this.
2633 (cris_remove_watchpoint): Rename to ...
2634 (cris_remove_point): ... this.
2635 (the_low_target): Adjust.
2637 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2639 * server.c (handle_v_kill): Pass signal_pid to
2640 kill_inferior if multi_process is zero.
2642 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2644 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2645 * target.h (target_ops): Comment for *_watchpoint to make it clear
2646 the functions can get types '0' and '1'.
2648 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2650 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2651 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2652 * regcache.c (get_regcache): Likewise.
2653 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2654 * win32-low.c (child_fetch_inferior_registers): Remove check for
2657 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2658 Pedro Alves <pedro@codesourcery.com>
2660 * target.h (struct target_ops) <supports_multi_process>: New
2662 (target_supports_multi_process): New.
2663 * server.c (handle_query): Even if GDB reports support, only
2664 enable multi-process if the target also supports it. Report
2665 multi-process support only if the target backend supports it.
2666 * linux-low.c (linux_supports_multi_process): New function.
2667 (linux_target_ops): Install it as target_supports_multi_process
2670 2009-05-24 Doug Evans <dje@google.com>
2672 Global renaming of find_thread_pid to find_thread_ptid.
2673 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2674 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2675 All callers updated.
2677 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2678 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2681 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2682 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2683 (linux_resume_one_lwp): Ditto.
2685 2009-05-23 Doug Evans <dje@google.com>
2687 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2688 from struct inferior_list_entry * to struct lwp_info *.
2689 All callers updated.
2691 2009-05-13 Doug Evans <dje@google.com>
2693 * linux-x86-low.c: Don't include assert.h.
2694 (x86_siginfo_fixup): Use fatal, not assert.
2695 (x86_arch_setup): Fix comment.
2697 2009-05-12 Doug Evans <dje@google.com>
2699 Biarch support for i386/amd64 gdbserver.
2700 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2701 Add linux-x86-low.c.
2702 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2703 (linux-x86-low.o): Add.
2704 * linux-x86-64-low.c: Delete.
2705 * linux-i386-low.c: Delete.
2706 * linux-x86-low.c: New file.
2707 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2709 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2711 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2712 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2713 (linux_child_pid_to_exec_file): New function.
2714 (elf_64_header_p, elf_64_file_p): New functions.
2715 (siginfo_fixup): New function.
2716 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2717 give target a chance to convert layout.
2718 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2719 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2721 2009-05-07 Doug Evans <dje@google.com>
2723 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2724 (regsets_store_inferior_registers): Ditto.
2726 2009-05-06 Pedro Alves <pedro@codesourcery.com>
2730 * linux-low.c (must_set_ptrace_flags): Delete.
2731 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2733 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2734 `lwp->must_set_ptrace_flags' instead.
2735 (linux_wait_for_event_1): Set ptrace options here.
2736 (linux_wait_1): ... not here.
2738 2009-04-30 Doug Evans <dje@google.com>
2740 * inferiors.c (started_inferior_callback): New function.
2741 (attached_inferior_callback): New function.
2742 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2743 * server.c (print_started_pid, print_attached_pid): New functions.
2744 (detach_or_kill_for_exit): New function.
2745 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2746 * server.h (have_started_inferiors_p): Declare.
2747 (have_attached_inferiors_p): Declare.
2749 * inferiors.c (remove_process): Fix memory leak, free process.
2750 * linux-low.c (linux_remove_process): New function.
2751 (linux_kill): Call it instead of remove_process.
2752 (linux_detach, linux_wait_1): Ditto.
2754 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2756 * configure.srv: Add x86 Windows CE target.
2758 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2760 * inferiors.c (get_thread_process): Make global.
2761 * server.h (get_thread_process): Add prototype.
2762 * thread-db.c (find_one_thread): Use get_thread_process
2763 instead of current_process.
2764 (thread_db_get_tls_address): Do not crash if called when
2765 thread layer is not yet initialized.
2767 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2769 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2770 * spu-low.c (current_tid): Rename to ...
2771 (current_ptid): ... this.
2772 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2773 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2774 ptid_get_lwp (current_ptid) instead of current_tid.
2775 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2776 instead of current_tid. Use find_process_pid to verify pid
2777 argument is valid. Pass proper argument to remove_process.
2778 (spu_thread_alive): Compare current_ptid instead of current_tid.
2779 (spu_resume): Likewise.
2781 2009-04-02 Pedro Alves <pedro@codesourcery.com>
2783 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2786 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2788 Implement the multiprocess extensions, and add linux multiprocess
2791 * server.h (ULONGEST): Declare.
2792 (struct ptid, ptid_t): New.
2793 (minus_one_ptid, null_ptid): Declare.
2794 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2795 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2796 (struct inferior_list_entry): Change `id' type from unsigned from
2798 (struct sym_cache, struct breakpoint, struct
2799 process_info_private): Forward declare.
2800 (struct process_info): Declare.
2801 (current_process): Declare.
2802 (all_processes): Declare.
2803 (initialize_inferiors): Declare.
2804 (add_thread): Adjust to use ptid_t.
2805 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2806 (add_process, remove_process, find_thread_pid): Declare.
2807 (find_inferior_id): Adjust to use ptid_t.
2808 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2809 (multi_process): Declare.
2810 (push_event): Adjust to use ptid_t.
2811 (read_ptid, write_ptid): Declare.
2812 (prepare_resume_reply): Adjust to use ptid_t.
2813 (clear_symbol_cache): Declare.
2814 * inferiors.c (all_processes): New.
2815 (null_ptid, minus_one_ptid): New.
2816 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2817 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2818 (add_thread): Change unsigned long to ptid. Remove gdb_id
2820 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2821 (gdb_id_to_thread): Rename to ...
2822 (find_thread_pid): ... this. Change unsigned long to ptid.
2823 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2824 (loaded_dll, pull_pid_from_list): Adjust.
2825 (add_process, remove_process, find_process_pid)
2826 (get_thread_process, current_process, initialize_inferiors): New.
2827 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2828 (struct target_waitstatus) <related_pid>: Ditto.
2829 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2831 (struct target_ops) <join>: Add `pid' argument.
2832 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2833 (struct target_ops) <wait>: Add `ptid' field. Change return type
2835 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2836 (mywait): Add `ptid' argument. Change return type to ptid_t.
2837 (target_pid_to_str): Declare.
2838 * target.c (set_desired_inferior): Adjust to use ptids.
2839 (mywait): Add new `ptid' argument. Adjust.
2840 (target_pid_to_str): New.
2841 * mem-break.h (free_all_breakpoints): Declare.
2842 * mem-break.c (breakpoints): Delelete.
2843 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2844 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2845 to use per-process breakpoint list.
2846 (free_all_breakpoints): New.
2847 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2848 (symbol_cache, all_symbols_looked_up): Delete.
2850 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2852 (prepare_resume_reply): Change ptid argument's type from unsigned
2853 long to ptid_t. Adjust. Implement W;process and X;process.
2854 (free_sym_cache, clear_symbol_cache): New.
2855 (look_up_one_symbol): Adjust to per-process symbol cache. *
2856 * server.c (cont_thread, general_thread, step_thread): Change type
2859 (multi_process): New.
2860 (last_ptid): Change type to ptid_t.
2861 (struct vstop_notif) <ptid>: Change type to ptid_t.
2862 (queue_stop_reply, push_event): Change `ptid' argument's type to
2864 (discard_queued_stop_replies): Add `pid' argument.
2865 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2866 changes. Don't reference the `attached' global.
2867 (attach_inferior): Adjust to mywait interface changes.
2868 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2869 features. Handle and report "multiprocess+". Handle
2871 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2873 (handle_v_kill): New.
2874 (handle_v_stopped): Adjust to use target_pid_to_str.
2875 (handle_v_requests): Allow multiple attaches and runs when
2876 multiprocess extensions are in effect. Handle "vKill".
2877 (myresume): Adjust to use ptids.
2878 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2879 (handle_status): Adjust to discard_queued_stop_replies interface
2881 (first_thread_of, kill_inferior_callback)
2882 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2883 (main): Call initialize_inferiors. Adjust to use ptids, killing
2884 and detaching from all inferiors. Handle multiprocess packet
2886 * linux-low.h: Include gdb_proc_service.h.
2887 (struct process_info_private): New.
2888 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2889 <lwpid_of>: Use ptid_get_lwp.
2890 (get_lwp_thread): Adjust.
2891 (struct lwp_info): Add `dead' member.
2892 (find_lwp_pid): Declare.
2893 * linux-low.c (thread_db_active): Delete.
2894 (new_inferior): Adjust comment.
2895 (inferior_pid): Delete.
2896 (linux_add_process): New.
2897 (handle_extended_wait): Adjust.
2898 (add_lwp): Change unsigned long to ptid.
2899 (linux_create_inferior): Add process to processes table. Adjust
2900 to use ptids. Don't set new_inferior here.
2901 (linux_attach_lwp): Rename to ...
2902 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2903 it. Adjust to use ptids.
2904 (linux_attach_lwp): New.
2905 (linux_attach): Add process to processes table. Don't set
2907 (struct counter): New.
2908 (second_thread_of_pid_p, last_thread_of_process_p): New.
2909 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2911 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2912 processes. Remove process from process table.
2913 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2914 to multiple processes.
2915 (any_thread_of): New.
2916 (linux_detach): Add `pid' argument, and handle it. Remove process
2917 from processes table.
2918 (linux_join): Add `pid' argument. Handle it.
2919 (linux_thread_alive): Change unsighed long argument to ptid_t.
2920 Consider dead lwps as not being alive.
2921 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2922 threads we're not interested in.
2923 (same_lwp, find_lwp_pid): New.
2924 (linux_wait_for_lwp): Change `pid' argument's type from int to
2926 (linux_wait_for_event): Rename to ...
2927 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2928 from int to ptid_t. Adjust.
2929 (linux_wait_for_event): New.
2930 (linux_wait_1): Add `ptid' argument. Change return type to
2931 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2932 that exit from the process table.
2933 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2935 (mark_lwp_dead): New.
2936 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2937 stopping all threads, mark its main lwp as dead.
2938 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2940 (fetch_register, usr_store_inferior_registers)
2941 (regsets_fetch_inferior_registers)
2942 (regsets_store_inferior_registers, linux_read_memory)
2943 (linux_write_memory): Inline `inferior_pid'.
2944 (linux_look_up_symbols): Adjust to use per-process
2946 (linux_request_interrupt): Adjust to use ptids.
2947 (linux_read_auxv): Inline `inferior_pid'.
2948 (initialize_low): Don't reference thread_db_active.
2949 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2950 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2951 (ps_getpid): Return the pid of the current inferior.
2952 * thread-db.c (proc_handle, thread_agent): Delete.
2953 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2955 (find_one_thread): Change argument type to ptid_t. Adjust to
2957 (maybe_attach_thread): Adjust to per-process data and ptids.
2958 (thread_db_find_new_threads): Ditto.
2959 (thread_db_init): Ditto.
2960 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2961 processes table. Adjust to use ptids.
2962 (spu_kill, spu_detach): Adjust interface. Remove process from
2964 (spu_join, spu_thread_alive): Adjust interface.
2965 (spu_wait): Adjust interface. Remove process from processes
2966 table. Adjust to use ptids.
2967 * win32-low.c (current_inferior_tid): Delete.
2968 (current_inferior_ptid): New.
2969 (debug_event_ptid): New.
2970 (thread_rec): Take a ptid. Adjust.
2971 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2972 (child_delete_thread): Ditto.
2973 (do_initial_child_stuff): Add `attached' argument. Add process to
2975 (child_fetch_inferior_registers, child_store_inferior_registers):
2977 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2978 (win32_attach): Pass 1 to do_initial_child_stuff.
2979 (win32_kill): Adjust interface. Remove process from processes
2981 (win32_detach): Ditto.
2982 (win32_join): Adjust interface.
2983 (win32_thread_alive): Take a ptid.
2984 (win32_resume): Adjust to use ptids.
2985 (get_child_debug_event): Ditto.
2986 (win32_wait): Adjust interface. Remove exiting process from
2989 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2991 Non-stop mode support.
2993 * server.h (non_stop): Declare.
2994 (gdb_client_data, handler_func): Declare.
2995 (delete_file_handler, add_file_handler, start_event_loop):
2997 (handle_serial_event, handle_target_event, push_event)
2998 (putpkt_notif): Declare.
2999 * target.h (enum resume_kind): New.
3000 (struct thread_resume): Replace `step' field by `kind' field.
3001 (TARGET_WNOHANG): Define.
3002 (struct target_ops) <wait>: Add `options' argument.
3003 <supports_non_stop, async, start_non_stop>: New fields.
3004 (target_supports_non_stop, target_async): New.
3005 (start_non_stop): Declare.
3006 (mywait): Add `options' argument.
3007 * target.c (mywait): Add `options' argument. Print child exit
3009 (start_non_stop): New.
3010 * server.c (non_stop, own_buf, mem_buf): New globals.
3011 (struct vstop_notif): New.
3012 (notif_queue): New global.
3013 (queue_stop_reply, push_event, discard_queued_stop_replies)
3014 (send_next_stop_reply): New.
3015 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3017 (attach_inferior): In non-stop mode, don't wait for the target
3019 (handle_general_set): Handle QNonStop.
3020 (handle_query): When handling qC, return the current general
3021 thread, instead of the first thread of the list.
3022 (handle_query): If the backend supports non-stop mode, include
3023 QNonStop+ in the qSupported query response.
3024 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3026 (handle_v_attach, handle_v_run): Handle non-stop mode.
3027 (handle_v_stopped): New.
3028 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3029 (myresume): Adjust to use resume_kind. Handle non-stop.
3030 (queue_stop_reply_callback): New.
3031 (handle_status): Handle non-stop mode.
3032 (main): Clear non_stop flag on reconnection. Use the event-loop.
3033 Refactor serial protocol handling from here ...
3034 (process_serial_event): ... to this new function. When GDB
3035 selects any thread, select one here. In non-stop mode, wait until
3036 GDB acks all pending events before exiting.
3037 (handle_serial_event, handle_target_event): New.
3038 * remote-utils.c (remote_open): Install remote_desc in the event
3040 (remote_close): Remove remote_desc from the event loop.
3041 (putpkt_binary): Rename to...
3042 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3043 (putpkt_binary): New as wrapper around putpkt_binary_1.
3044 (putpkt_notif): New.
3045 (prepare_resume_reply): In non-stop mode, don't change the
3047 * event-loop.c: New.
3048 * Makefile.in (OBJ): Add event-loop.o.
3049 (event-loop.o): New rule.
3051 * linux-low.h (pid_of): Moved here.
3053 (get_lwp_thread): Use lwpid_of.
3054 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3055 * linux-low.c (pid_of): Delete.
3056 (inferior_pid): Use lwpid_of.
3057 (linux_event_pipe): New.
3058 (target_is_async_p): New.
3060 (handle_extended_wait): Use lwpid_of.
3061 (add_lwp): Don't set lwpid field.
3062 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3063 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3064 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3065 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3066 first. Adjust to linux_wait_for_event interface changes. Use
3068 (linux_detach): Don't delete the main lwp here.
3069 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3070 (status_pending_p): Don't consider explicitly suspended lwps.
3071 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3072 pointer. Add OPTIONS argument. Change return type to int. Use
3073 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3074 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3075 pointer. Add status pointer argument. Return a pid instead of a
3076 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3077 changes. In non-stop mode, don't switch to a random thread.
3078 (linux_wait): Rename to...
3079 (linux_wait_1): ... this. Add target_options argument, and handle
3080 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3081 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3082 clean exit and signal exit code. Don't stop all threads in
3083 non-stop mode. In all-stop mode, only stop all threads when
3084 reporting a stop to GDB. Handle explicit thread stop requests.
3085 (async_file_flush, async_file_mark): New.
3087 (send_sigstop): Use lwpid_of.
3088 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3089 interface changes. In non-stop mode, don't switch to a random
3091 (linux_resume_one_lwp): Use lwpid_of.
3092 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3093 (linux_resume_one_thread): ... this. Handle resume_stop. In
3094 non-stop mode, don't look for pending flag in all threads.
3095 (resume_status_pending_p): Don't consider explicitly suspended
3097 (my_waitpid): Reimplement. Emulate __WALL.
3098 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3100 (sigchld_handler, linux_supports_non_stop, linux_async)
3101 (linux_start_non_stop): New.
3102 (linux_target_ops): Register linux_supports_non_stop, linux_async
3103 and linux_start_non_stop.
3104 (initialize_low): Install SIGCHLD handler.
3105 * thread-db.c (thread_db_create_event, find_one_thread)
3106 (thread_db_get_tls_address): Use lwpid_of.
3107 * win32-low.c (win32_detach): Adjust to use resume_kind.
3108 (win32_wait): Add `options' argument.
3109 * spu-low.c (spu_resume): Adjust to use resume_kind.
3110 (spu_wait): Add `options' argument.
3112 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3114 Decouple target code from remote protocol.
3116 * target.h (enum target_waitkind): New.
3117 (struct target_waitstatus): New.
3118 (struct target_ops) <wait>: Return an unsigned long. Take a
3119 target_waitstatus pointer instead of a char pointer.
3121 * target.c (mywait): Change prototype to return an unsigned long.
3122 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3123 * server.h (thread_from_wait, old_thread_from_wait): Delete
3125 (prepare_resume_reply): Change prototype to take a
3127 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3128 (last_status, last_ptid): New.
3129 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3130 pid instead of a signal.
3131 (attach_inferior): Remove "status" and "signal" parameters.
3133 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3135 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3136 (handle_v_requests, myresume): Remove "status" and "signal"
3138 (handle_status): New.
3139 (main): Delete local `status'. Adjust.
3140 * remote-utils.c: Include target.h.
3141 (prepare_resume_reply): Change prototype to take a
3142 target_waitstatus. Adjust.
3144 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3146 * spu-low.c (spu_wait): Adjust.
3147 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3149 (win32_wait): Adjust.
3151 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3153 * target.h (struct thread_resume): Delete leave_stopped member.
3154 (struct target_ops): Add a `n' argument to the `resume' callback.
3155 * server.c (start_inferior): Adjust.
3156 (handle_v_cont, myresume): Adjust.
3157 * linux-low.c (check_removed_breakpoint): Adjust to resume
3158 interface change, and to removed leave_stopped field.
3159 (resume_ptr): Delete.
3160 (struct thread_resume_array): New.
3161 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3162 resume interface change.
3163 (linux_continue_one_thread, linux_queue_one_thread)
3164 (resume_status_pending_p): Check if the resume field is NULL
3165 instead of checking the leave_stopped member.
3166 (linux_resume): Adjust to the target resume interface change.
3167 * spu-low.c (spu_resume): Adjust to the target resume interface
3169 * win32-low.c (win32_detach, win32_resume): Ditto.
3171 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3173 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3175 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3177 (linux_continue_one_thread): Only preserve the stepping flag if
3178 there's a pending breakpoint.
3180 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3182 * server.c (main): After the inferior having exited, call
3183 remote_close before exiting gdbserver.
3185 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3187 Fix size of FPSCR in Power 7 processors.
3188 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3189 (PPC_FEATURE_HAS_DFP): New #define.
3190 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3193 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3195 * server.c (handle_query) Whitespace and formatting.
3197 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3199 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3200 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3201 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3202 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3203 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3204 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3205 Makefile.in, configure.ac: Fix whitespace throughout.
3206 * configure: Regenerate.
3208 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3210 * inferiors.c (find_inferior): Make it safe for the callback
3211 function to delete the currently iterated inferior.
3213 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3215 * Makefile.in (linuw_low_h): Move higher.
3216 (thread-db.o): Depend on $(linux_low_h).
3218 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3220 Rename "process" to "lwp" throughout.
3222 * linux-low.c (all_processes): Rename to...
3223 (all_lwps): ... this.
3224 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3225 (add_process): Rename to ...
3226 (add_lwp): ... this. Adjust.
3227 (linux_create_inferior): Adjust.
3228 (linux_attach_lwp): Adjust.
3229 (linux_attach): Adjust.
3230 (linux_kill_one_process): Rename to ...
3231 (linux_kill_one_lwp): ... this. Adjust.
3232 (linux_kill): Adjust.
3233 (linux_detach_one_process): Rename to ...
3234 (linux_detach_one_lwp): ... this. Adjust.
3235 (linux_detach): Adjust.
3236 (check_removed_breakpoint): Adjust.
3237 (status_pending_p): Adjust.
3238 (linux_wait_for_process): Rename to ...
3239 (linux_wait_for_lwp): ... this. Adjust.
3240 (linux_wait_for_event): Adjust.
3241 (send_sigstop): Adjust.
3242 (wait_for_sigstop): Adjust.
3243 (stop_all_processes): Rename to ...
3244 (stop_all_lwps): ... this.
3245 (linux_resume_one_process): Rename to ...
3246 (linux_resume_one_lwp): ... this. Adjust.
3247 (linux_set_resume_request, linux_continue_one_thread)
3248 (linux_queue_one_thread, resume_status_pending_p)
3249 (usr_store_inferior_registers, regsets_store_inferior_registers)
3250 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3252 * linux-low.h (get_process): Rename to ...
3253 (get_lwp): ... this. Adjust.
3254 (get_thread_process): Rename to ...
3255 (get_thread_lwp): ... this. Adjust.
3256 (get_process_thread): Rename to ...
3257 (get_lwp_thread): ... this. Adjust.
3258 (struct process_info): Rename to ...
3259 (struct lwp_info): ... this.
3260 (all_processes): Rename to ...
3261 (all_lwps): ... this.
3262 * proc-service.c (ps_lgetregs): Adjust.
3263 * thread-db.c (thread_db_create_event, find_one_thread)
3264 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3266 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3268 * server.c (handle_query): Handle "qAttached".
3270 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3272 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3273 GPLv3, update license URL.
3275 2009-03-01 Doug Evans <dje@google.com>
3277 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3278 (server_h): Add gdb_signals.h.
3279 (signals.o): Update.
3280 * server.h (target_signal_from_host,target_signal_to_host_p)
3281 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3283 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3285 * remote-utils.c (getpkt): Also generate remote-debug
3286 information if noack_mode is set.
3288 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3290 * server.c (handle_query): Report qXfer:siginfo:read and
3291 qXfer:siginfo:write as supported and handle them.
3292 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3293 * linux-low.c (linux_xfer_siginfo): New.
3294 (linux_target_ops): Set it.
3296 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3298 * server.c (gdbserver_usage): Mention --remote-debug.
3299 (main): Accept '--remote-debug' switch.
3301 2009-01-18 Doug Evans <dje@google.com>
3303 * regcache.c (new_register_cache): No need to check result of xcalloc.
3304 * server.c (handle_search_memory): Back out calls to xmalloc,
3305 result is checked and error is returned to user upon failure.
3306 (handle_query): Ditto. Add more checks for result of malloc.
3307 (handle_v_cont): Check result of malloc, report error back to
3309 (handle_v_run): Ditto. Call freeargv.
3310 * server.h (freeargv): Declare.
3311 * utils.c (freeargv): New fn.
3313 2009-01-15 Doug Evans <dje@google.com>
3315 * gdbreplay.c (perror_with_name): Make arg const char *.
3316 * server.h (target_signal_to_name): Make return type const char *.
3317 * thread-db.c (thread_db_err_str): Make return type const char *.
3318 * utils.c (perror_with_name): Make arg const char *.
3320 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3322 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3323 when handling a EXIT_PROCESS_DEBUG_EVENT.
3325 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3327 * gdbreplay.c (gdbreplay_version): Update copyright year.
3328 * server.c (gdbserver_version): Likewise.
3330 2009-01-05 Doug Evans <dje@google.com>
3332 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3333 (handle_extended_wait): Improve comment.
3335 2008-12-13 Doug Evans <dje@google.com>
3337 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3338 * server.h (ATTR_MALLOC): New macro.
3339 (xmalloc,xcalloc,xstrdup): Declare.
3340 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3341 * inferiors.c: Ditto.
3342 * linux-low.c: Ditto.
3343 * mem-break.c: Ditto.
3344 * regcache.c: Ditto.
3345 * remote-utils.c: Ditto.
3348 * win32-low.c: Ditto.
3350 2008-12-12 Doug Evans <dje@google.com>
3352 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3353 in debugging printf.
3355 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3357 2008-12-09 Doug Evans <dje@google.com>
3359 * linux-low.h (struct process_info): Delete member tid, unused.
3360 * thread-db.c (find_one_thread): Update.
3361 (maybe_attach_thread): Update.
3363 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3365 * target.h (struct target_ops): Add qxfer_osdata member.
3366 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3368 (linux_qxfer_osdata): New functions.
3369 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3371 * server.c (handle_query): Handle "qXfer:osdata:read:".
3372 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3373 (buffer_xml_printf): New functions.
3374 * server.h (struct buffer): New.
3375 (buffer_grow_str, buffer_grow_str0): New macros.
3376 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3377 (buffer_xml_printf): Declare.
3379 2008-11-24 Doug Evans <dje@google.com>
3381 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3383 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3385 * server.c (handle_v_run): Always use the supplied argument list.
3387 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3389 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3390 (xtensa_regmap_table): Add entry for scompare1.
3392 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3394 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3395 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3396 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3397 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3398 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3399 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3400 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3401 XML target descriptions.
3402 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3403 when inferior is running on an ISA 2.05 or later processor. Add
3404 special case to return offset for full 64-bit slot of FPSCR when
3407 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3409 * Makefile.in (SFILES, clean): Added sparc64 files.
3410 (reg-sparc64.o, reg-sparc64.c): New.
3411 * configure.srv (sparc*-*-linux*): New configuration.
3412 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3413 syscall arguments for SPARC.
3414 (regsets_store_inferior_registers): Likewise.
3415 * linux-sparc-low.c: New file.
3417 2008-10-21 Doug Evans <dje@google.com>
3419 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3420 (READLINE_DIR,READLINE_DEP): Delete.
3421 (INTERNAL_CFLAGS): Update.
3422 (LINTFLAGS): Update.
3424 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3426 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3427 whole argv from the last run, not just argv[0].
3429 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3431 * regcache.c (new_register_cache): Return NULL if the register
3432 cache size isn't known yet.
3433 (free_register_cache): Avoid dereferencing a NULL regcache.
3435 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3437 * configure.srv: Merge MIPS and MIPS64.
3439 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3441 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3443 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3445 * Makefile.in: Add required vsx dependencies.
3447 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3448 Declare init_registers_powerpc_vsx32l.
3449 Declare init_registers_powerpc_vsx64l.
3450 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3451 (ppc_arch_setup): Check for VSX in hwcap.
3452 (ppc_fill_vsxregset): New function.
3453 (ppc_store_vsxregset): New function.
3454 Add new VSX entry in regset_info target_regsets.
3456 * configure.srv: Add new VSX dependencies.
3458 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3460 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3461 (remote_open): Set or clear transport_is_reliable.
3462 (putpkt_binary): Don't expect acks in noack mode.
3463 (getpkt): Don't send ack/nac in noack mode.
3464 * server.c (handle_general_set): Handle QStartNoAckMode.
3465 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3467 (main): Reset noack_mode on every connection.
3468 * server.h (noack_mode): Declare.
3470 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3472 * Makefile.in (GDBREPLAY_OBS): New variable.
3473 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3475 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3476 Daniel Jacobowitz <dan@codesourcery.com>
3478 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3479 (usr_store_inferior_registers): Likewise.
3480 (regsets_store_inferior_registers): Likewise.
3482 2008-07-31 Rolf Jansen <rj@surtec.com>
3483 Pedro Alves <pedro@codesourcery.com>
3485 * configure.ac: Check for memmem declaration.
3486 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3487 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3488 (disable_packet_qfThreadInfo): Unconditionally compile.
3489 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3490 * configure, config.in: Regenerate.
3492 2008-07-28 Doug Kwan <dougkwan@google.com>
3494 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3495 (linux_write_memory): Remove declaration of errno.
3497 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3499 * linux-low.c (handle_extended_wait): Do not use "status"
3500 variable uninitialized.
3502 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3504 * server.c (handle_v_attach): Inhibit reporting dll changes.
3506 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3508 * remote-utils.c (prepare_resume_reply): If requested, don't
3509 output "thread:TID" in the T stop reply.
3511 * server.c (disable_packet_vCont, disable_packet_Tthread)
3512 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3513 (handle_query): If requested, disable support for qC, qfThreadInfo
3515 (handle_v_requests): If requested, disable support for vCont.
3516 (gdbserver_show_disableable): New.
3517 (main): Handle --disable-packet and --disable-packet=LIST.
3519 * server.h (disable_packet_vCont, disable_packet_Tthread)
3520 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3522 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3524 * server.c (gdbserver_usage): Mention --version.
3526 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3528 * Makefile.in (gdbreplay.o): New rule.
3530 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3532 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3533 message, not gdbserver.
3535 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3536 Nathan Sidwell <nathan@codesourcery.com>
3537 Joseph Myers <joseph@codesourcery.com>
3539 * acinclude.m4: Include ../../config/acx.m4.
3540 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3541 * configure, config.in: Regenerate.
3542 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3543 * server.c (gdbserver_version): Print PKGVERSION.
3544 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3545 (main): Adjust gdbserver_usage calls.
3546 * gdbreplay.c (version, host_name): Add declarations.
3547 (gdbreplay_version, gdbreplay_usage): New.
3548 (main): Accept --version and --help options.
3550 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3552 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3553 (arm_breakpoint_at): Handle Thumb.
3554 (the_low_target): Add comment.
3556 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3558 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3560 2008-05-09 Doug Evans <dje@google.com>
3562 * server.h (decode_search_memory_packet): Declare.
3563 * remote-utils.c (decode_search_memory_packet): New fn.
3564 * server.c (handle_search_memory_1): New fn.
3565 (handle_search_memory): New fn.
3566 (handle_query): Process qSearch:memory packets.
3568 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3570 * regcache.c (registers_length): Remove.
3571 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3572 full register packet.
3573 * regcache.h (registers_length): Remove prototype.
3574 * server.h (PBUFSIZ): Define to 16384.
3576 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3578 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3579 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3580 powerpc-64l.o, and powerpc-altivec64l.o.
3581 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3582 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3583 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3584 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3585 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3588 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3589 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3590 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3591 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3592 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3593 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3594 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3595 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3596 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3597 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3600 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3601 (init_registers_powerpc_32l): ... this new prototype.
3602 (init_registers_powerpc_32): Remove, replace by ...
3603 (init_registers_powerpc_altivec32l): ... this new prototype.
3604 (init_registers_powerpc_e500): Remove, replace by ...
3605 (init_registers_powerpc_e500l): ... this new prototype.
3606 (init_registers_ppc64): Remove, replace by ...
3607 (init_registers_powerpc_64l): ... this new prototype.
3608 (init_registers_powerpc_64): Remove, replace by ...
3609 (init_registers_powerpc_altivec64l): ... this new prototype.
3610 (ppc_num_regs): Set to 73.
3611 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3612 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3613 (ppc_cannot_store_register): Handle orig_r3 and trap.
3614 (ppc_arch_setup): Update init_registers_... calls.
3615 (ppc_fill_gregset): Handle orig_r3 and trap.
3617 * inferiors.c (clear_inferiors): Reset current_inferior.
3619 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
3621 * acinclude.m4: Add override.m4.
3622 * configure: Regenerate.
3624 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3626 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3627 initial call to init_register_ppc64.
3629 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3631 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3632 powerpc*-*-linux* case.
3633 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3635 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3637 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3638 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3640 * linux-ppc-low.c: Include <elf.h>.
3641 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3642 (ppc_hwcap): New global variable.
3643 (ppc_regmap): Remove __SPE__ #ifdef sections.
3644 (ppc_regmap_e500): New global variable.
3645 (ppc_cannot_store_register): Update __SPE__ special case.
3646 (ppc_get_hwcap): New function.
3647 (ppc_arch_setup): Use it to determine whether inferior supports
3648 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3649 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3650 Do not access registers if target does not support AltiVec.
3651 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3652 Do not access registers if target does not support SPE.
3653 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3655 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3657 * linux-low.c (disabled_regsets, num_regsets): New.
3658 (use_regsets_p): Delete.
3659 (linux_wait_for_process): Clear disabled_regsets.
3660 (regsets_fetch_inferior_registers): Check and set it.
3661 (regsets_store_inferior_registers): Likewise.
3662 (linux_fetch_registers, linux_store_registers): Do not use
3664 (initialize_low): Allocate disabled_regsets.
3666 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3668 * Makefile.in (LIBOBJS): New.
3670 (memmem.o): New rule.
3671 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3672 * configure: Regenerated.
3674 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3676 * server.c (handle_query): Never return "unsupported" for
3677 qXfer:features:read queries.
3679 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3681 * server.c (get_features_xml): Fix inverted condition.
3682 (handle_query): Always support qXfer:feature:read.
3684 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3686 * server.c (wrapper_argv): New.
3687 (start_inferior): Handle wrapper_argv. If set, expect an extra
3689 (gdbserver_usage): Document --wrapper.
3690 (main): Parse --wrapper.
3692 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3694 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3695 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3696 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3697 (ppc_set_pc): Likewise.
3698 (ppc_arch_setup): New function.
3699 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3700 of collect_register.
3701 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
3703 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3705 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3706 instead of linux-ppc64-low.o.
3707 * linux-ppc64-low.c: Remove file.
3708 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3709 (linux-ppc64-low.o): Remove rule.
3711 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3712 (init_registers_powerpc_64): Likewise.
3713 (ppc_regmap): Conditionally define depending on __powerpc64__.
3714 (ppc_cannot_store_register): Do not special-case "fpscr" when
3715 compiled on __powerpc64__.
3716 (ppc_collect_ptrace_register): New function.
3717 (ppc_supply_ptrace_register): New function.
3718 (ppc_breakpoint): Change type to "unsigned int".
3719 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3720 (the_low_target): Conditionally provide initializers for the
3721 arch_setup member depending on __powerpc64__. Install
3722 collect_ptrace_register and supply_ptrace_register members.
3724 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3726 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3727 * server.c (gdbserver_xmltarget): Define.
3728 (get_features_xml): Use it to replace "target.xml" and arch_string.
3730 * configure.srv: Remove srv_xmltarget. Add XML files that were
3731 mentioned there to srv_xmlfiles instead. Remove conditional tests
3732 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3733 srv_xmlfiles and srv_regobj to include all possible choices.
3734 * configure.ac (srv_xmltarget): Remove.
3735 (srv_xmlfiles): Do not add "target.xml".
3736 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3737 checks for supplementary target information.
3738 * configure: Regenerate.
3739 * Makefile.in (XML_TARGET): Remove.
3740 (target.xml): Remove rule.
3741 (clean): Do not clean up target.xml.
3742 (.PRECIOUS): Do not mention target.xml.
3744 * target.h (struct target_ops): Remove arch_string member.
3745 * linux-low.c (linux_arch_string): Remove.
3746 (linux_target_ops): Remove arch_string initializer.
3747 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3748 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3749 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3750 * spu-low.c (spu_arch_string): Remove.
3751 (spu_target_ops): Remove arch_string initializer.
3752 * win32-low.c (win32_arch_string): Remove.
3753 (win32_target_ops): Remove arch_string initializer.
3754 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3755 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3756 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3758 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3760 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3761 by collect_ptrace_register and supply_ptrace_register hooks.
3762 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3763 instead of checking for the_low_target.left_pad_xfer.
3764 (usr_store_inferior_registers): Use collect_ptrace_register callback
3765 instead of checking for the_low_target.left_pad_xfer.
3767 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3768 (s390_supply_ptrace_register): Likewise.
3769 (s390_fill_gregset): Call s390_collect_ptrace_register.
3770 (the_low_target): Update.
3772 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3773 (ppc_supply_ptrace_register): Likewise.
3774 (the_low_target): Update.
3776 * linux-i386-low.c (the_low_target): Update.
3777 * linux-x86-64-low.c (the_low_target): Update.
3779 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3781 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3782 reg-s390.o and reg-s390x.o.
3784 * linux-low.c (new_inferior): New global variable.
3785 (linux_create_inferior, linux_attach): Set it.
3786 (linux_wait_for_process): Call the_low_target.arch_setup after the
3787 target has stopped for the first time.
3788 (initialize_low): Do not call the_low_target.arch_setup.
3790 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3791 (s390_set_pc): Likewise.
3792 (s390_arch_setup): New function.
3793 (the_low_target): Use s390_arch_setup as arch_setup routine.
3795 * regcache.c (realloc_register_cache): New function.
3796 (set_register_cache): Call it for each existing regcache.
3798 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3800 * server.h (init_registers): Remove prototype.
3802 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3803 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3804 instead of init_registers ().
3805 * linux-arm-low.c (init_registers_arm): Add prototype.
3806 (init_registers_arm_with_iwmmxt): Likewise.
3807 (the_low_target): Add initializer for arch_setup field.
3808 * linux-cris-low.c (init_registers_cris): Add prototype.
3809 (the_low_target): Add initializer for arch_setup field.
3810 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3811 (the_low_target): Add initializer for arch_setup field.
3812 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3813 (the_low_target): Add initializer for arch_setup field.
3814 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3815 (the_low_target): Add initializer for arch_setup field.
3816 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3817 (the_low_target): Add initializer for arch_setup field.
3818 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3819 (the_low_target): Add initializer for arch_setup field.
3820 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3821 (init_registers_mips64_linux): Likewise.
3822 (the_low_target): Add initializer for arch_setup field.
3823 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3824 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3825 (the_low_target): Add initializer for arch_setup field.
3826 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3827 (init_registers_powerpc_64): Likewise.
3828 (the_low_target): Add initializer for arch_setup field.
3829 * linux-s390-low.c (init_registers_s390): Add prototype.
3830 (init_registers_s390x): Likewise.
3831 (the_low_target): Add initializer for arch_setup field.
3832 * linux-sh-low.c (init_registers_sh): Add prototype.
3833 (the_low_target): Add initializer for arch_setup field.
3834 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3835 (the_low_target): Add initializer for arch_setup field.
3836 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3837 (the_low_target): Add initializer for arch_setup field.
3839 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3840 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3841 instead of init_registers ().
3842 * win32-arm-low.c (init_registers_arm): Add prototype.
3843 (the_low_target): Add initializer for arch_setup field.
3844 * win32-i386-low.c (init_registers_i386): Add prototype.
3845 (the_low_target): Add initializer for arch_setup field.
3847 * spu-low.c (init_registers_spu): Add prototype.
3848 (initialize_low): Call initialie_registers_spu () instead of
3849 initialize_registers ().
3851 2008-02-19 Pedro Alves <pedro@codesourcery.com>
3853 * server.c (handle_v_requests): When handling the vRun and vAttach
3854 packets, if already debugging a process, don't kill it. Return an
3857 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3859 * server.c (handle_query): Correct length check.
3861 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3863 * win32-low.c (do_initial_child_stuff): Add process handle
3864 parameter. Set current_process_handle and current_process_id from the
3865 parameters. Clear globals.
3866 (win32_create_inferior): Don't set current_process_handle and
3867 current_process_id here. Instead pass them on the call to
3868 do_initial_child_stuff.
3869 (win32_attach): Likewise.
3870 (win32_clear_inferiors): New.
3871 (win32_kill): Don't close the current process handle or the
3872 current thread handle here. Instead call win32_clear_inferiors.
3873 (win32_detach): Don't open a new handle to the process. Call
3874 win32_clear_inferiors.
3875 (win32_join): Don't rely on current_process_handle; open a new
3876 handle using the process id.
3877 (win32_wait): Call win32_clear_inferiors when the inferior process
3880 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3882 * server.c (monitor_show_help): Add "exit".
3884 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3886 * Makefile.in (SFILES): Add linux-xtensa-low.c.
3887 (clean): Add reg-xtensa.c.
3888 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3889 * configure.srv (xtensa*-*-linux*) New target.
3890 * linux-xtensa-low.c: New.
3891 * xtensa-xtregs.c: New.
3893 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3895 * hostio.c: Don't include errno.h.
3896 (errno_to_fileio_errno): Move to hostio-errno.
3897 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3898 error number outputting to the target->hostio_last_error callback.
3899 (hostio_packet_error): Use FILEIO_EINVAL directly.
3900 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3901 calls to hostio_error.
3902 * hostio-errno.c: New.
3903 * server.h (hostio_last_error_from_errno): Declare.
3904 * target.h (target_ops): Add hostio_last_error member.
3905 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3906 as hostio_last_error handler.
3907 * spu-low.c (spu_target_ops): Likewise.
3908 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3909 (wince_hostio_last_error): New functions.
3910 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3911 as hostio_last_error handler.
3912 (win32_target_ops) [!_WIN32_WCE]: Register
3913 hostio_last_error_from_errno as hostio_last_error handler.
3914 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3915 (hostio-errno.o): New rule.
3916 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3917 * configure.srv (srv_hostio_err_objs): New variable. Default to
3919 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3920 * configure: Regenerate.
3922 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3924 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3925 (linux_kill, linux_detach): Clean up the process list.
3926 * remote-utils.c (remote_open): Improve port number parsing.
3927 (putpkt_binary, input_interrupt): Only send interrupts if the target
3929 * server.c (extended_protocol): Make static.
3930 (attached): Define earlier.
3931 (exit_requested, response_needed, program_argv): New variables.
3932 (target_running): New.
3933 (start_inferior): Clear attached here.
3934 (attach_inferior): Set attached here.
3935 (require_running): Define.
3936 (handle_query): Use require_running and target_running. Implement
3938 (handle_v_attach, handle_v_run): New.
3939 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3940 (gdbserver_usage): Update.
3941 (main): Redo argument parsing. Handle --debug and --multi. Handle
3942 --attach along with other options or after the port. Save
3943 program_argv. Support no initial program. Resynchronize
3944 communication with GDB after an error. Handle "monitor exit".
3945 Use require_running and target_running. Always allow the extended
3946 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3947 restart in extended mode.
3948 * README: Refer to the GDB manual. Update --attach usage.
3950 2007-12-20 Andreas Schwab <schwab@suse.de>
3952 * linux-low.c (STACK_SIZE): Define.
3953 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3954 (linux_test_for_tracefork): Likewise.
3956 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3958 * linux-low.c (linux_wait_for_event): Update messages. Do not
3959 reinsert auto-delete breakpoints.
3960 * mem-break.c (struct breakpoint): Change return type of handler to
3962 (set_breakpoint_at): Update handler type.
3963 (reinsert_breakpoint_handler): Return 1 instead of calling
3965 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3967 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3968 * mem-break.h (set_breakpoint_at): Update handler type.
3969 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3970 * win32-low.c (auto_delete_breakpoint): New.
3971 (get_child_debug_event): Use it.
3973 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3975 * configure.ac: Check for pread and pwrite.
3976 * hostio.c (handle_pread): Fall back to lseek and read.
3977 (handle_pwrite): Fall back to lseek and write.
3978 * config.in, configure: Regenerated.
3980 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3982 * server.c (myresume): Add own_buf argument.
3983 (main): Update calls.
3985 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3987 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3988 * remote-utils.c (remote_open): Do not call disable_async_io.
3989 (block_async_io): Delete.
3990 (unblock_async_io): Make static.
3991 (initialize_async_io): New.
3992 * server.c (handle_v_cont): Handle async I/O here.
3993 (myresume): Likewise. Move other common resume tasks here...
3994 (main): ... from here. Call initialize_async_io. Disable async
3995 I/O before the main loop.
3996 * server.h (initialize_async_io): Declare.
3997 (block_async_io, unblock_async_io): Delete prototypes.
3998 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4000 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4002 * remote-utils.c (readchar): Allow binary data in received messages.
4004 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4006 * win32-low.c (attaching): New global.
4007 (win32_create_inferior): Clear the `attaching' global.
4008 (win32_attach): Set the `attaching' global.
4009 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4010 attaching. Only set a breakpoint at the entry point if not
4013 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4015 * server.c (main): Don't report dll events on the initial
4016 connection on attaches.
4018 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4020 * server.c (main): Relax numerical bases supported for the pid of
4021 the --attach command line argument.
4023 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4025 * win32-low.c (win32_attach): Call OpenProcess before
4026 DebugActiveProcess, not after. Add last error output to error
4029 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4031 * win32-low.c (win32_get_thread_context)
4032 (win32_set_thread_context): New functions.
4033 (thread_rec): Use win32_get_thread_context.
4034 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4035 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4038 2007-12-03 Leo Zayas
4039 Pedro Alves <pedro_alves@portugalmail.pt>
4041 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4043 (child_add_thread): Minor cleanup.
4044 (child_continue): Resume artificially suspended threads before
4045 calling ContinueDebugEvent.
4046 (suspend_one_thread): New.
4047 (fake_breakpoint_event): New.
4048 (get_child_debug_event): Change return type to int. Check here if
4049 gdb sent an interrupt request. If a soft interrupt was requested,
4050 fake a breakpoint event. Return 0 if there is no event to handle,
4052 (win32_wait): Don't check here if gdb sent an interrupt request.
4053 Ensure there is a valid event to handle.
4054 (win32_request_interrupt): Add soft interruption method as last
4057 2007-12-03 Leo Zayas
4058 Pedro Alves <pedro_alves@portugalmail.pt>
4060 * win32-low.h (win32_thread_info): Add descriptions to the
4061 structure members. Replace `suspend_count' counter by a
4063 * win32-low.c (thread_rec): Update condition of when to get the
4064 context from the inferior. Rely on ContextFlags being set if it
4065 has already been retrieved. Only suspend the inferior thread if
4066 we haven't already. Warn if that fails.
4067 (continue_one_thread): s/suspend_count/suspended/. Only call
4068 ResumeThread once. Warn if that fails.
4070 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4072 * win32-low.c (win32_wait): Don't read from the inferior when it
4075 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4077 * Makefile.in (win32_low_h): New variable.
4078 (win32-low.o): Add dependency on $(win32_low_h).
4079 (win32-arm-low.o, win32-i386-low.o): New rules.
4081 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4083 * hostio.c: Correct copyright year.
4085 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4087 * Makefile.in (OBS): Add hostio.o.
4088 (hostio.o): New rule.
4089 * server.h (handle_vFile): Declare.
4090 * hostio.c: New file.
4091 * server.c (handle_v_requests): Take packet_len and new_packet_len
4092 for binary packets. Call handle_vFile.
4093 (main): Update call to handle_v_requests.
4095 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4097 * linux-low.c: Include <sched.h>.
4099 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4101 * linux-low.c (linux_tracefork_grandchild): New.
4102 (linux_tracefork_child): Use clone.
4103 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4105 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4107 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4109 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4111 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4113 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4115 * inferiors.c (change_inferior_id): Delete.
4116 (add_pid_to_list, pull_pid_from_list): New.
4117 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4118 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4119 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4120 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4121 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4122 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4123 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4124 (using_threads): Always set to 1.
4125 (handle_extended_wait): New.
4126 (add_process): Do not set TID.
4127 (linux_create_inferior): Set must_set_ptrace_flags.
4128 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4129 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4130 (linux_thread_alive): Rename TID argument to LWPID.
4131 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4132 (linux_wait_for_event): Do not use TID or check using_threads. Update
4133 call to dead_thread_notify. Call handle_extended_wait.
4134 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4135 (send_sigstop): Delete sigstop_sent.
4136 (wait_for_sigstop): Avoid TID.
4137 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4138 (linux_test_for_tracefork): New.
4139 (linux_lookup_signals): Use thread_db_active and
4140 linux_supports_tracefork_flag.
4141 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4142 * linux-low.h (get_process_thread): Avoid TID.
4143 (struct process_ifo): Move thread_known and tid to the end. Remove
4145 (linux_attach_lwp, thread_db_init): Update prototypes.
4146 * server.h (change_inferior_id): Delete prototype.
4147 (add_pid_to_list, pull_pid_from_list): New prototypes.
4148 * thread-db.c (thread_db_use_events): New.
4149 (find_first_thread): Rename to...
4150 (find_one_thread): ...this. Update callers and messages. Do not
4151 call fatal. Check thread_db_use_events. Do not call
4152 change_inferior_id or new_thread_notify.
4153 (maybe_attach_thread): Update. Do not call new_thread_notify.
4154 (thread_db_init): Set thread_db_use_events. Check use_events.
4155 * utils.c (fatal, warning): Correct message prefix.
4157 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4159 * Makefile.in (clean): Remove new files.
4160 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4161 (powerpc-64.o, powerpc-64.c): New rules.
4162 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4163 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4165 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4167 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4168 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4169 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4170 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4171 (target_regsets): Add AltiVec and SPE register sets.
4172 * configure.ac: Check for AltiVec and SPE.
4173 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4174 (ppc_fill_vrregset, ppc_store_vrregset): New.
4175 (target_regsets): Add AltiVec register set.
4176 * configure: Regenerated.
4178 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4180 * linux-low.c (O_LARGEFILE): Define.
4181 (linux_read_memory): Use /proc/PID/mem.
4182 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4183 * configure, config.in: Regenerated.
4185 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4187 * linux-low.c (linux_wait_for_event): Do not pass signals while
4190 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4192 * win32-low.c (create_process): New.
4193 (win32_create_inferior): Use create_process instead of
4194 CreateProcess. If create_process failed retry appending an ".exe"
4195 suffix. Store the GetLastError result immediatelly after
4196 create_process calls and use it on the call to error.
4198 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4200 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4202 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4204 * configure.ac: Switch license to GPLv3.
4206 2007-08-01 Michael Snyder <msnyder@access-company.com>
4208 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4210 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4212 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4214 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4215 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4216 CloseToolhelp32Snapshot.
4217 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4218 CloseToolhelp32Snapshot.
4220 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4222 * server.c (main): Check for inferior exit before main loop.
4224 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4226 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4227 instead of on tmp_desc.
4229 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4230 Daniel Jacobowitz <dan@codesourcery.com>
4232 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4233 (add_thread): Minor cleanups.
4234 (clear_inferiors): Move lower in the file. Clear the DLL
4236 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4237 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4238 (xml_escape_text): New.
4239 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4241 (handle_v_cont): Report errors.
4242 (gdbserver_version): Update.
4243 (main): Correct size of own_buf. Do not report initial DLL events.
4244 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4245 (unloaded_dll, xml_escape_text): New.
4246 * win32-low.c (enum target_waitkind): Update comments.
4247 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4248 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4249 (win32_EnumProcessModules, win32_GetModuleInformation)
4250 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4251 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4252 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4253 (win32_Module32First, win32_Module32Next, load_toolhelp)
4254 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4255 (get_child_debug_event): Handle DLL events.
4256 (win32_wait): Likewise.
4258 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4260 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4261 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4263 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4265 * win32-low.c (handle_output_debug_string): Ignore event if not
4268 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4270 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4272 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4274 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4276 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4278 * inferiors.c (change_inferior_id): Add comment.
4279 * linux-low.c (check_removed_breakpoint): Add an early
4280 prototype. Improve debug output.
4281 (linux_attach): Doc update.
4282 (linux_detach_one_process, linux_detach): Clean up before releasing
4284 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4285 * linux-low.h (struct process_info): Doc improvement.
4286 * mem-break.c (delete_all_breakpoints): New.
4287 * mem-break.h (delete_all_breakpoints): New prototype.
4288 * thread-db.c (find_first_thread): New.
4289 (thread_db_create_event): Call it instead of
4290 thread_db_find_new_threads. Clean up unused variables.
4291 (maybe_attach_thread): Remove first thread handling.
4292 (thread_db_find_new_threads): Use find_first_thread.
4293 (thread_db_get_tls_address): Likewise.
4295 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4297 * thread-db.c (thread_db_find_new_threads): Add prototype.
4298 (thread_db_create_event): Check for the main thread before adding
4300 (maybe_attach_thread): Only enable event reporting if TID == 0.
4301 (thread_db_get_tls_address): Check for new threads.
4303 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4305 * linux-low.c (linux_create_inferior): Try execv before execvp.
4306 * spu-low.c (spu_create_inferior): Likewise.
4308 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4310 * linux-low.c (linux_create_inferior): Change execv to execvp.
4311 * spu-low.c (spu_create_inferior): Likewies.
4313 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4315 * Makefile.in (clean): Clean new files instead of deleted ones.
4316 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4317 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4319 * configure.srv: Specify XML files and new regformats for MIPS and
4321 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4322 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4323 an entry for the restart register.
4324 (mips_cannot_fetch_register, mips_cannot_store_register)
4325 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4326 register names to match the XML descriptions.
4327 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4328 restart register instead of $0.
4330 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4331 Markus Deuling <deuling@de.ibm.com>
4333 * remote-utils.c (decode_xfer_write): New function.
4334 * server.h (decode_xfer_write): Add prototype.
4335 * server.c (handle_query): Add PACKET_LEN argument. Support
4336 qXfer:spu:read and qXfer:spu:write packets.
4337 (main): Pass packet_len to handle_query.
4338 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4339 * target.h (target_ops): Add qxfer_spu.
4341 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4343 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4344 accessing non-seekable spufs files.
4346 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4348 * server.c (handle_query): Add reply for qC packet.
4350 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4351 Leo Zayas <lerele@champenstudios@com>
4353 * server.h (check_remote_input_interrupt_request): New function.
4354 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4355 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4356 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4357 (check_remote_input_interrupt_request): New function.
4358 * server.h (check_remote_input_interrupt_request): Declare.
4359 * win32-low.c (winapi_DebugBreakProcess,
4360 winapi_GenerateConsoleCtrlEvent): New typedefs.
4361 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4363 (win32_wait): Check for remote interrupt request
4364 with check_remote_input_interrupt_request.
4365 (win32_request_interrupt): New function.
4366 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4368 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4370 * win32-low.c (debug_registers_changed,
4371 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4372 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4373 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4374 (thread_rec): Get context using the low target.
4375 (child_add_thread): Call thread_added on the low target,
4376 which does the same thing.
4378 (do_initial_child_stuff): Remove debug registers references.
4379 Set context using the low target. Resume threads after
4380 setting the contexts.
4381 (child_continue): Remove dead variable. Remove debug
4382 registers references.
4383 (child_fetch_inferior_registers): Go through the low target.
4384 (do_child_store_inferior_registers): Remove.
4385 (child_store_inferior_registers): Go through the low target.
4386 (win32_resume): Remove debug registers references.
4387 Set context using the low target.
4388 (handle_exception): Change return type to void. Don't record
4389 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4390 first chance exception.
4391 (get_child_debug_event): Change return type to void. Remove
4392 goto loop. Always return after waiting for debug event.
4393 (win32_wait): Convert to switch statement. Handle spurious
4396 * win32-i386-low.c (debug_registers_changed,
4397 debug_registers_used): New.
4398 (initial_stuff): Rename to ...
4399 (i386_initial_stuff): ... this. Clear debug registers
4401 (store_debug_registers): Delete.
4402 (i386_get_thread_context): New.
4403 (load_debug_registers): Delete.
4404 (i386_set_thread_context): New.
4405 (i386_thread_added): New.
4406 (single_step): Rename to ...
4407 (i386_single_step): ... this.
4408 (do_fetch_inferior_registers): Rename to ...
4409 (i386_fetch_inferior_register): ... this.
4410 (i386_store_inferior_register): New.
4411 (the_low_target): Adapt to new interface.
4413 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4414 (arm_get_thread_context): New.
4415 (arm_set_thread_context): New.
4417 (do_fetch_inferior_registers): Rename to ...
4418 (arm_fetch_inferior_register): ... this.
4419 (arm_store_inferior_register): New.
4420 (arm_wince_breakpoint): Reimplement as unsigned long.
4421 (arm_wince_breakpoint_len): Define.
4422 (the_low_target): Adapt to new interface.
4424 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4425 load_debug_registers. Add get_thread_context, set_thread_context,
4426 thread_added and store_inferior_register. Rename
4427 fetch_inferior_registers to fetch_inferior_register.
4428 (regptr): Remove declaration.
4430 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4432 * linux-low.c (linux_detach): Change return type to int. Return 0.
4433 * spu-low.c (spu_detach): Likewise.
4435 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4437 * target.h (target_ops): Change return type of detach to int.
4439 (join_inferior): New.
4440 * server.c (main): Don't skip detach support on mingw32.
4441 If the inferior doesn't support detaching return error.
4442 Call join_inferior instead of using waitpid.
4443 * linux-low.c (linux_join): New.
4444 (linux_target_op): Add linux_join.
4445 * spu-low.c (spu_join): New.
4446 (spu_target_ops): Add spu_join.
4447 * win32-low.c (win32_detach): Adapt to new interface.
4448 Reopen current_process_handle before detaching. Issue a child
4449 resume before detaching.
4451 (win32_target_op): Add win32_join.
4453 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4455 * win32-low.c (win32-attach): Fix return value.
4456 * target.h (target_ops): Describe ATTACH return values.
4458 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4460 * win32-low.c (GETPROCADDRESS): Define.
4461 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4462 (winapi_DebugSetProcessKillOnExit): Likewise.
4463 (win32_create_inferior): Force usage of ansi CreateProcessA.
4464 (win32_attach): Use GETPROCADDRESS.
4465 (win32_detach): Likewise.
4467 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4469 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4471 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4473 * win32-low.c: Commit leftover changes from 2007-03-29.
4475 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4477 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4478 fields short instead of int. Add explicit padding.
4479 (i387_cache_to_fsave): Remove unnecessary casts.
4480 (i387_fsave_to_cache): Doc fix.
4481 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4483 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4485 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4486 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4488 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4490 * configure.srv (arm*-*-mingw32ce*): Move near the other
4493 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4495 * configure.ac: Add errno checking.
4496 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4497 sys/file.h and malloc.h.
4498 (AC_CHECK_DECLS): Add perror.
4499 (srv_mingwce): Handle.
4500 * configure.srv (i[34567]86-*-cygwin*): Add
4501 win32-i386-low.o to srv_tgtobj.
4502 (i[34567]86-*-mingw*): Likewise.
4503 (arm*-*-mingw32ce*): Add case.
4504 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4505 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4506 [__MINGW32CE__] (strerror): New function.
4507 [__MINGW32CE__] (errno): Define to GetLastError.
4508 [__MINGW32CE__] (COUNTOF): New macro.
4509 (remote_open): Remove extra close call.
4510 * mem-break.c (delete_breakpoint_at): New function.
4511 * mem-break.h (delete_breakpoint_at): Declare.
4512 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4513 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4514 [USE_WIN32API] (read, write): Add char* casts.
4515 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4516 * server.h: Include wincecompat.h on Windows CE.
4517 [HAVE_ERRNO_H]: Check.
4518 (perror): Declare if not declared.
4519 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4520 (perror_with_name): Remove errno declaration.
4521 * wincecompat.h: New.
4522 * wincecompat.c: New.
4524 * win32-arm-low.c: New.
4525 * win32-i386-low.c: New.
4526 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4527 (OUTMSG2): Make it safe.
4529 (COUNTOF): New macro.
4530 (NUM_REGS): Get it from the low target.
4531 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4532 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4533 (thread_rec): Let low target handle debug registers.
4534 (child_add_thread): Likewise.
4535 (child_init_thread_list): Likewise.
4536 (continue_one_thread): Likewise.
4538 (do_child_fetch_inferior_registers): Move to ...
4539 * win32-i386-low.c: ... here, and rename to ...
4540 (do_fetch_inferior_registers): ... this.
4541 * win32-low.c (child_fetch_inferior_registers):
4542 Go through the low target.
4543 (do_child_store_inferior_registers): Use regptr.
4544 (strwinerror): New function.
4545 (win32_create_inferior): Handle Windows CE.
4546 Use strwinerror instead of strerror on Windows error
4547 codes. Add program to the error output.
4548 Don't close the main thread handle on Windows CE.
4549 (win32_attach): Use coredll.dll on Windows CE.
4550 (win32_kill): Close current process and current
4552 (win32_detach): Use coredll.dll on Windows CE.
4553 (win32_resume): Let low target handle debug registers, and
4555 (handle_exception): Add/Remove initial breakpoint. Avoid
4556 non-existant WSTOPSIG on Windows CE.
4557 (win32_read_inferior_memory): Cast to remove warning.
4558 (win32_arch_string): Go through the low target.
4559 (initialize_low): Call set_breakpoint_data with the low
4560 target's breakpoint.
4561 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4562 FOP_REGNUM, mappings): Move to ...
4563 * win32-i386-low.c: ... here.
4564 * win32-low.c (win32_thread_info): Move to ...
4565 * win32-low.h: ... here.
4566 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4567 win32-arm-low.c and wincecompat.c.
4568 (all:): Add $EXEEXT.
4569 (install-only:): Likewise.
4570 (gdbserver:): Likewise.
4571 (gdbreplay:): Likewise.
4572 * config.in: Regenerate.
4573 * configure: Regenerate.
4575 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4577 * win32-low.c: Rename typedef thread_info to
4578 win32_thread_info throughout.
4580 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4582 * win32-i386-low.c: Rename to ...
4583 * win32-low.c: ... this.
4584 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4585 * Makefile.in: Likewise.
4587 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4589 * remote-utils.c (monitor_output): Constify msg parameter.
4590 * server.h (monitor_output): Likewise.
4591 * win32-i386-low.c (handle_output_debug_string): New.
4592 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4593 handle_output_debug_string.
4594 (get_child_debug_event): Likewise.
4596 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4598 * server.c (main): Correct strtoul check.
4600 2007-03-27 Jon Ringle <jon@ringle.org>
4602 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4604 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4606 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4608 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4610 * terminal.h: Check HAVE_SGTTY_H.
4612 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
4614 * remote-utils.c (remote_open): Print out the assigned port number.
4616 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4618 * remote-utils.c (monitor_output): New function.
4619 * server.c (debug_threads): Define here.
4620 (monitor_show_help): New function.
4621 (handle_query): Handle qRcmd.
4622 (main): Do not handle 'd' packet.
4623 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4624 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4627 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4629 * Makefile.in (EXEEXT): New.
4630 (clean): Use $(EXEEXT).
4632 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4634 * target.h (target_ops): Rename send_signal to request_interrupt,
4635 and remove enum target_signal parameter.
4636 * linux-low.c (linux_request_interrupt): Rename from
4637 linux_send_signal, and always send SIGINT.
4638 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4639 and always send SIGINT.
4640 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4642 (input_interrupt): Likewise.
4644 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4646 * server.c (get_features_xml): Check if target implemented
4648 * win32-i386-low.c (win32_arch_string): New.
4649 (win32_target_ops): Add win32_arch_string as arch_string member.
4651 2007-02-22 Markus Deuling <deuling@de.ibm.com>
4653 * spu-low.c (spu_arch_string): New.
4654 (spu_target_ops): Add spu_arch_string.
4656 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4658 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4659 * configure.ac: Do not check for terminal.h.
4660 * configure, config.in: Regenerated.
4662 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4664 * Makefile.in (OBS): Add $(XML_BUILTIN).
4665 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4667 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4668 (arm-with-iwmmxt.c): New.
4669 * config.in, configure: Regenerate.
4670 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4671 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4672 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4673 (arm*-*-linux*): Add iWMMXt and regset support.
4674 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4675 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4676 (arm_store_wmmxregset, target_regsets): New.
4677 * server.c (get_features_xml): Take annex argument. Check builtin
4679 (handle_query): Handle multiple annexes.
4681 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4683 * remote-utils.c [USE_WIN32API] (read, write): Define.
4684 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4687 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4689 * linux-i386-low.c (the_low_target): Set arch_string.
4690 * linux-x86-64-low.c (the_low_target): Likewise.
4691 * linux-low.c (linux_arch_string): New.
4692 (linux_target_ops): Add it.
4693 * linux-low.h (struct linux_target_ops): Add arch_string.
4694 * server.c (write_qxfer_response): Use const void * for DATA.
4695 (get_features_xml): New.
4696 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4697 * target.h (struct target_ops): Add arch_string method.
4699 2007-01-03 Denis Pilat <denis.pilat@st.com>
4700 Daniel Jacobowitz <dan@codesourcery.com>
4702 * linux-low.c (linux_kill): Handle being called with no threads.
4703 * win32-i386-low.c (win32_kill): Likewise.
4704 (get_child_debug_event): Clear current_process_handle.
4706 2006-12-30 Denis PILAT <denis.pilat@st.com>
4707 Daniel Jacobowitz <dan@codesourcery.com>
4709 * remote-utils.c (remote_open): Check the type of specified
4710 serial port devices before opening them.
4711 * server.c (main): Kill the inferior if an error occurs during
4712 the first remote_open.
4714 2006-12-05 Markus Deuling <deuling@de.ibm.com>
4716 * README: Update supported targets.
4718 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4720 * Makefile.in (clean): Remove reg-mips64.c.
4721 (reg-mips64.c, reg-mips64.o): New rules.
4722 * configure.srv: Handle mips64. Include regset support for mips.
4723 * linux-mips-low.c (union mips_register): New.
4724 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4725 (mips_breakpoint, mips_breakpoint_at): Use int.
4726 (mips_collect_register, mips_supply_register)
4727 (mips_collect_register_32bit, mips_supply_register_32bit)
4728 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4729 (mips_store_fpregset, target_regsets): New.
4730 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4732 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4734 * configure.srv: Add target "spu*-*-*".
4735 * Makefile.in (clean): Remove reg-spu.c.
4736 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4737 * spu-low.c: New file.
4739 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4741 * configure.ac: Correct td_thr_tls_get_addr test.
4742 * configure: Regenerated.
4744 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4746 * linux-low.c (linux_wait_for_event): Reformat. Use the
4748 * remote-utils.c (decode_address_to_semicolon): New.
4749 * server.c (pass_signals, handle_general_set): New.
4750 (handle_query): Mention QPassSignals for qSupported.
4751 (main): Call handle_general_set.
4752 * server.h (pass_signals, decode_address_to_semicolon): New.
4754 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4756 * server.c (handle_query): Correct error handling for read_auxv.
4758 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4760 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4761 and srv_linux_thread_db to yes.
4762 * linux-s390-low.c (s390_fill_gregset): New function.
4763 (target_regsets): Define data structure.
4765 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4767 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4768 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4769 * config.in, configure: Regenerated.
4770 * inferiors.c (gdb_id_to_thread): New function.
4771 (gdb_id_to_thread_id): Use it.
4772 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4773 * linux-low.h (struct process_info): Add th member.
4774 (thread_db_get_tls_address): New prototype.
4775 * remote-utils.c (decode_address): Make non-static.
4776 * server.c (handle_query): Handle qGetTLSAddr.
4777 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4778 * target.h (struct target_ops): Add get_tls_address.
4779 * thread-db.c (maybe_attach_thread): Save the thread handle.
4780 (thread_db_get_tls_address): New.
4782 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4784 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4785 (linux_resume_one_process): Take a siginfo_t *. Update all
4786 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4787 (struct pending_signals): Add a siginfo_t.
4788 (linux_wait_for_process): Always set last_status.
4789 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4790 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4791 * linux-low.h (struct process_info): Add last_status.
4793 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4795 * remote-utils.c (try_rle): New function.
4796 (putpkt_binary): Use it.
4798 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4800 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4801 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4802 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4803 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4804 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4807 2006-08-08 Richard Sandiford <richard@codesourcery.com>
4809 * server.c (terminal_fd): New variable.
4810 (old_foreground_pgrp): Likewise.
4811 (restore_old_foreground_pgrp): New function.
4812 (start_inferior): Record the terminal file descriptor in terminal_fd
4813 and its original foreground group in old_foreground_pgrp. Register
4814 restore_old_foreground_pgrp with atexit().
4816 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4818 * server.c (handle_query): Correct qPart to qXfer.
4820 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4822 * configure.ac: Check for more headers which are missing on
4823 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4824 * configure.srv: Add Cygwin and mingw32.
4825 * remote-utils.c: Don't include headers unconditionally which
4826 are missing on mingw32. Include <winsock.h> for mingw32.
4827 (remote_open): Adjust for mingw32 support. Flush
4828 standard error after writing to it.
4829 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4830 (unblock_async_io, enable_async_io, disable_async_io)
4831 (readchar, getpkt): Update for Winsock support.
4832 (prepare_resume_reply): Expect a protocol signal number.
4833 * server.c: Disable <sys/wait.h> on mingw32.
4834 (start_inferior): Adjust for mingw32 support. Flush
4835 standard error after writing to it.
4836 (attach_inferior): Likewise. Use protocol signal
4838 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4840 * win32-i386-low.c: New file.
4841 * Makefile.in (XM_CLIBS): Set.
4842 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4843 (win32-i386-low.o): New dependency rule.
4844 * linux-low.c (linux_wait): Use target signal numbers.
4845 * target.h (struct target_ops): Doc fix.
4846 * server.h (target_signal_to_name): New prototype.
4847 * gdbreplay.c: Don't include headers unconditionally which
4848 are missing on mingw32. Include <winsock.h> for mingw32.
4849 (remote_close, remote_open): Adjust for Winsock support.
4850 * configure, config.in: Regenerated.
4852 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4854 * server.c (decode_xfer_read, write_qxfer_response): New.
4855 (handle_query): Take a packet length argument. Handle
4856 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4857 the qSupported response.
4858 (main): Update call to handle_query.
4860 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4862 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4863 (putpkt_binary): Renamed from putpkt and adjusted for binary
4865 (putpkt): New wrapper for putpkt_binary.
4866 (readchar): Don't mask off the high bit.
4867 (decode_X_packet): New function.
4868 * server.c (main): Call putpkt_binary if a handler sets the packet
4869 length. Save the length of the incoming packet. Handle 'X'.
4870 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4872 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4874 * server.c (handle_query): Handle qSupported.
4876 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4878 * remote-utils.c (all_symbols_looked_up): New variable.
4879 (look_up_one_symbol): Check it.
4880 * server.h (look_up_one_symbol): New declaration.
4881 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4883 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4885 * Makefile.in (linux-arm-low.o): Update dependencies.
4886 * linux-arm-low.c: Include "gdb_proc_service.h".
4887 (PTRACE_GET_THREAD_AREA): Define.
4888 (ps_get_thread_area): New function.
4890 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4892 * configure.srv (m68k*-*-uclinux*): New target.
4893 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4894 (linux_resume_one_process): Remove extraneous cast.
4895 (linux_read_offsets): New.
4896 (linux_target_op): Add linux_read_offsets on mmuless systems.
4897 * server.c (handle_query): Add qOffsets logic.
4898 * target.h (struct target_ops): Add read_offsets.
4900 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4902 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4903 (PTRACE_GET_THREAD_AREA): Define.
4904 (ps_get_thread_area): New function.
4905 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4906 (linux-x86-64-low.o): Update.
4908 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4910 * configure.ac: Remove checks for prfpregset_t.
4911 * gdb_proc_service.h: New file.
4912 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4913 new "gdb_proc_service.h".
4914 * proc-service.c: Likewise.
4915 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4916 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4917 * Makefile.in (gdb_proc_service_h): Updated.
4918 * configure, config.in: Regenerated.
4920 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4922 * remote-utils.c (prepare_resume_reply): Move declaration
4923 of gdb_id_from_wait to the top of the block.
4925 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4927 * linux-low.c (regsets_store_inferior_registers): Read the regset
4928 from the target before filling it.
4930 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4932 * server.c (attach_inferior): Return SIGTRAP for a successful
4935 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4937 * Makefile.in (OBS): Add version.o.
4938 (STAGESTUFF): Delete.
4939 (version.o): Add dependencies.
4940 (version.c): Replace rule.
4941 (clean): Remove version.c.
4942 * server.c (gdbserver_version): New.
4943 (gdbserver_usage): Use printf.
4944 (main): Handle --version and --help.
4945 * server.h (version, host_name): Add declarations.
4947 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4959 * linux-x86-64-low.c:
4962 * linux-ppc64-low.c:
4971 * linux-crisv32-low.c:
4983 * gdbserver.1: Add (C) after Copyright. Update the FSF
4986 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4988 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4989 (arm_breakpoint_at): Recognize both breakpoints.
4990 (the_low_target): Use the correct breakpoint instruction.
4992 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4994 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4995 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4996 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4997 (the_low_target): Update.
4999 2005-10-25 Andreas Schwab <schwab@suse.de>
5001 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5003 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5004 (ia64_num_regs): Reduce to 462.
5006 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5008 * acinclude.m4: Correct quoting.
5009 * aclocal.m4: Regenerated.
5011 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5012 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5013 (thread_db_init): Call thread_db_err_str.
5014 * configure.ac: Check for TD_VERSION.
5015 * config.in, configure: Regenerated.
5017 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5019 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5021 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5023 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5024 is not available. Define HAVE_PTRACE_GETREGS if it is.
5025 * config.in, configure: Regenerated.
5026 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5027 * linux-i386-low.c, linux-m68k-low.c: Update to use
5028 HAVE_PTRACE_GETREGS.
5029 * linux-low.c (regsets_fetch_inferior_registers)
5030 (regsets_store_inferior_registers): Only return 0 if we processed
5032 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5033 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5035 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5037 * inferiors.c (struct thread_info): Add gdb_id.
5038 (add_thread): Add gdb_id argument.
5039 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5040 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5041 calls to add_thread.
5042 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5043 * server.c (handle_query): Use thread_to_gdb_id.
5044 (handle_v_cont, main): Use gdb_id_to_thread_id.
5045 * server.h (add_thread): Update prototype.
5046 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5049 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5051 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5052 left-padded registers.
5053 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5054 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5056 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5058 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5059 * configure: Regenerate.
5060 * config.in: Regenerate.
5061 * server.h (NEED_DECLARATION_STRERROR):
5062 Replace with !HAVE_DECL_STRERROR.
5064 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5066 * linux-low.c (linux_wait, linux_send_signal): Don't test
5067 an unsigned long variable for > 0 if it could be MAX_ULONG.
5068 * server.c (myresume): Likewise.
5069 * target.c (set_desired_inferior): Likewise.
5071 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5073 * configure.ac: Simplify and improve check for socklen_t.
5074 * configure, config.in: Regenerate.
5076 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5078 * acconfig.h: Remove.
5079 * configure.ac: Add a test for socklen_t. Use three-argument
5080 AC_DEFINE throughout.
5081 * config.in: Regenerated using autoheader 2.59.
5082 * configure: Regenerated.
5084 * gdbreplay.c (socklen_t): Provide a default.
5085 (remote_open): Use socklen_t.
5086 * remote-utils.c (socklen_t): Provide a default.
5087 (remote_open): Use socklen_t.
5088 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5091 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5093 * linux-low.c (linux_read_memory, linux_write_memory)
5094 (linux_read_auxv): Likewise.
5095 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5096 (check_mem_write): Likewise.
5097 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5099 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5100 (registers_from_string, register_data): Likewise.
5101 * server.c (handle_query, main): Likewise.
5102 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5103 (decode_M_packet): Likewise.
5104 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5105 * target.h (struct target_ops): Update read_memory, write_memory,
5107 (read_inferior_memory, write_inferior_memory): Update.
5108 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5110 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5111 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5112 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5113 linux-s390-low.c, linux-sh-low.c: Update for changes in
5114 read_inferior_memory and the_low_target->breakpoint.
5116 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5118 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5119 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5120 * configure.srv: Add powerpc64-*-linux*.
5121 * linux-ppc64-low.c: New file.
5123 2005-05-23 Orjan Friberg <orjanf@axis.com>
5125 * linux-cris-low.c: New file with support for CRIS.
5126 * linux-crisv32-low.c: Ditto for CRISv32.
5127 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5128 (clean): Add reg-cris.c and reg-crisv32.c.
5129 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5130 reg-crisv32.o, and reg-crisv32.c to make rules.
5131 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5134 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5136 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5137 of sizeof (PTRACE_XFER_TYPE).
5138 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5140 2005-05-12 Orjan Friberg <orjanf@axis.com>
5142 * target.h (struct target_ops): Add insert_watchpoint,
5143 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5144 pointers for hardware watchpoint support.
5145 * linux-low.h (struct linux_target_ops): Ditto.
5146 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5147 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5148 to linux_target_ops.
5149 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5151 * server.c (main): Recognize 'Z' and 'z' packets.
5153 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5155 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5156 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5157 (the_low_target): Add new members.
5159 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5161 * proc-service.c (ps_lgetregs): Search all_processes instead of
5164 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5166 * server.c (start_inferior): Change return type to int.
5167 (attach_inferior): Change sigptr to int *.
5168 (handle_v_cont, handle_v_requests): Change signal to int *.
5169 (main): Change signal to int.
5171 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5173 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5174 * configure.srv: Add m32r*-*-linux*.
5175 * linux-m32r-low.c: New file.
5177 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5179 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5181 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5183 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5184 Take unsigned long arguments for PIDs.
5185 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5186 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5187 (wait_for_sigstop, linux_resume_one_process)
5188 (regsets_fetch_inferior_registers, linux_send_signal)
5189 (linux_read_auxv): Likewise. Update the types of variables holding
5190 PIDs. Update format string specifiers.
5191 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5192 * remote-utils.c (prepare_resume_reply): Likewise.
5193 * server.c (cont_thread, general_thread, step_thread)
5194 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5196 (handle_query): Update format specifiers.
5197 (handle_v_cont, main): Use strtoul for thread IDs.
5198 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5199 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5200 (general_thread, step_thread, thread_from_wait)
5201 (old_thread_from_wait): Update.
5202 * target.h (struct thread_resume): Use unsigned long for THREAD.
5203 (struct target_ops): Use unsigned long for arguments to attach and
5206 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5208 * acinclude.m4: Include bfd/bfd.m4 directly.
5209 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5210 <agriffis@toolchain.org>.
5211 * aclocal.m4, configure: Regenerated.
5213 2005-01-07 Andrew Cagney <cagney@gnu.org>
5215 * configure.ac: Rename configure.in, require autoconf 2.59.
5216 * configure: Re-generate.
5218 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5220 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5222 * aclocal.m4: Regenerated.
5223 * configure: Regenerated.
5225 2004-11-21 Andreas Schwab <schwab@suse.de>
5227 * linux-m68k-low.c (m68k_num_gregs): Define.
5228 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5229 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5230 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5231 (m68k_breakpoint_at): New. Add to the_low_target.
5233 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5234 srv_linux_thread_db to yes.
5236 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5238 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5239 (ARCH_SET_FS): Likewise.
5240 (ARCH_GET_FS): Likewise.
5241 (ARCH_GET_GS): Likewise.
5243 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5245 * linux-i386-low.c (ps_get_thread_area): New.
5246 * linux-x86-64-low.c (ps_get_thread_area): New.
5247 * linux-low.c: Include <sys/syscall.h>.
5248 (linux_kill_one_process): Don't kill the first thread here.
5249 (linux_kill): Kill the first thread here.
5250 (kill_lwp): New function.
5251 (send_sigstop, linux_send_signal): Use it.
5252 * proc-service.c: Clean up #ifdefs.
5253 (fpregset_info): Delete.
5254 (ps_lgetregs): Update and enable implementation.
5255 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5257 * remote-utils.c (struct sym_cache, symbol_cache): New.
5258 (input_interrupt): Print a clearer message.
5259 (async_io_enabled): New variable.
5260 (enable_async_io, disable_async_io): Use it. Update comments.
5261 (look_up_one_symbol): Use the symbol cache.
5262 * thread-db.c (thread_db_look_up_symbols): New function.
5263 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5265 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5267 * configure.in: Test for -rdynamic.
5268 * configure: Regenerated.
5269 * Makefile (INTERNAL_LDFLAGS): New.
5270 (gdbserver, gdbreplay): Use it.
5272 2004-09-02 Andrew Cagney <cagney@gnu.org>
5274 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5276 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5278 * linux-low.c (linux_wait): Clear all_processes list also.
5280 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5282 * linux-low.c: Include <errno.h>. Remove extern declaration of
5285 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5287 * gdbreplay.c, server.h, utils.c: Update copyright years.
5289 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5291 * server.c (main): Print child status or termination signal from
5292 variable 'signal', not 'sig'.
5294 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5296 * linux-low.c (linux_read_memory): Change return type to
5297 int. Check for and return error from ptrace().
5298 * target.c (read_inferior_memory): Change return type to int. Pass
5299 back return status from the_target->read_memory().
5300 * target.h (struct target_ops): Adapt *read_memory() prototype.
5302 (read_inferior_memory): Adapt prototype.
5303 * server.c (main): Return an error packet if
5304 read_inferior_memory() returns an error.
5306 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5308 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5309 Unify with other clean targets.
5311 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5313 * server.c (handle_v_cont): Call set_desired_inferior.
5315 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5317 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5319 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5321 * linux-low.c (linux_wait): Unblock async I/O.
5322 (linux_resume): Block and enable async I/O.
5323 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5324 * server.h (block_async_io, unblock_async_io): Add prototypes.
5326 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5328 * remote-utils.c (remote_open): Print a status notice after
5330 * server.c (attach_inferior): Print a status notice after
5333 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5335 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5337 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5339 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5341 * server.c, target.h: Update copyright years.
5343 2004-02-25 Roland McGrath <roland@redhat.com>
5345 * target.h (struct target_ops): New member `read_auxv'.
5346 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5347 * linux-low.c (linux_read_auxv): New function.
5348 (linux_target_ops): Initialize `read_auxv' member to that.
5350 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5352 Committed by Jim Blandy <jimb@redhat.com>.
5354 * linux-s390-low.c (s390_num_regs): Update.
5355 (s390_regmap): Remove control registers. Use __s390x__ predefine
5356 instead of GPR_SIZE to distiguish s390 and s390x targets.
5358 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5360 * linux-low.c: Update copyright year.
5361 (check_removed_breakpoint): Clear pending_is_breakpoint.
5362 (linux_set_resume_request, linux_queue_one_thread)
5363 (resume_status_pending_p): New functions.
5364 (linux_continue_one_thread): Use process->resume.
5365 (linux_resume): Only resume threads if there are no pending events.
5366 * linux-low.h (struct process_info): Add resume request
5369 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5371 * regcache.c (new_register_cache): Clear the allocated register
5372 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5374 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5376 * linux-low.c (linux_resume): Take a struct thread_resume *
5378 (linux_wait): Update call.
5379 (resume_ptr): New static variable.
5380 (linux_continue_one_thread): Renamed from
5381 linux_continue_one_process. Use resume_ptr.
5382 (linux_resume): Use linux_continue_one_thread.
5383 * server.c (handle_v_cont, handle_v_requests): New functions.
5384 (myresume): New function.
5385 (main): Handle 'v' case.
5386 * target.h (struct thread_resume): New type.
5387 (struct target_ops): Change argument of "resume" to struct
5389 (myresume): Delete macro.
5391 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5393 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5394 (uninstall): Support DESTDIR.
5396 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5398 * configure.srv: Add xscale*linux copy of arm*linux entry.
5400 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5402 * linux-arm-low.c (arm_reinsert_addr): New function.
5403 (the_low_target): Add arm_reinsert_addr.
5405 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5407 * mem-break.c: Remove whitespace at end of file.
5409 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5411 * configure.in: Check whether we need to prototype strerror.
5412 * server.h: Optionally prototype strerror.
5413 * gdbreplay.c (perror_with_name): Use strerror.
5414 * linux-low.c (linux_attach_lwp): Use strerror.
5415 * utils.c (perror_with_name): Use strerror.
5416 * config.in, configure: Regenerated.
5418 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5420 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5421 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5423 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5425 * Makefile.in (SFILES): Update.
5426 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5427 low-sun3.c: Remove files.
5429 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5431 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5432 (linux_detach_one_process, linux_detach): New functions.
5433 (linux_target_ops): Add linux_detach.
5434 * server.c (main): Handle 'D' packet.
5435 * target.h (struct target_ops): Add "detach" member.
5436 (detach_inferior): Define.
5438 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5440 From Kelley Cook <kelleycook@wideopenwest.com>:
5441 * configure.srv: Accept i[34567]86 variants.
5443 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5445 * linux-low.c (linux_wait_for_event): Correct comment typos.
5446 (linux_resume_one_process): Call check_removed_breakpoint.
5447 (linux_send_signal): New function.
5448 (linux_target_ops): Add linux_send_signal.
5449 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5451 * target.h (struct target_ops): Add send_signal.
5453 2003-05-29 Jim Blandy <jimb@redhat.com>
5455 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5456 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5457 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5458 away part of the register's value.
5460 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5462 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5463 (linux_wait_for_event, linux_init_signals): Likewise.
5465 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5467 * configure.in: Check for stdlib.h.
5468 * configure: Regenerated.
5469 * config.in: Regenerated.
5471 2003-01-04 Andreas Schwab <schwab@suse.de>
5473 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5475 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5477 * Makefile.in: Remove obsolete code.
5479 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5481 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5482 defined(PT_FPR0_HI).
5484 2002-11-17 Stuart Hughes <seh@zee2.com>
5486 * linux-arm-low.c (arm_num_regs): Increase.
5487 (arm_regmap): Include status register.
5489 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5491 * linux-low.c (register_addr): Remove incorrect -1 check.
5493 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5495 * linux-low.c (linux_create_inferior): Call setpgid. Return
5497 (unstopped_p, linux_signal_pid): Remove.
5498 (linux_target_ops): Remove linux_signal_pid.
5499 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5500 global instead of target method.
5501 * target.h (struct target_ops): Remove signal_pid. Update comment
5502 for create_inferior.
5503 * server.c (signal_pid): New variable.
5504 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5505 gdbserver. Set the child to be the foreground process group.
5506 (attach_inferior): Set signal_pid.
5508 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5510 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5512 2002-08-20 Jim Blandy <jimb@redhat.com>
5514 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5517 2002-08-01 Andrew Cagney <cagney@redhat.com>
5519 * Makefile.in: Make chill references obsolete.
5521 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5523 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5524 * configure: Regenerate.
5525 * config.in: Regenerate.
5527 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5529 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5530 (perror_with_name, remote_close, remote_open, expect, play): Static.
5532 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5534 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5535 byte offsets instead of an array of indexes.
5536 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5538 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5540 * regcache.c: Add comment.
5542 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5544 * thread-db.c: New file.
5545 * proc-service.c: New file.
5546 * acinclude.m4: New file.
5547 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5548 proc-service.o, and thread-db.o.
5549 (linux-low.o): Add USE_THREAD_DB.
5550 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5551 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5552 * aclocal.m4: Regenerated.
5553 * config.in: Regenerated.
5554 * configure: Regenerated.
5555 * configure.in: Check for proc_service.h, sys/procfs.h,
5556 thread_db.h, and linux/elf.h headrs.
5557 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5558 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5559 Check for -lthread_db and thread support.
5560 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5561 PowerPC, and SuperH.
5562 * i387-fp.c: Constify arguments.
5563 * i387-fp.h: Likewise.
5564 * inferiors.c: (struct thread_info): Renamed from
5565 `struct inferior_info'. Remove PID member. Use generic inferior
5566 list header. All uses updated.
5567 (inferiors, signal_pid): Removed.
5568 (all_threads): New variable.
5569 (get_thread): Define.
5570 (add_inferior_to_list): New function.
5571 (for_each_inferior): New function.
5572 (change_inferior_id): New function.
5573 (add_inferior): Removed.
5574 (remove_inferior): New function.
5575 (add_thread): New function.
5576 (free_one_thread): New function.
5577 (remove_thread): New function.
5578 (clear_inferiors): Use for_each_inferior and free_one_thread.
5579 (find_inferior): New function.
5580 (find_inferior_id): New function.
5581 (inferior_target_data): Update argument type.
5582 (set_inferior_target_data): Likewise.
5583 (inferior_regcache_data): Likewise.
5584 (set_inferior_regcache_data): Likewise.
5585 * linux-low.c (linux_bp_reinsert): Remove.
5586 (all_processes, stopping_threads, using_thrads)
5587 (struct pending_signals, debug_threads, pid_of): New.
5588 (inferior_pid): Replace with macro.
5589 (struct inferior_linux_data): Remove.
5590 (get_stop_pc, add_process): New functions.
5591 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5592 Use add_process and add_thread.
5593 (linux_attach_lwp): New function, based on old linux_attach. Use
5594 add_process and add_thread. Set stop_expected for new threads.
5595 (linux_attach): New function.
5596 (linux_kill_one_process): New function.
5597 (linux_kill): Kill all LWPs.
5598 (linux_thread_alive): Use find_inferior_id.
5599 (check_removed_breakpoints, status_pending_p): New functions.
5600 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5601 Update. Use WNOHANG. Wait for cloned processes also. Update process
5602 struct for the found process.
5603 (linux_wait_for_event): New function.
5604 (linux_wait): Use it. Support LWPs.
5605 (send_sigstop, wait_for_sigstop, stop_all_processes)
5606 (linux_resume_one_process, linux_continue_one_process): New functions.
5607 (linux_resume): Support LWPs.
5608 (REGISTER_RAW_SIZE): Remove.
5609 (fetch_register): Use register_size instead. Call supply_register.
5610 (usr_store_inferior_registers): Likewise. Call collect_register.
5612 (regsets_fetch_inferior_registers): Improve error message.
5613 (regsets_store_inferior_registers): Add debugging.
5614 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5615 (unstopped_p, linux_signal_pid): New functions.
5616 (linux_target_ops): Add linux_signal_pid.
5617 (linux_init_signals): New function.
5618 (initialize_low): Call it. Initialize using_threads.
5619 * regcache.c (inferior_regcache_data): Add valid
5621 (get_regcache): Fetch registers lazily. Add fetch argument
5622 and update all callers.
5623 (regcache_invalidate_one, regcache_invalidate): New
5625 (new_register_cache): Renamed from create_register_cache.
5626 Return the new regcache.
5627 (free_register_cache): Change argument to a void *.
5628 (registers_to_string, registers_from_string): Call get_regcache
5629 with fetch flag set.
5630 (register_data): Make static. Pass fetch flag to get_regcache.
5631 (supply_register): Call get_regcache with fetch flag clear.
5632 (collect_register): Call get_regcache with fetch flag set.
5633 (collect_register_as_string): New function.
5634 * regcache.h: Update.
5635 * remote-utils.c (putpkt): Flush after debug output and use
5637 Handle input interrupts while waiting for an ACK.
5638 (input_interrupt): Use signal_pid method.
5639 (getpkt): Flush after debug output and use stderr.
5640 (outreg): Use collect_register_as_string.
5641 (new_thread_notify, dead_thread_notify): New functions.
5642 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5644 (look_up_one_symbol): Flush after debug output.
5645 * server.c (step_thread, server_waiting): New variables.
5646 (start_inferior): Don't use signal_pid. Update call to mywait.
5647 (attach_inferior): Update call to mywait.
5648 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5649 (main): Don't fetch/store registers explicitly. Use
5650 set_desired_inferior. Support proposed ``Hs'' packet. Update
5653 (struct inferior_list, struct_inferior_list_entry): New.
5654 * target.c (set_desired_inferior): New.
5655 (write_inferior_memory): Constify.
5656 (mywait): New function.
5658 (struct target_ops): New signal_pid method.
5659 (mywait): Removed macro, added prototype.
5661 * linux-low.h (regset_func): Removed.
5662 (regset_fill_func, regset_store_func): New.
5663 (enum regset_type): New.
5664 (struct regset_info): Add type field. Use new operation types.
5665 (struct linux_target_ops): stop_pc renamed to get_pc.
5666 Add decr_pc_after_break and breakpoint_at.
5667 (get_process, get_thread_proess, get_process_thread)
5668 (strut process_info, all_processes, linux_attach_lwp)
5669 (thread_db_init): New.
5671 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5672 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5673 (the_low_target): Add new members.
5674 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5675 (i386_store_fpxregset): Constify.
5676 (target_regsets): Add new kind identifier.
5677 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5678 (i386_set_pc): Add debugging.
5679 (i386_breakpoint_at): New function.
5680 (the_low_target): Add new members.
5681 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5682 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5683 (mips_breakpoint_at): New.
5684 (the_low_target): Add new members.
5685 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5686 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5687 (the_low_target): Add new members.
5688 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5689 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5690 (the_low_target): Add new members.
5691 * linux-x86-64-low.c (target_regsets): Add new kind
5694 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
5696 From Martin Pool <mbp@samba.org>:
5697 * server.c (gdbserver_usage): New function.
5700 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
5702 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5705 2002-05-04 Andrew Cagney <ac131313@redhat.com>
5707 * Makefile.in: Remove obsolete code.
5709 2002-04-24 Michal Ludvig <mludvig@suse.cz>
5711 * linux-low.c (regsets_fetch_inferior_registers),
5712 (regsets_store_inferior_registers): Removed cast to int from
5714 * regcache.h: Added declaration of struct inferior_info.
5716 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5718 * inferiors.c (struct inferior_info): Add regcache_data.
5719 (add_inferior): Call create_register_cache.
5720 (clear_inferiors): Call free_register_cache.
5721 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5722 * regcache.c (struct inferior_regcache_data): New.
5723 (registers): Remove.
5724 (get_regcache): New function.
5725 (create_register_cache, free_register_cache): New functions.
5726 (set_register_cache): Don't initialize the register cache here.
5727 (registers_to_string, registers_from_string, register_data): Call
5729 * regcache.h: Add prototypes.
5730 * server.h: Likewise.
5732 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5734 * mem-break.c: New file.
5735 * mem-break.h: New file.
5736 * Makefile.in: Add mem-break.o rule; update server.h
5738 * inferiors.c (struct inferior_info): Add target_data
5740 (clear_inferiors): Free target_data member if set.
5741 (inferior_target_data, set_inferior_target_data): New functions.
5742 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5743 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5744 * linux-low.c (linux_bp_reinsert): New variable.
5745 (struct inferior_linux_data): New.
5746 (linux_create_inferior): Use set_inferior_target_data.
5747 (linux_attach): Likewise. Call add_inferior.
5748 (linux_wait_for_one_inferior): New function.
5749 (linux_wait): Call it.
5750 (linux_write_memory): Add const.
5751 (initialize_low): Call set_breakpoint_data.
5752 * linux-low.h (struct linux_target_ops): Add breakpoint
5754 * server.c (attach_inferior): Remove extra add_inferior
5756 * server.h: Include mem-break.h. Update inferior.c
5758 * target.c (read_inferior_memory)
5759 (write_inferior_memory): New functions.
5760 * target.h (read_inferior_memory)
5761 (write_inferior_memory): Change macros to prototypes.
5762 (struct target_ops): Update comments. Add const to write_memory
5765 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
5767 * linux-low.c (usr_store_inferior_registers): Support
5768 registers which are allowed to fail to store.
5769 * linux-low.h (linux_target_ops): Likewise.
5770 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5771 (ppc_cannot_store_register): FPSCR may not be storable.
5773 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5775 * server.h: Include <string.h> if HAVE_STRING_H.
5776 * ChangeLog: Correct paths in last ChangeLog entry.
5778 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5780 * linux-low.h: Remove obsolete prototypes.
5781 (struct linux_target_ops): New.
5782 (extern the_low_target): New.
5783 * linux-low.c (num_regs, regmap): Remove declarations.
5784 (register_addr): Use the_low_target explicitly.
5785 (fetch_register): Likewise.
5786 (usr_fetch_inferior_registers): Likewise.
5787 (usr_store_inferior_registers): Likewise.
5788 * linux-arm-low.c (num_regs): Remove.
5789 (arm_num_regs): Define.
5790 (arm_regmap): Renamed from regmap, made static.
5791 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5793 (arm_cannot_store_register): Renamed from cannot_store_register,
5795 (the_low_target): New.
5796 * linux-i386-low.c (num_regs): Remove.
5797 (i386_num_regs): Define.
5798 (i386_regmap): Renamed from regmap, made static.
5799 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5801 (i386_cannot_store_register): Renamed from cannot_store_register,
5803 (the_low_target): New.
5804 * linux-ia64-low.c (num_regs): Remove.
5805 (ia64_num_regs): Define.
5806 (ia64_regmap): Renamed from regmap, made static.
5807 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5809 (ia64_cannot_store_register): Renamed from cannot_store_register,
5811 (the_low_target): New.
5812 * linux-m68k-low.c (num_regs): Remove.
5813 (m68k_num_regs): Define.
5814 (m68k_regmap): Renamed from regmap, made static.
5815 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5817 (m68k_cannot_store_register): Renamed from cannot_store_register,
5819 (the_low_target): New.
5820 * linux-mips-low.c (num_regs): Remove.
5821 (mips_num_regs): Define.
5822 (mips_regmap): Renamed from regmap, made static.
5823 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5825 (mips_cannot_store_register): Renamed from cannot_store_register,
5827 (the_low_target): New.
5828 * linux-ppc-low.c (num_regs): Remove.
5829 (ppc_num_regs): Define.
5830 (ppc_regmap): Renamed from regmap, made static.
5831 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5833 (ppc_cannot_store_register): Renamed from cannot_store_register,
5835 (the_low_target): New.
5836 * linux-s390-low.c (num_regs): Remove.
5837 (s390_num_regs): Define.
5838 (s390_regmap): Renamed from regmap, made static.
5839 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5841 (s390_cannot_store_register): Renamed from cannot_store_register,
5843 (the_low_target): New.
5844 * linux-sh-low.c (num_regs): Remove.
5845 (sh_num_regs): Define.
5846 (sh_regmap): Renamed from regmap, made static.
5847 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5849 (sh_cannot_store_register): Renamed from cannot_store_register,
5851 (the_low_target): New.
5852 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5853 (the_low_target): New.
5855 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5857 * Makefile.in: Add stamp-h target.
5858 * configure.in: Create stamp-h.
5859 * configure: Regenerated.
5861 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5863 * inferiors.c: New file.
5864 * target.c: New file.
5865 * target.h: New file.
5866 * Makefile.in: Add target.o and inferiors.o. Update
5868 * linux-low.c (inferior_pid): New static variable,
5869 moved from server.c.
5870 (linux_create_inferior): Renamed from create_inferior.
5871 Call add_inferior. Return 0 on success instead of a PID.
5872 (linux_attach): Renamed from myattach.
5873 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5874 (linux_thread_alive): Renamed from mythread_alive.
5875 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5877 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5878 (regsets_store_inferior_registers): Correct error message.
5879 Add missing ``return 0''.
5880 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5881 (linux_store_registers): Renamed from store_inferior_registers.
5882 (linux_read_memory): Renamed from read_inferior_memory.
5883 (linux_write_memory): Renamed from write_inferior_memory.
5884 (linux_target_ops): New structure.
5885 (initialize_low): Call set_target_ops ().
5886 * remote-utils.c (unhexify): New function.
5887 (hexify): New function.
5888 (input_interrupt): Send signals to ``signal_pid''.
5889 * server.c (inferior_pid): Remove.
5890 (start_inferior): Update create_inferior call.
5891 (attach_inferior): Call add_inferior.
5892 (handle_query): New function.
5893 (main): Call handle_query for `q' packets.
5894 * server.h: Include "target.h". Remove obsolete prototypes.
5895 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5897 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5899 * Makefile.in: Add WARN_CFLAGS. Update configury
5901 * configure.in: Check for <string.h>
5902 * configure: Regenerate.
5903 * config.in: Regenerate.
5904 * gdbreplay.c: Include needed system headers.
5905 (remote_open): Remove strchr prototype.
5906 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5907 * regcache.c (supply_register): Change buf argument to const void *.
5908 (supply_register_by_name): Likewise.
5909 (collect_register): Change buf argument to void *.
5910 (collect_register_by_name): Likewise.
5911 * regcache.h: Add missing prototypes.
5912 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5913 * server.c (handle_query): New function.
5914 (attached): New static variable, moved out of main.
5915 (main): Quiet longjmp clobber warnings.
5916 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5917 * utils.c (error): Remove NORETURN.