1 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
3 * server.c (handle_query): Add EnableDisableTracepoints to the list
5 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7 (cmd_qtenable_disable): New.
8 (cmd_qtstart): Install tracepoints even if disabled.
9 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10 receiving a QTEnable or QTDisable packet.
11 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14 (gdb_probe): Skip data collection if static tracepoint is disabled.
16 2011-05-10 Doug Evans <dje@google.com>
18 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
20 2011-05-04 Doug Evans <dje@google.com>
22 * linux-low.c (linux_join): Skip process lookup.
23 * spu-low.c (spu_join): Ditto.
24 * server.c (join_inferiors_callback): Delete.
25 (process_serial_event): For 'D' packet (detach) call join_inferior
28 2011-05-04 Joseph Myers <joseph@codesourcery.com>
30 * README: Don't mention xscale*-*-linux*.
31 * configure.srv (xscale*-*-linux*): Don't handle target.
33 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
35 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
37 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
38 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
39 (i386_emit_void_call_2): Likewise.
41 2011-04-26 Yao Qi <yao@codesourcery.com>
43 * linux-low.c: Move common macros to linux-ptrace.h.
44 Include linux-ptrace.h.
45 * Makefile.in (linux_ptrace_h): New.
46 (linux-low.o): Depends on linux-ptrace.h.
48 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
50 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
51 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
52 (remote_prepare): New function with most of the TCP code from ...
53 (remote_open): ... here. Detect PORT here unconditionally. Move also
54 setting transport_is_reliable.
55 * server.c (run_once): New variable.
56 (gdbserver_usage): Document it.
57 (main): Set run_once for `--once'. Call remote_prepare. Exit after
58 the first run if RUN_ONCE.
59 * server.h (run_once, remote_prepare): New declarations.
61 2011-04-19 Tom Tromey <tromey@redhat.com>
63 * win32-low.c (handle_load_dll): Remove duplicate "the".
65 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
67 Remove support for old Cygwin 1.5 versions.
68 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
69 function to avoid warning.
70 (win32_add_one_solib): Use cygwin_conv_path function to avoid
73 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
75 * gdbserver/server.h (Macro _): Define it if not available.
77 2011-03-14 Michael Snyder <msnyder@vmware.com>
79 * hostio.c (handle_close): Remove unnecessary null test.
81 2011-03-10 Joel Brobecker <brobecker@adacore.com>
83 * Makefile.in (maintainer-clean realclean distclean): Remove
84 "make ... subdir_do" command.
86 2011-03-10 Michael Snyder <msnyder@vmware.com>
88 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
90 * server.c (handle_v_run): Free alloced buffer on early return.
92 2011-03-09 Yao Qi <yao@codesourcery.com>
95 2011-03-04 Yao Qi <yao@codesourcery.com>
97 * Makefile.in: Remove GNU make feature --directory.
99 2011-03-05 Yao Qi <yao@codesourcery.com>
101 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
102 (subdir_do): New make target. Copied from gdb/Makefile.
103 (maintainer-clean, realclean, distclean, clean): Call corresponding
104 make targets in common/Makefile.
106 2011-02-11 Yao Qi <yao@codesourcery.com>
108 * configure.ac: Call AC_PROG_RANLIB.
109 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
110 * configure: Regenerate.
112 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
114 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
116 2011-03-06 Yao Qi <yao@codesourcery.com>
118 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
120 2011-03-05 Yao Qi <yao@codesourcery.com>
122 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
123 (subdir_do): New make target. Copied from gdb/Makefile.
124 (maintainer-clean, realclean, distclean, clean): Call corresponding
125 make targets in common/Makefile.
127 2011-03-04 Yao Qi <yao@codesourcery.com>
129 * Makefile.in: Remove GNU make feature --directory.
131 2011-03-04 Michael Snyder <msnyder@vmware.com>
133 * server.c (queue_stop_reply): Call xmalloc not malloc.
135 2011-03-02 Michael Snyder <msnyder@vmware.com>
137 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
139 2011-02-28 Michael Snyder <msnyder@vmware.com>
141 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
142 (cmd_qtframe): Ditto.
143 (cmd_qtbuffer): Ditto.
144 (cmd_bigqtbuffer): Ditto.
146 * utils.c (decimal2str): Initialize 'width' to nine, then
149 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
151 * hostio.c (require_data): Free *data, not data.
153 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
155 * hostio.c (require_data): Use free, not xfree.
157 2011-02-27 Michael Snyder <msnyder@vmware.com>
159 * server.c (handle_query): Discard unused value.
161 * hostio.c (require_data): Free malloc memory before returning
164 2011-02-26 Michael Snyder <msnyder@vmware.com>
166 * linux-low.c (list_threads): Call closedir for dirent.
168 2011-02-27 Michael Snyder <msnyder@vmware.com>
170 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
171 a case statement falls through.
173 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
175 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
178 2011-02-26 Michael Snyder <msnyder@vmware.com>
180 * utils.c (decimal2str): Eliminate dead code and dead param.
181 (pulongest): Drop dead param from call to decimal2str.
184 2011-02-24 Joel Brobecker <brobecker@adacore.com>
186 Revert the following patch (not approved yet):
187 2011-02-21 Hui Zhu <teawater@gmail.com>
188 * tracepoint.c (tp_printf): New function.
189 (eval_agent_expr): Handle gdb_agent_op_printf.
191 2011-02-21 Hui Zhu <teawater@gmail.com>
193 * tracepoint.c (tp_printf): New function.
194 (eval_agent_expr): Handle gdb_agent_op_printf.
196 2011-02-18 Tom Tromey <tromey@redhat.com>
198 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
199 (tracepoint.o): Likewise.
200 * tracepoint.c (enum gdb_agent_op): Use ax.def.
201 (gdb_agent_op_names): Likewise.
203 2011-02-18 Tom Tromey <tromey@redhat.com>
205 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
206 gdb_agent_op_rot>: New constants.
207 (gdb_agent_op_names): Add pick and roll.
208 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
211 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
213 * aclocal.m4: Regenerated with aclocal-1.11.1.
215 2011-02-14 Pedro Alves <pedro@codesourcery.com>
217 * server.c (handle_qxfer_traceframe_info): New.
218 (qxfer_packets): Register "traceframe-info".
219 (handle_query): Report support for qXfer:traceframe-info:read+.
220 * tracepoint.c (match_blocktype): New.
221 (traceframe_find_block_type): Rename to ...
222 (traceframe_walk_blocks): ... this. Add callback filter argument,
224 (traceframe_find_block_type): New, reimplemented on top of
225 traceframe_walk_blocks.
226 (build_traceframe_info_xml): New.
227 (traceframe_read_info): New.
228 * server.h (traceframe_read_info): Declare.
230 2011-02-11 Yao Qi <yao@codesourcery.com>
232 * configure.ac: Call AC_PROG_RANLIB.
233 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
234 * configure: Regenerate.
236 2011-02-07 Pedro Alves <pedro@codesourcery.com>
238 * server.c (gdb_read_memory): Change return semantics to allow
240 (handle_search_memory_1): Adjust.
241 (process_serial_event) <'m' packet>: Handle partial transfers.
242 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
244 2011-01-28 Pedro Alves <pedro@codesourcery.com>
246 * regcache.c (init_register_cache): Initialize
247 regcache->register_status.
248 (free_register_cache): Release regcache->register_status.
249 (regcache_cpy): Copy register_status.
250 (registers_to_string): Print 'x's for unavailable registers.
251 (supply_register): Mark the register's status valid or
252 unavailable, depending on whether a buffer was passed in or not.
253 (supply_register_zeroed): New.
254 (supply_regblock): Mark the registers' status valid or
255 unavailable, depending on whether a buffer was passed in or not.
256 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
257 (struct regcache): New `register_status' field.
258 (supply_register_zeroed): Declare.
259 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
260 supply_register_zeroed, rather than passing a NULL buffer to
262 * tracepoint.c (fetch_traceframe_registers): Update comment.
264 2011-01-28 Pedro Alves <pedro@codesourcery.com>
266 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
269 2011-01-25 Pedro Alves <pedro@codesourcery.com>
271 * server.h (decode_xfer_write): Change prototype.
272 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
273 and don't extract the annex here.
274 * server.c (decode_xfer_read): Remove `annex' parameter,
275 and don't extract the annex here.
278 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
279 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
280 (handle_qxfer_statictrace): New functions, abstracted out from
281 handle_query, and made to use the struct qxfer interface.
282 (handle_threads_qxfer_proper): Rename to ...
283 (handle_qxfer_threads_proper): ... this.
284 (handle_threads_qxfer): Rename to ...
285 (handle_qxfer_threads): ... this. Adjust.
286 (qxfer_packets): New array.
287 (handle_qxfer): New function.
288 (handle_query): Use handle_qxfer.
290 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
292 * gdbreplay.c: Shorten lines of >= 80 columns.
293 * linux-low.c: Ditto.
294 * linux-ppc-low.c: Ditto.
295 * linux-s390-low.c: Ditto.
296 * linux-sparc-low.c: Ditto.
297 * linux-x86-low.c: Ditto.
298 * linux-xtensa-low.c: Ditto.
299 * mem-break.c: Ditto.
302 * remote-utils.c: Ditto.
305 * thread-db.c: Ditto.
306 * tracepoint.c: Ditto.
308 * win32-low.h: Ditto.
310 2011-01-05 Joel Brobecker <brobecker@adacore.com>
312 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
315 2011-01-01 Joel Brobecker <brobecker@adacore.com>
317 * server.c (gdbserver_version): Update copyright year in version
319 * gdbreplay.c (gdbreplay_version): Ditto.
321 2010-12-29 Jie Zhang <jie.zhang@analog.com>
323 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
324 * linux-bfin-low.c: New file.
325 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
326 PT_DATA_ADDR for BFIN targets.
327 * Makefile.in (SFILES): Add linux-bfin-low.c.
328 (clean): Remove reg-bfin.c.
329 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
330 * README: Mention supported Blackfin targets.
332 2010-12-23 Mike Frysinger <vapier@gentoo.org>
334 * .gitignore: New file.
336 2010-11-16 Mike Frysinger <vapier@gentoo.org>
338 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
340 2010-10-22 Jie Zhang <jie@codesourcery.com>
342 * Makefile.in: Add FLAGS_TO_PASS variable.
343 (install): Remove dependency of install-only and recursively
344 invoke make for install-only.
346 2010-10-04 Doug Evans <dje@google.com>
348 * Makefile.in (uninstall): Use $(DESTDIR).
350 2010-09-24 Pedro Alves <pedro@codesourcery.com>
354 * linux-x86-low.c (compat_siginfo_from_siginfo)
355 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
356 si_code is < 0. Check for si_code == SI_TIMER before checking for
359 2010-09-13 Joel Brobecker <brobecker@adacore.com>
361 * lynx-i386-low.c: New file.
362 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
364 2010-09-13 Joel Brobecker <brobecker@adacore.com>
366 * lynx-low.c (ptrace_request_to_str): Remove handling for
367 request values that have been removed in LynxOS 5.x.
369 2010-09-13 Joel Brobecker <brobecker@adacore.com>
371 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
374 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
376 * configure.ac: Add --enable-inprocess-agent option.
377 * configure: Rebuilt.
379 2010-09-06 Yao Qi <yao@codesourcery.com>
381 * linux-low.c (linux_kill): Remove unused variable.
382 (linux_stabilize_threads): Likewise.
383 * server.c (start_inferior): Likewise.
384 (queue_stop_reply_callback): Likewise.
385 * tracepoint.c (do_action_at_tracepoint): Likewise.
387 2010-09-06 Yao Qi <yao@codesourcery.com>
389 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
392 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
394 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
396 2010-09-06 Pedro Alves <pedro@codesourcery.com>
398 * Makefile.in (install-only): Replace $IPA_DEPFILES with
401 2010-09-01 Joel Brobecker <brobecker@adacore.com>
403 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
404 gdbserver/lynx-ppc-low.c: New files.
405 * Makefile.in (lynx_low_h): New variable.
406 (lynx-low.o, lynx-ppc-low.o): New rules.
407 * configure.ac: On LynxOS, link with -lnetinet.
408 * configure.srv: Add handling of powerpc-*-lynxos* targets.
409 * configure: regenerate.
411 2010-09-01 Joel Brobecker <brobecker@adacore.com>
413 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
414 * configure.ac: Add check for vasprintf and vsnprintf.
415 * configure, config.in: Regenerate.
416 * server.h (vasprintf, vsnprintf): Add conditional declarations.
418 2010-09-01 Joel Brobecker <brobecker@adacore.com>
420 * gdbreplay.c: Move include of alloca.h up, next to include of
422 * server.h: Add include of malloc.h.
423 * mem-break.c: Remove include of malloc.h.
424 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
426 2010-09-01 Joel Brobecker <brobecker@adacore.com>
428 * Makefile.in (memmem.o): Build with -Wno-error.
430 2010-09-01 Joel Brobecker <brobecker@adacore.com>
432 * utils.c (xsnprintf): Make non-static.
433 * server.h: Add xsnprintf declaration.
434 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
435 replace calls to snprintf by calls to xsnprintf throughout.
437 2010-09-01 Joel Brobecker <brobecker@adacore.com>
439 * configure.ac: Add configure check for alloca.
440 * configure, config.in: Regenerate.
441 * server.h: Include alloca.h if it exists.
442 * gdbreplay.c: Include alloca.h if it exists.
444 2010-08-28 Pedro Alves <pedro@codesourcery.com>
446 * linux-low.c (__SIGRTMIN): Define if not already defined.
447 (linux_create_inferior): Check for __ANDROID__ rather than
449 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
450 are already deferred.
451 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
452 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
453 stopped and already has a pending signal to report.
454 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
455 a pending signal to report or is moving out of a jump pad.
456 (linux_init_signals): Check for __ANDROID__ rather than
459 2010-08-28 Pedro Alves <pedro@codesourcery.com>
461 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
462 debug_threads check. Avoid a linear search when not doing debug
465 2010-08-27 Pedro Alves <pedro@codesourcery.com>
467 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
468 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
469 (struct file_handler) <fd>: Change type to gdb_fildes_t.
470 (process_event): Change local fd's type to gdb_fildes_t.
471 (create_file_handler): Adjust prototype.
472 (delete_file_handler): Adjust prototype.
473 (handle_file_event): Adjust prototype. Use pfildes.
474 (create_file_event): Adjsut prototype.
475 * remote-utils.c (remote_desc, listen_desc): Change type to
477 * server.h: New gdb_fildes_t typedef.
478 [USE_WIN32API]: Include winsock2.h.
479 (delete_file_handler, add_file_handler): Adjust prototypes.
481 * utils.c (pfildes): New.
483 2010-08-27 Pedro Alves <pedro@codesourcery.com>
485 * configure.ac (build_warnings): Add -Wno-char-subscripts.
486 * configure: Regenerate.
488 2010-08-27 Pedro Alves <pedro@codesourcery.com>
490 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
491 (linux_done_accessing_memory): ... this.
492 (linux_target_ops): Adjust.
493 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
494 * nto-low.c (nto_target_ops): Adjust comment.
495 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
496 * spu-low.c (spu_target_ops): Adjust comment.
497 * target.h (target_ops): Rename unprepare_to_access_memory field
498 to done_accessing_memory.
499 (unprepare_to_access_memory): Rename to ...
500 (done_accessing_memory): ... this.
502 2010-08-26 Pedro Alves <pedro@codesourcery.com>
504 * linux-low.c (linux_prepare_to_access_memory): New.
505 (linux_unprepare_to_access_memory): New.
506 (linux_target_ops): Install them.
507 * server.c (read_memory): Rename to ...
508 (gdb_read_memory): ... this. Use
509 prepare_to_access_memory/prepare_to_access_memory.
510 (write_memory): Rename to ...
511 (gdb_write_memory): ... this. Use
512 prepare_to_access_memory/prepare_to_access_memory.
513 (handle_search_memory_1): Adjust.
514 (process_serial_event): Adjust.
515 * target.h (struct target_ops): New fields
516 prepare_to_access_memory and unprepare_to_access_memory.
517 (prepare_to_access_memory, unprepare_to_access_memory): New.
518 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
519 prepare_to_access_memory/prepare_to_access_memory.
520 * nto-low.c (nto_target_ops): Adjust.
521 * spu-low.c (spu_target_ops): Adjust.
522 * win32-low.c (win32_target_ops): Adjust.
524 2010-08-26 Pedro Alves <pedro@codesourcery.com>
526 * Makefile.in (WARN_CFLAGS): Get it from configure.
527 (WERROR_CFLAGS): New.
528 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
529 * configure.ac: Introduce --enable-werror, which adds -Werror to
530 the compiler command line. Enabled by default. Disable with
531 --disable-werror. Add -Wdeclaration-after-statement
532 Wpointer-arith and -Wformat-nonliteral to warning flags.
533 * configure: Regenerate.
535 2010-08-26 Pedro Alves <pedro@codesourcery.com>
537 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
539 2010-08-26 Pedro Alves <pedro@codesourcery.com>
541 * gdbreplay.c (remote_error): New.
543 (expect): Use gdbchar. Check for error reading from GDB.
544 Clarify sync error output.
545 (play): Check for errors writing to GDB.
546 * linux-low.c (sigchld_handler): Really ignore `write' errors.
547 * remote-utils.c (getpkt): Check for errors writing to the remote
550 2010-08-25 Pedro Alves <pedro@codesourcery.com>
552 * linux-low.c (linux_wait_1): Move non-debugging code out of
553 `debug_threads' control.
555 2010-08-25 Pedro Alves <pedro@codesourcery.com>
557 * linux-low.c (linux_wait_1): Don't set last_status here.
558 * server.c (push_event, queue_stop_reply_callback): Assert we're
559 not pushing a TARGET_WAITKIND_IGNORE event.
560 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
561 (myresume, handle_target_event): Set the thread's last_resume_kind
562 and last_status from the target returned status.
564 2010-08-25 Pedro Alves <pedro@codesourcery.com>
568 * linux-x86-low.c (update_debug_registers_callback): New.
569 (i386_dr_low_set_addr): Use it.
570 (i386_dr_low_get_addr): New.
571 (i386_dr_low_set_control): Use update_debug_registers_callback.
572 (i386_dr_low_get_control): New.
573 (i386_dr_low_get_status): Adjust.
574 * linux-low.c (linux_stop_lwp): New.
575 * linux-low.h (linux_stop_lwp): Declare.
577 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
578 argument instead of a i386_debug_reg_state.
579 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
580 a i386_debug_reg_state.
581 (i386_insert_aligned_watchpoint): Adjust.
582 (i386_remove_aligned_watchpoint): Adjust.
583 (i386_low_stopped_data_address): Read the debug registers from the
584 inferior instead of from the mirrors.
585 * i386-low.h (struct i386_debug_reg_state): Extend comment.
586 (i386_dr_low_get_addr): Declare.
587 (i386_dr_low_get_control): Declare.
588 (i386_dr_low_get_status): Change prototype.
590 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
591 (i386_dr_low_get_addr): New.
592 (i386_dr_low_get_control): New.
593 (i386_dr_low_get_status): Adjust prototype. Return
595 (i386_initial_stuff): Clear dr_status_mirror and
597 (i386_get_thread_context): Adjust.
598 (i386_set_thread_context): Adjust.
599 (i386_thread_added): Adjust.
601 2010-08-24 Pedro Alves <pedro@codesourcery.com>
603 * linux-low.h (linux_thread_area): Delete declaration.
605 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
607 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
608 after its termination.
610 2010-08-09 Pedro Alves <pedro@codesourcery.com>
612 * linux-low.c (gdb_wants_lwp_stopped): Delete.
613 (gdb_wants_all_stopped): Delete.
614 (linux_wait_1): Don't call them.
615 * server.c (handle_v_cont): Tag all threads as want-stopped.
616 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
617 stopped as "client-wants-stopped".
619 2010-07-31 Pedro Alves <pedro@codesourcery.com>
621 * Makefile.in (signals_h): New.
622 (server_h): Depend on it.
623 (server.o): Don't depend on $(signals_def).
624 (signals.o): Depend on $(signals_def).
626 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
628 * Makefile.in (signals_def): New.
629 (server_h): Append include/gdb/signals.h and signals_def.
630 (server.o): Append signals_def.
632 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
634 * server.c (handle_target_event): Use target_signal_to_host for
635 resume_info.sig initialization.
636 * target.h (struct thread_resume) <sig>: New comment.
638 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
640 * server.c (handle_query): strcpy() the returned string from paddress()
641 instead of sprintf().
642 * utils.c (paddress): Return phex_nz().
644 2010-07-07 Joel Brobecker <brobecker@adacore.com>
646 * server.c (handle_v_cont): Call mourn_inferior if process
648 (myresume): Likewise.
650 2010-07-01 Pedro Alves <pedro@codesourcery.com>
652 Static tracepoints, and integration with UST.
654 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
655 * mem-break.c (uninsert_all_breakpoints)
656 (reinsert_all_breakpoints): New.
657 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
658 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
659 (gdb_agent_ust_loaded, helper_thread_id)
660 (gdb_agent_helper_thread_id): New macros.
661 (struct ipa_sym_addresses): Add addr_ust_loaded,
662 addr_helper_thread_id, addr_cmd_buf.
663 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
664 (in_process_agent_loaded_ust): New.
665 (write_e_ust_not_loaded): New.
666 (maybe_write_ipa_ust_not_loaded): New.
667 (struct collect_static_trace_data_action): New.
668 (enum tracepoint_type) <static_tracepoint>: New.
669 (struct tracepoint) <handle>: Mention static tracepoints.
670 (struct static_tracepoint_ctx): New.
672 (add_tracepoint_action): Handle static tracepoint actions.
673 (unprobe_marker_at): New.
674 (clear_installed_tracepoints): Handle static tracepoints.
675 (cmd_qtdp): Handle static tracepoints.
676 (probe_marker_at): New.
677 (cmd_qtstart): Handle static tracepoints.
678 (response_tracepoint): Handle static tracepoints.
679 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
680 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
681 (get_context_regcache): Handle static tracepoints.
682 (do_action_at_tracepoint): Handle static tracepoint actions.
683 (traceframe_find_block_type): Handle static trace data blocks.
684 (traceframe_read_sdata): New.
685 (download_tracepoints): Download static tracepoint actions.
686 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
687 (GDB_PROBE_NAME): New.
692 (ust_marker_to_static_tracepoint): New.
694 (collect_ust_data_at_tracepoint): New.
695 (gdb_ust_probe): New.
696 (UNIX_PATH_MAX, SOCK_DIR): New.
697 (gdb_ust_connect_sync_socket): New.
698 (resume_thread, stop_thread): New.
699 (run_inferior_command): New.
700 (init_named_socket): New.
701 (gdb_ust_socket_init): New.
702 (cstr_to_hexstr): New.
704 (first_marker, next_marker): New.
705 (response_ust_marker): New.
706 (cmd_qtfstm, cmd_qtsstm): New.
707 (unprobe_marker_at, probe_marker_at): New.
708 (cmd_qtstmat, gdb_ust_thread): New.
710 (initialize_tracepoint_ftlib): Call gdb_ust_init.
711 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
713 (x86_64_st_collect_regmap): New.
714 (X86_64_NUM_ST_COLLECT_GREGS): New.
715 (AMD64_RIP_REGNUM): New.
716 (supply_static_tracepoint_registers): New.
717 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
719 (i386_st_collect_regmap): New.
720 (i386_NUM_ST_COLLECT_GREGS): New.
721 (supply_static_tracepoint_registers): New.
722 * server.c (handle_query): Handle qXfer:statictrace:read.
723 <qSupported>: Report support for StaticTracepoints, and
724 qXfer:statictrace:read features.
725 * server.h (traceframe_read_sdata)
726 (supply_static_tracepoint_registers): Declare.
727 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
728 (unpack_varlen_hex): Include in IPA build.
729 * Makefile.in (ustlibs, ustinc): New.
730 (IPA_OBJS): Add remote-utils-ipa.o.
731 ($(IPA_LIB)): Link -ldl and -lpthread.
733 (IPAGENT_CFLAGS): Add UST_CFLAGS.
734 * config.in, configure: Regenerate.
736 2010-06-20 Ian Lance Taylor <iant@google.com>
737 Pedro Alves <pedro@codesourcery.com>
739 * linux-x86-low.c (always_true): Delete.
740 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
741 trying to fool the compiler with always_true.
743 2010-06-20 Pedro Alves <pedro@codesourcery.com>
745 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
746 conditions in gdbserver.
748 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
750 * spu-low.c (spu_read_memory): Wrap around local store limit.
751 (spu_write_memory): Likewise.
753 2010-06-15 Pedro Alves <pedro@codesourcery.com>
755 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
756 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
758 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
760 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
761 uses with LONGEST uses.
763 2010-06-14 Stan Shebs <stan@codesourcery.com>
764 Pedro Alves <pedro@codesourcery.com>
768 * linux-x86-low.c: Include limits.h.
773 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
774 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
775 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
776 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
777 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
778 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
779 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
780 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
781 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
782 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
783 (amd64_emit_void_call_2): New.
784 (amd64_emit_ops): New.
785 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
786 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
787 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
788 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
789 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
790 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
791 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
792 (i386_emit_call, i386_emit_reg, i386_emit_pop)
793 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
794 (i386_emit_stack_adjust, i386_emit_int_call_1)
795 (i386_emit_void_call_2): New.
796 (i386_emit_ops): New.
798 (the_low_target): Install x86_emit_ops.
799 * server.h (struct emit_ops): New.
800 (get_raw_reg_func_addr): Declare.
801 (current_insn_ptr, emit_error): Declare.
802 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
803 (set_trace_state_variable_value): New defines.
804 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
805 addr_get_trace_state_variable_value and
806 addr_set_trace_state_variable_value.
807 (symbol_list): New fields for get_raw_reg,
808 get_trace_state_variable_value and set_trace_state_variable_value.
809 (condfn): New typedef.
810 (struct tracepoint): New field `compiled_cond'.
811 (do_action_at_tracepoint): Clear compiled_cond.
812 (get_trace_state_variable_value, set_trace_state_variable_value):
814 (condition_true_at_tracepoint): If there's a compiled condition,
816 (current_insn_ptr, emit_error): New globals.
817 (struct bytecode_address): New.
818 (get_raw_reg_func_addr): New.
819 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
820 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
821 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
822 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
823 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
824 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
825 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
826 (compile_tracepoint_condition, compile_bytecodes): New.
827 * target.h (emit_ops): Forward declare.
828 (struct target_ops): New field emit_ops.
829 (target_emit_ops): New.
830 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
831 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
832 * linux-low.c (linux_emit_ops): New.
833 (linux_target_ops): Install it.
834 * linux-low.h (struct linux_target_ops): New field emit_ops.
836 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
838 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
839 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
841 2010-06-01 Pedro Alves <pedro@codesourcery.com>
842 Stan Shebs <stan@codesourcery.com>
844 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
845 (all): Depend on $(extra_libraries).
846 (install-only): Install the IPA.
847 (IPA_OBJS, IPA_LIB): New.
848 (clean): Remove the IPA lib.
849 (IPAGENT_CFLAGS): New.
850 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
851 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
852 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
853 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
854 * configure.ac: Check for atomic builtins support in the compiler.
855 (IPA_DEPFILES, extra_libraries): Define.
856 * configure.srv (ipa_obj): Add description.
857 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
858 (i[34567]86-*-linux*): Set ipa_obj.
859 (x86_64-*-linux*): Set ipa_obj.
860 * linux-low.c (stabilizing_threads): New.
861 (supports_fast_tracepoints): New.
862 (linux_detach): Stabilize threads before detaching.
863 (handle_tracepoints): Handle internal tracing breakpoints. Assert
864 the lwp is either not stabilizing, or is moving out of a jump pad.
865 (linux_fast_tracepoint_collecting): New.
866 (maybe_move_out_of_jump_pad): New.
867 (enqueue_one_deferred_signal): New.
868 (dequeue_one_deferred_signal): New.
869 (linux_wait_for_event_1): If moving out of a jump pad, defer
870 pending signals to later.
871 (linux_stabilize_threads): New.
872 (linux_wait_1): Check if threads need moving out of jump pads, and
874 (stuck_in_jump_pad_callback): New.
875 (move_out_of_jump_pad_callback): New.
877 (linux_resume_one_lwp): Handle moving out of jump pads.
878 (linux_set_resume_request): Dequeue deferred signals.
879 (need_step_over_p): Also step over fast tracepoint jumps.
880 (start_step_over): Also uninsert fast tracepoint jumps.
881 (finish_step_over): Also reinsert fast tracepoint jumps.
882 (linux_install_fast_tracepoint_jump): New.
883 (linux_target_ops): Install linux_stabilize_threads and
884 linux_install_fast_tracepoint_jump_pad.
885 * linux-low.h (linux_target_ops) <get_thread_area,
886 install_fast_tracepoint_jump_pad>: New fields.
887 (struct lwp_info) <collecting_fast_tracepoint,
888 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
889 (linux_get_thread_area): Declare.
890 * linux-x86-low.c (jump_insn): New.
891 (x86_get_thread_area): New.
894 (amd64_install_fast_tracepoint_jump_pad): New.
895 (i386_install_fast_tracepoint_jump_pad): New.
896 (x86_install_fast_tracepoint_jump_pad): New.
897 (the_low_target): Install x86_get_thread_area and
898 x86_install_fast_tracepoint_jump_pad.
899 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
900 (struct fast_tracepoint_jump): New.
901 (fast_tracepoint_jump_insn): New.
902 (fast_tracepoint_jump_shadow): New.
903 (find_fast_tracepoint_jump_at): New.
904 (fast_tracepoint_jump_here): New.
905 (delete_fast_tracepoint_jump): New.
906 (set_fast_tracepoint_jump): New.
907 (uninsert_fast_tracepoint_jumps_at): New.
908 (reinsert_fast_tracepoint_jumps_at): New.
909 (set_breakpoint_at): Use write_inferior_memory.
910 (uninsert_raw_breakpoint): Use write_inferior_memory.
911 (check_mem_read): Mask out fast tracepoint jumps.
912 (check_mem_write): Mask out fast tracepoint jumps.
913 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
914 (set_fast_tracepoint_jump): Declare.
915 (delete_fast_tracepoint_jump)
916 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
917 (reinsert_fast_tracepoint_jumps_at): Declare.
918 * regcache.c: Don't compile many functions when building the
919 in-process agent library.
920 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
921 the register buffer in the heap.
922 (free_register_cache): If the register buffer isn't owned by the
923 regcache, don't free it.
924 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
925 pre-existing register caches.
926 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
928 (convert_ascii_to_int): : Constify `from' parameter type.
929 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
930 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
931 the needed buffer in-place.
932 (relocate_instruction): New.
933 * server.c (handle_query) <qSymbols>: If the target supports
934 tracepoints, give it a chance of looking up symbols. Report
935 support for fast tracepoints.
936 (handle_status): Stabilize threads.
937 (process_serial_event): Adjust.
938 * server.h (struct fast_tracepoint_jump): Forward declare.
939 (struct process_info) <fast_tracepoint_jumps>: New field.
940 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
941 (decode_X_packet, decode_M_packet): Adjust.
942 (relocate_instruction): Declare.
943 (in_process_agent_loaded): Declare.
944 (tracepoint_look_up_symbols): Declare.
945 (struct fast_tpoint_collect_status): Declare.
946 (fast_tracepoint_collecting): Declare.
947 (force_unlock_trace_buffer): Declare.
948 (handle_tracepoint_bkpts): Declare.
949 (initialize_low_tracepoint)
950 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
951 * target.h (struct target_ops) <stabilize_threads,
952 install_fast_tracepoint_jump_pad>: New fields.
953 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
954 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
955 [HAVE_STDINT_H]: Include stdint.h.
956 (trace_debug_1): Rename to ...
957 (trace_vdebug): ... this.
958 (trace_debug): Rename to ...
959 (trace_debug_1): ... this. Add `level' parameter.
961 (ATTR_USED, ATTR_NOINLINE): New.
962 (IP_AGENT_EXPORT): New.
963 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
964 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
965 (about_to_request_buffer_space, trace_buffer_is_full)
966 (stopping_tracepoint, expr_eval_result, error_tracepoint)
967 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
968 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
969 (traceframe_write_count, traceframes_created)
970 (trace_state_variables)
971 New renaming defines.
972 (struct ipa_sym_addresses): New.
973 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
975 (ipa_sym_addrs): New.
976 (all_tracepoint_symbols_looked_up): New.
977 (in_process_agent_loaded): New.
978 (write_e_ipa_not_loaded): New.
979 (maybe_write_ipa_not_loaded): New.
980 (tracepoint_look_up_symbols): New.
981 (debug_threads) [IN_PROCESS_AGENT]: New.
982 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
983 (UNKNOWN_SIDE_EFFECTS): New.
985 (flush_trace_buffer): New.
986 (stop_tracing_bkpt): New.
987 (flush_trace_buffer_bkpt): New.
988 (read_inferior_integer): New.
989 (read_inferior_uinteger): New.
990 (read_inferior_data_pointer): New.
991 (write_inferior_data_pointer): New.
992 (write_inferior_integer): New.
993 (write_inferior_uinteger): New.
994 (struct collect_static_trace_data_action): Delete.
995 (enum tracepoint_type): New.
996 (struct tracepoint) <type>: New field `type'.
997 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
998 <orig_size, obj_addr_on_target, adjusted_insn_addr>
999 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1000 (tracepoints): Use IP_AGENT_EXPORT.
1001 (last_tracepoint): Don't include in the IPA.
1002 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1003 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1004 (alloced_trace_state_variables): New.
1005 (trace_state_variables): Use IP_AGENT_EXPORT.
1006 (traceframe_t): Delete unused variable.
1007 (circular_trace_buffer): Don't include in the IPA.
1008 (trace_buffer_start): Delete.
1009 (struct trace_buffer_control): New.
1010 (trace_buffer_free): Delete.
1011 (struct ipa_trace_buffer_control): New.
1012 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1013 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1015 (trace_buffer_ctrl): New.
1016 (TRACE_BUFFER_CTRL_CURR): New.
1017 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1018 Reimplement as macros.
1019 (trace_buffer_wrap): Delete.
1020 (traceframe_write_count, traceframe_read_count)
1021 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1022 (struct tracepoint_hit_ctx) <type>: New field.
1023 (struct fast_tracepoint_ctx): New.
1024 (memory_barrier): New.
1026 (record_tracepoint_error): Update atomically in the IPA.
1027 (clear_inferior_trace_buffer): New.
1028 (about_to_request_buffer_space): New.
1029 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1030 updating the same buffer.
1031 (add_tracepoint): Default the tracepoint's type to trap
1032 tracepoint, and orig_size to -1.
1033 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1035 (create_trace_state_variable): New parameter `gdb'. Handle it.
1036 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1037 (cmd_qtdp): Handle fast tracepoints.
1039 (max_jump_pad_size): New.
1040 (gdb_jump_pad_head): New.
1041 (get_jump_space_head): New.
1042 (claim_jump_space): New.
1043 (sort_tracepoints): New.
1044 (MAX_JUMP_SIZE): New.
1045 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1047 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1048 support. Upload fast traceframes, and delete internal IPA
1050 (stop_tracing_handler): New.
1051 (flush_trace_buffer_handler): New.
1052 (cmd_qtstop): Upload fast tracepoints.
1053 (response_tracepoint): Handle fast tracepoints.
1054 (tracepoint_finished_step): Upload fast traceframes. Set the
1055 tracepoint hit context's tracepoint type.
1056 (handle_tracepoint_bkpts): New.
1057 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1058 type. Add comment about fast tracepoints.
1059 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1060 non-existing action_str field.
1061 (get_context_regcache): Handle fast tracepoints.
1062 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1064 (fast_tracepoint_from_jump_pad_address): New.
1065 (fast_tracepoint_from_ipa_tpoint_address): New.
1066 (collecting_t): New.
1067 (force_unlock_trace_buffer): New.
1068 (fast_tracepoint_collecting): New.
1071 (write_inferior_data_ptr): New.
1072 (target_tp_heap): New.
1073 (target_malloc): New.
1074 (download_agent_expr): New.
1076 (download_tracepoints): New.
1077 (download_trace_state_variables): New.
1078 (upload_fast_traceframes): New.
1079 (IPA_FIRST_TRACEFRAME): New.
1080 (IPA_NEXT_TRACEFRAME_1): New.
1081 (IPA_NEXT_TRACEFRAME): New.
1082 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1083 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1084 (gdb_jump_pad_buffer_end): New.
1085 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1086 (initialize_tracepoint): Adjust.
1087 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1088 buffer. Initialize the low module.
1089 * utils.c (PREFIX, TOOLNAME): New.
1090 (malloc_failure): Use PREFIX.
1091 (error): In the IPA, an error causes an exit.
1092 (fatal, warning): Use PREFIX.
1093 (internal_error): Use TOOLNAME.
1094 (NUMCELLS): Increase to 10.
1095 * configure, config.in: Regenerate.
1097 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1099 * server.c (handle_query) <qSupported>: Do two passes over the
1100 qSupported string to avoid nesting strtok.
1102 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1104 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1106 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1108 * configure: Regenerate.
1109 * proc-service.list: New.
1111 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1113 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1116 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1118 * gdbreplay.c (remote_open): Check error return from socket() call by
1119 its equality to -1 not by it being negative.
1120 * remote-utils.c (remote_open): Likewise.
1122 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1124 * config.h: Regenerate.
1126 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1128 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1129 doesn't provide PTRACE_GET_THREAD_AREA.
1131 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1133 * linux-m68k-low.c: Include <asm/ptrace.h>
1134 (ps_get_thread_area): Implement.
1136 2010-05-03 Doug Evans <dje@google.com>
1138 * event-loop.c (struct callback_event): New struct.
1139 (callback_list): New global.
1140 (append_callback_event, delete_callback_event): New functions.
1141 (process_callback): New function.
1142 (start_event_loop): Call it.
1143 * remote-utils.c (NOT_SCHEDULED): Define.
1144 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1145 moved out of readchar.
1146 (readchar): Rewrite. Call reschedule before returning.
1147 (reset_readchar): New function.
1148 (remote_close): Call it.
1149 (process_remaining, reschedule): New functions.
1150 * server.h (callback_handler_func): New typedef.
1151 (append_callback_event, delete_callback_event): Declare.
1153 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1155 * proc-service.c (ps_pglobal_lookup): Use
1156 thread_db_look_up_one_symbol.
1157 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1158 parameter. Use it instead of all_symbols_looked_up.
1159 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1161 (all_symbols_looked_up): Don't declare.
1162 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1163 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1165 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1166 Set all_symbols_looked_up here.
1167 (thread_db_look_up_one_symbol): New.
1168 (thread_db_get_tls_address): Adjust.
1169 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1170 thread_db object on the heap, and tentatively set it in the
1172 (thread_db_init): Don't set all_symbols_looked_up here.
1173 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1175 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1177 * linux-low.c (linux_kill, linux_detach): Adjust.
1178 (status_pending_p_callback): Remove redundant statement. Check
1179 for !TARGET_WAITIKIND_IGNORE, instead of
1180 TARGET_WAITKIND_STOPPED.
1181 (handle_tracepoints): Make sure LWP is locked. Adjust.
1182 (linux_wait_for_event_1): Adjust.
1183 (linux_cancel_breakpoints): New.
1184 (unsuspend_one_lwp): New.
1185 (unsuspend_all_lwps): New.
1186 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1187 (send_sigstop_callback): Change return type to int, add new
1188 `except' parameter and handle it.
1189 (suspend_and_send_sigstop_callback): New.
1190 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1191 pass them down. If SUSPEND, also increment the lwp's suspend
1193 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1194 (need_step_over_p): Don't consider suspended LWPs.
1195 (start_step_over): Adjust.
1196 (proceed_one_lwp): Change return type to int, add new `except'
1197 parameter and handle it.
1198 (unsuspend_and_proceed_one_lwp): New.
1199 (proceed_all_lwps): Use find_inferior instead of
1201 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1202 also decrement the suspend count of LWPs. Pass `except' down,
1203 instead of hacking its suspend count.
1204 (linux_pause_all): Add `freeze' parameter. Adjust.
1205 (linux_unpause_all): New.
1206 (linux_target_ops): Install linux_unpause_all.
1207 * server.c (handle_status): Adjust.
1208 * target.h (struct target_ops): New fields `unpause_all' and
1209 `cancel_breakpoints'. Add new parameter to `pause_all'.
1210 (pause_all): Add new `freeze' parameter.
1212 (cancel_breakpoints): New.
1213 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1215 (cmd_qtstart): Pause threads.
1216 (stop_tracing): Pause threads, and cancel breakpoints.
1217 * win32-low.c (win32_target_ops): Adjust.
1219 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1221 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1222 the inferior right away from here...
1223 (linux_wait_1): ... to here, and adjust to check the thread's
1224 last_resume_kind instead of the lwp's step or stop_expected flags.
1226 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1228 * README: Use consistent `GDB' and `GDBserver' spellings.
1230 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1232 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1233 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1234 (linux_detach_one_lwp): Assume the lwp is stopped.
1235 (any_thread_of): Delete.
1236 (linux_detach): Stop all lwps here. Don't blindly delete all
1238 (delete_lwp_callback): New.
1239 (linux_mourn): Delete all lwps of the process that is gone.
1240 (linux_wait_1): Don't delete the last lwp of the process here.
1241 * mem-break.h (mark_breakpoints_out): Declare.
1242 * mem-break.c (mark_breakpoints_out): New.
1243 (free_all_breakpoints): Use it.
1244 * server.c (handle_target_event): If the process is gone, mark
1246 * thread-db.c (struct thread_db) <create_bp>: New field.
1247 (thread_db_enable_reporting): Fix prototype. Store a thread event
1248 breakpoint reference in the thread_db struct.
1249 (thread_db_load_search): Clear the thread_db object.
1250 (try_thread_db_load_1): Ditto.
1251 (switch_to_process): New.
1252 (disable_thread_event_reporting): Use it.
1253 (remove_thread_event_breakpoints): New.
1254 (thread_db_detach, thread_db_mourn): Use it.
1256 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1258 * linux-low.c (linux_enable_event_reporting): New.
1259 (linux_wait_for_event_1, handle_extended_wait): Use it.
1261 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1263 * linux-low.c (linux_kill_one_lwp, linux_kill)
1264 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1265 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1266 SIGSTOP even if the LWP is stopped.
1267 (send_sigstop_callback): New.
1268 (stop_all_lwps): Use send_sigstop_callback instead.
1269 (linux_resume_one_thread): Adjust.
1270 (proceed_one_lwp): Still proceed an LWP that the client has
1271 requested to stop, if we haven't reported it as stopped yet. Make
1272 sure that LWPs the client want stopped, have a pending SIGSTOP.
1274 2010-04-26 Doug Evans <dje@google.com>
1276 * server.c (handle_general_set): Make static.
1278 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1279 Print received char after testing for error/eof instead of before.
1280 (input_interrupt): Tweak comment.
1282 2010-04-23 Doug Evans <dje@google.com>
1284 * server.c (start_inferior): Print inferior argv if --debug.
1286 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1288 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1289 * nto-x86-low.c: Include server.h
1291 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1293 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1294 be consistent with other sources of this directory.
1295 (init_registers_amd64): Correct name of source file of this function
1298 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1300 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1303 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1305 * win32-i386-low.c: Add 64-bit support.
1306 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1307 (init_registers_amd64): Declare.
1308 (mappings): Add 64-bit version of array.
1309 (init_windows_x86): New function.
1310 (the_low_target): Change init_arch field to init_windows_x86.
1312 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1314 * win32-low.c: Adapt to support also 64-bit architecture.
1315 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1316 (get_image_name): Use SIZE_T type for local variable `done'.
1317 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1318 (toolhelp_get_dll_name): Idem.
1319 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1320 Use uintptr_t typecast to avoid warning.
1321 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1322 (handle_exception): Use phex_nz to avoid warning.
1323 (win32_wait): Remove unused local variable `process'.
1325 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1327 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1330 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1332 * configure.ac: Use `ws2_32' library for srv_mingw.
1333 * configure: Regenerate.
1334 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1335 * remote-utils.c: Likewise.
1337 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1339 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1340 if __x86_64__ is defined.
1342 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1344 * configure: Regenerate.
1346 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1348 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1349 * target.h (target_ops): New get_tib_address field.
1350 * win32-low.h (win32_thread_info): Add thread_local_base field.
1351 * win32-low.c (child_add_thread): Add tlb argument.
1352 Set thread_local_base field to TLB.
1353 (get_child_debug_event): Adapt to child_add_thread change.
1354 (win32_get_tib_address): New function.
1355 (win32_target_ops): Set get_tib_address field to
1356 win32_get_tib_address.
1357 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1359 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1361 * linux-low.c (linux_mourn): Also remove the process.
1362 * server.c (handle_target_event): Don't remove the process here.
1363 * nto-low.c (nto_mourn): New.
1364 (nto_target_ops): Install it.
1365 * spu-low.c (spu_mourn): New.
1366 (spu_target_ops): Install it.
1367 * win32-low.c (win32_mourn): New.
1368 (win32_target_ops): Install it.
1370 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1372 * server.h (buffer_xml_printf): Remove redundant `;'.
1374 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1376 * regcache.c (set_register_cache): Invalidate regcaches before
1377 changing the register cache layout.
1378 (regcache_invalidate_one): Allow a NULL regcache.
1379 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1380 regcaches before changing the register cache layout or the target
1383 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1385 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1386 variable warning on Linux/x86-64.
1388 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1390 GDBserver disconnected tracing support.
1392 * linux-low.c (linux_remove_process): Delete.
1393 (add_lwp): Don't set last_resume_kind here.
1394 (linux_kill): Use `mourn'.
1395 (linux_detach): Use `thread_db_detach', and `mourn'.
1397 (linux_attach_lwp_1): Adjust comment.
1398 (linux_attach): last_resume_kind moved the thread_info; adjust.
1399 (status_pending_p_callback): Adjust.
1400 (linux_wait_for_event_1): Adjust.
1401 (count_events_callback, select_singlestep_lwp_callback)
1402 (select_event_lwp_callback, cancel_breakpoints_callback)
1403 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1404 (proceed_one_lwp): Adjust.
1405 (linux_async): Add debug output.
1406 (linux_thread_stopped): New.
1407 (linux_pause_all): New.
1408 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1410 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1411 (thread_db_free): Delete declaration.
1412 (thread_db_detach, thread_db_mourn): Declare.
1413 * thread-db.c (thread_db_init): Use thread_db_mourn.
1414 (thread_db_free): Delete, split in two.
1415 (disable_thread_event_reporting): New.
1416 (thread_db_detach): New.
1417 (thread_db_mourn): New.
1419 * server.h (struct thread_info) <last_resume_kind>: New field.
1420 <attached>: Add comment.
1421 <gdb_detached>: New field.
1422 (handler_func): Change return type to int.
1423 (handle_serial_event, handle_target_event): Ditto.
1424 (gdb_connected): Declare.
1426 (disconnected_tracing): Declare.
1427 (stop_tracing): Declare.
1429 * server.c (handle_query) <qSupported>: Report support for
1430 disconnected tracing.
1431 (queue_stop_reply_callback): Account for running threads.
1432 (gdb_wants_thread_stopped): New.
1433 (gdb_wants_all_threads_stopped): New.
1434 (gdb_reattached_process): New.
1435 (handle_status): Clear the `gdb_detached' flag of all processes.
1436 In all-stop, stop all threads.
1437 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1438 (process_serial_event): If the remote connection breaks, or if an
1439 exit was forced with "monitor exit", force an event loop exit.
1440 Handle disconnected tracing on detach.
1441 (handle_serial_event): Adjust.
1442 (handle_target_event): If GDB isn't connected, forward events back
1443 to the inferior, unless the last process exited, in which case,
1444 exit gdbserver. Adjust interface.
1446 * remote-utils.c (remote_open): Don't block in accept. Instead
1447 register an event loop source on the listen socket file
1448 descriptor. Refactor bits into ...
1449 (listen_desc): ... this new global.
1450 (gdb_connected): ... this new function.
1451 (enable_async_notification): ... this new function.
1452 (handle_accept_event): ... this new function.
1453 (remote_close): Clear remote_desc.
1455 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1457 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1459 (mourn_inferior): Define.
1460 (target_process_qsupported): Avoid the dangling else problem.
1461 (thread_stopped): Define.
1462 (pause_all): Define.
1463 (target_waitstatus_to_string): Declare.
1464 * target.c (target_waitstatus_to_string): New.
1466 * tracepoint.c (tracing): Make extern.
1467 (disconnected_tracing): New.
1468 (stop_tracing): Make extern. Handle tracing stops due to GDB
1470 (cmd_qtdisconnected): New.
1471 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1472 (handle_tracepoint_general_set): Handle QTDisconnected.
1474 * event-loop.c (event_handler_func): Change return type to int.
1475 (process_event): Bail out if the event handler wants the event
1477 (handle_file_event): Ditto.
1478 (start_event_loop): Bail out if the event handler wants the event
1481 * nto-low.c (nto_target_ops): Adjust.
1482 * spu-low.c (spu_wait): Don't remove the process here.
1483 (spu_target_ops): Adjust.
1484 * win32-low.c (win32_wait): Don't remove the process here.
1485 (win32_target_ops): Adjust.
1487 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1489 * regcache.c (realloc_register_cache): Invalidate inferior's
1490 regcache before recreating it.
1492 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1494 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1496 2010-04-09 Stan Shebs <stan@codesourcery.com>
1497 Pedro Alves <pedro@codesourcery.com>
1499 * server.h (LONGEST): New.
1500 (struct thread_info) <while_stepping>: New field.
1501 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1503 (initialize_tracepoint, handle_tracepoint_general_set)
1504 (handle_tracepoint_query, tracepoint_finished_step)
1505 (tracepoint_was_hit, release_while_stepping_state_list):
1506 (current_traceframe): Declare.
1507 * server.c (handle_general_set): Handle tracepoint packets.
1509 (write_memory): New.
1510 (handle_search_memory_1): Use read_memory.
1511 (handle_query): Report support for conditional tracepoints, trace
1512 state variables, and tracepoint sources. Handle tracepoint
1514 (main): Initialize the tracepoints module.
1515 (process_serial_event): Handle traceframe reads/writes.
1517 * linux-low.c (handle_tracepoints): New.
1518 (linux_wait_1): Call it.
1519 (linux_resume_one_lwp): Handle while-stepping.
1520 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1521 (linux_target_ops): Install them.
1522 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1524 * linux-x86-low.c (x86_supports_tracepoints): New.
1525 (the_low_target). Install it.
1527 * mem-break.h (delete_breakpoint): Declare.
1528 * mem-break.c (delete_breakpoint): Make external.
1530 * target.h (struct target_ops): Add `supports_tracepoints',
1531 `read_pc', and `write_pc' fields.
1532 (target_supports_tracepoints): Define.
1533 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1536 * regcache.h (struct regcache) <registers_owned>: New field.
1537 (init_register_cache, regcache_cpy): Declare.
1538 (regcache_read_pc, regcache_write_pc): Declare.
1539 (register_cache_size): Declare.
1540 (supply_regblock): Declare.
1541 * regcache.c (init_register_cache): New.
1542 (new_register_cache): Use it.
1543 (regcache_cpy): New.
1544 (register_cache_size): New.
1545 (supply_regblock): New.
1546 (regcache_read_pc, regcache_write_pc): New.
1548 * tracepoint.c: New.
1550 * Makefile.in (OBS): Add tracepoint.o.
1551 (tracepoint.o): New rule.
1553 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1555 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1557 (i386-mmx.c): Likewise.
1558 (i386-mmx-linux.o): Likewise.
1559 (i386-mmx-linux.c): Likewise.
1561 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1562 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1563 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1564 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1566 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1567 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1568 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1570 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1572 * Makefile.in (clean): Updated.
1574 (i386-avx.c): Likewise.
1575 (i386-avx-linux.o): Likewise.
1576 (i386-avx-linux.c): Likewise.
1577 (amd64-avx.o): Likewise.
1578 (amd64-avx.c): Likewise.
1579 (amd64-avx-linux.o): Likewise.
1580 (amd64-avx-linux.c): Likewise.
1582 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1583 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1584 (srv_amd64_regobj): Add amd64-avx.o.
1585 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1586 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1587 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1588 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1589 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1590 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1591 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1593 * i387-fp.c: Include "i386-xstate.h".
1595 (i387_cache_to_xsave): Likewise.
1596 (i387_xsave_to_cache): Likewise.
1597 (x86_xcr0): Likewise.
1599 * i387-fp.h (i387_cache_to_xsave): Likewise.
1600 (i387_xsave_to_cache): Likewise.
1601 (x86_xcr0): Likewise.
1603 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1604 * linux-crisv32-low.c (target_regsets): Likewise.
1605 * linux-m68k-low.c (target_regsets): Likewise.
1606 * linux-mips-low.c (target_regsets): Likewise.
1607 * linux-ppc-low.c (target_regsets): Likewise.
1608 * linux-s390-low.c (target_regsets): Likewise.
1609 * linux-sh-low.c (target_regsets): Likewise.
1610 * linux-sparc-low.c (target_regsets): Likewise.
1611 * linux-xtensa-low.c (target_regsets): Likewise.
1613 * linux-low.c: Include <sys/uio.h>.
1614 (regsets_fetch_inferior_registers): Support nt_type.
1615 (regsets_store_inferior_registers): Likewise.
1616 (linux_process_qsupported): New.
1617 (linux_target_ops): Add linux_process_qsupported.
1619 * linux-low.h (regset_info): Add nt_type.
1620 (linux_target_ops): Add process_qsupported.
1622 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1624 (init_registers_i386_avx_linux): New.
1625 (init_registers_amd64_avx_linux): Likewise.
1626 (xmltarget_i386_linux_no_xml): Likewise.
1627 (xmltarget_amd64_linux_no_xml): Likewise.
1628 (PTRACE_GETREGSET): Likewise.
1629 (PTRACE_SETREGSET): Likewise.
1630 (x86_fill_xstateregset): Likewise.
1631 (x86_store_xstateregset): Likewise.
1632 (use_xml): Likewise.
1633 (x86_linux_update_xmltarget): Likewise.
1634 (x86_linux_process_qsupported): Likewise.
1635 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1636 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1637 init_registers_i386_linux here. Call
1638 x86_linux_update_xmltarget.
1639 (the_low_target): Add x86_linux_process_qsupported.
1641 * server.c (handle_query): Call target_process_qsupported.
1643 * target.h (target_ops): Add process_qsupported.
1644 (target_process_qsupported): New.
1646 2010-04-03 Pedro Alves <pedro@codesourcery.com>
1648 * inferiors.c (add_thread): Set last_status kind to
1649 TARGET_WAITKIND_IGNORE.
1650 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1651 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1652 (linux_wait_1): Move `thread' local definition to block that uses
1653 it. Don't NULL initialize `event_child'.
1654 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1655 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1656 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1658 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1660 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1661 an extended waitstatus, or by a watchpoint.
1662 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1663 thread was stepping or has been stopped by a watchpoint.
1665 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1667 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1668 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1669 of another, then delete the previous, and validate all
1671 (validate_inserted_breakpoint): New.
1672 (delete_disabled_breakpoints): New.
1673 (validate_breakpoints): New.
1674 (check_mem_read): Validate breakpoints before trusting their
1675 shadow. Delete disabled breakpoints.
1676 (check_mem_write): Validate breakpoints before trusting they
1677 should be inserted. Delete disabled breakpoints.
1678 * mem-break.h (validate_breakpoints):
1679 * server.c (handle_query): Validate breakpoints when we see a
1682 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1684 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1685 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1686 if we could tell there's a GDB breakpoint at stop_pc.
1687 (need_step_over_p): Don't do a step over if we find a GDB
1688 breakpoint at the resume PC.
1690 * mem-break.c (struct raw_breakpoint): New.
1691 (enum bkpt_type): New type `gdb_breakpoint'.
1692 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1693 fields. New field `raw'.
1694 (find_raw_breakpoint_at): New.
1695 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1697 (set_breakpoint_at): Adjust.
1698 (delete_raw_breakpoint): New.
1699 (release_breakpoint): New.
1700 (delete_breakpoint): Rename to...
1701 (delete_breakpoint_1): ... this. Add proc parameter. Use
1702 release_breakpoint. Return ENOENT.
1703 (delete_breakpoint): Reimplement.
1704 (find_breakpoint_at): Delete.
1705 (find_gdb_breakpoint_at): New.
1706 (delete_breakpoint_at): Delete.
1707 (set_gdb_breakpoint_at): New.
1708 (delete_gdb_breakpoint_at): New.
1709 (gdb_breakpoint_here): New.
1710 (set_reinsert_breakpoint): Use release_breakpoint.
1711 (uninsert_breakpoint): Rename to ...
1712 (uninsert_raw_breakpoint): ... this.
1713 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1714 (reinsert_raw_breakpoint): Change parameter type to
1716 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1718 (check_breakpoints): Adjust. Use release_breakpoint.
1719 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1720 (breakpoint_inserted_here): Ditto.
1721 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1722 Don't trust the breakpoint's shadow if it is not inserted.
1723 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1724 (delete_all_breakpoints): Adjust.
1725 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1726 use delete_breakpoint_1.
1728 * mem-break.h (breakpoints_supported): Delete declaration.
1729 (set_gdb_breakpoint_at): Declare.
1730 (gdb_breakpoint_here): Declare.
1731 (delete_breakpoint_at): Delete.
1732 (delete_gdb_breakpoint_at): Declare.
1734 * server.h (struct raw_breakpoint): Forward declare.
1735 (struct process_info): New field `raw_breakpoints'.
1737 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1740 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1742 * linux-low.c (status_pending_p_callback): Fix comment.
1743 (linux_wait_for_event_1): Move most of the internal breakpoint
1744 handling from here...
1745 (linux_wait_1): ... to here.
1746 (count_events_callback): New.
1747 (select_singlestep_lwp_callback): New.
1748 (select_event_lwp_callback): New.
1749 (cancel_breakpoints_callback): New.
1750 (select_event_lwp): New.
1751 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1752 priority to all LWPs that have had events that should be reported
1753 to the client. Cancel breakpoints when about to reporting the
1754 event to the client, not while stopping lwps. No longer cancel
1755 finished single-steps here.
1756 (cancel_finished_single_step): Delete.
1757 (cancel_finished_single_steps): Delete.
1759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1761 * mem-break.c (enum bkpt_type): New.
1762 (struct breakpoint): New field `type'.
1763 (set_breakpoint_at): Change return type to struct breakpoint
1764 pointer. Set type to `other_breakpoint' by default.
1765 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1766 in the breakpoint list.
1767 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1768 (reinsert_breakpoint): Rename to ...
1769 (reinsert_raw_breakpoint): ... this.
1770 (reinsert_breakpoints_at): Adjust.
1771 * mem-break.h (struct breakpoint): Declare.
1772 (set_breakpoint_at): Change return type to struct breakpoint
1775 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1777 * server.c (handle_query): Assign, not compare.
1779 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1781 Teach linux gdbserver to step-over-breakpoints.
1783 * linux-low.c (can_hardware_single_step): New.
1784 (supports_breakpoints): New.
1785 (handle_extended_wait): If stopping threads, read the stop pc of
1788 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1789 low target doesn't support retrieving the PC.
1790 (add_lwp): Set last_resume_kind to resume_continue.
1791 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1792 (linux_attach): Don't clear stop_expected. Set the lwp's
1793 last_resume_kind to resume_stop.
1794 (linux_detach_one_lwp): Don't check for removed breakpoints.
1795 (check_removed_breakpoint): Delete.
1796 (status_pending_p): Rename to ...
1797 (status_pending_p_callback): ... this. Don't check for removed
1798 breakpoints. Don't consider threads that are stopped from GDB's
1800 (linux_wait_for_lwp): Always read the stop_pc here.
1801 (cancel_breakpoint): New.
1802 (step_over_bkpt): New global.
1803 (linux_wait_for_event_1): Implement stepping over breakpoints.
1804 (gdb_wants_lwp_stopped): New.
1805 (gdb_wants_all_stopped): New.
1806 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1807 single-step traps here. Store the thread's last reported target
1809 (send_sigstop): Don't clear stop_expected. Always set it,
1811 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1812 (cancel_finished_single_step): New.
1813 (cancel_finished_single_steps): New.
1814 (wait_for_sigstop): Don't cancel finished single-step traps here.
1815 (linux_resume_one_lwp): Don't check for removed breakpoints.
1816 Don't set `step' on non-hardware step archs.
1817 (linux_set_resume_request): Ignore resume_stop requests if already
1818 stopping or stopped. Set the lwp's last_resume_kind.
1819 (resume_status_pending_p): Don't check for removed breakpoints.
1820 (need_step_over_p): New.
1821 (start_step_over): New.
1822 (finish_step_over): New.
1823 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1824 requests. Clear the thread's last reported target waitstatus.
1825 Don't use the `suspended' flag. Don't consider pending breakpoints.
1826 (linux_resume): Start a step-over if necessary.
1827 (proceed_one_lwp): New.
1828 (proceed_all_lwps): New.
1829 (unstop_all_lwps): New.
1830 * linux-low.h (struct lwp_info): Rewrite comment for the
1831 `suspended' flag. Add the `stop_pc' field. Delete the
1832 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1833 Add `'last_resume_kind' and `need_step_over' fields.
1834 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1835 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1836 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1837 (set_raw_breakpoint_at): New.
1838 (set_breakpoint_at): Rewrite to use it.
1839 (reinsert_breakpoint_handler): Delete.
1840 (set_reinsert_breakpoint): New.
1841 (reinsert_breakpoint_by_bp): Delete.
1842 (delete_reinsert_breakpoints): New.
1843 (uninsert_breakpoint): Rewrite.
1844 (uninsert_breakpoints_at): New.
1845 (reinsert_breakpoint): Rewrite.
1846 (reinsert_breakpoints_at): New.
1847 (check_breakpoints): Rewrite.
1848 (breakpoint_here): New.
1849 (breakpoint_inserted_here): New.
1850 (check_mem_read): Adjust.
1851 * mem-break.h (breakpoints_supported, breakpoint_here)
1852 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1853 (reinsert_breakpoint_by_bp): Delete declaration.
1854 (delete_reinsert_breakpoints): Declare.
1855 (reinsert_breakpoint): Delete declaration.
1856 (reinsert_breakpoints_at): Declare.
1857 (uninsert_breakpoint): Delete declaration.
1858 (uninsert_breakpoints_at): Declare.
1859 (check_breakpoints): Adjust prototype.
1860 * server.h: Adjust include order.
1861 (struct thread_info): Declare here. Add a `last_status' field.
1863 2010-03-23 Michael Snyder <msnyder@vmware.com>
1865 * server.c (crc32): New function.
1866 (handle_query): Add handling for 'qCRC:' request.
1868 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1870 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1871 lwp had been stopped by a watchpoint.
1873 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1875 * server.h (internal_error): Declare.
1876 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1877 * utils.c (internal_error): New function.
1879 2010-03-15 Andreas Schwab <schwab@redhat.com>
1881 * configure.srv: Fix typo setting srv_regobj.
1883 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1885 * linux-low.c (fetch_register): Avoid passing a non string literal
1887 (usr_store_inferior_registers): Ditto.
1889 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1891 * linux-low.c (linux_write_memory): Bail out early if peeking
1894 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1896 * linux-low.h (struct lwp_info): New fields
1897 `stopped_by_watchpoint' and `stopped_data_address'.
1898 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1899 here, and cache them in the lwp object.
1900 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1902 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1904 (linux_stopped_by_watchpoint): Rewrite.
1905 (linux_stopped_data_address): Rewrite.
1907 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1909 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1910 switching the current inferior, not before.
1912 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1914 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1915 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1916 i386-linux.c and amd64-linux.c.
1917 (reg-i386.o): Removed.
1918 (reg-i386.c): Likewise.
1919 (reg-i386-linux.o): Likewise.
1920 (reg-i386-linux.c): Likewise.
1921 (reg-x86-64.o): Likewise.
1922 (reg-x86-64.c): Likewise.
1923 (reg-x86-64-linux.o): Likewise.
1924 (reg-x86-64-linux.c): Likewise.
1927 (i386-linux.o): Likewise.
1928 (i386-linux.c): Likewise.
1929 (amd64.o): Likewise.
1930 (amd64.c): Likewise.
1931 (amd64-linux.o): Likewise.
1932 (amd64-linux.c): Likewise.
1934 * configure.srv (srv_i386_regobj): New.
1935 (srv_i386_linux_regobj): Likewise.
1936 (srv_amd64_regobj): Likewise.
1937 (srv_amd64_linux_regobj): Likewise.
1938 (srv_i386_32bit_xmlfiles): Likewise.
1939 (srv_i386_64bit_xmlfiles): Likewise.
1940 (srv_i386_xmlfiles): Likewise.
1941 (srv_amd64_xmlfiles): Likewise.
1942 (srv_i386_linux_xmlfiles): Likewise.
1943 (srv_amd64_linux_xmlfiles): Likewise.
1944 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1945 srv_xmlfiles to $srv_i386_xmlfiles.
1946 (i[34567]86-*-mingw32ce*): Likewise.
1947 (i[34567]86-*-mingw*): Likewise.
1948 (i[34567]86-*-nto*): Likewise.
1949 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1950 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1951 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1952 (x86_64-*-linux*): Likewise.
1954 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1955 (init_registers_amd64_linux): New.
1956 (x86_arch_setup): Replace init_registers_x86_64_linux with
1957 init_registers_amd64_linux.
1959 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1961 * configure.ac: Check for libdl. If it is not available link against
1962 static libthread_db.
1963 * configure: Regenerate.
1965 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1969 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1970 handing a read watchpoint.
1971 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1973 2010-02-12 Doug Evans <dje@google.com>
1975 * linux-low.c (linux_supports_tracefork_flag): Document.
1976 (linux_look_up_symbols): Add comment.
1978 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1980 * regcache.c (supply_register): Clear regcache if buf is NULL.
1982 2010-02-02 Nicolas Roche <roche@sourceware.org>
1983 Joel Brobecker <brobecker@adacore.com>
1985 * inferiors.c (find_inferior): Add function documentation.
1986 (unloaded_dll): Handle the case where the unloaded dll has not
1987 been previously registered in the dll list.
1989 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1991 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1992 (thumb2_breakpoint): New.
1993 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1995 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1997 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1998 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2001 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2003 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2005 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2007 * linux-s390-low.c (s390_collect_ptrace_register)
2008 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2010 2010-01-21 Doug Evans <dje@google.com>
2012 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2013 (PTRACE_ARG4_TYPE): New macro.
2014 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2015 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2016 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2017 (usr_store_inferior_registers): Ditto.
2018 (linux_read_memory, linux_write_memory): Ditto.
2019 (linux_test_for_tracefork): Ditto.
2021 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2022 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2024 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2026 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2029 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2031 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2032 prototype to take a regcache. Adjust.
2034 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2036 * regcache.h (struct thread_info): Forward declare.
2037 (struct regcache): New.
2038 (new_register_cache): Adjust prototype.
2039 (get_thread_regcache): Declare.
2040 (free_register_cache): Adjust prototype.
2041 (registers_to_string, registers_from_string): Ditto.
2042 (supply_register, supply_register_by_name, collect_register)
2043 (collect_register_as_string, collect_register_by_name): Ditto.
2044 * regcache.c (struct inferior_regcache_data): Delete.
2045 (get_regcache): Rename to ...
2046 (get_thread_regcache): ... this. Adjust. Switch inferior before
2048 (regcache_invalidate_one): Adjust.
2049 (regcache_invalidate): Fix prototype.
2050 (new_register_cache): Return the new register cache.
2051 (free_register_cache): Change prototype.
2052 (realloc_register_cache): Adjust.
2053 (registers_to_string): Change prototype to take a regcache. Adjust.
2054 (registers_from_string): Ditto.
2055 (register_data): Ditto.
2056 (supply_register): Ditto.
2057 (supply_register_by_name): Ditto.
2058 (collect_register): Ditto.
2059 (collect_register_as_string): Ditto.
2060 (collect_register_by_name): Ditto.
2061 * server.c (process_serial_event): Adjust.
2062 * linux-low.h (regset_fill_func, regset_store_func): Change
2064 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2066 * linux-low.c (get_stop_pc): Adjust.
2067 (check_removed_breakpoint): Adjust.
2068 (linux_wait_for_event): Adjust.
2069 (linux_resume_one_lwp): Adjust.
2070 (fetch_register): Add regcache parameter. Adjust.
2071 (usr_store_inferior_registers): Ditto.
2072 (regsets_fetch_inferior_registers): Ditto.
2073 (regsets_store_inferior_registers): Ditto.
2074 (linux_fetch_registers, linux_store_registers): Ditto.
2075 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2077 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2078 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2079 prototype to take a regcache.
2080 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2081 * remote-utils.c (convert_ascii_to_int, outreg)
2082 (prepare_resume_reply): Change prototype to take a regcache.
2084 * target.h (struct target_ops) <fetch_registers, store_registers>:
2085 Change prototype to take a regcache.
2086 (fetch_inferior_registers, store_inferior_registers): Change
2087 prototype to take a regcache. Adjust.
2088 * proc-service.c (ps_lgetregs): Adjust.
2089 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2090 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2091 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2092 take a regcache. Adjust.
2093 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2094 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2095 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2096 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2097 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2098 (cris_cannot_fetch_register):
2099 (cris_breakpoint_at): Change prototype to take a regcache.
2101 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2102 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2103 to take a regcache. Adjust.
2104 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2106 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2107 take a regcache. Adjust.
2108 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2109 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2110 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2111 * linux-mips-low.c (mips_get_pc):
2112 (mips_set_pc): Change prototype to take a regcache. Adjust.
2113 (mips_reinsert_addr): Adjust.
2114 (mips_collect_register): Change prototype to take a regcache.
2116 (mips_supply_register):
2117 (mips_collect_register_32bit, mips_supply_register_32bit)
2118 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2119 (mips_store_fpregset): Ditto.
2120 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2122 (parse_spufs_run): Adjust.
2123 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2124 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2125 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2126 take a regcache. Adjust.
2127 * linux-s390-low.c (s390_collect_ptrace_register)
2128 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2129 (s390_set_pc): Change prototype to take a regcache. Adjust.
2130 (s390_arch_setup): Adjust.
2131 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2132 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2133 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2134 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2135 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2137 (sparc_breakpoint_at): Adjust.
2138 * linux-xtensa-low.c (xtensa_fill_gregset):
2139 (xtensa_store_gregset):
2140 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2141 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2142 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2143 prototype to take a regcache. Adjust.
2144 * win32-arm-low.c (arm_fetch_inferior_register)
2145 (arm_store_inferior_register): Change prototype to take a
2147 * win32-i386-low.c (i386_fetch_inferior_register)
2148 (i386_store_inferior_register): Change prototype to take a
2150 * win32-low.c (child_fetch_inferior_registers)
2151 (child_store_inferior_registers): Change prototype to take a
2153 (win32_wait): Adjust.
2154 (win32_fetch_inferior_registers): Change prototype to take a
2156 (win32_store_inferior_registers): Adjust.
2157 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2158 store_inferior_register>: Change prototype to take a regcache.
2160 2010-01-20 Doug Evans <dje@google.com>
2162 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2164 (linux_wait_for_event1, linux_init_signals): Ditto.
2165 (W_STOPCODE): Provide definition if missing.
2167 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2169 * linux-low.c (linux_core_of_thread): New.
2170 (compare_ints, show_process, list_threads): New.
2171 (linux_qxfer_osdata): Report threads and cores.
2172 (linux_target_op): Register linux_core_of_thread.
2173 * remote-utils.c (prepare_resume_reply): Report the core.
2174 (buffer_xml_printf): Support %d specifier.
2175 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2177 (handle_query): Handle qXfer:threads. Announce availability
2179 * target.h (struct target_ops): New field core_of_thread.
2181 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2183 * Makefile.in (clean): Remove new generated files.
2184 (reg-s390.o, reg-s390.c): Remove rules.
2185 (reg-s390x.o, reg-s390x.c): Likewise.
2186 (s390-linux32.o, s390-linux32.c): Add rules.
2187 (s390-linux64.o, s390-linux64.c): Likewise.
2188 (s390x-linux64.o, s390x-linux64.c): Likewise.
2189 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2190 * linux-s390-low.c: Include <elf.h>.
2191 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2192 (init_registers_s390): Remove prototype.
2193 (init_registers_s390x): Likewise.
2194 (init_registers_s390_linux32): Add prototype.
2195 (init_registers_s390_linux64): Likewise.
2196 (init_registers_s390x_linux64): Likewise.
2197 (s390_num_regs_3264): New define.
2198 (s390_regmap_3264): New global variable.
2199 (s390_cannot_fetch_register): Remove obsolete check.
2200 (s390_cannot_store_register): Likewise.
2201 (s390_collect_ptrace_register): Handle upper/lower register halves.
2202 (s390_supply_ptrace_register): Likewise.
2203 (s390_fill_gregset): Update to register number changes.
2204 (s390_get_hwcap): New routine.
2205 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2206 Install appropriate regmap and register set.
2208 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2210 * server.c (gdbserver_version): Update copyright year to 2010.
2211 * gdbreplay.c (gdbreplay_version): Likewise.
2213 2009-12-28 Doug Evans <dje@google.com>
2215 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2216 elf/external.h. Include <elf.h> instead but only if necessary.
2218 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2220 * linux-low.c (linux_remove_process): Remove `detaching'
2221 parameter. Don't release/detach from thread_db here.
2222 (linux_kill): Release/detach from thread_db here, ...
2223 (linux_detach): ... and here, before actually detaching.
2224 (linux_wait_1): ... and here, when a process exits.
2225 * thread-db.c (any_thread_of): New.
2226 (thread_db_free): Switch the current inferior to a thread of the
2229 2009-12-21 Doug Evans <dje@google.com>
2231 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2233 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2234 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2235 warning ifndef __NR_tkill. Move setting of errno there too.
2236 Delete unnecessary resetting of errno after syscall.
2237 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2239 * configure.ac: Check for dladdr.
2240 * config.in: Regenerate.
2241 * configure: Regenerate.
2242 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2243 (try_thread_db_load): Update.
2245 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2247 2009-12-18 Doug Evans <dje@google.com>
2249 * event-loop.c: Include unistd.h if it exists.
2251 * linux-low.c (my_waitpid): Move definition away from being in
2252 between linux_tracefork_child/linux_test_for_tracefork.
2254 * gdb_proc_service.h (psaddr_t): Fix type.
2255 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2256 signature to match glibc.
2258 2009-12-16 Doug Evans <dje@google.com>
2260 * linux-low.c (linux_read_memory): Fix argument to read.
2262 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2264 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2265 events, don't leave current_inferior pointing at null.
2267 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2269 * win32-low.c (LOG): Delete.
2270 (OUTMSG): Output to stderr.
2271 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2272 on compile time LOG macro.
2273 (win32_wait): Fix debug output.
2275 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2277 * win32-low.c (win32_add_one_solib): If the dll name is
2278 "ntdll.dll", prepend the system directory to the dll path.
2280 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2282 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2284 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2285 Vladimir Prus <vladimir@codesourcery.com>
2287 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2288 * configure.ac: Check for __mcoldfire__ and set
2289 gdb_cv_m68k_is_coldfire.
2290 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2291 reg-cf.o and reg-m68k.o.
2292 * configure: Regenerated.
2294 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2296 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2297 Pass it to thread_db_free.
2298 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2299 proper `detaching' argument to linux_remove_process.
2300 * linux-low.h (thread_db_free): Add `detaching' parameter.
2301 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2303 (thread_db_free): Add `detaching' parameter. Only
2304 call td_ta_clear_event if detaching from process.
2306 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2308 * thread-db.c (thread_db_free): Fix typo.
2310 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2313 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2315 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2317 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2318 with an i686 compiler.
2319 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2321 * configure: Rebuilt.
2323 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2327 * server.c (handle_search_memory_1): Correct read_addr initialization
2328 in loop for searching subsequent chunks.
2330 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2332 * configure.ac: New --with-libthread-db option.
2333 * thread-db.c: Allow direct dependence on libthread_db.
2334 (thread_db_free): Adjust.
2335 * config.in: Regenerate.
2336 * configure: Likewise.
2338 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2341 * thread-db.c (attach_thread): New function.
2342 (maybe_attach_thread): Return success/failure.
2343 (find_new_threads_callback): Adjust.
2344 (thread_db_find_new_threads): Loop until no new threads.
2346 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2348 * proc-service.c (ps_lgetregs): Formatting.
2350 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2352 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2353 * configure.ac: Adjust.
2354 * linux-low.h (struct process_info_private): Move members to struct
2356 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2357 * linux-low.c (linux_remove_process): Adjust.
2358 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2359 * server.c (handle_query): Move code ...
2360 (handle_monitor_command): ... here. New function.
2361 * target.h (struct target_ops): New member.
2362 * thread-db.c (struct thread_db): New.
2363 (libthread_db_search_path): New variable.
2364 (thread_db_create_event, thread_db_enable_reporting)
2365 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2366 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2367 (try_thread_db_load_1, dladdr_to_soname): New functions.
2368 (try_thread_db_load, thread_db_load_search): New functions.
2369 (thread_db_init): Search for libthread_db.
2370 (thread_db_free): New function.
2371 (thread_db_handle_monitor_command): Likewise.
2372 * config.in: Regenerate.
2373 * configure: Regenerate.
2375 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2377 * spu-low.c (spu_kill): Wait for inferior to terminate.
2378 Call clear_inferiors.
2379 (spu_detach): Call clear_inferiors.
2381 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2383 * aclocal.m4: Regenerate.
2384 * config.in: Likewise.
2385 * configure: Likewise.
2387 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2389 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2390 (parse_spufs_run): New function.
2391 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2392 (ppc_breakpoint_at): Handle SPU breakpoints.
2394 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2396 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2397 (SPUFS_MAGIC): Define.
2398 (spu_enumerate_spu_ids): New function.
2399 (linux_qxfer_spu): New function.
2400 (linux_target_ops): Install linux_qxfer_spu.
2402 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2404 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2405 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2406 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2407 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2408 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2409 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2410 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2411 (init_registers_powerpc_cell32l): Add prototype.
2412 (init_registers_powerpc_cell64l): Likewise.
2413 (ppc_arch_setup): Detect Cell/B.E. architecture.
2415 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2417 * Makefile.in (datarootdir): New variable.
2419 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2421 * linux-low.c (linux_write_memory): Update debugging output.
2422 * Makefile.in (clean): Add new descriptions.
2423 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2424 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2425 * configure.srv: Add new files for arm*-*-linux*.
2426 * linux-arm-low.c: Add new declarations.
2427 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2428 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2429 (HWCAP_VFPv3D16): New.
2430 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2431 instead of __IWMMXT__.
2432 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2433 (arm_arch_setup): New.
2434 (target_regsets): Remove #ifdef. Add VFP regset.
2435 (the_low_target): Use arm_arch_setup.
2437 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2439 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2440 the main thread again.
2442 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2444 Adding Neutrino gdbserver.
2445 * configure: Regenerated.
2446 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2447 * configure.srv (i[34567]86-*-nto*): New target.
2448 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2449 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2450 (nto_comctrl) [__QNX__]: New function.
2451 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2453 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2455 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2458 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2459 Pedro Alves <pedro@codesourcery.com>
2461 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2462 don't support CONTEXT_EXTENDED_REGISTERS.
2463 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2464 (the_low_target): Install them.
2465 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2466 failing with ERROR_PIPE_NOT_CONNECTED.
2468 2009-06-30 Doug Evans <dje@google.com>
2469 Pierre Muller <muller@ics.u-strasbg.fr>
2471 Add h/w watchpoint support to x86-linux, win32-i386.
2472 * Makefile.in (SFILES): Add i386-low.c
2473 (i386_low_h): Define.
2474 (i386-low.o): Add dependencies.
2475 (linux-x86-low.o): Add i386-low.h dependency.
2476 (win32-i386-low.o): Ditto.
2477 * i386-low.c: New file.
2478 * i386-low.h: New file.
2479 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2480 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2481 * linux-low.c (linux_add_process): Initialize arch_private.
2482 (linux_remove_process): Free arch_private.
2483 (add_lwp): Initialize arch_private.
2484 (delete_lwp): Free arch_private.
2485 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2487 * linux-low.h (process_info_private): New member arch_private.
2488 (lwp_info): New member arch_private.
2489 (linux_target_ops): New members new_process, new_thread,
2491 (ptid_of): New macro.
2492 * linux-x86-low.c: Include stddef.h, i386-low.h.
2493 (arch_process_info): New struct.
2494 (arch_lwp_info): New struct.
2495 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2496 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2497 (i386_dr_low_get_status): New function.
2498 (x86_insert_point, x86_remove_point): New functions.
2499 (x86_stopped_by_watchpoint): New function.
2500 (x86_stopped_data_address): New function.
2501 (x86_linux_new_process, x86_linux_new_thread): New functions.
2502 (x86_linux_prepare_to_resume): New function.
2503 (the_low_target): Add entries for insert_point, remove_point,
2504 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2506 * server.c (debug_hw_points): New global.
2507 (monitor_show_help): Document set debug-hw-points.
2508 (handle_query): Process "set debug-hw-points".
2509 * server.h (debug_hw_points): Declare.
2510 (paddress): Declare.
2511 * utils.c (NUMCELLS, CELLSIZE): New macros.
2512 (get_sell, xsnprintf, paddress): New functions.
2513 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2514 remove_point, stopped_by_watchpoint, stopped_data_address.
2515 * win32-i386-low.c: Include i386-low.h.
2516 (debug_reg_state): Replaces dr.
2517 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2518 (i386_dr_low_get_status): New function.
2519 (i386_insert_point, i386_remove_point): New functions.
2520 (i386_stopped_by_watchpoint): New function.
2521 (i386_stopped_data_address): New function.
2522 (i386_initial_stuff): Update.
2523 (get_thread_context,set_thread_context,i386_thread_added): Update.
2524 (the_low_target): Add entries for insert_point,
2525 remove_point, stopped_by_watchpoint, stopped_data_address.
2526 * win32-low.c (win32_insert_watchpoint): New function.
2527 (win32_remove_watchpoint): New function.
2528 (win32_stopped_by_watchpoint): New function.
2529 (win32_stopped_data_address): New function.
2530 (win32_target_ops): Add entries for insert_watchpoint,
2531 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2532 * win32-low.h (win32_target_ops): New members insert_point,
2533 remove_point, stopped_by_watchpoint, stopped_data_address.
2535 2009-06-25 Pedro Alves <pedro@codesourcery.com>
2537 * server.c (process_serial_event): Re-return unsupported, not
2538 error, if the type isn't recognized. Re-allow supporting only
2539 insert or remove packets. Also call require_running for
2540 breakpoints. Add missing break statement to default case. Tidy.
2541 * target.h (struct target_ops): Rename insert_watchpoint to
2542 insert_point, and remove_watchpoint to remove_point.
2544 * linux-low.h (struct linux_target_ops): Likewise.
2545 * linux-low.c (linux_insert_watchpoint): Rename to ...
2546 (linux_insert_point): ... this. Adjust.
2547 (linux_remove_watchpoint): Rename to ...
2548 (linux_remove_point): ... this. Adjust.
2549 (linux_target_ops): Adjust.
2550 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2551 (cris_insert_point): ... this.
2552 (cris_remove_watchpoint): Rename to ...
2553 (cris_remove_point): ... this.
2554 (the_low_target): Adjust.
2556 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2558 * server.c (handle_v_kill): Pass signal_pid to
2559 kill_inferior if multi_process is zero.
2561 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2563 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2564 * target.h (target_ops): Comment for *_watchpoint to make it clear
2565 the functions can get types '0' and '1'.
2567 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2569 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2570 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2571 * regcache.c (get_regcache): Likewise.
2572 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2573 * win32-low.c (child_fetch_inferior_registers): Remove check for
2576 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2577 Pedro Alves <pedro@codesourcery.com>
2579 * target.h (struct target_ops) <supports_multi_process>: New
2581 (target_supports_multi_process): New.
2582 * server.c (handle_query): Even if GDB reports support, only
2583 enable multi-process if the target also supports it. Report
2584 multi-process support only if the target backend supports it.
2585 * linux-low.c (linux_supports_multi_process): New function.
2586 (linux_target_ops): Install it as target_supports_multi_process
2589 2009-05-24 Doug Evans <dje@google.com>
2591 Global renaming of find_thread_pid to find_thread_ptid.
2592 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2593 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2594 All callers updated.
2596 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2597 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2600 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2601 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2602 (linux_resume_one_lwp): Ditto.
2604 2009-05-23 Doug Evans <dje@google.com>
2606 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2607 from struct inferior_list_entry * to struct lwp_info *.
2608 All callers updated.
2610 2009-05-13 Doug Evans <dje@google.com>
2612 * linux-x86-low.c: Don't include assert.h.
2613 (x86_siginfo_fixup): Use fatal, not assert.
2614 (x86_arch_setup): Fix comment.
2616 2009-05-12 Doug Evans <dje@google.com>
2618 Biarch support for i386/amd64 gdbserver.
2619 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2620 Add linux-x86-low.c.
2621 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2622 (linux-x86-low.o): Add.
2623 * linux-x86-64-low.c: Delete.
2624 * linux-i386-low.c: Delete.
2625 * linux-x86-low.c: New file.
2626 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2628 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2630 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2631 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2632 (linux_child_pid_to_exec_file): New function.
2633 (elf_64_header_p, elf_64_file_p): New functions.
2634 (siginfo_fixup): New function.
2635 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2636 give target a chance to convert layout.
2637 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2638 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2640 2009-05-07 Doug Evans <dje@google.com>
2642 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2643 (regsets_store_inferior_registers): Ditto.
2645 2009-05-06 Pedro Alves <pedro@codesourcery.com>
2649 * linux-low.c (must_set_ptrace_flags): Delete.
2650 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2652 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2653 `lwp->must_set_ptrace_flags' instead.
2654 (linux_wait_for_event_1): Set ptrace options here.
2655 (linux_wait_1): ... not here.
2657 2009-04-30 Doug Evans <dje@google.com>
2659 * inferiors.c (started_inferior_callback): New function.
2660 (attached_inferior_callback): New function.
2661 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2662 * server.c (print_started_pid, print_attached_pid): New functions.
2663 (detach_or_kill_for_exit): New function.
2664 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2665 * server.h (have_started_inferiors_p): Declare.
2666 (have_attached_inferiors_p): Declare.
2668 * inferiors.c (remove_process): Fix memory leak, free process.
2669 * linux-low.c (linux_remove_process): New function.
2670 (linux_kill): Call it instead of remove_process.
2671 (linux_detach, linux_wait_1): Ditto.
2673 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2675 * configure.srv: Add x86 Windows CE target.
2677 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2679 * inferiors.c (get_thread_process): Make global.
2680 * server.h (get_thread_process): Add prototype.
2681 * thread-db.c (find_one_thread): Use get_thread_process
2682 instead of current_process.
2683 (thread_db_get_tls_address): Do not crash if called when
2684 thread layer is not yet initialized.
2686 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2688 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2689 * spu-low.c (current_tid): Rename to ...
2690 (current_ptid): ... this.
2691 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2692 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2693 ptid_get_lwp (current_ptid) instead of current_tid.
2694 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2695 instead of current_tid. Use find_process_pid to verify pid
2696 argument is valid. Pass proper argument to remove_process.
2697 (spu_thread_alive): Compare current_ptid instead of current_tid.
2698 (spu_resume): Likewise.
2700 2009-04-02 Pedro Alves <pedro@codesourcery.com>
2702 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2705 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2707 Implement the multiprocess extensions, and add linux multiprocess
2710 * server.h (ULONGEST): Declare.
2711 (struct ptid, ptid_t): New.
2712 (minus_one_ptid, null_ptid): Declare.
2713 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2714 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2715 (struct inferior_list_entry): Change `id' type from unsigned from
2717 (struct sym_cache, struct breakpoint, struct
2718 process_info_private): Forward declare.
2719 (struct process_info): Declare.
2720 (current_process): Declare.
2721 (all_processes): Declare.
2722 (initialize_inferiors): Declare.
2723 (add_thread): Adjust to use ptid_t.
2724 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2725 (add_process, remove_process, find_thread_pid): Declare.
2726 (find_inferior_id): Adjust to use ptid_t.
2727 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2728 (multi_process): Declare.
2729 (push_event): Adjust to use ptid_t.
2730 (read_ptid, write_ptid): Declare.
2731 (prepare_resume_reply): Adjust to use ptid_t.
2732 (clear_symbol_cache): Declare.
2733 * inferiors.c (all_processes): New.
2734 (null_ptid, minus_one_ptid): New.
2735 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2736 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2737 (add_thread): Change unsigned long to ptid. Remove gdb_id
2739 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2740 (gdb_id_to_thread): Rename to ...
2741 (find_thread_pid): ... this. Change unsigned long to ptid.
2742 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2743 (loaded_dll, pull_pid_from_list): Adjust.
2744 (add_process, remove_process, find_process_pid)
2745 (get_thread_process, current_process, initialize_inferiors): New.
2746 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2747 (struct target_waitstatus) <related_pid>: Ditto.
2748 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2750 (struct target_ops) <join>: Add `pid' argument.
2751 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2752 (struct target_ops) <wait>: Add `ptid' field. Change return type
2754 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2755 (mywait): Add `ptid' argument. Change return type to ptid_t.
2756 (target_pid_to_str): Declare.
2757 * target.c (set_desired_inferior): Adjust to use ptids.
2758 (mywait): Add new `ptid' argument. Adjust.
2759 (target_pid_to_str): New.
2760 * mem-break.h (free_all_breakpoints): Declare.
2761 * mem-break.c (breakpoints): Delelete.
2762 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2763 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2764 to use per-process breakpoint list.
2765 (free_all_breakpoints): New.
2766 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2767 (symbol_cache, all_symbols_looked_up): Delete.
2769 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2771 (prepare_resume_reply): Change ptid argument's type from unsigned
2772 long to ptid_t. Adjust. Implement W;process and X;process.
2773 (free_sym_cache, clear_symbol_cache): New.
2774 (look_up_one_symbol): Adjust to per-process symbol cache. *
2775 * server.c (cont_thread, general_thread, step_thread): Change type
2778 (multi_process): New.
2779 (last_ptid): Change type to ptid_t.
2780 (struct vstop_notif) <ptid>: Change type to ptid_t.
2781 (queue_stop_reply, push_event): Change `ptid' argument's type to
2783 (discard_queued_stop_replies): Add `pid' argument.
2784 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2785 changes. Don't reference the `attached' global.
2786 (attach_inferior): Adjust to mywait interface changes.
2787 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2788 features. Handle and report "multiprocess+". Handle
2790 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2792 (handle_v_kill): New.
2793 (handle_v_stopped): Adjust to use target_pid_to_str.
2794 (handle_v_requests): Allow multiple attaches and runs when
2795 multiprocess extensions are in effect. Handle "vKill".
2796 (myresume): Adjust to use ptids.
2797 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2798 (handle_status): Adjust to discard_queued_stop_replies interface
2800 (first_thread_of, kill_inferior_callback)
2801 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2802 (main): Call initialize_inferiors. Adjust to use ptids, killing
2803 and detaching from all inferiors. Handle multiprocess packet
2805 * linux-low.h: Include gdb_proc_service.h.
2806 (struct process_info_private): New.
2807 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2808 <lwpid_of>: Use ptid_get_lwp.
2809 (get_lwp_thread): Adjust.
2810 (struct lwp_info): Add `dead' member.
2811 (find_lwp_pid): Declare.
2812 * linux-low.c (thread_db_active): Delete.
2813 (new_inferior): Adjust comment.
2814 (inferior_pid): Delete.
2815 (linux_add_process): New.
2816 (handle_extended_wait): Adjust.
2817 (add_lwp): Change unsigned long to ptid.
2818 (linux_create_inferior): Add process to processes table. Adjust
2819 to use ptids. Don't set new_inferior here.
2820 (linux_attach_lwp): Rename to ...
2821 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2822 it. Adjust to use ptids.
2823 (linux_attach_lwp): New.
2824 (linux_attach): Add process to processes table. Don't set
2826 (struct counter): New.
2827 (second_thread_of_pid_p, last_thread_of_process_p): New.
2828 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2830 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2831 processes. Remove process from process table.
2832 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2833 to multiple processes.
2834 (any_thread_of): New.
2835 (linux_detach): Add `pid' argument, and handle it. Remove process
2836 from processes table.
2837 (linux_join): Add `pid' argument. Handle it.
2838 (linux_thread_alive): Change unsighed long argument to ptid_t.
2839 Consider dead lwps as not being alive.
2840 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2841 threads we're not interested in.
2842 (same_lwp, find_lwp_pid): New.
2843 (linux_wait_for_lwp): Change `pid' argument's type from int to
2845 (linux_wait_for_event): Rename to ...
2846 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2847 from int to ptid_t. Adjust.
2848 (linux_wait_for_event): New.
2849 (linux_wait_1): Add `ptid' argument. Change return type to
2850 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2851 that exit from the process table.
2852 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2854 (mark_lwp_dead): New.
2855 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2856 stopping all threads, mark its main lwp as dead.
2857 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2859 (fetch_register, usr_store_inferior_registers)
2860 (regsets_fetch_inferior_registers)
2861 (regsets_store_inferior_registers, linux_read_memory)
2862 (linux_write_memory): Inline `inferior_pid'.
2863 (linux_look_up_symbols): Adjust to use per-process
2865 (linux_request_interrupt): Adjust to use ptids.
2866 (linux_read_auxv): Inline `inferior_pid'.
2867 (initialize_low): Don't reference thread_db_active.
2868 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2869 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2870 (ps_getpid): Return the pid of the current inferior.
2871 * thread-db.c (proc_handle, thread_agent): Delete.
2872 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2874 (find_one_thread): Change argument type to ptid_t. Adjust to
2876 (maybe_attach_thread): Adjust to per-process data and ptids.
2877 (thread_db_find_new_threads): Ditto.
2878 (thread_db_init): Ditto.
2879 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2880 processes table. Adjust to use ptids.
2881 (spu_kill, spu_detach): Adjust interface. Remove process from
2883 (spu_join, spu_thread_alive): Adjust interface.
2884 (spu_wait): Adjust interface. Remove process from processes
2885 table. Adjust to use ptids.
2886 * win32-low.c (current_inferior_tid): Delete.
2887 (current_inferior_ptid): New.
2888 (debug_event_ptid): New.
2889 (thread_rec): Take a ptid. Adjust.
2890 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2891 (child_delete_thread): Ditto.
2892 (do_initial_child_stuff): Add `attached' argument. Add process to
2894 (child_fetch_inferior_registers, child_store_inferior_registers):
2896 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2897 (win32_attach): Pass 1 to do_initial_child_stuff.
2898 (win32_kill): Adjust interface. Remove process from processes
2900 (win32_detach): Ditto.
2901 (win32_join): Adjust interface.
2902 (win32_thread_alive): Take a ptid.
2903 (win32_resume): Adjust to use ptids.
2904 (get_child_debug_event): Ditto.
2905 (win32_wait): Adjust interface. Remove exiting process from
2908 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2910 Non-stop mode support.
2912 * server.h (non_stop): Declare.
2913 (gdb_client_data, handler_func): Declare.
2914 (delete_file_handler, add_file_handler, start_event_loop):
2916 (handle_serial_event, handle_target_event, push_event)
2917 (putpkt_notif): Declare.
2918 * target.h (enum resume_kind): New.
2919 (struct thread_resume): Replace `step' field by `kind' field.
2920 (TARGET_WNOHANG): Define.
2921 (struct target_ops) <wait>: Add `options' argument.
2922 <supports_non_stop, async, start_non_stop>: New fields.
2923 (target_supports_non_stop, target_async): New.
2924 (start_non_stop): Declare.
2925 (mywait): Add `options' argument.
2926 * target.c (mywait): Add `options' argument. Print child exit
2928 (start_non_stop): New.
2929 * server.c (non_stop, own_buf, mem_buf): New globals.
2930 (struct vstop_notif): New.
2931 (notif_queue): New global.
2932 (queue_stop_reply, push_event, discard_queued_stop_replies)
2933 (send_next_stop_reply): New.
2934 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2936 (attach_inferior): In non-stop mode, don't wait for the target
2938 (handle_general_set): Handle QNonStop.
2939 (handle_query): When handling qC, return the current general
2940 thread, instead of the first thread of the list.
2941 (handle_query): If the backend supports non-stop mode, include
2942 QNonStop+ in the qSupported query response.
2943 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2945 (handle_v_attach, handle_v_run): Handle non-stop mode.
2946 (handle_v_stopped): New.
2947 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2948 (myresume): Adjust to use resume_kind. Handle non-stop.
2949 (queue_stop_reply_callback): New.
2950 (handle_status): Handle non-stop mode.
2951 (main): Clear non_stop flag on reconnection. Use the event-loop.
2952 Refactor serial protocol handling from here ...
2953 (process_serial_event): ... to this new function. When GDB
2954 selects any thread, select one here. In non-stop mode, wait until
2955 GDB acks all pending events before exiting.
2956 (handle_serial_event, handle_target_event): New.
2957 * remote-utils.c (remote_open): Install remote_desc in the event
2959 (remote_close): Remove remote_desc from the event loop.
2960 (putpkt_binary): Rename to...
2961 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2962 (putpkt_binary): New as wrapper around putpkt_binary_1.
2963 (putpkt_notif): New.
2964 (prepare_resume_reply): In non-stop mode, don't change the
2966 * event-loop.c: New.
2967 * Makefile.in (OBJ): Add event-loop.o.
2968 (event-loop.o): New rule.
2970 * linux-low.h (pid_of): Moved here.
2972 (get_lwp_thread): Use lwpid_of.
2973 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2974 * linux-low.c (pid_of): Delete.
2975 (inferior_pid): Use lwpid_of.
2976 (linux_event_pipe): New.
2977 (target_is_async_p): New.
2979 (handle_extended_wait): Use lwpid_of.
2980 (add_lwp): Don't set lwpid field.
2981 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2982 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2983 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2984 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2985 first. Adjust to linux_wait_for_event interface changes. Use
2987 (linux_detach): Don't delete the main lwp here.
2988 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2989 (status_pending_p): Don't consider explicitly suspended lwps.
2990 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2991 pointer. Add OPTIONS argument. Change return type to int. Use
2992 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2993 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2994 pointer. Add status pointer argument. Return a pid instead of a
2995 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2996 changes. In non-stop mode, don't switch to a random thread.
2997 (linux_wait): Rename to...
2998 (linux_wait_1): ... this. Add target_options argument, and handle
2999 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3000 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3001 clean exit and signal exit code. Don't stop all threads in
3002 non-stop mode. In all-stop mode, only stop all threads when
3003 reporting a stop to GDB. Handle explicit thread stop requests.
3004 (async_file_flush, async_file_mark): New.
3006 (send_sigstop): Use lwpid_of.
3007 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3008 interface changes. In non-stop mode, don't switch to a random
3010 (linux_resume_one_lwp): Use lwpid_of.
3011 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3012 (linux_resume_one_thread): ... this. Handle resume_stop. In
3013 non-stop mode, don't look for pending flag in all threads.
3014 (resume_status_pending_p): Don't consider explicitly suspended
3016 (my_waitpid): Reimplement. Emulate __WALL.
3017 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3019 (sigchld_handler, linux_supports_non_stop, linux_async)
3020 (linux_start_non_stop): New.
3021 (linux_target_ops): Register linux_supports_non_stop, linux_async
3022 and linux_start_non_stop.
3023 (initialize_low): Install SIGCHLD handler.
3024 * thread-db.c (thread_db_create_event, find_one_thread)
3025 (thread_db_get_tls_address): Use lwpid_of.
3026 * win32-low.c (win32_detach): Adjust to use resume_kind.
3027 (win32_wait): Add `options' argument.
3028 * spu-low.c (spu_resume): Adjust to use resume_kind.
3029 (spu_wait): Add `options' argument.
3031 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3033 Decouple target code from remote protocol.
3035 * target.h (enum target_waitkind): New.
3036 (struct target_waitstatus): New.
3037 (struct target_ops) <wait>: Return an unsigned long. Take a
3038 target_waitstatus pointer instead of a char pointer.
3040 * target.c (mywait): Change prototype to return an unsigned long.
3041 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3042 * server.h (thread_from_wait, old_thread_from_wait): Delete
3044 (prepare_resume_reply): Change prototype to take a
3046 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3047 (last_status, last_ptid): New.
3048 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3049 pid instead of a signal.
3050 (attach_inferior): Remove "status" and "signal" parameters.
3052 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3054 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3055 (handle_v_requests, myresume): Remove "status" and "signal"
3057 (handle_status): New.
3058 (main): Delete local `status'. Adjust.
3059 * remote-utils.c: Include target.h.
3060 (prepare_resume_reply): Change prototype to take a
3061 target_waitstatus. Adjust.
3063 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3065 * spu-low.c (spu_wait): Adjust.
3066 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3068 (win32_wait): Adjust.
3070 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3072 * target.h (struct thread_resume): Delete leave_stopped member.
3073 (struct target_ops): Add a `n' argument to the `resume' callback.
3074 * server.c (start_inferior): Adjust.
3075 (handle_v_cont, myresume): Adjust.
3076 * linux-low.c (check_removed_breakpoint): Adjust to resume
3077 interface change, and to removed leave_stopped field.
3078 (resume_ptr): Delete.
3079 (struct thread_resume_array): New.
3080 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3081 resume interface change.
3082 (linux_continue_one_thread, linux_queue_one_thread)
3083 (resume_status_pending_p): Check if the resume field is NULL
3084 instead of checking the leave_stopped member.
3085 (linux_resume): Adjust to the target resume interface change.
3086 * spu-low.c (spu_resume): Adjust to the target resume interface
3088 * win32-low.c (win32_detach, win32_resume): Ditto.
3090 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3092 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3094 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3096 (linux_continue_one_thread): Only preserve the stepping flag if
3097 there's a pending breakpoint.
3099 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3101 * server.c (main): After the inferior having exited, call
3102 remote_close before exiting gdbserver.
3104 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3106 Fix size of FPSCR in Power 7 processors.
3107 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3108 (PPC_FEATURE_HAS_DFP): New #define.
3109 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3112 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3114 * server.c (handle_query) Whitespace and formatting.
3116 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3118 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3119 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3120 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3121 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3122 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3123 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3124 Makefile.in, configure.ac: Fix whitespace throughout.
3125 * configure: Regenerate.
3127 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3129 * inferiors.c (find_inferior): Make it safe for the callback
3130 function to delete the currently iterated inferior.
3132 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3134 * Makefile.in (linuw_low_h): Move higher.
3135 (thread-db.o): Depend on $(linux_low_h).
3137 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3139 Rename "process" to "lwp" throughout.
3141 * linux-low.c (all_processes): Rename to...
3142 (all_lwps): ... this.
3143 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3144 (add_process): Rename to ...
3145 (add_lwp): ... this. Adjust.
3146 (linux_create_inferior): Adjust.
3147 (linux_attach_lwp): Adjust.
3148 (linux_attach): Adjust.
3149 (linux_kill_one_process): Rename to ...
3150 (linux_kill_one_lwp): ... this. Adjust.
3151 (linux_kill): Adjust.
3152 (linux_detach_one_process): Rename to ...
3153 (linux_detach_one_lwp): ... this. Adjust.
3154 (linux_detach): Adjust.
3155 (check_removed_breakpoint): Adjust.
3156 (status_pending_p): Adjust.
3157 (linux_wait_for_process): Rename to ...
3158 (linux_wait_for_lwp): ... this. Adjust.
3159 (linux_wait_for_event): Adjust.
3160 (send_sigstop): Adjust.
3161 (wait_for_sigstop): Adjust.
3162 (stop_all_processes): Rename to ...
3163 (stop_all_lwps): ... this.
3164 (linux_resume_one_process): Rename to ...
3165 (linux_resume_one_lwp): ... this. Adjust.
3166 (linux_set_resume_request, linux_continue_one_thread)
3167 (linux_queue_one_thread, resume_status_pending_p)
3168 (usr_store_inferior_registers, regsets_store_inferior_registers)
3169 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3171 * linux-low.h (get_process): Rename to ...
3172 (get_lwp): ... this. Adjust.
3173 (get_thread_process): Rename to ...
3174 (get_thread_lwp): ... this. Adjust.
3175 (get_process_thread): Rename to ...
3176 (get_lwp_thread): ... this. Adjust.
3177 (struct process_info): Rename to ...
3178 (struct lwp_info): ... this.
3179 (all_processes): Rename to ...
3180 (all_lwps): ... this.
3181 * proc-service.c (ps_lgetregs): Adjust.
3182 * thread-db.c (thread_db_create_event, find_one_thread)
3183 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3185 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3187 * server.c (handle_query): Handle "qAttached".
3189 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3191 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3192 GPLv3, update license URL.
3194 2009-03-01 Doug Evans <dje@google.com>
3196 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3197 (server_h): Add gdb_signals.h.
3198 (signals.o): Update.
3199 * server.h (target_signal_from_host,target_signal_to_host_p)
3200 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3202 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3204 * remote-utils.c (getpkt): Also generate remote-debug
3205 information if noack_mode is set.
3207 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3209 * server.c (handle_query): Report qXfer:siginfo:read and
3210 qXfer:siginfo:write as supported and handle them.
3211 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3212 * linux-low.c (linux_xfer_siginfo): New.
3213 (linux_target_ops): Set it.
3215 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3217 * server.c (gdbserver_usage): Mention --remote-debug.
3218 (main): Accept '--remote-debug' switch.
3220 2009-01-18 Doug Evans <dje@google.com>
3222 * regcache.c (new_register_cache): No need to check result of xcalloc.
3223 * server.c (handle_search_memory): Back out calls to xmalloc,
3224 result is checked and error is returned to user upon failure.
3225 (handle_query): Ditto. Add more checks for result of malloc.
3226 (handle_v_cont): Check result of malloc, report error back to
3228 (handle_v_run): Ditto. Call freeargv.
3229 * server.h (freeargv): Declare.
3230 * utils.c (freeargv): New fn.
3232 2009-01-15 Doug Evans <dje@google.com>
3234 * gdbreplay.c (perror_with_name): Make arg const char *.
3235 * server.h (target_signal_to_name): Make return type const char *.
3236 * thread-db.c (thread_db_err_str): Make return type const char *.
3237 * utils.c (perror_with_name): Make arg const char *.
3239 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3241 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3242 when handling a EXIT_PROCESS_DEBUG_EVENT.
3244 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3246 * gdbreplay.c (gdbreplay_version): Update copyright year.
3247 * server.c (gdbserver_version): Likewise.
3249 2009-01-05 Doug Evans <dje@google.com>
3251 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3252 (handle_extended_wait): Improve comment.
3254 2008-12-13 Doug Evans <dje@google.com>
3256 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3257 * server.h (ATTR_MALLOC): New macro.
3258 (xmalloc,xcalloc,xstrdup): Declare.
3259 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3260 * inferiors.c: Ditto.
3261 * linux-low.c: Ditto.
3262 * mem-break.c: Ditto.
3263 * regcache.c: Ditto.
3264 * remote-utils.c: Ditto.
3267 * win32-low.c: Ditto.
3269 2008-12-12 Doug Evans <dje@google.com>
3271 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3272 in debugging printf.
3274 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3276 2008-12-09 Doug Evans <dje@google.com>
3278 * linux-low.h (struct process_info): Delete member tid, unused.
3279 * thread-db.c (find_one_thread): Update.
3280 (maybe_attach_thread): Update.
3282 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3284 * target.h (struct target_ops): Add qxfer_osdata member.
3285 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3287 (linux_qxfer_osdata): New functions.
3288 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3290 * server.c (handle_query): Handle "qXfer:osdata:read:".
3291 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3292 (buffer_xml_printf): New functions.
3293 * server.h (struct buffer): New.
3294 (buffer_grow_str, buffer_grow_str0): New macros.
3295 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3296 (buffer_xml_printf): Declare.
3298 2008-11-24 Doug Evans <dje@google.com>
3300 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3302 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3304 * server.c (handle_v_run): Always use the supplied argument list.
3306 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3308 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3309 (xtensa_regmap_table): Add entry for scompare1.
3311 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3313 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3314 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3315 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3316 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3317 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3318 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3319 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3320 XML target descriptions.
3321 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3322 when inferior is running on an ISA 2.05 or later processor. Add
3323 special case to return offset for full 64-bit slot of FPSCR when
3326 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3328 * Makefile.in (SFILES, clean): Added sparc64 files.
3329 (reg-sparc64.o, reg-sparc64.c): New.
3330 * configure.srv (sparc*-*-linux*): New configuration.
3331 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3332 syscall arguments for SPARC.
3333 (regsets_store_inferior_registers): Likewise.
3334 * linux-sparc-low.c: New file.
3336 2008-10-21 Doug Evans <dje@google.com>
3338 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3339 (READLINE_DIR,READLINE_DEP): Delete.
3340 (INTERNAL_CFLAGS): Update.
3341 (LINTFLAGS): Update.
3343 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3345 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3346 whole argv from the last run, not just argv[0].
3348 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3350 * regcache.c (new_register_cache): Return NULL if the register
3351 cache size isn't known yet.
3352 (free_register_cache): Avoid dereferencing a NULL regcache.
3354 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3356 * configure.srv: Merge MIPS and MIPS64.
3358 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3360 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3362 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3364 * Makefile.in: Add required vsx dependencies.
3366 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3367 Declare init_registers_powerpc_vsx32l.
3368 Declare init_registers_powerpc_vsx64l.
3369 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3370 (ppc_arch_setup): Check for VSX in hwcap.
3371 (ppc_fill_vsxregset): New function.
3372 (ppc_store_vsxregset): New function.
3373 Add new VSX entry in regset_info target_regsets.
3375 * configure.srv: Add new VSX dependencies.
3377 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3379 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3380 (remote_open): Set or clear transport_is_reliable.
3381 (putpkt_binary): Don't expect acks in noack mode.
3382 (getpkt): Don't send ack/nac in noack mode.
3383 * server.c (handle_general_set): Handle QStartNoAckMode.
3384 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3386 (main): Reset noack_mode on every connection.
3387 * server.h (noack_mode): Declare.
3389 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3391 * Makefile.in (GDBREPLAY_OBS): New variable.
3392 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3394 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3395 Daniel Jacobowitz <dan@codesourcery.com>
3397 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3398 (usr_store_inferior_registers): Likewise.
3399 (regsets_store_inferior_registers): Likewise.
3401 2008-07-31 Rolf Jansen <rj@surtec.com>
3402 Pedro Alves <pedro@codesourcery.com>
3404 * configure.ac: Check for memmem declaration.
3405 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3406 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3407 (disable_packet_qfThreadInfo): Unconditionally compile.
3408 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3409 * configure, config.in: Regenerate.
3411 2008-07-28 Doug Kwan <dougkwan@google.com>
3413 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3414 (linux_write_memory): Remove declaration of errno.
3416 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3418 * linux-low.c (handle_extended_wait): Do not use "status"
3419 variable uninitialized.
3421 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3423 * server.c (handle_v_attach): Inhibit reporting dll changes.
3425 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3427 * remote-utils.c (prepare_resume_reply): If requested, don't
3428 output "thread:TID" in the T stop reply.
3430 * server.c (disable_packet_vCont, disable_packet_Tthread)
3431 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3432 (handle_query): If requested, disable support for qC, qfThreadInfo
3434 (handle_v_requests): If requested, disable support for vCont.
3435 (gdbserver_show_disableable): New.
3436 (main): Handle --disable-packet and --disable-packet=LIST.
3438 * server.h (disable_packet_vCont, disable_packet_Tthread)
3439 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3441 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3443 * server.c (gdbserver_usage): Mention --version.
3445 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3447 * Makefile.in (gdbreplay.o): New rule.
3449 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3451 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3452 message, not gdbserver.
3454 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3455 Nathan Sidwell <nathan@codesourcery.com>
3456 Joseph Myers <joseph@codesourcery.com>
3458 * acinclude.m4: Include ../../config/acx.m4.
3459 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3460 * configure, config.in: Regenerate.
3461 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3462 * server.c (gdbserver_version): Print PKGVERSION.
3463 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3464 (main): Adjust gdbserver_usage calls.
3465 * gdbreplay.c (version, host_name): Add declarations.
3466 (gdbreplay_version, gdbreplay_usage): New.
3467 (main): Accept --version and --help options.
3469 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3471 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3472 (arm_breakpoint_at): Handle Thumb.
3473 (the_low_target): Add comment.
3475 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3477 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3479 2008-05-09 Doug Evans <dje@google.com>
3481 * server.h (decode_search_memory_packet): Declare.
3482 * remote-utils.c (decode_search_memory_packet): New fn.
3483 * server.c (handle_search_memory_1): New fn.
3484 (handle_search_memory): New fn.
3485 (handle_query): Process qSearch:memory packets.
3487 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3489 * regcache.c (registers_length): Remove.
3490 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3491 full register packet.
3492 * regcache.h (registers_length): Remove prototype.
3493 * server.h (PBUFSIZ): Define to 16384.
3495 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3497 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3498 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3499 powerpc-64l.o, and powerpc-altivec64l.o.
3500 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3501 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3502 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3503 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3504 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3507 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3508 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3509 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3510 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3511 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3512 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3513 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3514 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3515 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3516 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3519 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3520 (init_registers_powerpc_32l): ... this new prototype.
3521 (init_registers_powerpc_32): Remove, replace by ...
3522 (init_registers_powerpc_altivec32l): ... this new prototype.
3523 (init_registers_powerpc_e500): Remove, replace by ...
3524 (init_registers_powerpc_e500l): ... this new prototype.
3525 (init_registers_ppc64): Remove, replace by ...
3526 (init_registers_powerpc_64l): ... this new prototype.
3527 (init_registers_powerpc_64): Remove, replace by ...
3528 (init_registers_powerpc_altivec64l): ... this new prototype.
3529 (ppc_num_regs): Set to 73.
3530 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3531 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3532 (ppc_cannot_store_register): Handle orig_r3 and trap.
3533 (ppc_arch_setup): Update init_registers_... calls.
3534 (ppc_fill_gregset): Handle orig_r3 and trap.
3536 * inferiors.c (clear_inferiors): Reset current_inferior.
3538 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
3540 * acinclude.m4: Add override.m4.
3541 * configure: Regenerate.
3543 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3545 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3546 initial call to init_register_ppc64.
3548 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3550 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3551 powerpc*-*-linux* case.
3552 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3554 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3556 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3557 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3559 * linux-ppc-low.c: Include <elf.h>.
3560 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3561 (ppc_hwcap): New global variable.
3562 (ppc_regmap): Remove __SPE__ #ifdef sections.
3563 (ppc_regmap_e500): New global variable.
3564 (ppc_cannot_store_register): Update __SPE__ special case.
3565 (ppc_get_hwcap): New function.
3566 (ppc_arch_setup): Use it to determine whether inferior supports
3567 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3568 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3569 Do not access registers if target does not support AltiVec.
3570 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3571 Do not access registers if target does not support SPE.
3572 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3574 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3576 * linux-low.c (disabled_regsets, num_regsets): New.
3577 (use_regsets_p): Delete.
3578 (linux_wait_for_process): Clear disabled_regsets.
3579 (regsets_fetch_inferior_registers): Check and set it.
3580 (regsets_store_inferior_registers): Likewise.
3581 (linux_fetch_registers, linux_store_registers): Do not use
3583 (initialize_low): Allocate disabled_regsets.
3585 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3587 * Makefile.in (LIBOBJS): New.
3589 (memmem.o): New rule.
3590 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3591 * configure: Regenerated.
3593 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3595 * server.c (handle_query): Never return "unsupported" for
3596 qXfer:features:read queries.
3598 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3600 * server.c (get_features_xml): Fix inverted condition.
3601 (handle_query): Always support qXfer:feature:read.
3603 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3605 * server.c (wrapper_argv): New.
3606 (start_inferior): Handle wrapper_argv. If set, expect an extra
3608 (gdbserver_usage): Document --wrapper.
3609 (main): Parse --wrapper.
3611 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3613 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3614 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3615 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3616 (ppc_set_pc): Likewise.
3617 (ppc_arch_setup): New function.
3618 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3619 of collect_register.
3620 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
3622 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3624 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3625 instead of linux-ppc64-low.o.
3626 * linux-ppc64-low.c: Remove file.
3627 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3628 (linux-ppc64-low.o): Remove rule.
3630 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3631 (init_registers_powerpc_64): Likewise.
3632 (ppc_regmap): Conditionally define depending on __powerpc64__.
3633 (ppc_cannot_store_register): Do not special-case "fpscr" when
3634 compiled on __powerpc64__.
3635 (ppc_collect_ptrace_register): New function.
3636 (ppc_supply_ptrace_register): New function.
3637 (ppc_breakpoint): Change type to "unsigned int".
3638 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3639 (the_low_target): Conditionally provide initializers for the
3640 arch_setup member depending on __powerpc64__. Install
3641 collect_ptrace_register and supply_ptrace_register members.
3643 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3645 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3646 * server.c (gdbserver_xmltarget): Define.
3647 (get_features_xml): Use it to replace "target.xml" and arch_string.
3649 * configure.srv: Remove srv_xmltarget. Add XML files that were
3650 mentioned there to srv_xmlfiles instead. Remove conditional tests
3651 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3652 srv_xmlfiles and srv_regobj to include all possible choices.
3653 * configure.ac (srv_xmltarget): Remove.
3654 (srv_xmlfiles): Do not add "target.xml".
3655 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3656 checks for supplementary target information.
3657 * configure: Regenerate.
3658 * Makefile.in (XML_TARGET): Remove.
3659 (target.xml): Remove rule.
3660 (clean): Do not clean up target.xml.
3661 (.PRECIOUS): Do not mention target.xml.
3663 * target.h (struct target_ops): Remove arch_string member.
3664 * linux-low.c (linux_arch_string): Remove.
3665 (linux_target_ops): Remove arch_string initializer.
3666 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3667 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3668 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3669 * spu-low.c (spu_arch_string): Remove.
3670 (spu_target_ops): Remove arch_string initializer.
3671 * win32-low.c (win32_arch_string): Remove.
3672 (win32_target_ops): Remove arch_string initializer.
3673 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3674 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3675 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3677 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3679 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3680 by collect_ptrace_register and supply_ptrace_register hooks.
3681 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3682 instead of checking for the_low_target.left_pad_xfer.
3683 (usr_store_inferior_registers): Use collect_ptrace_register callback
3684 instead of checking for the_low_target.left_pad_xfer.
3686 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3687 (s390_supply_ptrace_register): Likewise.
3688 (s390_fill_gregset): Call s390_collect_ptrace_register.
3689 (the_low_target): Update.
3691 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3692 (ppc_supply_ptrace_register): Likewise.
3693 (the_low_target): Update.
3695 * linux-i386-low.c (the_low_target): Update.
3696 * linux-x86-64-low.c (the_low_target): Update.
3698 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3700 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3701 reg-s390.o and reg-s390x.o.
3703 * linux-low.c (new_inferior): New global variable.
3704 (linux_create_inferior, linux_attach): Set it.
3705 (linux_wait_for_process): Call the_low_target.arch_setup after the
3706 target has stopped for the first time.
3707 (initialize_low): Do not call the_low_target.arch_setup.
3709 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3710 (s390_set_pc): Likewise.
3711 (s390_arch_setup): New function.
3712 (the_low_target): Use s390_arch_setup as arch_setup routine.
3714 * regcache.c (realloc_register_cache): New function.
3715 (set_register_cache): Call it for each existing regcache.
3717 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3719 * server.h (init_registers): Remove prototype.
3721 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3722 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3723 instead of init_registers ().
3724 * linux-arm-low.c (init_registers_arm): Add prototype.
3725 (init_registers_arm_with_iwmmxt): Likewise.
3726 (the_low_target): Add initializer for arch_setup field.
3727 * linux-cris-low.c (init_registers_cris): Add prototype.
3728 (the_low_target): Add initializer for arch_setup field.
3729 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3730 (the_low_target): Add initializer for arch_setup field.
3731 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3732 (the_low_target): Add initializer for arch_setup field.
3733 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3734 (the_low_target): Add initializer for arch_setup field.
3735 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3736 (the_low_target): Add initializer for arch_setup field.
3737 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3738 (the_low_target): Add initializer for arch_setup field.
3739 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3740 (init_registers_mips64_linux): Likewise.
3741 (the_low_target): Add initializer for arch_setup field.
3742 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3743 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3744 (the_low_target): Add initializer for arch_setup field.
3745 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3746 (init_registers_powerpc_64): Likewise.
3747 (the_low_target): Add initializer for arch_setup field.
3748 * linux-s390-low.c (init_registers_s390): Add prototype.
3749 (init_registers_s390x): Likewise.
3750 (the_low_target): Add initializer for arch_setup field.
3751 * linux-sh-low.c (init_registers_sh): Add prototype.
3752 (the_low_target): Add initializer for arch_setup field.
3753 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3754 (the_low_target): Add initializer for arch_setup field.
3755 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3756 (the_low_target): Add initializer for arch_setup field.
3758 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3759 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3760 instead of init_registers ().
3761 * win32-arm-low.c (init_registers_arm): Add prototype.
3762 (the_low_target): Add initializer for arch_setup field.
3763 * win32-i386-low.c (init_registers_i386): Add prototype.
3764 (the_low_target): Add initializer for arch_setup field.
3766 * spu-low.c (init_registers_spu): Add prototype.
3767 (initialize_low): Call initialie_registers_spu () instead of
3768 initialize_registers ().
3770 2008-02-19 Pedro Alves <pedro@codesourcery.com>
3772 * server.c (handle_v_requests): When handling the vRun and vAttach
3773 packets, if already debugging a process, don't kill it. Return an
3776 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3778 * server.c (handle_query): Correct length check.
3780 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3782 * win32-low.c (do_initial_child_stuff): Add process handle
3783 parameter. Set current_process_handle and current_process_id from the
3784 parameters. Clear globals.
3785 (win32_create_inferior): Don't set current_process_handle and
3786 current_process_id here. Instead pass them on the call to
3787 do_initial_child_stuff.
3788 (win32_attach): Likewise.
3789 (win32_clear_inferiors): New.
3790 (win32_kill): Don't close the current process handle or the
3791 current thread handle here. Instead call win32_clear_inferiors.
3792 (win32_detach): Don't open a new handle to the process. Call
3793 win32_clear_inferiors.
3794 (win32_join): Don't rely on current_process_handle; open a new
3795 handle using the process id.
3796 (win32_wait): Call win32_clear_inferiors when the inferior process
3799 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3801 * server.c (monitor_show_help): Add "exit".
3803 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3805 * Makefile.in (SFILES): Add linux-xtensa-low.c.
3806 (clean): Add reg-xtensa.c.
3807 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3808 * configure.srv (xtensa*-*-linux*) New target.
3809 * linux-xtensa-low.c: New.
3810 * xtensa-xtregs.c: New.
3812 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3814 * hostio.c: Don't include errno.h.
3815 (errno_to_fileio_errno): Move to hostio-errno.
3816 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3817 error number outputting to the target->hostio_last_error callback.
3818 (hostio_packet_error): Use FILEIO_EINVAL directly.
3819 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3820 calls to hostio_error.
3821 * hostio-errno.c: New.
3822 * server.h (hostio_last_error_from_errno): Declare.
3823 * target.h (target_ops): Add hostio_last_error member.
3824 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3825 as hostio_last_error handler.
3826 * spu-low.c (spu_target_ops): Likewise.
3827 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3828 (wince_hostio_last_error): New functions.
3829 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3830 as hostio_last_error handler.
3831 (win32_target_ops) [!_WIN32_WCE]: Register
3832 hostio_last_error_from_errno as hostio_last_error handler.
3833 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3834 (hostio-errno.o): New rule.
3835 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3836 * configure.srv (srv_hostio_err_objs): New variable. Default to
3838 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3839 * configure: Regenerate.
3841 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3843 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3844 (linux_kill, linux_detach): Clean up the process list.
3845 * remote-utils.c (remote_open): Improve port number parsing.
3846 (putpkt_binary, input_interrupt): Only send interrupts if the target
3848 * server.c (extended_protocol): Make static.
3849 (attached): Define earlier.
3850 (exit_requested, response_needed, program_argv): New variables.
3851 (target_running): New.
3852 (start_inferior): Clear attached here.
3853 (attach_inferior): Set attached here.
3854 (require_running): Define.
3855 (handle_query): Use require_running and target_running. Implement
3857 (handle_v_attach, handle_v_run): New.
3858 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3859 (gdbserver_usage): Update.
3860 (main): Redo argument parsing. Handle --debug and --multi. Handle
3861 --attach along with other options or after the port. Save
3862 program_argv. Support no initial program. Resynchronize
3863 communication with GDB after an error. Handle "monitor exit".
3864 Use require_running and target_running. Always allow the extended
3865 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3866 restart in extended mode.
3867 * README: Refer to the GDB manual. Update --attach usage.
3869 2007-12-20 Andreas Schwab <schwab@suse.de>
3871 * linux-low.c (STACK_SIZE): Define.
3872 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3873 (linux_test_for_tracefork): Likewise.
3875 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3877 * linux-low.c (linux_wait_for_event): Update messages. Do not
3878 reinsert auto-delete breakpoints.
3879 * mem-break.c (struct breakpoint): Change return type of handler to
3881 (set_breakpoint_at): Update handler type.
3882 (reinsert_breakpoint_handler): Return 1 instead of calling
3884 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3886 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3887 * mem-break.h (set_breakpoint_at): Update handler type.
3888 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3889 * win32-low.c (auto_delete_breakpoint): New.
3890 (get_child_debug_event): Use it.
3892 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3894 * configure.ac: Check for pread and pwrite.
3895 * hostio.c (handle_pread): Fall back to lseek and read.
3896 (handle_pwrite): Fall back to lseek and write.
3897 * config.in, configure: Regenerated.
3899 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3901 * server.c (myresume): Add own_buf argument.
3902 (main): Update calls.
3904 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3906 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3907 * remote-utils.c (remote_open): Do not call disable_async_io.
3908 (block_async_io): Delete.
3909 (unblock_async_io): Make static.
3910 (initialize_async_io): New.
3911 * server.c (handle_v_cont): Handle async I/O here.
3912 (myresume): Likewise. Move other common resume tasks here...
3913 (main): ... from here. Call initialize_async_io. Disable async
3914 I/O before the main loop.
3915 * server.h (initialize_async_io): Declare.
3916 (block_async_io, unblock_async_io): Delete prototypes.
3917 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3919 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3921 * remote-utils.c (readchar): Allow binary data in received messages.
3923 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3925 * win32-low.c (attaching): New global.
3926 (win32_create_inferior): Clear the `attaching' global.
3927 (win32_attach): Set the `attaching' global.
3928 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3929 attaching. Only set a breakpoint at the entry point if not
3932 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3934 * server.c (main): Don't report dll events on the initial
3935 connection on attaches.
3937 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3939 * server.c (main): Relax numerical bases supported for the pid of
3940 the --attach command line argument.
3942 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3944 * win32-low.c (win32_attach): Call OpenProcess before
3945 DebugActiveProcess, not after. Add last error output to error
3948 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3950 * win32-low.c (win32_get_thread_context)
3951 (win32_set_thread_context): New functions.
3952 (thread_rec): Use win32_get_thread_context.
3953 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3954 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3957 2007-12-03 Leo Zayas
3958 Pedro Alves <pedro_alves@portugalmail.pt>
3960 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3962 (child_add_thread): Minor cleanup.
3963 (child_continue): Resume artificially suspended threads before
3964 calling ContinueDebugEvent.
3965 (suspend_one_thread): New.
3966 (fake_breakpoint_event): New.
3967 (get_child_debug_event): Change return type to int. Check here if
3968 gdb sent an interrupt request. If a soft interrupt was requested,
3969 fake a breakpoint event. Return 0 if there is no event to handle,
3971 (win32_wait): Don't check here if gdb sent an interrupt request.
3972 Ensure there is a valid event to handle.
3973 (win32_request_interrupt): Add soft interruption method as last
3976 2007-12-03 Leo Zayas
3977 Pedro Alves <pedro_alves@portugalmail.pt>
3979 * win32-low.h (win32_thread_info): Add descriptions to the
3980 structure members. Replace `suspend_count' counter by a
3982 * win32-low.c (thread_rec): Update condition of when to get the
3983 context from the inferior. Rely on ContextFlags being set if it
3984 has already been retrieved. Only suspend the inferior thread if
3985 we haven't already. Warn if that fails.
3986 (continue_one_thread): s/suspend_count/suspended/. Only call
3987 ResumeThread once. Warn if that fails.
3989 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3991 * win32-low.c (win32_wait): Don't read from the inferior when it
3994 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3996 * Makefile.in (win32_low_h): New variable.
3997 (win32-low.o): Add dependency on $(win32_low_h).
3998 (win32-arm-low.o, win32-i386-low.o): New rules.
4000 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4002 * hostio.c: Correct copyright year.
4004 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4006 * Makefile.in (OBS): Add hostio.o.
4007 (hostio.o): New rule.
4008 * server.h (handle_vFile): Declare.
4009 * hostio.c: New file.
4010 * server.c (handle_v_requests): Take packet_len and new_packet_len
4011 for binary packets. Call handle_vFile.
4012 (main): Update call to handle_v_requests.
4014 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4016 * linux-low.c: Include <sched.h>.
4018 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4020 * linux-low.c (linux_tracefork_grandchild): New.
4021 (linux_tracefork_child): Use clone.
4022 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4024 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4026 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4028 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4030 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4032 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4034 * inferiors.c (change_inferior_id): Delete.
4035 (add_pid_to_list, pull_pid_from_list): New.
4036 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4037 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4038 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4039 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4040 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4041 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4042 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4043 (using_threads): Always set to 1.
4044 (handle_extended_wait): New.
4045 (add_process): Do not set TID.
4046 (linux_create_inferior): Set must_set_ptrace_flags.
4047 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4048 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4049 (linux_thread_alive): Rename TID argument to LWPID.
4050 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4051 (linux_wait_for_event): Do not use TID or check using_threads. Update
4052 call to dead_thread_notify. Call handle_extended_wait.
4053 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4054 (send_sigstop): Delete sigstop_sent.
4055 (wait_for_sigstop): Avoid TID.
4056 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4057 (linux_test_for_tracefork): New.
4058 (linux_lookup_signals): Use thread_db_active and
4059 linux_supports_tracefork_flag.
4060 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4061 * linux-low.h (get_process_thread): Avoid TID.
4062 (struct process_ifo): Move thread_known and tid to the end. Remove
4064 (linux_attach_lwp, thread_db_init): Update prototypes.
4065 * server.h (change_inferior_id): Delete prototype.
4066 (add_pid_to_list, pull_pid_from_list): New prototypes.
4067 * thread-db.c (thread_db_use_events): New.
4068 (find_first_thread): Rename to...
4069 (find_one_thread): ...this. Update callers and messages. Do not
4070 call fatal. Check thread_db_use_events. Do not call
4071 change_inferior_id or new_thread_notify.
4072 (maybe_attach_thread): Update. Do not call new_thread_notify.
4073 (thread_db_init): Set thread_db_use_events. Check use_events.
4074 * utils.c (fatal, warning): Correct message prefix.
4076 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4078 * Makefile.in (clean): Remove new files.
4079 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4080 (powerpc-64.o, powerpc-64.c): New rules.
4081 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4082 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4084 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4086 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4087 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4088 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4089 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4090 (target_regsets): Add AltiVec and SPE register sets.
4091 * configure.ac: Check for AltiVec and SPE.
4092 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4093 (ppc_fill_vrregset, ppc_store_vrregset): New.
4094 (target_regsets): Add AltiVec register set.
4095 * configure: Regenerated.
4097 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4099 * linux-low.c (O_LARGEFILE): Define.
4100 (linux_read_memory): Use /proc/PID/mem.
4101 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4102 * configure, config.in: Regenerated.
4104 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4106 * linux-low.c (linux_wait_for_event): Do not pass signals while
4109 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4111 * win32-low.c (create_process): New.
4112 (win32_create_inferior): Use create_process instead of
4113 CreateProcess. If create_process failed retry appending an ".exe"
4114 suffix. Store the GetLastError result immediatelly after
4115 create_process calls and use it on the call to error.
4117 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4119 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4121 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4123 * configure.ac: Switch license to GPLv3.
4125 2007-08-01 Michael Snyder <msnyder@access-company.com>
4127 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4129 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4131 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4133 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4134 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4135 CloseToolhelp32Snapshot.
4136 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4137 CloseToolhelp32Snapshot.
4139 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4141 * server.c (main): Check for inferior exit before main loop.
4143 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4145 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4146 instead of on tmp_desc.
4148 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4149 Daniel Jacobowitz <dan@codesourcery.com>
4151 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4152 (add_thread): Minor cleanups.
4153 (clear_inferiors): Move lower in the file. Clear the DLL
4155 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4156 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4157 (xml_escape_text): New.
4158 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4160 (handle_v_cont): Report errors.
4161 (gdbserver_version): Update.
4162 (main): Correct size of own_buf. Do not report initial DLL events.
4163 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4164 (unloaded_dll, xml_escape_text): New.
4165 * win32-low.c (enum target_waitkind): Update comments.
4166 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4167 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4168 (win32_EnumProcessModules, win32_GetModuleInformation)
4169 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4170 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4171 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4172 (win32_Module32First, win32_Module32Next, load_toolhelp)
4173 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4174 (get_child_debug_event): Handle DLL events.
4175 (win32_wait): Likewise.
4177 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4179 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4180 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4182 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4184 * win32-low.c (handle_output_debug_string): Ignore event if not
4187 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4189 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4191 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4193 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4195 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4197 * inferiors.c (change_inferior_id): Add comment.
4198 * linux-low.c (check_removed_breakpoint): Add an early
4199 prototype. Improve debug output.
4200 (linux_attach): Doc update.
4201 (linux_detach_one_process, linux_detach): Clean up before releasing
4203 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4204 * linux-low.h (struct process_info): Doc improvement.
4205 * mem-break.c (delete_all_breakpoints): New.
4206 * mem-break.h (delete_all_breakpoints): New prototype.
4207 * thread-db.c (find_first_thread): New.
4208 (thread_db_create_event): Call it instead of
4209 thread_db_find_new_threads. Clean up unused variables.
4210 (maybe_attach_thread): Remove first thread handling.
4211 (thread_db_find_new_threads): Use find_first_thread.
4212 (thread_db_get_tls_address): Likewise.
4214 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4216 * thread-db.c (thread_db_find_new_threads): Add prototype.
4217 (thread_db_create_event): Check for the main thread before adding
4219 (maybe_attach_thread): Only enable event reporting if TID == 0.
4220 (thread_db_get_tls_address): Check for new threads.
4222 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4224 * linux-low.c (linux_create_inferior): Try execv before execvp.
4225 * spu-low.c (spu_create_inferior): Likewise.
4227 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4229 * linux-low.c (linux_create_inferior): Change execv to execvp.
4230 * spu-low.c (spu_create_inferior): Likewies.
4232 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4234 * Makefile.in (clean): Clean new files instead of deleted ones.
4235 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4236 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4238 * configure.srv: Specify XML files and new regformats for MIPS and
4240 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4241 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4242 an entry for the restart register.
4243 (mips_cannot_fetch_register, mips_cannot_store_register)
4244 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4245 register names to match the XML descriptions.
4246 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4247 restart register instead of $0.
4249 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4250 Markus Deuling <deuling@de.ibm.com>
4252 * remote-utils.c (decode_xfer_write): New function.
4253 * server.h (decode_xfer_write): Add prototype.
4254 * server.c (handle_query): Add PACKET_LEN argument. Support
4255 qXfer:spu:read and qXfer:spu:write packets.
4256 (main): Pass packet_len to handle_query.
4257 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4258 * target.h (target_ops): Add qxfer_spu.
4260 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4262 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4263 accessing non-seekable spufs files.
4265 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4267 * server.c (handle_query): Add reply for qC packet.
4269 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4270 Leo Zayas <lerele@champenstudios@com>
4272 * server.h (check_remote_input_interrupt_request): New function.
4273 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4274 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4275 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4276 (check_remote_input_interrupt_request): New function.
4277 * server.h (check_remote_input_interrupt_request): Declare.
4278 * win32-low.c (winapi_DebugBreakProcess,
4279 winapi_GenerateConsoleCtrlEvent): New typedefs.
4280 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4282 (win32_wait): Check for remote interrupt request
4283 with check_remote_input_interrupt_request.
4284 (win32_request_interrupt): New function.
4285 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4287 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4289 * win32-low.c (debug_registers_changed,
4290 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4291 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4292 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4293 (thread_rec): Get context using the low target.
4294 (child_add_thread): Call thread_added on the low target,
4295 which does the same thing.
4297 (do_initial_child_stuff): Remove debug registers references.
4298 Set context using the low target. Resume threads after
4299 setting the contexts.
4300 (child_continue): Remove dead variable. Remove debug
4301 registers references.
4302 (child_fetch_inferior_registers): Go through the low target.
4303 (do_child_store_inferior_registers): Remove.
4304 (child_store_inferior_registers): Go through the low target.
4305 (win32_resume): Remove debug registers references.
4306 Set context using the low target.
4307 (handle_exception): Change return type to void. Don't record
4308 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4309 first chance exception.
4310 (get_child_debug_event): Change return type to void. Remove
4311 goto loop. Always return after waiting for debug event.
4312 (win32_wait): Convert to switch statement. Handle spurious
4315 * win32-i386-low.c (debug_registers_changed,
4316 debug_registers_used): New.
4317 (initial_stuff): Rename to ...
4318 (i386_initial_stuff): ... this. Clear debug registers
4320 (store_debug_registers): Delete.
4321 (i386_get_thread_context): New.
4322 (load_debug_registers): Delete.
4323 (i386_set_thread_context): New.
4324 (i386_thread_added): New.
4325 (single_step): Rename to ...
4326 (i386_single_step): ... this.
4327 (do_fetch_inferior_registers): Rename to ...
4328 (i386_fetch_inferior_register): ... this.
4329 (i386_store_inferior_register): New.
4330 (the_low_target): Adapt to new interface.
4332 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4333 (arm_get_thread_context): New.
4334 (arm_set_thread_context): New.
4336 (do_fetch_inferior_registers): Rename to ...
4337 (arm_fetch_inferior_register): ... this.
4338 (arm_store_inferior_register): New.
4339 (arm_wince_breakpoint): Reimplement as unsigned long.
4340 (arm_wince_breakpoint_len): Define.
4341 (the_low_target): Adapt to new interface.
4343 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4344 load_debug_registers. Add get_thread_context, set_thread_context,
4345 thread_added and store_inferior_register. Rename
4346 fetch_inferior_registers to fetch_inferior_register.
4347 (regptr): Remove declaration.
4349 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4351 * linux-low.c (linux_detach): Change return type to int. Return 0.
4352 * spu-low.c (spu_detach): Likewise.
4354 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4356 * target.h (target_ops): Change return type of detach to int.
4358 (join_inferior): New.
4359 * server.c (main): Don't skip detach support on mingw32.
4360 If the inferior doesn't support detaching return error.
4361 Call join_inferior instead of using waitpid.
4362 * linux-low.c (linux_join): New.
4363 (linux_target_op): Add linux_join.
4364 * spu-low.c (spu_join): New.
4365 (spu_target_ops): Add spu_join.
4366 * win32-low.c (win32_detach): Adapt to new interface.
4367 Reopen current_process_handle before detaching. Issue a child
4368 resume before detaching.
4370 (win32_target_op): Add win32_join.
4372 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4374 * win32-low.c (win32-attach): Fix return value.
4375 * target.h (target_ops): Describe ATTACH return values.
4377 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4379 * win32-low.c (GETPROCADDRESS): Define.
4380 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4381 (winapi_DebugSetProcessKillOnExit): Likewise.
4382 (win32_create_inferior): Force usage of ansi CreateProcessA.
4383 (win32_attach): Use GETPROCADDRESS.
4384 (win32_detach): Likewise.
4386 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4388 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4390 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4392 * win32-low.c: Commit leftover changes from 2007-03-29.
4394 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4396 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4397 fields short instead of int. Add explicit padding.
4398 (i387_cache_to_fsave): Remove unnecessary casts.
4399 (i387_fsave_to_cache): Doc fix.
4400 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4402 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4404 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4405 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4407 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4409 * configure.srv (arm*-*-mingw32ce*): Move near the other
4412 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4414 * configure.ac: Add errno checking.
4415 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4416 sys/file.h and malloc.h.
4417 (AC_CHECK_DECLS): Add perror.
4418 (srv_mingwce): Handle.
4419 * configure.srv (i[34567]86-*-cygwin*): Add
4420 win32-i386-low.o to srv_tgtobj.
4421 (i[34567]86-*-mingw*): Likewise.
4422 (arm*-*-mingw32ce*): Add case.
4423 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4424 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4425 [__MINGW32CE__] (strerror): New function.
4426 [__MINGW32CE__] (errno): Define to GetLastError.
4427 [__MINGW32CE__] (COUNTOF): New macro.
4428 (remote_open): Remove extra close call.
4429 * mem-break.c (delete_breakpoint_at): New function.
4430 * mem-break.h (delete_breakpoint_at): Declare.
4431 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4432 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4433 [USE_WIN32API] (read, write): Add char* casts.
4434 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4435 * server.h: Include wincecompat.h on Windows CE.
4436 [HAVE_ERRNO_H]: Check.
4437 (perror): Declare if not declared.
4438 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4439 (perror_with_name): Remove errno declaration.
4440 * wincecompat.h: New.
4441 * wincecompat.c: New.
4443 * win32-arm-low.c: New.
4444 * win32-i386-low.c: New.
4445 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4446 (OUTMSG2): Make it safe.
4448 (COUNTOF): New macro.
4449 (NUM_REGS): Get it from the low target.
4450 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4451 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4452 (thread_rec): Let low target handle debug registers.
4453 (child_add_thread): Likewise.
4454 (child_init_thread_list): Likewise.
4455 (continue_one_thread): Likewise.
4457 (do_child_fetch_inferior_registers): Move to ...
4458 * win32-i386-low.c: ... here, and rename to ...
4459 (do_fetch_inferior_registers): ... this.
4460 * win32-low.c (child_fetch_inferior_registers):
4461 Go through the low target.
4462 (do_child_store_inferior_registers): Use regptr.
4463 (strwinerror): New function.
4464 (win32_create_inferior): Handle Windows CE.
4465 Use strwinerror instead of strerror on Windows error
4466 codes. Add program to the error output.
4467 Don't close the main thread handle on Windows CE.
4468 (win32_attach): Use coredll.dll on Windows CE.
4469 (win32_kill): Close current process and current
4471 (win32_detach): Use coredll.dll on Windows CE.
4472 (win32_resume): Let low target handle debug registers, and
4474 (handle_exception): Add/Remove initial breakpoint. Avoid
4475 non-existant WSTOPSIG on Windows CE.
4476 (win32_read_inferior_memory): Cast to remove warning.
4477 (win32_arch_string): Go through the low target.
4478 (initialize_low): Call set_breakpoint_data with the low
4479 target's breakpoint.
4480 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4481 FOP_REGNUM, mappings): Move to ...
4482 * win32-i386-low.c: ... here.
4483 * win32-low.c (win32_thread_info): Move to ...
4484 * win32-low.h: ... here.
4485 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4486 win32-arm-low.c and wincecompat.c.
4487 (all:): Add $EXEEXT.
4488 (install-only:): Likewise.
4489 (gdbserver:): Likewise.
4490 (gdbreplay:): Likewise.
4491 * config.in: Regenerate.
4492 * configure: Regenerate.
4494 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4496 * win32-low.c: Rename typedef thread_info to
4497 win32_thread_info throughout.
4499 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4501 * win32-i386-low.c: Rename to ...
4502 * win32-low.c: ... this.
4503 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4504 * Makefile.in: Likewise.
4506 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4508 * remote-utils.c (monitor_output): Constify msg parameter.
4509 * server.h (monitor_output): Likewise.
4510 * win32-i386-low.c (handle_output_debug_string): New.
4511 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4512 handle_output_debug_string.
4513 (get_child_debug_event): Likewise.
4515 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4517 * server.c (main): Correct strtoul check.
4519 2007-03-27 Jon Ringle <jon@ringle.org>
4521 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4523 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4525 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4527 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4529 * terminal.h: Check HAVE_SGTTY_H.
4531 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
4533 * remote-utils.c (remote_open): Print out the assigned port number.
4535 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4537 * remote-utils.c (monitor_output): New function.
4538 * server.c (debug_threads): Define here.
4539 (monitor_show_help): New function.
4540 (handle_query): Handle qRcmd.
4541 (main): Do not handle 'd' packet.
4542 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4543 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4546 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4548 * Makefile.in (EXEEXT): New.
4549 (clean): Use $(EXEEXT).
4551 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4553 * target.h (target_ops): Rename send_signal to request_interrupt,
4554 and remove enum target_signal parameter.
4555 * linux-low.c (linux_request_interrupt): Rename from
4556 linux_send_signal, and always send SIGINT.
4557 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4558 and always send SIGINT.
4559 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4561 (input_interrupt): Likewise.
4563 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4565 * server.c (get_features_xml): Check if target implemented
4567 * win32-i386-low.c (win32_arch_string): New.
4568 (win32_target_ops): Add win32_arch_string as arch_string member.
4570 2007-02-22 Markus Deuling <deuling@de.ibm.com>
4572 * spu-low.c (spu_arch_string): New.
4573 (spu_target_ops): Add spu_arch_string.
4575 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4577 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4578 * configure.ac: Do not check for terminal.h.
4579 * configure, config.in: Regenerated.
4581 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4583 * Makefile.in (OBS): Add $(XML_BUILTIN).
4584 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4586 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4587 (arm-with-iwmmxt.c): New.
4588 * config.in, configure: Regenerate.
4589 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4590 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4591 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4592 (arm*-*-linux*): Add iWMMXt and regset support.
4593 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4594 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4595 (arm_store_wmmxregset, target_regsets): New.
4596 * server.c (get_features_xml): Take annex argument. Check builtin
4598 (handle_query): Handle multiple annexes.
4600 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4602 * remote-utils.c [USE_WIN32API] (read, write): Define.
4603 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4606 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4608 * linux-i386-low.c (the_low_target): Set arch_string.
4609 * linux-x86-64-low.c (the_low_target): Likewise.
4610 * linux-low.c (linux_arch_string): New.
4611 (linux_target_ops): Add it.
4612 * linux-low.h (struct linux_target_ops): Add arch_string.
4613 * server.c (write_qxfer_response): Use const void * for DATA.
4614 (get_features_xml): New.
4615 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4616 * target.h (struct target_ops): Add arch_string method.
4618 2007-01-03 Denis Pilat <denis.pilat@st.com>
4619 Daniel Jacobowitz <dan@codesourcery.com>
4621 * linux-low.c (linux_kill): Handle being called with no threads.
4622 * win32-i386-low.c (win32_kill): Likewise.
4623 (get_child_debug_event): Clear current_process_handle.
4625 2006-12-30 Denis PILAT <denis.pilat@st.com>
4626 Daniel Jacobowitz <dan@codesourcery.com>
4628 * remote-utils.c (remote_open): Check the type of specified
4629 serial port devices before opening them.
4630 * server.c (main): Kill the inferior if an error occurs during
4631 the first remote_open.
4633 2006-12-05 Markus Deuling <deuling@de.ibm.com>
4635 * README: Update supported targets.
4637 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4639 * Makefile.in (clean): Remove reg-mips64.c.
4640 (reg-mips64.c, reg-mips64.o): New rules.
4641 * configure.srv: Handle mips64. Include regset support for mips.
4642 * linux-mips-low.c (union mips_register): New.
4643 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4644 (mips_breakpoint, mips_breakpoint_at): Use int.
4645 (mips_collect_register, mips_supply_register)
4646 (mips_collect_register_32bit, mips_supply_register_32bit)
4647 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4648 (mips_store_fpregset, target_regsets): New.
4649 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4651 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4653 * configure.srv: Add target "spu*-*-*".
4654 * Makefile.in (clean): Remove reg-spu.c.
4655 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4656 * spu-low.c: New file.
4658 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4660 * configure.ac: Correct td_thr_tls_get_addr test.
4661 * configure: Regenerated.
4663 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4665 * linux-low.c (linux_wait_for_event): Reformat. Use the
4667 * remote-utils.c (decode_address_to_semicolon): New.
4668 * server.c (pass_signals, handle_general_set): New.
4669 (handle_query): Mention QPassSignals for qSupported.
4670 (main): Call handle_general_set.
4671 * server.h (pass_signals, decode_address_to_semicolon): New.
4673 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4675 * server.c (handle_query): Correct error handling for read_auxv.
4677 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4679 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4680 and srv_linux_thread_db to yes.
4681 * linux-s390-low.c (s390_fill_gregset): New function.
4682 (target_regsets): Define data structure.
4684 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4686 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4687 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4688 * config.in, configure: Regenerated.
4689 * inferiors.c (gdb_id_to_thread): New function.
4690 (gdb_id_to_thread_id): Use it.
4691 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4692 * linux-low.h (struct process_info): Add th member.
4693 (thread_db_get_tls_address): New prototype.
4694 * remote-utils.c (decode_address): Make non-static.
4695 * server.c (handle_query): Handle qGetTLSAddr.
4696 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4697 * target.h (struct target_ops): Add get_tls_address.
4698 * thread-db.c (maybe_attach_thread): Save the thread handle.
4699 (thread_db_get_tls_address): New.
4701 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4703 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4704 (linux_resume_one_process): Take a siginfo_t *. Update all
4705 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4706 (struct pending_signals): Add a siginfo_t.
4707 (linux_wait_for_process): Always set last_status.
4708 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4709 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4710 * linux-low.h (struct process_info): Add last_status.
4712 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4714 * remote-utils.c (try_rle): New function.
4715 (putpkt_binary): Use it.
4717 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4719 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4720 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4721 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4722 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4723 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4726 2006-08-08 Richard Sandiford <richard@codesourcery.com>
4728 * server.c (terminal_fd): New variable.
4729 (old_foreground_pgrp): Likewise.
4730 (restore_old_foreground_pgrp): New function.
4731 (start_inferior): Record the terminal file descriptor in terminal_fd
4732 and its original foreground group in old_foreground_pgrp. Register
4733 restore_old_foreground_pgrp with atexit().
4735 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4737 * server.c (handle_query): Correct qPart to qXfer.
4739 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4741 * configure.ac: Check for more headers which are missing on
4742 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4743 * configure.srv: Add Cygwin and mingw32.
4744 * remote-utils.c: Don't include headers unconditionally which
4745 are missing on mingw32. Include <winsock.h> for mingw32.
4746 (remote_open): Adjust for mingw32 support. Flush
4747 standard error after writing to it.
4748 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4749 (unblock_async_io, enable_async_io, disable_async_io)
4750 (readchar, getpkt): Update for Winsock support.
4751 (prepare_resume_reply): Expect a protocol signal number.
4752 * server.c: Disable <sys/wait.h> on mingw32.
4753 (start_inferior): Adjust for mingw32 support. Flush
4754 standard error after writing to it.
4755 (attach_inferior): Likewise. Use protocol signal
4757 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4759 * win32-i386-low.c: New file.
4760 * Makefile.in (XM_CLIBS): Set.
4761 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4762 (win32-i386-low.o): New dependency rule.
4763 * linux-low.c (linux_wait): Use target signal numbers.
4764 * target.h (struct target_ops): Doc fix.
4765 * server.h (target_signal_to_name): New prototype.
4766 * gdbreplay.c: Don't include headers unconditionally which
4767 are missing on mingw32. Include <winsock.h> for mingw32.
4768 (remote_close, remote_open): Adjust for Winsock support.
4769 * configure, config.in: Regenerated.
4771 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4773 * server.c (decode_xfer_read, write_qxfer_response): New.
4774 (handle_query): Take a packet length argument. Handle
4775 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4776 the qSupported response.
4777 (main): Update call to handle_query.
4779 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4781 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4782 (putpkt_binary): Renamed from putpkt and adjusted for binary
4784 (putpkt): New wrapper for putpkt_binary.
4785 (readchar): Don't mask off the high bit.
4786 (decode_X_packet): New function.
4787 * server.c (main): Call putpkt_binary if a handler sets the packet
4788 length. Save the length of the incoming packet. Handle 'X'.
4789 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4791 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4793 * server.c (handle_query): Handle qSupported.
4795 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4797 * remote-utils.c (all_symbols_looked_up): New variable.
4798 (look_up_one_symbol): Check it.
4799 * server.h (look_up_one_symbol): New declaration.
4800 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4802 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4804 * Makefile.in (linux-arm-low.o): Update dependencies.
4805 * linux-arm-low.c: Include "gdb_proc_service.h".
4806 (PTRACE_GET_THREAD_AREA): Define.
4807 (ps_get_thread_area): New function.
4809 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4811 * configure.srv (m68k*-*-uclinux*): New target.
4812 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4813 (linux_resume_one_process): Remove extraneous cast.
4814 (linux_read_offsets): New.
4815 (linux_target_op): Add linux_read_offsets on mmuless systems.
4816 * server.c (handle_query): Add qOffsets logic.
4817 * target.h (struct target_ops): Add read_offsets.
4819 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4821 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4822 (PTRACE_GET_THREAD_AREA): Define.
4823 (ps_get_thread_area): New function.
4824 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4825 (linux-x86-64-low.o): Update.
4827 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4829 * configure.ac: Remove checks for prfpregset_t.
4830 * gdb_proc_service.h: New file.
4831 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4832 new "gdb_proc_service.h".
4833 * proc-service.c: Likewise.
4834 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4835 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4836 * Makefile.in (gdb_proc_service_h): Updated.
4837 * configure, config.in: Regenerated.
4839 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4841 * remote-utils.c (prepare_resume_reply): Move declaration
4842 of gdb_id_from_wait to the top of the block.
4844 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4846 * linux-low.c (regsets_store_inferior_registers): Read the regset
4847 from the target before filling it.
4849 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4851 * server.c (attach_inferior): Return SIGTRAP for a successful
4854 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4856 * Makefile.in (OBS): Add version.o.
4857 (STAGESTUFF): Delete.
4858 (version.o): Add dependencies.
4859 (version.c): Replace rule.
4860 (clean): Remove version.c.
4861 * server.c (gdbserver_version): New.
4862 (gdbserver_usage): Use printf.
4863 (main): Handle --version and --help.
4864 * server.h (version, host_name): Add declarations.
4866 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4878 * linux-x86-64-low.c:
4881 * linux-ppc64-low.c:
4890 * linux-crisv32-low.c:
4902 * gdbserver.1: Add (C) after Copyright. Update the FSF
4905 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4907 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4908 (arm_breakpoint_at): Recognize both breakpoints.
4909 (the_low_target): Use the correct breakpoint instruction.
4911 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4913 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4914 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4915 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4916 (the_low_target): Update.
4918 2005-10-25 Andreas Schwab <schwab@suse.de>
4920 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4922 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4923 (ia64_num_regs): Reduce to 462.
4925 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4927 * acinclude.m4: Correct quoting.
4928 * aclocal.m4: Regenerated.
4930 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4931 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4932 (thread_db_init): Call thread_db_err_str.
4933 * configure.ac: Check for TD_VERSION.
4934 * config.in, configure: Regenerated.
4936 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4938 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4940 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4942 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4943 is not available. Define HAVE_PTRACE_GETREGS if it is.
4944 * config.in, configure: Regenerated.
4945 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4946 * linux-i386-low.c, linux-m68k-low.c: Update to use
4947 HAVE_PTRACE_GETREGS.
4948 * linux-low.c (regsets_fetch_inferior_registers)
4949 (regsets_store_inferior_registers): Only return 0 if we processed
4951 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4952 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4954 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4956 * inferiors.c (struct thread_info): Add gdb_id.
4957 (add_thread): Add gdb_id argument.
4958 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4959 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4960 calls to add_thread.
4961 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4962 * server.c (handle_query): Use thread_to_gdb_id.
4963 (handle_v_cont, main): Use gdb_id_to_thread_id.
4964 * server.h (add_thread): Update prototype.
4965 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4968 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4970 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4971 left-padded registers.
4972 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4973 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4975 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4977 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4978 * configure: Regenerate.
4979 * config.in: Regenerate.
4980 * server.h (NEED_DECLARATION_STRERROR):
4981 Replace with !HAVE_DECL_STRERROR.
4983 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4985 * linux-low.c (linux_wait, linux_send_signal): Don't test
4986 an unsigned long variable for > 0 if it could be MAX_ULONG.
4987 * server.c (myresume): Likewise.
4988 * target.c (set_desired_inferior): Likewise.
4990 2005-06-13 Mark Kettenis <kettenis@gnu.org>
4992 * configure.ac: Simplify and improve check for socklen_t.
4993 * configure, config.in: Regenerate.
4995 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4997 * acconfig.h: Remove.
4998 * configure.ac: Add a test for socklen_t. Use three-argument
4999 AC_DEFINE throughout.
5000 * config.in: Regenerated using autoheader 2.59.
5001 * configure: Regenerated.
5003 * gdbreplay.c (socklen_t): Provide a default.
5004 (remote_open): Use socklen_t.
5005 * remote-utils.c (socklen_t): Provide a default.
5006 (remote_open): Use socklen_t.
5007 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5010 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5012 * linux-low.c (linux_read_memory, linux_write_memory)
5013 (linux_read_auxv): Likewise.
5014 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5015 (check_mem_write): Likewise.
5016 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5018 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5019 (registers_from_string, register_data): Likewise.
5020 * server.c (handle_query, main): Likewise.
5021 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5022 (decode_M_packet): Likewise.
5023 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5024 * target.h (struct target_ops): Update read_memory, write_memory,
5026 (read_inferior_memory, write_inferior_memory): Update.
5027 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5029 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5030 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5031 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5032 linux-s390-low.c, linux-sh-low.c: Update for changes in
5033 read_inferior_memory and the_low_target->breakpoint.
5035 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5037 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5038 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5039 * configure.srv: Add powerpc64-*-linux*.
5040 * linux-ppc64-low.c: New file.
5042 2005-05-23 Orjan Friberg <orjanf@axis.com>
5044 * linux-cris-low.c: New file with support for CRIS.
5045 * linux-crisv32-low.c: Ditto for CRISv32.
5046 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5047 (clean): Add reg-cris.c and reg-crisv32.c.
5048 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5049 reg-crisv32.o, and reg-crisv32.c to make rules.
5050 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5053 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5055 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5056 of sizeof (PTRACE_XFER_TYPE).
5057 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5059 2005-05-12 Orjan Friberg <orjanf@axis.com>
5061 * target.h (struct target_ops): Add insert_watchpoint,
5062 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5063 pointers for hardware watchpoint support.
5064 * linux-low.h (struct linux_target_ops): Ditto.
5065 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5066 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5067 to linux_target_ops.
5068 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5070 * server.c (main): Recognize 'Z' and 'z' packets.
5072 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5074 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5075 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5076 (the_low_target): Add new members.
5078 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5080 * proc-service.c (ps_lgetregs): Search all_processes instead of
5083 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5085 * server.c (start_inferior): Change return type to int.
5086 (attach_inferior): Change sigptr to int *.
5087 (handle_v_cont, handle_v_requests): Change signal to int *.
5088 (main): Change signal to int.
5090 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5092 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5093 * configure.srv: Add m32r*-*-linux*.
5094 * linux-m32r-low.c: New file.
5096 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5098 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5100 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5102 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5103 Take unsigned long arguments for PIDs.
5104 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5105 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5106 (wait_for_sigstop, linux_resume_one_process)
5107 (regsets_fetch_inferior_registers, linux_send_signal)
5108 (linux_read_auxv): Likewise. Update the types of variables holding
5109 PIDs. Update format string specifiers.
5110 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5111 * remote-utils.c (prepare_resume_reply): Likewise.
5112 * server.c (cont_thread, general_thread, step_thread)
5113 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5115 (handle_query): Update format specifiers.
5116 (handle_v_cont, main): Use strtoul for thread IDs.
5117 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5118 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5119 (general_thread, step_thread, thread_from_wait)
5120 (old_thread_from_wait): Update.
5121 * target.h (struct thread_resume): Use unsigned long for THREAD.
5122 (struct target_ops): Use unsigned long for arguments to attach and
5125 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5127 * acinclude.m4: Include bfd/bfd.m4 directly.
5128 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5129 <agriffis@toolchain.org>.
5130 * aclocal.m4, configure: Regenerated.
5132 2005-01-07 Andrew Cagney <cagney@gnu.org>
5134 * configure.ac: Rename configure.in, require autoconf 2.59.
5135 * configure: Re-generate.
5137 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5139 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5141 * aclocal.m4: Regenerated.
5142 * configure: Regenerated.
5144 2004-11-21 Andreas Schwab <schwab@suse.de>
5146 * linux-m68k-low.c (m68k_num_gregs): Define.
5147 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5148 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5149 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5150 (m68k_breakpoint_at): New. Add to the_low_target.
5152 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5153 srv_linux_thread_db to yes.
5155 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5157 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5158 (ARCH_SET_FS): Likewise.
5159 (ARCH_GET_FS): Likewise.
5160 (ARCH_GET_GS): Likewise.
5162 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5164 * linux-i386-low.c (ps_get_thread_area): New.
5165 * linux-x86-64-low.c (ps_get_thread_area): New.
5166 * linux-low.c: Include <sys/syscall.h>.
5167 (linux_kill_one_process): Don't kill the first thread here.
5168 (linux_kill): Kill the first thread here.
5169 (kill_lwp): New function.
5170 (send_sigstop, linux_send_signal): Use it.
5171 * proc-service.c: Clean up #ifdefs.
5172 (fpregset_info): Delete.
5173 (ps_lgetregs): Update and enable implementation.
5174 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5176 * remote-utils.c (struct sym_cache, symbol_cache): New.
5177 (input_interrupt): Print a clearer message.
5178 (async_io_enabled): New variable.
5179 (enable_async_io, disable_async_io): Use it. Update comments.
5180 (look_up_one_symbol): Use the symbol cache.
5181 * thread-db.c (thread_db_look_up_symbols): New function.
5182 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5184 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5186 * configure.in: Test for -rdynamic.
5187 * configure: Regenerated.
5188 * Makefile (INTERNAL_LDFLAGS): New.
5189 (gdbserver, gdbreplay): Use it.
5191 2004-09-02 Andrew Cagney <cagney@gnu.org>
5193 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5195 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5197 * linux-low.c (linux_wait): Clear all_processes list also.
5199 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5201 * linux-low.c: Include <errno.h>. Remove extern declaration of
5204 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5206 * gdbreplay.c, server.h, utils.c: Update copyright years.
5208 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5210 * server.c (main): Print child status or termination signal from
5211 variable 'signal', not 'sig'.
5213 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5215 * linux-low.c (linux_read_memory): Change return type to
5216 int. Check for and return error from ptrace().
5217 * target.c (read_inferior_memory): Change return type to int. Pass
5218 back return status from the_target->read_memory().
5219 * target.h (struct target_ops): Adapt *read_memory() prototype.
5221 (read_inferior_memory): Adapt prototype.
5222 * server.c (main): Return an error packet if
5223 read_inferior_memory() returns an error.
5225 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5227 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5228 Unify with other clean targets.
5230 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5232 * server.c (handle_v_cont): Call set_desired_inferior.
5234 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5236 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5238 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5240 * linux-low.c (linux_wait): Unblock async I/O.
5241 (linux_resume): Block and enable async I/O.
5242 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5243 * server.h (block_async_io, unblock_async_io): Add prototypes.
5245 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5247 * remote-utils.c (remote_open): Print a status notice after
5249 * server.c (attach_inferior): Print a status notice after
5252 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5254 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5256 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5258 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5260 * server.c, target.h: Update copyright years.
5262 2004-02-25 Roland McGrath <roland@redhat.com>
5264 * target.h (struct target_ops): New member `read_auxv'.
5265 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5266 * linux-low.c (linux_read_auxv): New function.
5267 (linux_target_ops): Initialize `read_auxv' member to that.
5269 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5271 Committed by Jim Blandy <jimb@redhat.com>.
5273 * linux-s390-low.c (s390_num_regs): Update.
5274 (s390_regmap): Remove control registers. Use __s390x__ predefine
5275 instead of GPR_SIZE to distiguish s390 and s390x targets.
5277 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5279 * linux-low.c: Update copyright year.
5280 (check_removed_breakpoint): Clear pending_is_breakpoint.
5281 (linux_set_resume_request, linux_queue_one_thread)
5282 (resume_status_pending_p): New functions.
5283 (linux_continue_one_thread): Use process->resume.
5284 (linux_resume): Only resume threads if there are no pending events.
5285 * linux-low.h (struct process_info): Add resume request
5288 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5290 * regcache.c (new_register_cache): Clear the allocated register
5291 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5293 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5295 * linux-low.c (linux_resume): Take a struct thread_resume *
5297 (linux_wait): Update call.
5298 (resume_ptr): New static variable.
5299 (linux_continue_one_thread): Renamed from
5300 linux_continue_one_process. Use resume_ptr.
5301 (linux_resume): Use linux_continue_one_thread.
5302 * server.c (handle_v_cont, handle_v_requests): New functions.
5303 (myresume): New function.
5304 (main): Handle 'v' case.
5305 * target.h (struct thread_resume): New type.
5306 (struct target_ops): Change argument of "resume" to struct
5308 (myresume): Delete macro.
5310 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5312 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5313 (uninstall): Support DESTDIR.
5315 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5317 * configure.srv: Add xscale*linux copy of arm*linux entry.
5319 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5321 * linux-arm-low.c (arm_reinsert_addr): New function.
5322 (the_low_target): Add arm_reinsert_addr.
5324 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5326 * mem-break.c: Remove whitespace at end of file.
5328 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5330 * configure.in: Check whether we need to prototype strerror.
5331 * server.h: Optionally prototype strerror.
5332 * gdbreplay.c (perror_with_name): Use strerror.
5333 * linux-low.c (linux_attach_lwp): Use strerror.
5334 * utils.c (perror_with_name): Use strerror.
5335 * config.in, configure: Regenerated.
5337 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5339 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5340 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5342 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5344 * Makefile.in (SFILES): Update.
5345 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5346 low-sun3.c: Remove files.
5348 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5350 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5351 (linux_detach_one_process, linux_detach): New functions.
5352 (linux_target_ops): Add linux_detach.
5353 * server.c (main): Handle 'D' packet.
5354 * target.h (struct target_ops): Add "detach" member.
5355 (detach_inferior): Define.
5357 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5359 From Kelley Cook <kelleycook@wideopenwest.com>:
5360 * configure.srv: Accept i[34567]86 variants.
5362 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5364 * linux-low.c (linux_wait_for_event): Correct comment typos.
5365 (linux_resume_one_process): Call check_removed_breakpoint.
5366 (linux_send_signal): New function.
5367 (linux_target_ops): Add linux_send_signal.
5368 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5370 * target.h (struct target_ops): Add send_signal.
5372 2003-05-29 Jim Blandy <jimb@redhat.com>
5374 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5375 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5376 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5377 away part of the register's value.
5379 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5381 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5382 (linux_wait_for_event, linux_init_signals): Likewise.
5384 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5386 * configure.in: Check for stdlib.h.
5387 * configure: Regenerated.
5388 * config.in: Regenerated.
5390 2003-01-04 Andreas Schwab <schwab@suse.de>
5392 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5394 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5396 * Makefile.in: Remove obsolete code.
5398 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5400 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5401 defined(PT_FPR0_HI).
5403 2002-11-17 Stuart Hughes <seh@zee2.com>
5405 * linux-arm-low.c (arm_num_regs): Increase.
5406 (arm_regmap): Include status register.
5408 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5410 * linux-low.c (register_addr): Remove incorrect -1 check.
5412 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5414 * linux-low.c (linux_create_inferior): Call setpgid. Return
5416 (unstopped_p, linux_signal_pid): Remove.
5417 (linux_target_ops): Remove linux_signal_pid.
5418 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5419 global instead of target method.
5420 * target.h (struct target_ops): Remove signal_pid. Update comment
5421 for create_inferior.
5422 * server.c (signal_pid): New variable.
5423 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5424 gdbserver. Set the child to be the foreground process group.
5425 (attach_inferior): Set signal_pid.
5427 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5429 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5431 2002-08-20 Jim Blandy <jimb@redhat.com>
5433 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5436 2002-08-01 Andrew Cagney <cagney@redhat.com>
5438 * Makefile.in: Make chill references obsolete.
5440 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5442 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5443 * configure: Regenerate.
5444 * config.in: Regenerate.
5446 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5448 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5449 (perror_with_name, remote_close, remote_open, expect, play): Static.
5451 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5453 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5454 byte offsets instead of an array of indexes.
5455 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5457 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5459 * regcache.c: Add comment.
5461 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5463 * thread-db.c: New file.
5464 * proc-service.c: New file.
5465 * acinclude.m4: New file.
5466 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5467 proc-service.o, and thread-db.o.
5468 (linux-low.o): Add USE_THREAD_DB.
5469 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5470 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5471 * aclocal.m4: Regenerated.
5472 * config.in: Regenerated.
5473 * configure: Regenerated.
5474 * configure.in: Check for proc_service.h, sys/procfs.h,
5475 thread_db.h, and linux/elf.h headrs.
5476 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5477 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5478 Check for -lthread_db and thread support.
5479 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5480 PowerPC, and SuperH.
5481 * i387-fp.c: Constify arguments.
5482 * i387-fp.h: Likewise.
5483 * inferiors.c: (struct thread_info): Renamed from
5484 `struct inferior_info'. Remove PID member. Use generic inferior
5485 list header. All uses updated.
5486 (inferiors, signal_pid): Removed.
5487 (all_threads): New variable.
5488 (get_thread): Define.
5489 (add_inferior_to_list): New function.
5490 (for_each_inferior): New function.
5491 (change_inferior_id): New function.
5492 (add_inferior): Removed.
5493 (remove_inferior): New function.
5494 (add_thread): New function.
5495 (free_one_thread): New function.
5496 (remove_thread): New function.
5497 (clear_inferiors): Use for_each_inferior and free_one_thread.
5498 (find_inferior): New function.
5499 (find_inferior_id): New function.
5500 (inferior_target_data): Update argument type.
5501 (set_inferior_target_data): Likewise.
5502 (inferior_regcache_data): Likewise.
5503 (set_inferior_regcache_data): Likewise.
5504 * linux-low.c (linux_bp_reinsert): Remove.
5505 (all_processes, stopping_threads, using_thrads)
5506 (struct pending_signals, debug_threads, pid_of): New.
5507 (inferior_pid): Replace with macro.
5508 (struct inferior_linux_data): Remove.
5509 (get_stop_pc, add_process): New functions.
5510 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5511 Use add_process and add_thread.
5512 (linux_attach_lwp): New function, based on old linux_attach. Use
5513 add_process and add_thread. Set stop_expected for new threads.
5514 (linux_attach): New function.
5515 (linux_kill_one_process): New function.
5516 (linux_kill): Kill all LWPs.
5517 (linux_thread_alive): Use find_inferior_id.
5518 (check_removed_breakpoints, status_pending_p): New functions.
5519 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5520 Update. Use WNOHANG. Wait for cloned processes also. Update process
5521 struct for the found process.
5522 (linux_wait_for_event): New function.
5523 (linux_wait): Use it. Support LWPs.
5524 (send_sigstop, wait_for_sigstop, stop_all_processes)
5525 (linux_resume_one_process, linux_continue_one_process): New functions.
5526 (linux_resume): Support LWPs.
5527 (REGISTER_RAW_SIZE): Remove.
5528 (fetch_register): Use register_size instead. Call supply_register.
5529 (usr_store_inferior_registers): Likewise. Call collect_register.
5531 (regsets_fetch_inferior_registers): Improve error message.
5532 (regsets_store_inferior_registers): Add debugging.
5533 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5534 (unstopped_p, linux_signal_pid): New functions.
5535 (linux_target_ops): Add linux_signal_pid.
5536 (linux_init_signals): New function.
5537 (initialize_low): Call it. Initialize using_threads.
5538 * regcache.c (inferior_regcache_data): Add valid
5540 (get_regcache): Fetch registers lazily. Add fetch argument
5541 and update all callers.
5542 (regcache_invalidate_one, regcache_invalidate): New
5544 (new_register_cache): Renamed from create_register_cache.
5545 Return the new regcache.
5546 (free_register_cache): Change argument to a void *.
5547 (registers_to_string, registers_from_string): Call get_regcache
5548 with fetch flag set.
5549 (register_data): Make static. Pass fetch flag to get_regcache.
5550 (supply_register): Call get_regcache with fetch flag clear.
5551 (collect_register): Call get_regcache with fetch flag set.
5552 (collect_register_as_string): New function.
5553 * regcache.h: Update.
5554 * remote-utils.c (putpkt): Flush after debug output and use
5556 Handle input interrupts while waiting for an ACK.
5557 (input_interrupt): Use signal_pid method.
5558 (getpkt): Flush after debug output and use stderr.
5559 (outreg): Use collect_register_as_string.
5560 (new_thread_notify, dead_thread_notify): New functions.
5561 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5563 (look_up_one_symbol): Flush after debug output.
5564 * server.c (step_thread, server_waiting): New variables.
5565 (start_inferior): Don't use signal_pid. Update call to mywait.
5566 (attach_inferior): Update call to mywait.
5567 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5568 (main): Don't fetch/store registers explicitly. Use
5569 set_desired_inferior. Support proposed ``Hs'' packet. Update
5572 (struct inferior_list, struct_inferior_list_entry): New.
5573 * target.c (set_desired_inferior): New.
5574 (write_inferior_memory): Constify.
5575 (mywait): New function.
5577 (struct target_ops): New signal_pid method.
5578 (mywait): Removed macro, added prototype.
5580 * linux-low.h (regset_func): Removed.
5581 (regset_fill_func, regset_store_func): New.
5582 (enum regset_type): New.
5583 (struct regset_info): Add type field. Use new operation types.
5584 (struct linux_target_ops): stop_pc renamed to get_pc.
5585 Add decr_pc_after_break and breakpoint_at.
5586 (get_process, get_thread_proess, get_process_thread)
5587 (strut process_info, all_processes, linux_attach_lwp)
5588 (thread_db_init): New.
5590 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5591 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5592 (the_low_target): Add new members.
5593 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5594 (i386_store_fpxregset): Constify.
5595 (target_regsets): Add new kind identifier.
5596 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5597 (i386_set_pc): Add debugging.
5598 (i386_breakpoint_at): New function.
5599 (the_low_target): Add new members.
5600 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5601 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5602 (mips_breakpoint_at): New.
5603 (the_low_target): Add new members.
5604 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5605 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5606 (the_low_target): Add new members.
5607 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5608 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5609 (the_low_target): Add new members.
5610 * linux-x86-64-low.c (target_regsets): Add new kind
5613 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
5615 From Martin Pool <mbp@samba.org>:
5616 * server.c (gdbserver_usage): New function.
5619 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
5621 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5624 2002-05-04 Andrew Cagney <ac131313@redhat.com>
5626 * Makefile.in: Remove obsolete code.
5628 2002-04-24 Michal Ludvig <mludvig@suse.cz>
5630 * linux-low.c (regsets_fetch_inferior_registers),
5631 (regsets_store_inferior_registers): Removed cast to int from
5633 * regcache.h: Added declaration of struct inferior_info.
5635 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5637 * inferiors.c (struct inferior_info): Add regcache_data.
5638 (add_inferior): Call create_register_cache.
5639 (clear_inferiors): Call free_register_cache.
5640 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5641 * regcache.c (struct inferior_regcache_data): New.
5642 (registers): Remove.
5643 (get_regcache): New function.
5644 (create_register_cache, free_register_cache): New functions.
5645 (set_register_cache): Don't initialize the register cache here.
5646 (registers_to_string, registers_from_string, register_data): Call
5648 * regcache.h: Add prototypes.
5649 * server.h: Likewise.
5651 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5653 * mem-break.c: New file.
5654 * mem-break.h: New file.
5655 * Makefile.in: Add mem-break.o rule; update server.h
5657 * inferiors.c (struct inferior_info): Add target_data
5659 (clear_inferiors): Free target_data member if set.
5660 (inferior_target_data, set_inferior_target_data): New functions.
5661 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5662 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5663 * linux-low.c (linux_bp_reinsert): New variable.
5664 (struct inferior_linux_data): New.
5665 (linux_create_inferior): Use set_inferior_target_data.
5666 (linux_attach): Likewise. Call add_inferior.
5667 (linux_wait_for_one_inferior): New function.
5668 (linux_wait): Call it.
5669 (linux_write_memory): Add const.
5670 (initialize_low): Call set_breakpoint_data.
5671 * linux-low.h (struct linux_target_ops): Add breakpoint
5673 * server.c (attach_inferior): Remove extra add_inferior
5675 * server.h: Include mem-break.h. Update inferior.c
5677 * target.c (read_inferior_memory)
5678 (write_inferior_memory): New functions.
5679 * target.h (read_inferior_memory)
5680 (write_inferior_memory): Change macros to prototypes.
5681 (struct target_ops): Update comments. Add const to write_memory
5684 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
5686 * linux-low.c (usr_store_inferior_registers): Support
5687 registers which are allowed to fail to store.
5688 * linux-low.h (linux_target_ops): Likewise.
5689 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5690 (ppc_cannot_store_register): FPSCR may not be storable.
5692 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5694 * server.h: Include <string.h> if HAVE_STRING_H.
5695 * ChangeLog: Correct paths in last ChangeLog entry.
5697 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5699 * linux-low.h: Remove obsolete prototypes.
5700 (struct linux_target_ops): New.
5701 (extern the_low_target): New.
5702 * linux-low.c (num_regs, regmap): Remove declarations.
5703 (register_addr): Use the_low_target explicitly.
5704 (fetch_register): Likewise.
5705 (usr_fetch_inferior_registers): Likewise.
5706 (usr_store_inferior_registers): Likewise.
5707 * linux-arm-low.c (num_regs): Remove.
5708 (arm_num_regs): Define.
5709 (arm_regmap): Renamed from regmap, made static.
5710 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5712 (arm_cannot_store_register): Renamed from cannot_store_register,
5714 (the_low_target): New.
5715 * linux-i386-low.c (num_regs): Remove.
5716 (i386_num_regs): Define.
5717 (i386_regmap): Renamed from regmap, made static.
5718 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5720 (i386_cannot_store_register): Renamed from cannot_store_register,
5722 (the_low_target): New.
5723 * linux-ia64-low.c (num_regs): Remove.
5724 (ia64_num_regs): Define.
5725 (ia64_regmap): Renamed from regmap, made static.
5726 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5728 (ia64_cannot_store_register): Renamed from cannot_store_register,
5730 (the_low_target): New.
5731 * linux-m68k-low.c (num_regs): Remove.
5732 (m68k_num_regs): Define.
5733 (m68k_regmap): Renamed from regmap, made static.
5734 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5736 (m68k_cannot_store_register): Renamed from cannot_store_register,
5738 (the_low_target): New.
5739 * linux-mips-low.c (num_regs): Remove.
5740 (mips_num_regs): Define.
5741 (mips_regmap): Renamed from regmap, made static.
5742 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5744 (mips_cannot_store_register): Renamed from cannot_store_register,
5746 (the_low_target): New.
5747 * linux-ppc-low.c (num_regs): Remove.
5748 (ppc_num_regs): Define.
5749 (ppc_regmap): Renamed from regmap, made static.
5750 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5752 (ppc_cannot_store_register): Renamed from cannot_store_register,
5754 (the_low_target): New.
5755 * linux-s390-low.c (num_regs): Remove.
5756 (s390_num_regs): Define.
5757 (s390_regmap): Renamed from regmap, made static.
5758 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5760 (s390_cannot_store_register): Renamed from cannot_store_register,
5762 (the_low_target): New.
5763 * linux-sh-low.c (num_regs): Remove.
5764 (sh_num_regs): Define.
5765 (sh_regmap): Renamed from regmap, made static.
5766 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5768 (sh_cannot_store_register): Renamed from cannot_store_register,
5770 (the_low_target): New.
5771 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5772 (the_low_target): New.
5774 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5776 * Makefile.in: Add stamp-h target.
5777 * configure.in: Create stamp-h.
5778 * configure: Regenerated.
5780 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5782 * inferiors.c: New file.
5783 * target.c: New file.
5784 * target.h: New file.
5785 * Makefile.in: Add target.o and inferiors.o. Update
5787 * linux-low.c (inferior_pid): New static variable,
5788 moved from server.c.
5789 (linux_create_inferior): Renamed from create_inferior.
5790 Call add_inferior. Return 0 on success instead of a PID.
5791 (linux_attach): Renamed from myattach.
5792 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5793 (linux_thread_alive): Renamed from mythread_alive.
5794 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5796 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5797 (regsets_store_inferior_registers): Correct error message.
5798 Add missing ``return 0''.
5799 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5800 (linux_store_registers): Renamed from store_inferior_registers.
5801 (linux_read_memory): Renamed from read_inferior_memory.
5802 (linux_write_memory): Renamed from write_inferior_memory.
5803 (linux_target_ops): New structure.
5804 (initialize_low): Call set_target_ops ().
5805 * remote-utils.c (unhexify): New function.
5806 (hexify): New function.
5807 (input_interrupt): Send signals to ``signal_pid''.
5808 * server.c (inferior_pid): Remove.
5809 (start_inferior): Update create_inferior call.
5810 (attach_inferior): Call add_inferior.
5811 (handle_query): New function.
5812 (main): Call handle_query for `q' packets.
5813 * server.h: Include "target.h". Remove obsolete prototypes.
5814 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5816 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5818 * Makefile.in: Add WARN_CFLAGS. Update configury
5820 * configure.in: Check for <string.h>
5821 * configure: Regenerate.
5822 * config.in: Regenerate.
5823 * gdbreplay.c: Include needed system headers.
5824 (remote_open): Remove strchr prototype.
5825 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5826 * regcache.c (supply_register): Change buf argument to const void *.
5827 (supply_register_by_name): Likewise.
5828 (collect_register): Change buf argument to void *.
5829 (collect_register_by_name): Likewise.
5830 * regcache.h: Add missing prototypes.
5831 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5832 * server.c (handle_query): New function.
5833 (attached): New static variable, moved out of main.
5834 (main): Quiet longjmp clobber warnings.
5835 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5836 * utils.c (error): Remove NORETURN.