1 2011-03-14 Michael Snyder <msnyder@vmware.com>
3 * gdbserver/hostio.c (handle_close): Remove unnecessary null test.
5 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7 * Makefile.in (maintainer-clean realclean distclean): Remove
8 "make ... subdir_do" command.
10 2011-03-09 Yao Qi <yao@codesourcery.com>
13 2011-03-04 Yao Qi <yao@codesourcery.com>
15 * Makefile.in: Remove GNU make feature --directory.
17 2011-03-05 Yao Qi <yao@codesourcery.com>
19 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
20 (subdir_do): New make target. Copied from gdb/Makefile.
21 (maintainer-clean, realclean, distclean, clean): Call corresponding
22 make targets in common/Makefile.
24 2011-02-11 Yao Qi <yao@codesourcery.com>
26 * configure.ac: Call AC_PROG_RANLIB.
27 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
28 * configure: Regenerate.
30 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
32 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
34 2011-03-06 Yao Qi <yao@codesourcery.com>
36 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
38 2011-03-05 Yao Qi <yao@codesourcery.com>
40 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
41 (subdir_do): New make target. Copied from gdb/Makefile.
42 (maintainer-clean, realclean, distclean, clean): Call corresponding
43 make targets in common/Makefile.
45 2011-03-04 Yao Qi <yao@codesourcery.com>
47 * Makefile.in: Remove GNU make feature --directory.
49 2011-02-28 Michael Snyder <msnyder@vmware.com>
51 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
53 (cmd_qtbuffer): Ditto.
54 (cmd_bigqtbuffer): Ditto.
56 * utils.c (decimal2str): Initialize 'width' to nine, then
59 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
61 * hostio.c (require_data): Free *data, not data.
63 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
65 * hostio.c (require_data): Use free, not xfree.
67 2011-02-27 Michael Snyder <msnyder@vmware.com>
69 * server.c (handle_query): Discard unused value.
71 * hostio.c (require_data): Free malloc memory before returning
74 2011-02-26 Michael Snyder <msnyder@vmware.com>
76 * linux-low.c (list_threads): Call closedir for dirent.
78 2011-02-27 Michael Snyder <msnyder@vmware.com>
80 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
81 a case statement falls through.
83 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
85 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
88 2011-02-26 Michael Snyder <msnyder@vmware.com>
90 * utils.c (decimal2str): Eliminate dead code and dead param.
91 (pulongest): Drop dead param from call to decimal2str.
94 2011-02-24 Joel Brobecker <brobecker@adacore.com>
96 Revert the following patch (not approved yet):
97 2011-02-21 Hui Zhu <teawater@gmail.com>
98 * tracepoint.c (tp_printf): New function.
99 (eval_agent_expr): Handle gdb_agent_op_printf.
101 2011-02-21 Hui Zhu <teawater@gmail.com>
103 * tracepoint.c (tp_printf): New function.
104 (eval_agent_expr): Handle gdb_agent_op_printf.
106 2011-02-18 Tom Tromey <tromey@redhat.com>
108 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
109 (tracepoint.o): Likewise.
110 * tracepoint.c (enum gdb_agent_op): Use ax.def.
111 (gdb_agent_op_names): Likewise.
113 2011-02-18 Tom Tromey <tromey@redhat.com>
115 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
116 gdb_agent_op_rot>: New constants.
117 (gdb_agent_op_names): Add pick and roll.
118 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
121 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
123 * aclocal.m4: Regenerated with aclocal-1.11.1.
125 2011-02-14 Pedro Alves <pedro@codesourcery.com>
127 * server.c (handle_qxfer_traceframe_info): New.
128 (qxfer_packets): Register "traceframe-info".
129 (handle_query): Report support for qXfer:traceframe-info:read+.
130 * tracepoint.c (match_blocktype): New.
131 (traceframe_find_block_type): Rename to ...
132 (traceframe_walk_blocks): ... this. Add callback filter argument,
134 (traceframe_find_block_type): New, reimplemented on top of
135 traceframe_walk_blocks.
136 (build_traceframe_info_xml): New.
137 (traceframe_read_info): New.
138 * server.h (traceframe_read_info): Declare.
140 2011-02-11 Yao Qi <yao@codesourcery.com>
142 * configure.ac: Call AC_PROG_RANLIB.
143 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
144 * configure: Regenerate.
146 2011-02-07 Pedro Alves <pedro@codesourcery.com>
148 * server.c (gdb_read_memory): Change return semantics to allow
150 (handle_search_memory_1): Adjust.
151 (process_serial_event) <'m' packet>: Handle partial transfers.
152 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
154 2011-01-28 Pedro Alves <pedro@codesourcery.com>
156 * regcache.c (init_register_cache): Initialize
157 regcache->register_status.
158 (free_register_cache): Release regcache->register_status.
159 (regcache_cpy): Copy register_status.
160 (registers_to_string): Print 'x's for unavailable registers.
161 (supply_register): Mark the register's status valid or
162 unavailable, depending on whether a buffer was passed in or not.
163 (supply_register_zeroed): New.
164 (supply_regblock): Mark the registers' status valid or
165 unavailable, depending on whether a buffer was passed in or not.
166 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
167 (struct regcache): New `register_status' field.
168 (supply_register_zeroed): Declare.
169 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
170 supply_register_zeroed, rather than passing a NULL buffer to
172 * tracepoint.c (fetch_traceframe_registers): Update comment.
174 2011-01-28 Pedro Alves <pedro@codesourcery.com>
176 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
179 2011-01-25 Pedro Alves <pedro@codesourcery.com>
181 * server.h (decode_xfer_write): Change prototype.
182 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
183 and don't extract the annex here.
184 * server.c (decode_xfer_read): Remove `annex' parameter,
185 and don't extract the annex here.
188 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
189 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
190 (handle_qxfer_statictrace): New functions, abstracted out from
191 handle_query, and made to use the struct qxfer interface.
192 (handle_threads_qxfer_proper): Rename to ...
193 (handle_qxfer_threads_proper): ... this.
194 (handle_threads_qxfer): Rename to ...
195 (handle_qxfer_threads): ... this. Adjust.
196 (qxfer_packets): New array.
197 (handle_qxfer): New function.
198 (handle_query): Use handle_qxfer.
200 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
202 * gdbreplay.c: Shorten lines of >= 80 columns.
203 * linux-low.c: Ditto.
204 * linux-ppc-low.c: Ditto.
205 * linux-s390-low.c: Ditto.
206 * linux-sparc-low.c: Ditto.
207 * linux-x86-low.c: Ditto.
208 * linux-xtensa-low.c: Ditto.
209 * mem-break.c: Ditto.
212 * remote-utils.c: Ditto.
215 * thread-db.c: Ditto.
216 * tracepoint.c: Ditto.
218 * win32-low.h: Ditto.
220 2011-01-05 Joel Brobecker <brobecker@adacore.com>
222 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
225 2011-01-01 Joel Brobecker <brobecker@adacore.com>
227 * server.c (gdbserver_version): Update copyright year in version
229 * gdbreplay.c (gdbreplay_version): Ditto.
231 2010-12-29 Jie Zhang <jie.zhang@analog.com>
233 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
234 * linux-bfin-low.c: New file.
235 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
236 PT_DATA_ADDR for BFIN targets.
237 * Makefile.in (SFILES): Add linux-bfin-low.c.
238 (clean): Remove reg-bfin.c.
239 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
240 * README: Mention supported Blackfin targets.
242 2010-12-23 Mike Frysinger <vapier@gentoo.org>
244 * .gitignore: New file.
246 2010-11-16 Mike Frysinger <vapier@gentoo.org>
248 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
250 2010-10-22 Jie Zhang <jie@codesourcery.com>
252 * Makefile.in: Add FLAGS_TO_PASS variable.
253 (install): Remove dependency of install-only and recursively
254 invoke make for install-only.
256 2010-10-04 Doug Evans <dje@google.com>
258 * Makefile.in (uninstall): Use $(DESTDIR).
260 2010-09-24 Pedro Alves <pedro@codesourcery.com>
264 * linux-x86-low.c (compat_siginfo_from_siginfo)
265 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
266 si_code is < 0. Check for si_code == SI_TIMER before checking for
269 2010-09-13 Joel Brobecker <brobecker@adacore.com>
271 * lynx-i386-low.c: New file.
272 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
274 2010-09-13 Joel Brobecker <brobecker@adacore.com>
276 * lynx-low.c (ptrace_request_to_str): Remove handling for
277 request values that have been removed in LynxOS 5.x.
279 2010-09-13 Joel Brobecker <brobecker@adacore.com>
281 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
284 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
286 * configure.ac: Add --enable-inprocess-agent option.
287 * configure: Rebuilt.
289 2010-09-06 Yao Qi <yao@codesourcery.com>
291 * linux-low.c (linux_kill): Remove unused variable.
292 (linux_stabilize_threads): Likewise.
293 * server.c (start_inferior): Likewise.
294 (queue_stop_reply_callback): Likewise.
295 * tracepoint.c (do_action_at_tracepoint): Likewise.
297 2010-09-06 Yao Qi <yao@codesourcery.com>
299 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
302 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
304 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
306 2010-09-06 Pedro Alves <pedro@codesourcery.com>
308 * Makefile.in (install-only): Replace $IPA_DEPFILES with
311 2010-09-01 Joel Brobecker <brobecker@adacore.com>
313 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
314 gdbserver/lynx-ppc-low.c: New files.
315 * Makefile.in (lynx_low_h): New variable.
316 (lynx-low.o, lynx-ppc-low.o): New rules.
317 * configure.ac: On LynxOS, link with -lnetinet.
318 * configure.srv: Add handling of powerpc-*-lynxos* targets.
319 * configure: regenerate.
321 2010-09-01 Joel Brobecker <brobecker@adacore.com>
323 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
324 * configure.ac: Add check for vasprintf and vsnprintf.
325 * configure, config.in: Regenerate.
326 * server.h (vasprintf, vsnprintf): Add conditional declarations.
328 2010-09-01 Joel Brobecker <brobecker@adacore.com>
330 * gdbreplay.c: Move include of alloca.h up, next to include of
332 * server.h: Add include of malloc.h.
333 * mem-break.c: Remove include of malloc.h.
334 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
336 2010-09-01 Joel Brobecker <brobecker@adacore.com>
338 * Makefile.in (memmem.o): Build with -Wno-error.
340 2010-09-01 Joel Brobecker <brobecker@adacore.com>
342 * utils.c (xsnprintf): Make non-static.
343 * server.h: Add xsnprintf declaration.
344 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
345 replace calls to snprintf by calls to xsnprintf throughout.
347 2010-09-01 Joel Brobecker <brobecker@adacore.com>
349 * configure.ac: Add configure check for alloca.
350 * configure, config.in: Regenerate.
351 * server.h: Include alloca.h if it exists.
352 * gdbreplay.c: Include alloca.h if it exists.
354 2010-08-28 Pedro Alves <pedro@codesourcery.com>
356 * linux-low.c (__SIGRTMIN): Define if not already defined.
357 (linux_create_inferior): Check for __ANDROID__ rather than
359 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
360 are already deferred.
361 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
362 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
363 stopped and already has a pending signal to report.
364 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
365 a pending signal to report or is moving out of a jump pad.
366 (linux_init_signals): Check for __ANDROID__ rather than
369 2010-08-28 Pedro Alves <pedro@codesourcery.com>
371 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
372 debug_threads check. Avoid a linear search when not doing debug
375 2010-08-27 Pedro Alves <pedro@codesourcery.com>
377 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
378 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
379 (struct file_handler) <fd>: Change type to gdb_fildes_t.
380 (process_event): Change local fd's type to gdb_fildes_t.
381 (create_file_handler): Adjust prototype.
382 (delete_file_handler): Adjust prototype.
383 (handle_file_event): Adjust prototype. Use pfildes.
384 (create_file_event): Adjsut prototype.
385 * remote-utils.c (remote_desc, listen_desc): Change type to
387 * server.h: New gdb_fildes_t typedef.
388 [USE_WIN32API]: Include winsock2.h.
389 (delete_file_handler, add_file_handler): Adjust prototypes.
391 * utils.c (pfildes): New.
393 2010-08-27 Pedro Alves <pedro@codesourcery.com>
395 * configure.ac (build_warnings): Add -Wno-char-subscripts.
396 * configure: Regenerate.
398 2010-08-27 Pedro Alves <pedro@codesourcery.com>
400 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
401 (linux_done_accessing_memory): ... this.
402 (linux_target_ops): Adjust.
403 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
404 * nto-low.c (nto_target_ops): Adjust comment.
405 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
406 * spu-low.c (spu_target_ops): Adjust comment.
407 * target.h (target_ops): Rename unprepare_to_access_memory field
408 to done_accessing_memory.
409 (unprepare_to_access_memory): Rename to ...
410 (done_accessing_memory): ... this.
412 2010-08-26 Pedro Alves <pedro@codesourcery.com>
414 * linux-low.c (linux_prepare_to_access_memory): New.
415 (linux_unprepare_to_access_memory): New.
416 (linux_target_ops): Install them.
417 * server.c (read_memory): Rename to ...
418 (gdb_read_memory): ... this. Use
419 prepare_to_access_memory/prepare_to_access_memory.
420 (write_memory): Rename to ...
421 (gdb_write_memory): ... this. Use
422 prepare_to_access_memory/prepare_to_access_memory.
423 (handle_search_memory_1): Adjust.
424 (process_serial_event): Adjust.
425 * target.h (struct target_ops): New fields
426 prepare_to_access_memory and unprepare_to_access_memory.
427 (prepare_to_access_memory, unprepare_to_access_memory): New.
428 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
429 prepare_to_access_memory/prepare_to_access_memory.
430 * nto-low.c (nto_target_ops): Adjust.
431 * spu-low.c (spu_target_ops): Adjust.
432 * win32-low.c (win32_target_ops): Adjust.
434 2010-08-26 Pedro Alves <pedro@codesourcery.com>
436 * Makefile.in (WARN_CFLAGS): Get it from configure.
437 (WERROR_CFLAGS): New.
438 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
439 * configure.ac: Introduce --enable-werror, which adds -Werror to
440 the compiler command line. Enabled by default. Disable with
441 --disable-werror. Add -Wdeclaration-after-statement
442 Wpointer-arith and -Wformat-nonliteral to warning flags.
443 * configure: Regenerate.
445 2010-08-26 Pedro Alves <pedro@codesourcery.com>
447 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
449 2010-08-26 Pedro Alves <pedro@codesourcery.com>
451 * gdbreplay.c (remote_error): New.
453 (expect): Use gdbchar. Check for error reading from GDB.
454 Clarify sync error output.
455 (play): Check for errors writing to GDB.
456 * linux-low.c (sigchld_handler): Really ignore `write' errors.
457 * remote-utils.c (getpkt): Check for errors writing to the remote
460 2010-08-25 Pedro Alves <pedro@codesourcery.com>
462 * linux-low.c (linux_wait_1): Move non-debugging code out of
463 `debug_threads' control.
465 2010-08-25 Pedro Alves <pedro@codesourcery.com>
467 * linux-low.c (linux_wait_1): Don't set last_status here.
468 * server.c (push_event, queue_stop_reply_callback): Assert we're
469 not pushing a TARGET_WAITKIND_IGNORE event.
470 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
471 (myresume, handle_target_event): Set the thread's last_resume_kind
472 and last_status from the target returned status.
474 2010-08-25 Pedro Alves <pedro@codesourcery.com>
478 * linux-x86-low.c (update_debug_registers_callback): New.
479 (i386_dr_low_set_addr): Use it.
480 (i386_dr_low_get_addr): New.
481 (i386_dr_low_set_control): Use update_debug_registers_callback.
482 (i386_dr_low_get_control): New.
483 (i386_dr_low_get_status): Adjust.
484 * linux-low.c (linux_stop_lwp): New.
485 * linux-low.h (linux_stop_lwp): Declare.
487 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
488 argument instead of a i386_debug_reg_state.
489 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
490 a i386_debug_reg_state.
491 (i386_insert_aligned_watchpoint): Adjust.
492 (i386_remove_aligned_watchpoint): Adjust.
493 (i386_low_stopped_data_address): Read the debug registers from the
494 inferior instead of from the mirrors.
495 * i386-low.h (struct i386_debug_reg_state): Extend comment.
496 (i386_dr_low_get_addr): Declare.
497 (i386_dr_low_get_control): Declare.
498 (i386_dr_low_get_status): Change prototype.
500 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
501 (i386_dr_low_get_addr): New.
502 (i386_dr_low_get_control): New.
503 (i386_dr_low_get_status): Adjust prototype. Return
505 (i386_initial_stuff): Clear dr_status_mirror and
507 (i386_get_thread_context): Adjust.
508 (i386_set_thread_context): Adjust.
509 (i386_thread_added): Adjust.
511 2010-08-24 Pedro Alves <pedro@codesourcery.com>
513 * linux-low.h (linux_thread_area): Delete declaration.
515 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
517 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
518 after its termination.
520 2010-08-09 Pedro Alves <pedro@codesourcery.com>
522 * linux-low.c (gdb_wants_lwp_stopped): Delete.
523 (gdb_wants_all_stopped): Delete.
524 (linux_wait_1): Don't call them.
525 * server.c (handle_v_cont): Tag all threads as want-stopped.
526 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
527 stopped as "client-wants-stopped".
529 2010-07-31 Pedro Alves <pedro@codesourcery.com>
531 * Makefile.in (signals_h): New.
532 (server_h): Depend on it.
533 (server.o): Don't depend on $(signals_def).
534 (signals.o): Depend on $(signals_def).
536 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
538 * Makefile.in (signals_def): New.
539 (server_h): Append include/gdb/signals.h and signals_def.
540 (server.o): Append signals_def.
542 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
544 * server.c (handle_target_event): Use target_signal_to_host for
545 resume_info.sig initialization.
546 * target.h (struct thread_resume) <sig>: New comment.
548 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
550 * server.c (handle_query): strcpy() the returned string from paddress()
551 instead of sprintf().
552 * utils.c (paddress): Return phex_nz().
554 2010-07-07 Joel Brobecker <brobecker@adacore.com>
556 * server.c (handle_v_cont): Call mourn_inferior if process
558 (myresume): Likewise.
560 2010-07-01 Pedro Alves <pedro@codesourcery.com>
562 Static tracepoints, and integration with UST.
564 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
565 * mem-break.c (uninsert_all_breakpoints)
566 (reinsert_all_breakpoints): New.
567 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
568 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
569 (gdb_agent_ust_loaded, helper_thread_id)
570 (gdb_agent_helper_thread_id): New macros.
571 (struct ipa_sym_addresses): Add addr_ust_loaded,
572 addr_helper_thread_id, addr_cmd_buf.
573 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
574 (in_process_agent_loaded_ust): New.
575 (write_e_ust_not_loaded): New.
576 (maybe_write_ipa_ust_not_loaded): New.
577 (struct collect_static_trace_data_action): New.
578 (enum tracepoint_type) <static_tracepoint>: New.
579 (struct tracepoint) <handle>: Mention static tracepoints.
580 (struct static_tracepoint_ctx): New.
582 (add_tracepoint_action): Handle static tracepoint actions.
583 (unprobe_marker_at): New.
584 (clear_installed_tracepoints): Handle static tracepoints.
585 (cmd_qtdp): Handle static tracepoints.
586 (probe_marker_at): New.
587 (cmd_qtstart): Handle static tracepoints.
588 (response_tracepoint): Handle static tracepoints.
589 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
590 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
591 (get_context_regcache): Handle static tracepoints.
592 (do_action_at_tracepoint): Handle static tracepoint actions.
593 (traceframe_find_block_type): Handle static trace data blocks.
594 (traceframe_read_sdata): New.
595 (download_tracepoints): Download static tracepoint actions.
596 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
597 (GDB_PROBE_NAME): New.
602 (ust_marker_to_static_tracepoint): New.
604 (collect_ust_data_at_tracepoint): New.
605 (gdb_ust_probe): New.
606 (UNIX_PATH_MAX, SOCK_DIR): New.
607 (gdb_ust_connect_sync_socket): New.
608 (resume_thread, stop_thread): New.
609 (run_inferior_command): New.
610 (init_named_socket): New.
611 (gdb_ust_socket_init): New.
612 (cstr_to_hexstr): New.
614 (first_marker, next_marker): New.
615 (response_ust_marker): New.
616 (cmd_qtfstm, cmd_qtsstm): New.
617 (unprobe_marker_at, probe_marker_at): New.
618 (cmd_qtstmat, gdb_ust_thread): New.
620 (initialize_tracepoint_ftlib): Call gdb_ust_init.
621 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
623 (x86_64_st_collect_regmap): New.
624 (X86_64_NUM_ST_COLLECT_GREGS): New.
625 (AMD64_RIP_REGNUM): New.
626 (supply_static_tracepoint_registers): New.
627 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
629 (i386_st_collect_regmap): New.
630 (i386_NUM_ST_COLLECT_GREGS): New.
631 (supply_static_tracepoint_registers): New.
632 * server.c (handle_query): Handle qXfer:statictrace:read.
633 <qSupported>: Report support for StaticTracepoints, and
634 qXfer:statictrace:read features.
635 * server.h (traceframe_read_sdata)
636 (supply_static_tracepoint_registers): Declare.
637 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
638 (unpack_varlen_hex): Include in IPA build.
639 * Makefile.in (ustlibs, ustinc): New.
640 (IPA_OBJS): Add remote-utils-ipa.o.
641 ($(IPA_LIB)): Link -ldl and -lpthread.
643 (IPAGENT_CFLAGS): Add UST_CFLAGS.
644 * config.in, configure: Regenerate.
646 2010-06-20 Ian Lance Taylor <iant@google.com>
647 Pedro Alves <pedro@codesourcery.com>
649 * linux-x86-low.c (always_true): Delete.
650 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
651 trying to fool the compiler with always_true.
653 2010-06-20 Pedro Alves <pedro@codesourcery.com>
655 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
656 conditions in gdbserver.
658 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
660 * spu-low.c (spu_read_memory): Wrap around local store limit.
661 (spu_write_memory): Likewise.
663 2010-06-15 Pedro Alves <pedro@codesourcery.com>
665 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
666 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
668 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
670 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
671 uses with LONGEST uses.
673 2010-06-14 Stan Shebs <stan@codesourcery.com>
674 Pedro Alves <pedro@codesourcery.com>
678 * linux-x86-low.c: Include limits.h.
683 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
684 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
685 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
686 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
687 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
688 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
689 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
690 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
691 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
692 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
693 (amd64_emit_void_call_2): New.
694 (amd64_emit_ops): New.
695 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
696 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
697 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
698 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
699 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
700 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
701 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
702 (i386_emit_call, i386_emit_reg, i386_emit_pop)
703 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
704 (i386_emit_stack_adjust, i386_emit_int_call_1)
705 (i386_emit_void_call_2): New.
706 (i386_emit_ops): New.
708 (the_low_target): Install x86_emit_ops.
709 * server.h (struct emit_ops): New.
710 (get_raw_reg_func_addr): Declare.
711 (current_insn_ptr, emit_error): Declare.
712 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
713 (set_trace_state_variable_value): New defines.
714 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
715 addr_get_trace_state_variable_value and
716 addr_set_trace_state_variable_value.
717 (symbol_list): New fields for get_raw_reg,
718 get_trace_state_variable_value and set_trace_state_variable_value.
719 (condfn): New typedef.
720 (struct tracepoint): New field `compiled_cond'.
721 (do_action_at_tracepoint): Clear compiled_cond.
722 (get_trace_state_variable_value, set_trace_state_variable_value):
724 (condition_true_at_tracepoint): If there's a compiled condition,
726 (current_insn_ptr, emit_error): New globals.
727 (struct bytecode_address): New.
728 (get_raw_reg_func_addr): New.
729 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
730 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
731 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
732 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
733 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
734 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
735 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
736 (compile_tracepoint_condition, compile_bytecodes): New.
737 * target.h (emit_ops): Forward declare.
738 (struct target_ops): New field emit_ops.
739 (target_emit_ops): New.
740 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
741 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
742 * linux-low.c (linux_emit_ops): New.
743 (linux_target_ops): Install it.
744 * linux-low.h (struct linux_target_ops): New field emit_ops.
746 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
748 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
749 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
751 2010-06-01 Pedro Alves <pedro@codesourcery.com>
752 Stan Shebs <stan@codesourcery.com>
754 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
755 (all): Depend on $(extra_libraries).
756 (install-only): Install the IPA.
757 (IPA_OBJS, IPA_LIB): New.
758 (clean): Remove the IPA lib.
759 (IPAGENT_CFLAGS): New.
760 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
761 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
762 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
763 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
764 * configure.ac: Check for atomic builtins support in the compiler.
765 (IPA_DEPFILES, extra_libraries): Define.
766 * configure.srv (ipa_obj): Add description.
767 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
768 (i[34567]86-*-linux*): Set ipa_obj.
769 (x86_64-*-linux*): Set ipa_obj.
770 * linux-low.c (stabilizing_threads): New.
771 (supports_fast_tracepoints): New.
772 (linux_detach): Stabilize threads before detaching.
773 (handle_tracepoints): Handle internal tracing breakpoints. Assert
774 the lwp is either not stabilizing, or is moving out of a jump pad.
775 (linux_fast_tracepoint_collecting): New.
776 (maybe_move_out_of_jump_pad): New.
777 (enqueue_one_deferred_signal): New.
778 (dequeue_one_deferred_signal): New.
779 (linux_wait_for_event_1): If moving out of a jump pad, defer
780 pending signals to later.
781 (linux_stabilize_threads): New.
782 (linux_wait_1): Check if threads need moving out of jump pads, and
784 (stuck_in_jump_pad_callback): New.
785 (move_out_of_jump_pad_callback): New.
787 (linux_resume_one_lwp): Handle moving out of jump pads.
788 (linux_set_resume_request): Dequeue deferred signals.
789 (need_step_over_p): Also step over fast tracepoint jumps.
790 (start_step_over): Also uninsert fast tracepoint jumps.
791 (finish_step_over): Also reinsert fast tracepoint jumps.
792 (linux_install_fast_tracepoint_jump): New.
793 (linux_target_ops): Install linux_stabilize_threads and
794 linux_install_fast_tracepoint_jump_pad.
795 * linux-low.h (linux_target_ops) <get_thread_area,
796 install_fast_tracepoint_jump_pad>: New fields.
797 (struct lwp_info) <collecting_fast_tracepoint,
798 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
799 (linux_get_thread_area): Declare.
800 * linux-x86-low.c (jump_insn): New.
801 (x86_get_thread_area): New.
804 (amd64_install_fast_tracepoint_jump_pad): New.
805 (i386_install_fast_tracepoint_jump_pad): New.
806 (x86_install_fast_tracepoint_jump_pad): New.
807 (the_low_target): Install x86_get_thread_area and
808 x86_install_fast_tracepoint_jump_pad.
809 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
810 (struct fast_tracepoint_jump): New.
811 (fast_tracepoint_jump_insn): New.
812 (fast_tracepoint_jump_shadow): New.
813 (find_fast_tracepoint_jump_at): New.
814 (fast_tracepoint_jump_here): New.
815 (delete_fast_tracepoint_jump): New.
816 (set_fast_tracepoint_jump): New.
817 (uninsert_fast_tracepoint_jumps_at): New.
818 (reinsert_fast_tracepoint_jumps_at): New.
819 (set_breakpoint_at): Use write_inferior_memory.
820 (uninsert_raw_breakpoint): Use write_inferior_memory.
821 (check_mem_read): Mask out fast tracepoint jumps.
822 (check_mem_write): Mask out fast tracepoint jumps.
823 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
824 (set_fast_tracepoint_jump): Declare.
825 (delete_fast_tracepoint_jump)
826 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
827 (reinsert_fast_tracepoint_jumps_at): Declare.
828 * regcache.c: Don't compile many functions when building the
829 in-process agent library.
830 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
831 the register buffer in the heap.
832 (free_register_cache): If the register buffer isn't owned by the
833 regcache, don't free it.
834 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
835 pre-existing register caches.
836 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
838 (convert_ascii_to_int): : Constify `from' parameter type.
839 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
840 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
841 the needed buffer in-place.
842 (relocate_instruction): New.
843 * server.c (handle_query) <qSymbols>: If the target supports
844 tracepoints, give it a chance of looking up symbols. Report
845 support for fast tracepoints.
846 (handle_status): Stabilize threads.
847 (process_serial_event): Adjust.
848 * server.h (struct fast_tracepoint_jump): Forward declare.
849 (struct process_info) <fast_tracepoint_jumps>: New field.
850 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
851 (decode_X_packet, decode_M_packet): Adjust.
852 (relocate_instruction): Declare.
853 (in_process_agent_loaded): Declare.
854 (tracepoint_look_up_symbols): Declare.
855 (struct fast_tpoint_collect_status): Declare.
856 (fast_tracepoint_collecting): Declare.
857 (force_unlock_trace_buffer): Declare.
858 (handle_tracepoint_bkpts): Declare.
859 (initialize_low_tracepoint)
860 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
861 * target.h (struct target_ops) <stabilize_threads,
862 install_fast_tracepoint_jump_pad>: New fields.
863 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
864 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
865 [HAVE_STDINT_H]: Include stdint.h.
866 (trace_debug_1): Rename to ...
867 (trace_vdebug): ... this.
868 (trace_debug): Rename to ...
869 (trace_debug_1): ... this. Add `level' parameter.
871 (ATTR_USED, ATTR_NOINLINE): New.
872 (IP_AGENT_EXPORT): New.
873 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
874 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
875 (about_to_request_buffer_space, trace_buffer_is_full)
876 (stopping_tracepoint, expr_eval_result, error_tracepoint)
877 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
878 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
879 (traceframe_write_count, traceframes_created)
880 (trace_state_variables)
881 New renaming defines.
882 (struct ipa_sym_addresses): New.
883 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
885 (ipa_sym_addrs): New.
886 (all_tracepoint_symbols_looked_up): New.
887 (in_process_agent_loaded): New.
888 (write_e_ipa_not_loaded): New.
889 (maybe_write_ipa_not_loaded): New.
890 (tracepoint_look_up_symbols): New.
891 (debug_threads) [IN_PROCESS_AGENT]: New.
892 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
893 (UNKNOWN_SIDE_EFFECTS): New.
895 (flush_trace_buffer): New.
896 (stop_tracing_bkpt): New.
897 (flush_trace_buffer_bkpt): New.
898 (read_inferior_integer): New.
899 (read_inferior_uinteger): New.
900 (read_inferior_data_pointer): New.
901 (write_inferior_data_pointer): New.
902 (write_inferior_integer): New.
903 (write_inferior_uinteger): New.
904 (struct collect_static_trace_data_action): Delete.
905 (enum tracepoint_type): New.
906 (struct tracepoint) <type>: New field `type'.
907 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
908 <orig_size, obj_addr_on_target, adjusted_insn_addr>
909 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
910 (tracepoints): Use IP_AGENT_EXPORT.
911 (last_tracepoint): Don't include in the IPA.
912 (stopping_tracepoint): Use IP_AGENT_EXPORT.
913 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
914 (alloced_trace_state_variables): New.
915 (trace_state_variables): Use IP_AGENT_EXPORT.
916 (traceframe_t): Delete unused variable.
917 (circular_trace_buffer): Don't include in the IPA.
918 (trace_buffer_start): Delete.
919 (struct trace_buffer_control): New.
920 (trace_buffer_free): Delete.
921 (struct ipa_trace_buffer_control): New.
922 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
923 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
925 (trace_buffer_ctrl): New.
926 (TRACE_BUFFER_CTRL_CURR): New.
927 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
928 Reimplement as macros.
929 (trace_buffer_wrap): Delete.
930 (traceframe_write_count, traceframe_read_count)
931 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
932 (struct tracepoint_hit_ctx) <type>: New field.
933 (struct fast_tracepoint_ctx): New.
934 (memory_barrier): New.
936 (record_tracepoint_error): Update atomically in the IPA.
937 (clear_inferior_trace_buffer): New.
938 (about_to_request_buffer_space): New.
939 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
940 updating the same buffer.
941 (add_tracepoint): Default the tracepoint's type to trap
942 tracepoint, and orig_size to -1.
943 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
945 (create_trace_state_variable): New parameter `gdb'. Handle it.
946 (clear_installed_tracepoints): Clear fast tracepoint jumps.
947 (cmd_qtdp): Handle fast tracepoints.
949 (max_jump_pad_size): New.
950 (gdb_jump_pad_head): New.
951 (get_jump_space_head): New.
952 (claim_jump_space): New.
953 (sort_tracepoints): New.
954 (MAX_JUMP_SIZE): New.
955 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
957 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
958 support. Upload fast traceframes, and delete internal IPA
960 (stop_tracing_handler): New.
961 (flush_trace_buffer_handler): New.
962 (cmd_qtstop): Upload fast tracepoints.
963 (response_tracepoint): Handle fast tracepoints.
964 (tracepoint_finished_step): Upload fast traceframes. Set the
965 tracepoint hit context's tracepoint type.
966 (handle_tracepoint_bkpts): New.
967 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
968 type. Add comment about fast tracepoints.
969 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
970 non-existing action_str field.
971 (get_context_regcache): Handle fast tracepoints.
972 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
974 (fast_tracepoint_from_jump_pad_address): New.
975 (fast_tracepoint_from_ipa_tpoint_address): New.
977 (force_unlock_trace_buffer): New.
978 (fast_tracepoint_collecting): New.
981 (write_inferior_data_ptr): New.
982 (target_tp_heap): New.
983 (target_malloc): New.
984 (download_agent_expr): New.
986 (download_tracepoints): New.
987 (download_trace_state_variables): New.
988 (upload_fast_traceframes): New.
989 (IPA_FIRST_TRACEFRAME): New.
990 (IPA_NEXT_TRACEFRAME_1): New.
991 (IPA_NEXT_TRACEFRAME): New.
992 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
993 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
994 (gdb_jump_pad_buffer_end): New.
995 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
996 (initialize_tracepoint): Adjust.
997 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
998 buffer. Initialize the low module.
999 * utils.c (PREFIX, TOOLNAME): New.
1000 (malloc_failure): Use PREFIX.
1001 (error): In the IPA, an error causes an exit.
1002 (fatal, warning): Use PREFIX.
1003 (internal_error): Use TOOLNAME.
1004 (NUMCELLS): Increase to 10.
1005 * configure, config.in: Regenerate.
1007 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1009 * server.c (handle_query) <qSupported>: Do two passes over the
1010 qSupported string to avoid nesting strtok.
1012 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1014 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1016 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1018 * configure: Regenerate.
1019 * proc-service.list: New.
1021 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1023 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1026 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1028 * gdbreplay.c (remote_open): Check error return from socket() call by
1029 its equality to -1 not by it being negative.
1030 * remote-utils.c (remote_open): Likewise.
1032 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1034 * config.h: Regenerate.
1036 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1038 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1039 doesn't provide PTRACE_GET_THREAD_AREA.
1041 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1043 * linux-m68k-low.c: Include <asm/ptrace.h>
1044 (ps_get_thread_area): Implement.
1046 2010-05-03 Doug Evans <dje@google.com>
1048 * event-loop.c (struct callback_event): New struct.
1049 (callback_list): New global.
1050 (append_callback_event, delete_callback_event): New functions.
1051 (process_callback): New function.
1052 (start_event_loop): Call it.
1053 * remote-utils.c (NOT_SCHEDULED): Define.
1054 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1055 moved out of readchar.
1056 (readchar): Rewrite. Call reschedule before returning.
1057 (reset_readchar): New function.
1058 (remote_close): Call it.
1059 (process_remaining, reschedule): New functions.
1060 * server.h (callback_handler_func): New typedef.
1061 (append_callback_event, delete_callback_event): Declare.
1063 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1065 * proc-service.c (ps_pglobal_lookup): Use
1066 thread_db_look_up_one_symbol.
1067 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1068 parameter. Use it instead of all_symbols_looked_up.
1069 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1071 (all_symbols_looked_up): Don't declare.
1072 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1073 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1075 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1076 Set all_symbols_looked_up here.
1077 (thread_db_look_up_one_symbol): New.
1078 (thread_db_get_tls_address): Adjust.
1079 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1080 thread_db object on the heap, and tentatively set it in the
1082 (thread_db_init): Don't set all_symbols_looked_up here.
1083 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1085 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1087 * linux-low.c (linux_kill, linux_detach): Adjust.
1088 (status_pending_p_callback): Remove redundant statement. Check
1089 for !TARGET_WAITIKIND_IGNORE, instead of
1090 TARGET_WAITKIND_STOPPED.
1091 (handle_tracepoints): Make sure LWP is locked. Adjust.
1092 (linux_wait_for_event_1): Adjust.
1093 (linux_cancel_breakpoints): New.
1094 (unsuspend_one_lwp): New.
1095 (unsuspend_all_lwps): New.
1096 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1097 (send_sigstop_callback): Change return type to int, add new
1098 `except' parameter and handle it.
1099 (suspend_and_send_sigstop_callback): New.
1100 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1101 pass them down. If SUSPEND, also increment the lwp's suspend
1103 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1104 (need_step_over_p): Don't consider suspended LWPs.
1105 (start_step_over): Adjust.
1106 (proceed_one_lwp): Change return type to int, add new `except'
1107 parameter and handle it.
1108 (unsuspend_and_proceed_one_lwp): New.
1109 (proceed_all_lwps): Use find_inferior instead of
1111 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1112 also decrement the suspend count of LWPs. Pass `except' down,
1113 instead of hacking its suspend count.
1114 (linux_pause_all): Add `freeze' parameter. Adjust.
1115 (linux_unpause_all): New.
1116 (linux_target_ops): Install linux_unpause_all.
1117 * server.c (handle_status): Adjust.
1118 * target.h (struct target_ops): New fields `unpause_all' and
1119 `cancel_breakpoints'. Add new parameter to `pause_all'.
1120 (pause_all): Add new `freeze' parameter.
1122 (cancel_breakpoints): New.
1123 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1125 (cmd_qtstart): Pause threads.
1126 (stop_tracing): Pause threads, and cancel breakpoints.
1127 * win32-low.c (win32_target_ops): Adjust.
1129 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1131 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1132 the inferior right away from here...
1133 (linux_wait_1): ... to here, and adjust to check the thread's
1134 last_resume_kind instead of the lwp's step or stop_expected flags.
1136 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1138 * README: Use consistent `GDB' and `GDBserver' spellings.
1140 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1142 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1143 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1144 (linux_detach_one_lwp): Assume the lwp is stopped.
1145 (any_thread_of): Delete.
1146 (linux_detach): Stop all lwps here. Don't blindly delete all
1148 (delete_lwp_callback): New.
1149 (linux_mourn): Delete all lwps of the process that is gone.
1150 (linux_wait_1): Don't delete the last lwp of the process here.
1151 * mem-break.h (mark_breakpoints_out): Declare.
1152 * mem-break.c (mark_breakpoints_out): New.
1153 (free_all_breakpoints): Use it.
1154 * server.c (handle_target_event): If the process is gone, mark
1156 * thread-db.c (struct thread_db) <create_bp>: New field.
1157 (thread_db_enable_reporting): Fix prototype. Store a thread event
1158 breakpoint reference in the thread_db struct.
1159 (thread_db_load_search): Clear the thread_db object.
1160 (try_thread_db_load_1): Ditto.
1161 (switch_to_process): New.
1162 (disable_thread_event_reporting): Use it.
1163 (remove_thread_event_breakpoints): New.
1164 (thread_db_detach, thread_db_mourn): Use it.
1166 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1168 * linux-low.c (linux_enable_event_reporting): New.
1169 (linux_wait_for_event_1, handle_extended_wait): Use it.
1171 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1173 * linux-low.c (linux_kill_one_lwp, linux_kill)
1174 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1175 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1176 SIGSTOP even if the LWP is stopped.
1177 (send_sigstop_callback): New.
1178 (stop_all_lwps): Use send_sigstop_callback instead.
1179 (linux_resume_one_thread): Adjust.
1180 (proceed_one_lwp): Still proceed an LWP that the client has
1181 requested to stop, if we haven't reported it as stopped yet. Make
1182 sure that LWPs the client want stopped, have a pending SIGSTOP.
1184 2010-04-26 Doug Evans <dje@google.com>
1186 * server.c (handle_general_set): Make static.
1188 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1189 Print received char after testing for error/eof instead of before.
1190 (input_interrupt): Tweak comment.
1192 2010-04-23 Doug Evans <dje@google.com>
1194 * server.c (start_inferior): Print inferior argv if --debug.
1196 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1198 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1199 * nto-x86-low.c: Include server.h
1201 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1203 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1204 be consistent with other sources of this directory.
1205 (init_registers_amd64): Correct name of source file of this function
1208 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1210 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1213 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1215 * win32-i386-low.c: Add 64-bit support.
1216 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1217 (init_registers_amd64): Declare.
1218 (mappings): Add 64-bit version of array.
1219 (init_windows_x86): New function.
1220 (the_low_target): Change init_arch field to init_windows_x86.
1222 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1224 * win32-low.c: Adapt to support also 64-bit architecture.
1225 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1226 (get_image_name): Use SIZE_T type for local variable `done'.
1227 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1228 (toolhelp_get_dll_name): Idem.
1229 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1230 Use uintptr_t typecast to avoid warning.
1231 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1232 (handle_exception): Use phex_nz to avoid warning.
1233 (win32_wait): Remove unused local variable `process'.
1235 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1237 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1240 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1242 * configure.ac: Use `ws2_32' library for srv_mingw.
1243 * configure: Regenerate.
1244 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1245 * remote-utils.c: Likewise.
1247 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1249 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1250 if __x86_64__ is defined.
1252 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1254 * configure: Regenerate.
1256 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1258 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1259 * target.h (target_ops): New get_tib_address field.
1260 * win32-low.h (win32_thread_info): Add thread_local_base field.
1261 * win32-low.c (child_add_thread): Add tlb argument.
1262 Set thread_local_base field to TLB.
1263 (get_child_debug_event): Adapt to child_add_thread change.
1264 (win32_get_tib_address): New function.
1265 (win32_target_ops): Set get_tib_address field to
1266 win32_get_tib_address.
1267 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1269 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1271 * linux-low.c (linux_mourn): Also remove the process.
1272 * server.c (handle_target_event): Don't remove the process here.
1273 * nto-low.c (nto_mourn): New.
1274 (nto_target_ops): Install it.
1275 * spu-low.c (spu_mourn): New.
1276 (spu_target_ops): Install it.
1277 * win32-low.c (win32_mourn): New.
1278 (win32_target_ops): Install it.
1280 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1282 * server.h (buffer_xml_printf): Remove redundant `;'.
1284 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1286 * regcache.c (set_register_cache): Invalidate regcaches before
1287 changing the register cache layout.
1288 (regcache_invalidate_one): Allow a NULL regcache.
1289 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1290 regcaches before changing the register cache layout or the target
1293 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1295 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1296 variable warning on Linux/x86-64.
1298 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1300 GDBserver disconnected tracing support.
1302 * linux-low.c (linux_remove_process): Delete.
1303 (add_lwp): Don't set last_resume_kind here.
1304 (linux_kill): Use `mourn'.
1305 (linux_detach): Use `thread_db_detach', and `mourn'.
1307 (linux_attach_lwp_1): Adjust comment.
1308 (linux_attach): last_resume_kind moved the thread_info; adjust.
1309 (status_pending_p_callback): Adjust.
1310 (linux_wait_for_event_1): Adjust.
1311 (count_events_callback, select_singlestep_lwp_callback)
1312 (select_event_lwp_callback, cancel_breakpoints_callback)
1313 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1314 (proceed_one_lwp): Adjust.
1315 (linux_async): Add debug output.
1316 (linux_thread_stopped): New.
1317 (linux_pause_all): New.
1318 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1320 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1321 (thread_db_free): Delete declaration.
1322 (thread_db_detach, thread_db_mourn): Declare.
1323 * thread-db.c (thread_db_init): Use thread_db_mourn.
1324 (thread_db_free): Delete, split in two.
1325 (disable_thread_event_reporting): New.
1326 (thread_db_detach): New.
1327 (thread_db_mourn): New.
1329 * server.h (struct thread_info) <last_resume_kind>: New field.
1330 <attached>: Add comment.
1331 <gdb_detached>: New field.
1332 (handler_func): Change return type to int.
1333 (handle_serial_event, handle_target_event): Ditto.
1334 (gdb_connected): Declare.
1336 (disconnected_tracing): Declare.
1337 (stop_tracing): Declare.
1339 * server.c (handle_query) <qSupported>: Report support for
1340 disconnected tracing.
1341 (queue_stop_reply_callback): Account for running threads.
1342 (gdb_wants_thread_stopped): New.
1343 (gdb_wants_all_threads_stopped): New.
1344 (gdb_reattached_process): New.
1345 (handle_status): Clear the `gdb_detached' flag of all processes.
1346 In all-stop, stop all threads.
1347 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1348 (process_serial_event): If the remote connection breaks, or if an
1349 exit was forced with "monitor exit", force an event loop exit.
1350 Handle disconnected tracing on detach.
1351 (handle_serial_event): Adjust.
1352 (handle_target_event): If GDB isn't connected, forward events back
1353 to the inferior, unless the last process exited, in which case,
1354 exit gdbserver. Adjust interface.
1356 * remote-utils.c (remote_open): Don't block in accept. Instead
1357 register an event loop source on the listen socket file
1358 descriptor. Refactor bits into ...
1359 (listen_desc): ... this new global.
1360 (gdb_connected): ... this new function.
1361 (enable_async_notification): ... this new function.
1362 (handle_accept_event): ... this new function.
1363 (remote_close): Clear remote_desc.
1365 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1367 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1369 (mourn_inferior): Define.
1370 (target_process_qsupported): Avoid the dangling else problem.
1371 (thread_stopped): Define.
1372 (pause_all): Define.
1373 (target_waitstatus_to_string): Declare.
1374 * target.c (target_waitstatus_to_string): New.
1376 * tracepoint.c (tracing): Make extern.
1377 (disconnected_tracing): New.
1378 (stop_tracing): Make extern. Handle tracing stops due to GDB
1380 (cmd_qtdisconnected): New.
1381 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1382 (handle_tracepoint_general_set): Handle QTDisconnected.
1384 * event-loop.c (event_handler_func): Change return type to int.
1385 (process_event): Bail out if the event handler wants the event
1387 (handle_file_event): Ditto.
1388 (start_event_loop): Bail out if the event handler wants the event
1391 * nto-low.c (nto_target_ops): Adjust.
1392 * spu-low.c (spu_wait): Don't remove the process here.
1393 (spu_target_ops): Adjust.
1394 * win32-low.c (win32_wait): Don't remove the process here.
1395 (win32_target_ops): Adjust.
1397 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1399 * regcache.c (realloc_register_cache): Invalidate inferior's
1400 regcache before recreating it.
1402 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1404 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1406 2010-04-09 Stan Shebs <stan@codesourcery.com>
1407 Pedro Alves <pedro@codesourcery.com>
1409 * server.h (LONGEST): New.
1410 (struct thread_info) <while_stepping>: New field.
1411 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1413 (initialize_tracepoint, handle_tracepoint_general_set)
1414 (handle_tracepoint_query, tracepoint_finished_step)
1415 (tracepoint_was_hit, release_while_stepping_state_list):
1416 (current_traceframe): Declare.
1417 * server.c (handle_general_set): Handle tracepoint packets.
1419 (write_memory): New.
1420 (handle_search_memory_1): Use read_memory.
1421 (handle_query): Report support for conditional tracepoints, trace
1422 state variables, and tracepoint sources. Handle tracepoint
1424 (main): Initialize the tracepoints module.
1425 (process_serial_event): Handle traceframe reads/writes.
1427 * linux-low.c (handle_tracepoints): New.
1428 (linux_wait_1): Call it.
1429 (linux_resume_one_lwp): Handle while-stepping.
1430 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1431 (linux_target_ops): Install them.
1432 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1434 * linux-x86-low.c (x86_supports_tracepoints): New.
1435 (the_low_target). Install it.
1437 * mem-break.h (delete_breakpoint): Declare.
1438 * mem-break.c (delete_breakpoint): Make external.
1440 * target.h (struct target_ops): Add `supports_tracepoints',
1441 `read_pc', and `write_pc' fields.
1442 (target_supports_tracepoints): Define.
1443 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1446 * regcache.h (struct regcache) <registers_owned>: New field.
1447 (init_register_cache, regcache_cpy): Declare.
1448 (regcache_read_pc, regcache_write_pc): Declare.
1449 (register_cache_size): Declare.
1450 (supply_regblock): Declare.
1451 * regcache.c (init_register_cache): New.
1452 (new_register_cache): Use it.
1453 (regcache_cpy): New.
1454 (register_cache_size): New.
1455 (supply_regblock): New.
1456 (regcache_read_pc, regcache_write_pc): New.
1458 * tracepoint.c: New.
1460 * Makefile.in (OBS): Add tracepoint.o.
1461 (tracepoint.o): New rule.
1463 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1465 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1467 (i386-mmx.c): Likewise.
1468 (i386-mmx-linux.o): Likewise.
1469 (i386-mmx-linux.c): Likewise.
1471 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1472 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1473 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1474 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1476 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1477 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1478 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1480 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1482 * Makefile.in (clean): Updated.
1484 (i386-avx.c): Likewise.
1485 (i386-avx-linux.o): Likewise.
1486 (i386-avx-linux.c): Likewise.
1487 (amd64-avx.o): Likewise.
1488 (amd64-avx.c): Likewise.
1489 (amd64-avx-linux.o): Likewise.
1490 (amd64-avx-linux.c): Likewise.
1492 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1493 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1494 (srv_amd64_regobj): Add amd64-avx.o.
1495 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1496 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1497 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1498 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1499 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1500 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1501 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1503 * i387-fp.c: Include "i386-xstate.h".
1505 (i387_cache_to_xsave): Likewise.
1506 (i387_xsave_to_cache): Likewise.
1507 (x86_xcr0): Likewise.
1509 * i387-fp.h (i387_cache_to_xsave): Likewise.
1510 (i387_xsave_to_cache): Likewise.
1511 (x86_xcr0): Likewise.
1513 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1514 * linux-crisv32-low.c (target_regsets): Likewise.
1515 * linux-m68k-low.c (target_regsets): Likewise.
1516 * linux-mips-low.c (target_regsets): Likewise.
1517 * linux-ppc-low.c (target_regsets): Likewise.
1518 * linux-s390-low.c (target_regsets): Likewise.
1519 * linux-sh-low.c (target_regsets): Likewise.
1520 * linux-sparc-low.c (target_regsets): Likewise.
1521 * linux-xtensa-low.c (target_regsets): Likewise.
1523 * linux-low.c: Include <sys/uio.h>.
1524 (regsets_fetch_inferior_registers): Support nt_type.
1525 (regsets_store_inferior_registers): Likewise.
1526 (linux_process_qsupported): New.
1527 (linux_target_ops): Add linux_process_qsupported.
1529 * linux-low.h (regset_info): Add nt_type.
1530 (linux_target_ops): Add process_qsupported.
1532 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1534 (init_registers_i386_avx_linux): New.
1535 (init_registers_amd64_avx_linux): Likewise.
1536 (xmltarget_i386_linux_no_xml): Likewise.
1537 (xmltarget_amd64_linux_no_xml): Likewise.
1538 (PTRACE_GETREGSET): Likewise.
1539 (PTRACE_SETREGSET): Likewise.
1540 (x86_fill_xstateregset): Likewise.
1541 (x86_store_xstateregset): Likewise.
1542 (use_xml): Likewise.
1543 (x86_linux_update_xmltarget): Likewise.
1544 (x86_linux_process_qsupported): Likewise.
1545 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1546 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1547 init_registers_i386_linux here. Call
1548 x86_linux_update_xmltarget.
1549 (the_low_target): Add x86_linux_process_qsupported.
1551 * server.c (handle_query): Call target_process_qsupported.
1553 * target.h (target_ops): Add process_qsupported.
1554 (target_process_qsupported): New.
1556 2010-04-03 Pedro Alves <pedro@codesourcery.com>
1558 * inferiors.c (add_thread): Set last_status kind to
1559 TARGET_WAITKIND_IGNORE.
1560 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1561 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1562 (linux_wait_1): Move `thread' local definition to block that uses
1563 it. Don't NULL initialize `event_child'.
1564 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1565 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1566 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1568 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1570 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1571 an extended waitstatus, or by a watchpoint.
1572 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1573 thread was stepping or has been stopped by a watchpoint.
1575 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1577 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1578 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1579 of another, then delete the previous, and validate all
1581 (validate_inserted_breakpoint): New.
1582 (delete_disabled_breakpoints): New.
1583 (validate_breakpoints): New.
1584 (check_mem_read): Validate breakpoints before trusting their
1585 shadow. Delete disabled breakpoints.
1586 (check_mem_write): Validate breakpoints before trusting they
1587 should be inserted. Delete disabled breakpoints.
1588 * mem-break.h (validate_breakpoints):
1589 * server.c (handle_query): Validate breakpoints when we see a
1592 2010-04-01 Pedro Alves <pedro@codesourcery.com>
1594 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1595 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1596 if we could tell there's a GDB breakpoint at stop_pc.
1597 (need_step_over_p): Don't do a step over if we find a GDB
1598 breakpoint at the resume PC.
1600 * mem-break.c (struct raw_breakpoint): New.
1601 (enum bkpt_type): New type `gdb_breakpoint'.
1602 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1603 fields. New field `raw'.
1604 (find_raw_breakpoint_at): New.
1605 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1607 (set_breakpoint_at): Adjust.
1608 (delete_raw_breakpoint): New.
1609 (release_breakpoint): New.
1610 (delete_breakpoint): Rename to...
1611 (delete_breakpoint_1): ... this. Add proc parameter. Use
1612 release_breakpoint. Return ENOENT.
1613 (delete_breakpoint): Reimplement.
1614 (find_breakpoint_at): Delete.
1615 (find_gdb_breakpoint_at): New.
1616 (delete_breakpoint_at): Delete.
1617 (set_gdb_breakpoint_at): New.
1618 (delete_gdb_breakpoint_at): New.
1619 (gdb_breakpoint_here): New.
1620 (set_reinsert_breakpoint): Use release_breakpoint.
1621 (uninsert_breakpoint): Rename to ...
1622 (uninsert_raw_breakpoint): ... this.
1623 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1624 (reinsert_raw_breakpoint): Change parameter type to
1626 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1628 (check_breakpoints): Adjust. Use release_breakpoint.
1629 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1630 (breakpoint_inserted_here): Ditto.
1631 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1632 Don't trust the breakpoint's shadow if it is not inserted.
1633 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1634 (delete_all_breakpoints): Adjust.
1635 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1636 use delete_breakpoint_1.
1638 * mem-break.h (breakpoints_supported): Delete declaration.
1639 (set_gdb_breakpoint_at): Declare.
1640 (gdb_breakpoint_here): Declare.
1641 (delete_breakpoint_at): Delete.
1642 (delete_gdb_breakpoint_at): Declare.
1644 * server.h (struct raw_breakpoint): Forward declare.
1645 (struct process_info): New field `raw_breakpoints'.
1647 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1650 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1652 * linux-low.c (status_pending_p_callback): Fix comment.
1653 (linux_wait_for_event_1): Move most of the internal breakpoint
1654 handling from here...
1655 (linux_wait_1): ... to here.
1656 (count_events_callback): New.
1657 (select_singlestep_lwp_callback): New.
1658 (select_event_lwp_callback): New.
1659 (cancel_breakpoints_callback): New.
1660 (select_event_lwp): New.
1661 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1662 priority to all LWPs that have had events that should be reported
1663 to the client. Cancel breakpoints when about to reporting the
1664 event to the client, not while stopping lwps. No longer cancel
1665 finished single-steps here.
1666 (cancel_finished_single_step): Delete.
1667 (cancel_finished_single_steps): Delete.
1669 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1671 * mem-break.c (enum bkpt_type): New.
1672 (struct breakpoint): New field `type'.
1673 (set_breakpoint_at): Change return type to struct breakpoint
1674 pointer. Set type to `other_breakpoint' by default.
1675 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1676 in the breakpoint list.
1677 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1678 (reinsert_breakpoint): Rename to ...
1679 (reinsert_raw_breakpoint): ... this.
1680 (reinsert_breakpoints_at): Adjust.
1681 * mem-break.h (struct breakpoint): Declare.
1682 (set_breakpoint_at): Change return type to struct breakpoint
1685 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1687 * server.c (handle_query): Assign, not compare.
1689 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1691 Teach linux gdbserver to step-over-breakpoints.
1693 * linux-low.c (can_hardware_single_step): New.
1694 (supports_breakpoints): New.
1695 (handle_extended_wait): If stopping threads, read the stop pc of
1698 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1699 low target doesn't support retrieving the PC.
1700 (add_lwp): Set last_resume_kind to resume_continue.
1701 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1702 (linux_attach): Don't clear stop_expected. Set the lwp's
1703 last_resume_kind to resume_stop.
1704 (linux_detach_one_lwp): Don't check for removed breakpoints.
1705 (check_removed_breakpoint): Delete.
1706 (status_pending_p): Rename to ...
1707 (status_pending_p_callback): ... this. Don't check for removed
1708 breakpoints. Don't consider threads that are stopped from GDB's
1710 (linux_wait_for_lwp): Always read the stop_pc here.
1711 (cancel_breakpoint): New.
1712 (step_over_bkpt): New global.
1713 (linux_wait_for_event_1): Implement stepping over breakpoints.
1714 (gdb_wants_lwp_stopped): New.
1715 (gdb_wants_all_stopped): New.
1716 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1717 single-step traps here. Store the thread's last reported target
1719 (send_sigstop): Don't clear stop_expected. Always set it,
1721 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1722 (cancel_finished_single_step): New.
1723 (cancel_finished_single_steps): New.
1724 (wait_for_sigstop): Don't cancel finished single-step traps here.
1725 (linux_resume_one_lwp): Don't check for removed breakpoints.
1726 Don't set `step' on non-hardware step archs.
1727 (linux_set_resume_request): Ignore resume_stop requests if already
1728 stopping or stopped. Set the lwp's last_resume_kind.
1729 (resume_status_pending_p): Don't check for removed breakpoints.
1730 (need_step_over_p): New.
1731 (start_step_over): New.
1732 (finish_step_over): New.
1733 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1734 requests. Clear the thread's last reported target waitstatus.
1735 Don't use the `suspended' flag. Don't consider pending breakpoints.
1736 (linux_resume): Start a step-over if necessary.
1737 (proceed_one_lwp): New.
1738 (proceed_all_lwps): New.
1739 (unstop_all_lwps): New.
1740 * linux-low.h (struct lwp_info): Rewrite comment for the
1741 `suspended' flag. Add the `stop_pc' field. Delete the
1742 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1743 Add `'last_resume_kind' and `need_step_over' fields.
1744 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1745 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1746 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1747 (set_raw_breakpoint_at): New.
1748 (set_breakpoint_at): Rewrite to use it.
1749 (reinsert_breakpoint_handler): Delete.
1750 (set_reinsert_breakpoint): New.
1751 (reinsert_breakpoint_by_bp): Delete.
1752 (delete_reinsert_breakpoints): New.
1753 (uninsert_breakpoint): Rewrite.
1754 (uninsert_breakpoints_at): New.
1755 (reinsert_breakpoint): Rewrite.
1756 (reinsert_breakpoints_at): New.
1757 (check_breakpoints): Rewrite.
1758 (breakpoint_here): New.
1759 (breakpoint_inserted_here): New.
1760 (check_mem_read): Adjust.
1761 * mem-break.h (breakpoints_supported, breakpoint_here)
1762 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1763 (reinsert_breakpoint_by_bp): Delete declaration.
1764 (delete_reinsert_breakpoints): Declare.
1765 (reinsert_breakpoint): Delete declaration.
1766 (reinsert_breakpoints_at): Declare.
1767 (uninsert_breakpoint): Delete declaration.
1768 (uninsert_breakpoints_at): Declare.
1769 (check_breakpoints): Adjust prototype.
1770 * server.h: Adjust include order.
1771 (struct thread_info): Declare here. Add a `last_status' field.
1773 2010-03-23 Michael Snyder <msnyder@vmware.com>
1775 * server.c (crc32): New function.
1776 (handle_query): Add handling for 'qCRC:' request.
1778 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1780 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1781 lwp had been stopped by a watchpoint.
1783 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1785 * server.h (internal_error): Declare.
1786 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1787 * utils.c (internal_error): New function.
1789 2010-03-15 Andreas Schwab <schwab@redhat.com>
1791 * configure.srv: Fix typo setting srv_regobj.
1793 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1795 * linux-low.c (fetch_register): Avoid passing a non string literal
1797 (usr_store_inferior_registers): Ditto.
1799 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1801 * linux-low.c (linux_write_memory): Bail out early if peeking
1804 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1806 * linux-low.h (struct lwp_info): New fields
1807 `stopped_by_watchpoint' and `stopped_data_address'.
1808 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1809 here, and cache them in the lwp object.
1810 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1812 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1814 (linux_stopped_by_watchpoint): Rewrite.
1815 (linux_stopped_data_address): Rewrite.
1817 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1819 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1820 switching the current inferior, not before.
1822 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1824 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1825 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1826 i386-linux.c and amd64-linux.c.
1827 (reg-i386.o): Removed.
1828 (reg-i386.c): Likewise.
1829 (reg-i386-linux.o): Likewise.
1830 (reg-i386-linux.c): Likewise.
1831 (reg-x86-64.o): Likewise.
1832 (reg-x86-64.c): Likewise.
1833 (reg-x86-64-linux.o): Likewise.
1834 (reg-x86-64-linux.c): Likewise.
1837 (i386-linux.o): Likewise.
1838 (i386-linux.c): Likewise.
1839 (amd64.o): Likewise.
1840 (amd64.c): Likewise.
1841 (amd64-linux.o): Likewise.
1842 (amd64-linux.c): Likewise.
1844 * configure.srv (srv_i386_regobj): New.
1845 (srv_i386_linux_regobj): Likewise.
1846 (srv_amd64_regobj): Likewise.
1847 (srv_amd64_linux_regobj): Likewise.
1848 (srv_i386_32bit_xmlfiles): Likewise.
1849 (srv_i386_64bit_xmlfiles): Likewise.
1850 (srv_i386_xmlfiles): Likewise.
1851 (srv_amd64_xmlfiles): Likewise.
1852 (srv_i386_linux_xmlfiles): Likewise.
1853 (srv_amd64_linux_xmlfiles): Likewise.
1854 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1855 srv_xmlfiles to $srv_i386_xmlfiles.
1856 (i[34567]86-*-mingw32ce*): Likewise.
1857 (i[34567]86-*-mingw*): Likewise.
1858 (i[34567]86-*-nto*): Likewise.
1859 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1860 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1861 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1862 (x86_64-*-linux*): Likewise.
1864 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1865 (init_registers_amd64_linux): New.
1866 (x86_arch_setup): Replace init_registers_x86_64_linux with
1867 init_registers_amd64_linux.
1869 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1871 * configure.ac: Check for libdl. If it is not available link against
1872 static libthread_db.
1873 * configure: Regenerate.
1875 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1879 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1880 handing a read watchpoint.
1881 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1883 2010-02-12 Doug Evans <dje@google.com>
1885 * linux-low.c (linux_supports_tracefork_flag): Document.
1886 (linux_look_up_symbols): Add comment.
1888 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1890 * regcache.c (supply_register): Clear regcache if buf is NULL.
1892 2010-02-02 Nicolas Roche <roche@sourceware.org>
1893 Joel Brobecker <brobecker@adacore.com>
1895 * inferiors.c (find_inferior): Add function documentation.
1896 (unloaded_dll): Handle the case where the unloaded dll has not
1897 been previously registered in the dll list.
1899 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1901 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1902 (thumb2_breakpoint): New.
1903 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1905 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1907 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1908 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1911 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1913 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1915 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1917 * linux-s390-low.c (s390_collect_ptrace_register)
1918 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1920 2010-01-21 Doug Evans <dje@google.com>
1922 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1923 (PTRACE_ARG4_TYPE): New macro.
1924 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1925 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1926 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1927 (usr_store_inferior_registers): Ditto.
1928 (linux_read_memory, linux_write_memory): Ditto.
1929 (linux_test_for_tracefork): Ditto.
1931 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1932 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1934 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1936 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1939 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1941 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1942 prototype to take a regcache. Adjust.
1944 2010-01-20 Pedro Alves <pedro@codesourcery.com>
1946 * regcache.h (struct thread_info): Forward declare.
1947 (struct regcache): New.
1948 (new_register_cache): Adjust prototype.
1949 (get_thread_regcache): Declare.
1950 (free_register_cache): Adjust prototype.
1951 (registers_to_string, registers_from_string): Ditto.
1952 (supply_register, supply_register_by_name, collect_register)
1953 (collect_register_as_string, collect_register_by_name): Ditto.
1954 * regcache.c (struct inferior_regcache_data): Delete.
1955 (get_regcache): Rename to ...
1956 (get_thread_regcache): ... this. Adjust. Switch inferior before
1958 (regcache_invalidate_one): Adjust.
1959 (regcache_invalidate): Fix prototype.
1960 (new_register_cache): Return the new register cache.
1961 (free_register_cache): Change prototype.
1962 (realloc_register_cache): Adjust.
1963 (registers_to_string): Change prototype to take a regcache. Adjust.
1964 (registers_from_string): Ditto.
1965 (register_data): Ditto.
1966 (supply_register): Ditto.
1967 (supply_register_by_name): Ditto.
1968 (collect_register): Ditto.
1969 (collect_register_as_string): Ditto.
1970 (collect_register_by_name): Ditto.
1971 * server.c (process_serial_event): Adjust.
1972 * linux-low.h (regset_fill_func, regset_store_func): Change
1974 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1976 * linux-low.c (get_stop_pc): Adjust.
1977 (check_removed_breakpoint): Adjust.
1978 (linux_wait_for_event): Adjust.
1979 (linux_resume_one_lwp): Adjust.
1980 (fetch_register): Add regcache parameter. Adjust.
1981 (usr_store_inferior_registers): Ditto.
1982 (regsets_fetch_inferior_registers): Ditto.
1983 (regsets_store_inferior_registers): Ditto.
1984 (linux_fetch_registers, linux_store_registers): Ditto.
1985 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1987 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1988 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1989 prototype to take a regcache.
1990 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1991 * remote-utils.c (convert_ascii_to_int, outreg)
1992 (prepare_resume_reply): Change prototype to take a regcache.
1994 * target.h (struct target_ops) <fetch_registers, store_registers>:
1995 Change prototype to take a regcache.
1996 (fetch_inferior_registers, store_inferior_registers): Change
1997 prototype to take a regcache. Adjust.
1998 * proc-service.c (ps_lgetregs): Adjust.
1999 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2000 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2001 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2002 take a regcache. Adjust.
2003 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2004 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2005 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2006 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2007 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2008 (cris_cannot_fetch_register):
2009 (cris_breakpoint_at): Change prototype to take a regcache.
2011 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2012 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2013 to take a regcache. Adjust.
2014 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2016 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2017 take a regcache. Adjust.
2018 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2019 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2020 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2021 * linux-mips-low.c (mips_get_pc):
2022 (mips_set_pc): Change prototype to take a regcache. Adjust.
2023 (mips_reinsert_addr): Adjust.
2024 (mips_collect_register): Change prototype to take a regcache.
2026 (mips_supply_register):
2027 (mips_collect_register_32bit, mips_supply_register_32bit)
2028 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2029 (mips_store_fpregset): Ditto.
2030 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2032 (parse_spufs_run): Adjust.
2033 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2034 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2035 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2036 take a regcache. Adjust.
2037 * linux-s390-low.c (s390_collect_ptrace_register)
2038 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2039 (s390_set_pc): Change prototype to take a regcache. Adjust.
2040 (s390_arch_setup): Adjust.
2041 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2042 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2043 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2044 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2045 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2047 (sparc_breakpoint_at): Adjust.
2048 * linux-xtensa-low.c (xtensa_fill_gregset):
2049 (xtensa_store_gregset):
2050 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2051 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2052 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2053 prototype to take a regcache. Adjust.
2054 * win32-arm-low.c (arm_fetch_inferior_register)
2055 (arm_store_inferior_register): Change prototype to take a
2057 * win32-i386-low.c (i386_fetch_inferior_register)
2058 (i386_store_inferior_register): Change prototype to take a
2060 * win32-low.c (child_fetch_inferior_registers)
2061 (child_store_inferior_registers): Change prototype to take a
2063 (win32_wait): Adjust.
2064 (win32_fetch_inferior_registers): Change prototype to take a
2066 (win32_store_inferior_registers): Adjust.
2067 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2068 store_inferior_register>: Change prototype to take a regcache.
2070 2010-01-20 Doug Evans <dje@google.com>
2072 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2074 (linux_wait_for_event1, linux_init_signals): Ditto.
2075 (W_STOPCODE): Provide definition if missing.
2077 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2079 * linux-low.c (linux_core_of_thread): New.
2080 (compare_ints, show_process, list_threads): New.
2081 (linux_qxfer_osdata): Report threads and cores.
2082 (linux_target_op): Register linux_core_of_thread.
2083 * remote-utils.c (prepare_resume_reply): Report the core.
2084 (buffer_xml_printf): Support %d specifier.
2085 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2087 (handle_query): Handle qXfer:threads. Announce availability
2089 * target.h (struct target_ops): New field core_of_thread.
2091 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2093 * Makefile.in (clean): Remove new generated files.
2094 (reg-s390.o, reg-s390.c): Remove rules.
2095 (reg-s390x.o, reg-s390x.c): Likewise.
2096 (s390-linux32.o, s390-linux32.c): Add rules.
2097 (s390-linux64.o, s390-linux64.c): Likewise.
2098 (s390x-linux64.o, s390x-linux64.c): Likewise.
2099 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2100 * linux-s390-low.c: Include <elf.h>.
2101 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2102 (init_registers_s390): Remove prototype.
2103 (init_registers_s390x): Likewise.
2104 (init_registers_s390_linux32): Add prototype.
2105 (init_registers_s390_linux64): Likewise.
2106 (init_registers_s390x_linux64): Likewise.
2107 (s390_num_regs_3264): New define.
2108 (s390_regmap_3264): New global variable.
2109 (s390_cannot_fetch_register): Remove obsolete check.
2110 (s390_cannot_store_register): Likewise.
2111 (s390_collect_ptrace_register): Handle upper/lower register halves.
2112 (s390_supply_ptrace_register): Likewise.
2113 (s390_fill_gregset): Update to register number changes.
2114 (s390_get_hwcap): New routine.
2115 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2116 Install appropriate regmap and register set.
2118 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2120 * server.c (gdbserver_version): Update copyright year to 2010.
2121 * gdbreplay.c (gdbreplay_version): Likewise.
2123 2009-12-28 Doug Evans <dje@google.com>
2125 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2126 elf/external.h. Include <elf.h> instead but only if necessary.
2128 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2130 * linux-low.c (linux_remove_process): Remove `detaching'
2131 parameter. Don't release/detach from thread_db here.
2132 (linux_kill): Release/detach from thread_db here, ...
2133 (linux_detach): ... and here, before actually detaching.
2134 (linux_wait_1): ... and here, when a process exits.
2135 * thread-db.c (any_thread_of): New.
2136 (thread_db_free): Switch the current inferior to a thread of the
2139 2009-12-21 Doug Evans <dje@google.com>
2141 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2143 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2144 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2145 warning ifndef __NR_tkill. Move setting of errno there too.
2146 Delete unnecessary resetting of errno after syscall.
2147 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2149 * configure.ac: Check for dladdr.
2150 * config.in: Regenerate.
2151 * configure: Regenerate.
2152 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2153 (try_thread_db_load): Update.
2155 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2157 2009-12-18 Doug Evans <dje@google.com>
2159 * event-loop.c: Include unistd.h if it exists.
2161 * linux-low.c (my_waitpid): Move definition away from being in
2162 between linux_tracefork_child/linux_test_for_tracefork.
2164 * gdb_proc_service.h (psaddr_t): Fix type.
2165 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2166 signature to match glibc.
2168 2009-12-16 Doug Evans <dje@google.com>
2170 * linux-low.c (linux_read_memory): Fix argument to read.
2172 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2174 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2175 events, don't leave current_inferior pointing at null.
2177 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2179 * win32-low.c (LOG): Delete.
2180 (OUTMSG): Output to stderr.
2181 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2182 on compile time LOG macro.
2183 (win32_wait): Fix debug output.
2185 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2187 * win32-low.c (win32_add_one_solib): If the dll name is
2188 "ntdll.dll", prepend the system directory to the dll path.
2190 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2192 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2194 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2195 Vladimir Prus <vladimir@codesourcery.com>
2197 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2198 * configure.ac: Check for __mcoldfire__ and set
2199 gdb_cv_m68k_is_coldfire.
2200 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2201 reg-cf.o and reg-m68k.o.
2202 * configure: Regenerated.
2204 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2206 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2207 Pass it to thread_db_free.
2208 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2209 proper `detaching' argument to linux_remove_process.
2210 * linux-low.h (thread_db_free): Add `detaching' parameter.
2211 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2213 (thread_db_free): Add `detaching' parameter. Only
2214 call td_ta_clear_event if detaching from process.
2216 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2218 * thread-db.c (thread_db_free): Fix typo.
2220 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2223 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2225 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2227 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2228 with an i686 compiler.
2229 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2231 * configure: Rebuilt.
2233 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2237 * server.c (handle_search_memory_1): Correct read_addr initialization
2238 in loop for searching subsequent chunks.
2240 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2242 * configure.ac: New --with-libthread-db option.
2243 * thread-db.c: Allow direct dependence on libthread_db.
2244 (thread_db_free): Adjust.
2245 * config.in: Regenerate.
2246 * configure: Likewise.
2248 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2251 * thread-db.c (attach_thread): New function.
2252 (maybe_attach_thread): Return success/failure.
2253 (find_new_threads_callback): Adjust.
2254 (thread_db_find_new_threads): Loop until no new threads.
2256 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2258 * proc-service.c (ps_lgetregs): Formatting.
2260 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2262 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2263 * configure.ac: Adjust.
2264 * linux-low.h (struct process_info_private): Move members to struct
2266 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2267 * linux-low.c (linux_remove_process): Adjust.
2268 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2269 * server.c (handle_query): Move code ...
2270 (handle_monitor_command): ... here. New function.
2271 * target.h (struct target_ops): New member.
2272 * thread-db.c (struct thread_db): New.
2273 (libthread_db_search_path): New variable.
2274 (thread_db_create_event, thread_db_enable_reporting)
2275 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2276 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2277 (try_thread_db_load_1, dladdr_to_soname): New functions.
2278 (try_thread_db_load, thread_db_load_search): New functions.
2279 (thread_db_init): Search for libthread_db.
2280 (thread_db_free): New function.
2281 (thread_db_handle_monitor_command): Likewise.
2282 * config.in: Regenerate.
2283 * configure: Regenerate.
2285 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2287 * spu-low.c (spu_kill): Wait for inferior to terminate.
2288 Call clear_inferiors.
2289 (spu_detach): Call clear_inferiors.
2291 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2293 * aclocal.m4: Regenerate.
2294 * config.in: Likewise.
2295 * configure: Likewise.
2297 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2299 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2300 (parse_spufs_run): New function.
2301 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2302 (ppc_breakpoint_at): Handle SPU breakpoints.
2304 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2306 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2307 (SPUFS_MAGIC): Define.
2308 (spu_enumerate_spu_ids): New function.
2309 (linux_qxfer_spu): New function.
2310 (linux_target_ops): Install linux_qxfer_spu.
2312 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2314 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2315 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2316 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2317 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2318 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2319 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2320 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2321 (init_registers_powerpc_cell32l): Add prototype.
2322 (init_registers_powerpc_cell64l): Likewise.
2323 (ppc_arch_setup): Detect Cell/B.E. architecture.
2325 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2327 * Makefile.in (datarootdir): New variable.
2329 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2331 * linux-low.c (linux_write_memory): Update debugging output.
2332 * Makefile.in (clean): Add new descriptions.
2333 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2334 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2335 * configure.srv: Add new files for arm*-*-linux*.
2336 * linux-arm-low.c: Add new declarations.
2337 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2338 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2339 (HWCAP_VFPv3D16): New.
2340 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2341 instead of __IWMMXT__.
2342 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2343 (arm_arch_setup): New.
2344 (target_regsets): Remove #ifdef. Add VFP regset.
2345 (the_low_target): Use arm_arch_setup.
2347 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2349 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2350 the main thread again.
2352 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2354 Adding Neutrino gdbserver.
2355 * configure: Regenerated.
2356 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2357 * configure.srv (i[34567]86-*-nto*): New target.
2358 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2359 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2360 (nto_comctrl) [__QNX__]: New function.
2361 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2363 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2365 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2368 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2369 Pedro Alves <pedro@codesourcery.com>
2371 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2372 don't support CONTEXT_EXTENDED_REGISTERS.
2373 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2374 (the_low_target): Install them.
2375 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2376 failing with ERROR_PIPE_NOT_CONNECTED.
2378 2009-06-30 Doug Evans <dje@google.com>
2379 Pierre Muller <muller@ics.u-strasbg.fr>
2381 Add h/w watchpoint support to x86-linux, win32-i386.
2382 * Makefile.in (SFILES): Add i386-low.c
2383 (i386_low_h): Define.
2384 (i386-low.o): Add dependencies.
2385 (linux-x86-low.o): Add i386-low.h dependency.
2386 (win32-i386-low.o): Ditto.
2387 * i386-low.c: New file.
2388 * i386-low.h: New file.
2389 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2390 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2391 * linux-low.c (linux_add_process): Initialize arch_private.
2392 (linux_remove_process): Free arch_private.
2393 (add_lwp): Initialize arch_private.
2394 (delete_lwp): Free arch_private.
2395 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2397 * linux-low.h (process_info_private): New member arch_private.
2398 (lwp_info): New member arch_private.
2399 (linux_target_ops): New members new_process, new_thread,
2401 (ptid_of): New macro.
2402 * linux-x86-low.c: Include stddef.h, i386-low.h.
2403 (arch_process_info): New struct.
2404 (arch_lwp_info): New struct.
2405 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2406 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2407 (i386_dr_low_get_status): New function.
2408 (x86_insert_point, x86_remove_point): New functions.
2409 (x86_stopped_by_watchpoint): New function.
2410 (x86_stopped_data_address): New function.
2411 (x86_linux_new_process, x86_linux_new_thread): New functions.
2412 (x86_linux_prepare_to_resume): New function.
2413 (the_low_target): Add entries for insert_point, remove_point,
2414 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2416 * server.c (debug_hw_points): New global.
2417 (monitor_show_help): Document set debug-hw-points.
2418 (handle_query): Process "set debug-hw-points".
2419 * server.h (debug_hw_points): Declare.
2420 (paddress): Declare.
2421 * utils.c (NUMCELLS, CELLSIZE): New macros.
2422 (get_sell, xsnprintf, paddress): New functions.
2423 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2424 remove_point, stopped_by_watchpoint, stopped_data_address.
2425 * win32-i386-low.c: Include i386-low.h.
2426 (debug_reg_state): Replaces dr.
2427 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2428 (i386_dr_low_get_status): New function.
2429 (i386_insert_point, i386_remove_point): New functions.
2430 (i386_stopped_by_watchpoint): New function.
2431 (i386_stopped_data_address): New function.
2432 (i386_initial_stuff): Update.
2433 (get_thread_context,set_thread_context,i386_thread_added): Update.
2434 (the_low_target): Add entries for insert_point,
2435 remove_point, stopped_by_watchpoint, stopped_data_address.
2436 * win32-low.c (win32_insert_watchpoint): New function.
2437 (win32_remove_watchpoint): New function.
2438 (win32_stopped_by_watchpoint): New function.
2439 (win32_stopped_data_address): New function.
2440 (win32_target_ops): Add entries for insert_watchpoint,
2441 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2442 * win32-low.h (win32_target_ops): New members insert_point,
2443 remove_point, stopped_by_watchpoint, stopped_data_address.
2445 2009-06-25 Pedro Alves <pedro@codesourcery.com>
2447 * server.c (process_serial_event): Re-return unsupported, not
2448 error, if the type isn't recognized. Re-allow supporting only
2449 insert or remove packets. Also call require_running for
2450 breakpoints. Add missing break statement to default case. Tidy.
2451 * target.h (struct target_ops): Rename insert_watchpoint to
2452 insert_point, and remove_watchpoint to remove_point.
2454 * linux-low.h (struct linux_target_ops): Likewise.
2455 * linux-low.c (linux_insert_watchpoint): Rename to ...
2456 (linux_insert_point): ... this. Adjust.
2457 (linux_remove_watchpoint): Rename to ...
2458 (linux_remove_point): ... this. Adjust.
2459 (linux_target_ops): Adjust.
2460 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2461 (cris_insert_point): ... this.
2462 (cris_remove_watchpoint): Rename to ...
2463 (cris_remove_point): ... this.
2464 (the_low_target): Adjust.
2466 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2468 * server.c (handle_v_kill): Pass signal_pid to
2469 kill_inferior if multi_process is zero.
2471 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2473 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2474 * target.h (target_ops): Comment for *_watchpoint to make it clear
2475 the functions can get types '0' and '1'.
2477 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2479 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2480 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2481 * regcache.c (get_regcache): Likewise.
2482 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2483 * win32-low.c (child_fetch_inferior_registers): Remove check for
2486 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2487 Pedro Alves <pedro@codesourcery.com>
2489 * target.h (struct target_ops) <supports_multi_process>: New
2491 (target_supports_multi_process): New.
2492 * server.c (handle_query): Even if GDB reports support, only
2493 enable multi-process if the target also supports it. Report
2494 multi-process support only if the target backend supports it.
2495 * linux-low.c (linux_supports_multi_process): New function.
2496 (linux_target_ops): Install it as target_supports_multi_process
2499 2009-05-24 Doug Evans <dje@google.com>
2501 Global renaming of find_thread_pid to find_thread_ptid.
2502 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2503 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2504 All callers updated.
2506 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2507 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2510 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2511 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2512 (linux_resume_one_lwp): Ditto.
2514 2009-05-23 Doug Evans <dje@google.com>
2516 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2517 from struct inferior_list_entry * to struct lwp_info *.
2518 All callers updated.
2520 2009-05-13 Doug Evans <dje@google.com>
2522 * linux-x86-low.c: Don't include assert.h.
2523 (x86_siginfo_fixup): Use fatal, not assert.
2524 (x86_arch_setup): Fix comment.
2526 2009-05-12 Doug Evans <dje@google.com>
2528 Biarch support for i386/amd64 gdbserver.
2529 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2530 Add linux-x86-low.c.
2531 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2532 (linux-x86-low.o): Add.
2533 * linux-x86-64-low.c: Delete.
2534 * linux-i386-low.c: Delete.
2535 * linux-x86-low.c: New file.
2536 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2538 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2540 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2541 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2542 (linux_child_pid_to_exec_file): New function.
2543 (elf_64_header_p, elf_64_file_p): New functions.
2544 (siginfo_fixup): New function.
2545 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2546 give target a chance to convert layout.
2547 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2548 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2550 2009-05-07 Doug Evans <dje@google.com>
2552 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2553 (regsets_store_inferior_registers): Ditto.
2555 2009-05-06 Pedro Alves <pedro@codesourcery.com>
2559 * linux-low.c (must_set_ptrace_flags): Delete.
2560 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2562 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2563 `lwp->must_set_ptrace_flags' instead.
2564 (linux_wait_for_event_1): Set ptrace options here.
2565 (linux_wait_1): ... not here.
2567 2009-04-30 Doug Evans <dje@google.com>
2569 * inferiors.c (started_inferior_callback): New function.
2570 (attached_inferior_callback): New function.
2571 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2572 * server.c (print_started_pid, print_attached_pid): New functions.
2573 (detach_or_kill_for_exit): New function.
2574 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2575 * server.h (have_started_inferiors_p): Declare.
2576 (have_attached_inferiors_p): Declare.
2578 * inferiors.c (remove_process): Fix memory leak, free process.
2579 * linux-low.c (linux_remove_process): New function.
2580 (linux_kill): Call it instead of remove_process.
2581 (linux_detach, linux_wait_1): Ditto.
2583 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2585 * configure.srv: Add x86 Windows CE target.
2587 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2589 * inferiors.c (get_thread_process): Make global.
2590 * server.h (get_thread_process): Add prototype.
2591 * thread-db.c (find_one_thread): Use get_thread_process
2592 instead of current_process.
2593 (thread_db_get_tls_address): Do not crash if called when
2594 thread layer is not yet initialized.
2596 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2598 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2599 * spu-low.c (current_tid): Rename to ...
2600 (current_ptid): ... this.
2601 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2602 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2603 ptid_get_lwp (current_ptid) instead of current_tid.
2604 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2605 instead of current_tid. Use find_process_pid to verify pid
2606 argument is valid. Pass proper argument to remove_process.
2607 (spu_thread_alive): Compare current_ptid instead of current_tid.
2608 (spu_resume): Likewise.
2610 2009-04-02 Pedro Alves <pedro@codesourcery.com>
2612 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2615 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2617 Implement the multiprocess extensions, and add linux multiprocess
2620 * server.h (ULONGEST): Declare.
2621 (struct ptid, ptid_t): New.
2622 (minus_one_ptid, null_ptid): Declare.
2623 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2624 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2625 (struct inferior_list_entry): Change `id' type from unsigned from
2627 (struct sym_cache, struct breakpoint, struct
2628 process_info_private): Forward declare.
2629 (struct process_info): Declare.
2630 (current_process): Declare.
2631 (all_processes): Declare.
2632 (initialize_inferiors): Declare.
2633 (add_thread): Adjust to use ptid_t.
2634 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2635 (add_process, remove_process, find_thread_pid): Declare.
2636 (find_inferior_id): Adjust to use ptid_t.
2637 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2638 (multi_process): Declare.
2639 (push_event): Adjust to use ptid_t.
2640 (read_ptid, write_ptid): Declare.
2641 (prepare_resume_reply): Adjust to use ptid_t.
2642 (clear_symbol_cache): Declare.
2643 * inferiors.c (all_processes): New.
2644 (null_ptid, minus_one_ptid): New.
2645 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2646 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2647 (add_thread): Change unsigned long to ptid. Remove gdb_id
2649 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2650 (gdb_id_to_thread): Rename to ...
2651 (find_thread_pid): ... this. Change unsigned long to ptid.
2652 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2653 (loaded_dll, pull_pid_from_list): Adjust.
2654 (add_process, remove_process, find_process_pid)
2655 (get_thread_process, current_process, initialize_inferiors): New.
2656 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2657 (struct target_waitstatus) <related_pid>: Ditto.
2658 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2660 (struct target_ops) <join>: Add `pid' argument.
2661 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2662 (struct target_ops) <wait>: Add `ptid' field. Change return type
2664 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2665 (mywait): Add `ptid' argument. Change return type to ptid_t.
2666 (target_pid_to_str): Declare.
2667 * target.c (set_desired_inferior): Adjust to use ptids.
2668 (mywait): Add new `ptid' argument. Adjust.
2669 (target_pid_to_str): New.
2670 * mem-break.h (free_all_breakpoints): Declare.
2671 * mem-break.c (breakpoints): Delelete.
2672 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2673 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2674 to use per-process breakpoint list.
2675 (free_all_breakpoints): New.
2676 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2677 (symbol_cache, all_symbols_looked_up): Delete.
2679 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2681 (prepare_resume_reply): Change ptid argument's type from unsigned
2682 long to ptid_t. Adjust. Implement W;process and X;process.
2683 (free_sym_cache, clear_symbol_cache): New.
2684 (look_up_one_symbol): Adjust to per-process symbol cache. *
2685 * server.c (cont_thread, general_thread, step_thread): Change type
2688 (multi_process): New.
2689 (last_ptid): Change type to ptid_t.
2690 (struct vstop_notif) <ptid>: Change type to ptid_t.
2691 (queue_stop_reply, push_event): Change `ptid' argument's type to
2693 (discard_queued_stop_replies): Add `pid' argument.
2694 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2695 changes. Don't reference the `attached' global.
2696 (attach_inferior): Adjust to mywait interface changes.
2697 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2698 features. Handle and report "multiprocess+". Handle
2700 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2702 (handle_v_kill): New.
2703 (handle_v_stopped): Adjust to use target_pid_to_str.
2704 (handle_v_requests): Allow multiple attaches and runs when
2705 multiprocess extensions are in effect. Handle "vKill".
2706 (myresume): Adjust to use ptids.
2707 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2708 (handle_status): Adjust to discard_queued_stop_replies interface
2710 (first_thread_of, kill_inferior_callback)
2711 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2712 (main): Call initialize_inferiors. Adjust to use ptids, killing
2713 and detaching from all inferiors. Handle multiprocess packet
2715 * linux-low.h: Include gdb_proc_service.h.
2716 (struct process_info_private): New.
2717 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2718 <lwpid_of>: Use ptid_get_lwp.
2719 (get_lwp_thread): Adjust.
2720 (struct lwp_info): Add `dead' member.
2721 (find_lwp_pid): Declare.
2722 * linux-low.c (thread_db_active): Delete.
2723 (new_inferior): Adjust comment.
2724 (inferior_pid): Delete.
2725 (linux_add_process): New.
2726 (handle_extended_wait): Adjust.
2727 (add_lwp): Change unsigned long to ptid.
2728 (linux_create_inferior): Add process to processes table. Adjust
2729 to use ptids. Don't set new_inferior here.
2730 (linux_attach_lwp): Rename to ...
2731 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2732 it. Adjust to use ptids.
2733 (linux_attach_lwp): New.
2734 (linux_attach): Add process to processes table. Don't set
2736 (struct counter): New.
2737 (second_thread_of_pid_p, last_thread_of_process_p): New.
2738 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2740 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2741 processes. Remove process from process table.
2742 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2743 to multiple processes.
2744 (any_thread_of): New.
2745 (linux_detach): Add `pid' argument, and handle it. Remove process
2746 from processes table.
2747 (linux_join): Add `pid' argument. Handle it.
2748 (linux_thread_alive): Change unsighed long argument to ptid_t.
2749 Consider dead lwps as not being alive.
2750 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2751 threads we're not interested in.
2752 (same_lwp, find_lwp_pid): New.
2753 (linux_wait_for_lwp): Change `pid' argument's type from int to
2755 (linux_wait_for_event): Rename to ...
2756 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2757 from int to ptid_t. Adjust.
2758 (linux_wait_for_event): New.
2759 (linux_wait_1): Add `ptid' argument. Change return type to
2760 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2761 that exit from the process table.
2762 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2764 (mark_lwp_dead): New.
2765 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2766 stopping all threads, mark its main lwp as dead.
2767 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2769 (fetch_register, usr_store_inferior_registers)
2770 (regsets_fetch_inferior_registers)
2771 (regsets_store_inferior_registers, linux_read_memory)
2772 (linux_write_memory): Inline `inferior_pid'.
2773 (linux_look_up_symbols): Adjust to use per-process
2775 (linux_request_interrupt): Adjust to use ptids.
2776 (linux_read_auxv): Inline `inferior_pid'.
2777 (initialize_low): Don't reference thread_db_active.
2778 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2779 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2780 (ps_getpid): Return the pid of the current inferior.
2781 * thread-db.c (proc_handle, thread_agent): Delete.
2782 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2784 (find_one_thread): Change argument type to ptid_t. Adjust to
2786 (maybe_attach_thread): Adjust to per-process data and ptids.
2787 (thread_db_find_new_threads): Ditto.
2788 (thread_db_init): Ditto.
2789 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2790 processes table. Adjust to use ptids.
2791 (spu_kill, spu_detach): Adjust interface. Remove process from
2793 (spu_join, spu_thread_alive): Adjust interface.
2794 (spu_wait): Adjust interface. Remove process from processes
2795 table. Adjust to use ptids.
2796 * win32-low.c (current_inferior_tid): Delete.
2797 (current_inferior_ptid): New.
2798 (debug_event_ptid): New.
2799 (thread_rec): Take a ptid. Adjust.
2800 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2801 (child_delete_thread): Ditto.
2802 (do_initial_child_stuff): Add `attached' argument. Add process to
2804 (child_fetch_inferior_registers, child_store_inferior_registers):
2806 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2807 (win32_attach): Pass 1 to do_initial_child_stuff.
2808 (win32_kill): Adjust interface. Remove process from processes
2810 (win32_detach): Ditto.
2811 (win32_join): Adjust interface.
2812 (win32_thread_alive): Take a ptid.
2813 (win32_resume): Adjust to use ptids.
2814 (get_child_debug_event): Ditto.
2815 (win32_wait): Adjust interface. Remove exiting process from
2818 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2820 Non-stop mode support.
2822 * server.h (non_stop): Declare.
2823 (gdb_client_data, handler_func): Declare.
2824 (delete_file_handler, add_file_handler, start_event_loop):
2826 (handle_serial_event, handle_target_event, push_event)
2827 (putpkt_notif): Declare.
2828 * target.h (enum resume_kind): New.
2829 (struct thread_resume): Replace `step' field by `kind' field.
2830 (TARGET_WNOHANG): Define.
2831 (struct target_ops) <wait>: Add `options' argument.
2832 <supports_non_stop, async, start_non_stop>: New fields.
2833 (target_supports_non_stop, target_async): New.
2834 (start_non_stop): Declare.
2835 (mywait): Add `options' argument.
2836 * target.c (mywait): Add `options' argument. Print child exit
2838 (start_non_stop): New.
2839 * server.c (non_stop, own_buf, mem_buf): New globals.
2840 (struct vstop_notif): New.
2841 (notif_queue): New global.
2842 (queue_stop_reply, push_event, discard_queued_stop_replies)
2843 (send_next_stop_reply): New.
2844 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2846 (attach_inferior): In non-stop mode, don't wait for the target
2848 (handle_general_set): Handle QNonStop.
2849 (handle_query): When handling qC, return the current general
2850 thread, instead of the first thread of the list.
2851 (handle_query): If the backend supports non-stop mode, include
2852 QNonStop+ in the qSupported query response.
2853 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2855 (handle_v_attach, handle_v_run): Handle non-stop mode.
2856 (handle_v_stopped): New.
2857 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2858 (myresume): Adjust to use resume_kind. Handle non-stop.
2859 (queue_stop_reply_callback): New.
2860 (handle_status): Handle non-stop mode.
2861 (main): Clear non_stop flag on reconnection. Use the event-loop.
2862 Refactor serial protocol handling from here ...
2863 (process_serial_event): ... to this new function. When GDB
2864 selects any thread, select one here. In non-stop mode, wait until
2865 GDB acks all pending events before exiting.
2866 (handle_serial_event, handle_target_event): New.
2867 * remote-utils.c (remote_open): Install remote_desc in the event
2869 (remote_close): Remove remote_desc from the event loop.
2870 (putpkt_binary): Rename to...
2871 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2872 (putpkt_binary): New as wrapper around putpkt_binary_1.
2873 (putpkt_notif): New.
2874 (prepare_resume_reply): In non-stop mode, don't change the
2876 * event-loop.c: New.
2877 * Makefile.in (OBJ): Add event-loop.o.
2878 (event-loop.o): New rule.
2880 * linux-low.h (pid_of): Moved here.
2882 (get_lwp_thread): Use lwpid_of.
2883 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2884 * linux-low.c (pid_of): Delete.
2885 (inferior_pid): Use lwpid_of.
2886 (linux_event_pipe): New.
2887 (target_is_async_p): New.
2889 (handle_extended_wait): Use lwpid_of.
2890 (add_lwp): Don't set lwpid field.
2891 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2892 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2893 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2894 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2895 first. Adjust to linux_wait_for_event interface changes. Use
2897 (linux_detach): Don't delete the main lwp here.
2898 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2899 (status_pending_p): Don't consider explicitly suspended lwps.
2900 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2901 pointer. Add OPTIONS argument. Change return type to int. Use
2902 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2903 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2904 pointer. Add status pointer argument. Return a pid instead of a
2905 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2906 changes. In non-stop mode, don't switch to a random thread.
2907 (linux_wait): Rename to...
2908 (linux_wait_1): ... this. Add target_options argument, and handle
2909 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2910 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2911 clean exit and signal exit code. Don't stop all threads in
2912 non-stop mode. In all-stop mode, only stop all threads when
2913 reporting a stop to GDB. Handle explicit thread stop requests.
2914 (async_file_flush, async_file_mark): New.
2916 (send_sigstop): Use lwpid_of.
2917 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2918 interface changes. In non-stop mode, don't switch to a random
2920 (linux_resume_one_lwp): Use lwpid_of.
2921 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2922 (linux_resume_one_thread): ... this. Handle resume_stop. In
2923 non-stop mode, don't look for pending flag in all threads.
2924 (resume_status_pending_p): Don't consider explicitly suspended
2926 (my_waitpid): Reimplement. Emulate __WALL.
2927 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2929 (sigchld_handler, linux_supports_non_stop, linux_async)
2930 (linux_start_non_stop): New.
2931 (linux_target_ops): Register linux_supports_non_stop, linux_async
2932 and linux_start_non_stop.
2933 (initialize_low): Install SIGCHLD handler.
2934 * thread-db.c (thread_db_create_event, find_one_thread)
2935 (thread_db_get_tls_address): Use lwpid_of.
2936 * win32-low.c (win32_detach): Adjust to use resume_kind.
2937 (win32_wait): Add `options' argument.
2938 * spu-low.c (spu_resume): Adjust to use resume_kind.
2939 (spu_wait): Add `options' argument.
2941 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2943 Decouple target code from remote protocol.
2945 * target.h (enum target_waitkind): New.
2946 (struct target_waitstatus): New.
2947 (struct target_ops) <wait>: Return an unsigned long. Take a
2948 target_waitstatus pointer instead of a char pointer.
2950 * target.c (mywait): Change prototype to return an unsigned long.
2951 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2952 * server.h (thread_from_wait, old_thread_from_wait): Delete
2954 (prepare_resume_reply): Change prototype to take a
2956 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2957 (last_status, last_ptid): New.
2958 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2959 pid instead of a signal.
2960 (attach_inferior): Remove "status" and "signal" parameters.
2962 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2964 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2965 (handle_v_requests, myresume): Remove "status" and "signal"
2967 (handle_status): New.
2968 (main): Delete local `status'. Adjust.
2969 * remote-utils.c: Include target.h.
2970 (prepare_resume_reply): Change prototype to take a
2971 target_waitstatus. Adjust.
2973 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2975 * spu-low.c (spu_wait): Adjust.
2976 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2978 (win32_wait): Adjust.
2980 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2982 * target.h (struct thread_resume): Delete leave_stopped member.
2983 (struct target_ops): Add a `n' argument to the `resume' callback.
2984 * server.c (start_inferior): Adjust.
2985 (handle_v_cont, myresume): Adjust.
2986 * linux-low.c (check_removed_breakpoint): Adjust to resume
2987 interface change, and to removed leave_stopped field.
2988 (resume_ptr): Delete.
2989 (struct thread_resume_array): New.
2990 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2991 resume interface change.
2992 (linux_continue_one_thread, linux_queue_one_thread)
2993 (resume_status_pending_p): Check if the resume field is NULL
2994 instead of checking the leave_stopped member.
2995 (linux_resume): Adjust to the target resume interface change.
2996 * spu-low.c (spu_resume): Adjust to the target resume interface
2998 * win32-low.c (win32_detach, win32_resume): Ditto.
3000 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3002 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3004 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3006 (linux_continue_one_thread): Only preserve the stepping flag if
3007 there's a pending breakpoint.
3009 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3011 * server.c (main): After the inferior having exited, call
3012 remote_close before exiting gdbserver.
3014 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3016 Fix size of FPSCR in Power 7 processors.
3017 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3018 (PPC_FEATURE_HAS_DFP): New #define.
3019 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3022 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3024 * server.c (handle_query) Whitespace and formatting.
3026 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3028 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3029 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3030 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3031 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3032 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3033 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3034 Makefile.in, configure.ac: Fix whitespace throughout.
3035 * configure: Regenerate.
3037 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3039 * inferiors.c (find_inferior): Make it safe for the callback
3040 function to delete the currently iterated inferior.
3042 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3044 * Makefile.in (linuw_low_h): Move higher.
3045 (thread-db.o): Depend on $(linux_low_h).
3047 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3049 Rename "process" to "lwp" throughout.
3051 * linux-low.c (all_processes): Rename to...
3052 (all_lwps): ... this.
3053 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3054 (add_process): Rename to ...
3055 (add_lwp): ... this. Adjust.
3056 (linux_create_inferior): Adjust.
3057 (linux_attach_lwp): Adjust.
3058 (linux_attach): Adjust.
3059 (linux_kill_one_process): Rename to ...
3060 (linux_kill_one_lwp): ... this. Adjust.
3061 (linux_kill): Adjust.
3062 (linux_detach_one_process): Rename to ...
3063 (linux_detach_one_lwp): ... this. Adjust.
3064 (linux_detach): Adjust.
3065 (check_removed_breakpoint): Adjust.
3066 (status_pending_p): Adjust.
3067 (linux_wait_for_process): Rename to ...
3068 (linux_wait_for_lwp): ... this. Adjust.
3069 (linux_wait_for_event): Adjust.
3070 (send_sigstop): Adjust.
3071 (wait_for_sigstop): Adjust.
3072 (stop_all_processes): Rename to ...
3073 (stop_all_lwps): ... this.
3074 (linux_resume_one_process): Rename to ...
3075 (linux_resume_one_lwp): ... this. Adjust.
3076 (linux_set_resume_request, linux_continue_one_thread)
3077 (linux_queue_one_thread, resume_status_pending_p)
3078 (usr_store_inferior_registers, regsets_store_inferior_registers)
3079 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3081 * linux-low.h (get_process): Rename to ...
3082 (get_lwp): ... this. Adjust.
3083 (get_thread_process): Rename to ...
3084 (get_thread_lwp): ... this. Adjust.
3085 (get_process_thread): Rename to ...
3086 (get_lwp_thread): ... this. Adjust.
3087 (struct process_info): Rename to ...
3088 (struct lwp_info): ... this.
3089 (all_processes): Rename to ...
3090 (all_lwps): ... this.
3091 * proc-service.c (ps_lgetregs): Adjust.
3092 * thread-db.c (thread_db_create_event, find_one_thread)
3093 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3095 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3097 * server.c (handle_query): Handle "qAttached".
3099 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3101 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3102 GPLv3, update license URL.
3104 2009-03-01 Doug Evans <dje@google.com>
3106 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3107 (server_h): Add gdb_signals.h.
3108 (signals.o): Update.
3109 * server.h (target_signal_from_host,target_signal_to_host_p)
3110 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3112 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3114 * remote-utils.c (getpkt): Also generate remote-debug
3115 information if noack_mode is set.
3117 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3119 * server.c (handle_query): Report qXfer:siginfo:read and
3120 qXfer:siginfo:write as supported and handle them.
3121 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3122 * linux-low.c (linux_xfer_siginfo): New.
3123 (linux_target_ops): Set it.
3125 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3127 * server.c (gdbserver_usage): Mention --remote-debug.
3128 (main): Accept '--remote-debug' switch.
3130 2009-01-18 Doug Evans <dje@google.com>
3132 * regcache.c (new_register_cache): No need to check result of xcalloc.
3133 * server.c (handle_search_memory): Back out calls to xmalloc,
3134 result is checked and error is returned to user upon failure.
3135 (handle_query): Ditto. Add more checks for result of malloc.
3136 (handle_v_cont): Check result of malloc, report error back to
3138 (handle_v_run): Ditto. Call freeargv.
3139 * server.h (freeargv): Declare.
3140 * utils.c (freeargv): New fn.
3142 2009-01-15 Doug Evans <dje@google.com>
3144 * gdbreplay.c (perror_with_name): Make arg const char *.
3145 * server.h (target_signal_to_name): Make return type const char *.
3146 * thread-db.c (thread_db_err_str): Make return type const char *.
3147 * utils.c (perror_with_name): Make arg const char *.
3149 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3151 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3152 when handling a EXIT_PROCESS_DEBUG_EVENT.
3154 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3156 * gdbreplay.c (gdbreplay_version): Update copyright year.
3157 * server.c (gdbserver_version): Likewise.
3159 2009-01-05 Doug Evans <dje@google.com>
3161 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3162 (handle_extended_wait): Improve comment.
3164 2008-12-13 Doug Evans <dje@google.com>
3166 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3167 * server.h (ATTR_MALLOC): New macro.
3168 (xmalloc,xcalloc,xstrdup): Declare.
3169 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3170 * inferiors.c: Ditto.
3171 * linux-low.c: Ditto.
3172 * mem-break.c: Ditto.
3173 * regcache.c: Ditto.
3174 * remote-utils.c: Ditto.
3177 * win32-low.c: Ditto.
3179 2008-12-12 Doug Evans <dje@google.com>
3181 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3182 in debugging printf.
3184 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3186 2008-12-09 Doug Evans <dje@google.com>
3188 * linux-low.h (struct process_info): Delete member tid, unused.
3189 * thread-db.c (find_one_thread): Update.
3190 (maybe_attach_thread): Update.
3192 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3194 * target.h (struct target_ops): Add qxfer_osdata member.
3195 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3197 (linux_qxfer_osdata): New functions.
3198 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3200 * server.c (handle_query): Handle "qXfer:osdata:read:".
3201 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3202 (buffer_xml_printf): New functions.
3203 * server.h (struct buffer): New.
3204 (buffer_grow_str, buffer_grow_str0): New macros.
3205 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3206 (buffer_xml_printf): Declare.
3208 2008-11-24 Doug Evans <dje@google.com>
3210 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3212 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3214 * server.c (handle_v_run): Always use the supplied argument list.
3216 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3218 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3219 (xtensa_regmap_table): Add entry for scompare1.
3221 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3223 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3224 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3225 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3226 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3227 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3228 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3229 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3230 XML target descriptions.
3231 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3232 when inferior is running on an ISA 2.05 or later processor. Add
3233 special case to return offset for full 64-bit slot of FPSCR when
3236 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3238 * Makefile.in (SFILES, clean): Added sparc64 files.
3239 (reg-sparc64.o, reg-sparc64.c): New.
3240 * configure.srv (sparc*-*-linux*): New configuration.
3241 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3242 syscall arguments for SPARC.
3243 (regsets_store_inferior_registers): Likewise.
3244 * linux-sparc-low.c: New file.
3246 2008-10-21 Doug Evans <dje@google.com>
3248 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3249 (READLINE_DIR,READLINE_DEP): Delete.
3250 (INTERNAL_CFLAGS): Update.
3251 (LINTFLAGS): Update.
3253 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3255 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3256 whole argv from the last run, not just argv[0].
3258 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3260 * regcache.c (new_register_cache): Return NULL if the register
3261 cache size isn't known yet.
3262 (free_register_cache): Avoid dereferencing a NULL regcache.
3264 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3266 * configure.srv: Merge MIPS and MIPS64.
3268 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3270 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3272 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3274 * Makefile.in: Add required vsx dependencies.
3276 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3277 Declare init_registers_powerpc_vsx32l.
3278 Declare init_registers_powerpc_vsx64l.
3279 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3280 (ppc_arch_setup): Check for VSX in hwcap.
3281 (ppc_fill_vsxregset): New function.
3282 (ppc_store_vsxregset): New function.
3283 Add new VSX entry in regset_info target_regsets.
3285 * configure.srv: Add new VSX dependencies.
3287 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3289 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3290 (remote_open): Set or clear transport_is_reliable.
3291 (putpkt_binary): Don't expect acks in noack mode.
3292 (getpkt): Don't send ack/nac in noack mode.
3293 * server.c (handle_general_set): Handle QStartNoAckMode.
3294 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3296 (main): Reset noack_mode on every connection.
3297 * server.h (noack_mode): Declare.
3299 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3301 * Makefile.in (GDBREPLAY_OBS): New variable.
3302 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3304 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3305 Daniel Jacobowitz <dan@codesourcery.com>
3307 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3308 (usr_store_inferior_registers): Likewise.
3309 (regsets_store_inferior_registers): Likewise.
3311 2008-07-31 Rolf Jansen <rj@surtec.com>
3312 Pedro Alves <pedro@codesourcery.com>
3314 * configure.ac: Check for memmem declaration.
3315 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3316 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3317 (disable_packet_qfThreadInfo): Unconditionally compile.
3318 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3319 * configure, config.in: Regenerate.
3321 2008-07-28 Doug Kwan <dougkwan@google.com>
3323 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3324 (linux_write_memory): Remove declaration of errno.
3326 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3328 * linux-low.c (handle_extended_wait): Do not use "status"
3329 variable uninitialized.
3331 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3333 * server.c (handle_v_attach): Inhibit reporting dll changes.
3335 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3337 * remote-utils.c (prepare_resume_reply): If requested, don't
3338 output "thread:TID" in the T stop reply.
3340 * server.c (disable_packet_vCont, disable_packet_Tthread)
3341 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3342 (handle_query): If requested, disable support for qC, qfThreadInfo
3344 (handle_v_requests): If requested, disable support for vCont.
3345 (gdbserver_show_disableable): New.
3346 (main): Handle --disable-packet and --disable-packet=LIST.
3348 * server.h (disable_packet_vCont, disable_packet_Tthread)
3349 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3351 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3353 * server.c (gdbserver_usage): Mention --version.
3355 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3357 * Makefile.in (gdbreplay.o): New rule.
3359 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3361 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3362 message, not gdbserver.
3364 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3365 Nathan Sidwell <nathan@codesourcery.com>
3366 Joseph Myers <joseph@codesourcery.com>
3368 * acinclude.m4: Include ../../config/acx.m4.
3369 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3370 * configure, config.in: Regenerate.
3371 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3372 * server.c (gdbserver_version): Print PKGVERSION.
3373 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3374 (main): Adjust gdbserver_usage calls.
3375 * gdbreplay.c (version, host_name): Add declarations.
3376 (gdbreplay_version, gdbreplay_usage): New.
3377 (main): Accept --version and --help options.
3379 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3381 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3382 (arm_breakpoint_at): Handle Thumb.
3383 (the_low_target): Add comment.
3385 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3387 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3389 2008-05-09 Doug Evans <dje@google.com>
3391 * server.h (decode_search_memory_packet): Declare.
3392 * remote-utils.c (decode_search_memory_packet): New fn.
3393 * server.c (handle_search_memory_1): New fn.
3394 (handle_search_memory): New fn.
3395 (handle_query): Process qSearch:memory packets.
3397 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3399 * regcache.c (registers_length): Remove.
3400 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3401 full register packet.
3402 * regcache.h (registers_length): Remove prototype.
3403 * server.h (PBUFSIZ): Define to 16384.
3405 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3407 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3408 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3409 powerpc-64l.o, and powerpc-altivec64l.o.
3410 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3411 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3412 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3413 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3414 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3417 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3418 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3419 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3420 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3421 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3422 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3423 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3424 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3425 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3426 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3429 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3430 (init_registers_powerpc_32l): ... this new prototype.
3431 (init_registers_powerpc_32): Remove, replace by ...
3432 (init_registers_powerpc_altivec32l): ... this new prototype.
3433 (init_registers_powerpc_e500): Remove, replace by ...
3434 (init_registers_powerpc_e500l): ... this new prototype.
3435 (init_registers_ppc64): Remove, replace by ...
3436 (init_registers_powerpc_64l): ... this new prototype.
3437 (init_registers_powerpc_64): Remove, replace by ...
3438 (init_registers_powerpc_altivec64l): ... this new prototype.
3439 (ppc_num_regs): Set to 73.
3440 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3441 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3442 (ppc_cannot_store_register): Handle orig_r3 and trap.
3443 (ppc_arch_setup): Update init_registers_... calls.
3444 (ppc_fill_gregset): Handle orig_r3 and trap.
3446 * inferiors.c (clear_inferiors): Reset current_inferior.
3448 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
3450 * acinclude.m4: Add override.m4.
3451 * configure: Regenerate.
3453 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3455 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3456 initial call to init_register_ppc64.
3458 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3460 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3461 powerpc*-*-linux* case.
3462 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3464 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3466 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3467 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3469 * linux-ppc-low.c: Include <elf.h>.
3470 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3471 (ppc_hwcap): New global variable.
3472 (ppc_regmap): Remove __SPE__ #ifdef sections.
3473 (ppc_regmap_e500): New global variable.
3474 (ppc_cannot_store_register): Update __SPE__ special case.
3475 (ppc_get_hwcap): New function.
3476 (ppc_arch_setup): Use it to determine whether inferior supports
3477 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3478 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3479 Do not access registers if target does not support AltiVec.
3480 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3481 Do not access registers if target does not support SPE.
3482 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3484 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3486 * linux-low.c (disabled_regsets, num_regsets): New.
3487 (use_regsets_p): Delete.
3488 (linux_wait_for_process): Clear disabled_regsets.
3489 (regsets_fetch_inferior_registers): Check and set it.
3490 (regsets_store_inferior_registers): Likewise.
3491 (linux_fetch_registers, linux_store_registers): Do not use
3493 (initialize_low): Allocate disabled_regsets.
3495 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3497 * Makefile.in (LIBOBJS): New.
3499 (memmem.o): New rule.
3500 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3501 * configure: Regenerated.
3503 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3505 * server.c (handle_query): Never return "unsupported" for
3506 qXfer:features:read queries.
3508 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3510 * server.c (get_features_xml): Fix inverted condition.
3511 (handle_query): Always support qXfer:feature:read.
3513 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3515 * server.c (wrapper_argv): New.
3516 (start_inferior): Handle wrapper_argv. If set, expect an extra
3518 (gdbserver_usage): Document --wrapper.
3519 (main): Parse --wrapper.
3521 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3523 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3524 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3525 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3526 (ppc_set_pc): Likewise.
3527 (ppc_arch_setup): New function.
3528 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3529 of collect_register.
3530 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
3532 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3534 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3535 instead of linux-ppc64-low.o.
3536 * linux-ppc64-low.c: Remove file.
3537 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3538 (linux-ppc64-low.o): Remove rule.
3540 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3541 (init_registers_powerpc_64): Likewise.
3542 (ppc_regmap): Conditionally define depending on __powerpc64__.
3543 (ppc_cannot_store_register): Do not special-case "fpscr" when
3544 compiled on __powerpc64__.
3545 (ppc_collect_ptrace_register): New function.
3546 (ppc_supply_ptrace_register): New function.
3547 (ppc_breakpoint): Change type to "unsigned int".
3548 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3549 (the_low_target): Conditionally provide initializers for the
3550 arch_setup member depending on __powerpc64__. Install
3551 collect_ptrace_register and supply_ptrace_register members.
3553 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3555 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3556 * server.c (gdbserver_xmltarget): Define.
3557 (get_features_xml): Use it to replace "target.xml" and arch_string.
3559 * configure.srv: Remove srv_xmltarget. Add XML files that were
3560 mentioned there to srv_xmlfiles instead. Remove conditional tests
3561 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3562 srv_xmlfiles and srv_regobj to include all possible choices.
3563 * configure.ac (srv_xmltarget): Remove.
3564 (srv_xmlfiles): Do not add "target.xml".
3565 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3566 checks for supplementary target information.
3567 * configure: Regenerate.
3568 * Makefile.in (XML_TARGET): Remove.
3569 (target.xml): Remove rule.
3570 (clean): Do not clean up target.xml.
3571 (.PRECIOUS): Do not mention target.xml.
3573 * target.h (struct target_ops): Remove arch_string member.
3574 * linux-low.c (linux_arch_string): Remove.
3575 (linux_target_ops): Remove arch_string initializer.
3576 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3577 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3578 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3579 * spu-low.c (spu_arch_string): Remove.
3580 (spu_target_ops): Remove arch_string initializer.
3581 * win32-low.c (win32_arch_string): Remove.
3582 (win32_target_ops): Remove arch_string initializer.
3583 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3584 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3585 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3587 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3589 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3590 by collect_ptrace_register and supply_ptrace_register hooks.
3591 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3592 instead of checking for the_low_target.left_pad_xfer.
3593 (usr_store_inferior_registers): Use collect_ptrace_register callback
3594 instead of checking for the_low_target.left_pad_xfer.
3596 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3597 (s390_supply_ptrace_register): Likewise.
3598 (s390_fill_gregset): Call s390_collect_ptrace_register.
3599 (the_low_target): Update.
3601 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3602 (ppc_supply_ptrace_register): Likewise.
3603 (the_low_target): Update.
3605 * linux-i386-low.c (the_low_target): Update.
3606 * linux-x86-64-low.c (the_low_target): Update.
3608 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3610 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3611 reg-s390.o and reg-s390x.o.
3613 * linux-low.c (new_inferior): New global variable.
3614 (linux_create_inferior, linux_attach): Set it.
3615 (linux_wait_for_process): Call the_low_target.arch_setup after the
3616 target has stopped for the first time.
3617 (initialize_low): Do not call the_low_target.arch_setup.
3619 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3620 (s390_set_pc): Likewise.
3621 (s390_arch_setup): New function.
3622 (the_low_target): Use s390_arch_setup as arch_setup routine.
3624 * regcache.c (realloc_register_cache): New function.
3625 (set_register_cache): Call it for each existing regcache.
3627 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3629 * server.h (init_registers): Remove prototype.
3631 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3632 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3633 instead of init_registers ().
3634 * linux-arm-low.c (init_registers_arm): Add prototype.
3635 (init_registers_arm_with_iwmmxt): Likewise.
3636 (the_low_target): Add initializer for arch_setup field.
3637 * linux-cris-low.c (init_registers_cris): Add prototype.
3638 (the_low_target): Add initializer for arch_setup field.
3639 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3640 (the_low_target): Add initializer for arch_setup field.
3641 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3642 (the_low_target): Add initializer for arch_setup field.
3643 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3644 (the_low_target): Add initializer for arch_setup field.
3645 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3646 (the_low_target): Add initializer for arch_setup field.
3647 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3648 (the_low_target): Add initializer for arch_setup field.
3649 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3650 (init_registers_mips64_linux): Likewise.
3651 (the_low_target): Add initializer for arch_setup field.
3652 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3653 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3654 (the_low_target): Add initializer for arch_setup field.
3655 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3656 (init_registers_powerpc_64): Likewise.
3657 (the_low_target): Add initializer for arch_setup field.
3658 * linux-s390-low.c (init_registers_s390): Add prototype.
3659 (init_registers_s390x): Likewise.
3660 (the_low_target): Add initializer for arch_setup field.
3661 * linux-sh-low.c (init_registers_sh): Add prototype.
3662 (the_low_target): Add initializer for arch_setup field.
3663 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3664 (the_low_target): Add initializer for arch_setup field.
3665 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3666 (the_low_target): Add initializer for arch_setup field.
3668 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3669 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3670 instead of init_registers ().
3671 * win32-arm-low.c (init_registers_arm): Add prototype.
3672 (the_low_target): Add initializer for arch_setup field.
3673 * win32-i386-low.c (init_registers_i386): Add prototype.
3674 (the_low_target): Add initializer for arch_setup field.
3676 * spu-low.c (init_registers_spu): Add prototype.
3677 (initialize_low): Call initialie_registers_spu () instead of
3678 initialize_registers ().
3680 2008-02-19 Pedro Alves <pedro@codesourcery.com>
3682 * server.c (handle_v_requests): When handling the vRun and vAttach
3683 packets, if already debugging a process, don't kill it. Return an
3686 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3688 * server.c (handle_query): Correct length check.
3690 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3692 * win32-low.c (do_initial_child_stuff): Add process handle
3693 parameter. Set current_process_handle and current_process_id from the
3694 parameters. Clear globals.
3695 (win32_create_inferior): Don't set current_process_handle and
3696 current_process_id here. Instead pass them on the call to
3697 do_initial_child_stuff.
3698 (win32_attach): Likewise.
3699 (win32_clear_inferiors): New.
3700 (win32_kill): Don't close the current process handle or the
3701 current thread handle here. Instead call win32_clear_inferiors.
3702 (win32_detach): Don't open a new handle to the process. Call
3703 win32_clear_inferiors.
3704 (win32_join): Don't rely on current_process_handle; open a new
3705 handle using the process id.
3706 (win32_wait): Call win32_clear_inferiors when the inferior process
3709 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3711 * server.c (monitor_show_help): Add "exit".
3713 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3715 * Makefile.in (SFILES): Add linux-xtensa-low.c.
3716 (clean): Add reg-xtensa.c.
3717 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3718 * configure.srv (xtensa*-*-linux*) New target.
3719 * linux-xtensa-low.c: New.
3720 * xtensa-xtregs.c: New.
3722 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3724 * hostio.c: Don't include errno.h.
3725 (errno_to_fileio_errno): Move to hostio-errno.
3726 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3727 error number outputting to the target->hostio_last_error callback.
3728 (hostio_packet_error): Use FILEIO_EINVAL directly.
3729 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3730 calls to hostio_error.
3731 * hostio-errno.c: New.
3732 * server.h (hostio_last_error_from_errno): Declare.
3733 * target.h (target_ops): Add hostio_last_error member.
3734 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3735 as hostio_last_error handler.
3736 * spu-low.c (spu_target_ops): Likewise.
3737 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3738 (wince_hostio_last_error): New functions.
3739 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3740 as hostio_last_error handler.
3741 (win32_target_ops) [!_WIN32_WCE]: Register
3742 hostio_last_error_from_errno as hostio_last_error handler.
3743 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3744 (hostio-errno.o): New rule.
3745 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3746 * configure.srv (srv_hostio_err_objs): New variable. Default to
3748 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3749 * configure: Regenerate.
3751 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3753 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3754 (linux_kill, linux_detach): Clean up the process list.
3755 * remote-utils.c (remote_open): Improve port number parsing.
3756 (putpkt_binary, input_interrupt): Only send interrupts if the target
3758 * server.c (extended_protocol): Make static.
3759 (attached): Define earlier.
3760 (exit_requested, response_needed, program_argv): New variables.
3761 (target_running): New.
3762 (start_inferior): Clear attached here.
3763 (attach_inferior): Set attached here.
3764 (require_running): Define.
3765 (handle_query): Use require_running and target_running. Implement
3767 (handle_v_attach, handle_v_run): New.
3768 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3769 (gdbserver_usage): Update.
3770 (main): Redo argument parsing. Handle --debug and --multi. Handle
3771 --attach along with other options or after the port. Save
3772 program_argv. Support no initial program. Resynchronize
3773 communication with GDB after an error. Handle "monitor exit".
3774 Use require_running and target_running. Always allow the extended
3775 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3776 restart in extended mode.
3777 * README: Refer to the GDB manual. Update --attach usage.
3779 2007-12-20 Andreas Schwab <schwab@suse.de>
3781 * linux-low.c (STACK_SIZE): Define.
3782 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3783 (linux_test_for_tracefork): Likewise.
3785 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3787 * linux-low.c (linux_wait_for_event): Update messages. Do not
3788 reinsert auto-delete breakpoints.
3789 * mem-break.c (struct breakpoint): Change return type of handler to
3791 (set_breakpoint_at): Update handler type.
3792 (reinsert_breakpoint_handler): Return 1 instead of calling
3794 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3796 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3797 * mem-break.h (set_breakpoint_at): Update handler type.
3798 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3799 * win32-low.c (auto_delete_breakpoint): New.
3800 (get_child_debug_event): Use it.
3802 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3804 * configure.ac: Check for pread and pwrite.
3805 * hostio.c (handle_pread): Fall back to lseek and read.
3806 (handle_pwrite): Fall back to lseek and write.
3807 * config.in, configure: Regenerated.
3809 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3811 * server.c (myresume): Add own_buf argument.
3812 (main): Update calls.
3814 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3816 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3817 * remote-utils.c (remote_open): Do not call disable_async_io.
3818 (block_async_io): Delete.
3819 (unblock_async_io): Make static.
3820 (initialize_async_io): New.
3821 * server.c (handle_v_cont): Handle async I/O here.
3822 (myresume): Likewise. Move other common resume tasks here...
3823 (main): ... from here. Call initialize_async_io. Disable async
3824 I/O before the main loop.
3825 * server.h (initialize_async_io): Declare.
3826 (block_async_io, unblock_async_io): Delete prototypes.
3827 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3829 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3831 * remote-utils.c (readchar): Allow binary data in received messages.
3833 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3835 * win32-low.c (attaching): New global.
3836 (win32_create_inferior): Clear the `attaching' global.
3837 (win32_attach): Set the `attaching' global.
3838 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3839 attaching. Only set a breakpoint at the entry point if not
3842 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3844 * server.c (main): Don't report dll events on the initial
3845 connection on attaches.
3847 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3849 * server.c (main): Relax numerical bases supported for the pid of
3850 the --attach command line argument.
3852 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3854 * win32-low.c (win32_attach): Call OpenProcess before
3855 DebugActiveProcess, not after. Add last error output to error
3858 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3860 * win32-low.c (win32_get_thread_context)
3861 (win32_set_thread_context): New functions.
3862 (thread_rec): Use win32_get_thread_context.
3863 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3864 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3867 2007-12-03 Leo Zayas
3868 Pedro Alves <pedro_alves@portugalmail.pt>
3870 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3872 (child_add_thread): Minor cleanup.
3873 (child_continue): Resume artificially suspended threads before
3874 calling ContinueDebugEvent.
3875 (suspend_one_thread): New.
3876 (fake_breakpoint_event): New.
3877 (get_child_debug_event): Change return type to int. Check here if
3878 gdb sent an interrupt request. If a soft interrupt was requested,
3879 fake a breakpoint event. Return 0 if there is no event to handle,
3881 (win32_wait): Don't check here if gdb sent an interrupt request.
3882 Ensure there is a valid event to handle.
3883 (win32_request_interrupt): Add soft interruption method as last
3886 2007-12-03 Leo Zayas
3887 Pedro Alves <pedro_alves@portugalmail.pt>
3889 * win32-low.h (win32_thread_info): Add descriptions to the
3890 structure members. Replace `suspend_count' counter by a
3892 * win32-low.c (thread_rec): Update condition of when to get the
3893 context from the inferior. Rely on ContextFlags being set if it
3894 has already been retrieved. Only suspend the inferior thread if
3895 we haven't already. Warn if that fails.
3896 (continue_one_thread): s/suspend_count/suspended/. Only call
3897 ResumeThread once. Warn if that fails.
3899 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3901 * win32-low.c (win32_wait): Don't read from the inferior when it
3904 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3906 * Makefile.in (win32_low_h): New variable.
3907 (win32-low.o): Add dependency on $(win32_low_h).
3908 (win32-arm-low.o, win32-i386-low.o): New rules.
3910 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3912 * hostio.c: Correct copyright year.
3914 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3916 * Makefile.in (OBS): Add hostio.o.
3917 (hostio.o): New rule.
3918 * server.h (handle_vFile): Declare.
3919 * hostio.c: New file.
3920 * server.c (handle_v_requests): Take packet_len and new_packet_len
3921 for binary packets. Call handle_vFile.
3922 (main): Update call to handle_v_requests.
3924 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3926 * linux-low.c: Include <sched.h>.
3928 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3930 * linux-low.c (linux_tracefork_grandchild): New.
3931 (linux_tracefork_child): Use clone.
3932 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3934 2007-10-31 Joel Brobecker <brobecker@adacore.com>
3936 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3938 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3940 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3942 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3944 * inferiors.c (change_inferior_id): Delete.
3945 (add_pid_to_list, pull_pid_from_list): New.
3946 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3947 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3948 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3949 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3950 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3951 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3952 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3953 (using_threads): Always set to 1.
3954 (handle_extended_wait): New.
3955 (add_process): Do not set TID.
3956 (linux_create_inferior): Set must_set_ptrace_flags.
3957 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3958 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3959 (linux_thread_alive): Rename TID argument to LWPID.
3960 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3961 (linux_wait_for_event): Do not use TID or check using_threads. Update
3962 call to dead_thread_notify. Call handle_extended_wait.
3963 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3964 (send_sigstop): Delete sigstop_sent.
3965 (wait_for_sigstop): Avoid TID.
3966 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3967 (linux_test_for_tracefork): New.
3968 (linux_lookup_signals): Use thread_db_active and
3969 linux_supports_tracefork_flag.
3970 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3971 * linux-low.h (get_process_thread): Avoid TID.
3972 (struct process_ifo): Move thread_known and tid to the end. Remove
3974 (linux_attach_lwp, thread_db_init): Update prototypes.
3975 * server.h (change_inferior_id): Delete prototype.
3976 (add_pid_to_list, pull_pid_from_list): New prototypes.
3977 * thread-db.c (thread_db_use_events): New.
3978 (find_first_thread): Rename to...
3979 (find_one_thread): ...this. Update callers and messages. Do not
3980 call fatal. Check thread_db_use_events. Do not call
3981 change_inferior_id or new_thread_notify.
3982 (maybe_attach_thread): Update. Do not call new_thread_notify.
3983 (thread_db_init): Set thread_db_use_events. Check use_events.
3984 * utils.c (fatal, warning): Correct message prefix.
3986 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3988 * Makefile.in (clean): Remove new files.
3989 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3990 (powerpc-64.o, powerpc-64.c): New rules.
3991 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3992 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3994 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3996 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3997 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3998 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3999 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4000 (target_regsets): Add AltiVec and SPE register sets.
4001 * configure.ac: Check for AltiVec and SPE.
4002 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4003 (ppc_fill_vrregset, ppc_store_vrregset): New.
4004 (target_regsets): Add AltiVec register set.
4005 * configure: Regenerated.
4007 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4009 * linux-low.c (O_LARGEFILE): Define.
4010 (linux_read_memory): Use /proc/PID/mem.
4011 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4012 * configure, config.in: Regenerated.
4014 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4016 * linux-low.c (linux_wait_for_event): Do not pass signals while
4019 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4021 * win32-low.c (create_process): New.
4022 (win32_create_inferior): Use create_process instead of
4023 CreateProcess. If create_process failed retry appending an ".exe"
4024 suffix. Store the GetLastError result immediatelly after
4025 create_process calls and use it on the call to error.
4027 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4029 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4031 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4033 * configure.ac: Switch license to GPLv3.
4035 2007-08-01 Michael Snyder <msnyder@access-company.com>
4037 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4039 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4041 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4043 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4044 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4045 CloseToolhelp32Snapshot.
4046 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4047 CloseToolhelp32Snapshot.
4049 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4051 * server.c (main): Check for inferior exit before main loop.
4053 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4055 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4056 instead of on tmp_desc.
4058 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4059 Daniel Jacobowitz <dan@codesourcery.com>
4061 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4062 (add_thread): Minor cleanups.
4063 (clear_inferiors): Move lower in the file. Clear the DLL
4065 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4066 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4067 (xml_escape_text): New.
4068 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4070 (handle_v_cont): Report errors.
4071 (gdbserver_version): Update.
4072 (main): Correct size of own_buf. Do not report initial DLL events.
4073 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4074 (unloaded_dll, xml_escape_text): New.
4075 * win32-low.c (enum target_waitkind): Update comments.
4076 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4077 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4078 (win32_EnumProcessModules, win32_GetModuleInformation)
4079 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4080 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4081 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4082 (win32_Module32First, win32_Module32Next, load_toolhelp)
4083 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4084 (get_child_debug_event): Handle DLL events.
4085 (win32_wait): Likewise.
4087 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4089 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4090 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4092 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4094 * win32-low.c (handle_output_debug_string): Ignore event if not
4097 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4099 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4101 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4103 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4105 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4107 * inferiors.c (change_inferior_id): Add comment.
4108 * linux-low.c (check_removed_breakpoint): Add an early
4109 prototype. Improve debug output.
4110 (linux_attach): Doc update.
4111 (linux_detach_one_process, linux_detach): Clean up before releasing
4113 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4114 * linux-low.h (struct process_info): Doc improvement.
4115 * mem-break.c (delete_all_breakpoints): New.
4116 * mem-break.h (delete_all_breakpoints): New prototype.
4117 * thread-db.c (find_first_thread): New.
4118 (thread_db_create_event): Call it instead of
4119 thread_db_find_new_threads. Clean up unused variables.
4120 (maybe_attach_thread): Remove first thread handling.
4121 (thread_db_find_new_threads): Use find_first_thread.
4122 (thread_db_get_tls_address): Likewise.
4124 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4126 * thread-db.c (thread_db_find_new_threads): Add prototype.
4127 (thread_db_create_event): Check for the main thread before adding
4129 (maybe_attach_thread): Only enable event reporting if TID == 0.
4130 (thread_db_get_tls_address): Check for new threads.
4132 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4134 * linux-low.c (linux_create_inferior): Try execv before execvp.
4135 * spu-low.c (spu_create_inferior): Likewise.
4137 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4139 * linux-low.c (linux_create_inferior): Change execv to execvp.
4140 * spu-low.c (spu_create_inferior): Likewies.
4142 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4144 * Makefile.in (clean): Clean new files instead of deleted ones.
4145 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4146 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4148 * configure.srv: Specify XML files and new regformats for MIPS and
4150 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4151 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4152 an entry for the restart register.
4153 (mips_cannot_fetch_register, mips_cannot_store_register)
4154 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4155 register names to match the XML descriptions.
4156 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4157 restart register instead of $0.
4159 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4160 Markus Deuling <deuling@de.ibm.com>
4162 * remote-utils.c (decode_xfer_write): New function.
4163 * server.h (decode_xfer_write): Add prototype.
4164 * server.c (handle_query): Add PACKET_LEN argument. Support
4165 qXfer:spu:read and qXfer:spu:write packets.
4166 (main): Pass packet_len to handle_query.
4167 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4168 * target.h (target_ops): Add qxfer_spu.
4170 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4172 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4173 accessing non-seekable spufs files.
4175 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4177 * server.c (handle_query): Add reply for qC packet.
4179 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4180 Leo Zayas <lerele@champenstudios@com>
4182 * server.h (check_remote_input_interrupt_request): New function.
4183 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4184 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4185 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4186 (check_remote_input_interrupt_request): New function.
4187 * server.h (check_remote_input_interrupt_request): Declare.
4188 * win32-low.c (winapi_DebugBreakProcess,
4189 winapi_GenerateConsoleCtrlEvent): New typedefs.
4190 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4192 (win32_wait): Check for remote interrupt request
4193 with check_remote_input_interrupt_request.
4194 (win32_request_interrupt): New function.
4195 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4197 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4199 * win32-low.c (debug_registers_changed,
4200 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4201 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4202 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4203 (thread_rec): Get context using the low target.
4204 (child_add_thread): Call thread_added on the low target,
4205 which does the same thing.
4207 (do_initial_child_stuff): Remove debug registers references.
4208 Set context using the low target. Resume threads after
4209 setting the contexts.
4210 (child_continue): Remove dead variable. Remove debug
4211 registers references.
4212 (child_fetch_inferior_registers): Go through the low target.
4213 (do_child_store_inferior_registers): Remove.
4214 (child_store_inferior_registers): Go through the low target.
4215 (win32_resume): Remove debug registers references.
4216 Set context using the low target.
4217 (handle_exception): Change return type to void. Don't record
4218 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4219 first chance exception.
4220 (get_child_debug_event): Change return type to void. Remove
4221 goto loop. Always return after waiting for debug event.
4222 (win32_wait): Convert to switch statement. Handle spurious
4225 * win32-i386-low.c (debug_registers_changed,
4226 debug_registers_used): New.
4227 (initial_stuff): Rename to ...
4228 (i386_initial_stuff): ... this. Clear debug registers
4230 (store_debug_registers): Delete.
4231 (i386_get_thread_context): New.
4232 (load_debug_registers): Delete.
4233 (i386_set_thread_context): New.
4234 (i386_thread_added): New.
4235 (single_step): Rename to ...
4236 (i386_single_step): ... this.
4237 (do_fetch_inferior_registers): Rename to ...
4238 (i386_fetch_inferior_register): ... this.
4239 (i386_store_inferior_register): New.
4240 (the_low_target): Adapt to new interface.
4242 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4243 (arm_get_thread_context): New.
4244 (arm_set_thread_context): New.
4246 (do_fetch_inferior_registers): Rename to ...
4247 (arm_fetch_inferior_register): ... this.
4248 (arm_store_inferior_register): New.
4249 (arm_wince_breakpoint): Reimplement as unsigned long.
4250 (arm_wince_breakpoint_len): Define.
4251 (the_low_target): Adapt to new interface.
4253 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4254 load_debug_registers. Add get_thread_context, set_thread_context,
4255 thread_added and store_inferior_register. Rename
4256 fetch_inferior_registers to fetch_inferior_register.
4257 (regptr): Remove declaration.
4259 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4261 * linux-low.c (linux_detach): Change return type to int. Return 0.
4262 * spu-low.c (spu_detach): Likewise.
4264 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4266 * target.h (target_ops): Change return type of detach to int.
4268 (join_inferior): New.
4269 * server.c (main): Don't skip detach support on mingw32.
4270 If the inferior doesn't support detaching return error.
4271 Call join_inferior instead of using waitpid.
4272 * linux-low.c (linux_join): New.
4273 (linux_target_op): Add linux_join.
4274 * spu-low.c (spu_join): New.
4275 (spu_target_ops): Add spu_join.
4276 * win32-low.c (win32_detach): Adapt to new interface.
4277 Reopen current_process_handle before detaching. Issue a child
4278 resume before detaching.
4280 (win32_target_op): Add win32_join.
4282 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4284 * win32-low.c (win32-attach): Fix return value.
4285 * target.h (target_ops): Describe ATTACH return values.
4287 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4289 * win32-low.c (GETPROCADDRESS): Define.
4290 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4291 (winapi_DebugSetProcessKillOnExit): Likewise.
4292 (win32_create_inferior): Force usage of ansi CreateProcessA.
4293 (win32_attach): Use GETPROCADDRESS.
4294 (win32_detach): Likewise.
4296 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4298 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4300 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4302 * win32-low.c: Commit leftover changes from 2007-03-29.
4304 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4306 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4307 fields short instead of int. Add explicit padding.
4308 (i387_cache_to_fsave): Remove unnecessary casts.
4309 (i387_fsave_to_cache): Doc fix.
4310 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4312 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4314 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4315 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4317 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4319 * configure.srv (arm*-*-mingw32ce*): Move near the other
4322 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4324 * configure.ac: Add errno checking.
4325 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4326 sys/file.h and malloc.h.
4327 (AC_CHECK_DECLS): Add perror.
4328 (srv_mingwce): Handle.
4329 * configure.srv (i[34567]86-*-cygwin*): Add
4330 win32-i386-low.o to srv_tgtobj.
4331 (i[34567]86-*-mingw*): Likewise.
4332 (arm*-*-mingw32ce*): Add case.
4333 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4334 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4335 [__MINGW32CE__] (strerror): New function.
4336 [__MINGW32CE__] (errno): Define to GetLastError.
4337 [__MINGW32CE__] (COUNTOF): New macro.
4338 (remote_open): Remove extra close call.
4339 * mem-break.c (delete_breakpoint_at): New function.
4340 * mem-break.h (delete_breakpoint_at): Declare.
4341 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4342 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4343 [USE_WIN32API] (read, write): Add char* casts.
4344 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4345 * server.h: Include wincecompat.h on Windows CE.
4346 [HAVE_ERRNO_H]: Check.
4347 (perror): Declare if not declared.
4348 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4349 (perror_with_name): Remove errno declaration.
4350 * wincecompat.h: New.
4351 * wincecompat.c: New.
4353 * win32-arm-low.c: New.
4354 * win32-i386-low.c: New.
4355 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4356 (OUTMSG2): Make it safe.
4358 (COUNTOF): New macro.
4359 (NUM_REGS): Get it from the low target.
4360 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4361 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4362 (thread_rec): Let low target handle debug registers.
4363 (child_add_thread): Likewise.
4364 (child_init_thread_list): Likewise.
4365 (continue_one_thread): Likewise.
4367 (do_child_fetch_inferior_registers): Move to ...
4368 * win32-i386-low.c: ... here, and rename to ...
4369 (do_fetch_inferior_registers): ... this.
4370 * win32-low.c (child_fetch_inferior_registers):
4371 Go through the low target.
4372 (do_child_store_inferior_registers): Use regptr.
4373 (strwinerror): New function.
4374 (win32_create_inferior): Handle Windows CE.
4375 Use strwinerror instead of strerror on Windows error
4376 codes. Add program to the error output.
4377 Don't close the main thread handle on Windows CE.
4378 (win32_attach): Use coredll.dll on Windows CE.
4379 (win32_kill): Close current process and current
4381 (win32_detach): Use coredll.dll on Windows CE.
4382 (win32_resume): Let low target handle debug registers, and
4384 (handle_exception): Add/Remove initial breakpoint. Avoid
4385 non-existant WSTOPSIG on Windows CE.
4386 (win32_read_inferior_memory): Cast to remove warning.
4387 (win32_arch_string): Go through the low target.
4388 (initialize_low): Call set_breakpoint_data with the low
4389 target's breakpoint.
4390 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4391 FOP_REGNUM, mappings): Move to ...
4392 * win32-i386-low.c: ... here.
4393 * win32-low.c (win32_thread_info): Move to ...
4394 * win32-low.h: ... here.
4395 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4396 win32-arm-low.c and wincecompat.c.
4397 (all:): Add $EXEEXT.
4398 (install-only:): Likewise.
4399 (gdbserver:): Likewise.
4400 (gdbreplay:): Likewise.
4401 * config.in: Regenerate.
4402 * configure: Regenerate.
4404 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4406 * win32-low.c: Rename typedef thread_info to
4407 win32_thread_info throughout.
4409 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4411 * win32-i386-low.c: Rename to ...
4412 * win32-low.c: ... this.
4413 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4414 * Makefile.in: Likewise.
4416 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4418 * remote-utils.c (monitor_output): Constify msg parameter.
4419 * server.h (monitor_output): Likewise.
4420 * win32-i386-low.c (handle_output_debug_string): New.
4421 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4422 handle_output_debug_string.
4423 (get_child_debug_event): Likewise.
4425 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4427 * server.c (main): Correct strtoul check.
4429 2007-03-27 Jon Ringle <jon@ringle.org>
4431 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4433 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4435 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4437 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4439 * terminal.h: Check HAVE_SGTTY_H.
4441 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
4443 * remote-utils.c (remote_open): Print out the assigned port number.
4445 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4447 * remote-utils.c (monitor_output): New function.
4448 * server.c (debug_threads): Define here.
4449 (monitor_show_help): New function.
4450 (handle_query): Handle qRcmd.
4451 (main): Do not handle 'd' packet.
4452 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4453 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4456 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4458 * Makefile.in (EXEEXT): New.
4459 (clean): Use $(EXEEXT).
4461 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4463 * target.h (target_ops): Rename send_signal to request_interrupt,
4464 and remove enum target_signal parameter.
4465 * linux-low.c (linux_request_interrupt): Rename from
4466 linux_send_signal, and always send SIGINT.
4467 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4468 and always send SIGINT.
4469 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4471 (input_interrupt): Likewise.
4473 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4475 * server.c (get_features_xml): Check if target implemented
4477 * win32-i386-low.c (win32_arch_string): New.
4478 (win32_target_ops): Add win32_arch_string as arch_string member.
4480 2007-02-22 Markus Deuling <deuling@de.ibm.com>
4482 * spu-low.c (spu_arch_string): New.
4483 (spu_target_ops): Add spu_arch_string.
4485 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4487 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4488 * configure.ac: Do not check for terminal.h.
4489 * configure, config.in: Regenerated.
4491 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4493 * Makefile.in (OBS): Add $(XML_BUILTIN).
4494 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4496 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4497 (arm-with-iwmmxt.c): New.
4498 * config.in, configure: Regenerate.
4499 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4500 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4501 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4502 (arm*-*-linux*): Add iWMMXt and regset support.
4503 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4504 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4505 (arm_store_wmmxregset, target_regsets): New.
4506 * server.c (get_features_xml): Take annex argument. Check builtin
4508 (handle_query): Handle multiple annexes.
4510 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4512 * remote-utils.c [USE_WIN32API] (read, write): Define.
4513 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4516 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4518 * linux-i386-low.c (the_low_target): Set arch_string.
4519 * linux-x86-64-low.c (the_low_target): Likewise.
4520 * linux-low.c (linux_arch_string): New.
4521 (linux_target_ops): Add it.
4522 * linux-low.h (struct linux_target_ops): Add arch_string.
4523 * server.c (write_qxfer_response): Use const void * for DATA.
4524 (get_features_xml): New.
4525 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4526 * target.h (struct target_ops): Add arch_string method.
4528 2007-01-03 Denis Pilat <denis.pilat@st.com>
4529 Daniel Jacobowitz <dan@codesourcery.com>
4531 * linux-low.c (linux_kill): Handle being called with no threads.
4532 * win32-i386-low.c (win32_kill): Likewise.
4533 (get_child_debug_event): Clear current_process_handle.
4535 2006-12-30 Denis PILAT <denis.pilat@st.com>
4536 Daniel Jacobowitz <dan@codesourcery.com>
4538 * remote-utils.c (remote_open): Check the type of specified
4539 serial port devices before opening them.
4540 * server.c (main): Kill the inferior if an error occurs during
4541 the first remote_open.
4543 2006-12-05 Markus Deuling <deuling@de.ibm.com>
4545 * README: Update supported targets.
4547 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4549 * Makefile.in (clean): Remove reg-mips64.c.
4550 (reg-mips64.c, reg-mips64.o): New rules.
4551 * configure.srv: Handle mips64. Include regset support for mips.
4552 * linux-mips-low.c (union mips_register): New.
4553 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4554 (mips_breakpoint, mips_breakpoint_at): Use int.
4555 (mips_collect_register, mips_supply_register)
4556 (mips_collect_register_32bit, mips_supply_register_32bit)
4557 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4558 (mips_store_fpregset, target_regsets): New.
4559 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4561 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4563 * configure.srv: Add target "spu*-*-*".
4564 * Makefile.in (clean): Remove reg-spu.c.
4565 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4566 * spu-low.c: New file.
4568 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4570 * configure.ac: Correct td_thr_tls_get_addr test.
4571 * configure: Regenerated.
4573 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4575 * linux-low.c (linux_wait_for_event): Reformat. Use the
4577 * remote-utils.c (decode_address_to_semicolon): New.
4578 * server.c (pass_signals, handle_general_set): New.
4579 (handle_query): Mention QPassSignals for qSupported.
4580 (main): Call handle_general_set.
4581 * server.h (pass_signals, decode_address_to_semicolon): New.
4583 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4585 * server.c (handle_query): Correct error handling for read_auxv.
4587 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4589 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4590 and srv_linux_thread_db to yes.
4591 * linux-s390-low.c (s390_fill_gregset): New function.
4592 (target_regsets): Define data structure.
4594 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4596 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4597 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4598 * config.in, configure: Regenerated.
4599 * inferiors.c (gdb_id_to_thread): New function.
4600 (gdb_id_to_thread_id): Use it.
4601 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4602 * linux-low.h (struct process_info): Add th member.
4603 (thread_db_get_tls_address): New prototype.
4604 * remote-utils.c (decode_address): Make non-static.
4605 * server.c (handle_query): Handle qGetTLSAddr.
4606 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4607 * target.h (struct target_ops): Add get_tls_address.
4608 * thread-db.c (maybe_attach_thread): Save the thread handle.
4609 (thread_db_get_tls_address): New.
4611 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4613 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4614 (linux_resume_one_process): Take a siginfo_t *. Update all
4615 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4616 (struct pending_signals): Add a siginfo_t.
4617 (linux_wait_for_process): Always set last_status.
4618 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4619 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4620 * linux-low.h (struct process_info): Add last_status.
4622 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4624 * remote-utils.c (try_rle): New function.
4625 (putpkt_binary): Use it.
4627 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4629 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4630 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4631 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4632 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4633 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4636 2006-08-08 Richard Sandiford <richard@codesourcery.com>
4638 * server.c (terminal_fd): New variable.
4639 (old_foreground_pgrp): Likewise.
4640 (restore_old_foreground_pgrp): New function.
4641 (start_inferior): Record the terminal file descriptor in terminal_fd
4642 and its original foreground group in old_foreground_pgrp. Register
4643 restore_old_foreground_pgrp with atexit().
4645 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4647 * server.c (handle_query): Correct qPart to qXfer.
4649 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4651 * configure.ac: Check for more headers which are missing on
4652 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4653 * configure.srv: Add Cygwin and mingw32.
4654 * remote-utils.c: Don't include headers unconditionally which
4655 are missing on mingw32. Include <winsock.h> for mingw32.
4656 (remote_open): Adjust for mingw32 support. Flush
4657 standard error after writing to it.
4658 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4659 (unblock_async_io, enable_async_io, disable_async_io)
4660 (readchar, getpkt): Update for Winsock support.
4661 (prepare_resume_reply): Expect a protocol signal number.
4662 * server.c: Disable <sys/wait.h> on mingw32.
4663 (start_inferior): Adjust for mingw32 support. Flush
4664 standard error after writing to it.
4665 (attach_inferior): Likewise. Use protocol signal
4667 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4669 * win32-i386-low.c: New file.
4670 * Makefile.in (XM_CLIBS): Set.
4671 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4672 (win32-i386-low.o): New dependency rule.
4673 * linux-low.c (linux_wait): Use target signal numbers.
4674 * target.h (struct target_ops): Doc fix.
4675 * server.h (target_signal_to_name): New prototype.
4676 * gdbreplay.c: Don't include headers unconditionally which
4677 are missing on mingw32. Include <winsock.h> for mingw32.
4678 (remote_close, remote_open): Adjust for Winsock support.
4679 * configure, config.in: Regenerated.
4681 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4683 * server.c (decode_xfer_read, write_qxfer_response): New.
4684 (handle_query): Take a packet length argument. Handle
4685 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4686 the qSupported response.
4687 (main): Update call to handle_query.
4689 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4691 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4692 (putpkt_binary): Renamed from putpkt and adjusted for binary
4694 (putpkt): New wrapper for putpkt_binary.
4695 (readchar): Don't mask off the high bit.
4696 (decode_X_packet): New function.
4697 * server.c (main): Call putpkt_binary if a handler sets the packet
4698 length. Save the length of the incoming packet. Handle 'X'.
4699 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4701 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4703 * server.c (handle_query): Handle qSupported.
4705 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4707 * remote-utils.c (all_symbols_looked_up): New variable.
4708 (look_up_one_symbol): Check it.
4709 * server.h (look_up_one_symbol): New declaration.
4710 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4712 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4714 * Makefile.in (linux-arm-low.o): Update dependencies.
4715 * linux-arm-low.c: Include "gdb_proc_service.h".
4716 (PTRACE_GET_THREAD_AREA): Define.
4717 (ps_get_thread_area): New function.
4719 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4721 * configure.srv (m68k*-*-uclinux*): New target.
4722 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4723 (linux_resume_one_process): Remove extraneous cast.
4724 (linux_read_offsets): New.
4725 (linux_target_op): Add linux_read_offsets on mmuless systems.
4726 * server.c (handle_query): Add qOffsets logic.
4727 * target.h (struct target_ops): Add read_offsets.
4729 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4731 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4732 (PTRACE_GET_THREAD_AREA): Define.
4733 (ps_get_thread_area): New function.
4734 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4735 (linux-x86-64-low.o): Update.
4737 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4739 * configure.ac: Remove checks for prfpregset_t.
4740 * gdb_proc_service.h: New file.
4741 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4742 new "gdb_proc_service.h".
4743 * proc-service.c: Likewise.
4744 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4745 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4746 * Makefile.in (gdb_proc_service_h): Updated.
4747 * configure, config.in: Regenerated.
4749 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4751 * remote-utils.c (prepare_resume_reply): Move declaration
4752 of gdb_id_from_wait to the top of the block.
4754 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4756 * linux-low.c (regsets_store_inferior_registers): Read the regset
4757 from the target before filling it.
4759 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4761 * server.c (attach_inferior): Return SIGTRAP for a successful
4764 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4766 * Makefile.in (OBS): Add version.o.
4767 (STAGESTUFF): Delete.
4768 (version.o): Add dependencies.
4769 (version.c): Replace rule.
4770 (clean): Remove version.c.
4771 * server.c (gdbserver_version): New.
4772 (gdbserver_usage): Use printf.
4773 (main): Handle --version and --help.
4774 * server.h (version, host_name): Add declarations.
4776 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4788 * linux-x86-64-low.c:
4791 * linux-ppc64-low.c:
4800 * linux-crisv32-low.c:
4812 * gdbserver.1: Add (C) after Copyright. Update the FSF
4815 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4817 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4818 (arm_breakpoint_at): Recognize both breakpoints.
4819 (the_low_target): Use the correct breakpoint instruction.
4821 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4823 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4824 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4825 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4826 (the_low_target): Update.
4828 2005-10-25 Andreas Schwab <schwab@suse.de>
4830 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4832 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4833 (ia64_num_regs): Reduce to 462.
4835 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4837 * acinclude.m4: Correct quoting.
4838 * aclocal.m4: Regenerated.
4840 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4841 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4842 (thread_db_init): Call thread_db_err_str.
4843 * configure.ac: Check for TD_VERSION.
4844 * config.in, configure: Regenerated.
4846 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4848 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4850 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4852 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4853 is not available. Define HAVE_PTRACE_GETREGS if it is.
4854 * config.in, configure: Regenerated.
4855 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4856 * linux-i386-low.c, linux-m68k-low.c: Update to use
4857 HAVE_PTRACE_GETREGS.
4858 * linux-low.c (regsets_fetch_inferior_registers)
4859 (regsets_store_inferior_registers): Only return 0 if we processed
4861 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4862 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4864 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4866 * inferiors.c (struct thread_info): Add gdb_id.
4867 (add_thread): Add gdb_id argument.
4868 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4869 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4870 calls to add_thread.
4871 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4872 * server.c (handle_query): Use thread_to_gdb_id.
4873 (handle_v_cont, main): Use gdb_id_to_thread_id.
4874 * server.h (add_thread): Update prototype.
4875 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4878 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4880 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4881 left-padded registers.
4882 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4883 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4885 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4887 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4888 * configure: Regenerate.
4889 * config.in: Regenerate.
4890 * server.h (NEED_DECLARATION_STRERROR):
4891 Replace with !HAVE_DECL_STRERROR.
4893 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4895 * linux-low.c (linux_wait, linux_send_signal): Don't test
4896 an unsigned long variable for > 0 if it could be MAX_ULONG.
4897 * server.c (myresume): Likewise.
4898 * target.c (set_desired_inferior): Likewise.
4900 2005-06-13 Mark Kettenis <kettenis@gnu.org>
4902 * configure.ac: Simplify and improve check for socklen_t.
4903 * configure, config.in: Regenerate.
4905 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4907 * acconfig.h: Remove.
4908 * configure.ac: Add a test for socklen_t. Use three-argument
4909 AC_DEFINE throughout.
4910 * config.in: Regenerated using autoheader 2.59.
4911 * configure: Regenerated.
4913 * gdbreplay.c (socklen_t): Provide a default.
4914 (remote_open): Use socklen_t.
4915 * remote-utils.c (socklen_t): Provide a default.
4916 (remote_open): Use socklen_t.
4917 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4920 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4922 * linux-low.c (linux_read_memory, linux_write_memory)
4923 (linux_read_auxv): Likewise.
4924 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4925 (check_mem_write): Likewise.
4926 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4928 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4929 (registers_from_string, register_data): Likewise.
4930 * server.c (handle_query, main): Likewise.
4931 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4932 (decode_M_packet): Likewise.
4933 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4934 * target.h (struct target_ops): Update read_memory, write_memory,
4936 (read_inferior_memory, write_inferior_memory): Update.
4937 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4939 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4940 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4941 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4942 linux-s390-low.c, linux-sh-low.c: Update for changes in
4943 read_inferior_memory and the_low_target->breakpoint.
4945 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4947 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4948 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4949 * configure.srv: Add powerpc64-*-linux*.
4950 * linux-ppc64-low.c: New file.
4952 2005-05-23 Orjan Friberg <orjanf@axis.com>
4954 * linux-cris-low.c: New file with support for CRIS.
4955 * linux-crisv32-low.c: Ditto for CRISv32.
4956 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4957 (clean): Add reg-cris.c and reg-crisv32.c.
4958 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4959 reg-crisv32.o, and reg-crisv32.c to make rules.
4960 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4963 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4965 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4966 of sizeof (PTRACE_XFER_TYPE).
4967 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4969 2005-05-12 Orjan Friberg <orjanf@axis.com>
4971 * target.h (struct target_ops): Add insert_watchpoint,
4972 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4973 pointers for hardware watchpoint support.
4974 * linux-low.h (struct linux_target_ops): Ditto.
4975 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4976 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4977 to linux_target_ops.
4978 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4980 * server.c (main): Recognize 'Z' and 'z' packets.
4982 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4984 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4985 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4986 (the_low_target): Add new members.
4988 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4990 * proc-service.c (ps_lgetregs): Search all_processes instead of
4993 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4995 * server.c (start_inferior): Change return type to int.
4996 (attach_inferior): Change sigptr to int *.
4997 (handle_v_cont, handle_v_requests): Change signal to int *.
4998 (main): Change signal to int.
5000 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5002 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5003 * configure.srv: Add m32r*-*-linux*.
5004 * linux-m32r-low.c: New file.
5006 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5008 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5010 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5012 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5013 Take unsigned long arguments for PIDs.
5014 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5015 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5016 (wait_for_sigstop, linux_resume_one_process)
5017 (regsets_fetch_inferior_registers, linux_send_signal)
5018 (linux_read_auxv): Likewise. Update the types of variables holding
5019 PIDs. Update format string specifiers.
5020 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5021 * remote-utils.c (prepare_resume_reply): Likewise.
5022 * server.c (cont_thread, general_thread, step_thread)
5023 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5025 (handle_query): Update format specifiers.
5026 (handle_v_cont, main): Use strtoul for thread IDs.
5027 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5028 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5029 (general_thread, step_thread, thread_from_wait)
5030 (old_thread_from_wait): Update.
5031 * target.h (struct thread_resume): Use unsigned long for THREAD.
5032 (struct target_ops): Use unsigned long for arguments to attach and
5035 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5037 * acinclude.m4: Include bfd/bfd.m4 directly.
5038 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5039 <agriffis@toolchain.org>.
5040 * aclocal.m4, configure: Regenerated.
5042 2005-01-07 Andrew Cagney <cagney@gnu.org>
5044 * configure.ac: Rename configure.in, require autoconf 2.59.
5045 * configure: Re-generate.
5047 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5049 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5051 * aclocal.m4: Regenerated.
5052 * configure: Regenerated.
5054 2004-11-21 Andreas Schwab <schwab@suse.de>
5056 * linux-m68k-low.c (m68k_num_gregs): Define.
5057 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5058 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5059 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5060 (m68k_breakpoint_at): New. Add to the_low_target.
5062 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5063 srv_linux_thread_db to yes.
5065 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5067 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5068 (ARCH_SET_FS): Likewise.
5069 (ARCH_GET_FS): Likewise.
5070 (ARCH_GET_GS): Likewise.
5072 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5074 * linux-i386-low.c (ps_get_thread_area): New.
5075 * linux-x86-64-low.c (ps_get_thread_area): New.
5076 * linux-low.c: Include <sys/syscall.h>.
5077 (linux_kill_one_process): Don't kill the first thread here.
5078 (linux_kill): Kill the first thread here.
5079 (kill_lwp): New function.
5080 (send_sigstop, linux_send_signal): Use it.
5081 * proc-service.c: Clean up #ifdefs.
5082 (fpregset_info): Delete.
5083 (ps_lgetregs): Update and enable implementation.
5084 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5086 * remote-utils.c (struct sym_cache, symbol_cache): New.
5087 (input_interrupt): Print a clearer message.
5088 (async_io_enabled): New variable.
5089 (enable_async_io, disable_async_io): Use it. Update comments.
5090 (look_up_one_symbol): Use the symbol cache.
5091 * thread-db.c (thread_db_look_up_symbols): New function.
5092 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5094 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5096 * configure.in: Test for -rdynamic.
5097 * configure: Regenerated.
5098 * Makefile (INTERNAL_LDFLAGS): New.
5099 (gdbserver, gdbreplay): Use it.
5101 2004-09-02 Andrew Cagney <cagney@gnu.org>
5103 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5105 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5107 * linux-low.c (linux_wait): Clear all_processes list also.
5109 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5111 * linux-low.c: Include <errno.h>. Remove extern declaration of
5114 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5116 * gdbreplay.c, server.h, utils.c: Update copyright years.
5118 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5120 * server.c (main): Print child status or termination signal from
5121 variable 'signal', not 'sig'.
5123 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5125 * linux-low.c (linux_read_memory): Change return type to
5126 int. Check for and return error from ptrace().
5127 * target.c (read_inferior_memory): Change return type to int. Pass
5128 back return status from the_target->read_memory().
5129 * target.h (struct target_ops): Adapt *read_memory() prototype.
5131 (read_inferior_memory): Adapt prototype.
5132 * server.c (main): Return an error packet if
5133 read_inferior_memory() returns an error.
5135 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5137 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5138 Unify with other clean targets.
5140 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5142 * server.c (handle_v_cont): Call set_desired_inferior.
5144 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5146 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5148 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5150 * linux-low.c (linux_wait): Unblock async I/O.
5151 (linux_resume): Block and enable async I/O.
5152 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5153 * server.h (block_async_io, unblock_async_io): Add prototypes.
5155 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5157 * remote-utils.c (remote_open): Print a status notice after
5159 * server.c (attach_inferior): Print a status notice after
5162 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5164 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5166 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5168 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5170 * server.c, target.h: Update copyright years.
5172 2004-02-25 Roland McGrath <roland@redhat.com>
5174 * target.h (struct target_ops): New member `read_auxv'.
5175 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5176 * linux-low.c (linux_read_auxv): New function.
5177 (linux_target_ops): Initialize `read_auxv' member to that.
5179 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5181 Committed by Jim Blandy <jimb@redhat.com>.
5183 * linux-s390-low.c (s390_num_regs): Update.
5184 (s390_regmap): Remove control registers. Use __s390x__ predefine
5185 instead of GPR_SIZE to distiguish s390 and s390x targets.
5187 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5189 * linux-low.c: Update copyright year.
5190 (check_removed_breakpoint): Clear pending_is_breakpoint.
5191 (linux_set_resume_request, linux_queue_one_thread)
5192 (resume_status_pending_p): New functions.
5193 (linux_continue_one_thread): Use process->resume.
5194 (linux_resume): Only resume threads if there are no pending events.
5195 * linux-low.h (struct process_info): Add resume request
5198 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5200 * regcache.c (new_register_cache): Clear the allocated register
5201 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5203 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5205 * linux-low.c (linux_resume): Take a struct thread_resume *
5207 (linux_wait): Update call.
5208 (resume_ptr): New static variable.
5209 (linux_continue_one_thread): Renamed from
5210 linux_continue_one_process. Use resume_ptr.
5211 (linux_resume): Use linux_continue_one_thread.
5212 * server.c (handle_v_cont, handle_v_requests): New functions.
5213 (myresume): New function.
5214 (main): Handle 'v' case.
5215 * target.h (struct thread_resume): New type.
5216 (struct target_ops): Change argument of "resume" to struct
5218 (myresume): Delete macro.
5220 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5222 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5223 (uninstall): Support DESTDIR.
5225 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5227 * configure.srv: Add xscale*linux copy of arm*linux entry.
5229 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5231 * linux-arm-low.c (arm_reinsert_addr): New function.
5232 (the_low_target): Add arm_reinsert_addr.
5234 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5236 * mem-break.c: Remove whitespace at end of file.
5238 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5240 * configure.in: Check whether we need to prototype strerror.
5241 * server.h: Optionally prototype strerror.
5242 * gdbreplay.c (perror_with_name): Use strerror.
5243 * linux-low.c (linux_attach_lwp): Use strerror.
5244 * utils.c (perror_with_name): Use strerror.
5245 * config.in, configure: Regenerated.
5247 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5249 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5250 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5252 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5254 * Makefile.in (SFILES): Update.
5255 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5256 low-sun3.c: Remove files.
5258 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5260 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5261 (linux_detach_one_process, linux_detach): New functions.
5262 (linux_target_ops): Add linux_detach.
5263 * server.c (main): Handle 'D' packet.
5264 * target.h (struct target_ops): Add "detach" member.
5265 (detach_inferior): Define.
5267 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5269 From Kelley Cook <kelleycook@wideopenwest.com>:
5270 * configure.srv: Accept i[34567]86 variants.
5272 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5274 * linux-low.c (linux_wait_for_event): Correct comment typos.
5275 (linux_resume_one_process): Call check_removed_breakpoint.
5276 (linux_send_signal): New function.
5277 (linux_target_ops): Add linux_send_signal.
5278 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5280 * target.h (struct target_ops): Add send_signal.
5282 2003-05-29 Jim Blandy <jimb@redhat.com>
5284 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5285 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5286 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5287 away part of the register's value.
5289 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5291 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5292 (linux_wait_for_event, linux_init_signals): Likewise.
5294 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5296 * configure.in: Check for stdlib.h.
5297 * configure: Regenerated.
5298 * config.in: Regenerated.
5300 2003-01-04 Andreas Schwab <schwab@suse.de>
5302 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5304 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5306 * Makefile.in: Remove obsolete code.
5308 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5310 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5311 defined(PT_FPR0_HI).
5313 2002-11-17 Stuart Hughes <seh@zee2.com>
5315 * linux-arm-low.c (arm_num_regs): Increase.
5316 (arm_regmap): Include status register.
5318 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5320 * linux-low.c (register_addr): Remove incorrect -1 check.
5322 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5324 * linux-low.c (linux_create_inferior): Call setpgid. Return
5326 (unstopped_p, linux_signal_pid): Remove.
5327 (linux_target_ops): Remove linux_signal_pid.
5328 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5329 global instead of target method.
5330 * target.h (struct target_ops): Remove signal_pid. Update comment
5331 for create_inferior.
5332 * server.c (signal_pid): New variable.
5333 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5334 gdbserver. Set the child to be the foreground process group.
5335 (attach_inferior): Set signal_pid.
5337 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5339 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5341 2002-08-20 Jim Blandy <jimb@redhat.com>
5343 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5346 2002-08-01 Andrew Cagney <cagney@redhat.com>
5348 * Makefile.in: Make chill references obsolete.
5350 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5352 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5353 * configure: Regenerate.
5354 * config.in: Regenerate.
5356 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5358 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5359 (perror_with_name, remote_close, remote_open, expect, play): Static.
5361 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5363 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5364 byte offsets instead of an array of indexes.
5365 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5367 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5369 * regcache.c: Add comment.
5371 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5373 * thread-db.c: New file.
5374 * proc-service.c: New file.
5375 * acinclude.m4: New file.
5376 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5377 proc-service.o, and thread-db.o.
5378 (linux-low.o): Add USE_THREAD_DB.
5379 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5380 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5381 * aclocal.m4: Regenerated.
5382 * config.in: Regenerated.
5383 * configure: Regenerated.
5384 * configure.in: Check for proc_service.h, sys/procfs.h,
5385 thread_db.h, and linux/elf.h headrs.
5386 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5387 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5388 Check for -lthread_db and thread support.
5389 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5390 PowerPC, and SuperH.
5391 * i387-fp.c: Constify arguments.
5392 * i387-fp.h: Likewise.
5393 * inferiors.c: (struct thread_info): Renamed from
5394 `struct inferior_info'. Remove PID member. Use generic inferior
5395 list header. All uses updated.
5396 (inferiors, signal_pid): Removed.
5397 (all_threads): New variable.
5398 (get_thread): Define.
5399 (add_inferior_to_list): New function.
5400 (for_each_inferior): New function.
5401 (change_inferior_id): New function.
5402 (add_inferior): Removed.
5403 (remove_inferior): New function.
5404 (add_thread): New function.
5405 (free_one_thread): New function.
5406 (remove_thread): New function.
5407 (clear_inferiors): Use for_each_inferior and free_one_thread.
5408 (find_inferior): New function.
5409 (find_inferior_id): New function.
5410 (inferior_target_data): Update argument type.
5411 (set_inferior_target_data): Likewise.
5412 (inferior_regcache_data): Likewise.
5413 (set_inferior_regcache_data): Likewise.
5414 * linux-low.c (linux_bp_reinsert): Remove.
5415 (all_processes, stopping_threads, using_thrads)
5416 (struct pending_signals, debug_threads, pid_of): New.
5417 (inferior_pid): Replace with macro.
5418 (struct inferior_linux_data): Remove.
5419 (get_stop_pc, add_process): New functions.
5420 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5421 Use add_process and add_thread.
5422 (linux_attach_lwp): New function, based on old linux_attach. Use
5423 add_process and add_thread. Set stop_expected for new threads.
5424 (linux_attach): New function.
5425 (linux_kill_one_process): New function.
5426 (linux_kill): Kill all LWPs.
5427 (linux_thread_alive): Use find_inferior_id.
5428 (check_removed_breakpoints, status_pending_p): New functions.
5429 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5430 Update. Use WNOHANG. Wait for cloned processes also. Update process
5431 struct for the found process.
5432 (linux_wait_for_event): New function.
5433 (linux_wait): Use it. Support LWPs.
5434 (send_sigstop, wait_for_sigstop, stop_all_processes)
5435 (linux_resume_one_process, linux_continue_one_process): New functions.
5436 (linux_resume): Support LWPs.
5437 (REGISTER_RAW_SIZE): Remove.
5438 (fetch_register): Use register_size instead. Call supply_register.
5439 (usr_store_inferior_registers): Likewise. Call collect_register.
5441 (regsets_fetch_inferior_registers): Improve error message.
5442 (regsets_store_inferior_registers): Add debugging.
5443 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5444 (unstopped_p, linux_signal_pid): New functions.
5445 (linux_target_ops): Add linux_signal_pid.
5446 (linux_init_signals): New function.
5447 (initialize_low): Call it. Initialize using_threads.
5448 * regcache.c (inferior_regcache_data): Add valid
5450 (get_regcache): Fetch registers lazily. Add fetch argument
5451 and update all callers.
5452 (regcache_invalidate_one, regcache_invalidate): New
5454 (new_register_cache): Renamed from create_register_cache.
5455 Return the new regcache.
5456 (free_register_cache): Change argument to a void *.
5457 (registers_to_string, registers_from_string): Call get_regcache
5458 with fetch flag set.
5459 (register_data): Make static. Pass fetch flag to get_regcache.
5460 (supply_register): Call get_regcache with fetch flag clear.
5461 (collect_register): Call get_regcache with fetch flag set.
5462 (collect_register_as_string): New function.
5463 * regcache.h: Update.
5464 * remote-utils.c (putpkt): Flush after debug output and use
5466 Handle input interrupts while waiting for an ACK.
5467 (input_interrupt): Use signal_pid method.
5468 (getpkt): Flush after debug output and use stderr.
5469 (outreg): Use collect_register_as_string.
5470 (new_thread_notify, dead_thread_notify): New functions.
5471 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5473 (look_up_one_symbol): Flush after debug output.
5474 * server.c (step_thread, server_waiting): New variables.
5475 (start_inferior): Don't use signal_pid. Update call to mywait.
5476 (attach_inferior): Update call to mywait.
5477 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5478 (main): Don't fetch/store registers explicitly. Use
5479 set_desired_inferior. Support proposed ``Hs'' packet. Update
5482 (struct inferior_list, struct_inferior_list_entry): New.
5483 * target.c (set_desired_inferior): New.
5484 (write_inferior_memory): Constify.
5485 (mywait): New function.
5487 (struct target_ops): New signal_pid method.
5488 (mywait): Removed macro, added prototype.
5490 * linux-low.h (regset_func): Removed.
5491 (regset_fill_func, regset_store_func): New.
5492 (enum regset_type): New.
5493 (struct regset_info): Add type field. Use new operation types.
5494 (struct linux_target_ops): stop_pc renamed to get_pc.
5495 Add decr_pc_after_break and breakpoint_at.
5496 (get_process, get_thread_proess, get_process_thread)
5497 (strut process_info, all_processes, linux_attach_lwp)
5498 (thread_db_init): New.
5500 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5501 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5502 (the_low_target): Add new members.
5503 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5504 (i386_store_fpxregset): Constify.
5505 (target_regsets): Add new kind identifier.
5506 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5507 (i386_set_pc): Add debugging.
5508 (i386_breakpoint_at): New function.
5509 (the_low_target): Add new members.
5510 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5511 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5512 (mips_breakpoint_at): New.
5513 (the_low_target): Add new members.
5514 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5515 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5516 (the_low_target): Add new members.
5517 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5518 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5519 (the_low_target): Add new members.
5520 * linux-x86-64-low.c (target_regsets): Add new kind
5523 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
5525 From Martin Pool <mbp@samba.org>:
5526 * server.c (gdbserver_usage): New function.
5529 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
5531 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5534 2002-05-04 Andrew Cagney <ac131313@redhat.com>
5536 * Makefile.in: Remove obsolete code.
5538 2002-04-24 Michal Ludvig <mludvig@suse.cz>
5540 * linux-low.c (regsets_fetch_inferior_registers),
5541 (regsets_store_inferior_registers): Removed cast to int from
5543 * regcache.h: Added declaration of struct inferior_info.
5545 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5547 * inferiors.c (struct inferior_info): Add regcache_data.
5548 (add_inferior): Call create_register_cache.
5549 (clear_inferiors): Call free_register_cache.
5550 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5551 * regcache.c (struct inferior_regcache_data): New.
5552 (registers): Remove.
5553 (get_regcache): New function.
5554 (create_register_cache, free_register_cache): New functions.
5555 (set_register_cache): Don't initialize the register cache here.
5556 (registers_to_string, registers_from_string, register_data): Call
5558 * regcache.h: Add prototypes.
5559 * server.h: Likewise.
5561 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
5563 * mem-break.c: New file.
5564 * mem-break.h: New file.
5565 * Makefile.in: Add mem-break.o rule; update server.h
5567 * inferiors.c (struct inferior_info): Add target_data
5569 (clear_inferiors): Free target_data member if set.
5570 (inferior_target_data, set_inferior_target_data): New functions.
5571 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5572 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5573 * linux-low.c (linux_bp_reinsert): New variable.
5574 (struct inferior_linux_data): New.
5575 (linux_create_inferior): Use set_inferior_target_data.
5576 (linux_attach): Likewise. Call add_inferior.
5577 (linux_wait_for_one_inferior): New function.
5578 (linux_wait): Call it.
5579 (linux_write_memory): Add const.
5580 (initialize_low): Call set_breakpoint_data.
5581 * linux-low.h (struct linux_target_ops): Add breakpoint
5583 * server.c (attach_inferior): Remove extra add_inferior
5585 * server.h: Include mem-break.h. Update inferior.c
5587 * target.c (read_inferior_memory)
5588 (write_inferior_memory): New functions.
5589 * target.h (read_inferior_memory)
5590 (write_inferior_memory): Change macros to prototypes.
5591 (struct target_ops): Update comments. Add const to write_memory
5594 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
5596 * linux-low.c (usr_store_inferior_registers): Support
5597 registers which are allowed to fail to store.
5598 * linux-low.h (linux_target_ops): Likewise.
5599 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5600 (ppc_cannot_store_register): FPSCR may not be storable.
5602 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5604 * server.h: Include <string.h> if HAVE_STRING_H.
5605 * ChangeLog: Correct paths in last ChangeLog entry.
5607 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5609 * linux-low.h: Remove obsolete prototypes.
5610 (struct linux_target_ops): New.
5611 (extern the_low_target): New.
5612 * linux-low.c (num_regs, regmap): Remove declarations.
5613 (register_addr): Use the_low_target explicitly.
5614 (fetch_register): Likewise.
5615 (usr_fetch_inferior_registers): Likewise.
5616 (usr_store_inferior_registers): Likewise.
5617 * linux-arm-low.c (num_regs): Remove.
5618 (arm_num_regs): Define.
5619 (arm_regmap): Renamed from regmap, made static.
5620 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5622 (arm_cannot_store_register): Renamed from cannot_store_register,
5624 (the_low_target): New.
5625 * linux-i386-low.c (num_regs): Remove.
5626 (i386_num_regs): Define.
5627 (i386_regmap): Renamed from regmap, made static.
5628 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5630 (i386_cannot_store_register): Renamed from cannot_store_register,
5632 (the_low_target): New.
5633 * linux-ia64-low.c (num_regs): Remove.
5634 (ia64_num_regs): Define.
5635 (ia64_regmap): Renamed from regmap, made static.
5636 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5638 (ia64_cannot_store_register): Renamed from cannot_store_register,
5640 (the_low_target): New.
5641 * linux-m68k-low.c (num_regs): Remove.
5642 (m68k_num_regs): Define.
5643 (m68k_regmap): Renamed from regmap, made static.
5644 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5646 (m68k_cannot_store_register): Renamed from cannot_store_register,
5648 (the_low_target): New.
5649 * linux-mips-low.c (num_regs): Remove.
5650 (mips_num_regs): Define.
5651 (mips_regmap): Renamed from regmap, made static.
5652 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5654 (mips_cannot_store_register): Renamed from cannot_store_register,
5656 (the_low_target): New.
5657 * linux-ppc-low.c (num_regs): Remove.
5658 (ppc_num_regs): Define.
5659 (ppc_regmap): Renamed from regmap, made static.
5660 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5662 (ppc_cannot_store_register): Renamed from cannot_store_register,
5664 (the_low_target): New.
5665 * linux-s390-low.c (num_regs): Remove.
5666 (s390_num_regs): Define.
5667 (s390_regmap): Renamed from regmap, made static.
5668 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5670 (s390_cannot_store_register): Renamed from cannot_store_register,
5672 (the_low_target): New.
5673 * linux-sh-low.c (num_regs): Remove.
5674 (sh_num_regs): Define.
5675 (sh_regmap): Renamed from regmap, made static.
5676 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5678 (sh_cannot_store_register): Renamed from cannot_store_register,
5680 (the_low_target): New.
5681 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5682 (the_low_target): New.
5684 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5686 * Makefile.in: Add stamp-h target.
5687 * configure.in: Create stamp-h.
5688 * configure: Regenerated.
5690 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5692 * inferiors.c: New file.
5693 * target.c: New file.
5694 * target.h: New file.
5695 * Makefile.in: Add target.o and inferiors.o. Update
5697 * linux-low.c (inferior_pid): New static variable,
5698 moved from server.c.
5699 (linux_create_inferior): Renamed from create_inferior.
5700 Call add_inferior. Return 0 on success instead of a PID.
5701 (linux_attach): Renamed from myattach.
5702 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5703 (linux_thread_alive): Renamed from mythread_alive.
5704 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5706 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5707 (regsets_store_inferior_registers): Correct error message.
5708 Add missing ``return 0''.
5709 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5710 (linux_store_registers): Renamed from store_inferior_registers.
5711 (linux_read_memory): Renamed from read_inferior_memory.
5712 (linux_write_memory): Renamed from write_inferior_memory.
5713 (linux_target_ops): New structure.
5714 (initialize_low): Call set_target_ops ().
5715 * remote-utils.c (unhexify): New function.
5716 (hexify): New function.
5717 (input_interrupt): Send signals to ``signal_pid''.
5718 * server.c (inferior_pid): Remove.
5719 (start_inferior): Update create_inferior call.
5720 (attach_inferior): Call add_inferior.
5721 (handle_query): New function.
5722 (main): Call handle_query for `q' packets.
5723 * server.h: Include "target.h". Remove obsolete prototypes.
5724 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5726 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5728 * Makefile.in: Add WARN_CFLAGS. Update configury
5730 * configure.in: Check for <string.h>
5731 * configure: Regenerate.
5732 * config.in: Regenerate.
5733 * gdbreplay.c: Include needed system headers.
5734 (remote_open): Remove strchr prototype.
5735 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5736 * regcache.c (supply_register): Change buf argument to const void *.
5737 (supply_register_by_name): Likewise.
5738 (collect_register): Change buf argument to void *.
5739 (collect_register_by_name): Likewise.
5740 * regcache.h: Add missing prototypes.
5741 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5742 * server.c (handle_query): New function.
5743 (attached): New static variable, moved out of main.
5744 (main): Quiet longjmp clobber warnings.
5745 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5746 * utils.c (error): Remove NORETURN.