1 2011-05-13 Doug Evans <dje@google.com>
3 * thread-db.c (try_thread_db_load_from_sdir): New function.
4 (try_thread_db_load_from_dir): New function.
5 (thread_db_load_search): Handle $sdir, ignore $pdir.
6 Remove trying of system directories if search of
7 libthread-db-search-path fails, that is now done via $sdir.
9 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11 * server.c (handle_query): Add EnableDisableTracepoints to the list
12 of supported features.
13 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
15 (cmd_qtenable_disable): New.
16 (cmd_qtstart): Install tracepoints even if disabled.
17 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
18 receiving a QTEnable or QTDisable packet.
19 (gdb_collect): Skip data collection if fast tracepoint is disabled.
20 (ust_marker_to_static_tracepoint): Do not ignore disabled static
22 (gdb_probe): Skip data collection if static tracepoint is disabled.
24 2011-05-10 Doug Evans <dje@google.com>
26 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
28 2011-05-04 Doug Evans <dje@google.com>
30 * linux-low.c (linux_join): Skip process lookup.
31 * spu-low.c (spu_join): Ditto.
32 * server.c (join_inferiors_callback): Delete.
33 (process_serial_event): For 'D' packet (detach) call join_inferior
36 2011-05-04 Joseph Myers <joseph@codesourcery.com>
38 * README: Don't mention xscale*-*-linux*.
39 * configure.srv (xscale*-*-linux*): Don't handle target.
41 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
43 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
45 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
46 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
47 (i386_emit_void_call_2): Likewise.
49 2011-04-26 Yao Qi <yao@codesourcery.com>
51 * linux-low.c: Move common macros to linux-ptrace.h.
52 Include linux-ptrace.h.
53 * Makefile.in (linux_ptrace_h): New.
54 (linux-low.o): Depends on linux-ptrace.h.
56 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
58 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
59 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
60 (remote_prepare): New function with most of the TCP code from ...
61 (remote_open): ... here. Detect PORT here unconditionally. Move also
62 setting transport_is_reliable.
63 * server.c (run_once): New variable.
64 (gdbserver_usage): Document it.
65 (main): Set run_once for `--once'. Call remote_prepare. Exit after
66 the first run if RUN_ONCE.
67 * server.h (run_once, remote_prepare): New declarations.
69 2011-04-19 Tom Tromey <tromey@redhat.com>
71 * win32-low.c (handle_load_dll): Remove duplicate "the".
73 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
75 Remove support for old Cygwin 1.5 versions.
76 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
77 function to avoid warning.
78 (win32_add_one_solib): Use cygwin_conv_path function to avoid
81 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
83 * gdbserver/server.h (Macro _): Define it if not available.
85 2011-03-14 Michael Snyder <msnyder@vmware.com>
87 * hostio.c (handle_close): Remove unnecessary null test.
89 2011-03-10 Joel Brobecker <brobecker@adacore.com>
91 * Makefile.in (maintainer-clean realclean distclean): Remove
92 "make ... subdir_do" command.
94 2011-03-10 Michael Snyder <msnyder@vmware.com>
96 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
98 * server.c (handle_v_run): Free alloced buffer on early return.
100 2011-03-09 Yao Qi <yao@codesourcery.com>
103 2011-03-04 Yao Qi <yao@codesourcery.com>
105 * Makefile.in: Remove GNU make feature --directory.
107 2011-03-05 Yao Qi <yao@codesourcery.com>
109 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
110 (subdir_do): New make target. Copied from gdb/Makefile.
111 (maintainer-clean, realclean, distclean, clean): Call corresponding
112 make targets in common/Makefile.
114 2011-02-11 Yao Qi <yao@codesourcery.com>
116 * configure.ac: Call AC_PROG_RANLIB.
117 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
118 * configure: Regenerate.
120 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
122 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
124 2011-03-06 Yao Qi <yao@codesourcery.com>
126 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
128 2011-03-05 Yao Qi <yao@codesourcery.com>
130 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
131 (subdir_do): New make target. Copied from gdb/Makefile.
132 (maintainer-clean, realclean, distclean, clean): Call corresponding
133 make targets in common/Makefile.
135 2011-03-04 Yao Qi <yao@codesourcery.com>
137 * Makefile.in: Remove GNU make feature --directory.
139 2011-03-04 Michael Snyder <msnyder@vmware.com>
141 * server.c (queue_stop_reply): Call xmalloc not malloc.
143 2011-03-02 Michael Snyder <msnyder@vmware.com>
145 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
147 2011-02-28 Michael Snyder <msnyder@vmware.com>
149 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
150 (cmd_qtframe): Ditto.
151 (cmd_qtbuffer): Ditto.
152 (cmd_bigqtbuffer): Ditto.
154 * utils.c (decimal2str): Initialize 'width' to nine, then
157 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
159 * hostio.c (require_data): Free *data, not data.
161 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
163 * hostio.c (require_data): Use free, not xfree.
165 2011-02-27 Michael Snyder <msnyder@vmware.com>
167 * server.c (handle_query): Discard unused value.
169 * hostio.c (require_data): Free malloc memory before returning
172 2011-02-26 Michael Snyder <msnyder@vmware.com>
174 * linux-low.c (list_threads): Call closedir for dirent.
176 2011-02-27 Michael Snyder <msnyder@vmware.com>
178 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
179 a case statement falls through.
181 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
183 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
186 2011-02-26 Michael Snyder <msnyder@vmware.com>
188 * utils.c (decimal2str): Eliminate dead code and dead param.
189 (pulongest): Drop dead param from call to decimal2str.
192 2011-02-24 Joel Brobecker <brobecker@adacore.com>
194 Revert the following patch (not approved yet):
195 2011-02-21 Hui Zhu <teawater@gmail.com>
196 * tracepoint.c (tp_printf): New function.
197 (eval_agent_expr): Handle gdb_agent_op_printf.
199 2011-02-21 Hui Zhu <teawater@gmail.com>
201 * tracepoint.c (tp_printf): New function.
202 (eval_agent_expr): Handle gdb_agent_op_printf.
204 2011-02-18 Tom Tromey <tromey@redhat.com>
206 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
207 (tracepoint.o): Likewise.
208 * tracepoint.c (enum gdb_agent_op): Use ax.def.
209 (gdb_agent_op_names): Likewise.
211 2011-02-18 Tom Tromey <tromey@redhat.com>
213 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
214 gdb_agent_op_rot>: New constants.
215 (gdb_agent_op_names): Add pick and roll.
216 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
219 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
221 * aclocal.m4: Regenerated with aclocal-1.11.1.
223 2011-02-14 Pedro Alves <pedro@codesourcery.com>
225 * server.c (handle_qxfer_traceframe_info): New.
226 (qxfer_packets): Register "traceframe-info".
227 (handle_query): Report support for qXfer:traceframe-info:read+.
228 * tracepoint.c (match_blocktype): New.
229 (traceframe_find_block_type): Rename to ...
230 (traceframe_walk_blocks): ... this. Add callback filter argument,
232 (traceframe_find_block_type): New, reimplemented on top of
233 traceframe_walk_blocks.
234 (build_traceframe_info_xml): New.
235 (traceframe_read_info): New.
236 * server.h (traceframe_read_info): Declare.
238 2011-02-11 Yao Qi <yao@codesourcery.com>
240 * configure.ac: Call AC_PROG_RANLIB.
241 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
242 * configure: Regenerate.
244 2011-02-07 Pedro Alves <pedro@codesourcery.com>
246 * server.c (gdb_read_memory): Change return semantics to allow
248 (handle_search_memory_1): Adjust.
249 (process_serial_event) <'m' packet>: Handle partial transfers.
250 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
252 2011-01-28 Pedro Alves <pedro@codesourcery.com>
254 * regcache.c (init_register_cache): Initialize
255 regcache->register_status.
256 (free_register_cache): Release regcache->register_status.
257 (regcache_cpy): Copy register_status.
258 (registers_to_string): Print 'x's for unavailable registers.
259 (supply_register): Mark the register's status valid or
260 unavailable, depending on whether a buffer was passed in or not.
261 (supply_register_zeroed): New.
262 (supply_regblock): Mark the registers' status valid or
263 unavailable, depending on whether a buffer was passed in or not.
264 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
265 (struct regcache): New `register_status' field.
266 (supply_register_zeroed): Declare.
267 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
268 supply_register_zeroed, rather than passing a NULL buffer to
270 * tracepoint.c (fetch_traceframe_registers): Update comment.
272 2011-01-28 Pedro Alves <pedro@codesourcery.com>
274 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
277 2011-01-25 Pedro Alves <pedro@codesourcery.com>
279 * server.h (decode_xfer_write): Change prototype.
280 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
281 and don't extract the annex here.
282 * server.c (decode_xfer_read): Remove `annex' parameter,
283 and don't extract the annex here.
286 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
287 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
288 (handle_qxfer_statictrace): New functions, abstracted out from
289 handle_query, and made to use the struct qxfer interface.
290 (handle_threads_qxfer_proper): Rename to ...
291 (handle_qxfer_threads_proper): ... this.
292 (handle_threads_qxfer): Rename to ...
293 (handle_qxfer_threads): ... this. Adjust.
294 (qxfer_packets): New array.
295 (handle_qxfer): New function.
296 (handle_query): Use handle_qxfer.
298 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
300 * gdbreplay.c: Shorten lines of >= 80 columns.
301 * linux-low.c: Ditto.
302 * linux-ppc-low.c: Ditto.
303 * linux-s390-low.c: Ditto.
304 * linux-sparc-low.c: Ditto.
305 * linux-x86-low.c: Ditto.
306 * linux-xtensa-low.c: Ditto.
307 * mem-break.c: Ditto.
310 * remote-utils.c: Ditto.
313 * thread-db.c: Ditto.
314 * tracepoint.c: Ditto.
316 * win32-low.h: Ditto.
318 2011-01-05 Joel Brobecker <brobecker@adacore.com>
320 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
323 2011-01-01 Joel Brobecker <brobecker@adacore.com>
325 * server.c (gdbserver_version): Update copyright year in version
327 * gdbreplay.c (gdbreplay_version): Ditto.
329 2010-12-29 Jie Zhang <jie.zhang@analog.com>
331 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
332 * linux-bfin-low.c: New file.
333 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
334 PT_DATA_ADDR for BFIN targets.
335 * Makefile.in (SFILES): Add linux-bfin-low.c.
336 (clean): Remove reg-bfin.c.
337 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
338 * README: Mention supported Blackfin targets.
340 2010-12-23 Mike Frysinger <vapier@gentoo.org>
342 * .gitignore: New file.
344 2010-11-16 Mike Frysinger <vapier@gentoo.org>
346 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
348 2010-10-22 Jie Zhang <jie@codesourcery.com>
350 * Makefile.in: Add FLAGS_TO_PASS variable.
351 (install): Remove dependency of install-only and recursively
352 invoke make for install-only.
354 2010-10-04 Doug Evans <dje@google.com>
356 * Makefile.in (uninstall): Use $(DESTDIR).
358 2010-09-24 Pedro Alves <pedro@codesourcery.com>
362 * linux-x86-low.c (compat_siginfo_from_siginfo)
363 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
364 si_code is < 0. Check for si_code == SI_TIMER before checking for
367 2010-09-13 Joel Brobecker <brobecker@adacore.com>
369 * lynx-i386-low.c: New file.
370 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
372 2010-09-13 Joel Brobecker <brobecker@adacore.com>
374 * lynx-low.c (ptrace_request_to_str): Remove handling for
375 request values that have been removed in LynxOS 5.x.
377 2010-09-13 Joel Brobecker <brobecker@adacore.com>
379 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
382 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
384 * configure.ac: Add --enable-inprocess-agent option.
385 * configure: Rebuilt.
387 2010-09-06 Yao Qi <yao@codesourcery.com>
389 * linux-low.c (linux_kill): Remove unused variable.
390 (linux_stabilize_threads): Likewise.
391 * server.c (start_inferior): Likewise.
392 (queue_stop_reply_callback): Likewise.
393 * tracepoint.c (do_action_at_tracepoint): Likewise.
395 2010-09-06 Yao Qi <yao@codesourcery.com>
397 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
400 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
402 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
404 2010-09-06 Pedro Alves <pedro@codesourcery.com>
406 * Makefile.in (install-only): Replace $IPA_DEPFILES with
409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
411 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
412 gdbserver/lynx-ppc-low.c: New files.
413 * Makefile.in (lynx_low_h): New variable.
414 (lynx-low.o, lynx-ppc-low.o): New rules.
415 * configure.ac: On LynxOS, link with -lnetinet.
416 * configure.srv: Add handling of powerpc-*-lynxos* targets.
417 * configure: regenerate.
419 2010-09-01 Joel Brobecker <brobecker@adacore.com>
421 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
422 * configure.ac: Add check for vasprintf and vsnprintf.
423 * configure, config.in: Regenerate.
424 * server.h (vasprintf, vsnprintf): Add conditional declarations.
426 2010-09-01 Joel Brobecker <brobecker@adacore.com>
428 * gdbreplay.c: Move include of alloca.h up, next to include of
430 * server.h: Add include of malloc.h.
431 * mem-break.c: Remove include of malloc.h.
432 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
434 2010-09-01 Joel Brobecker <brobecker@adacore.com>
436 * Makefile.in (memmem.o): Build with -Wno-error.
438 2010-09-01 Joel Brobecker <brobecker@adacore.com>
440 * utils.c (xsnprintf): Make non-static.
441 * server.h: Add xsnprintf declaration.
442 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
443 replace calls to snprintf by calls to xsnprintf throughout.
445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
447 * configure.ac: Add configure check for alloca.
448 * configure, config.in: Regenerate.
449 * server.h: Include alloca.h if it exists.
450 * gdbreplay.c: Include alloca.h if it exists.
452 2010-08-28 Pedro Alves <pedro@codesourcery.com>
454 * linux-low.c (__SIGRTMIN): Define if not already defined.
455 (linux_create_inferior): Check for __ANDROID__ rather than
457 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
458 are already deferred.
459 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
460 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
461 stopped and already has a pending signal to report.
462 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
463 a pending signal to report or is moving out of a jump pad.
464 (linux_init_signals): Check for __ANDROID__ rather than
467 2010-08-28 Pedro Alves <pedro@codesourcery.com>
469 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
470 debug_threads check. Avoid a linear search when not doing debug
473 2010-08-27 Pedro Alves <pedro@codesourcery.com>
475 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
476 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
477 (struct file_handler) <fd>: Change type to gdb_fildes_t.
478 (process_event): Change local fd's type to gdb_fildes_t.
479 (create_file_handler): Adjust prototype.
480 (delete_file_handler): Adjust prototype.
481 (handle_file_event): Adjust prototype. Use pfildes.
482 (create_file_event): Adjsut prototype.
483 * remote-utils.c (remote_desc, listen_desc): Change type to
485 * server.h: New gdb_fildes_t typedef.
486 [USE_WIN32API]: Include winsock2.h.
487 (delete_file_handler, add_file_handler): Adjust prototypes.
489 * utils.c (pfildes): New.
491 2010-08-27 Pedro Alves <pedro@codesourcery.com>
493 * configure.ac (build_warnings): Add -Wno-char-subscripts.
494 * configure: Regenerate.
496 2010-08-27 Pedro Alves <pedro@codesourcery.com>
498 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
499 (linux_done_accessing_memory): ... this.
500 (linux_target_ops): Adjust.
501 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
502 * nto-low.c (nto_target_ops): Adjust comment.
503 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
504 * spu-low.c (spu_target_ops): Adjust comment.
505 * target.h (target_ops): Rename unprepare_to_access_memory field
506 to done_accessing_memory.
507 (unprepare_to_access_memory): Rename to ...
508 (done_accessing_memory): ... this.
510 2010-08-26 Pedro Alves <pedro@codesourcery.com>
512 * linux-low.c (linux_prepare_to_access_memory): New.
513 (linux_unprepare_to_access_memory): New.
514 (linux_target_ops): Install them.
515 * server.c (read_memory): Rename to ...
516 (gdb_read_memory): ... this. Use
517 prepare_to_access_memory/prepare_to_access_memory.
518 (write_memory): Rename to ...
519 (gdb_write_memory): ... this. Use
520 prepare_to_access_memory/prepare_to_access_memory.
521 (handle_search_memory_1): Adjust.
522 (process_serial_event): Adjust.
523 * target.h (struct target_ops): New fields
524 prepare_to_access_memory and unprepare_to_access_memory.
525 (prepare_to_access_memory, unprepare_to_access_memory): New.
526 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
527 prepare_to_access_memory/prepare_to_access_memory.
528 * nto-low.c (nto_target_ops): Adjust.
529 * spu-low.c (spu_target_ops): Adjust.
530 * win32-low.c (win32_target_ops): Adjust.
532 2010-08-26 Pedro Alves <pedro@codesourcery.com>
534 * Makefile.in (WARN_CFLAGS): Get it from configure.
535 (WERROR_CFLAGS): New.
536 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
537 * configure.ac: Introduce --enable-werror, which adds -Werror to
538 the compiler command line. Enabled by default. Disable with
539 --disable-werror. Add -Wdeclaration-after-statement
540 Wpointer-arith and -Wformat-nonliteral to warning flags.
541 * configure: Regenerate.
543 2010-08-26 Pedro Alves <pedro@codesourcery.com>
545 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
547 2010-08-26 Pedro Alves <pedro@codesourcery.com>
549 * gdbreplay.c (remote_error): New.
551 (expect): Use gdbchar. Check for error reading from GDB.
552 Clarify sync error output.
553 (play): Check for errors writing to GDB.
554 * linux-low.c (sigchld_handler): Really ignore `write' errors.
555 * remote-utils.c (getpkt): Check for errors writing to the remote
558 2010-08-25 Pedro Alves <pedro@codesourcery.com>
560 * linux-low.c (linux_wait_1): Move non-debugging code out of
561 `debug_threads' control.
563 2010-08-25 Pedro Alves <pedro@codesourcery.com>
565 * linux-low.c (linux_wait_1): Don't set last_status here.
566 * server.c (push_event, queue_stop_reply_callback): Assert we're
567 not pushing a TARGET_WAITKIND_IGNORE event.
568 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
569 (myresume, handle_target_event): Set the thread's last_resume_kind
570 and last_status from the target returned status.
572 2010-08-25 Pedro Alves <pedro@codesourcery.com>
576 * linux-x86-low.c (update_debug_registers_callback): New.
577 (i386_dr_low_set_addr): Use it.
578 (i386_dr_low_get_addr): New.
579 (i386_dr_low_set_control): Use update_debug_registers_callback.
580 (i386_dr_low_get_control): New.
581 (i386_dr_low_get_status): Adjust.
582 * linux-low.c (linux_stop_lwp): New.
583 * linux-low.h (linux_stop_lwp): Declare.
585 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
586 argument instead of a i386_debug_reg_state.
587 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
588 a i386_debug_reg_state.
589 (i386_insert_aligned_watchpoint): Adjust.
590 (i386_remove_aligned_watchpoint): Adjust.
591 (i386_low_stopped_data_address): Read the debug registers from the
592 inferior instead of from the mirrors.
593 * i386-low.h (struct i386_debug_reg_state): Extend comment.
594 (i386_dr_low_get_addr): Declare.
595 (i386_dr_low_get_control): Declare.
596 (i386_dr_low_get_status): Change prototype.
598 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
599 (i386_dr_low_get_addr): New.
600 (i386_dr_low_get_control): New.
601 (i386_dr_low_get_status): Adjust prototype. Return
603 (i386_initial_stuff): Clear dr_status_mirror and
605 (i386_get_thread_context): Adjust.
606 (i386_set_thread_context): Adjust.
607 (i386_thread_added): Adjust.
609 2010-08-24 Pedro Alves <pedro@codesourcery.com>
611 * linux-low.h (linux_thread_area): Delete declaration.
613 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
615 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
616 after its termination.
618 2010-08-09 Pedro Alves <pedro@codesourcery.com>
620 * linux-low.c (gdb_wants_lwp_stopped): Delete.
621 (gdb_wants_all_stopped): Delete.
622 (linux_wait_1): Don't call them.
623 * server.c (handle_v_cont): Tag all threads as want-stopped.
624 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
625 stopped as "client-wants-stopped".
627 2010-07-31 Pedro Alves <pedro@codesourcery.com>
629 * Makefile.in (signals_h): New.
630 (server_h): Depend on it.
631 (server.o): Don't depend on $(signals_def).
632 (signals.o): Depend on $(signals_def).
634 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
636 * Makefile.in (signals_def): New.
637 (server_h): Append include/gdb/signals.h and signals_def.
638 (server.o): Append signals_def.
640 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
642 * server.c (handle_target_event): Use target_signal_to_host for
643 resume_info.sig initialization.
644 * target.h (struct thread_resume) <sig>: New comment.
646 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
648 * server.c (handle_query): strcpy() the returned string from paddress()
649 instead of sprintf().
650 * utils.c (paddress): Return phex_nz().
652 2010-07-07 Joel Brobecker <brobecker@adacore.com>
654 * server.c (handle_v_cont): Call mourn_inferior if process
656 (myresume): Likewise.
658 2010-07-01 Pedro Alves <pedro@codesourcery.com>
660 Static tracepoints, and integration with UST.
662 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
663 * mem-break.c (uninsert_all_breakpoints)
664 (reinsert_all_breakpoints): New.
665 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
666 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
667 (gdb_agent_ust_loaded, helper_thread_id)
668 (gdb_agent_helper_thread_id): New macros.
669 (struct ipa_sym_addresses): Add addr_ust_loaded,
670 addr_helper_thread_id, addr_cmd_buf.
671 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
672 (in_process_agent_loaded_ust): New.
673 (write_e_ust_not_loaded): New.
674 (maybe_write_ipa_ust_not_loaded): New.
675 (struct collect_static_trace_data_action): New.
676 (enum tracepoint_type) <static_tracepoint>: New.
677 (struct tracepoint) <handle>: Mention static tracepoints.
678 (struct static_tracepoint_ctx): New.
680 (add_tracepoint_action): Handle static tracepoint actions.
681 (unprobe_marker_at): New.
682 (clear_installed_tracepoints): Handle static tracepoints.
683 (cmd_qtdp): Handle static tracepoints.
684 (probe_marker_at): New.
685 (cmd_qtstart): Handle static tracepoints.
686 (response_tracepoint): Handle static tracepoints.
687 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
688 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
689 (get_context_regcache): Handle static tracepoints.
690 (do_action_at_tracepoint): Handle static tracepoint actions.
691 (traceframe_find_block_type): Handle static trace data blocks.
692 (traceframe_read_sdata): New.
693 (download_tracepoints): Download static tracepoint actions.
694 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
695 (GDB_PROBE_NAME): New.
700 (ust_marker_to_static_tracepoint): New.
702 (collect_ust_data_at_tracepoint): New.
703 (gdb_ust_probe): New.
704 (UNIX_PATH_MAX, SOCK_DIR): New.
705 (gdb_ust_connect_sync_socket): New.
706 (resume_thread, stop_thread): New.
707 (run_inferior_command): New.
708 (init_named_socket): New.
709 (gdb_ust_socket_init): New.
710 (cstr_to_hexstr): New.
712 (first_marker, next_marker): New.
713 (response_ust_marker): New.
714 (cmd_qtfstm, cmd_qtsstm): New.
715 (unprobe_marker_at, probe_marker_at): New.
716 (cmd_qtstmat, gdb_ust_thread): New.
718 (initialize_tracepoint_ftlib): Call gdb_ust_init.
719 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
721 (x86_64_st_collect_regmap): New.
722 (X86_64_NUM_ST_COLLECT_GREGS): New.
723 (AMD64_RIP_REGNUM): New.
724 (supply_static_tracepoint_registers): New.
725 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
727 (i386_st_collect_regmap): New.
728 (i386_NUM_ST_COLLECT_GREGS): New.
729 (supply_static_tracepoint_registers): New.
730 * server.c (handle_query): Handle qXfer:statictrace:read.
731 <qSupported>: Report support for StaticTracepoints, and
732 qXfer:statictrace:read features.
733 * server.h (traceframe_read_sdata)
734 (supply_static_tracepoint_registers): Declare.
735 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
736 (unpack_varlen_hex): Include in IPA build.
737 * Makefile.in (ustlibs, ustinc): New.
738 (IPA_OBJS): Add remote-utils-ipa.o.
739 ($(IPA_LIB)): Link -ldl and -lpthread.
741 (IPAGENT_CFLAGS): Add UST_CFLAGS.
742 * config.in, configure: Regenerate.
744 2010-06-20 Ian Lance Taylor <iant@google.com>
745 Pedro Alves <pedro@codesourcery.com>
747 * linux-x86-low.c (always_true): Delete.
748 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
749 trying to fool the compiler with always_true.
751 2010-06-20 Pedro Alves <pedro@codesourcery.com>
753 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
754 conditions in gdbserver.
756 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
758 * spu-low.c (spu_read_memory): Wrap around local store limit.
759 (spu_write_memory): Likewise.
761 2010-06-15 Pedro Alves <pedro@codesourcery.com>
763 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
764 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
766 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
768 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
769 uses with LONGEST uses.
771 2010-06-14 Stan Shebs <stan@codesourcery.com>
772 Pedro Alves <pedro@codesourcery.com>
776 * linux-x86-low.c: Include limits.h.
781 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
782 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
783 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
784 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
785 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
786 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
787 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
788 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
789 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
790 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
791 (amd64_emit_void_call_2): New.
792 (amd64_emit_ops): New.
793 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
794 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
795 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
796 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
797 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
798 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
799 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
800 (i386_emit_call, i386_emit_reg, i386_emit_pop)
801 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
802 (i386_emit_stack_adjust, i386_emit_int_call_1)
803 (i386_emit_void_call_2): New.
804 (i386_emit_ops): New.
806 (the_low_target): Install x86_emit_ops.
807 * server.h (struct emit_ops): New.
808 (get_raw_reg_func_addr): Declare.
809 (current_insn_ptr, emit_error): Declare.
810 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
811 (set_trace_state_variable_value): New defines.
812 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
813 addr_get_trace_state_variable_value and
814 addr_set_trace_state_variable_value.
815 (symbol_list): New fields for get_raw_reg,
816 get_trace_state_variable_value and set_trace_state_variable_value.
817 (condfn): New typedef.
818 (struct tracepoint): New field `compiled_cond'.
819 (do_action_at_tracepoint): Clear compiled_cond.
820 (get_trace_state_variable_value, set_trace_state_variable_value):
822 (condition_true_at_tracepoint): If there's a compiled condition,
824 (current_insn_ptr, emit_error): New globals.
825 (struct bytecode_address): New.
826 (get_raw_reg_func_addr): New.
827 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
828 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
829 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
830 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
831 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
832 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
833 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
834 (compile_tracepoint_condition, compile_bytecodes): New.
835 * target.h (emit_ops): Forward declare.
836 (struct target_ops): New field emit_ops.
837 (target_emit_ops): New.
838 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
839 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
840 * linux-low.c (linux_emit_ops): New.
841 (linux_target_ops): Install it.
842 * linux-low.h (struct linux_target_ops): New field emit_ops.
844 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
846 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
847 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
849 2010-06-01 Pedro Alves <pedro@codesourcery.com>
850 Stan Shebs <stan@codesourcery.com>
852 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
853 (all): Depend on $(extra_libraries).
854 (install-only): Install the IPA.
855 (IPA_OBJS, IPA_LIB): New.
856 (clean): Remove the IPA lib.
857 (IPAGENT_CFLAGS): New.
858 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
859 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
860 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
861 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
862 * configure.ac: Check for atomic builtins support in the compiler.
863 (IPA_DEPFILES, extra_libraries): Define.
864 * configure.srv (ipa_obj): Add description.
865 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
866 (i[34567]86-*-linux*): Set ipa_obj.
867 (x86_64-*-linux*): Set ipa_obj.
868 * linux-low.c (stabilizing_threads): New.
869 (supports_fast_tracepoints): New.
870 (linux_detach): Stabilize threads before detaching.
871 (handle_tracepoints): Handle internal tracing breakpoints. Assert
872 the lwp is either not stabilizing, or is moving out of a jump pad.
873 (linux_fast_tracepoint_collecting): New.
874 (maybe_move_out_of_jump_pad): New.
875 (enqueue_one_deferred_signal): New.
876 (dequeue_one_deferred_signal): New.
877 (linux_wait_for_event_1): If moving out of a jump pad, defer
878 pending signals to later.
879 (linux_stabilize_threads): New.
880 (linux_wait_1): Check if threads need moving out of jump pads, and
882 (stuck_in_jump_pad_callback): New.
883 (move_out_of_jump_pad_callback): New.
885 (linux_resume_one_lwp): Handle moving out of jump pads.
886 (linux_set_resume_request): Dequeue deferred signals.
887 (need_step_over_p): Also step over fast tracepoint jumps.
888 (start_step_over): Also uninsert fast tracepoint jumps.
889 (finish_step_over): Also reinsert fast tracepoint jumps.
890 (linux_install_fast_tracepoint_jump): New.
891 (linux_target_ops): Install linux_stabilize_threads and
892 linux_install_fast_tracepoint_jump_pad.
893 * linux-low.h (linux_target_ops) <get_thread_area,
894 install_fast_tracepoint_jump_pad>: New fields.
895 (struct lwp_info) <collecting_fast_tracepoint,
896 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
897 (linux_get_thread_area): Declare.
898 * linux-x86-low.c (jump_insn): New.
899 (x86_get_thread_area): New.
902 (amd64_install_fast_tracepoint_jump_pad): New.
903 (i386_install_fast_tracepoint_jump_pad): New.
904 (x86_install_fast_tracepoint_jump_pad): New.
905 (the_low_target): Install x86_get_thread_area and
906 x86_install_fast_tracepoint_jump_pad.
907 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
908 (struct fast_tracepoint_jump): New.
909 (fast_tracepoint_jump_insn): New.
910 (fast_tracepoint_jump_shadow): New.
911 (find_fast_tracepoint_jump_at): New.
912 (fast_tracepoint_jump_here): New.
913 (delete_fast_tracepoint_jump): New.
914 (set_fast_tracepoint_jump): New.
915 (uninsert_fast_tracepoint_jumps_at): New.
916 (reinsert_fast_tracepoint_jumps_at): New.
917 (set_breakpoint_at): Use write_inferior_memory.
918 (uninsert_raw_breakpoint): Use write_inferior_memory.
919 (check_mem_read): Mask out fast tracepoint jumps.
920 (check_mem_write): Mask out fast tracepoint jumps.
921 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
922 (set_fast_tracepoint_jump): Declare.
923 (delete_fast_tracepoint_jump)
924 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
925 (reinsert_fast_tracepoint_jumps_at): Declare.
926 * regcache.c: Don't compile many functions when building the
927 in-process agent library.
928 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
929 the register buffer in the heap.
930 (free_register_cache): If the register buffer isn't owned by the
931 regcache, don't free it.
932 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
933 pre-existing register caches.
934 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
936 (convert_ascii_to_int): : Constify `from' parameter type.
937 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
938 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
939 the needed buffer in-place.
940 (relocate_instruction): New.
941 * server.c (handle_query) <qSymbols>: If the target supports
942 tracepoints, give it a chance of looking up symbols. Report
943 support for fast tracepoints.
944 (handle_status): Stabilize threads.
945 (process_serial_event): Adjust.
946 * server.h (struct fast_tracepoint_jump): Forward declare.
947 (struct process_info) <fast_tracepoint_jumps>: New field.
948 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
949 (decode_X_packet, decode_M_packet): Adjust.
950 (relocate_instruction): Declare.
951 (in_process_agent_loaded): Declare.
952 (tracepoint_look_up_symbols): Declare.
953 (struct fast_tpoint_collect_status): Declare.
954 (fast_tracepoint_collecting): Declare.
955 (force_unlock_trace_buffer): Declare.
956 (handle_tracepoint_bkpts): Declare.
957 (initialize_low_tracepoint)
958 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
959 * target.h (struct target_ops) <stabilize_threads,
960 install_fast_tracepoint_jump_pad>: New fields.
961 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
962 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
963 [HAVE_STDINT_H]: Include stdint.h.
964 (trace_debug_1): Rename to ...
965 (trace_vdebug): ... this.
966 (trace_debug): Rename to ...
967 (trace_debug_1): ... this. Add `level' parameter.
969 (ATTR_USED, ATTR_NOINLINE): New.
970 (IP_AGENT_EXPORT): New.
971 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
972 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
973 (about_to_request_buffer_space, trace_buffer_is_full)
974 (stopping_tracepoint, expr_eval_result, error_tracepoint)
975 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
976 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
977 (traceframe_write_count, traceframes_created)
978 (trace_state_variables)
979 New renaming defines.
980 (struct ipa_sym_addresses): New.
981 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
983 (ipa_sym_addrs): New.
984 (all_tracepoint_symbols_looked_up): New.
985 (in_process_agent_loaded): New.
986 (write_e_ipa_not_loaded): New.
987 (maybe_write_ipa_not_loaded): New.
988 (tracepoint_look_up_symbols): New.
989 (debug_threads) [IN_PROCESS_AGENT]: New.
990 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
991 (UNKNOWN_SIDE_EFFECTS): New.
993 (flush_trace_buffer): New.
994 (stop_tracing_bkpt): New.
995 (flush_trace_buffer_bkpt): New.
996 (read_inferior_integer): New.
997 (read_inferior_uinteger): New.
998 (read_inferior_data_pointer): New.
999 (write_inferior_data_pointer): New.
1000 (write_inferior_integer): New.
1001 (write_inferior_uinteger): New.
1002 (struct collect_static_trace_data_action): Delete.
1003 (enum tracepoint_type): New.
1004 (struct tracepoint) <type>: New field `type'.
1005 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1006 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1007 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1008 (tracepoints): Use IP_AGENT_EXPORT.
1009 (last_tracepoint): Don't include in the IPA.
1010 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1011 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1012 (alloced_trace_state_variables): New.
1013 (trace_state_variables): Use IP_AGENT_EXPORT.
1014 (traceframe_t): Delete unused variable.
1015 (circular_trace_buffer): Don't include in the IPA.
1016 (trace_buffer_start): Delete.
1017 (struct trace_buffer_control): New.
1018 (trace_buffer_free): Delete.
1019 (struct ipa_trace_buffer_control): New.
1020 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1021 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1023 (trace_buffer_ctrl): New.
1024 (TRACE_BUFFER_CTRL_CURR): New.
1025 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1026 Reimplement as macros.
1027 (trace_buffer_wrap): Delete.
1028 (traceframe_write_count, traceframe_read_count)
1029 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1030 (struct tracepoint_hit_ctx) <type>: New field.
1031 (struct fast_tracepoint_ctx): New.
1032 (memory_barrier): New.
1034 (record_tracepoint_error): Update atomically in the IPA.
1035 (clear_inferior_trace_buffer): New.
1036 (about_to_request_buffer_space): New.
1037 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1038 updating the same buffer.
1039 (add_tracepoint): Default the tracepoint's type to trap
1040 tracepoint, and orig_size to -1.
1041 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1043 (create_trace_state_variable): New parameter `gdb'. Handle it.
1044 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1045 (cmd_qtdp): Handle fast tracepoints.
1047 (max_jump_pad_size): New.
1048 (gdb_jump_pad_head): New.
1049 (get_jump_space_head): New.
1050 (claim_jump_space): New.
1051 (sort_tracepoints): New.
1052 (MAX_JUMP_SIZE): New.
1053 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1055 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1056 support. Upload fast traceframes, and delete internal IPA
1058 (stop_tracing_handler): New.
1059 (flush_trace_buffer_handler): New.
1060 (cmd_qtstop): Upload fast tracepoints.
1061 (response_tracepoint): Handle fast tracepoints.
1062 (tracepoint_finished_step): Upload fast traceframes. Set the
1063 tracepoint hit context's tracepoint type.
1064 (handle_tracepoint_bkpts): New.
1065 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1066 type. Add comment about fast tracepoints.
1067 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1068 non-existing action_str field.
1069 (get_context_regcache): Handle fast tracepoints.
1070 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1072 (fast_tracepoint_from_jump_pad_address): New.
1073 (fast_tracepoint_from_ipa_tpoint_address): New.
1074 (collecting_t): New.
1075 (force_unlock_trace_buffer): New.
1076 (fast_tracepoint_collecting): New.
1079 (write_inferior_data_ptr): New.
1080 (target_tp_heap): New.
1081 (target_malloc): New.
1082 (download_agent_expr): New.
1084 (download_tracepoints): New.
1085 (download_trace_state_variables): New.
1086 (upload_fast_traceframes): New.
1087 (IPA_FIRST_TRACEFRAME): New.
1088 (IPA_NEXT_TRACEFRAME_1): New.
1089 (IPA_NEXT_TRACEFRAME): New.
1090 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1091 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1092 (gdb_jump_pad_buffer_end): New.
1093 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1094 (initialize_tracepoint): Adjust.
1095 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1096 buffer. Initialize the low module.
1097 * utils.c (PREFIX, TOOLNAME): New.
1098 (malloc_failure): Use PREFIX.
1099 (error): In the IPA, an error causes an exit.
1100 (fatal, warning): Use PREFIX.
1101 (internal_error): Use TOOLNAME.
1102 (NUMCELLS): Increase to 10.
1103 * configure, config.in: Regenerate.
1105 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1107 * server.c (handle_query) <qSupported>: Do two passes over the
1108 qSupported string to avoid nesting strtok.
1110 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1112 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1114 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1116 * configure: Regenerate.
1117 * proc-service.list: New.
1119 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1121 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1124 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1126 * gdbreplay.c (remote_open): Check error return from socket() call by
1127 its equality to -1 not by it being negative.
1128 * remote-utils.c (remote_open): Likewise.
1130 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1132 * config.h: Regenerate.
1134 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1136 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1137 doesn't provide PTRACE_GET_THREAD_AREA.
1139 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1141 * linux-m68k-low.c: Include <asm/ptrace.h>
1142 (ps_get_thread_area): Implement.
1144 2010-05-03 Doug Evans <dje@google.com>
1146 * event-loop.c (struct callback_event): New struct.
1147 (callback_list): New global.
1148 (append_callback_event, delete_callback_event): New functions.
1149 (process_callback): New function.
1150 (start_event_loop): Call it.
1151 * remote-utils.c (NOT_SCHEDULED): Define.
1152 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1153 moved out of readchar.
1154 (readchar): Rewrite. Call reschedule before returning.
1155 (reset_readchar): New function.
1156 (remote_close): Call it.
1157 (process_remaining, reschedule): New functions.
1158 * server.h (callback_handler_func): New typedef.
1159 (append_callback_event, delete_callback_event): Declare.
1161 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1163 * proc-service.c (ps_pglobal_lookup): Use
1164 thread_db_look_up_one_symbol.
1165 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1166 parameter. Use it instead of all_symbols_looked_up.
1167 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1169 (all_symbols_looked_up): Don't declare.
1170 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1171 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1173 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1174 Set all_symbols_looked_up here.
1175 (thread_db_look_up_one_symbol): New.
1176 (thread_db_get_tls_address): Adjust.
1177 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1178 thread_db object on the heap, and tentatively set it in the
1180 (thread_db_init): Don't set all_symbols_looked_up here.
1181 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1183 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1185 * linux-low.c (linux_kill, linux_detach): Adjust.
1186 (status_pending_p_callback): Remove redundant statement. Check
1187 for !TARGET_WAITIKIND_IGNORE, instead of
1188 TARGET_WAITKIND_STOPPED.
1189 (handle_tracepoints): Make sure LWP is locked. Adjust.
1190 (linux_wait_for_event_1): Adjust.
1191 (linux_cancel_breakpoints): New.
1192 (unsuspend_one_lwp): New.
1193 (unsuspend_all_lwps): New.
1194 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1195 (send_sigstop_callback): Change return type to int, add new
1196 `except' parameter and handle it.
1197 (suspend_and_send_sigstop_callback): New.
1198 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1199 pass them down. If SUSPEND, also increment the lwp's suspend
1201 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1202 (need_step_over_p): Don't consider suspended LWPs.
1203 (start_step_over): Adjust.
1204 (proceed_one_lwp): Change return type to int, add new `except'
1205 parameter and handle it.
1206 (unsuspend_and_proceed_one_lwp): New.
1207 (proceed_all_lwps): Use find_inferior instead of
1209 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1210 also decrement the suspend count of LWPs. Pass `except' down,
1211 instead of hacking its suspend count.
1212 (linux_pause_all): Add `freeze' parameter. Adjust.
1213 (linux_unpause_all): New.
1214 (linux_target_ops): Install linux_unpause_all.
1215 * server.c (handle_status): Adjust.
1216 * target.h (struct target_ops): New fields `unpause_all' and
1217 `cancel_breakpoints'. Add new parameter to `pause_all'.
1218 (pause_all): Add new `freeze' parameter.
1220 (cancel_breakpoints): New.
1221 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1223 (cmd_qtstart): Pause threads.
1224 (stop_tracing): Pause threads, and cancel breakpoints.
1225 * win32-low.c (win32_target_ops): Adjust.
1227 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1229 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1230 the inferior right away from here...
1231 (linux_wait_1): ... to here, and adjust to check the thread's
1232 last_resume_kind instead of the lwp's step or stop_expected flags.
1234 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1236 * README: Use consistent `GDB' and `GDBserver' spellings.
1238 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1240 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1241 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1242 (linux_detach_one_lwp): Assume the lwp is stopped.
1243 (any_thread_of): Delete.
1244 (linux_detach): Stop all lwps here. Don't blindly delete all
1246 (delete_lwp_callback): New.
1247 (linux_mourn): Delete all lwps of the process that is gone.
1248 (linux_wait_1): Don't delete the last lwp of the process here.
1249 * mem-break.h (mark_breakpoints_out): Declare.
1250 * mem-break.c (mark_breakpoints_out): New.
1251 (free_all_breakpoints): Use it.
1252 * server.c (handle_target_event): If the process is gone, mark
1254 * thread-db.c (struct thread_db) <create_bp>: New field.
1255 (thread_db_enable_reporting): Fix prototype. Store a thread event
1256 breakpoint reference in the thread_db struct.
1257 (thread_db_load_search): Clear the thread_db object.
1258 (try_thread_db_load_1): Ditto.
1259 (switch_to_process): New.
1260 (disable_thread_event_reporting): Use it.
1261 (remove_thread_event_breakpoints): New.
1262 (thread_db_detach, thread_db_mourn): Use it.
1264 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1266 * linux-low.c (linux_enable_event_reporting): New.
1267 (linux_wait_for_event_1, handle_extended_wait): Use it.
1269 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1271 * linux-low.c (linux_kill_one_lwp, linux_kill)
1272 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1273 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1274 SIGSTOP even if the LWP is stopped.
1275 (send_sigstop_callback): New.
1276 (stop_all_lwps): Use send_sigstop_callback instead.
1277 (linux_resume_one_thread): Adjust.
1278 (proceed_one_lwp): Still proceed an LWP that the client has
1279 requested to stop, if we haven't reported it as stopped yet. Make
1280 sure that LWPs the client want stopped, have a pending SIGSTOP.
1282 2010-04-26 Doug Evans <dje@google.com>
1284 * server.c (handle_general_set): Make static.
1286 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1287 Print received char after testing for error/eof instead of before.
1288 (input_interrupt): Tweak comment.
1290 2010-04-23 Doug Evans <dje@google.com>
1292 * server.c (start_inferior): Print inferior argv if --debug.
1294 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1296 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1297 * nto-x86-low.c: Include server.h
1299 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1301 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1302 be consistent with other sources of this directory.
1303 (init_registers_amd64): Correct name of source file of this function
1306 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1308 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1311 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1313 * win32-i386-low.c: Add 64-bit support.
1314 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1315 (init_registers_amd64): Declare.
1316 (mappings): Add 64-bit version of array.
1317 (init_windows_x86): New function.
1318 (the_low_target): Change init_arch field to init_windows_x86.
1320 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1322 * win32-low.c: Adapt to support also 64-bit architecture.
1323 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1324 (get_image_name): Use SIZE_T type for local variable `done'.
1325 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1326 (toolhelp_get_dll_name): Idem.
1327 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1328 Use uintptr_t typecast to avoid warning.
1329 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1330 (handle_exception): Use phex_nz to avoid warning.
1331 (win32_wait): Remove unused local variable `process'.
1333 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1335 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1338 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1340 * configure.ac: Use `ws2_32' library for srv_mingw.
1341 * configure: Regenerate.
1342 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1343 * remote-utils.c: Likewise.
1345 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1347 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1348 if __x86_64__ is defined.
1350 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1352 * configure: Regenerate.
1354 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1356 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1357 * target.h (target_ops): New get_tib_address field.
1358 * win32-low.h (win32_thread_info): Add thread_local_base field.
1359 * win32-low.c (child_add_thread): Add tlb argument.
1360 Set thread_local_base field to TLB.
1361 (get_child_debug_event): Adapt to child_add_thread change.
1362 (win32_get_tib_address): New function.
1363 (win32_target_ops): Set get_tib_address field to
1364 win32_get_tib_address.
1365 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1367 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1369 * linux-low.c (linux_mourn): Also remove the process.
1370 * server.c (handle_target_event): Don't remove the process here.
1371 * nto-low.c (nto_mourn): New.
1372 (nto_target_ops): Install it.
1373 * spu-low.c (spu_mourn): New.
1374 (spu_target_ops): Install it.
1375 * win32-low.c (win32_mourn): New.
1376 (win32_target_ops): Install it.
1378 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1380 * server.h (buffer_xml_printf): Remove redundant `;'.
1382 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1384 * regcache.c (set_register_cache): Invalidate regcaches before
1385 changing the register cache layout.
1386 (regcache_invalidate_one): Allow a NULL regcache.
1387 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1388 regcaches before changing the register cache layout or the target
1391 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1393 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1394 variable warning on Linux/x86-64.
1396 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1398 GDBserver disconnected tracing support.
1400 * linux-low.c (linux_remove_process): Delete.
1401 (add_lwp): Don't set last_resume_kind here.
1402 (linux_kill): Use `mourn'.
1403 (linux_detach): Use `thread_db_detach', and `mourn'.
1405 (linux_attach_lwp_1): Adjust comment.
1406 (linux_attach): last_resume_kind moved the thread_info; adjust.
1407 (status_pending_p_callback): Adjust.
1408 (linux_wait_for_event_1): Adjust.
1409 (count_events_callback, select_singlestep_lwp_callback)
1410 (select_event_lwp_callback, cancel_breakpoints_callback)
1411 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1412 (proceed_one_lwp): Adjust.
1413 (linux_async): Add debug output.
1414 (linux_thread_stopped): New.
1415 (linux_pause_all): New.
1416 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1418 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1419 (thread_db_free): Delete declaration.
1420 (thread_db_detach, thread_db_mourn): Declare.
1421 * thread-db.c (thread_db_init): Use thread_db_mourn.
1422 (thread_db_free): Delete, split in two.
1423 (disable_thread_event_reporting): New.
1424 (thread_db_detach): New.
1425 (thread_db_mourn): New.
1427 * server.h (struct thread_info) <last_resume_kind>: New field.
1428 <attached>: Add comment.
1429 <gdb_detached>: New field.
1430 (handler_func): Change return type to int.
1431 (handle_serial_event, handle_target_event): Ditto.
1432 (gdb_connected): Declare.
1434 (disconnected_tracing): Declare.
1435 (stop_tracing): Declare.
1437 * server.c (handle_query) <qSupported>: Report support for
1438 disconnected tracing.
1439 (queue_stop_reply_callback): Account for running threads.
1440 (gdb_wants_thread_stopped): New.
1441 (gdb_wants_all_threads_stopped): New.
1442 (gdb_reattached_process): New.
1443 (handle_status): Clear the `gdb_detached' flag of all processes.
1444 In all-stop, stop all threads.
1445 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1446 (process_serial_event): If the remote connection breaks, or if an
1447 exit was forced with "monitor exit", force an event loop exit.
1448 Handle disconnected tracing on detach.
1449 (handle_serial_event): Adjust.
1450 (handle_target_event): If GDB isn't connected, forward events back
1451 to the inferior, unless the last process exited, in which case,
1452 exit gdbserver. Adjust interface.
1454 * remote-utils.c (remote_open): Don't block in accept. Instead
1455 register an event loop source on the listen socket file
1456 descriptor. Refactor bits into ...
1457 (listen_desc): ... this new global.
1458 (gdb_connected): ... this new function.
1459 (enable_async_notification): ... this new function.
1460 (handle_accept_event): ... this new function.
1461 (remote_close): Clear remote_desc.
1463 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1465 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1467 (mourn_inferior): Define.
1468 (target_process_qsupported): Avoid the dangling else problem.
1469 (thread_stopped): Define.
1470 (pause_all): Define.
1471 (target_waitstatus_to_string): Declare.
1472 * target.c (target_waitstatus_to_string): New.
1474 * tracepoint.c (tracing): Make extern.
1475 (disconnected_tracing): New.
1476 (stop_tracing): Make extern. Handle tracing stops due to GDB
1478 (cmd_qtdisconnected): New.
1479 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1480 (handle_tracepoint_general_set): Handle QTDisconnected.
1482 * event-loop.c (event_handler_func): Change return type to int.
1483 (process_event): Bail out if the event handler wants the event
1485 (handle_file_event): Ditto.
1486 (start_event_loop): Bail out if the event handler wants the event
1489 * nto-low.c (nto_target_ops): Adjust.
1490 * spu-low.c (spu_wait): Don't remove the process here.
1491 (spu_target_ops): Adjust.
1492 * win32-low.c (win32_wait): Don't remove the process here.
1493 (win32_target_ops): Adjust.
1495 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1497 * regcache.c (realloc_register_cache): Invalidate inferior's
1498 regcache before recreating it.
1500 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1502 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1504 2010-04-09 Stan Shebs <stan@codesourcery.com>
1505 Pedro Alves <pedro@codesourcery.com>
1507 * server.h (LONGEST): New.
1508 (struct thread_info) <while_stepping>: New field.
1509 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1511 (initialize_tracepoint, handle_tracepoint_general_set)
1512 (handle_tracepoint_query, tracepoint_finished_step)
1513 (tracepoint_was_hit, release_while_stepping_state_list):
1514 (current_traceframe): Declare.
1515 * server.c (handle_general_set): Handle tracepoint packets.
1517 (write_memory): New.
1518 (handle_search_memory_1): Use read_memory.
1519 (handle_query): Report support for conditional tracepoints, trace
1520 state variables, and tracepoint sources. Handle tracepoint
1522 (main): Initialize the tracepoints module.
1523 (process_serial_event): Handle traceframe reads/writes.
1525 * linux-low.c (handle_tracepoints): New.
1526 (linux_wait_1): Call it.
1527 (linux_resume_one_lwp): Handle while-stepping.
1528 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1529 (linux_target_ops): Install them.
1530 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1532 * linux-x86-low.c (x86_supports_tracepoints): New.
1533 (the_low_target). Install it.
1535 * mem-break.h (delete_breakpoint): Declare.
1536 * mem-break.c (delete_breakpoint): Make external.
1538 * target.h (struct target_ops): Add `supports_tracepoints',
1539 `read_pc', and `write_pc' fields.
1540 (target_supports_tracepoints): Define.
1541 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1544 * regcache.h (struct regcache) <registers_owned>: New field.
1545 (init_register_cache, regcache_cpy): Declare.
1546 (regcache_read_pc, regcache_write_pc): Declare.
1547 (register_cache_size): Declare.
1548 (supply_regblock): Declare.
1549 * regcache.c (init_register_cache): New.
1550 (new_register_cache): Use it.
1551 (regcache_cpy): New.
1552 (register_cache_size): New.
1553 (supply_regblock): New.
1554 (regcache_read_pc, regcache_write_pc): New.
1556 * tracepoint.c: New.
1558 * Makefile.in (OBS): Add tracepoint.o.
1559 (tracepoint.o): New rule.
1561 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1563 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1565 (i386-mmx.c): Likewise.
1566 (i386-mmx-linux.o): Likewise.
1567 (i386-mmx-linux.c): Likewise.
1569 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1570 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1571 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1572 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1574 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1575 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1576 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1578 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1580 * Makefile.in (clean): Updated.
1582 (i386-avx.c): Likewise.
1583 (i386-avx-linux.o): Likewise.
1584 (i386-avx-linux.c): Likewise.
1585 (amd64-avx.o): Likewise.
1586 (amd64-avx.c): Likewise.
1587 (amd64-avx-linux.o): Likewise.
1588 (amd64-avx-linux.c): Likewise.
1590 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1591 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1592 (srv_amd64_regobj): Add amd64-avx.o.
1593 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1594 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1595 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1596 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1597 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1598 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1599 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1601 * i387-fp.c: Include "i386-xstate.h".
1603 (i387_cache_to_xsave): Likewise.
1604 (i387_xsave_to_cache): Likewise.
1605 (x86_xcr0): Likewise.
1607 * i387-fp.h (i387_cache_to_xsave): Likewise.
1608 (i387_xsave_to_cache): Likewise.
1609 (x86_xcr0): Likewise.
1611 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1612 * linux-crisv32-low.c (target_regsets): Likewise.
1613 * linux-m68k-low.c (target_regsets): Likewise.
1614 * linux-mips-low.c (target_regsets): Likewise.
1615 * linux-ppc-low.c (target_regsets): Likewise.
1616 * linux-s390-low.c (target_regsets): Likewise.
1617 * linux-sh-low.c (target_regsets): Likewise.
1618 * linux-sparc-low.c (target_regsets): Likewise.
1619 * linux-xtensa-low.c (target_regsets): Likewise.
1621 * linux-low.c: Include <sys/uio.h>.
1622 (regsets_fetch_inferior_registers): Support nt_type.
1623 (regsets_store_inferior_registers): Likewise.
1624 (linux_process_qsupported): New.
1625 (linux_target_ops): Add linux_process_qsupported.
1627 * linux-low.h (regset_info): Add nt_type.
1628 (linux_target_ops): Add process_qsupported.
1630 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1632 (init_registers_i386_avx_linux): New.
1633 (init_registers_amd64_avx_linux): Likewise.
1634 (xmltarget_i386_linux_no_xml): Likewise.
1635 (xmltarget_amd64_linux_no_xml): Likewise.
1636 (PTRACE_GETREGSET): Likewise.
1637 (PTRACE_SETREGSET): Likewise.
1638 (x86_fill_xstateregset): Likewise.
1639 (x86_store_xstateregset): Likewise.
1640 (use_xml): Likewise.
1641 (x86_linux_update_xmltarget): Likewise.
1642 (x86_linux_process_qsupported): Likewise.
1643 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1644 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1645 init_registers_i386_linux here. Call
1646 x86_linux_update_xmltarget.
1647 (the_low_target): Add x86_linux_process_qsupported.
1649 * server.c (handle_query): Call target_process_qsupported.
1651 * target.h (target_ops): Add process_qsupported.
1652 (target_process_qsupported): New.
1654 2010-04-03 Pedro Alves <pedro@codesourcery.com>
1656 * inferiors.c (add_thread): Set last_status kind to
1657 TARGET_WAITKIND_IGNORE.
1658 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1659 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1660 (linux_wait_1): Move `thread' local definition to block that uses
1661 it. Don't NULL initialize `event_child'.
1662 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1663 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1664 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1666 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1668 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1669 an extended waitstatus, or by a watchpoint.
1670 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1671 thread was stepping or has been stopped by a watchpoint.
1673 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1675 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1676 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1677 of another, then delete the previous, and validate all
1679 (validate_inserted_breakpoint): New.
1680 (delete_disabled_breakpoints): New.
1681 (validate_breakpoints): New.
1682 (check_mem_read): Validate breakpoints before trusting their
1683 shadow. Delete disabled breakpoints.
1684 (check_mem_write): Validate breakpoints before trusting they
1685 should be inserted. Delete disabled breakpoints.
1686 * mem-break.h (validate_breakpoints):
1687 * server.c (handle_query): Validate breakpoints when we see a
1690 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1692 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1693 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1694 if we could tell there's a GDB breakpoint at stop_pc.
1695 (need_step_over_p): Don't do a step over if we find a GDB
1696 breakpoint at the resume PC.
1698 * mem-break.c (struct raw_breakpoint): New.
1699 (enum bkpt_type): New type `gdb_breakpoint'.
1700 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1701 fields. New field `raw'.
1702 (find_raw_breakpoint_at): New.
1703 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1705 (set_breakpoint_at): Adjust.
1706 (delete_raw_breakpoint): New.
1707 (release_breakpoint): New.
1708 (delete_breakpoint): Rename to...
1709 (delete_breakpoint_1): ... this. Add proc parameter. Use
1710 release_breakpoint. Return ENOENT.
1711 (delete_breakpoint): Reimplement.
1712 (find_breakpoint_at): Delete.
1713 (find_gdb_breakpoint_at): New.
1714 (delete_breakpoint_at): Delete.
1715 (set_gdb_breakpoint_at): New.
1716 (delete_gdb_breakpoint_at): New.
1717 (gdb_breakpoint_here): New.
1718 (set_reinsert_breakpoint): Use release_breakpoint.
1719 (uninsert_breakpoint): Rename to ...
1720 (uninsert_raw_breakpoint): ... this.
1721 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1722 (reinsert_raw_breakpoint): Change parameter type to
1724 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1726 (check_breakpoints): Adjust. Use release_breakpoint.
1727 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1728 (breakpoint_inserted_here): Ditto.
1729 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1730 Don't trust the breakpoint's shadow if it is not inserted.
1731 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1732 (delete_all_breakpoints): Adjust.
1733 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1734 use delete_breakpoint_1.
1736 * mem-break.h (breakpoints_supported): Delete declaration.
1737 (set_gdb_breakpoint_at): Declare.
1738 (gdb_breakpoint_here): Declare.
1739 (delete_breakpoint_at): Delete.
1740 (delete_gdb_breakpoint_at): Declare.
1742 * server.h (struct raw_breakpoint): Forward declare.
1743 (struct process_info): New field `raw_breakpoints'.
1745 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1748 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1750 * linux-low.c (status_pending_p_callback): Fix comment.
1751 (linux_wait_for_event_1): Move most of the internal breakpoint
1752 handling from here...
1753 (linux_wait_1): ... to here.
1754 (count_events_callback): New.
1755 (select_singlestep_lwp_callback): New.
1756 (select_event_lwp_callback): New.
1757 (cancel_breakpoints_callback): New.
1758 (select_event_lwp): New.
1759 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1760 priority to all LWPs that have had events that should be reported
1761 to the client. Cancel breakpoints when about to reporting the
1762 event to the client, not while stopping lwps. No longer cancel
1763 finished single-steps here.
1764 (cancel_finished_single_step): Delete.
1765 (cancel_finished_single_steps): Delete.
1767 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1769 * mem-break.c (enum bkpt_type): New.
1770 (struct breakpoint): New field `type'.
1771 (set_breakpoint_at): Change return type to struct breakpoint
1772 pointer. Set type to `other_breakpoint' by default.
1773 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1774 in the breakpoint list.
1775 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1776 (reinsert_breakpoint): Rename to ...
1777 (reinsert_raw_breakpoint): ... this.
1778 (reinsert_breakpoints_at): Adjust.
1779 * mem-break.h (struct breakpoint): Declare.
1780 (set_breakpoint_at): Change return type to struct breakpoint
1783 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1785 * server.c (handle_query): Assign, not compare.
1787 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1789 Teach linux gdbserver to step-over-breakpoints.
1791 * linux-low.c (can_hardware_single_step): New.
1792 (supports_breakpoints): New.
1793 (handle_extended_wait): If stopping threads, read the stop pc of
1796 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1797 low target doesn't support retrieving the PC.
1798 (add_lwp): Set last_resume_kind to resume_continue.
1799 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1800 (linux_attach): Don't clear stop_expected. Set the lwp's
1801 last_resume_kind to resume_stop.
1802 (linux_detach_one_lwp): Don't check for removed breakpoints.
1803 (check_removed_breakpoint): Delete.
1804 (status_pending_p): Rename to ...
1805 (status_pending_p_callback): ... this. Don't check for removed
1806 breakpoints. Don't consider threads that are stopped from GDB's
1808 (linux_wait_for_lwp): Always read the stop_pc here.
1809 (cancel_breakpoint): New.
1810 (step_over_bkpt): New global.
1811 (linux_wait_for_event_1): Implement stepping over breakpoints.
1812 (gdb_wants_lwp_stopped): New.
1813 (gdb_wants_all_stopped): New.
1814 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1815 single-step traps here. Store the thread's last reported target
1817 (send_sigstop): Don't clear stop_expected. Always set it,
1819 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1820 (cancel_finished_single_step): New.
1821 (cancel_finished_single_steps): New.
1822 (wait_for_sigstop): Don't cancel finished single-step traps here.
1823 (linux_resume_one_lwp): Don't check for removed breakpoints.
1824 Don't set `step' on non-hardware step archs.
1825 (linux_set_resume_request): Ignore resume_stop requests if already
1826 stopping or stopped. Set the lwp's last_resume_kind.
1827 (resume_status_pending_p): Don't check for removed breakpoints.
1828 (need_step_over_p): New.
1829 (start_step_over): New.
1830 (finish_step_over): New.
1831 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1832 requests. Clear the thread's last reported target waitstatus.
1833 Don't use the `suspended' flag. Don't consider pending breakpoints.
1834 (linux_resume): Start a step-over if necessary.
1835 (proceed_one_lwp): New.
1836 (proceed_all_lwps): New.
1837 (unstop_all_lwps): New.
1838 * linux-low.h (struct lwp_info): Rewrite comment for the
1839 `suspended' flag. Add the `stop_pc' field. Delete the
1840 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1841 Add `'last_resume_kind' and `need_step_over' fields.
1842 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1843 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1844 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1845 (set_raw_breakpoint_at): New.
1846 (set_breakpoint_at): Rewrite to use it.
1847 (reinsert_breakpoint_handler): Delete.
1848 (set_reinsert_breakpoint): New.
1849 (reinsert_breakpoint_by_bp): Delete.
1850 (delete_reinsert_breakpoints): New.
1851 (uninsert_breakpoint): Rewrite.
1852 (uninsert_breakpoints_at): New.
1853 (reinsert_breakpoint): Rewrite.
1854 (reinsert_breakpoints_at): New.
1855 (check_breakpoints): Rewrite.
1856 (breakpoint_here): New.
1857 (breakpoint_inserted_here): New.
1858 (check_mem_read): Adjust.
1859 * mem-break.h (breakpoints_supported, breakpoint_here)
1860 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1861 (reinsert_breakpoint_by_bp): Delete declaration.
1862 (delete_reinsert_breakpoints): Declare.
1863 (reinsert_breakpoint): Delete declaration.
1864 (reinsert_breakpoints_at): Declare.
1865 (uninsert_breakpoint): Delete declaration.
1866 (uninsert_breakpoints_at): Declare.
1867 (check_breakpoints): Adjust prototype.
1868 * server.h: Adjust include order.
1869 (struct thread_info): Declare here. Add a `last_status' field.
1871 2010-03-23 Michael Snyder <msnyder@vmware.com>
1873 * server.c (crc32): New function.
1874 (handle_query): Add handling for 'qCRC:' request.
1876 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1878 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1879 lwp had been stopped by a watchpoint.
1881 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1883 * server.h (internal_error): Declare.
1884 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1885 * utils.c (internal_error): New function.
1887 2010-03-15 Andreas Schwab <schwab@redhat.com>
1889 * configure.srv: Fix typo setting srv_regobj.
1891 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1893 * linux-low.c (fetch_register): Avoid passing a non string literal
1895 (usr_store_inferior_registers): Ditto.
1897 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1899 * linux-low.c (linux_write_memory): Bail out early if peeking
1902 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1904 * linux-low.h (struct lwp_info): New fields
1905 `stopped_by_watchpoint' and `stopped_data_address'.
1906 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1907 here, and cache them in the lwp object.
1908 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1910 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1912 (linux_stopped_by_watchpoint): Rewrite.
1913 (linux_stopped_data_address): Rewrite.
1915 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1917 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1918 switching the current inferior, not before.
1920 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1922 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1923 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1924 i386-linux.c and amd64-linux.c.
1925 (reg-i386.o): Removed.
1926 (reg-i386.c): Likewise.
1927 (reg-i386-linux.o): Likewise.
1928 (reg-i386-linux.c): Likewise.
1929 (reg-x86-64.o): Likewise.
1930 (reg-x86-64.c): Likewise.
1931 (reg-x86-64-linux.o): Likewise.
1932 (reg-x86-64-linux.c): Likewise.
1935 (i386-linux.o): Likewise.
1936 (i386-linux.c): Likewise.
1937 (amd64.o): Likewise.
1938 (amd64.c): Likewise.
1939 (amd64-linux.o): Likewise.
1940 (amd64-linux.c): Likewise.
1942 * configure.srv (srv_i386_regobj): New.
1943 (srv_i386_linux_regobj): Likewise.
1944 (srv_amd64_regobj): Likewise.
1945 (srv_amd64_linux_regobj): Likewise.
1946 (srv_i386_32bit_xmlfiles): Likewise.
1947 (srv_i386_64bit_xmlfiles): Likewise.
1948 (srv_i386_xmlfiles): Likewise.
1949 (srv_amd64_xmlfiles): Likewise.
1950 (srv_i386_linux_xmlfiles): Likewise.
1951 (srv_amd64_linux_xmlfiles): Likewise.
1952 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1953 srv_xmlfiles to $srv_i386_xmlfiles.
1954 (i[34567]86-*-mingw32ce*): Likewise.
1955 (i[34567]86-*-mingw*): Likewise.
1956 (i[34567]86-*-nto*): Likewise.
1957 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1958 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1959 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1960 (x86_64-*-linux*): Likewise.
1962 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1963 (init_registers_amd64_linux): New.
1964 (x86_arch_setup): Replace init_registers_x86_64_linux with
1965 init_registers_amd64_linux.
1967 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1969 * configure.ac: Check for libdl. If it is not available link against
1970 static libthread_db.
1971 * configure: Regenerate.
1973 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1977 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1978 handing a read watchpoint.
1979 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1981 2010-02-12 Doug Evans <dje@google.com>
1983 * linux-low.c (linux_supports_tracefork_flag): Document.
1984 (linux_look_up_symbols): Add comment.
1986 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1988 * regcache.c (supply_register): Clear regcache if buf is NULL.
1990 2010-02-02 Nicolas Roche <roche@sourceware.org>
1991 Joel Brobecker <brobecker@adacore.com>
1993 * inferiors.c (find_inferior): Add function documentation.
1994 (unloaded_dll): Handle the case where the unloaded dll has not
1995 been previously registered in the dll list.
1997 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1999 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2000 (thumb2_breakpoint): New.
2001 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2003 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2005 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2006 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2009 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2011 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2013 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2015 * linux-s390-low.c (s390_collect_ptrace_register)
2016 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2018 2010-01-21 Doug Evans <dje@google.com>
2020 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2021 (PTRACE_ARG4_TYPE): New macro.
2022 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2023 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2024 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2025 (usr_store_inferior_registers): Ditto.
2026 (linux_read_memory, linux_write_memory): Ditto.
2027 (linux_test_for_tracefork): Ditto.
2029 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2030 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2032 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2034 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2037 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2039 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2040 prototype to take a regcache. Adjust.
2042 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2044 * regcache.h (struct thread_info): Forward declare.
2045 (struct regcache): New.
2046 (new_register_cache): Adjust prototype.
2047 (get_thread_regcache): Declare.
2048 (free_register_cache): Adjust prototype.
2049 (registers_to_string, registers_from_string): Ditto.
2050 (supply_register, supply_register_by_name, collect_register)
2051 (collect_register_as_string, collect_register_by_name): Ditto.
2052 * regcache.c (struct inferior_regcache_data): Delete.
2053 (get_regcache): Rename to ...
2054 (get_thread_regcache): ... this. Adjust. Switch inferior before
2056 (regcache_invalidate_one): Adjust.
2057 (regcache_invalidate): Fix prototype.
2058 (new_register_cache): Return the new register cache.
2059 (free_register_cache): Change prototype.
2060 (realloc_register_cache): Adjust.
2061 (registers_to_string): Change prototype to take a regcache. Adjust.
2062 (registers_from_string): Ditto.
2063 (register_data): Ditto.
2064 (supply_register): Ditto.
2065 (supply_register_by_name): Ditto.
2066 (collect_register): Ditto.
2067 (collect_register_as_string): Ditto.
2068 (collect_register_by_name): Ditto.
2069 * server.c (process_serial_event): Adjust.
2070 * linux-low.h (regset_fill_func, regset_store_func): Change
2072 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2074 * linux-low.c (get_stop_pc): Adjust.
2075 (check_removed_breakpoint): Adjust.
2076 (linux_wait_for_event): Adjust.
2077 (linux_resume_one_lwp): Adjust.
2078 (fetch_register): Add regcache parameter. Adjust.
2079 (usr_store_inferior_registers): Ditto.
2080 (regsets_fetch_inferior_registers): Ditto.
2081 (regsets_store_inferior_registers): Ditto.
2082 (linux_fetch_registers, linux_store_registers): Ditto.
2083 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2085 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2086 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2087 prototype to take a regcache.
2088 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2089 * remote-utils.c (convert_ascii_to_int, outreg)
2090 (prepare_resume_reply): Change prototype to take a regcache.
2092 * target.h (struct target_ops) <fetch_registers, store_registers>:
2093 Change prototype to take a regcache.
2094 (fetch_inferior_registers, store_inferior_registers): Change
2095 prototype to take a regcache. Adjust.
2096 * proc-service.c (ps_lgetregs): Adjust.
2097 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2098 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2099 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2100 take a regcache. Adjust.
2101 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2102 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2103 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2104 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2105 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2106 (cris_cannot_fetch_register):
2107 (cris_breakpoint_at): Change prototype to take a regcache.
2109 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2110 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2111 to take a regcache. Adjust.
2112 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2114 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2115 take a regcache. Adjust.
2116 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2117 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2118 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2119 * linux-mips-low.c (mips_get_pc):
2120 (mips_set_pc): Change prototype to take a regcache. Adjust.
2121 (mips_reinsert_addr): Adjust.
2122 (mips_collect_register): Change prototype to take a regcache.
2124 (mips_supply_register):
2125 (mips_collect_register_32bit, mips_supply_register_32bit)
2126 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2127 (mips_store_fpregset): Ditto.
2128 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2130 (parse_spufs_run): Adjust.
2131 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2132 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2133 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2134 take a regcache. Adjust.
2135 * linux-s390-low.c (s390_collect_ptrace_register)
2136 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2137 (s390_set_pc): Change prototype to take a regcache. Adjust.
2138 (s390_arch_setup): Adjust.
2139 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2140 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2141 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2142 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2143 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2145 (sparc_breakpoint_at): Adjust.
2146 * linux-xtensa-low.c (xtensa_fill_gregset):
2147 (xtensa_store_gregset):
2148 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2149 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2150 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2151 prototype to take a regcache. Adjust.
2152 * win32-arm-low.c (arm_fetch_inferior_register)
2153 (arm_store_inferior_register): Change prototype to take a
2155 * win32-i386-low.c (i386_fetch_inferior_register)
2156 (i386_store_inferior_register): Change prototype to take a
2158 * win32-low.c (child_fetch_inferior_registers)
2159 (child_store_inferior_registers): Change prototype to take a
2161 (win32_wait): Adjust.
2162 (win32_fetch_inferior_registers): Change prototype to take a
2164 (win32_store_inferior_registers): Adjust.
2165 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2166 store_inferior_register>: Change prototype to take a regcache.
2168 2010-01-20 Doug Evans <dje@google.com>
2170 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2172 (linux_wait_for_event1, linux_init_signals): Ditto.
2173 (W_STOPCODE): Provide definition if missing.
2175 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2177 * linux-low.c (linux_core_of_thread): New.
2178 (compare_ints, show_process, list_threads): New.
2179 (linux_qxfer_osdata): Report threads and cores.
2180 (linux_target_op): Register linux_core_of_thread.
2181 * remote-utils.c (prepare_resume_reply): Report the core.
2182 (buffer_xml_printf): Support %d specifier.
2183 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2185 (handle_query): Handle qXfer:threads. Announce availability
2187 * target.h (struct target_ops): New field core_of_thread.
2189 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2191 * Makefile.in (clean): Remove new generated files.
2192 (reg-s390.o, reg-s390.c): Remove rules.
2193 (reg-s390x.o, reg-s390x.c): Likewise.
2194 (s390-linux32.o, s390-linux32.c): Add rules.
2195 (s390-linux64.o, s390-linux64.c): Likewise.
2196 (s390x-linux64.o, s390x-linux64.c): Likewise.
2197 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2198 * linux-s390-low.c: Include <elf.h>.
2199 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2200 (init_registers_s390): Remove prototype.
2201 (init_registers_s390x): Likewise.
2202 (init_registers_s390_linux32): Add prototype.
2203 (init_registers_s390_linux64): Likewise.
2204 (init_registers_s390x_linux64): Likewise.
2205 (s390_num_regs_3264): New define.
2206 (s390_regmap_3264): New global variable.
2207 (s390_cannot_fetch_register): Remove obsolete check.
2208 (s390_cannot_store_register): Likewise.
2209 (s390_collect_ptrace_register): Handle upper/lower register halves.
2210 (s390_supply_ptrace_register): Likewise.
2211 (s390_fill_gregset): Update to register number changes.
2212 (s390_get_hwcap): New routine.
2213 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2214 Install appropriate regmap and register set.
2216 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2218 * server.c (gdbserver_version): Update copyright year to 2010.
2219 * gdbreplay.c (gdbreplay_version): Likewise.
2221 2009-12-28 Doug Evans <dje@google.com>
2223 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2224 elf/external.h. Include <elf.h> instead but only if necessary.
2226 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2228 * linux-low.c (linux_remove_process): Remove `detaching'
2229 parameter. Don't release/detach from thread_db here.
2230 (linux_kill): Release/detach from thread_db here, ...
2231 (linux_detach): ... and here, before actually detaching.
2232 (linux_wait_1): ... and here, when a process exits.
2233 * thread-db.c (any_thread_of): New.
2234 (thread_db_free): Switch the current inferior to a thread of the
2237 2009-12-21 Doug Evans <dje@google.com>
2239 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2241 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2242 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2243 warning ifndef __NR_tkill. Move setting of errno there too.
2244 Delete unnecessary resetting of errno after syscall.
2245 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2247 * configure.ac: Check for dladdr.
2248 * config.in: Regenerate.
2249 * configure: Regenerate.
2250 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2251 (try_thread_db_load): Update.
2253 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2255 2009-12-18 Doug Evans <dje@google.com>
2257 * event-loop.c: Include unistd.h if it exists.
2259 * linux-low.c (my_waitpid): Move definition away from being in
2260 between linux_tracefork_child/linux_test_for_tracefork.
2262 * gdb_proc_service.h (psaddr_t): Fix type.
2263 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2264 signature to match glibc.
2266 2009-12-16 Doug Evans <dje@google.com>
2268 * linux-low.c (linux_read_memory): Fix argument to read.
2270 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2272 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2273 events, don't leave current_inferior pointing at null.
2275 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2277 * win32-low.c (LOG): Delete.
2278 (OUTMSG): Output to stderr.
2279 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2280 on compile time LOG macro.
2281 (win32_wait): Fix debug output.
2283 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2285 * win32-low.c (win32_add_one_solib): If the dll name is
2286 "ntdll.dll", prepend the system directory to the dll path.
2288 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2290 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2292 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2293 Vladimir Prus <vladimir@codesourcery.com>
2295 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2296 * configure.ac: Check for __mcoldfire__ and set
2297 gdb_cv_m68k_is_coldfire.
2298 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2299 reg-cf.o and reg-m68k.o.
2300 * configure: Regenerated.
2302 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2304 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2305 Pass it to thread_db_free.
2306 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2307 proper `detaching' argument to linux_remove_process.
2308 * linux-low.h (thread_db_free): Add `detaching' parameter.
2309 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2311 (thread_db_free): Add `detaching' parameter. Only
2312 call td_ta_clear_event if detaching from process.
2314 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2316 * thread-db.c (thread_db_free): Fix typo.
2318 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2321 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2323 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2325 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2326 with an i686 compiler.
2327 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2329 * configure: Rebuilt.
2331 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2335 * server.c (handle_search_memory_1): Correct read_addr initialization
2336 in loop for searching subsequent chunks.
2338 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2340 * configure.ac: New --with-libthread-db option.
2341 * thread-db.c: Allow direct dependence on libthread_db.
2342 (thread_db_free): Adjust.
2343 * config.in: Regenerate.
2344 * configure: Likewise.
2346 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2349 * thread-db.c (attach_thread): New function.
2350 (maybe_attach_thread): Return success/failure.
2351 (find_new_threads_callback): Adjust.
2352 (thread_db_find_new_threads): Loop until no new threads.
2354 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2356 * proc-service.c (ps_lgetregs): Formatting.
2358 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2360 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2361 * configure.ac: Adjust.
2362 * linux-low.h (struct process_info_private): Move members to struct
2364 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2365 * linux-low.c (linux_remove_process): Adjust.
2366 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2367 * server.c (handle_query): Move code ...
2368 (handle_monitor_command): ... here. New function.
2369 * target.h (struct target_ops): New member.
2370 * thread-db.c (struct thread_db): New.
2371 (libthread_db_search_path): New variable.
2372 (thread_db_create_event, thread_db_enable_reporting)
2373 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2374 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2375 (try_thread_db_load_1, dladdr_to_soname): New functions.
2376 (try_thread_db_load, thread_db_load_search): New functions.
2377 (thread_db_init): Search for libthread_db.
2378 (thread_db_free): New function.
2379 (thread_db_handle_monitor_command): Likewise.
2380 * config.in: Regenerate.
2381 * configure: Regenerate.
2383 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2385 * spu-low.c (spu_kill): Wait for inferior to terminate.
2386 Call clear_inferiors.
2387 (spu_detach): Call clear_inferiors.
2389 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2391 * aclocal.m4: Regenerate.
2392 * config.in: Likewise.
2393 * configure: Likewise.
2395 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2397 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2398 (parse_spufs_run): New function.
2399 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2400 (ppc_breakpoint_at): Handle SPU breakpoints.
2402 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2404 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2405 (SPUFS_MAGIC): Define.
2406 (spu_enumerate_spu_ids): New function.
2407 (linux_qxfer_spu): New function.
2408 (linux_target_ops): Install linux_qxfer_spu.
2410 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2412 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2413 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2414 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2415 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2416 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2417 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2418 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2419 (init_registers_powerpc_cell32l): Add prototype.
2420 (init_registers_powerpc_cell64l): Likewise.
2421 (ppc_arch_setup): Detect Cell/B.E. architecture.
2423 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2425 * Makefile.in (datarootdir): New variable.
2427 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2429 * linux-low.c (linux_write_memory): Update debugging output.
2430 * Makefile.in (clean): Add new descriptions.
2431 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2432 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2433 * configure.srv: Add new files for arm*-*-linux*.
2434 * linux-arm-low.c: Add new declarations.
2435 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2436 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2437 (HWCAP_VFPv3D16): New.
2438 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2439 instead of __IWMMXT__.
2440 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2441 (arm_arch_setup): New.
2442 (target_regsets): Remove #ifdef. Add VFP regset.
2443 (the_low_target): Use arm_arch_setup.
2445 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2447 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2448 the main thread again.
2450 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2452 Adding Neutrino gdbserver.
2453 * configure: Regenerated.
2454 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2455 * configure.srv (i[34567]86-*-nto*): New target.
2456 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2457 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2458 (nto_comctrl) [__QNX__]: New function.
2459 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2461 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2463 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2466 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2467 Pedro Alves <pedro@codesourcery.com>
2469 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2470 don't support CONTEXT_EXTENDED_REGISTERS.
2471 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2472 (the_low_target): Install them.
2473 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2474 failing with ERROR_PIPE_NOT_CONNECTED.
2476 2009-06-30 Doug Evans <dje@google.com>
2477 Pierre Muller <muller@ics.u-strasbg.fr>
2479 Add h/w watchpoint support to x86-linux, win32-i386.
2480 * Makefile.in (SFILES): Add i386-low.c
2481 (i386_low_h): Define.
2482 (i386-low.o): Add dependencies.
2483 (linux-x86-low.o): Add i386-low.h dependency.
2484 (win32-i386-low.o): Ditto.
2485 * i386-low.c: New file.
2486 * i386-low.h: New file.
2487 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2488 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2489 * linux-low.c (linux_add_process): Initialize arch_private.
2490 (linux_remove_process): Free arch_private.
2491 (add_lwp): Initialize arch_private.
2492 (delete_lwp): Free arch_private.
2493 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2495 * linux-low.h (process_info_private): New member arch_private.
2496 (lwp_info): New member arch_private.
2497 (linux_target_ops): New members new_process, new_thread,
2499 (ptid_of): New macro.
2500 * linux-x86-low.c: Include stddef.h, i386-low.h.
2501 (arch_process_info): New struct.
2502 (arch_lwp_info): New struct.
2503 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2504 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2505 (i386_dr_low_get_status): New function.
2506 (x86_insert_point, x86_remove_point): New functions.
2507 (x86_stopped_by_watchpoint): New function.
2508 (x86_stopped_data_address): New function.
2509 (x86_linux_new_process, x86_linux_new_thread): New functions.
2510 (x86_linux_prepare_to_resume): New function.
2511 (the_low_target): Add entries for insert_point, remove_point,
2512 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2514 * server.c (debug_hw_points): New global.
2515 (monitor_show_help): Document set debug-hw-points.
2516 (handle_query): Process "set debug-hw-points".
2517 * server.h (debug_hw_points): Declare.
2518 (paddress): Declare.
2519 * utils.c (NUMCELLS, CELLSIZE): New macros.
2520 (get_sell, xsnprintf, paddress): New functions.
2521 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2522 remove_point, stopped_by_watchpoint, stopped_data_address.
2523 * win32-i386-low.c: Include i386-low.h.
2524 (debug_reg_state): Replaces dr.
2525 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2526 (i386_dr_low_get_status): New function.
2527 (i386_insert_point, i386_remove_point): New functions.
2528 (i386_stopped_by_watchpoint): New function.
2529 (i386_stopped_data_address): New function.
2530 (i386_initial_stuff): Update.
2531 (get_thread_context,set_thread_context,i386_thread_added): Update.
2532 (the_low_target): Add entries for insert_point,
2533 remove_point, stopped_by_watchpoint, stopped_data_address.
2534 * win32-low.c (win32_insert_watchpoint): New function.
2535 (win32_remove_watchpoint): New function.
2536 (win32_stopped_by_watchpoint): New function.
2537 (win32_stopped_data_address): New function.
2538 (win32_target_ops): Add entries for insert_watchpoint,
2539 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2540 * win32-low.h (win32_target_ops): New members insert_point,
2541 remove_point, stopped_by_watchpoint, stopped_data_address.
2543 2009-06-25 Pedro Alves <pedro@codesourcery.com>
2545 * server.c (process_serial_event): Re-return unsupported, not
2546 error, if the type isn't recognized. Re-allow supporting only
2547 insert or remove packets. Also call require_running for
2548 breakpoints. Add missing break statement to default case. Tidy.
2549 * target.h (struct target_ops): Rename insert_watchpoint to
2550 insert_point, and remove_watchpoint to remove_point.
2552 * linux-low.h (struct linux_target_ops): Likewise.
2553 * linux-low.c (linux_insert_watchpoint): Rename to ...
2554 (linux_insert_point): ... this. Adjust.
2555 (linux_remove_watchpoint): Rename to ...
2556 (linux_remove_point): ... this. Adjust.
2557 (linux_target_ops): Adjust.
2558 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2559 (cris_insert_point): ... this.
2560 (cris_remove_watchpoint): Rename to ...
2561 (cris_remove_point): ... this.
2562 (the_low_target): Adjust.
2564 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2566 * server.c (handle_v_kill): Pass signal_pid to
2567 kill_inferior if multi_process is zero.
2569 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2571 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2572 * target.h (target_ops): Comment for *_watchpoint to make it clear
2573 the functions can get types '0' and '1'.
2575 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2577 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2578 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2579 * regcache.c (get_regcache): Likewise.
2580 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2581 * win32-low.c (child_fetch_inferior_registers): Remove check for
2584 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2585 Pedro Alves <pedro@codesourcery.com>
2587 * target.h (struct target_ops) <supports_multi_process>: New
2589 (target_supports_multi_process): New.
2590 * server.c (handle_query): Even if GDB reports support, only
2591 enable multi-process if the target also supports it. Report
2592 multi-process support only if the target backend supports it.
2593 * linux-low.c (linux_supports_multi_process): New function.
2594 (linux_target_ops): Install it as target_supports_multi_process
2597 2009-05-24 Doug Evans <dje@google.com>
2599 Global renaming of find_thread_pid to find_thread_ptid.
2600 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2601 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2602 All callers updated.
2604 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2605 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2608 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2609 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2610 (linux_resume_one_lwp): Ditto.
2612 2009-05-23 Doug Evans <dje@google.com>
2614 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2615 from struct inferior_list_entry * to struct lwp_info *.
2616 All callers updated.
2618 2009-05-13 Doug Evans <dje@google.com>
2620 * linux-x86-low.c: Don't include assert.h.
2621 (x86_siginfo_fixup): Use fatal, not assert.
2622 (x86_arch_setup): Fix comment.
2624 2009-05-12 Doug Evans <dje@google.com>
2626 Biarch support for i386/amd64 gdbserver.
2627 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2628 Add linux-x86-low.c.
2629 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2630 (linux-x86-low.o): Add.
2631 * linux-x86-64-low.c: Delete.
2632 * linux-i386-low.c: Delete.
2633 * linux-x86-low.c: New file.
2634 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2636 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2638 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2639 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2640 (linux_child_pid_to_exec_file): New function.
2641 (elf_64_header_p, elf_64_file_p): New functions.
2642 (siginfo_fixup): New function.
2643 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2644 give target a chance to convert layout.
2645 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2646 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2648 2009-05-07 Doug Evans <dje@google.com>
2650 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2651 (regsets_store_inferior_registers): Ditto.
2653 2009-05-06 Pedro Alves <pedro@codesourcery.com>
2657 * linux-low.c (must_set_ptrace_flags): Delete.
2658 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2660 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2661 `lwp->must_set_ptrace_flags' instead.
2662 (linux_wait_for_event_1): Set ptrace options here.
2663 (linux_wait_1): ... not here.
2665 2009-04-30 Doug Evans <dje@google.com>
2667 * inferiors.c (started_inferior_callback): New function.
2668 (attached_inferior_callback): New function.
2669 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2670 * server.c (print_started_pid, print_attached_pid): New functions.
2671 (detach_or_kill_for_exit): New function.
2672 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2673 * server.h (have_started_inferiors_p): Declare.
2674 (have_attached_inferiors_p): Declare.
2676 * inferiors.c (remove_process): Fix memory leak, free process.
2677 * linux-low.c (linux_remove_process): New function.
2678 (linux_kill): Call it instead of remove_process.
2679 (linux_detach, linux_wait_1): Ditto.
2681 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2683 * configure.srv: Add x86 Windows CE target.
2685 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2687 * inferiors.c (get_thread_process): Make global.
2688 * server.h (get_thread_process): Add prototype.
2689 * thread-db.c (find_one_thread): Use get_thread_process
2690 instead of current_process.
2691 (thread_db_get_tls_address): Do not crash if called when
2692 thread layer is not yet initialized.
2694 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2696 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2697 * spu-low.c (current_tid): Rename to ...
2698 (current_ptid): ... this.
2699 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2700 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2701 ptid_get_lwp (current_ptid) instead of current_tid.
2702 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2703 instead of current_tid. Use find_process_pid to verify pid
2704 argument is valid. Pass proper argument to remove_process.
2705 (spu_thread_alive): Compare current_ptid instead of current_tid.
2706 (spu_resume): Likewise.
2708 2009-04-02 Pedro Alves <pedro@codesourcery.com>
2710 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2713 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2715 Implement the multiprocess extensions, and add linux multiprocess
2718 * server.h (ULONGEST): Declare.
2719 (struct ptid, ptid_t): New.
2720 (minus_one_ptid, null_ptid): Declare.
2721 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2722 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2723 (struct inferior_list_entry): Change `id' type from unsigned from
2725 (struct sym_cache, struct breakpoint, struct
2726 process_info_private): Forward declare.
2727 (struct process_info): Declare.
2728 (current_process): Declare.
2729 (all_processes): Declare.
2730 (initialize_inferiors): Declare.
2731 (add_thread): Adjust to use ptid_t.
2732 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2733 (add_process, remove_process, find_thread_pid): Declare.
2734 (find_inferior_id): Adjust to use ptid_t.
2735 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2736 (multi_process): Declare.
2737 (push_event): Adjust to use ptid_t.
2738 (read_ptid, write_ptid): Declare.
2739 (prepare_resume_reply): Adjust to use ptid_t.
2740 (clear_symbol_cache): Declare.
2741 * inferiors.c (all_processes): New.
2742 (null_ptid, minus_one_ptid): New.
2743 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2744 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2745 (add_thread): Change unsigned long to ptid. Remove gdb_id
2747 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2748 (gdb_id_to_thread): Rename to ...
2749 (find_thread_pid): ... this. Change unsigned long to ptid.
2750 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2751 (loaded_dll, pull_pid_from_list): Adjust.
2752 (add_process, remove_process, find_process_pid)
2753 (get_thread_process, current_process, initialize_inferiors): New.
2754 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2755 (struct target_waitstatus) <related_pid>: Ditto.
2756 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2758 (struct target_ops) <join>: Add `pid' argument.
2759 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2760 (struct target_ops) <wait>: Add `ptid' field. Change return type
2762 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2763 (mywait): Add `ptid' argument. Change return type to ptid_t.
2764 (target_pid_to_str): Declare.
2765 * target.c (set_desired_inferior): Adjust to use ptids.
2766 (mywait): Add new `ptid' argument. Adjust.
2767 (target_pid_to_str): New.
2768 * mem-break.h (free_all_breakpoints): Declare.
2769 * mem-break.c (breakpoints): Delelete.
2770 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2771 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2772 to use per-process breakpoint list.
2773 (free_all_breakpoints): New.
2774 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2775 (symbol_cache, all_symbols_looked_up): Delete.
2777 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2779 (prepare_resume_reply): Change ptid argument's type from unsigned
2780 long to ptid_t. Adjust. Implement W;process and X;process.
2781 (free_sym_cache, clear_symbol_cache): New.
2782 (look_up_one_symbol): Adjust to per-process symbol cache. *
2783 * server.c (cont_thread, general_thread, step_thread): Change type
2786 (multi_process): New.
2787 (last_ptid): Change type to ptid_t.
2788 (struct vstop_notif) <ptid>: Change type to ptid_t.
2789 (queue_stop_reply, push_event): Change `ptid' argument's type to
2791 (discard_queued_stop_replies): Add `pid' argument.
2792 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2793 changes. Don't reference the `attached' global.
2794 (attach_inferior): Adjust to mywait interface changes.
2795 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2796 features. Handle and report "multiprocess+". Handle
2798 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2800 (handle_v_kill): New.
2801 (handle_v_stopped): Adjust to use target_pid_to_str.
2802 (handle_v_requests): Allow multiple attaches and runs when
2803 multiprocess extensions are in effect. Handle "vKill".
2804 (myresume): Adjust to use ptids.
2805 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2806 (handle_status): Adjust to discard_queued_stop_replies interface
2808 (first_thread_of, kill_inferior_callback)
2809 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2810 (main): Call initialize_inferiors. Adjust to use ptids, killing
2811 and detaching from all inferiors. Handle multiprocess packet
2813 * linux-low.h: Include gdb_proc_service.h.
2814 (struct process_info_private): New.
2815 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2816 <lwpid_of>: Use ptid_get_lwp.
2817 (get_lwp_thread): Adjust.
2818 (struct lwp_info): Add `dead' member.
2819 (find_lwp_pid): Declare.
2820 * linux-low.c (thread_db_active): Delete.
2821 (new_inferior): Adjust comment.
2822 (inferior_pid): Delete.
2823 (linux_add_process): New.
2824 (handle_extended_wait): Adjust.
2825 (add_lwp): Change unsigned long to ptid.
2826 (linux_create_inferior): Add process to processes table. Adjust
2827 to use ptids. Don't set new_inferior here.
2828 (linux_attach_lwp): Rename to ...
2829 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2830 it. Adjust to use ptids.
2831 (linux_attach_lwp): New.
2832 (linux_attach): Add process to processes table. Don't set
2834 (struct counter): New.
2835 (second_thread_of_pid_p, last_thread_of_process_p): New.
2836 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2838 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2839 processes. Remove process from process table.
2840 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2841 to multiple processes.
2842 (any_thread_of): New.
2843 (linux_detach): Add `pid' argument, and handle it. Remove process
2844 from processes table.
2845 (linux_join): Add `pid' argument. Handle it.
2846 (linux_thread_alive): Change unsighed long argument to ptid_t.
2847 Consider dead lwps as not being alive.
2848 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2849 threads we're not interested in.
2850 (same_lwp, find_lwp_pid): New.
2851 (linux_wait_for_lwp): Change `pid' argument's type from int to
2853 (linux_wait_for_event): Rename to ...
2854 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2855 from int to ptid_t. Adjust.
2856 (linux_wait_for_event): New.
2857 (linux_wait_1): Add `ptid' argument. Change return type to
2858 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2859 that exit from the process table.
2860 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2862 (mark_lwp_dead): New.
2863 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2864 stopping all threads, mark its main lwp as dead.
2865 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2867 (fetch_register, usr_store_inferior_registers)
2868 (regsets_fetch_inferior_registers)
2869 (regsets_store_inferior_registers, linux_read_memory)
2870 (linux_write_memory): Inline `inferior_pid'.
2871 (linux_look_up_symbols): Adjust to use per-process
2873 (linux_request_interrupt): Adjust to use ptids.
2874 (linux_read_auxv): Inline `inferior_pid'.
2875 (initialize_low): Don't reference thread_db_active.
2876 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2877 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2878 (ps_getpid): Return the pid of the current inferior.
2879 * thread-db.c (proc_handle, thread_agent): Delete.
2880 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2882 (find_one_thread): Change argument type to ptid_t. Adjust to
2884 (maybe_attach_thread): Adjust to per-process data and ptids.
2885 (thread_db_find_new_threads): Ditto.
2886 (thread_db_init): Ditto.
2887 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2888 processes table. Adjust to use ptids.
2889 (spu_kill, spu_detach): Adjust interface. Remove process from
2891 (spu_join, spu_thread_alive): Adjust interface.
2892 (spu_wait): Adjust interface. Remove process from processes
2893 table. Adjust to use ptids.
2894 * win32-low.c (current_inferior_tid): Delete.
2895 (current_inferior_ptid): New.
2896 (debug_event_ptid): New.
2897 (thread_rec): Take a ptid. Adjust.
2898 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2899 (child_delete_thread): Ditto.
2900 (do_initial_child_stuff): Add `attached' argument. Add process to
2902 (child_fetch_inferior_registers, child_store_inferior_registers):
2904 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2905 (win32_attach): Pass 1 to do_initial_child_stuff.
2906 (win32_kill): Adjust interface. Remove process from processes
2908 (win32_detach): Ditto.
2909 (win32_join): Adjust interface.
2910 (win32_thread_alive): Take a ptid.
2911 (win32_resume): Adjust to use ptids.
2912 (get_child_debug_event): Ditto.
2913 (win32_wait): Adjust interface. Remove exiting process from
2916 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2918 Non-stop mode support.
2920 * server.h (non_stop): Declare.
2921 (gdb_client_data, handler_func): Declare.
2922 (delete_file_handler, add_file_handler, start_event_loop):
2924 (handle_serial_event, handle_target_event, push_event)
2925 (putpkt_notif): Declare.
2926 * target.h (enum resume_kind): New.
2927 (struct thread_resume): Replace `step' field by `kind' field.
2928 (TARGET_WNOHANG): Define.
2929 (struct target_ops) <wait>: Add `options' argument.
2930 <supports_non_stop, async, start_non_stop>: New fields.
2931 (target_supports_non_stop, target_async): New.
2932 (start_non_stop): Declare.
2933 (mywait): Add `options' argument.
2934 * target.c (mywait): Add `options' argument. Print child exit
2936 (start_non_stop): New.
2937 * server.c (non_stop, own_buf, mem_buf): New globals.
2938 (struct vstop_notif): New.
2939 (notif_queue): New global.
2940 (queue_stop_reply, push_event, discard_queued_stop_replies)
2941 (send_next_stop_reply): New.
2942 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2944 (attach_inferior): In non-stop mode, don't wait for the target
2946 (handle_general_set): Handle QNonStop.
2947 (handle_query): When handling qC, return the current general
2948 thread, instead of the first thread of the list.
2949 (handle_query): If the backend supports non-stop mode, include
2950 QNonStop+ in the qSupported query response.
2951 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2953 (handle_v_attach, handle_v_run): Handle non-stop mode.
2954 (handle_v_stopped): New.
2955 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2956 (myresume): Adjust to use resume_kind. Handle non-stop.
2957 (queue_stop_reply_callback): New.
2958 (handle_status): Handle non-stop mode.
2959 (main): Clear non_stop flag on reconnection. Use the event-loop.
2960 Refactor serial protocol handling from here ...
2961 (process_serial_event): ... to this new function. When GDB
2962 selects any thread, select one here. In non-stop mode, wait until
2963 GDB acks all pending events before exiting.
2964 (handle_serial_event, handle_target_event): New.
2965 * remote-utils.c (remote_open): Install remote_desc in the event
2967 (remote_close): Remove remote_desc from the event loop.
2968 (putpkt_binary): Rename to...
2969 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2970 (putpkt_binary): New as wrapper around putpkt_binary_1.
2971 (putpkt_notif): New.
2972 (prepare_resume_reply): In non-stop mode, don't change the
2974 * event-loop.c: New.
2975 * Makefile.in (OBJ): Add event-loop.o.
2976 (event-loop.o): New rule.
2978 * linux-low.h (pid_of): Moved here.
2980 (get_lwp_thread): Use lwpid_of.
2981 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2982 * linux-low.c (pid_of): Delete.
2983 (inferior_pid): Use lwpid_of.
2984 (linux_event_pipe): New.
2985 (target_is_async_p): New.
2987 (handle_extended_wait): Use lwpid_of.
2988 (add_lwp): Don't set lwpid field.
2989 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2990 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2991 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2992 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2993 first. Adjust to linux_wait_for_event interface changes. Use
2995 (linux_detach): Don't delete the main lwp here.
2996 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2997 (status_pending_p): Don't consider explicitly suspended lwps.
2998 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2999 pointer. Add OPTIONS argument. Change return type to int. Use
3000 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3001 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3002 pointer. Add status pointer argument. Return a pid instead of a
3003 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3004 changes. In non-stop mode, don't switch to a random thread.
3005 (linux_wait): Rename to...
3006 (linux_wait_1): ... this. Add target_options argument, and handle
3007 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3008 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3009 clean exit and signal exit code. Don't stop all threads in
3010 non-stop mode. In all-stop mode, only stop all threads when
3011 reporting a stop to GDB. Handle explicit thread stop requests.
3012 (async_file_flush, async_file_mark): New.
3014 (send_sigstop): Use lwpid_of.
3015 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3016 interface changes. In non-stop mode, don't switch to a random
3018 (linux_resume_one_lwp): Use lwpid_of.
3019 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3020 (linux_resume_one_thread): ... this. Handle resume_stop. In
3021 non-stop mode, don't look for pending flag in all threads.
3022 (resume_status_pending_p): Don't consider explicitly suspended
3024 (my_waitpid): Reimplement. Emulate __WALL.
3025 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3027 (sigchld_handler, linux_supports_non_stop, linux_async)
3028 (linux_start_non_stop): New.
3029 (linux_target_ops): Register linux_supports_non_stop, linux_async
3030 and linux_start_non_stop.
3031 (initialize_low): Install SIGCHLD handler.
3032 * thread-db.c (thread_db_create_event, find_one_thread)
3033 (thread_db_get_tls_address): Use lwpid_of.
3034 * win32-low.c (win32_detach): Adjust to use resume_kind.
3035 (win32_wait): Add `options' argument.
3036 * spu-low.c (spu_resume): Adjust to use resume_kind.
3037 (spu_wait): Add `options' argument.
3039 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3041 Decouple target code from remote protocol.
3043 * target.h (enum target_waitkind): New.
3044 (struct target_waitstatus): New.
3045 (struct target_ops) <wait>: Return an unsigned long. Take a
3046 target_waitstatus pointer instead of a char pointer.
3048 * target.c (mywait): Change prototype to return an unsigned long.
3049 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3050 * server.h (thread_from_wait, old_thread_from_wait): Delete
3052 (prepare_resume_reply): Change prototype to take a
3054 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3055 (last_status, last_ptid): New.
3056 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3057 pid instead of a signal.
3058 (attach_inferior): Remove "status" and "signal" parameters.
3060 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3062 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3063 (handle_v_requests, myresume): Remove "status" and "signal"
3065 (handle_status): New.
3066 (main): Delete local `status'. Adjust.
3067 * remote-utils.c: Include target.h.
3068 (prepare_resume_reply): Change prototype to take a
3069 target_waitstatus. Adjust.
3071 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3073 * spu-low.c (spu_wait): Adjust.
3074 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3076 (win32_wait): Adjust.
3078 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3080 * target.h (struct thread_resume): Delete leave_stopped member.
3081 (struct target_ops): Add a `n' argument to the `resume' callback.
3082 * server.c (start_inferior): Adjust.
3083 (handle_v_cont, myresume): Adjust.
3084 * linux-low.c (check_removed_breakpoint): Adjust to resume
3085 interface change, and to removed leave_stopped field.
3086 (resume_ptr): Delete.
3087 (struct thread_resume_array): New.
3088 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3089 resume interface change.
3090 (linux_continue_one_thread, linux_queue_one_thread)
3091 (resume_status_pending_p): Check if the resume field is NULL
3092 instead of checking the leave_stopped member.
3093 (linux_resume): Adjust to the target resume interface change.
3094 * spu-low.c (spu_resume): Adjust to the target resume interface
3096 * win32-low.c (win32_detach, win32_resume): Ditto.
3098 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3100 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3102 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3104 (linux_continue_one_thread): Only preserve the stepping flag if
3105 there's a pending breakpoint.
3107 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3109 * server.c (main): After the inferior having exited, call
3110 remote_close before exiting gdbserver.
3112 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3114 Fix size of FPSCR in Power 7 processors.
3115 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3116 (PPC_FEATURE_HAS_DFP): New #define.
3117 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3120 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3122 * server.c (handle_query) Whitespace and formatting.
3124 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3126 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3127 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3128 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3129 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3130 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3131 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3132 Makefile.in, configure.ac: Fix whitespace throughout.
3133 * configure: Regenerate.
3135 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3137 * inferiors.c (find_inferior): Make it safe for the callback
3138 function to delete the currently iterated inferior.
3140 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3142 * Makefile.in (linuw_low_h): Move higher.
3143 (thread-db.o): Depend on $(linux_low_h).
3145 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3147 Rename "process" to "lwp" throughout.
3149 * linux-low.c (all_processes): Rename to...
3150 (all_lwps): ... this.
3151 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3152 (add_process): Rename to ...
3153 (add_lwp): ... this. Adjust.
3154 (linux_create_inferior): Adjust.
3155 (linux_attach_lwp): Adjust.
3156 (linux_attach): Adjust.
3157 (linux_kill_one_process): Rename to ...
3158 (linux_kill_one_lwp): ... this. Adjust.
3159 (linux_kill): Adjust.
3160 (linux_detach_one_process): Rename to ...
3161 (linux_detach_one_lwp): ... this. Adjust.
3162 (linux_detach): Adjust.
3163 (check_removed_breakpoint): Adjust.
3164 (status_pending_p): Adjust.
3165 (linux_wait_for_process): Rename to ...
3166 (linux_wait_for_lwp): ... this. Adjust.
3167 (linux_wait_for_event): Adjust.
3168 (send_sigstop): Adjust.
3169 (wait_for_sigstop): Adjust.
3170 (stop_all_processes): Rename to ...
3171 (stop_all_lwps): ... this.
3172 (linux_resume_one_process): Rename to ...
3173 (linux_resume_one_lwp): ... this. Adjust.
3174 (linux_set_resume_request, linux_continue_one_thread)
3175 (linux_queue_one_thread, resume_status_pending_p)
3176 (usr_store_inferior_registers, regsets_store_inferior_registers)
3177 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3179 * linux-low.h (get_process): Rename to ...
3180 (get_lwp): ... this. Adjust.
3181 (get_thread_process): Rename to ...
3182 (get_thread_lwp): ... this. Adjust.
3183 (get_process_thread): Rename to ...
3184 (get_lwp_thread): ... this. Adjust.
3185 (struct process_info): Rename to ...
3186 (struct lwp_info): ... this.
3187 (all_processes): Rename to ...
3188 (all_lwps): ... this.
3189 * proc-service.c (ps_lgetregs): Adjust.
3190 * thread-db.c (thread_db_create_event, find_one_thread)
3191 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3193 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3195 * server.c (handle_query): Handle "qAttached".
3197 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3199 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3200 GPLv3, update license URL.
3202 2009-03-01 Doug Evans <dje@google.com>
3204 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3205 (server_h): Add gdb_signals.h.
3206 (signals.o): Update.
3207 * server.h (target_signal_from_host,target_signal_to_host_p)
3208 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3210 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3212 * remote-utils.c (getpkt): Also generate remote-debug
3213 information if noack_mode is set.
3215 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3217 * server.c (handle_query): Report qXfer:siginfo:read and
3218 qXfer:siginfo:write as supported and handle them.
3219 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3220 * linux-low.c (linux_xfer_siginfo): New.
3221 (linux_target_ops): Set it.
3223 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3225 * server.c (gdbserver_usage): Mention --remote-debug.
3226 (main): Accept '--remote-debug' switch.
3228 2009-01-18 Doug Evans <dje@google.com>
3230 * regcache.c (new_register_cache): No need to check result of xcalloc.
3231 * server.c (handle_search_memory): Back out calls to xmalloc,
3232 result is checked and error is returned to user upon failure.
3233 (handle_query): Ditto. Add more checks for result of malloc.
3234 (handle_v_cont): Check result of malloc, report error back to
3236 (handle_v_run): Ditto. Call freeargv.
3237 * server.h (freeargv): Declare.
3238 * utils.c (freeargv): New fn.
3240 2009-01-15 Doug Evans <dje@google.com>
3242 * gdbreplay.c (perror_with_name): Make arg const char *.
3243 * server.h (target_signal_to_name): Make return type const char *.
3244 * thread-db.c (thread_db_err_str): Make return type const char *.
3245 * utils.c (perror_with_name): Make arg const char *.
3247 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3249 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3250 when handling a EXIT_PROCESS_DEBUG_EVENT.
3252 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3254 * gdbreplay.c (gdbreplay_version): Update copyright year.
3255 * server.c (gdbserver_version): Likewise.
3257 2009-01-05 Doug Evans <dje@google.com>
3259 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3260 (handle_extended_wait): Improve comment.
3262 2008-12-13 Doug Evans <dje@google.com>
3264 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3265 * server.h (ATTR_MALLOC): New macro.
3266 (xmalloc,xcalloc,xstrdup): Declare.
3267 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3268 * inferiors.c: Ditto.
3269 * linux-low.c: Ditto.
3270 * mem-break.c: Ditto.
3271 * regcache.c: Ditto.
3272 * remote-utils.c: Ditto.
3275 * win32-low.c: Ditto.
3277 2008-12-12 Doug Evans <dje@google.com>
3279 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3280 in debugging printf.
3282 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3284 2008-12-09 Doug Evans <dje@google.com>
3286 * linux-low.h (struct process_info): Delete member tid, unused.
3287 * thread-db.c (find_one_thread): Update.
3288 (maybe_attach_thread): Update.
3290 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3292 * target.h (struct target_ops): Add qxfer_osdata member.
3293 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3295 (linux_qxfer_osdata): New functions.
3296 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3298 * server.c (handle_query): Handle "qXfer:osdata:read:".
3299 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3300 (buffer_xml_printf): New functions.
3301 * server.h (struct buffer): New.
3302 (buffer_grow_str, buffer_grow_str0): New macros.
3303 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3304 (buffer_xml_printf): Declare.
3306 2008-11-24 Doug Evans <dje@google.com>
3308 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3310 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3312 * server.c (handle_v_run): Always use the supplied argument list.
3314 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3316 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3317 (xtensa_regmap_table): Add entry for scompare1.
3319 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3321 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3322 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3323 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3324 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3325 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3326 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3327 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3328 XML target descriptions.
3329 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3330 when inferior is running on an ISA 2.05 or later processor. Add
3331 special case to return offset for full 64-bit slot of FPSCR when
3334 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3336 * Makefile.in (SFILES, clean): Added sparc64 files.
3337 (reg-sparc64.o, reg-sparc64.c): New.
3338 * configure.srv (sparc*-*-linux*): New configuration.
3339 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3340 syscall arguments for SPARC.
3341 (regsets_store_inferior_registers): Likewise.
3342 * linux-sparc-low.c: New file.
3344 2008-10-21 Doug Evans <dje@google.com>
3346 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3347 (READLINE_DIR,READLINE_DEP): Delete.
3348 (INTERNAL_CFLAGS): Update.
3349 (LINTFLAGS): Update.
3351 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3353 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3354 whole argv from the last run, not just argv[0].
3356 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3358 * regcache.c (new_register_cache): Return NULL if the register
3359 cache size isn't known yet.
3360 (free_register_cache): Avoid dereferencing a NULL regcache.
3362 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3364 * configure.srv: Merge MIPS and MIPS64.
3366 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3368 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3370 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3372 * Makefile.in: Add required vsx dependencies.
3374 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3375 Declare init_registers_powerpc_vsx32l.
3376 Declare init_registers_powerpc_vsx64l.
3377 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3378 (ppc_arch_setup): Check for VSX in hwcap.
3379 (ppc_fill_vsxregset): New function.
3380 (ppc_store_vsxregset): New function.
3381 Add new VSX entry in regset_info target_regsets.
3383 * configure.srv: Add new VSX dependencies.
3385 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3387 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3388 (remote_open): Set or clear transport_is_reliable.
3389 (putpkt_binary): Don't expect acks in noack mode.
3390 (getpkt): Don't send ack/nac in noack mode.
3391 * server.c (handle_general_set): Handle QStartNoAckMode.
3392 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3394 (main): Reset noack_mode on every connection.
3395 * server.h (noack_mode): Declare.
3397 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3399 * Makefile.in (GDBREPLAY_OBS): New variable.
3400 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3402 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3403 Daniel Jacobowitz <dan@codesourcery.com>
3405 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3406 (usr_store_inferior_registers): Likewise.
3407 (regsets_store_inferior_registers): Likewise.
3409 2008-07-31 Rolf Jansen <rj@surtec.com>
3410 Pedro Alves <pedro@codesourcery.com>
3412 * configure.ac: Check for memmem declaration.
3413 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3414 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3415 (disable_packet_qfThreadInfo): Unconditionally compile.
3416 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3417 * configure, config.in: Regenerate.
3419 2008-07-28 Doug Kwan <dougkwan@google.com>
3421 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3422 (linux_write_memory): Remove declaration of errno.
3424 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3426 * linux-low.c (handle_extended_wait): Do not use "status"
3427 variable uninitialized.
3429 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3431 * server.c (handle_v_attach): Inhibit reporting dll changes.
3433 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3435 * remote-utils.c (prepare_resume_reply): If requested, don't
3436 output "thread:TID" in the T stop reply.
3438 * server.c (disable_packet_vCont, disable_packet_Tthread)
3439 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3440 (handle_query): If requested, disable support for qC, qfThreadInfo
3442 (handle_v_requests): If requested, disable support for vCont.
3443 (gdbserver_show_disableable): New.
3444 (main): Handle --disable-packet and --disable-packet=LIST.
3446 * server.h (disable_packet_vCont, disable_packet_Tthread)
3447 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3449 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3451 * server.c (gdbserver_usage): Mention --version.
3453 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3455 * Makefile.in (gdbreplay.o): New rule.
3457 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3459 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3460 message, not gdbserver.
3462 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3463 Nathan Sidwell <nathan@codesourcery.com>
3464 Joseph Myers <joseph@codesourcery.com>
3466 * acinclude.m4: Include ../../config/acx.m4.
3467 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3468 * configure, config.in: Regenerate.
3469 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3470 * server.c (gdbserver_version): Print PKGVERSION.
3471 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3472 (main): Adjust gdbserver_usage calls.
3473 * gdbreplay.c (version, host_name): Add declarations.
3474 (gdbreplay_version, gdbreplay_usage): New.
3475 (main): Accept --version and --help options.
3477 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3479 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3480 (arm_breakpoint_at): Handle Thumb.
3481 (the_low_target): Add comment.
3483 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3485 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3487 2008-05-09 Doug Evans <dje@google.com>
3489 * server.h (decode_search_memory_packet): Declare.
3490 * remote-utils.c (decode_search_memory_packet): New fn.
3491 * server.c (handle_search_memory_1): New fn.
3492 (handle_search_memory): New fn.
3493 (handle_query): Process qSearch:memory packets.
3495 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3497 * regcache.c (registers_length): Remove.
3498 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3499 full register packet.
3500 * regcache.h (registers_length): Remove prototype.
3501 * server.h (PBUFSIZ): Define to 16384.
3503 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3505 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3506 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3507 powerpc-64l.o, and powerpc-altivec64l.o.
3508 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3509 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3510 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3511 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3512 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3515 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3516 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3517 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3518 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3519 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3520 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3521 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3522 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3523 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3524 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3527 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3528 (init_registers_powerpc_32l): ... this new prototype.
3529 (init_registers_powerpc_32): Remove, replace by ...
3530 (init_registers_powerpc_altivec32l): ... this new prototype.
3531 (init_registers_powerpc_e500): Remove, replace by ...
3532 (init_registers_powerpc_e500l): ... this new prototype.
3533 (init_registers_ppc64): Remove, replace by ...
3534 (init_registers_powerpc_64l): ... this new prototype.
3535 (init_registers_powerpc_64): Remove, replace by ...
3536 (init_registers_powerpc_altivec64l): ... this new prototype.
3537 (ppc_num_regs): Set to 73.
3538 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3539 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3540 (ppc_cannot_store_register): Handle orig_r3 and trap.
3541 (ppc_arch_setup): Update init_registers_... calls.
3542 (ppc_fill_gregset): Handle orig_r3 and trap.
3544 * inferiors.c (clear_inferiors): Reset current_inferior.
3546 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
3548 * acinclude.m4: Add override.m4.
3549 * configure: Regenerate.
3551 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3553 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3554 initial call to init_register_ppc64.
3556 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3558 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3559 powerpc*-*-linux* case.
3560 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3562 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3564 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3565 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3567 * linux-ppc-low.c: Include <elf.h>.
3568 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3569 (ppc_hwcap): New global variable.
3570 (ppc_regmap): Remove __SPE__ #ifdef sections.
3571 (ppc_regmap_e500): New global variable.
3572 (ppc_cannot_store_register): Update __SPE__ special case.
3573 (ppc_get_hwcap): New function.
3574 (ppc_arch_setup): Use it to determine whether inferior supports
3575 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3576 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3577 Do not access registers if target does not support AltiVec.
3578 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3579 Do not access registers if target does not support SPE.
3580 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3582 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3584 * linux-low.c (disabled_regsets, num_regsets): New.
3585 (use_regsets_p): Delete.
3586 (linux_wait_for_process): Clear disabled_regsets.
3587 (regsets_fetch_inferior_registers): Check and set it.
3588 (regsets_store_inferior_registers): Likewise.
3589 (linux_fetch_registers, linux_store_registers): Do not use
3591 (initialize_low): Allocate disabled_regsets.
3593 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3595 * Makefile.in (LIBOBJS): New.
3597 (memmem.o): New rule.
3598 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3599 * configure: Regenerated.
3601 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3603 * server.c (handle_query): Never return "unsupported" for
3604 qXfer:features:read queries.
3606 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3608 * server.c (get_features_xml): Fix inverted condition.
3609 (handle_query): Always support qXfer:feature:read.
3611 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3613 * server.c (wrapper_argv): New.
3614 (start_inferior): Handle wrapper_argv. If set, expect an extra
3616 (gdbserver_usage): Document --wrapper.
3617 (main): Parse --wrapper.
3619 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3621 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3622 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3623 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3624 (ppc_set_pc): Likewise.
3625 (ppc_arch_setup): New function.
3626 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3627 of collect_register.
3628 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
3630 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3632 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3633 instead of linux-ppc64-low.o.
3634 * linux-ppc64-low.c: Remove file.
3635 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3636 (linux-ppc64-low.o): Remove rule.
3638 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3639 (init_registers_powerpc_64): Likewise.
3640 (ppc_regmap): Conditionally define depending on __powerpc64__.
3641 (ppc_cannot_store_register): Do not special-case "fpscr" when
3642 compiled on __powerpc64__.
3643 (ppc_collect_ptrace_register): New function.
3644 (ppc_supply_ptrace_register): New function.
3645 (ppc_breakpoint): Change type to "unsigned int".
3646 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3647 (the_low_target): Conditionally provide initializers for the
3648 arch_setup member depending on __powerpc64__. Install
3649 collect_ptrace_register and supply_ptrace_register members.
3651 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3653 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3654 * server.c (gdbserver_xmltarget): Define.
3655 (get_features_xml): Use it to replace "target.xml" and arch_string.
3657 * configure.srv: Remove srv_xmltarget. Add XML files that were
3658 mentioned there to srv_xmlfiles instead. Remove conditional tests
3659 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3660 srv_xmlfiles and srv_regobj to include all possible choices.
3661 * configure.ac (srv_xmltarget): Remove.
3662 (srv_xmlfiles): Do not add "target.xml".
3663 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3664 checks for supplementary target information.
3665 * configure: Regenerate.
3666 * Makefile.in (XML_TARGET): Remove.
3667 (target.xml): Remove rule.
3668 (clean): Do not clean up target.xml.
3669 (.PRECIOUS): Do not mention target.xml.
3671 * target.h (struct target_ops): Remove arch_string member.
3672 * linux-low.c (linux_arch_string): Remove.
3673 (linux_target_ops): Remove arch_string initializer.
3674 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3675 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3676 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3677 * spu-low.c (spu_arch_string): Remove.
3678 (spu_target_ops): Remove arch_string initializer.
3679 * win32-low.c (win32_arch_string): Remove.
3680 (win32_target_ops): Remove arch_string initializer.
3681 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3682 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3683 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3685 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3687 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3688 by collect_ptrace_register and supply_ptrace_register hooks.
3689 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3690 instead of checking for the_low_target.left_pad_xfer.
3691 (usr_store_inferior_registers): Use collect_ptrace_register callback
3692 instead of checking for the_low_target.left_pad_xfer.
3694 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3695 (s390_supply_ptrace_register): Likewise.
3696 (s390_fill_gregset): Call s390_collect_ptrace_register.
3697 (the_low_target): Update.
3699 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3700 (ppc_supply_ptrace_register): Likewise.
3701 (the_low_target): Update.
3703 * linux-i386-low.c (the_low_target): Update.
3704 * linux-x86-64-low.c (the_low_target): Update.
3706 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3708 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3709 reg-s390.o and reg-s390x.o.
3711 * linux-low.c (new_inferior): New global variable.
3712 (linux_create_inferior, linux_attach): Set it.
3713 (linux_wait_for_process): Call the_low_target.arch_setup after the
3714 target has stopped for the first time.
3715 (initialize_low): Do not call the_low_target.arch_setup.
3717 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3718 (s390_set_pc): Likewise.
3719 (s390_arch_setup): New function.
3720 (the_low_target): Use s390_arch_setup as arch_setup routine.
3722 * regcache.c (realloc_register_cache): New function.
3723 (set_register_cache): Call it for each existing regcache.
3725 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3727 * server.h (init_registers): Remove prototype.
3729 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3730 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3731 instead of init_registers ().
3732 * linux-arm-low.c (init_registers_arm): Add prototype.
3733 (init_registers_arm_with_iwmmxt): Likewise.
3734 (the_low_target): Add initializer for arch_setup field.
3735 * linux-cris-low.c (init_registers_cris): Add prototype.
3736 (the_low_target): Add initializer for arch_setup field.
3737 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3738 (the_low_target): Add initializer for arch_setup field.
3739 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3740 (the_low_target): Add initializer for arch_setup field.
3741 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3742 (the_low_target): Add initializer for arch_setup field.
3743 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3744 (the_low_target): Add initializer for arch_setup field.
3745 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3746 (the_low_target): Add initializer for arch_setup field.
3747 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3748 (init_registers_mips64_linux): Likewise.
3749 (the_low_target): Add initializer for arch_setup field.
3750 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3751 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3752 (the_low_target): Add initializer for arch_setup field.
3753 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3754 (init_registers_powerpc_64): Likewise.
3755 (the_low_target): Add initializer for arch_setup field.
3756 * linux-s390-low.c (init_registers_s390): Add prototype.
3757 (init_registers_s390x): Likewise.
3758 (the_low_target): Add initializer for arch_setup field.
3759 * linux-sh-low.c (init_registers_sh): Add prototype.
3760 (the_low_target): Add initializer for arch_setup field.
3761 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3762 (the_low_target): Add initializer for arch_setup field.
3763 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3764 (the_low_target): Add initializer for arch_setup field.
3766 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3767 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3768 instead of init_registers ().
3769 * win32-arm-low.c (init_registers_arm): Add prototype.
3770 (the_low_target): Add initializer for arch_setup field.
3771 * win32-i386-low.c (init_registers_i386): Add prototype.
3772 (the_low_target): Add initializer for arch_setup field.
3774 * spu-low.c (init_registers_spu): Add prototype.
3775 (initialize_low): Call initialie_registers_spu () instead of
3776 initialize_registers ().
3778 2008-02-19 Pedro Alves <pedro@codesourcery.com>
3780 * server.c (handle_v_requests): When handling the vRun and vAttach
3781 packets, if already debugging a process, don't kill it. Return an
3784 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3786 * server.c (handle_query): Correct length check.
3788 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3790 * win32-low.c (do_initial_child_stuff): Add process handle
3791 parameter. Set current_process_handle and current_process_id from the
3792 parameters. Clear globals.
3793 (win32_create_inferior): Don't set current_process_handle and
3794 current_process_id here. Instead pass them on the call to
3795 do_initial_child_stuff.
3796 (win32_attach): Likewise.
3797 (win32_clear_inferiors): New.
3798 (win32_kill): Don't close the current process handle or the
3799 current thread handle here. Instead call win32_clear_inferiors.
3800 (win32_detach): Don't open a new handle to the process. Call
3801 win32_clear_inferiors.
3802 (win32_join): Don't rely on current_process_handle; open a new
3803 handle using the process id.
3804 (win32_wait): Call win32_clear_inferiors when the inferior process
3807 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3809 * server.c (monitor_show_help): Add "exit".
3811 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3813 * Makefile.in (SFILES): Add linux-xtensa-low.c.
3814 (clean): Add reg-xtensa.c.
3815 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3816 * configure.srv (xtensa*-*-linux*) New target.
3817 * linux-xtensa-low.c: New.
3818 * xtensa-xtregs.c: New.
3820 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3822 * hostio.c: Don't include errno.h.
3823 (errno_to_fileio_errno): Move to hostio-errno.
3824 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3825 error number outputting to the target->hostio_last_error callback.
3826 (hostio_packet_error): Use FILEIO_EINVAL directly.
3827 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3828 calls to hostio_error.
3829 * hostio-errno.c: New.
3830 * server.h (hostio_last_error_from_errno): Declare.
3831 * target.h (target_ops): Add hostio_last_error member.
3832 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3833 as hostio_last_error handler.
3834 * spu-low.c (spu_target_ops): Likewise.
3835 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3836 (wince_hostio_last_error): New functions.
3837 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3838 as hostio_last_error handler.
3839 (win32_target_ops) [!_WIN32_WCE]: Register
3840 hostio_last_error_from_errno as hostio_last_error handler.
3841 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3842 (hostio-errno.o): New rule.
3843 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3844 * configure.srv (srv_hostio_err_objs): New variable. Default to
3846 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3847 * configure: Regenerate.
3849 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3851 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3852 (linux_kill, linux_detach): Clean up the process list.
3853 * remote-utils.c (remote_open): Improve port number parsing.
3854 (putpkt_binary, input_interrupt): Only send interrupts if the target
3856 * server.c (extended_protocol): Make static.
3857 (attached): Define earlier.
3858 (exit_requested, response_needed, program_argv): New variables.
3859 (target_running): New.
3860 (start_inferior): Clear attached here.
3861 (attach_inferior): Set attached here.
3862 (require_running): Define.
3863 (handle_query): Use require_running and target_running. Implement
3865 (handle_v_attach, handle_v_run): New.
3866 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3867 (gdbserver_usage): Update.
3868 (main): Redo argument parsing. Handle --debug and --multi. Handle
3869 --attach along with other options or after the port. Save
3870 program_argv. Support no initial program. Resynchronize
3871 communication with GDB after an error. Handle "monitor exit".
3872 Use require_running and target_running. Always allow the extended
3873 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3874 restart in extended mode.
3875 * README: Refer to the GDB manual. Update --attach usage.
3877 2007-12-20 Andreas Schwab <schwab@suse.de>
3879 * linux-low.c (STACK_SIZE): Define.
3880 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3881 (linux_test_for_tracefork): Likewise.
3883 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3885 * linux-low.c (linux_wait_for_event): Update messages. Do not
3886 reinsert auto-delete breakpoints.
3887 * mem-break.c (struct breakpoint): Change return type of handler to
3889 (set_breakpoint_at): Update handler type.
3890 (reinsert_breakpoint_handler): Return 1 instead of calling
3892 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3894 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3895 * mem-break.h (set_breakpoint_at): Update handler type.
3896 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3897 * win32-low.c (auto_delete_breakpoint): New.
3898 (get_child_debug_event): Use it.
3900 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3902 * configure.ac: Check for pread and pwrite.
3903 * hostio.c (handle_pread): Fall back to lseek and read.
3904 (handle_pwrite): Fall back to lseek and write.
3905 * config.in, configure: Regenerated.
3907 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3909 * server.c (myresume): Add own_buf argument.
3910 (main): Update calls.
3912 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3914 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3915 * remote-utils.c (remote_open): Do not call disable_async_io.
3916 (block_async_io): Delete.
3917 (unblock_async_io): Make static.
3918 (initialize_async_io): New.
3919 * server.c (handle_v_cont): Handle async I/O here.
3920 (myresume): Likewise. Move other common resume tasks here...
3921 (main): ... from here. Call initialize_async_io. Disable async
3922 I/O before the main loop.
3923 * server.h (initialize_async_io): Declare.
3924 (block_async_io, unblock_async_io): Delete prototypes.
3925 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3927 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3929 * remote-utils.c (readchar): Allow binary data in received messages.
3931 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3933 * win32-low.c (attaching): New global.
3934 (win32_create_inferior): Clear the `attaching' global.
3935 (win32_attach): Set the `attaching' global.
3936 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3937 attaching. Only set a breakpoint at the entry point if not
3940 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3942 * server.c (main): Don't report dll events on the initial
3943 connection on attaches.
3945 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3947 * server.c (main): Relax numerical bases supported for the pid of
3948 the --attach command line argument.
3950 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3952 * win32-low.c (win32_attach): Call OpenProcess before
3953 DebugActiveProcess, not after. Add last error output to error
3956 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3958 * win32-low.c (win32_get_thread_context)
3959 (win32_set_thread_context): New functions.
3960 (thread_rec): Use win32_get_thread_context.
3961 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3962 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3965 2007-12-03 Leo Zayas
3966 Pedro Alves <pedro_alves@portugalmail.pt>
3968 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3970 (child_add_thread): Minor cleanup.
3971 (child_continue): Resume artificially suspended threads before
3972 calling ContinueDebugEvent.
3973 (suspend_one_thread): New.
3974 (fake_breakpoint_event): New.
3975 (get_child_debug_event): Change return type to int. Check here if
3976 gdb sent an interrupt request. If a soft interrupt was requested,
3977 fake a breakpoint event. Return 0 if there is no event to handle,
3979 (win32_wait): Don't check here if gdb sent an interrupt request.
3980 Ensure there is a valid event to handle.
3981 (win32_request_interrupt): Add soft interruption method as last
3984 2007-12-03 Leo Zayas
3985 Pedro Alves <pedro_alves@portugalmail.pt>
3987 * win32-low.h (win32_thread_info): Add descriptions to the
3988 structure members. Replace `suspend_count' counter by a
3990 * win32-low.c (thread_rec): Update condition of when to get the
3991 context from the inferior. Rely on ContextFlags being set if it
3992 has already been retrieved. Only suspend the inferior thread if
3993 we haven't already. Warn if that fails.
3994 (continue_one_thread): s/suspend_count/suspended/. Only call
3995 ResumeThread once. Warn if that fails.
3997 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3999 * win32-low.c (win32_wait): Don't read from the inferior when it
4002 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4004 * Makefile.in (win32_low_h): New variable.
4005 (win32-low.o): Add dependency on $(win32_low_h).
4006 (win32-arm-low.o, win32-i386-low.o): New rules.
4008 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4010 * hostio.c: Correct copyright year.
4012 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4014 * Makefile.in (OBS): Add hostio.o.
4015 (hostio.o): New rule.
4016 * server.h (handle_vFile): Declare.
4017 * hostio.c: New file.
4018 * server.c (handle_v_requests): Take packet_len and new_packet_len
4019 for binary packets. Call handle_vFile.
4020 (main): Update call to handle_v_requests.
4022 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4024 * linux-low.c: Include <sched.h>.
4026 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4028 * linux-low.c (linux_tracefork_grandchild): New.
4029 (linux_tracefork_child): Use clone.
4030 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4032 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4034 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4036 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4038 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4040 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4042 * inferiors.c (change_inferior_id): Delete.
4043 (add_pid_to_list, pull_pid_from_list): New.
4044 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4045 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4046 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4047 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4048 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4049 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4050 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4051 (using_threads): Always set to 1.
4052 (handle_extended_wait): New.
4053 (add_process): Do not set TID.
4054 (linux_create_inferior): Set must_set_ptrace_flags.
4055 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4056 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4057 (linux_thread_alive): Rename TID argument to LWPID.
4058 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4059 (linux_wait_for_event): Do not use TID or check using_threads. Update
4060 call to dead_thread_notify. Call handle_extended_wait.
4061 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4062 (send_sigstop): Delete sigstop_sent.
4063 (wait_for_sigstop): Avoid TID.
4064 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4065 (linux_test_for_tracefork): New.
4066 (linux_lookup_signals): Use thread_db_active and
4067 linux_supports_tracefork_flag.
4068 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4069 * linux-low.h (get_process_thread): Avoid TID.
4070 (struct process_ifo): Move thread_known and tid to the end. Remove
4072 (linux_attach_lwp, thread_db_init): Update prototypes.
4073 * server.h (change_inferior_id): Delete prototype.
4074 (add_pid_to_list, pull_pid_from_list): New prototypes.
4075 * thread-db.c (thread_db_use_events): New.
4076 (find_first_thread): Rename to...
4077 (find_one_thread): ...this. Update callers and messages. Do not
4078 call fatal. Check thread_db_use_events. Do not call
4079 change_inferior_id or new_thread_notify.
4080 (maybe_attach_thread): Update. Do not call new_thread_notify.
4081 (thread_db_init): Set thread_db_use_events. Check use_events.
4082 * utils.c (fatal, warning): Correct message prefix.
4084 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4086 * Makefile.in (clean): Remove new files.
4087 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4088 (powerpc-64.o, powerpc-64.c): New rules.
4089 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4090 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4092 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4094 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4095 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4096 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4097 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4098 (target_regsets): Add AltiVec and SPE register sets.
4099 * configure.ac: Check for AltiVec and SPE.
4100 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4101 (ppc_fill_vrregset, ppc_store_vrregset): New.
4102 (target_regsets): Add AltiVec register set.
4103 * configure: Regenerated.
4105 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4107 * linux-low.c (O_LARGEFILE): Define.
4108 (linux_read_memory): Use /proc/PID/mem.
4109 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4110 * configure, config.in: Regenerated.
4112 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4114 * linux-low.c (linux_wait_for_event): Do not pass signals while
4117 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4119 * win32-low.c (create_process): New.
4120 (win32_create_inferior): Use create_process instead of
4121 CreateProcess. If create_process failed retry appending an ".exe"
4122 suffix. Store the GetLastError result immediatelly after
4123 create_process calls and use it on the call to error.
4125 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4127 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4129 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4131 * configure.ac: Switch license to GPLv3.
4133 2007-08-01 Michael Snyder <msnyder@access-company.com>
4135 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4137 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4139 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4141 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4142 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4143 CloseToolhelp32Snapshot.
4144 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4145 CloseToolhelp32Snapshot.
4147 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4149 * server.c (main): Check for inferior exit before main loop.
4151 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4153 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4154 instead of on tmp_desc.
4156 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4157 Daniel Jacobowitz <dan@codesourcery.com>
4159 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4160 (add_thread): Minor cleanups.
4161 (clear_inferiors): Move lower in the file. Clear the DLL
4163 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4164 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4165 (xml_escape_text): New.
4166 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4168 (handle_v_cont): Report errors.
4169 (gdbserver_version): Update.
4170 (main): Correct size of own_buf. Do not report initial DLL events.
4171 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4172 (unloaded_dll, xml_escape_text): New.
4173 * win32-low.c (enum target_waitkind): Update comments.
4174 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4175 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4176 (win32_EnumProcessModules, win32_GetModuleInformation)
4177 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4178 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4179 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4180 (win32_Module32First, win32_Module32Next, load_toolhelp)
4181 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4182 (get_child_debug_event): Handle DLL events.
4183 (win32_wait): Likewise.
4185 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4187 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4188 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4190 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4192 * win32-low.c (handle_output_debug_string): Ignore event if not
4195 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4197 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4199 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4201 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4203 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4205 * inferiors.c (change_inferior_id): Add comment.
4206 * linux-low.c (check_removed_breakpoint): Add an early
4207 prototype. Improve debug output.
4208 (linux_attach): Doc update.
4209 (linux_detach_one_process, linux_detach): Clean up before releasing
4211 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4212 * linux-low.h (struct process_info): Doc improvement.
4213 * mem-break.c (delete_all_breakpoints): New.
4214 * mem-break.h (delete_all_breakpoints): New prototype.
4215 * thread-db.c (find_first_thread): New.
4216 (thread_db_create_event): Call it instead of
4217 thread_db_find_new_threads. Clean up unused variables.
4218 (maybe_attach_thread): Remove first thread handling.
4219 (thread_db_find_new_threads): Use find_first_thread.
4220 (thread_db_get_tls_address): Likewise.
4222 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4224 * thread-db.c (thread_db_find_new_threads): Add prototype.
4225 (thread_db_create_event): Check for the main thread before adding
4227 (maybe_attach_thread): Only enable event reporting if TID == 0.
4228 (thread_db_get_tls_address): Check for new threads.
4230 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4232 * linux-low.c (linux_create_inferior): Try execv before execvp.
4233 * spu-low.c (spu_create_inferior): Likewise.
4235 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4237 * linux-low.c (linux_create_inferior): Change execv to execvp.
4238 * spu-low.c (spu_create_inferior): Likewies.
4240 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4242 * Makefile.in (clean): Clean new files instead of deleted ones.
4243 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4244 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4246 * configure.srv: Specify XML files and new regformats for MIPS and
4248 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4249 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4250 an entry for the restart register.
4251 (mips_cannot_fetch_register, mips_cannot_store_register)
4252 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4253 register names to match the XML descriptions.
4254 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4255 restart register instead of $0.
4257 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4258 Markus Deuling <deuling@de.ibm.com>
4260 * remote-utils.c (decode_xfer_write): New function.
4261 * server.h (decode_xfer_write): Add prototype.
4262 * server.c (handle_query): Add PACKET_LEN argument. Support
4263 qXfer:spu:read and qXfer:spu:write packets.
4264 (main): Pass packet_len to handle_query.
4265 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4266 * target.h (target_ops): Add qxfer_spu.
4268 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4270 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4271 accessing non-seekable spufs files.
4273 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4275 * server.c (handle_query): Add reply for qC packet.
4277 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4278 Leo Zayas <lerele@champenstudios@com>
4280 * server.h (check_remote_input_interrupt_request): New function.
4281 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4282 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4283 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4284 (check_remote_input_interrupt_request): New function.
4285 * server.h (check_remote_input_interrupt_request): Declare.
4286 * win32-low.c (winapi_DebugBreakProcess,
4287 winapi_GenerateConsoleCtrlEvent): New typedefs.
4288 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4290 (win32_wait): Check for remote interrupt request
4291 with check_remote_input_interrupt_request.
4292 (win32_request_interrupt): New function.
4293 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4295 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4297 * win32-low.c (debug_registers_changed,
4298 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4299 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4300 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4301 (thread_rec): Get context using the low target.
4302 (child_add_thread): Call thread_added on the low target,
4303 which does the same thing.
4305 (do_initial_child_stuff): Remove debug registers references.
4306 Set context using the low target. Resume threads after
4307 setting the contexts.
4308 (child_continue): Remove dead variable. Remove debug
4309 registers references.
4310 (child_fetch_inferior_registers): Go through the low target.
4311 (do_child_store_inferior_registers): Remove.
4312 (child_store_inferior_registers): Go through the low target.
4313 (win32_resume): Remove debug registers references.
4314 Set context using the low target.
4315 (handle_exception): Change return type to void. Don't record
4316 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4317 first chance exception.
4318 (get_child_debug_event): Change return type to void. Remove
4319 goto loop. Always return after waiting for debug event.
4320 (win32_wait): Convert to switch statement. Handle spurious
4323 * win32-i386-low.c (debug_registers_changed,
4324 debug_registers_used): New.
4325 (initial_stuff): Rename to ...
4326 (i386_initial_stuff): ... this. Clear debug registers
4328 (store_debug_registers): Delete.
4329 (i386_get_thread_context): New.
4330 (load_debug_registers): Delete.
4331 (i386_set_thread_context): New.
4332 (i386_thread_added): New.
4333 (single_step): Rename to ...
4334 (i386_single_step): ... this.
4335 (do_fetch_inferior_registers): Rename to ...
4336 (i386_fetch_inferior_register): ... this.
4337 (i386_store_inferior_register): New.
4338 (the_low_target): Adapt to new interface.
4340 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4341 (arm_get_thread_context): New.
4342 (arm_set_thread_context): New.
4344 (do_fetch_inferior_registers): Rename to ...
4345 (arm_fetch_inferior_register): ... this.
4346 (arm_store_inferior_register): New.
4347 (arm_wince_breakpoint): Reimplement as unsigned long.
4348 (arm_wince_breakpoint_len): Define.
4349 (the_low_target): Adapt to new interface.
4351 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4352 load_debug_registers. Add get_thread_context, set_thread_context,
4353 thread_added and store_inferior_register. Rename
4354 fetch_inferior_registers to fetch_inferior_register.
4355 (regptr): Remove declaration.
4357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4359 * linux-low.c (linux_detach): Change return type to int. Return 0.
4360 * spu-low.c (spu_detach): Likewise.
4362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4364 * target.h (target_ops): Change return type of detach to int.
4366 (join_inferior): New.
4367 * server.c (main): Don't skip detach support on mingw32.
4368 If the inferior doesn't support detaching return error.
4369 Call join_inferior instead of using waitpid.
4370 * linux-low.c (linux_join): New.
4371 (linux_target_op): Add linux_join.
4372 * spu-low.c (spu_join): New.
4373 (spu_target_ops): Add spu_join.
4374 * win32-low.c (win32_detach): Adapt to new interface.
4375 Reopen current_process_handle before detaching. Issue a child
4376 resume before detaching.
4378 (win32_target_op): Add win32_join.
4380 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4382 * win32-low.c (win32-attach): Fix return value.
4383 * target.h (target_ops): Describe ATTACH return values.
4385 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4387 * win32-low.c (GETPROCADDRESS): Define.
4388 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4389 (winapi_DebugSetProcessKillOnExit): Likewise.
4390 (win32_create_inferior): Force usage of ansi CreateProcessA.
4391 (win32_attach): Use GETPROCADDRESS.
4392 (win32_detach): Likewise.
4394 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4396 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4398 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4400 * win32-low.c: Commit leftover changes from 2007-03-29.
4402 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4404 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4405 fields short instead of int. Add explicit padding.
4406 (i387_cache_to_fsave): Remove unnecessary casts.
4407 (i387_fsave_to_cache): Doc fix.
4408 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4410 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4412 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4413 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4415 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4417 * configure.srv (arm*-*-mingw32ce*): Move near the other
4420 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4422 * configure.ac: Add errno checking.
4423 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4424 sys/file.h and malloc.h.
4425 (AC_CHECK_DECLS): Add perror.
4426 (srv_mingwce): Handle.
4427 * configure.srv (i[34567]86-*-cygwin*): Add
4428 win32-i386-low.o to srv_tgtobj.
4429 (i[34567]86-*-mingw*): Likewise.
4430 (arm*-*-mingw32ce*): Add case.
4431 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4432 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4433 [__MINGW32CE__] (strerror): New function.
4434 [__MINGW32CE__] (errno): Define to GetLastError.
4435 [__MINGW32CE__] (COUNTOF): New macro.
4436 (remote_open): Remove extra close call.
4437 * mem-break.c (delete_breakpoint_at): New function.
4438 * mem-break.h (delete_breakpoint_at): Declare.
4439 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4440 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4441 [USE_WIN32API] (read, write): Add char* casts.
4442 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4443 * server.h: Include wincecompat.h on Windows CE.
4444 [HAVE_ERRNO_H]: Check.
4445 (perror): Declare if not declared.
4446 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4447 (perror_with_name): Remove errno declaration.
4448 * wincecompat.h: New.
4449 * wincecompat.c: New.
4451 * win32-arm-low.c: New.
4452 * win32-i386-low.c: New.
4453 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4454 (OUTMSG2): Make it safe.
4456 (COUNTOF): New macro.
4457 (NUM_REGS): Get it from the low target.
4458 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4459 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4460 (thread_rec): Let low target handle debug registers.
4461 (child_add_thread): Likewise.
4462 (child_init_thread_list): Likewise.
4463 (continue_one_thread): Likewise.
4465 (do_child_fetch_inferior_registers): Move to ...
4466 * win32-i386-low.c: ... here, and rename to ...
4467 (do_fetch_inferior_registers): ... this.
4468 * win32-low.c (child_fetch_inferior_registers):
4469 Go through the low target.
4470 (do_child_store_inferior_registers): Use regptr.
4471 (strwinerror): New function.
4472 (win32_create_inferior): Handle Windows CE.
4473 Use strwinerror instead of strerror on Windows error
4474 codes. Add program to the error output.
4475 Don't close the main thread handle on Windows CE.
4476 (win32_attach): Use coredll.dll on Windows CE.
4477 (win32_kill): Close current process and current
4479 (win32_detach): Use coredll.dll on Windows CE.
4480 (win32_resume): Let low target handle debug registers, and
4482 (handle_exception): Add/Remove initial breakpoint. Avoid
4483 non-existant WSTOPSIG on Windows CE.
4484 (win32_read_inferior_memory): Cast to remove warning.
4485 (win32_arch_string): Go through the low target.
4486 (initialize_low): Call set_breakpoint_data with the low
4487 target's breakpoint.
4488 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4489 FOP_REGNUM, mappings): Move to ...
4490 * win32-i386-low.c: ... here.
4491 * win32-low.c (win32_thread_info): Move to ...
4492 * win32-low.h: ... here.
4493 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4494 win32-arm-low.c and wincecompat.c.
4495 (all:): Add $EXEEXT.
4496 (install-only:): Likewise.
4497 (gdbserver:): Likewise.
4498 (gdbreplay:): Likewise.
4499 * config.in: Regenerate.
4500 * configure: Regenerate.
4502 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4504 * win32-low.c: Rename typedef thread_info to
4505 win32_thread_info throughout.
4507 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4509 * win32-i386-low.c: Rename to ...
4510 * win32-low.c: ... this.
4511 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4512 * Makefile.in: Likewise.
4514 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4516 * remote-utils.c (monitor_output): Constify msg parameter.
4517 * server.h (monitor_output): Likewise.
4518 * win32-i386-low.c (handle_output_debug_string): New.
4519 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4520 handle_output_debug_string.
4521 (get_child_debug_event): Likewise.
4523 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4525 * server.c (main): Correct strtoul check.
4527 2007-03-27 Jon Ringle <jon@ringle.org>
4529 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4531 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4533 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4535 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4537 * terminal.h: Check HAVE_SGTTY_H.
4539 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
4541 * remote-utils.c (remote_open): Print out the assigned port number.
4543 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4545 * remote-utils.c (monitor_output): New function.
4546 * server.c (debug_threads): Define here.
4547 (monitor_show_help): New function.
4548 (handle_query): Handle qRcmd.
4549 (main): Do not handle 'd' packet.
4550 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4551 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4554 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4556 * Makefile.in (EXEEXT): New.
4557 (clean): Use $(EXEEXT).
4559 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4561 * target.h (target_ops): Rename send_signal to request_interrupt,
4562 and remove enum target_signal parameter.
4563 * linux-low.c (linux_request_interrupt): Rename from
4564 linux_send_signal, and always send SIGINT.
4565 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4566 and always send SIGINT.
4567 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4569 (input_interrupt): Likewise.
4571 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4573 * server.c (get_features_xml): Check if target implemented
4575 * win32-i386-low.c (win32_arch_string): New.
4576 (win32_target_ops): Add win32_arch_string as arch_string member.
4578 2007-02-22 Markus Deuling <deuling@de.ibm.com>
4580 * spu-low.c (spu_arch_string): New.
4581 (spu_target_ops): Add spu_arch_string.
4583 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4585 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4586 * configure.ac: Do not check for terminal.h.
4587 * configure, config.in: Regenerated.
4589 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4591 * Makefile.in (OBS): Add $(XML_BUILTIN).
4592 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4594 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4595 (arm-with-iwmmxt.c): New.
4596 * config.in, configure: Regenerate.
4597 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4598 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4599 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4600 (arm*-*-linux*): Add iWMMXt and regset support.
4601 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4602 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4603 (arm_store_wmmxregset, target_regsets): New.
4604 * server.c (get_features_xml): Take annex argument. Check builtin
4606 (handle_query): Handle multiple annexes.
4608 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4610 * remote-utils.c [USE_WIN32API] (read, write): Define.
4611 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4614 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4616 * linux-i386-low.c (the_low_target): Set arch_string.
4617 * linux-x86-64-low.c (the_low_target): Likewise.
4618 * linux-low.c (linux_arch_string): New.
4619 (linux_target_ops): Add it.
4620 * linux-low.h (struct linux_target_ops): Add arch_string.
4621 * server.c (write_qxfer_response): Use const void * for DATA.
4622 (get_features_xml): New.
4623 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4624 * target.h (struct target_ops): Add arch_string method.
4626 2007-01-03 Denis Pilat <denis.pilat@st.com>
4627 Daniel Jacobowitz <dan@codesourcery.com>
4629 * linux-low.c (linux_kill): Handle being called with no threads.
4630 * win32-i386-low.c (win32_kill): Likewise.
4631 (get_child_debug_event): Clear current_process_handle.
4633 2006-12-30 Denis PILAT <denis.pilat@st.com>
4634 Daniel Jacobowitz <dan@codesourcery.com>
4636 * remote-utils.c (remote_open): Check the type of specified
4637 serial port devices before opening them.
4638 * server.c (main): Kill the inferior if an error occurs during
4639 the first remote_open.
4641 2006-12-05 Markus Deuling <deuling@de.ibm.com>
4643 * README: Update supported targets.
4645 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4647 * Makefile.in (clean): Remove reg-mips64.c.
4648 (reg-mips64.c, reg-mips64.o): New rules.
4649 * configure.srv: Handle mips64. Include regset support for mips.
4650 * linux-mips-low.c (union mips_register): New.
4651 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4652 (mips_breakpoint, mips_breakpoint_at): Use int.
4653 (mips_collect_register, mips_supply_register)
4654 (mips_collect_register_32bit, mips_supply_register_32bit)
4655 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4656 (mips_store_fpregset, target_regsets): New.
4657 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4659 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4661 * configure.srv: Add target "spu*-*-*".
4662 * Makefile.in (clean): Remove reg-spu.c.
4663 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4664 * spu-low.c: New file.
4666 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4668 * configure.ac: Correct td_thr_tls_get_addr test.
4669 * configure: Regenerated.
4671 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4673 * linux-low.c (linux_wait_for_event): Reformat. Use the
4675 * remote-utils.c (decode_address_to_semicolon): New.
4676 * server.c (pass_signals, handle_general_set): New.
4677 (handle_query): Mention QPassSignals for qSupported.
4678 (main): Call handle_general_set.
4679 * server.h (pass_signals, decode_address_to_semicolon): New.
4681 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4683 * server.c (handle_query): Correct error handling for read_auxv.
4685 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4687 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4688 and srv_linux_thread_db to yes.
4689 * linux-s390-low.c (s390_fill_gregset): New function.
4690 (target_regsets): Define data structure.
4692 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4694 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4695 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4696 * config.in, configure: Regenerated.
4697 * inferiors.c (gdb_id_to_thread): New function.
4698 (gdb_id_to_thread_id): Use it.
4699 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4700 * linux-low.h (struct process_info): Add th member.
4701 (thread_db_get_tls_address): New prototype.
4702 * remote-utils.c (decode_address): Make non-static.
4703 * server.c (handle_query): Handle qGetTLSAddr.
4704 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4705 * target.h (struct target_ops): Add get_tls_address.
4706 * thread-db.c (maybe_attach_thread): Save the thread handle.
4707 (thread_db_get_tls_address): New.
4709 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4711 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4712 (linux_resume_one_process): Take a siginfo_t *. Update all
4713 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4714 (struct pending_signals): Add a siginfo_t.
4715 (linux_wait_for_process): Always set last_status.
4716 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4717 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4718 * linux-low.h (struct process_info): Add last_status.
4720 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4722 * remote-utils.c (try_rle): New function.
4723 (putpkt_binary): Use it.
4725 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4727 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4728 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4729 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4730 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4731 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4734 2006-08-08 Richard Sandiford <richard@codesourcery.com>
4736 * server.c (terminal_fd): New variable.
4737 (old_foreground_pgrp): Likewise.
4738 (restore_old_foreground_pgrp): New function.
4739 (start_inferior): Record the terminal file descriptor in terminal_fd
4740 and its original foreground group in old_foreground_pgrp. Register
4741 restore_old_foreground_pgrp with atexit().
4743 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4745 * server.c (handle_query): Correct qPart to qXfer.
4747 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4749 * configure.ac: Check for more headers which are missing on
4750 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4751 * configure.srv: Add Cygwin and mingw32.
4752 * remote-utils.c: Don't include headers unconditionally which
4753 are missing on mingw32. Include <winsock.h> for mingw32.
4754 (remote_open): Adjust for mingw32 support. Flush
4755 standard error after writing to it.
4756 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4757 (unblock_async_io, enable_async_io, disable_async_io)
4758 (readchar, getpkt): Update for Winsock support.
4759 (prepare_resume_reply): Expect a protocol signal number.
4760 * server.c: Disable <sys/wait.h> on mingw32.
4761 (start_inferior): Adjust for mingw32 support. Flush
4762 standard error after writing to it.
4763 (attach_inferior): Likewise. Use protocol signal
4765 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4767 * win32-i386-low.c: New file.
4768 * Makefile.in (XM_CLIBS): Set.
4769 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4770 (win32-i386-low.o): New dependency rule.
4771 * linux-low.c (linux_wait): Use target signal numbers.
4772 * target.h (struct target_ops): Doc fix.
4773 * server.h (target_signal_to_name): New prototype.
4774 * gdbreplay.c: Don't include headers unconditionally which
4775 are missing on mingw32. Include <winsock.h> for mingw32.
4776 (remote_close, remote_open): Adjust for Winsock support.
4777 * configure, config.in: Regenerated.
4779 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4781 * server.c (decode_xfer_read, write_qxfer_response): New.
4782 (handle_query): Take a packet length argument. Handle
4783 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4784 the qSupported response.
4785 (main): Update call to handle_query.
4787 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4789 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4790 (putpkt_binary): Renamed from putpkt and adjusted for binary
4792 (putpkt): New wrapper for putpkt_binary.
4793 (readchar): Don't mask off the high bit.
4794 (decode_X_packet): New function.
4795 * server.c (main): Call putpkt_binary if a handler sets the packet
4796 length. Save the length of the incoming packet. Handle 'X'.
4797 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4799 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4801 * server.c (handle_query): Handle qSupported.
4803 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4805 * remote-utils.c (all_symbols_looked_up): New variable.
4806 (look_up_one_symbol): Check it.
4807 * server.h (look_up_one_symbol): New declaration.
4808 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4810 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4812 * Makefile.in (linux-arm-low.o): Update dependencies.
4813 * linux-arm-low.c: Include "gdb_proc_service.h".
4814 (PTRACE_GET_THREAD_AREA): Define.
4815 (ps_get_thread_area): New function.
4817 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4819 * configure.srv (m68k*-*-uclinux*): New target.
4820 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4821 (linux_resume_one_process): Remove extraneous cast.
4822 (linux_read_offsets): New.
4823 (linux_target_op): Add linux_read_offsets on mmuless systems.
4824 * server.c (handle_query): Add qOffsets logic.
4825 * target.h (struct target_ops): Add read_offsets.
4827 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4829 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4830 (PTRACE_GET_THREAD_AREA): Define.
4831 (ps_get_thread_area): New function.
4832 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4833 (linux-x86-64-low.o): Update.
4835 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4837 * configure.ac: Remove checks for prfpregset_t.
4838 * gdb_proc_service.h: New file.
4839 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4840 new "gdb_proc_service.h".
4841 * proc-service.c: Likewise.
4842 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4843 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4844 * Makefile.in (gdb_proc_service_h): Updated.
4845 * configure, config.in: Regenerated.
4847 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4849 * remote-utils.c (prepare_resume_reply): Move declaration
4850 of gdb_id_from_wait to the top of the block.
4852 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4854 * linux-low.c (regsets_store_inferior_registers): Read the regset
4855 from the target before filling it.
4857 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4859 * server.c (attach_inferior): Return SIGTRAP for a successful
4862 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4864 * Makefile.in (OBS): Add version.o.
4865 (STAGESTUFF): Delete.
4866 (version.o): Add dependencies.
4867 (version.c): Replace rule.
4868 (clean): Remove version.c.
4869 * server.c (gdbserver_version): New.
4870 (gdbserver_usage): Use printf.
4871 (main): Handle --version and --help.
4872 * server.h (version, host_name): Add declarations.
4874 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4886 * linux-x86-64-low.c:
4889 * linux-ppc64-low.c:
4898 * linux-crisv32-low.c:
4910 * gdbserver.1: Add (C) after Copyright. Update the FSF
4913 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4915 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4916 (arm_breakpoint_at): Recognize both breakpoints.
4917 (the_low_target): Use the correct breakpoint instruction.
4919 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4921 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4922 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4923 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4924 (the_low_target): Update.
4926 2005-10-25 Andreas Schwab <schwab@suse.de>
4928 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4930 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4931 (ia64_num_regs): Reduce to 462.
4933 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4935 * acinclude.m4: Correct quoting.
4936 * aclocal.m4: Regenerated.
4938 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4939 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4940 (thread_db_init): Call thread_db_err_str.
4941 * configure.ac: Check for TD_VERSION.
4942 * config.in, configure: Regenerated.
4944 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4946 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4948 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4950 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4951 is not available. Define HAVE_PTRACE_GETREGS if it is.
4952 * config.in, configure: Regenerated.
4953 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4954 * linux-i386-low.c, linux-m68k-low.c: Update to use
4955 HAVE_PTRACE_GETREGS.
4956 * linux-low.c (regsets_fetch_inferior_registers)
4957 (regsets_store_inferior_registers): Only return 0 if we processed
4959 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4960 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4962 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4964 * inferiors.c (struct thread_info): Add gdb_id.
4965 (add_thread): Add gdb_id argument.
4966 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4967 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4968 calls to add_thread.
4969 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4970 * server.c (handle_query): Use thread_to_gdb_id.
4971 (handle_v_cont, main): Use gdb_id_to_thread_id.
4972 * server.h (add_thread): Update prototype.
4973 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4976 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4978 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4979 left-padded registers.
4980 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4981 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4983 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4985 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4986 * configure: Regenerate.
4987 * config.in: Regenerate.
4988 * server.h (NEED_DECLARATION_STRERROR):
4989 Replace with !HAVE_DECL_STRERROR.
4991 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4993 * linux-low.c (linux_wait, linux_send_signal): Don't test
4994 an unsigned long variable for > 0 if it could be MAX_ULONG.
4995 * server.c (myresume): Likewise.
4996 * target.c (set_desired_inferior): Likewise.
4998 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5000 * configure.ac: Simplify and improve check for socklen_t.
5001 * configure, config.in: Regenerate.
5003 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5005 * acconfig.h: Remove.
5006 * configure.ac: Add a test for socklen_t. Use three-argument
5007 AC_DEFINE throughout.
5008 * config.in: Regenerated using autoheader 2.59.
5009 * configure: Regenerated.
5011 * gdbreplay.c (socklen_t): Provide a default.
5012 (remote_open): Use socklen_t.
5013 * remote-utils.c (socklen_t): Provide a default.
5014 (remote_open): Use socklen_t.
5015 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5018 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5020 * linux-low.c (linux_read_memory, linux_write_memory)
5021 (linux_read_auxv): Likewise.
5022 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5023 (check_mem_write): Likewise.
5024 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5026 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5027 (registers_from_string, register_data): Likewise.
5028 * server.c (handle_query, main): Likewise.
5029 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5030 (decode_M_packet): Likewise.
5031 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5032 * target.h (struct target_ops): Update read_memory, write_memory,
5034 (read_inferior_memory, write_inferior_memory): Update.
5035 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5037 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5038 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5039 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5040 linux-s390-low.c, linux-sh-low.c: Update for changes in
5041 read_inferior_memory and the_low_target->breakpoint.
5043 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5045 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5046 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5047 * configure.srv: Add powerpc64-*-linux*.
5048 * linux-ppc64-low.c: New file.
5050 2005-05-23 Orjan Friberg <orjanf@axis.com>
5052 * linux-cris-low.c: New file with support for CRIS.
5053 * linux-crisv32-low.c: Ditto for CRISv32.
5054 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5055 (clean): Add reg-cris.c and reg-crisv32.c.
5056 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5057 reg-crisv32.o, and reg-crisv32.c to make rules.
5058 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5061 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5063 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5064 of sizeof (PTRACE_XFER_TYPE).
5065 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5067 2005-05-12 Orjan Friberg <orjanf@axis.com>
5069 * target.h (struct target_ops): Add insert_watchpoint,
5070 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5071 pointers for hardware watchpoint support.
5072 * linux-low.h (struct linux_target_ops): Ditto.
5073 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5074 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5075 to linux_target_ops.
5076 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5078 * server.c (main): Recognize 'Z' and 'z' packets.
5080 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5082 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5083 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5084 (the_low_target): Add new members.
5086 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5088 * proc-service.c (ps_lgetregs): Search all_processes instead of
5091 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5093 * server.c (start_inferior): Change return type to int.
5094 (attach_inferior): Change sigptr to int *.
5095 (handle_v_cont, handle_v_requests): Change signal to int *.
5096 (main): Change signal to int.
5098 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5100 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5101 * configure.srv: Add m32r*-*-linux*.
5102 * linux-m32r-low.c: New file.
5104 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5106 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5108 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5110 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5111 Take unsigned long arguments for PIDs.
5112 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5113 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5114 (wait_for_sigstop, linux_resume_one_process)
5115 (regsets_fetch_inferior_registers, linux_send_signal)
5116 (linux_read_auxv): Likewise. Update the types of variables holding
5117 PIDs. Update format string specifiers.
5118 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5119 * remote-utils.c (prepare_resume_reply): Likewise.
5120 * server.c (cont_thread, general_thread, step_thread)
5121 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5123 (handle_query): Update format specifiers.
5124 (handle_v_cont, main): Use strtoul for thread IDs.
5125 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5126 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5127 (general_thread, step_thread, thread_from_wait)
5128 (old_thread_from_wait): Update.
5129 * target.h (struct thread_resume): Use unsigned long for THREAD.
5130 (struct target_ops): Use unsigned long for arguments to attach and
5133 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5135 * acinclude.m4: Include bfd/bfd.m4 directly.
5136 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5137 <agriffis@toolchain.org>.
5138 * aclocal.m4, configure: Regenerated.
5140 2005-01-07 Andrew Cagney <cagney@gnu.org>
5142 * configure.ac: Rename configure.in, require autoconf 2.59.
5143 * configure: Re-generate.
5145 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5147 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5149 * aclocal.m4: Regenerated.
5150 * configure: Regenerated.
5152 2004-11-21 Andreas Schwab <schwab@suse.de>
5154 * linux-m68k-low.c (m68k_num_gregs): Define.
5155 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5156 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5157 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5158 (m68k_breakpoint_at): New. Add to the_low_target.
5160 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5161 srv_linux_thread_db to yes.
5163 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5165 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5166 (ARCH_SET_FS): Likewise.
5167 (ARCH_GET_FS): Likewise.
5168 (ARCH_GET_GS): Likewise.
5170 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5172 * linux-i386-low.c (ps_get_thread_area): New.
5173 * linux-x86-64-low.c (ps_get_thread_area): New.
5174 * linux-low.c: Include <sys/syscall.h>.
5175 (linux_kill_one_process): Don't kill the first thread here.
5176 (linux_kill): Kill the first thread here.
5177 (kill_lwp): New function.
5178 (send_sigstop, linux_send_signal): Use it.
5179 * proc-service.c: Clean up #ifdefs.
5180 (fpregset_info): Delete.
5181 (ps_lgetregs): Update and enable implementation.
5182 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5184 * remote-utils.c (struct sym_cache, symbol_cache): New.
5185 (input_interrupt): Print a clearer message.
5186 (async_io_enabled): New variable.
5187 (enable_async_io, disable_async_io): Use it. Update comments.
5188 (look_up_one_symbol): Use the symbol cache.
5189 * thread-db.c (thread_db_look_up_symbols): New function.
5190 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5192 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5194 * configure.in: Test for -rdynamic.
5195 * configure: Regenerated.
5196 * Makefile (INTERNAL_LDFLAGS): New.
5197 (gdbserver, gdbreplay): Use it.
5199 2004-09-02 Andrew Cagney <cagney@gnu.org>
5201 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5203 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5205 * linux-low.c (linux_wait): Clear all_processes list also.
5207 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5209 * linux-low.c: Include <errno.h>. Remove extern declaration of
5212 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5214 * gdbreplay.c, server.h, utils.c: Update copyright years.
5216 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5218 * server.c (main): Print child status or termination signal from
5219 variable 'signal', not 'sig'.
5221 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5223 * linux-low.c (linux_read_memory): Change return type to
5224 int. Check for and return error from ptrace().
5225 * target.c (read_inferior_memory): Change return type to int. Pass
5226 back return status from the_target->read_memory().
5227 * target.h (struct target_ops): Adapt *read_memory() prototype.
5229 (read_inferior_memory): Adapt prototype.
5230 * server.c (main): Return an error packet if
5231 read_inferior_memory() returns an error.
5233 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5235 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5236 Unify with other clean targets.
5238 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5240 * server.c (handle_v_cont): Call set_desired_inferior.
5242 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5244 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5246 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5248 * linux-low.c (linux_wait): Unblock async I/O.
5249 (linux_resume): Block and enable async I/O.
5250 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5251 * server.h (block_async_io, unblock_async_io): Add prototypes.
5253 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5255 * remote-utils.c (remote_open): Print a status notice after
5257 * server.c (attach_inferior): Print a status notice after
5260 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5262 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5264 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5266 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5268 * server.c, target.h: Update copyright years.
5270 2004-02-25 Roland McGrath <roland@redhat.com>
5272 * target.h (struct target_ops): New member `read_auxv'.
5273 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5274 * linux-low.c (linux_read_auxv): New function.
5275 (linux_target_ops): Initialize `read_auxv' member to that.
5277 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5279 Committed by Jim Blandy <jimb@redhat.com>.
5281 * linux-s390-low.c (s390_num_regs): Update.
5282 (s390_regmap): Remove control registers. Use __s390x__ predefine
5283 instead of GPR_SIZE to distiguish s390 and s390x targets.
5285 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5287 * linux-low.c: Update copyright year.
5288 (check_removed_breakpoint): Clear pending_is_breakpoint.
5289 (linux_set_resume_request, linux_queue_one_thread)
5290 (resume_status_pending_p): New functions.
5291 (linux_continue_one_thread): Use process->resume.
5292 (linux_resume): Only resume threads if there are no pending events.
5293 * linux-low.h (struct process_info): Add resume request
5296 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5298 * regcache.c (new_register_cache): Clear the allocated register
5299 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5301 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5303 * linux-low.c (linux_resume): Take a struct thread_resume *
5305 (linux_wait): Update call.
5306 (resume_ptr): New static variable.
5307 (linux_continue_one_thread): Renamed from
5308 linux_continue_one_process. Use resume_ptr.
5309 (linux_resume): Use linux_continue_one_thread.
5310 * server.c (handle_v_cont, handle_v_requests): New functions.
5311 (myresume): New function.
5312 (main): Handle 'v' case.
5313 * target.h (struct thread_resume): New type.
5314 (struct target_ops): Change argument of "resume" to struct
5316 (myresume): Delete macro.
5318 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5320 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5321 (uninstall): Support DESTDIR.
5323 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5325 * configure.srv: Add xscale*linux copy of arm*linux entry.
5327 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5329 * linux-arm-low.c (arm_reinsert_addr): New function.
5330 (the_low_target): Add arm_reinsert_addr.
5332 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5334 * mem-break.c: Remove whitespace at end of file.
5336 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5338 * configure.in: Check whether we need to prototype strerror.
5339 * server.h: Optionally prototype strerror.
5340 * gdbreplay.c (perror_with_name): Use strerror.
5341 * linux-low.c (linux_attach_lwp): Use strerror.
5342 * utils.c (perror_with_name): Use strerror.
5343 * config.in, configure: Regenerated.
5345 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5347 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5348 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5350 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5352 * Makefile.in (SFILES): Update.
5353 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5354 low-sun3.c: Remove files.
5356 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5358 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5359 (linux_detach_one_process, linux_detach): New functions.
5360 (linux_target_ops): Add linux_detach.
5361 * server.c (main): Handle 'D' packet.
5362 * target.h (struct target_ops): Add "detach" member.
5363 (detach_inferior): Define.
5365 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5367 From Kelley Cook <kelleycook@wideopenwest.com>:
5368 * configure.srv: Accept i[34567]86 variants.
5370 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5372 * linux-low.c (linux_wait_for_event): Correct comment typos.
5373 (linux_resume_one_process): Call check_removed_breakpoint.
5374 (linux_send_signal): New function.
5375 (linux_target_ops): Add linux_send_signal.
5376 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5378 * target.h (struct target_ops): Add send_signal.
5380 2003-05-29 Jim Blandy <jimb@redhat.com>
5382 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5383 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5384 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5385 away part of the register's value.
5387 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5389 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5390 (linux_wait_for_event, linux_init_signals): Likewise.
5392 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5394 * configure.in: Check for stdlib.h.
5395 * configure: Regenerated.
5396 * config.in: Regenerated.
5398 2003-01-04 Andreas Schwab <schwab@suse.de>
5400 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5402 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5404 * Makefile.in: Remove obsolete code.
5406 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5408 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5409 defined(PT_FPR0_HI).
5411 2002-11-17 Stuart Hughes <seh@zee2.com>
5413 * linux-arm-low.c (arm_num_regs): Increase.
5414 (arm_regmap): Include status register.
5416 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5418 * linux-low.c (register_addr): Remove incorrect -1 check.
5420 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5422 * linux-low.c (linux_create_inferior): Call setpgid. Return
5424 (unstopped_p, linux_signal_pid): Remove.
5425 (linux_target_ops): Remove linux_signal_pid.
5426 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5427 global instead of target method.
5428 * target.h (struct target_ops): Remove signal_pid. Update comment
5429 for create_inferior.
5430 * server.c (signal_pid): New variable.
5431 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5432 gdbserver. Set the child to be the foreground process group.
5433 (attach_inferior): Set signal_pid.
5435 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5437 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5439 2002-08-20 Jim Blandy <jimb@redhat.com>
5441 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5444 2002-08-01 Andrew Cagney <cagney@redhat.com>
5446 * Makefile.in: Make chill references obsolete.
5448 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5450 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5451 * configure: Regenerate.
5452 * config.in: Regenerate.
5454 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5456 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5457 (perror_with_name, remote_close, remote_open, expect, play): Static.
5459 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5461 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5462 byte offsets instead of an array of indexes.
5463 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5465 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5467 * regcache.c: Add comment.
5469 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5471 * thread-db.c: New file.
5472 * proc-service.c: New file.
5473 * acinclude.m4: New file.
5474 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5475 proc-service.o, and thread-db.o.
5476 (linux-low.o): Add USE_THREAD_DB.
5477 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5478 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5479 * aclocal.m4: Regenerated.
5480 * config.in: Regenerated.
5481 * configure: Regenerated.
5482 * configure.in: Check for proc_service.h, sys/procfs.h,
5483 thread_db.h, and linux/elf.h headrs.
5484 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5485 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5486 Check for -lthread_db and thread support.
5487 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5488 PowerPC, and SuperH.
5489 * i387-fp.c: Constify arguments.
5490 * i387-fp.h: Likewise.
5491 * inferiors.c: (struct thread_info): Renamed from
5492 `struct inferior_info'. Remove PID member. Use generic inferior
5493 list header. All uses updated.
5494 (inferiors, signal_pid): Removed.
5495 (all_threads): New variable.
5496 (get_thread): Define.
5497 (add_inferior_to_list): New function.
5498 (for_each_inferior): New function.
5499 (change_inferior_id): New function.
5500 (add_inferior): Removed.
5501 (remove_inferior): New function.
5502 (add_thread): New function.
5503 (free_one_thread): New function.
5504 (remove_thread): New function.
5505 (clear_inferiors): Use for_each_inferior and free_one_thread.
5506 (find_inferior): New function.
5507 (find_inferior_id): New function.
5508 (inferior_target_data): Update argument type.
5509 (set_inferior_target_data): Likewise.
5510 (inferior_regcache_data): Likewise.
5511 (set_inferior_regcache_data): Likewise.
5512 * linux-low.c (linux_bp_reinsert): Remove.
5513 (all_processes, stopping_threads, using_thrads)
5514 (struct pending_signals, debug_threads, pid_of): New.
5515 (inferior_pid): Replace with macro.
5516 (struct inferior_linux_data): Remove.
5517 (get_stop_pc, add_process): New functions.
5518 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5519 Use add_process and add_thread.
5520 (linux_attach_lwp): New function, based on old linux_attach. Use
5521 add_process and add_thread. Set stop_expected for new threads.
5522 (linux_attach): New function.
5523 (linux_kill_one_process): New function.
5524 (linux_kill): Kill all LWPs.
5525 (linux_thread_alive): Use find_inferior_id.
5526 (check_removed_breakpoints, status_pending_p): New functions.
5527 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5528 Update. Use WNOHANG. Wait for cloned processes also. Update process
5529 struct for the found process.
5530 (linux_wait_for_event): New function.
5531 (linux_wait): Use it. Support LWPs.
5532 (send_sigstop, wait_for_sigstop, stop_all_processes)
5533 (linux_resume_one_process, linux_continue_one_process): New functions.
5534 (linux_resume): Support LWPs.
5535 (REGISTER_RAW_SIZE): Remove.
5536 (fetch_register): Use register_size instead. Call supply_register.
5537 (usr_store_inferior_registers): Likewise. Call collect_register.
5539 (regsets_fetch_inferior_registers): Improve error message.
5540 (regsets_store_inferior_registers): Add debugging.
5541 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5542 (unstopped_p, linux_signal_pid): New functions.
5543 (linux_target_ops): Add linux_signal_pid.
5544 (linux_init_signals): New function.
5545 (initialize_low): Call it. Initialize using_threads.
5546 * regcache.c (inferior_regcache_data): Add valid
5548 (get_regcache): Fetch registers lazily. Add fetch argument
5549 and update all callers.
5550 (regcache_invalidate_one, regcache_invalidate): New
5552 (new_register_cache): Renamed from create_register_cache.
5553 Return the new regcache.
5554 (free_register_cache): Change argument to a void *.
5555 (registers_to_string, registers_from_string): Call get_regcache
5556 with fetch flag set.
5557 (register_data): Make static. Pass fetch flag to get_regcache.
5558 (supply_register): Call get_regcache with fetch flag clear.
5559 (collect_register): Call get_regcache with fetch flag set.
5560 (collect_register_as_string): New function.
5561 * regcache.h: Update.
5562 * remote-utils.c (putpkt): Flush after debug output and use
5564 Handle input interrupts while waiting for an ACK.
5565 (input_interrupt): Use signal_pid method.
5566 (getpkt): Flush after debug output and use stderr.
5567 (outreg): Use collect_register_as_string.
5568 (new_thread_notify, dead_thread_notify): New functions.
5569 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5571 (look_up_one_symbol): Flush after debug output.
5572 * server.c (step_thread, server_waiting): New variables.
5573 (start_inferior): Don't use signal_pid. Update call to mywait.
5574 (attach_inferior): Update call to mywait.
5575 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5576 (main): Don't fetch/store registers explicitly. Use
5577 set_desired_inferior. Support proposed ``Hs'' packet. Update
5580 (struct inferior_list, struct_inferior_list_entry): New.
5581 * target.c (set_desired_inferior): New.
5582 (write_inferior_memory): Constify.
5583 (mywait): New function.
5585 (struct target_ops): New signal_pid method.
5586 (mywait): Removed macro, added prototype.
5588 * linux-low.h (regset_func): Removed.
5589 (regset_fill_func, regset_store_func): New.
5590 (enum regset_type): New.
5591 (struct regset_info): Add type field. Use new operation types.
5592 (struct linux_target_ops): stop_pc renamed to get_pc.
5593 Add decr_pc_after_break and breakpoint_at.
5594 (get_process, get_thread_proess, get_process_thread)
5595 (strut process_info, all_processes, linux_attach_lwp)
5596 (thread_db_init): New.
5598 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5599 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5600 (the_low_target): Add new members.
5601 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5602 (i386_store_fpxregset): Constify.
5603 (target_regsets): Add new kind identifier.
5604 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5605 (i386_set_pc): Add debugging.
5606 (i386_breakpoint_at): New function.
5607 (the_low_target): Add new members.
5608 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5609 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5610 (mips_breakpoint_at): New.
5611 (the_low_target): Add new members.
5612 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5613 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5614 (the_low_target): Add new members.
5615 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5616 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5617 (the_low_target): Add new members.
5618 * linux-x86-64-low.c (target_regsets): Add new kind
5621 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
5623 From Martin Pool <mbp@samba.org>:
5624 * server.c (gdbserver_usage): New function.
5627 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
5629 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5632 2002-05-04 Andrew Cagney <ac131313@redhat.com>
5634 * Makefile.in: Remove obsolete code.
5636 2002-04-24 Michal Ludvig <mludvig@suse.cz>
5638 * linux-low.c (regsets_fetch_inferior_registers),
5639 (regsets_store_inferior_registers): Removed cast to int from
5641 * regcache.h: Added declaration of struct inferior_info.
5643 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5645 * inferiors.c (struct inferior_info): Add regcache_data.
5646 (add_inferior): Call create_register_cache.
5647 (clear_inferiors): Call free_register_cache.
5648 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5649 * regcache.c (struct inferior_regcache_data): New.
5650 (registers): Remove.
5651 (get_regcache): New function.
5652 (create_register_cache, free_register_cache): New functions.
5653 (set_register_cache): Don't initialize the register cache here.
5654 (registers_to_string, registers_from_string, register_data): Call
5656 * regcache.h: Add prototypes.
5657 * server.h: Likewise.
5659 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5661 * mem-break.c: New file.
5662 * mem-break.h: New file.
5663 * Makefile.in: Add mem-break.o rule; update server.h
5665 * inferiors.c (struct inferior_info): Add target_data
5667 (clear_inferiors): Free target_data member if set.
5668 (inferior_target_data, set_inferior_target_data): New functions.
5669 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5670 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5671 * linux-low.c (linux_bp_reinsert): New variable.
5672 (struct inferior_linux_data): New.
5673 (linux_create_inferior): Use set_inferior_target_data.
5674 (linux_attach): Likewise. Call add_inferior.
5675 (linux_wait_for_one_inferior): New function.
5676 (linux_wait): Call it.
5677 (linux_write_memory): Add const.
5678 (initialize_low): Call set_breakpoint_data.
5679 * linux-low.h (struct linux_target_ops): Add breakpoint
5681 * server.c (attach_inferior): Remove extra add_inferior
5683 * server.h: Include mem-break.h. Update inferior.c
5685 * target.c (read_inferior_memory)
5686 (write_inferior_memory): New functions.
5687 * target.h (read_inferior_memory)
5688 (write_inferior_memory): Change macros to prototypes.
5689 (struct target_ops): Update comments. Add const to write_memory
5692 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
5694 * linux-low.c (usr_store_inferior_registers): Support
5695 registers which are allowed to fail to store.
5696 * linux-low.h (linux_target_ops): Likewise.
5697 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5698 (ppc_cannot_store_register): FPSCR may not be storable.
5700 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5702 * server.h: Include <string.h> if HAVE_STRING_H.
5703 * ChangeLog: Correct paths in last ChangeLog entry.
5705 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5707 * linux-low.h: Remove obsolete prototypes.
5708 (struct linux_target_ops): New.
5709 (extern the_low_target): New.
5710 * linux-low.c (num_regs, regmap): Remove declarations.
5711 (register_addr): Use the_low_target explicitly.
5712 (fetch_register): Likewise.
5713 (usr_fetch_inferior_registers): Likewise.
5714 (usr_store_inferior_registers): Likewise.
5715 * linux-arm-low.c (num_regs): Remove.
5716 (arm_num_regs): Define.
5717 (arm_regmap): Renamed from regmap, made static.
5718 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5720 (arm_cannot_store_register): Renamed from cannot_store_register,
5722 (the_low_target): New.
5723 * linux-i386-low.c (num_regs): Remove.
5724 (i386_num_regs): Define.
5725 (i386_regmap): Renamed from regmap, made static.
5726 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5728 (i386_cannot_store_register): Renamed from cannot_store_register,
5730 (the_low_target): New.
5731 * linux-ia64-low.c (num_regs): Remove.
5732 (ia64_num_regs): Define.
5733 (ia64_regmap): Renamed from regmap, made static.
5734 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5736 (ia64_cannot_store_register): Renamed from cannot_store_register,
5738 (the_low_target): New.
5739 * linux-m68k-low.c (num_regs): Remove.
5740 (m68k_num_regs): Define.
5741 (m68k_regmap): Renamed from regmap, made static.
5742 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5744 (m68k_cannot_store_register): Renamed from cannot_store_register,
5746 (the_low_target): New.
5747 * linux-mips-low.c (num_regs): Remove.
5748 (mips_num_regs): Define.
5749 (mips_regmap): Renamed from regmap, made static.
5750 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5752 (mips_cannot_store_register): Renamed from cannot_store_register,
5754 (the_low_target): New.
5755 * linux-ppc-low.c (num_regs): Remove.
5756 (ppc_num_regs): Define.
5757 (ppc_regmap): Renamed from regmap, made static.
5758 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5760 (ppc_cannot_store_register): Renamed from cannot_store_register,
5762 (the_low_target): New.
5763 * linux-s390-low.c (num_regs): Remove.
5764 (s390_num_regs): Define.
5765 (s390_regmap): Renamed from regmap, made static.
5766 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5768 (s390_cannot_store_register): Renamed from cannot_store_register,
5770 (the_low_target): New.
5771 * linux-sh-low.c (num_regs): Remove.
5772 (sh_num_regs): Define.
5773 (sh_regmap): Renamed from regmap, made static.
5774 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5776 (sh_cannot_store_register): Renamed from cannot_store_register,
5778 (the_low_target): New.
5779 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5780 (the_low_target): New.
5782 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5784 * Makefile.in: Add stamp-h target.
5785 * configure.in: Create stamp-h.
5786 * configure: Regenerated.
5788 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5790 * inferiors.c: New file.
5791 * target.c: New file.
5792 * target.h: New file.
5793 * Makefile.in: Add target.o and inferiors.o. Update
5795 * linux-low.c (inferior_pid): New static variable,
5796 moved from server.c.
5797 (linux_create_inferior): Renamed from create_inferior.
5798 Call add_inferior. Return 0 on success instead of a PID.
5799 (linux_attach): Renamed from myattach.
5800 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5801 (linux_thread_alive): Renamed from mythread_alive.
5802 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5804 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5805 (regsets_store_inferior_registers): Correct error message.
5806 Add missing ``return 0''.
5807 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5808 (linux_store_registers): Renamed from store_inferior_registers.
5809 (linux_read_memory): Renamed from read_inferior_memory.
5810 (linux_write_memory): Renamed from write_inferior_memory.
5811 (linux_target_ops): New structure.
5812 (initialize_low): Call set_target_ops ().
5813 * remote-utils.c (unhexify): New function.
5814 (hexify): New function.
5815 (input_interrupt): Send signals to ``signal_pid''.
5816 * server.c (inferior_pid): Remove.
5817 (start_inferior): Update create_inferior call.
5818 (attach_inferior): Call add_inferior.
5819 (handle_query): New function.
5820 (main): Call handle_query for `q' packets.
5821 * server.h: Include "target.h". Remove obsolete prototypes.
5822 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5824 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5826 * Makefile.in: Add WARN_CFLAGS. Update configury
5828 * configure.in: Check for <string.h>
5829 * configure: Regenerate.
5830 * config.in: Regenerate.
5831 * gdbreplay.c: Include needed system headers.
5832 (remote_open): Remove strchr prototype.
5833 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5834 * regcache.c (supply_register): Change buf argument to const void *.
5835 (supply_register_by_name): Likewise.
5836 (collect_register): Change buf argument to void *.
5837 (collect_register_by_name): Likewise.
5838 * regcache.h: Add missing prototypes.
5839 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5840 * server.c (handle_query): New function.
5841 (attached): New static variable, moved out of main.
5842 (main): Quiet longjmp clobber warnings.
5843 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5844 * utils.c (error): Remove NORETURN.