1 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
3 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4 PSW address/mask between 8-byte and 16-byte formats.
5 (s390_supply_ptrace_register): Likewise.
6 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7 basic addressing mode bit.
9 2011-11-24 Stan Shebs <stan@codesourcery.com>
11 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13 2011-11-17 Stan Shebs <stan@codesourcery.com>
15 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16 (tracing_start_time): New global.
17 (tracing_stop_time): New global.
18 (tracing_user_name): New global.
19 (tracing_notes): New global.
20 (tracing_stop_note): New global.
21 (cmd_qtstart): Set traceframe_usage, start_time.
22 (stop_tracing): Set stop_time.
23 (cmd_qtstatus): Report additional status.
24 (cmd_qtp): New function.
25 (handle_tracepoint_query): Call it.
26 (cmd_qtnotes): New function.
27 (handle_tracepoint_general_set): Call it.
28 (get_timestamp): Rename from tsv_get_timestamp.
30 2011-11-14 Stan Shebs <stan@codesourcery.com>
31 Kwok Cheung Yeung <kcy@codesourcery.com>
33 * linux-x86-low.c (small_jump_insn): New.
34 (i386_install_fast_tracepoint_jump_pad): Add arguments for
35 trampoline and error message, build a trampoline and issue a small
36 jump instruction to it.
37 (x86_install_fast_tracepoint_jump_pad): Add arguments for
38 trampoline and error message.
39 (x86_get_min_fast_tracepoint_insn_len): New.
40 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
41 * linux-low.h (struct linux_target_ops): Add arguments to
42 install_fast_tracepoint_jump_pad operation, add new operation.
43 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
45 (linux_get_min_fast_tracepoint_insn_len): New function.
46 (linux_target_op): Add new operation.
47 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
48 (gdb_trampoline_buffer_end): Ditto.
49 (gdb_trampoline_buffer_error): Ditto.
50 (struct ipa_sym_addresses): Add fields for new IPA variables.
51 (symbol_list): Add entries for new IPA variables.
52 (struct tracepoint): Add fields to hold the address range of the
53 trampoline used by the tracepoint.
54 (trampoline_buffer_head): New static variable.
55 (trampoline_buffer_tail): Ditto.
56 (claim_trampoline_space): New function.
57 (have_fast_tracepoint_trampoline_buffer): New function.
58 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
60 (install_fast_tracepoint): Ditto, also add error buffer argument.
61 (cmd_qtminftpilen): New function.
62 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
63 (fast_tracepoint_from_trampoline_address): New function.
64 (fast_tracepoint_collecting): Handle trampoline as part of jump
66 (set_trampoline_buffer_space): New function.
67 (initialize_tracepoint): Initialize new IPA variables.
68 * target.h (struct target_ops): Add arguments to
69 install_fast_tracepoint_jump_pad operation, add new
70 get_min_fast_tracepoint_insn_len operation.
71 (target_get_min_fast_tracepoint_insn_len): New.
72 (install_fast_tracepoint_jump_pad): Add arguments.
73 * server.h (IPA_BUFSIZ): Define.
74 * linux-i386-ipa.c: Include extra header files.
75 (initialize_fast_tracepoint_trampoline_buffer): New function.
76 (initialize_low_tracepoint): Call it.
77 * server.h (set_trampoline_buffer_space): Declare.
78 (claim_trampoline_space): Ditto.
79 (have_fast_tracepoint_trampoline_buffer): Ditto.
81 2011-11-14 Yao Qi <yao@codesourcery.com>
83 * server.c (handle_query): Handle InstallInTrace for qSupported.
84 * tracepoint.c (add_tracepoint): Sort list.
85 (install_tracepoint, download_tracepoint): New.
86 (cmd_qtdp): Call them to install and download tracepoints.
87 (sort_tracepoints): Removed.
88 (cmd_qtstart): Update.
90 2011-11-14 Yao Qi <yao@codesourcery.com>
92 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
93 * mem-break.h: Declare.
94 * tracepoint.c (cmd_qtstart): Move some code to ...
95 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
97 (download_tracepoints): Move some code to ...
98 (download_tracepoint_1): ... here. New.
100 2011-11-08 Yao Qi <yao@codesourcery.com>
102 * remote-utils.c (relocate_instruction): A comment fix.
104 2011-11-07 Joel Brobecker <brobecker@adacore.com>
106 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
107 (i386_dr_low_get_control, i386_dr_low_get_status): Use
108 dr_status_mirror and dr_control_mirror from debug_reg_state.
109 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
110 (i386_initial_stuff): Remove use of deleted globals.
111 (i386_get_thread_context, i386_set_thread_context,
112 i386_thread_added): Use dr_status_mirror and dr_control_mirror
113 from debug_reg_state.
115 2011-11-05 Yao Qi <yao@codesourcery.com>
117 * tracepoint.c (gdb_collect): Loop over tracepoints of same
120 2011-11-02 Stan Shebs <stan@codesourcery.com>
122 * tracepoint.c (agent_mem_read_string): New function.
123 (eval_agent_expr): Call it for tracenz.
124 * server.c (handle_query): Report support for tracenz.
126 2011-11-02 Yao Qi <yao@codesourcery.com>
128 * tracepoint.c (cmd_qtstart): Remove unused local variables.
130 2011-11-02 Yao Qi <yao@codesourcery.com>
132 * target.h: Fix a typo in comment.
134 2011-10-31 Pedro Alves <pedro@codesourcery.com>
136 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
137 clobber the breakpoints' shadows with fast tracepoint jumps.
138 * mem-break.h (check_mem_write): Add `myaddr' parameter.
139 * target.c (write_inferior_memory): Also pass MYADDR down to
142 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
144 * configure.ac: Check support for personality routine.
145 * configure: Regenerate.
146 * config.in: Likewise.
147 * linux-low.c: Include <sys/personality.h>.
148 Define ADDR_NO_RANDOMIZE if necessary.
149 (linux_create_inferior): Disable address space randomization when
150 forking inferior, if requested.
151 (linux_supports_disable_randomization): New function.
152 (linux_target_ops): Install it.
153 * server.h (disable_randomization): Declare.
154 * server.c (disable_randomization): New global variable.
155 (handle_general_set): Handle QDisableRandomization.
156 (handle_query): Likewise for qSupported.
157 (main): Support --disable-randomization and --no-disable-randomization
158 command line arguments.
159 * target.h (struct target_ops): Add supports_disable_randomization.
160 (target_supports_disable_randomization): New macro.
162 2011-09-29 Mike Frysinger <vapier@gentoo.org>
164 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
166 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
167 [!PT_GETDSBT] (target_loadmap): New definition.
168 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
169 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
170 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
171 and PT_GETDSBT to LINUX_LOADMAP.
172 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
173 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
175 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
177 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
178 (arm_linux_hwbp_cap): New static variable.
179 (arm_linux_get_hwbp_cap): Replace by ...
180 (arm_linux_init_hwbp_cap): ... this new function.
181 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
182 (arm_linux_get_hw_watchpoint_count): Likewise.
183 (arm_linux_get_hw_watchpoint_max_length): Likewise.
184 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
185 (arm_prepare_to_resume): Use perror_with_name instead of error.
187 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
189 * linux-arm-low.c: Include <signal.h>.
190 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
191 (struct arm_linux_hwbp_cap): New data type.
192 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
193 (struct arm_linux_hw_breakpoint): New data type.
194 (MAX_BPTS, MAX_WPTS): Define.
195 (struct arch_process_info, struct arch_lwp_info): New data types.
196 (arm_linux_get_hwbp_cap): New function.
197 (arm_linux_get_hw_breakpoint_count): Likewise.
198 (arm_linux_get_hw_watchpoint_count): Likewise.
199 (arm_linux_get_hw_watchpoint_max_length): Likewise.
200 (arm_hwbp_control_initialize): Likewise.
201 (arm_hwbp_control_is_enabled): Likewise.
202 (arm_hwbp_control_is_initialized): Likewise.
203 (arm_hwbp_control_disable): Likewise.
204 (arm_linux_hw_breakpoint_equal): Likewise.
205 (arm_linux_hw_point_initialize): Likewise.
206 (struct update_registers_data): New data structure.
207 (update_registers_callback: New function.
208 (arm_insert_point): Likewise.
209 (arm_remove_point): Likewise.
210 (arm_stopped_by_watchpoint): Likewise.
211 (arm_stopped_data_address): Likewise.
212 (arm_new_process): Likewise.
213 (arm_new_thread): Likewise.
214 (arm_prepare_to_resume): Likewise.
215 (the_low_target): Register arm_insert_point, arm_remove_point,
216 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
217 arm_new_thread, and arm_prepare_to_resume.
219 2011-09-15 Stan Shebs <stan@codesourcery.com>
221 * server.h (struct emit_ops): Add compare-goto fields.
222 * tracepoint.c (gdb_agent_op_sizes): New table.
223 (emit_eq_goto): New function.
224 (emit_ne_goto): New function.
225 (emit_lt_goto): New function.
226 (emit_le_goto): New function.
227 (emit_gt_goto): New function.
228 (emit_ge_goto): New function.
229 (is_goto_target): New function.
230 (compile_bytecodes): Recognize special cases of compare-goto
231 combinations and call specialized emitters for them.
232 * linux-x86-low.c (amd64_emit_eq_goto): New function.
233 (amd64_emit_ne_goto): New function.
234 (amd64_emit_lt_goto): New function.
235 (amd64_emit_le_goto): New function.
236 (amd64_emit_gt_goto): New function.
237 (amd64_emit_ge_goto): New function.
238 (amd64_emit_ops): Add the new functions.
239 (i386_emit_eq_goto): New function.
240 (i386_emit_ne_goto): New function.
241 (i386_emit_lt_goto): New function.
242 (i386_emit_le_goto): New function.
243 (i386_emit_gt_goto): New function.
244 (i386_emit_ge_goto): New function.
245 (i386_emit_ops): Add the new functions.
247 2011-09-08 Stan Shebs <stan@codesourcery.com>
249 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
250 (i386_emit_epilogue): Restore %ebx.
252 2011-08-31 Jie Zhang <jzhang918@gmail.com>
254 * server.c (step_thread): Remove definition.
255 (process_serial_event): Don't handle Hs.
256 * server.h (step_thread): Remove declaration.
257 * target.c (set_desired_inferior): Remove use of step_thread.
259 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
261 * linux-low.c: Include linux-procfs.h.
262 (linux_attach_lwp_1): Update comments.
263 (linux_attach): Scan for existing threads when attaching to a
264 process that is the tgid.
265 * Makefile.in: Update dependencies.
267 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
269 * configure.srv: Add linux-procfs.o dependencies.
271 2011-08-14 Yao Qi <yao@codesourcery.com>
273 * target.h (struct target_ops): Fix indent.
274 * win32-low.c (win32_target_ops): Fix comment.
276 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
277 Yao Qi <yao@codesourcery.com>
279 * Makefile.in (clean): Remove tic6x-*.c files.
280 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
281 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
282 (tic6x-c64xp-linux.c): Likewise.
283 * configure.srv: Add support for tic6x-*-uclinux.
284 * linux-tic6x-low.c: New.
285 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
287 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
288 Yao Qi <yao@codesourcery.com>
290 * target.h (struct target_ops): Add read_loadmap.
291 * linux-low.c (struct target_loadseg): New type.
292 (struct target_loadmap): New type.
293 (linux_read_loadmap): New function.
294 (linux_target_ops): Add linux_read_loadmap.
295 * server.c (handle_query): Support qXfer:fdpic:read packet.
296 * win32-low.c (win32_target_ops): Initialize field `read_loadmap' to NULL.
298 2011-08-05 Eli Zaretskii <eliz@gnu.org>
300 * win32-low.c: Include <stdint.h>.
302 2011-07-22 Pedro Alves <pedro@codesourcery.com>
304 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
305 to the inferior here.
306 (i386_remove_aligned_watchpoint): Ditto.
307 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
308 fit part of the watchpoint in the debug registers.
309 (i386_update_inferior_debug_regs): New.
310 (i386_low_insert_watchpoint): Work on a local mirror of the debug
311 registers, and only update the inferior on success.
312 (i386_low_remove_watchpoint): Ditto.
314 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
316 * linux-low.c (compare_ints, unique, list_threads, show_process,
317 linux_core_of_thread): Delete.
318 (linux_target_ops): Change linux_core_of_thread to
319 linux_common_core_of_thread.
320 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
321 * utils.c (malloc_failure): Change type of argument.
322 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
323 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
324 common/linux-osdata.c, common/ptid.c and common/buffer.c.
325 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
326 (IPA_OBJS): Add common-utils-ipa.o.
327 (ptid_h, linux_osdata_h): New macros.
328 (server_h): Add common/common-utils.h, common/xml-utils.h,
329 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
331 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
332 ptid.o, buffer.o): New rules.
333 (linux-low.o): Add common/linux-osdata.h as a dependency.
334 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
335 * configure.ac: Add AC_HEADER_DIRENT check.
336 * config.in: Regenerate.
337 * configure: Regenerate.
338 * remote-utils.c (xml_escape_text): Delete.
339 (buffer_grow, buffer_free, buffer_init, buffer_finish,
340 buffer_xml_printf): Move to common/buffer.c.
341 * server.c (main): Remove call to initialize_inferiors.
342 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
343 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
344 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
345 internal_error, gdb_assert, gdb_assert_fail): Delete.
346 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
347 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
349 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
350 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
351 initialize_inferiors): Delete.
353 2011-07-20 Pedro Alves <pedro@codesourcery.com>
355 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
358 2011-05-31 Pedro Alves <pedro@codesourcery.com>
360 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
362 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
364 2011-05-26 Yao Qi <yao@codesourcery.com>
366 * Makefile.in (thread-db.o): Track dependence to
367 common/gdb_thread_db.h.
368 * thread-db.c: include gdb_thread_db.h from right place.
370 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
372 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
373 __FILE__ and __LINE__ to internal_error.
375 2011-05-13 Doug Evans <dje@google.com>
377 * thread-db.c (try_thread_db_load_from_sdir): New function.
378 (try_thread_db_load_from_dir): New function.
379 (thread_db_load_search): Handle $sdir, ignore $pdir.
380 Remove trying of system directories if search of
381 libthread-db-search-path fails, that is now done via $sdir.
383 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
385 * server.c (handle_query): Add EnableDisableTracepoints to the list
386 of supported features.
387 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
389 (cmd_qtenable_disable): New.
390 (cmd_qtstart): Install tracepoints even if disabled.
391 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
392 receiving a QTEnable or QTDisable packet.
393 (gdb_collect): Skip data collection if fast tracepoint is disabled.
394 (ust_marker_to_static_tracepoint): Do not ignore disabled static
396 (gdb_probe): Skip data collection if static tracepoint is disabled.
398 2011-05-10 Doug Evans <dje@google.com>
400 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
402 2011-05-04 Doug Evans <dje@google.com>
404 * linux-low.c (linux_join): Skip process lookup.
405 * spu-low.c (spu_join): Ditto.
406 * server.c (join_inferiors_callback): Delete.
407 (process_serial_event): For 'D' packet (detach) call join_inferior
410 2011-05-04 Joseph Myers <joseph@codesourcery.com>
412 * README: Don't mention xscale*-*-linux*.
413 * configure.srv (xscale*-*-linux*): Don't handle target.
415 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
417 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
419 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
420 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
421 (i386_emit_void_call_2): Likewise.
423 2011-04-26 Yao Qi <yao@codesourcery.com>
425 * linux-low.c: Move common macros to linux-ptrace.h.
426 Include linux-ptrace.h.
427 * Makefile.in (linux_ptrace_h): New.
428 (linux-low.o): Depends on linux-ptrace.h.
430 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
432 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
433 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
434 (remote_prepare): New function with most of the TCP code from ...
435 (remote_open): ... here. Detect PORT here unconditionally. Move also
436 setting transport_is_reliable.
437 * server.c (run_once): New variable.
438 (gdbserver_usage): Document it.
439 (main): Set run_once for `--once'. Call remote_prepare. Exit after
440 the first run if RUN_ONCE.
441 * server.h (run_once, remote_prepare): New declarations.
443 2011-04-19 Tom Tromey <tromey@redhat.com>
445 * win32-low.c (handle_load_dll): Remove duplicate "the".
447 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
449 Remove support for old Cygwin 1.5 versions.
450 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
451 function to avoid warning.
452 (win32_add_one_solib): Use cygwin_conv_path function to avoid
455 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
457 * gdbserver/server.h (Macro _): Define it if not available.
459 2011-03-14 Michael Snyder <msnyder@vmware.com>
461 * hostio.c (handle_close): Remove unnecessary null test.
463 2011-03-10 Joel Brobecker <brobecker@adacore.com>
465 * Makefile.in (maintainer-clean realclean distclean): Remove
466 "make ... subdir_do" command.
468 2011-03-10 Michael Snyder <msnyder@vmware.com>
470 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
472 * server.c (handle_v_run): Free alloced buffer on early return.
474 2011-03-09 Yao Qi <yao@codesourcery.com>
477 2011-03-04 Yao Qi <yao@codesourcery.com>
479 * Makefile.in: Remove GNU make feature --directory.
481 2011-03-05 Yao Qi <yao@codesourcery.com>
483 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
484 (subdir_do): New make target. Copied from gdb/Makefile.
485 (maintainer-clean, realclean, distclean, clean): Call corresponding
486 make targets in common/Makefile.
488 2011-02-11 Yao Qi <yao@codesourcery.com>
490 * configure.ac: Call AC_PROG_RANLIB.
491 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
492 * configure: Regenerate.
494 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
496 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
498 2011-03-06 Yao Qi <yao@codesourcery.com>
500 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
502 2011-03-05 Yao Qi <yao@codesourcery.com>
504 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
505 (subdir_do): New make target. Copied from gdb/Makefile.
506 (maintainer-clean, realclean, distclean, clean): Call corresponding
507 make targets in common/Makefile.
509 2011-03-04 Yao Qi <yao@codesourcery.com>
511 * Makefile.in: Remove GNU make feature --directory.
513 2011-03-04 Michael Snyder <msnyder@vmware.com>
515 * server.c (queue_stop_reply): Call xmalloc not malloc.
517 2011-03-02 Michael Snyder <msnyder@vmware.com>
519 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
521 2011-02-28 Michael Snyder <msnyder@vmware.com>
523 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
524 (cmd_qtframe): Ditto.
525 (cmd_qtbuffer): Ditto.
526 (cmd_bigqtbuffer): Ditto.
528 * utils.c (decimal2str): Initialize 'width' to nine, then
531 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
533 * hostio.c (require_data): Free *data, not data.
535 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
537 * hostio.c (require_data): Use free, not xfree.
539 2011-02-27 Michael Snyder <msnyder@vmware.com>
541 * server.c (handle_query): Discard unused value.
543 * hostio.c (require_data): Free malloc memory before returning
546 2011-02-26 Michael Snyder <msnyder@vmware.com>
548 * linux-low.c (list_threads): Call closedir for dirent.
550 2011-02-27 Michael Snyder <msnyder@vmware.com>
552 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
553 a case statement falls through.
555 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
557 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
560 2011-02-26 Michael Snyder <msnyder@vmware.com>
562 * utils.c (decimal2str): Eliminate dead code and dead param.
563 (pulongest): Drop dead param from call to decimal2str.
566 2011-02-24 Joel Brobecker <brobecker@adacore.com>
568 Revert the following patch (not approved yet):
569 2011-02-21 Hui Zhu <teawater@gmail.com>
570 * tracepoint.c (tp_printf): New function.
571 (eval_agent_expr): Handle gdb_agent_op_printf.
573 2011-02-21 Hui Zhu <teawater@gmail.com>
575 * tracepoint.c (tp_printf): New function.
576 (eval_agent_expr): Handle gdb_agent_op_printf.
578 2011-02-18 Tom Tromey <tromey@redhat.com>
580 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
581 (tracepoint.o): Likewise.
582 * tracepoint.c (enum gdb_agent_op): Use ax.def.
583 (gdb_agent_op_names): Likewise.
585 2011-02-18 Tom Tromey <tromey@redhat.com>
587 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
588 gdb_agent_op_rot>: New constants.
589 (gdb_agent_op_names): Add pick and roll.
590 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
593 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
595 * aclocal.m4: Regenerated with aclocal-1.11.1.
597 2011-02-14 Pedro Alves <pedro@codesourcery.com>
599 * server.c (handle_qxfer_traceframe_info): New.
600 (qxfer_packets): Register "traceframe-info".
601 (handle_query): Report support for qXfer:traceframe-info:read+.
602 * tracepoint.c (match_blocktype): New.
603 (traceframe_find_block_type): Rename to ...
604 (traceframe_walk_blocks): ... this. Add callback filter argument,
606 (traceframe_find_block_type): New, reimplemented on top of
607 traceframe_walk_blocks.
608 (build_traceframe_info_xml): New.
609 (traceframe_read_info): New.
610 * server.h (traceframe_read_info): Declare.
612 2011-02-11 Yao Qi <yao@codesourcery.com>
614 * configure.ac: Call AC_PROG_RANLIB.
615 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
616 * configure: Regenerate.
618 2011-02-07 Pedro Alves <pedro@codesourcery.com>
620 * server.c (gdb_read_memory): Change return semantics to allow
622 (handle_search_memory_1): Adjust.
623 (process_serial_event) <'m' packet>: Handle partial transfers.
624 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
626 2011-01-28 Pedro Alves <pedro@codesourcery.com>
628 * regcache.c (init_register_cache): Initialize
629 regcache->register_status.
630 (free_register_cache): Release regcache->register_status.
631 (regcache_cpy): Copy register_status.
632 (registers_to_string): Print 'x's for unavailable registers.
633 (supply_register): Mark the register's status valid or
634 unavailable, depending on whether a buffer was passed in or not.
635 (supply_register_zeroed): New.
636 (supply_regblock): Mark the registers' status valid or
637 unavailable, depending on whether a buffer was passed in or not.
638 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
639 (struct regcache): New `register_status' field.
640 (supply_register_zeroed): Declare.
641 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
642 supply_register_zeroed, rather than passing a NULL buffer to
644 * tracepoint.c (fetch_traceframe_registers): Update comment.
646 2011-01-28 Pedro Alves <pedro@codesourcery.com>
648 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
651 2011-01-25 Pedro Alves <pedro@codesourcery.com>
653 * server.h (decode_xfer_write): Change prototype.
654 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
655 and don't extract the annex here.
656 * server.c (decode_xfer_read): Remove `annex' parameter,
657 and don't extract the annex here.
660 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
661 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
662 (handle_qxfer_statictrace): New functions, abstracted out from
663 handle_query, and made to use the struct qxfer interface.
664 (handle_threads_qxfer_proper): Rename to ...
665 (handle_qxfer_threads_proper): ... this.
666 (handle_threads_qxfer): Rename to ...
667 (handle_qxfer_threads): ... this. Adjust.
668 (qxfer_packets): New array.
669 (handle_qxfer): New function.
670 (handle_query): Use handle_qxfer.
672 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
674 * gdbreplay.c: Shorten lines of >= 80 columns.
675 * linux-low.c: Ditto.
676 * linux-ppc-low.c: Ditto.
677 * linux-s390-low.c: Ditto.
678 * linux-sparc-low.c: Ditto.
679 * linux-x86-low.c: Ditto.
680 * linux-xtensa-low.c: Ditto.
681 * mem-break.c: Ditto.
684 * remote-utils.c: Ditto.
687 * thread-db.c: Ditto.
688 * tracepoint.c: Ditto.
690 * win32-low.h: Ditto.
692 2011-01-05 Joel Brobecker <brobecker@adacore.com>
694 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
697 2011-01-01 Joel Brobecker <brobecker@adacore.com>
699 * server.c (gdbserver_version): Update copyright year in version
701 * gdbreplay.c (gdbreplay_version): Ditto.
703 2010-12-29 Jie Zhang <jie.zhang@analog.com>
705 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
706 * linux-bfin-low.c: New file.
707 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
708 PT_DATA_ADDR for BFIN targets.
709 * Makefile.in (SFILES): Add linux-bfin-low.c.
710 (clean): Remove reg-bfin.c.
711 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
712 * README: Mention supported Blackfin targets.
714 2010-12-23 Mike Frysinger <vapier@gentoo.org>
716 * .gitignore: New file.
718 2010-11-16 Mike Frysinger <vapier@gentoo.org>
720 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
722 2010-10-22 Jie Zhang <jie@codesourcery.com>
724 * Makefile.in: Add FLAGS_TO_PASS variable.
725 (install): Remove dependency of install-only and recursively
726 invoke make for install-only.
728 2010-10-04 Doug Evans <dje@google.com>
730 * Makefile.in (uninstall): Use $(DESTDIR).
732 2010-09-24 Pedro Alves <pedro@codesourcery.com>
736 * linux-x86-low.c (compat_siginfo_from_siginfo)
737 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
738 si_code is < 0. Check for si_code == SI_TIMER before checking for
741 2010-09-13 Joel Brobecker <brobecker@adacore.com>
743 * lynx-i386-low.c: New file.
744 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
746 2010-09-13 Joel Brobecker <brobecker@adacore.com>
748 * lynx-low.c (ptrace_request_to_str): Remove handling for
749 request values that have been removed in LynxOS 5.x.
751 2010-09-13 Joel Brobecker <brobecker@adacore.com>
753 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
756 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
758 * configure.ac: Add --enable-inprocess-agent option.
759 * configure: Rebuilt.
761 2010-09-06 Yao Qi <yao@codesourcery.com>
763 * linux-low.c (linux_kill): Remove unused variable.
764 (linux_stabilize_threads): Likewise.
765 * server.c (start_inferior): Likewise.
766 (queue_stop_reply_callback): Likewise.
767 * tracepoint.c (do_action_at_tracepoint): Likewise.
769 2010-09-06 Yao Qi <yao@codesourcery.com>
771 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
774 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
776 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
778 2010-09-06 Pedro Alves <pedro@codesourcery.com>
780 * Makefile.in (install-only): Replace $IPA_DEPFILES with
783 2010-09-01 Joel Brobecker <brobecker@adacore.com>
785 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
786 gdbserver/lynx-ppc-low.c: New files.
787 * Makefile.in (lynx_low_h): New variable.
788 (lynx-low.o, lynx-ppc-low.o): New rules.
789 * configure.ac: On LynxOS, link with -lnetinet.
790 * configure.srv: Add handling of powerpc-*-lynxos* targets.
791 * configure: regenerate.
793 2010-09-01 Joel Brobecker <brobecker@adacore.com>
795 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
796 * configure.ac: Add check for vasprintf and vsnprintf.
797 * configure, config.in: Regenerate.
798 * server.h (vasprintf, vsnprintf): Add conditional declarations.
800 2010-09-01 Joel Brobecker <brobecker@adacore.com>
802 * gdbreplay.c: Move include of alloca.h up, next to include of
804 * server.h: Add include of malloc.h.
805 * mem-break.c: Remove include of malloc.h.
806 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
808 2010-09-01 Joel Brobecker <brobecker@adacore.com>
810 * Makefile.in (memmem.o): Build with -Wno-error.
812 2010-09-01 Joel Brobecker <brobecker@adacore.com>
814 * utils.c (xsnprintf): Make non-static.
815 * server.h: Add xsnprintf declaration.
816 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
817 replace calls to snprintf by calls to xsnprintf throughout.
819 2010-09-01 Joel Brobecker <brobecker@adacore.com>
821 * configure.ac: Add configure check for alloca.
822 * configure, config.in: Regenerate.
823 * server.h: Include alloca.h if it exists.
824 * gdbreplay.c: Include alloca.h if it exists.
826 2010-08-28 Pedro Alves <pedro@codesourcery.com>
828 * linux-low.c (__SIGRTMIN): Define if not already defined.
829 (linux_create_inferior): Check for __ANDROID__ rather than
831 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
832 are already deferred.
833 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
834 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
835 stopped and already has a pending signal to report.
836 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
837 a pending signal to report or is moving out of a jump pad.
838 (linux_init_signals): Check for __ANDROID__ rather than
841 2010-08-28 Pedro Alves <pedro@codesourcery.com>
843 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
844 debug_threads check. Avoid a linear search when not doing debug
847 2010-08-27 Pedro Alves <pedro@codesourcery.com>
849 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
850 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
851 (struct file_handler) <fd>: Change type to gdb_fildes_t.
852 (process_event): Change local fd's type to gdb_fildes_t.
853 (create_file_handler): Adjust prototype.
854 (delete_file_handler): Adjust prototype.
855 (handle_file_event): Adjust prototype. Use pfildes.
856 (create_file_event): Adjsut prototype.
857 * remote-utils.c (remote_desc, listen_desc): Change type to
859 * server.h: New gdb_fildes_t typedef.
860 [USE_WIN32API]: Include winsock2.h.
861 (delete_file_handler, add_file_handler): Adjust prototypes.
863 * utils.c (pfildes): New.
865 2010-08-27 Pedro Alves <pedro@codesourcery.com>
867 * configure.ac (build_warnings): Add -Wno-char-subscripts.
868 * configure: Regenerate.
870 2010-08-27 Pedro Alves <pedro@codesourcery.com>
872 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
873 (linux_done_accessing_memory): ... this.
874 (linux_target_ops): Adjust.
875 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
876 * nto-low.c (nto_target_ops): Adjust comment.
877 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
878 * spu-low.c (spu_target_ops): Adjust comment.
879 * target.h (target_ops): Rename unprepare_to_access_memory field
880 to done_accessing_memory.
881 (unprepare_to_access_memory): Rename to ...
882 (done_accessing_memory): ... this.
884 2010-08-26 Pedro Alves <pedro@codesourcery.com>
886 * linux-low.c (linux_prepare_to_access_memory): New.
887 (linux_unprepare_to_access_memory): New.
888 (linux_target_ops): Install them.
889 * server.c (read_memory): Rename to ...
890 (gdb_read_memory): ... this. Use
891 prepare_to_access_memory/prepare_to_access_memory.
892 (write_memory): Rename to ...
893 (gdb_write_memory): ... this. Use
894 prepare_to_access_memory/prepare_to_access_memory.
895 (handle_search_memory_1): Adjust.
896 (process_serial_event): Adjust.
897 * target.h (struct target_ops): New fields
898 prepare_to_access_memory and unprepare_to_access_memory.
899 (prepare_to_access_memory, unprepare_to_access_memory): New.
900 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
901 prepare_to_access_memory/prepare_to_access_memory.
902 * nto-low.c (nto_target_ops): Adjust.
903 * spu-low.c (spu_target_ops): Adjust.
904 * win32-low.c (win32_target_ops): Adjust.
906 2010-08-26 Pedro Alves <pedro@codesourcery.com>
908 * Makefile.in (WARN_CFLAGS): Get it from configure.
909 (WERROR_CFLAGS): New.
910 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
911 * configure.ac: Introduce --enable-werror, which adds -Werror to
912 the compiler command line. Enabled by default. Disable with
913 --disable-werror. Add -Wdeclaration-after-statement
914 Wpointer-arith and -Wformat-nonliteral to warning flags.
915 * configure: Regenerate.
917 2010-08-26 Pedro Alves <pedro@codesourcery.com>
919 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
921 2010-08-26 Pedro Alves <pedro@codesourcery.com>
923 * gdbreplay.c (remote_error): New.
925 (expect): Use gdbchar. Check for error reading from GDB.
926 Clarify sync error output.
927 (play): Check for errors writing to GDB.
928 * linux-low.c (sigchld_handler): Really ignore `write' errors.
929 * remote-utils.c (getpkt): Check for errors writing to the remote
932 2010-08-25 Pedro Alves <pedro@codesourcery.com>
934 * linux-low.c (linux_wait_1): Move non-debugging code out of
935 `debug_threads' control.
937 2010-08-25 Pedro Alves <pedro@codesourcery.com>
939 * linux-low.c (linux_wait_1): Don't set last_status here.
940 * server.c (push_event, queue_stop_reply_callback): Assert we're
941 not pushing a TARGET_WAITKIND_IGNORE event.
942 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
943 (myresume, handle_target_event): Set the thread's last_resume_kind
944 and last_status from the target returned status.
946 2010-08-25 Pedro Alves <pedro@codesourcery.com>
950 * linux-x86-low.c (update_debug_registers_callback): New.
951 (i386_dr_low_set_addr): Use it.
952 (i386_dr_low_get_addr): New.
953 (i386_dr_low_set_control): Use update_debug_registers_callback.
954 (i386_dr_low_get_control): New.
955 (i386_dr_low_get_status): Adjust.
956 * linux-low.c (linux_stop_lwp): New.
957 * linux-low.h (linux_stop_lwp): Declare.
959 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
960 argument instead of a i386_debug_reg_state.
961 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
962 a i386_debug_reg_state.
963 (i386_insert_aligned_watchpoint): Adjust.
964 (i386_remove_aligned_watchpoint): Adjust.
965 (i386_low_stopped_data_address): Read the debug registers from the
966 inferior instead of from the mirrors.
967 * i386-low.h (struct i386_debug_reg_state): Extend comment.
968 (i386_dr_low_get_addr): Declare.
969 (i386_dr_low_get_control): Declare.
970 (i386_dr_low_get_status): Change prototype.
972 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
973 (i386_dr_low_get_addr): New.
974 (i386_dr_low_get_control): New.
975 (i386_dr_low_get_status): Adjust prototype. Return
977 (i386_initial_stuff): Clear dr_status_mirror and
979 (i386_get_thread_context): Adjust.
980 (i386_set_thread_context): Adjust.
981 (i386_thread_added): Adjust.
983 2010-08-24 Pedro Alves <pedro@codesourcery.com>
985 * linux-low.h (linux_thread_area): Delete declaration.
987 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
989 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
990 after its termination.
992 2010-08-09 Pedro Alves <pedro@codesourcery.com>
994 * linux-low.c (gdb_wants_lwp_stopped): Delete.
995 (gdb_wants_all_stopped): Delete.
996 (linux_wait_1): Don't call them.
997 * server.c (handle_v_cont): Tag all threads as want-stopped.
998 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
999 stopped as "client-wants-stopped".
1001 2010-07-31 Pedro Alves <pedro@codesourcery.com>
1003 * Makefile.in (signals_h): New.
1004 (server_h): Depend on it.
1005 (server.o): Don't depend on $(signals_def).
1006 (signals.o): Depend on $(signals_def).
1008 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1010 * Makefile.in (signals_def): New.
1011 (server_h): Append include/gdb/signals.h and signals_def.
1012 (server.o): Append signals_def.
1014 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1016 * server.c (handle_target_event): Use target_signal_to_host for
1017 resume_info.sig initialization.
1018 * target.h (struct thread_resume) <sig>: New comment.
1020 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
1022 * server.c (handle_query): strcpy() the returned string from paddress()
1023 instead of sprintf().
1024 * utils.c (paddress): Return phex_nz().
1026 2010-07-07 Joel Brobecker <brobecker@adacore.com>
1028 * server.c (handle_v_cont): Call mourn_inferior if process
1030 (myresume): Likewise.
1032 2010-07-01 Pedro Alves <pedro@codesourcery.com>
1034 Static tracepoints, and integration with UST.
1036 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
1037 * mem-break.c (uninsert_all_breakpoints)
1038 (reinsert_all_breakpoints): New.
1039 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
1040 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
1041 (gdb_agent_ust_loaded, helper_thread_id)
1042 (gdb_agent_helper_thread_id): New macros.
1043 (struct ipa_sym_addresses): Add addr_ust_loaded,
1044 addr_helper_thread_id, addr_cmd_buf.
1045 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
1046 (in_process_agent_loaded_ust): New.
1047 (write_e_ust_not_loaded): New.
1048 (maybe_write_ipa_ust_not_loaded): New.
1049 (struct collect_static_trace_data_action): New.
1050 (enum tracepoint_type) <static_tracepoint>: New.
1051 (struct tracepoint) <handle>: Mention static tracepoints.
1052 (struct static_tracepoint_ctx): New.
1053 (CMD_BUF_SIZE): New.
1054 (add_tracepoint_action): Handle static tracepoint actions.
1055 (unprobe_marker_at): New.
1056 (clear_installed_tracepoints): Handle static tracepoints.
1057 (cmd_qtdp): Handle static tracepoints.
1058 (probe_marker_at): New.
1059 (cmd_qtstart): Handle static tracepoints.
1060 (response_tracepoint): Handle static tracepoints.
1061 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
1062 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
1063 (get_context_regcache): Handle static tracepoints.
1064 (do_action_at_tracepoint): Handle static tracepoint actions.
1065 (traceframe_find_block_type): Handle static trace data blocks.
1066 (traceframe_read_sdata): New.
1067 (download_tracepoints): Download static tracepoint actions.
1068 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
1069 (GDB_PROBE_NAME): New.
1074 (ust_marker_to_static_tracepoint): New.
1076 (collect_ust_data_at_tracepoint): New.
1077 (gdb_ust_probe): New.
1078 (UNIX_PATH_MAX, SOCK_DIR): New.
1079 (gdb_ust_connect_sync_socket): New.
1080 (resume_thread, stop_thread): New.
1081 (run_inferior_command): New.
1082 (init_named_socket): New.
1083 (gdb_ust_socket_init): New.
1084 (cstr_to_hexstr): New.
1086 (first_marker, next_marker): New.
1087 (response_ust_marker): New.
1088 (cmd_qtfstm, cmd_qtsstm): New.
1089 (unprobe_marker_at, probe_marker_at): New.
1090 (cmd_qtstmat, gdb_ust_thread): New.
1091 (gdb_ust_init): New.
1092 (initialize_tracepoint_ftlib): Call gdb_ust_init.
1093 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
1095 (x86_64_st_collect_regmap): New.
1096 (X86_64_NUM_ST_COLLECT_GREGS): New.
1097 (AMD64_RIP_REGNUM): New.
1098 (supply_static_tracepoint_registers): New.
1099 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
1101 (i386_st_collect_regmap): New.
1102 (i386_NUM_ST_COLLECT_GREGS): New.
1103 (supply_static_tracepoint_registers): New.
1104 * server.c (handle_query): Handle qXfer:statictrace:read.
1105 <qSupported>: Report support for StaticTracepoints, and
1106 qXfer:statictrace:read features.
1107 * server.h (traceframe_read_sdata)
1108 (supply_static_tracepoint_registers): Declare.
1109 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
1110 (unpack_varlen_hex): Include in IPA build.
1111 * Makefile.in (ustlibs, ustinc): New.
1112 (IPA_OBJS): Add remote-utils-ipa.o.
1113 ($(IPA_LIB)): Link -ldl and -lpthread.
1115 (IPAGENT_CFLAGS): Add UST_CFLAGS.
1116 * config.in, configure: Regenerate.
1118 2010-06-20 Ian Lance Taylor <iant@google.com>
1119 Pedro Alves <pedro@codesourcery.com>
1121 * linux-x86-low.c (always_true): Delete.
1122 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
1123 trying to fool the compiler with always_true.
1125 2010-06-20 Pedro Alves <pedro@codesourcery.com>
1127 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
1128 conditions in gdbserver.
1130 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
1132 * spu-low.c (spu_read_memory): Wrap around local store limit.
1133 (spu_write_memory): Likewise.
1135 2010-06-15 Pedro Alves <pedro@codesourcery.com>
1137 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
1138 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
1140 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
1142 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
1143 uses with LONGEST uses.
1145 2010-06-14 Stan Shebs <stan@codesourcery.com>
1146 Pedro Alves <pedro@codesourcery.com>
1150 * linux-x86-low.c: Include limits.h.
1155 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
1156 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
1157 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
1158 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
1159 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
1160 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
1161 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
1162 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
1163 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
1164 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
1165 (amd64_emit_void_call_2): New.
1166 (amd64_emit_ops): New.
1167 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
1168 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
1169 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
1170 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
1171 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
1172 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
1173 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
1174 (i386_emit_call, i386_emit_reg, i386_emit_pop)
1175 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
1176 (i386_emit_stack_adjust, i386_emit_int_call_1)
1177 (i386_emit_void_call_2): New.
1178 (i386_emit_ops): New.
1179 (x86_emit_ops): New.
1180 (the_low_target): Install x86_emit_ops.
1181 * server.h (struct emit_ops): New.
1182 (get_raw_reg_func_addr): Declare.
1183 (current_insn_ptr, emit_error): Declare.
1184 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
1185 (set_trace_state_variable_value): New defines.
1186 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
1187 addr_get_trace_state_variable_value and
1188 addr_set_trace_state_variable_value.
1189 (symbol_list): New fields for get_raw_reg,
1190 get_trace_state_variable_value and set_trace_state_variable_value.
1191 (condfn): New typedef.
1192 (struct tracepoint): New field `compiled_cond'.
1193 (do_action_at_tracepoint): Clear compiled_cond.
1194 (get_trace_state_variable_value, set_trace_state_variable_value):
1196 (condition_true_at_tracepoint): If there's a compiled condition,
1198 (current_insn_ptr, emit_error): New globals.
1199 (struct bytecode_address): New.
1200 (get_raw_reg_func_addr): New.
1201 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
1202 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
1203 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
1204 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
1205 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
1206 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
1207 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
1208 (compile_tracepoint_condition, compile_bytecodes): New.
1209 * target.h (emit_ops): Forward declare.
1210 (struct target_ops): New field emit_ops.
1211 (target_emit_ops): New.
1212 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
1213 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
1214 * linux-low.c (linux_emit_ops): New.
1215 (linux_target_ops): Install it.
1216 * linux-low.h (struct linux_target_ops): New field emit_ops.
1218 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
1220 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
1221 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
1223 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1224 Stan Shebs <stan@codesourcery.com>
1226 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
1227 (all): Depend on $(extra_libraries).
1228 (install-only): Install the IPA.
1229 (IPA_OBJS, IPA_LIB): New.
1230 (clean): Remove the IPA lib.
1231 (IPAGENT_CFLAGS): New.
1232 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
1233 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
1234 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
1235 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
1236 * configure.ac: Check for atomic builtins support in the compiler.
1237 (IPA_DEPFILES, extra_libraries): Define.
1238 * configure.srv (ipa_obj): Add description.
1239 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
1240 (i[34567]86-*-linux*): Set ipa_obj.
1241 (x86_64-*-linux*): Set ipa_obj.
1242 * linux-low.c (stabilizing_threads): New.
1243 (supports_fast_tracepoints): New.
1244 (linux_detach): Stabilize threads before detaching.
1245 (handle_tracepoints): Handle internal tracing breakpoints. Assert
1246 the lwp is either not stabilizing, or is moving out of a jump pad.
1247 (linux_fast_tracepoint_collecting): New.
1248 (maybe_move_out_of_jump_pad): New.
1249 (enqueue_one_deferred_signal): New.
1250 (dequeue_one_deferred_signal): New.
1251 (linux_wait_for_event_1): If moving out of a jump pad, defer
1252 pending signals to later.
1253 (linux_stabilize_threads): New.
1254 (linux_wait_1): Check if threads need moving out of jump pads, and
1256 (stuck_in_jump_pad_callback): New.
1257 (move_out_of_jump_pad_callback): New.
1259 (linux_resume_one_lwp): Handle moving out of jump pads.
1260 (linux_set_resume_request): Dequeue deferred signals.
1261 (need_step_over_p): Also step over fast tracepoint jumps.
1262 (start_step_over): Also uninsert fast tracepoint jumps.
1263 (finish_step_over): Also reinsert fast tracepoint jumps.
1264 (linux_install_fast_tracepoint_jump): New.
1265 (linux_target_ops): Install linux_stabilize_threads and
1266 linux_install_fast_tracepoint_jump_pad.
1267 * linux-low.h (linux_target_ops) <get_thread_area,
1268 install_fast_tracepoint_jump_pad>: New fields.
1269 (struct lwp_info) <collecting_fast_tracepoint,
1270 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
1271 (linux_get_thread_area): Declare.
1272 * linux-x86-low.c (jump_insn): New.
1273 (x86_get_thread_area): New.
1274 (append_insns): New.
1276 (amd64_install_fast_tracepoint_jump_pad): New.
1277 (i386_install_fast_tracepoint_jump_pad): New.
1278 (x86_install_fast_tracepoint_jump_pad): New.
1279 (the_low_target): Install x86_get_thread_area and
1280 x86_install_fast_tracepoint_jump_pad.
1281 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
1282 (struct fast_tracepoint_jump): New.
1283 (fast_tracepoint_jump_insn): New.
1284 (fast_tracepoint_jump_shadow): New.
1285 (find_fast_tracepoint_jump_at): New.
1286 (fast_tracepoint_jump_here): New.
1287 (delete_fast_tracepoint_jump): New.
1288 (set_fast_tracepoint_jump): New.
1289 (uninsert_fast_tracepoint_jumps_at): New.
1290 (reinsert_fast_tracepoint_jumps_at): New.
1291 (set_breakpoint_at): Use write_inferior_memory.
1292 (uninsert_raw_breakpoint): Use write_inferior_memory.
1293 (check_mem_read): Mask out fast tracepoint jumps.
1294 (check_mem_write): Mask out fast tracepoint jumps.
1295 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
1296 (set_fast_tracepoint_jump): Declare.
1297 (delete_fast_tracepoint_jump)
1298 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
1299 (reinsert_fast_tracepoint_jumps_at): Declare.
1300 * regcache.c: Don't compile many functions when building the
1301 in-process agent library.
1302 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
1303 the register buffer in the heap.
1304 (free_register_cache): If the register buffer isn't owned by the
1305 regcache, don't free it.
1306 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
1307 pre-existing register caches.
1308 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
1310 (convert_ascii_to_int): : Constify `from' parameter type.
1311 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
1312 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
1313 the needed buffer in-place.
1314 (relocate_instruction): New.
1315 * server.c (handle_query) <qSymbols>: If the target supports
1316 tracepoints, give it a chance of looking up symbols. Report
1317 support for fast tracepoints.
1318 (handle_status): Stabilize threads.
1319 (process_serial_event): Adjust.
1320 * server.h (struct fast_tracepoint_jump): Forward declare.
1321 (struct process_info) <fast_tracepoint_jumps>: New field.
1322 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
1323 (decode_X_packet, decode_M_packet): Adjust.
1324 (relocate_instruction): Declare.
1325 (in_process_agent_loaded): Declare.
1326 (tracepoint_look_up_symbols): Declare.
1327 (struct fast_tpoint_collect_status): Declare.
1328 (fast_tracepoint_collecting): Declare.
1329 (force_unlock_trace_buffer): Declare.
1330 (handle_tracepoint_bkpts): Declare.
1331 (initialize_low_tracepoint)
1332 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
1333 * target.h (struct target_ops) <stabilize_threads,
1334 install_fast_tracepoint_jump_pad>: New fields.
1335 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
1336 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
1337 [HAVE_STDINT_H]: Include stdint.h.
1338 (trace_debug_1): Rename to ...
1339 (trace_vdebug): ... this.
1340 (trace_debug): Rename to ...
1341 (trace_debug_1): ... this. Add `level' parameter.
1343 (ATTR_USED, ATTR_NOINLINE): New.
1344 (IP_AGENT_EXPORT): New.
1345 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1346 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
1347 (about_to_request_buffer_space, trace_buffer_is_full)
1348 (stopping_tracepoint, expr_eval_result, error_tracepoint)
1349 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
1350 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
1351 (traceframe_write_count, traceframes_created)
1352 (trace_state_variables)
1353 New renaming defines.
1354 (struct ipa_sym_addresses): New.
1355 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
1357 (ipa_sym_addrs): New.
1358 (all_tracepoint_symbols_looked_up): New.
1359 (in_process_agent_loaded): New.
1360 (write_e_ipa_not_loaded): New.
1361 (maybe_write_ipa_not_loaded): New.
1362 (tracepoint_look_up_symbols): New.
1363 (debug_threads) [IN_PROCESS_AGENT]: New.
1364 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
1365 (UNKNOWN_SIDE_EFFECTS): New.
1366 (stop_tracing): New.
1367 (flush_trace_buffer): New.
1368 (stop_tracing_bkpt): New.
1369 (flush_trace_buffer_bkpt): New.
1370 (read_inferior_integer): New.
1371 (read_inferior_uinteger): New.
1372 (read_inferior_data_pointer): New.
1373 (write_inferior_data_pointer): New.
1374 (write_inferior_integer): New.
1375 (write_inferior_uinteger): New.
1376 (struct collect_static_trace_data_action): Delete.
1377 (enum tracepoint_type): New.
1378 (struct tracepoint) <type>: New field `type'.
1379 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
1380 <orig_size, obj_addr_on_target, adjusted_insn_addr>
1381 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
1382 (tracepoints): Use IP_AGENT_EXPORT.
1383 (last_tracepoint): Don't include in the IPA.
1384 (stopping_tracepoint): Use IP_AGENT_EXPORT.
1385 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
1386 (alloced_trace_state_variables): New.
1387 (trace_state_variables): Use IP_AGENT_EXPORT.
1388 (traceframe_t): Delete unused variable.
1389 (circular_trace_buffer): Don't include in the IPA.
1390 (trace_buffer_start): Delete.
1391 (struct trace_buffer_control): New.
1392 (trace_buffer_free): Delete.
1393 (struct ipa_trace_buffer_control): New.
1394 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
1395 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
1397 (trace_buffer_ctrl): New.
1398 (TRACE_BUFFER_CTRL_CURR): New.
1399 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
1400 Reimplement as macros.
1401 (trace_buffer_wrap): Delete.
1402 (traceframe_write_count, traceframe_read_count)
1403 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
1404 (struct tracepoint_hit_ctx) <type>: New field.
1405 (struct fast_tracepoint_ctx): New.
1406 (memory_barrier): New.
1408 (record_tracepoint_error): Update atomically in the IPA.
1409 (clear_inferior_trace_buffer): New.
1410 (about_to_request_buffer_space): New.
1411 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
1412 updating the same buffer.
1413 (add_tracepoint): Default the tracepoint's type to trap
1414 tracepoint, and orig_size to -1.
1415 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
1417 (create_trace_state_variable): New parameter `gdb'. Handle it.
1418 (clear_installed_tracepoints): Clear fast tracepoint jumps.
1419 (cmd_qtdp): Handle fast tracepoints.
1421 (max_jump_pad_size): New.
1422 (gdb_jump_pad_head): New.
1423 (get_jump_space_head): New.
1424 (claim_jump_space): New.
1425 (sort_tracepoints): New.
1426 (MAX_JUMP_SIZE): New.
1427 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
1429 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
1430 support. Upload fast traceframes, and delete internal IPA
1432 (stop_tracing_handler): New.
1433 (flush_trace_buffer_handler): New.
1434 (cmd_qtstop): Upload fast tracepoints.
1435 (response_tracepoint): Handle fast tracepoints.
1436 (tracepoint_finished_step): Upload fast traceframes. Set the
1437 tracepoint hit context's tracepoint type.
1438 (handle_tracepoint_bkpts): New.
1439 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
1440 type. Add comment about fast tracepoints.
1441 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
1442 non-existing action_str field.
1443 (get_context_regcache): Handle fast tracepoints.
1444 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
1446 (fast_tracepoint_from_jump_pad_address): New.
1447 (fast_tracepoint_from_ipa_tpoint_address): New.
1448 (collecting_t): New.
1449 (force_unlock_trace_buffer): New.
1450 (fast_tracepoint_collecting): New.
1453 (write_inferior_data_ptr): New.
1454 (target_tp_heap): New.
1455 (target_malloc): New.
1456 (download_agent_expr): New.
1458 (download_tracepoints): New.
1459 (download_trace_state_variables): New.
1460 (upload_fast_traceframes): New.
1461 (IPA_FIRST_TRACEFRAME): New.
1462 (IPA_NEXT_TRACEFRAME_1): New.
1463 (IPA_NEXT_TRACEFRAME): New.
1464 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
1465 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
1466 (gdb_jump_pad_buffer_end): New.
1467 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
1468 (initialize_tracepoint): Adjust.
1469 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
1470 buffer. Initialize the low module.
1471 * utils.c (PREFIX, TOOLNAME): New.
1472 (malloc_failure): Use PREFIX.
1473 (error): In the IPA, an error causes an exit.
1474 (fatal, warning): Use PREFIX.
1475 (internal_error): Use TOOLNAME.
1476 (NUMCELLS): Increase to 10.
1477 * configure, config.in: Regenerate.
1479 2010-06-01 Pedro Alves <pedro@codesourcery.com>
1481 * server.c (handle_query) <qSupported>: Do two passes over the
1482 qSupported string to avoid nesting strtok.
1484 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1486 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
1488 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
1490 * configure: Regenerate.
1491 * proc-service.list: New.
1493 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1495 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
1498 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
1500 * gdbreplay.c (remote_open): Check error return from socket() call by
1501 its equality to -1 not by it being negative.
1502 * remote-utils.c (remote_open): Likewise.
1504 2010-05-23 Pedro Alves <pedro@codesourcery.com>
1506 * config.h: Regenerate.
1508 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1510 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
1511 doesn't provide PTRACE_GET_THREAD_AREA.
1513 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
1515 * linux-m68k-low.c: Include <asm/ptrace.h>
1516 (ps_get_thread_area): Implement.
1518 2010-05-03 Doug Evans <dje@google.com>
1520 * event-loop.c (struct callback_event): New struct.
1521 (callback_list): New global.
1522 (append_callback_event, delete_callback_event): New functions.
1523 (process_callback): New function.
1524 (start_event_loop): Call it.
1525 * remote-utils.c (NOT_SCHEDULED): Define.
1526 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
1527 moved out of readchar.
1528 (readchar): Rewrite. Call reschedule before returning.
1529 (reset_readchar): New function.
1530 (remote_close): Call it.
1531 (process_remaining, reschedule): New functions.
1532 * server.h (callback_handler_func): New typedef.
1533 (append_callback_event, delete_callback_event): Declare.
1535 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1537 * proc-service.c (ps_pglobal_lookup): Use
1538 thread_db_look_up_one_symbol.
1539 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
1540 parameter. Use it instead of all_symbols_looked_up.
1541 * server.h (struct process_info) <all_symbols_looked_up>: Delete
1543 (all_symbols_looked_up): Don't declare.
1544 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
1545 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
1547 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
1548 Set all_symbols_looked_up here.
1549 (thread_db_look_up_one_symbol): New.
1550 (thread_db_get_tls_address): Adjust.
1551 (thread_db_load_search, try_thread_db_load_1): Always allocate the
1552 thread_db object on the heap, and tentatively set it in the
1554 (thread_db_init): Don't set all_symbols_looked_up here.
1555 * linux-low.h (thread_db_look_up_one_symbol): Declare.
1557 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1559 * linux-low.c (linux_kill, linux_detach): Adjust.
1560 (status_pending_p_callback): Remove redundant statement. Check
1561 for !TARGET_WAITIKIND_IGNORE, instead of
1562 TARGET_WAITKIND_STOPPED.
1563 (handle_tracepoints): Make sure LWP is locked. Adjust.
1564 (linux_wait_for_event_1): Adjust.
1565 (linux_cancel_breakpoints): New.
1566 (unsuspend_one_lwp): New.
1567 (unsuspend_all_lwps): New.
1568 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
1569 (send_sigstop_callback): Change return type to int, add new
1570 `except' parameter and handle it.
1571 (suspend_and_send_sigstop_callback): New.
1572 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
1573 pass them down. If SUSPEND, also increment the lwp's suspend
1575 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
1576 (need_step_over_p): Don't consider suspended LWPs.
1577 (start_step_over): Adjust.
1578 (proceed_one_lwp): Change return type to int, add new `except'
1579 parameter and handle it.
1580 (unsuspend_and_proceed_one_lwp): New.
1581 (proceed_all_lwps): Use find_inferior instead of
1583 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
1584 also decrement the suspend count of LWPs. Pass `except' down,
1585 instead of hacking its suspend count.
1586 (linux_pause_all): Add `freeze' parameter. Adjust.
1587 (linux_unpause_all): New.
1588 (linux_target_ops): Install linux_unpause_all.
1589 * server.c (handle_status): Adjust.
1590 * target.h (struct target_ops): New fields `unpause_all' and
1591 `cancel_breakpoints'. Add new parameter to `pause_all'.
1592 (pause_all): Add new `freeze' parameter.
1594 (cancel_breakpoints): New.
1595 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
1597 (cmd_qtstart): Pause threads.
1598 (stop_tracing): Pause threads, and cancel breakpoints.
1599 * win32-low.c (win32_target_ops): Adjust.
1601 2010-05-03 Pedro Alves <pedro@codesourcery.com>
1603 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
1604 the inferior right away from here...
1605 (linux_wait_1): ... to here, and adjust to check the thread's
1606 last_resume_kind instead of the lwp's step or stop_expected flags.
1608 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1610 * README: Use consistent `GDB' and `GDBserver' spellings.
1612 2010-05-02 Pedro Alves <pedro@codesourcery.com>
1614 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
1615 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
1616 (linux_detach_one_lwp): Assume the lwp is stopped.
1617 (any_thread_of): Delete.
1618 (linux_detach): Stop all lwps here. Don't blindly delete all
1620 (delete_lwp_callback): New.
1621 (linux_mourn): Delete all lwps of the process that is gone.
1622 (linux_wait_1): Don't delete the last lwp of the process here.
1623 * mem-break.h (mark_breakpoints_out): Declare.
1624 * mem-break.c (mark_breakpoints_out): New.
1625 (free_all_breakpoints): Use it.
1626 * server.c (handle_target_event): If the process is gone, mark
1628 * thread-db.c (struct thread_db) <create_bp>: New field.
1629 (thread_db_enable_reporting): Fix prototype. Store a thread event
1630 breakpoint reference in the thread_db struct.
1631 (thread_db_load_search): Clear the thread_db object.
1632 (try_thread_db_load_1): Ditto.
1633 (switch_to_process): New.
1634 (disable_thread_event_reporting): Use it.
1635 (remove_thread_event_breakpoints): New.
1636 (thread_db_detach, thread_db_mourn): Use it.
1638 2010-05-01 Pedro Alves <pedro@codesourcery.com>
1640 * linux-low.c (linux_enable_event_reporting): New.
1641 (linux_wait_for_event_1, handle_extended_wait): Use it.
1643 2010-04-30 Pedro Alves <pedro@codesourcery.com>
1645 * linux-low.c (linux_kill_one_lwp, linux_kill)
1646 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
1647 (send_sigstop): Take an lwp_info as parameter instead. Queue a
1648 SIGSTOP even if the LWP is stopped.
1649 (send_sigstop_callback): New.
1650 (stop_all_lwps): Use send_sigstop_callback instead.
1651 (linux_resume_one_thread): Adjust.
1652 (proceed_one_lwp): Still proceed an LWP that the client has
1653 requested to stop, if we haven't reported it as stopped yet. Make
1654 sure that LWPs the client want stopped, have a pending SIGSTOP.
1656 2010-04-26 Doug Evans <dje@google.com>
1658 * server.c (handle_general_set): Make static.
1660 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
1661 Print received char after testing for error/eof instead of before.
1662 (input_interrupt): Tweak comment.
1664 2010-04-23 Doug Evans <dje@google.com>
1666 * server.c (start_inferior): Print inferior argv if --debug.
1668 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
1670 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
1671 * nto-x86-low.c: Include server.h
1673 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
1675 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
1676 be consistent with other sources of this directory.
1677 (init_registers_amd64): Correct name of source file of this function
1680 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1682 * configure.srv (x86_64-*-mingw*): New configuration for Windows
1685 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1687 * win32-i386-low.c: Add 64-bit support.
1688 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
1689 (init_registers_amd64): Declare.
1690 (mappings): Add 64-bit version of array.
1691 (init_windows_x86): New function.
1692 (the_low_target): Change init_arch field to init_windows_x86.
1694 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1696 * win32-low.c: Adapt to support also 64-bit architecture.
1697 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
1698 (get_image_name): Use SIZE_T type for local variable `done'.
1699 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
1700 (toolhelp_get_dll_name): Idem.
1701 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
1702 Use uintptr_t typecast to avoid warning.
1703 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
1704 (handle_exception): Use phex_nz to avoid warning.
1705 (win32_wait): Remove unused local variable `process'.
1707 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
1709 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
1712 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
1714 * configure.ac: Use `ws2_32' library for srv_mingw.
1715 * configure: Regenerate.
1716 * gdbreplay.c: Include winsock2.h instead of winsock.h.
1717 * remote-utils.c: Likewise.
1719 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
1721 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
1722 if __x86_64__ is defined.
1724 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1726 * configure: Regenerate.
1728 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
1730 * server.c (handle_query): Handle 'qGetTIBAddr' query.
1731 * target.h (target_ops): New get_tib_address field.
1732 * win32-low.h (win32_thread_info): Add thread_local_base field.
1733 * win32-low.c (child_add_thread): Add tlb argument.
1734 Set thread_local_base field to TLB.
1735 (get_child_debug_event): Adapt to child_add_thread change.
1736 (win32_get_tib_address): New function.
1737 (win32_target_ops): Set get_tib_address field to
1738 win32_get_tib_address.
1739 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
1741 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1743 * linux-low.c (linux_mourn): Also remove the process.
1744 * server.c (handle_target_event): Don't remove the process here.
1745 * nto-low.c (nto_mourn): New.
1746 (nto_target_ops): Install it.
1747 * spu-low.c (spu_mourn): New.
1748 (spu_target_ops): Install it.
1749 * win32-low.c (win32_mourn): New.
1750 (win32_target_ops): Install it.
1752 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1754 * server.h (buffer_xml_printf): Remove redundant `;'.
1756 2010-04-12 Pedro Alves <pedro@codesourcery.com>
1758 * regcache.c (set_register_cache): Invalidate regcaches before
1759 changing the register cache layout.
1760 (regcache_invalidate_one): Allow a NULL regcache.
1761 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
1762 regcaches before changing the register cache layout or the target
1765 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
1767 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
1768 variable warning on Linux/x86-64.
1770 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1772 GDBserver disconnected tracing support.
1774 * linux-low.c (linux_remove_process): Delete.
1775 (add_lwp): Don't set last_resume_kind here.
1776 (linux_kill): Use `mourn'.
1777 (linux_detach): Use `thread_db_detach', and `mourn'.
1779 (linux_attach_lwp_1): Adjust comment.
1780 (linux_attach): last_resume_kind moved the thread_info; adjust.
1781 (status_pending_p_callback): Adjust.
1782 (linux_wait_for_event_1): Adjust.
1783 (count_events_callback, select_singlestep_lwp_callback)
1784 (select_event_lwp_callback, cancel_breakpoints_callback)
1785 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
1786 (proceed_one_lwp): Adjust.
1787 (linux_async): Add debug output.
1788 (linux_thread_stopped): New.
1789 (linux_pause_all): New.
1790 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
1792 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
1793 (thread_db_free): Delete declaration.
1794 (thread_db_detach, thread_db_mourn): Declare.
1795 * thread-db.c (thread_db_init): Use thread_db_mourn.
1796 (thread_db_free): Delete, split in two.
1797 (disable_thread_event_reporting): New.
1798 (thread_db_detach): New.
1799 (thread_db_mourn): New.
1801 * server.h (struct thread_info) <last_resume_kind>: New field.
1802 <attached>: Add comment.
1803 <gdb_detached>: New field.
1804 (handler_func): Change return type to int.
1805 (handle_serial_event, handle_target_event): Ditto.
1806 (gdb_connected): Declare.
1808 (disconnected_tracing): Declare.
1809 (stop_tracing): Declare.
1811 * server.c (handle_query) <qSupported>: Report support for
1812 disconnected tracing.
1813 (queue_stop_reply_callback): Account for running threads.
1814 (gdb_wants_thread_stopped): New.
1815 (gdb_wants_all_threads_stopped): New.
1816 (gdb_reattached_process): New.
1817 (handle_status): Clear the `gdb_detached' flag of all processes.
1818 In all-stop, stop all threads.
1819 (main): Be sure to leave tfind mode. Handle disconnected tracing.
1820 (process_serial_event): If the remote connection breaks, or if an
1821 exit was forced with "monitor exit", force an event loop exit.
1822 Handle disconnected tracing on detach.
1823 (handle_serial_event): Adjust.
1824 (handle_target_event): If GDB isn't connected, forward events back
1825 to the inferior, unless the last process exited, in which case,
1826 exit gdbserver. Adjust interface.
1828 * remote-utils.c (remote_open): Don't block in accept. Instead
1829 register an event loop source on the listen socket file
1830 descriptor. Refactor bits into ...
1831 (listen_desc): ... this new global.
1832 (gdb_connected): ... this new function.
1833 (enable_async_notification): ... this new function.
1834 (handle_accept_event): ... this new function.
1835 (remote_close): Clear remote_desc.
1837 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
1839 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
1841 (mourn_inferior): Define.
1842 (target_process_qsupported): Avoid the dangling else problem.
1843 (thread_stopped): Define.
1844 (pause_all): Define.
1845 (target_waitstatus_to_string): Declare.
1846 * target.c (target_waitstatus_to_string): New.
1848 * tracepoint.c (tracing): Make extern.
1849 (disconnected_tracing): New.
1850 (stop_tracing): Make extern. Handle tracing stops due to GDB
1852 (cmd_qtdisconnected): New.
1853 (cmd_qtstatus): Report disconnected tracing status in trace reply.
1854 (handle_tracepoint_general_set): Handle QTDisconnected.
1856 * event-loop.c (event_handler_func): Change return type to int.
1857 (process_event): Bail out if the event handler wants the event
1859 (handle_file_event): Ditto.
1860 (start_event_loop): Bail out if the event handler wants the event
1863 * nto-low.c (nto_target_ops): Adjust.
1864 * spu-low.c (spu_wait): Don't remove the process here.
1865 (spu_target_ops): Adjust.
1866 * win32-low.c (win32_wait): Don't remove the process here.
1867 (win32_target_ops): Adjust.
1869 2010-04-11 Pedro Alves <pedro@codesourcery.com>
1871 * regcache.c (realloc_register_cache): Invalidate inferior's
1872 regcache before recreating it.
1874 2010-04-09 Pedro Alves <pedro@codesourcery.com>
1876 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
1878 2010-04-09 Stan Shebs <stan@codesourcery.com>
1879 Pedro Alves <pedro@codesourcery.com>
1881 * server.h (LONGEST): New.
1882 (struct thread_info) <while_stepping>: New field.
1883 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
1885 (initialize_tracepoint, handle_tracepoint_general_set)
1886 (handle_tracepoint_query, tracepoint_finished_step)
1887 (tracepoint_was_hit, release_while_stepping_state_list):
1888 (current_traceframe): Declare.
1889 * server.c (handle_general_set): Handle tracepoint packets.
1891 (write_memory): New.
1892 (handle_search_memory_1): Use read_memory.
1893 (handle_query): Report support for conditional tracepoints, trace
1894 state variables, and tracepoint sources. Handle tracepoint
1896 (main): Initialize the tracepoints module.
1897 (process_serial_event): Handle traceframe reads/writes.
1899 * linux-low.c (handle_tracepoints): New.
1900 (linux_wait_1): Call it.
1901 (linux_resume_one_lwp): Handle while-stepping.
1902 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
1903 (linux_target_ops): Install them.
1904 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
1906 * linux-x86-low.c (x86_supports_tracepoints): New.
1907 (the_low_target). Install it.
1909 * mem-break.h (delete_breakpoint): Declare.
1910 * mem-break.c (delete_breakpoint): Make external.
1912 * target.h (struct target_ops): Add `supports_tracepoints',
1913 `read_pc', and `write_pc' fields.
1914 (target_supports_tracepoints): Define.
1915 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
1918 * regcache.h (struct regcache) <registers_owned>: New field.
1919 (init_register_cache, regcache_cpy): Declare.
1920 (regcache_read_pc, regcache_write_pc): Declare.
1921 (register_cache_size): Declare.
1922 (supply_regblock): Declare.
1923 * regcache.c (init_register_cache): New.
1924 (new_register_cache): Use it.
1925 (regcache_cpy): New.
1926 (register_cache_size): New.
1927 (supply_regblock): New.
1928 (regcache_read_pc, regcache_write_pc): New.
1930 * tracepoint.c: New.
1932 * Makefile.in (OBS): Add tracepoint.o.
1933 (tracepoint.o): New rule.
1935 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1937 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1939 (i386-mmx.c): Likewise.
1940 (i386-mmx-linux.o): Likewise.
1941 (i386-mmx-linux.c): Likewise.
1943 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1944 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1945 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1946 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1948 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1949 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1950 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1952 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1954 * Makefile.in (clean): Updated.
1956 (i386-avx.c): Likewise.
1957 (i386-avx-linux.o): Likewise.
1958 (i386-avx-linux.c): Likewise.
1959 (amd64-avx.o): Likewise.
1960 (amd64-avx.c): Likewise.
1961 (amd64-avx-linux.o): Likewise.
1962 (amd64-avx-linux.c): Likewise.
1964 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1965 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1966 (srv_amd64_regobj): Add amd64-avx.o.
1967 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1968 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1969 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1970 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1971 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1972 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1973 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1975 * i387-fp.c: Include "i386-xstate.h".
1977 (i387_cache_to_xsave): Likewise.
1978 (i387_xsave_to_cache): Likewise.
1979 (x86_xcr0): Likewise.
1981 * i387-fp.h (i387_cache_to_xsave): Likewise.
1982 (i387_xsave_to_cache): Likewise.
1983 (x86_xcr0): Likewise.
1985 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1986 * linux-crisv32-low.c (target_regsets): Likewise.
1987 * linux-m68k-low.c (target_regsets): Likewise.
1988 * linux-mips-low.c (target_regsets): Likewise.
1989 * linux-ppc-low.c (target_regsets): Likewise.
1990 * linux-s390-low.c (target_regsets): Likewise.
1991 * linux-sh-low.c (target_regsets): Likewise.
1992 * linux-sparc-low.c (target_regsets): Likewise.
1993 * linux-xtensa-low.c (target_regsets): Likewise.
1995 * linux-low.c: Include <sys/uio.h>.
1996 (regsets_fetch_inferior_registers): Support nt_type.
1997 (regsets_store_inferior_registers): Likewise.
1998 (linux_process_qsupported): New.
1999 (linux_target_ops): Add linux_process_qsupported.
2001 * linux-low.h (regset_info): Add nt_type.
2002 (linux_target_ops): Add process_qsupported.
2004 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
2006 (init_registers_i386_avx_linux): New.
2007 (init_registers_amd64_avx_linux): Likewise.
2008 (xmltarget_i386_linux_no_xml): Likewise.
2009 (xmltarget_amd64_linux_no_xml): Likewise.
2010 (PTRACE_GETREGSET): Likewise.
2011 (PTRACE_SETREGSET): Likewise.
2012 (x86_fill_xstateregset): Likewise.
2013 (x86_store_xstateregset): Likewise.
2014 (use_xml): Likewise.
2015 (x86_linux_update_xmltarget): Likewise.
2016 (x86_linux_process_qsupported): Likewise.
2017 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
2018 (x86_arch_setup): Don't call init_registers_amd64_linux nor
2019 init_registers_i386_linux here. Call
2020 x86_linux_update_xmltarget.
2021 (the_low_target): Add x86_linux_process_qsupported.
2023 * server.c (handle_query): Call target_process_qsupported.
2025 * target.h (target_ops): Add process_qsupported.
2026 (target_process_qsupported): New.
2028 2010-04-03 Pedro Alves <pedro@codesourcery.com>
2030 * inferiors.c (add_thread): Set last_status kind to
2031 TARGET_WAITKIND_IGNORE.
2032 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
2033 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
2034 (linux_wait_1): Move `thread' local definition to block that uses
2035 it. Don't NULL initialize `event_child'.
2036 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
2037 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
2038 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
2040 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2042 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
2043 an extended waitstatus, or by a watchpoint.
2044 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
2045 thread was stepping or has been stopped by a watchpoint.
2047 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2049 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
2050 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
2051 of another, then delete the previous, and validate all
2053 (validate_inserted_breakpoint): New.
2054 (delete_disabled_breakpoints): New.
2055 (validate_breakpoints): New.
2056 (check_mem_read): Validate breakpoints before trusting their
2057 shadow. Delete disabled breakpoints.
2058 (check_mem_write): Validate breakpoints before trusting they
2059 should be inserted. Delete disabled breakpoints.
2060 * mem-break.h (validate_breakpoints):
2061 * server.c (handle_query): Validate breakpoints when we see a
2064 2010-04-01 Pedro Alves <pedro@codesourcery.com>
2066 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
2067 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
2068 if we could tell there's a GDB breakpoint at stop_pc.
2069 (need_step_over_p): Don't do a step over if we find a GDB
2070 breakpoint at the resume PC.
2072 * mem-break.c (struct raw_breakpoint): New.
2073 (enum bkpt_type): New type `gdb_breakpoint'.
2074 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
2075 fields. New field `raw'.
2076 (find_raw_breakpoint_at): New.
2077 (set_raw_breakpoint_at): Handle refcounting. Create a raw
2079 (set_breakpoint_at): Adjust.
2080 (delete_raw_breakpoint): New.
2081 (release_breakpoint): New.
2082 (delete_breakpoint): Rename to...
2083 (delete_breakpoint_1): ... this. Add proc parameter. Use
2084 release_breakpoint. Return ENOENT.
2085 (delete_breakpoint): Reimplement.
2086 (find_breakpoint_at): Delete.
2087 (find_gdb_breakpoint_at): New.
2088 (delete_breakpoint_at): Delete.
2089 (set_gdb_breakpoint_at): New.
2090 (delete_gdb_breakpoint_at): New.
2091 (gdb_breakpoint_here): New.
2092 (set_reinsert_breakpoint): Use release_breakpoint.
2093 (uninsert_breakpoint): Rename to ...
2094 (uninsert_raw_breakpoint): ... this.
2095 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
2096 (reinsert_raw_breakpoint): Change parameter type to
2098 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
2100 (check_breakpoints): Adjust. Use release_breakpoint.
2101 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
2102 (breakpoint_inserted_here): Ditto.
2103 (check_mem_read): Adjust to iterate over raw breakpoints instead.
2104 Don't trust the breakpoint's shadow if it is not inserted.
2105 (check_mem_write): Adjust to iterate over raw breakpoints instead.
2106 (delete_all_breakpoints): Adjust.
2107 (free_all_breakpoints): Mark all breakpoints as uninserted, and
2108 use delete_breakpoint_1.
2110 * mem-break.h (breakpoints_supported): Delete declaration.
2111 (set_gdb_breakpoint_at): Declare.
2112 (gdb_breakpoint_here): Declare.
2113 (delete_breakpoint_at): Delete.
2114 (delete_gdb_breakpoint_at): Declare.
2116 * server.h (struct raw_breakpoint): Forward declare.
2117 (struct process_info): New field `raw_breakpoints'.
2119 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
2122 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2124 * linux-low.c (status_pending_p_callback): Fix comment.
2125 (linux_wait_for_event_1): Move most of the internal breakpoint
2126 handling from here...
2127 (linux_wait_1): ... to here.
2128 (count_events_callback): New.
2129 (select_singlestep_lwp_callback): New.
2130 (select_event_lwp_callback): New.
2131 (cancel_breakpoints_callback): New.
2132 (select_event_lwp): New.
2133 (linux_wait_1): Simplify internal breakpoint handling. Give equal
2134 priority to all LWPs that have had events that should be reported
2135 to the client. Cancel breakpoints when about to reporting the
2136 event to the client, not while stopping lwps. No longer cancel
2137 finished single-steps here.
2138 (cancel_finished_single_step): Delete.
2139 (cancel_finished_single_steps): Delete.
2141 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2143 * mem-break.c (enum bkpt_type): New.
2144 (struct breakpoint): New field `type'.
2145 (set_breakpoint_at): Change return type to struct breakpoint
2146 pointer. Set type to `other_breakpoint' by default.
2147 (delete_breakpoint): Rewrite, supporting more than one breakpoint
2148 in the breakpoint list.
2149 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
2150 (reinsert_breakpoint): Rename to ...
2151 (reinsert_raw_breakpoint): ... this.
2152 (reinsert_breakpoints_at): Adjust.
2153 * mem-break.h (struct breakpoint): Declare.
2154 (set_breakpoint_at): Change return type to struct breakpoint
2157 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2159 * server.c (handle_query): Assign, not compare.
2161 2010-03-24 Pedro Alves <pedro@codesourcery.com>
2163 Teach linux gdbserver to step-over-breakpoints.
2165 * linux-low.c (can_hardware_single_step): New.
2166 (supports_breakpoints): New.
2167 (handle_extended_wait): If stopping threads, read the stop pc of
2170 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
2171 low target doesn't support retrieving the PC.
2172 (add_lwp): Set last_resume_kind to resume_continue.
2173 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
2174 (linux_attach): Don't clear stop_expected. Set the lwp's
2175 last_resume_kind to resume_stop.
2176 (linux_detach_one_lwp): Don't check for removed breakpoints.
2177 (check_removed_breakpoint): Delete.
2178 (status_pending_p): Rename to ...
2179 (status_pending_p_callback): ... this. Don't check for removed
2180 breakpoints. Don't consider threads that are stopped from GDB's
2182 (linux_wait_for_lwp): Always read the stop_pc here.
2183 (cancel_breakpoint): New.
2184 (step_over_bkpt): New global.
2185 (linux_wait_for_event_1): Implement stepping over breakpoints.
2186 (gdb_wants_lwp_stopped): New.
2187 (gdb_wants_all_stopped): New.
2188 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
2189 single-step traps here. Store the thread's last reported target
2191 (send_sigstop): Don't clear stop_expected. Always set it,
2193 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
2194 (cancel_finished_single_step): New.
2195 (cancel_finished_single_steps): New.
2196 (wait_for_sigstop): Don't cancel finished single-step traps here.
2197 (linux_resume_one_lwp): Don't check for removed breakpoints.
2198 Don't set `step' on non-hardware step archs.
2199 (linux_set_resume_request): Ignore resume_stop requests if already
2200 stopping or stopped. Set the lwp's last_resume_kind.
2201 (resume_status_pending_p): Don't check for removed breakpoints.
2202 (need_step_over_p): New.
2203 (start_step_over): New.
2204 (finish_step_over): New.
2205 (linux_resume_one_thread): Always queue a sigstop for resume_stop
2206 requests. Clear the thread's last reported target waitstatus.
2207 Don't use the `suspended' flag. Don't consider pending breakpoints.
2208 (linux_resume): Start a step-over if necessary.
2209 (proceed_one_lwp): New.
2210 (proceed_all_lwps): New.
2211 (unstop_all_lwps): New.
2212 * linux-low.h (struct lwp_info): Rewrite comment for the
2213 `suspended' flag. Add the `stop_pc' field. Delete the
2214 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
2215 Add `'last_resume_kind' and `need_step_over' fields.
2216 * inferiors.c (struct thread_info): Delete, moved elsewhere.
2217 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
2218 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
2219 (set_raw_breakpoint_at): New.
2220 (set_breakpoint_at): Rewrite to use it.
2221 (reinsert_breakpoint_handler): Delete.
2222 (set_reinsert_breakpoint): New.
2223 (reinsert_breakpoint_by_bp): Delete.
2224 (delete_reinsert_breakpoints): New.
2225 (uninsert_breakpoint): Rewrite.
2226 (uninsert_breakpoints_at): New.
2227 (reinsert_breakpoint): Rewrite.
2228 (reinsert_breakpoints_at): New.
2229 (check_breakpoints): Rewrite.
2230 (breakpoint_here): New.
2231 (breakpoint_inserted_here): New.
2232 (check_mem_read): Adjust.
2233 * mem-break.h (breakpoints_supported, breakpoint_here)
2234 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
2235 (reinsert_breakpoint_by_bp): Delete declaration.
2236 (delete_reinsert_breakpoints): Declare.
2237 (reinsert_breakpoint): Delete declaration.
2238 (reinsert_breakpoints_at): Declare.
2239 (uninsert_breakpoint): Delete declaration.
2240 (uninsert_breakpoints_at): Declare.
2241 (check_breakpoints): Adjust prototype.
2242 * server.h: Adjust include order.
2243 (struct thread_info): Declare here. Add a `last_status' field.
2245 2010-03-23 Michael Snyder <msnyder@vmware.com>
2247 * server.c (crc32): New function.
2248 (handle_query): Add handling for 'qCRC:' request.
2250 2010-03-23 Pedro Alves <pedro@codesourcery.com>
2252 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
2253 lwp had been stopped by a watchpoint.
2255 2010-03-16 Pedro Alves <pedro@codesourcery.com>
2257 * server.h (internal_error): Declare.
2258 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
2259 * utils.c (internal_error): New function.
2261 2010-03-15 Andreas Schwab <schwab@redhat.com>
2263 * configure.srv: Fix typo setting srv_regobj.
2265 2010-03-15 Pedro Alves <pedro@codesourcery.com>
2267 * linux-low.c (fetch_register): Avoid passing a non string literal
2269 (usr_store_inferior_registers): Ditto.
2271 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2273 * linux-low.c (linux_write_memory): Bail out early if peeking
2276 2010-03-14 Pedro Alves <pedro@codesourcery.com>
2278 * linux-low.h (struct lwp_info): New fields
2279 `stopped_by_watchpoint' and `stopped_data_address'.
2280 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
2281 here, and cache them in the lwp object.
2282 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
2284 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
2286 (linux_stopped_by_watchpoint): Rewrite.
2287 (linux_stopped_data_address): Rewrite.
2289 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
2291 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
2292 switching the current inferior, not before.
2294 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
2296 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
2297 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
2298 i386-linux.c and amd64-linux.c.
2299 (reg-i386.o): Removed.
2300 (reg-i386.c): Likewise.
2301 (reg-i386-linux.o): Likewise.
2302 (reg-i386-linux.c): Likewise.
2303 (reg-x86-64.o): Likewise.
2304 (reg-x86-64.c): Likewise.
2305 (reg-x86-64-linux.o): Likewise.
2306 (reg-x86-64-linux.c): Likewise.
2309 (i386-linux.o): Likewise.
2310 (i386-linux.c): Likewise.
2311 (amd64.o): Likewise.
2312 (amd64.c): Likewise.
2313 (amd64-linux.o): Likewise.
2314 (amd64-linux.c): Likewise.
2316 * configure.srv (srv_i386_regobj): New.
2317 (srv_i386_linux_regobj): Likewise.
2318 (srv_amd64_regobj): Likewise.
2319 (srv_amd64_linux_regobj): Likewise.
2320 (srv_i386_32bit_xmlfiles): Likewise.
2321 (srv_i386_64bit_xmlfiles): Likewise.
2322 (srv_i386_xmlfiles): Likewise.
2323 (srv_amd64_xmlfiles): Likewise.
2324 (srv_i386_linux_xmlfiles): Likewise.
2325 (srv_amd64_linux_xmlfiles): Likewise.
2326 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
2327 srv_xmlfiles to $srv_i386_xmlfiles.
2328 (i[34567]86-*-mingw32ce*): Likewise.
2329 (i[34567]86-*-mingw*): Likewise.
2330 (i[34567]86-*-nto*): Likewise.
2331 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
2332 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
2333 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
2334 (x86_64-*-linux*): Likewise.
2336 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
2337 (init_registers_amd64_linux): New.
2338 (x86_arch_setup): Replace init_registers_x86_64_linux with
2339 init_registers_amd64_linux.
2341 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
2343 * configure.ac: Check for libdl. If it is not available link against
2344 static libthread_db.
2345 * configure: Regenerate.
2347 2010-02-22 Pedro Alves <pedro@codesourcery.com>
2351 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
2352 handing a read watchpoint.
2353 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
2355 2010-02-12 Doug Evans <dje@google.com>
2357 * linux-low.c (linux_supports_tracefork_flag): Document.
2358 (linux_look_up_symbols): Add comment.
2360 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
2362 * regcache.c (supply_register): Clear regcache if buf is NULL.
2364 2010-02-02 Nicolas Roche <roche@sourceware.org>
2365 Joel Brobecker <brobecker@adacore.com>
2367 * inferiors.c (find_inferior): Add function documentation.
2368 (unloaded_dll): Handle the case where the unloaded dll has not
2369 been previously registered in the dll list.
2371 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
2373 * linux-arm-low.c (thumb_breakpoint_len): Delete.
2374 (thumb2_breakpoint): New.
2375 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
2377 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2379 * linux-low.c (get_stop_pc): Check for SIGTRAP.
2380 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
2383 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2385 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
2387 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2389 * linux-s390-low.c (s390_collect_ptrace_register)
2390 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
2392 2010-01-21 Doug Evans <dje@google.com>
2394 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
2395 (PTRACE_ARG4_TYPE): New macro.
2396 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
2397 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
2398 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
2399 (usr_store_inferior_registers): Ditto.
2400 (linux_read_memory, linux_write_memory): Ditto.
2401 (linux_test_for_tracefork): Ditto.
2403 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
2404 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
2406 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2408 * proc-service.c (ps_lgetregs): Don't refetch registers from the
2411 2010-01-21 Pedro Alves <pedro@codesourcery.com>
2413 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
2414 prototype to take a regcache. Adjust.
2416 2010-01-20 Pedro Alves <pedro@codesourcery.com>
2418 * regcache.h (struct thread_info): Forward declare.
2419 (struct regcache): New.
2420 (new_register_cache): Adjust prototype.
2421 (get_thread_regcache): Declare.
2422 (free_register_cache): Adjust prototype.
2423 (registers_to_string, registers_from_string): Ditto.
2424 (supply_register, supply_register_by_name, collect_register)
2425 (collect_register_as_string, collect_register_by_name): Ditto.
2426 * regcache.c (struct inferior_regcache_data): Delete.
2427 (get_regcache): Rename to ...
2428 (get_thread_regcache): ... this. Adjust. Switch inferior before
2430 (regcache_invalidate_one): Adjust.
2431 (regcache_invalidate): Fix prototype.
2432 (new_register_cache): Return the new register cache.
2433 (free_register_cache): Change prototype.
2434 (realloc_register_cache): Adjust.
2435 (registers_to_string): Change prototype to take a regcache. Adjust.
2436 (registers_from_string): Ditto.
2437 (register_data): Ditto.
2438 (supply_register): Ditto.
2439 (supply_register_by_name): Ditto.
2440 (collect_register): Ditto.
2441 (collect_register_as_string): Ditto.
2442 (collect_register_by_name): Ditto.
2443 * server.c (process_serial_event): Adjust.
2444 * linux-low.h (regset_fill_func, regset_store_func): Change
2446 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
2448 * linux-low.c (get_stop_pc): Adjust.
2449 (check_removed_breakpoint): Adjust.
2450 (linux_wait_for_event): Adjust.
2451 (linux_resume_one_lwp): Adjust.
2452 (fetch_register): Add regcache parameter. Adjust.
2453 (usr_store_inferior_registers): Ditto.
2454 (regsets_fetch_inferior_registers): Ditto.
2455 (regsets_store_inferior_registers): Ditto.
2456 (linux_fetch_registers, linux_store_registers): Ditto.
2457 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
2459 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2460 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
2461 prototype to take a regcache.
2462 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
2463 * remote-utils.c (convert_ascii_to_int, outreg)
2464 (prepare_resume_reply): Change prototype to take a regcache.
2466 * target.h (struct target_ops) <fetch_registers, store_registers>:
2467 Change prototype to take a regcache.
2468 (fetch_inferior_registers, store_inferior_registers): Change
2469 prototype to take a regcache. Adjust.
2470 * proc-service.c (ps_lgetregs): Adjust.
2471 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
2472 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
2473 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
2474 take a regcache. Adjust.
2475 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
2476 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2477 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
2478 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
2479 * linux-cris-low.c (cris_get_pc, cris_set_pc)
2480 (cris_cannot_fetch_register):
2481 (cris_breakpoint_at): Change prototype to take a regcache.
2483 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
2484 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
2485 to take a regcache. Adjust.
2486 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
2488 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
2489 take a regcache. Adjust.
2490 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
2491 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
2492 (m68k_set_pc): Change prototype to take a regcache. Adjust.
2493 * linux-mips-low.c (mips_get_pc):
2494 (mips_set_pc): Change prototype to take a regcache. Adjust.
2495 (mips_reinsert_addr): Adjust.
2496 (mips_collect_register): Change prototype to take a regcache.
2498 (mips_supply_register):
2499 (mips_collect_register_32bit, mips_supply_register_32bit)
2500 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
2501 (mips_store_fpregset): Ditto.
2502 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
2504 (parse_spufs_run): Adjust.
2505 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
2506 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
2507 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
2508 take a regcache. Adjust.
2509 * linux-s390-low.c (s390_collect_ptrace_register)
2510 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
2511 (s390_set_pc): Change prototype to take a regcache. Adjust.
2512 (s390_arch_setup): Adjust.
2513 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
2514 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
2515 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
2516 (sparc_fill_gregset, sparc_store_gregset_from_stack)
2517 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
2519 (sparc_breakpoint_at): Adjust.
2520 * linux-xtensa-low.c (xtensa_fill_gregset):
2521 (xtensa_store_gregset):
2522 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
2523 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
2524 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
2525 prototype to take a regcache. Adjust.
2526 * win32-arm-low.c (arm_fetch_inferior_register)
2527 (arm_store_inferior_register): Change prototype to take a
2529 * win32-i386-low.c (i386_fetch_inferior_register)
2530 (i386_store_inferior_register): Change prototype to take a
2532 * win32-low.c (child_fetch_inferior_registers)
2533 (child_store_inferior_registers): Change prototype to take a
2535 (win32_wait): Adjust.
2536 (win32_fetch_inferior_registers): Change prototype to take a
2538 (win32_store_inferior_registers): Adjust.
2539 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
2540 store_inferior_register>: Change prototype to take a regcache.
2542 2010-01-20 Doug Evans <dje@google.com>
2544 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
2546 (linux_wait_for_event1, linux_init_signals): Ditto.
2547 (W_STOPCODE): Provide definition if missing.
2549 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
2551 * linux-low.c (linux_core_of_thread): New.
2552 (compare_ints, show_process, list_threads): New.
2553 (linux_qxfer_osdata): Report threads and cores.
2554 (linux_target_op): Register linux_core_of_thread.
2555 * remote-utils.c (prepare_resume_reply): Report the core.
2556 (buffer_xml_printf): Support %d specifier.
2557 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
2559 (handle_query): Handle qXfer:threads. Announce availability
2561 * target.h (struct target_ops): New field core_of_thread.
2563 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
2565 * Makefile.in (clean): Remove new generated files.
2566 (reg-s390.o, reg-s390.c): Remove rules.
2567 (reg-s390x.o, reg-s390x.c): Likewise.
2568 (s390-linux32.o, s390-linux32.c): Add rules.
2569 (s390-linux64.o, s390-linux64.c): Likewise.
2570 (s390x-linux64.o, s390x-linux64.c): Likewise.
2571 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
2572 * linux-s390-low.c: Include <elf.h>.
2573 (HWCAP_S390_HIGH_GPRS): Define if undefined.
2574 (init_registers_s390): Remove prototype.
2575 (init_registers_s390x): Likewise.
2576 (init_registers_s390_linux32): Add prototype.
2577 (init_registers_s390_linux64): Likewise.
2578 (init_registers_s390x_linux64): Likewise.
2579 (s390_num_regs_3264): New define.
2580 (s390_regmap_3264): New global variable.
2581 (s390_cannot_fetch_register): Remove obsolete check.
2582 (s390_cannot_store_register): Likewise.
2583 (s390_collect_ptrace_register): Handle upper/lower register halves.
2584 (s390_supply_ptrace_register): Likewise.
2585 (s390_fill_gregset): Update to register number changes.
2586 (s390_get_hwcap): New routine.
2587 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
2588 Install appropriate regmap and register set.
2590 2010-01-01 Joel Brobecker <brobecker@adacore.com>
2592 * server.c (gdbserver_version): Update copyright year to 2010.
2593 * gdbreplay.c (gdbreplay_version): Likewise.
2595 2009-12-28 Doug Evans <dje@google.com>
2597 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
2598 elf/external.h. Include <elf.h> instead but only if necessary.
2600 2009-12-28 Pedro Alves <pedro@codesourcery.com>
2602 * linux-low.c (linux_remove_process): Remove `detaching'
2603 parameter. Don't release/detach from thread_db here.
2604 (linux_kill): Release/detach from thread_db here, ...
2605 (linux_detach): ... and here, before actually detaching.
2606 (linux_wait_1): ... and here, when a process exits.
2607 * thread-db.c (any_thread_of): New.
2608 (thread_db_free): Switch the current inferior to a thread of the
2611 2009-12-21 Doug Evans <dje@google.com>
2613 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
2615 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
2616 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
2617 warning ifndef __NR_tkill. Move setting of errno there too.
2618 Delete unnecessary resetting of errno after syscall.
2619 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
2621 * configure.ac: Check for dladdr.
2622 * config.in: Regenerate.
2623 * configure: Regenerate.
2624 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
2625 (try_thread_db_load): Update.
2627 * linux-low.c (my_waitpid): Delete unnecessary prototype.
2629 2009-12-18 Doug Evans <dje@google.com>
2631 * event-loop.c: Include unistd.h if it exists.
2633 * linux-low.c (my_waitpid): Move definition away from being in
2634 between linux_tracefork_child/linux_test_for_tracefork.
2636 * gdb_proc_service.h (psaddr_t): Fix type.
2637 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
2638 signature to match glibc.
2640 2009-12-16 Doug Evans <dje@google.com>
2642 * linux-low.c (linux_read_memory): Fix argument to read.
2644 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2646 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
2647 events, don't leave current_inferior pointing at null.
2649 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2651 * win32-low.c (LOG): Delete.
2652 (OUTMSG): Output to stderr.
2653 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
2654 on compile time LOG macro.
2655 (win32_wait): Fix debug output.
2657 2009-11-26 Pedro Alves <pedro@codesourcery.com>
2659 * win32-low.c (win32_add_one_solib): If the dll name is
2660 "ntdll.dll", prepend the system directory to the dll path.
2662 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2664 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
2666 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
2667 Vladimir Prus <vladimir@codesourcery.com>
2669 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
2670 * configure.ac: Check for __mcoldfire__ and set
2671 gdb_cv_m68k_is_coldfire.
2672 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
2673 reg-cf.o and reg-m68k.o.
2674 * configure: Regenerated.
2676 2009-11-16 Pedro Alves <pedro@codesourcery.com>
2678 * linux-low.c (linux_remove_process): Add `detaching' parameter.
2679 Pass it to thread_db_free.
2680 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
2681 proper `detaching' argument to linux_remove_process.
2682 * linux-low.h (thread_db_free): Add `detaching' parameter.
2683 * thread-db.c (thread_db_init): Pass false as `detaching' argument
2685 (thread_db_free): Add `detaching' parameter. Only
2686 call td_ta_clear_event if detaching from process.
2688 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
2690 * thread-db.c (thread_db_free): Fix typo.
2692 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
2695 * thread-db.c (thread_db_free): Call td_ta_clear_event.
2697 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
2699 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
2700 with an i686 compiler.
2701 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
2703 * configure: Rebuilt.
2705 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
2709 * server.c (handle_search_memory_1): Correct read_addr initialization
2710 in loop for searching subsequent chunks.
2712 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
2714 * configure.ac: New --with-libthread-db option.
2715 * thread-db.c: Allow direct dependence on libthread_db.
2716 (thread_db_free): Adjust.
2717 * config.in: Regenerate.
2718 * configure: Likewise.
2720 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2723 * thread-db.c (attach_thread): New function.
2724 (maybe_attach_thread): Return success/failure.
2725 (find_new_threads_callback): Adjust.
2726 (thread_db_find_new_threads): Loop until no new threads.
2728 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2730 * proc-service.c (ps_lgetregs): Formatting.
2732 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2734 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
2735 * configure.ac: Adjust.
2736 * linux-low.h (struct process_info_private): Move members to struct
2738 (thread_db_free, thread_db_handle_monitor_command): New prototype.
2739 * linux-low.c (linux_remove_process): Adjust.
2740 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
2741 * server.c (handle_query): Move code ...
2742 (handle_monitor_command): ... here. New function.
2743 * target.h (struct target_ops): New member.
2744 * thread-db.c (struct thread_db): New.
2745 (libthread_db_search_path): New variable.
2746 (thread_db_create_event, thread_db_enable_reporting)
2747 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
2748 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
2749 (try_thread_db_load_1, dladdr_to_soname): New functions.
2750 (try_thread_db_load, thread_db_load_search): New functions.
2751 (thread_db_init): Search for libthread_db.
2752 (thread_db_free): New function.
2753 (thread_db_handle_monitor_command): Likewise.
2754 * config.in: Regenerate.
2755 * configure: Regenerate.
2757 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2759 * spu-low.c (spu_kill): Wait for inferior to terminate.
2760 Call clear_inferiors.
2761 (spu_detach): Call clear_inferiors.
2763 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2765 * aclocal.m4: Regenerate.
2766 * config.in: Likewise.
2767 * configure: Likewise.
2769 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2771 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
2772 (parse_spufs_run): New function.
2773 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
2774 (ppc_breakpoint_at): Handle SPU breakpoints.
2776 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2778 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
2779 (SPUFS_MAGIC): Define.
2780 (spu_enumerate_spu_ids): New function.
2781 (linux_qxfer_spu): New function.
2782 (linux_target_ops): Install linux_qxfer_spu.
2784 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2786 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
2787 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
2788 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
2789 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
2790 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
2791 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
2792 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
2793 (init_registers_powerpc_cell32l): Add prototype.
2794 (init_registers_powerpc_cell64l): Likewise.
2795 (ppc_arch_setup): Detect Cell/B.E. architecture.
2797 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2799 * Makefile.in (datarootdir): New variable.
2801 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2803 * linux-low.c (linux_write_memory): Update debugging output.
2804 * Makefile.in (clean): Add new descriptions.
2805 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
2806 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
2807 * configure.srv: Add new files for arm*-*-linux*.
2808 * linux-arm-low.c: Add new declarations.
2809 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
2810 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
2811 (HWCAP_VFPv3D16): New.
2812 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
2813 instead of __IWMMXT__.
2814 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
2815 (arm_arch_setup): New.
2816 (target_regsets): Remove #ifdef. Add VFP regset.
2817 (the_low_target): Use arm_arch_setup.
2819 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2821 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
2822 the main thread again.
2824 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
2826 Adding Neutrino gdbserver.
2827 * configure: Regenerated.
2828 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
2829 * configure.srv (i[34567]86-*-nto*): New target.
2830 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
2831 * remote-utils.c [__QNX__]: Include sys/iomgr.h
2832 (nto_comctrl) [__QNX__]: New function.
2833 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
2835 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
2837 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
2840 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
2841 Pedro Alves <pedro@codesourcery.com>
2843 * win32-i386-low.c (i386_get_thread_context): Handle systems that
2844 don't support CONTEXT_EXTENDED_REGISTERS.
2845 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
2846 (the_low_target): Install them.
2847 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
2848 failing with ERROR_PIPE_NOT_CONNECTED.
2850 2009-06-30 Doug Evans <dje@google.com>
2851 Pierre Muller <muller@ics.u-strasbg.fr>
2853 Add h/w watchpoint support to x86-linux, win32-i386.
2854 * Makefile.in (SFILES): Add i386-low.c
2855 (i386_low_h): Define.
2856 (i386-low.o): Add dependencies.
2857 (linux-x86-low.o): Add i386-low.h dependency.
2858 (win32-i386-low.o): Ditto.
2859 * i386-low.c: New file.
2860 * i386-low.h: New file.
2861 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
2862 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
2863 * linux-low.c (linux_add_process): Initialize arch_private.
2864 (linux_remove_process): Free arch_private.
2865 (add_lwp): Initialize arch_private.
2866 (delete_lwp): Free arch_private.
2867 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
2869 * linux-low.h (process_info_private): New member arch_private.
2870 (lwp_info): New member arch_private.
2871 (linux_target_ops): New members new_process, new_thread,
2873 (ptid_of): New macro.
2874 * linux-x86-low.c: Include stddef.h, i386-low.h.
2875 (arch_process_info): New struct.
2876 (arch_lwp_info): New struct.
2877 (x86_linux_dr_get, x86_linux_dr_set): New functions.
2878 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2879 (i386_dr_low_get_status): New function.
2880 (x86_insert_point, x86_remove_point): New functions.
2881 (x86_stopped_by_watchpoint): New function.
2882 (x86_stopped_data_address): New function.
2883 (x86_linux_new_process, x86_linux_new_thread): New functions.
2884 (x86_linux_prepare_to_resume): New function.
2885 (the_low_target): Add entries for insert_point, remove_point,
2886 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
2888 * server.c (debug_hw_points): New global.
2889 (monitor_show_help): Document set debug-hw-points.
2890 (handle_query): Process "set debug-hw-points".
2891 * server.h (debug_hw_points): Declare.
2892 (paddress): Declare.
2893 * utils.c (NUMCELLS, CELLSIZE): New macros.
2894 (get_sell, xsnprintf, paddress): New functions.
2895 * win32-arm-low.c (the_low_target): Add entries for insert_point,
2896 remove_point, stopped_by_watchpoint, stopped_data_address.
2897 * win32-i386-low.c: Include i386-low.h.
2898 (debug_reg_state): Replaces dr.
2899 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
2900 (i386_dr_low_get_status): New function.
2901 (i386_insert_point, i386_remove_point): New functions.
2902 (i386_stopped_by_watchpoint): New function.
2903 (i386_stopped_data_address): New function.
2904 (i386_initial_stuff): Update.
2905 (get_thread_context,set_thread_context,i386_thread_added): Update.
2906 (the_low_target): Add entries for insert_point,
2907 remove_point, stopped_by_watchpoint, stopped_data_address.
2908 * win32-low.c (win32_insert_watchpoint): New function.
2909 (win32_remove_watchpoint): New function.
2910 (win32_stopped_by_watchpoint): New function.
2911 (win32_stopped_data_address): New function.
2912 (win32_target_ops): Add entries for insert_watchpoint,
2913 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
2914 * win32-low.h (win32_target_ops): New members insert_point,
2915 remove_point, stopped_by_watchpoint, stopped_data_address.
2917 2009-06-25 Pedro Alves <pedro@codesourcery.com>
2919 * server.c (process_serial_event): Re-return unsupported, not
2920 error, if the type isn't recognized. Re-allow supporting only
2921 insert or remove packets. Also call require_running for
2922 breakpoints. Add missing break statement to default case. Tidy.
2923 * target.h (struct target_ops): Rename insert_watchpoint to
2924 insert_point, and remove_watchpoint to remove_point.
2926 * linux-low.h (struct linux_target_ops): Likewise.
2927 * linux-low.c (linux_insert_watchpoint): Rename to ...
2928 (linux_insert_point): ... this. Adjust.
2929 (linux_remove_watchpoint): Rename to ...
2930 (linux_remove_point): ... this. Adjust.
2931 (linux_target_ops): Adjust.
2932 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2933 (cris_insert_point): ... this.
2934 (cris_remove_watchpoint): Rename to ...
2935 (cris_remove_point): ... this.
2936 (the_low_target): Adjust.
2938 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2940 * server.c (handle_v_kill): Pass signal_pid to
2941 kill_inferior if multi_process is zero.
2943 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2945 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2946 * target.h (target_ops): Comment for *_watchpoint to make it clear
2947 the functions can get types '0' and '1'.
2949 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2951 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2952 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2953 * regcache.c (get_regcache): Likewise.
2954 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2955 * win32-low.c (child_fetch_inferior_registers): Remove check for
2958 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2959 Pedro Alves <pedro@codesourcery.com>
2961 * target.h (struct target_ops) <supports_multi_process>: New
2963 (target_supports_multi_process): New.
2964 * server.c (handle_query): Even if GDB reports support, only
2965 enable multi-process if the target also supports it. Report
2966 multi-process support only if the target backend supports it.
2967 * linux-low.c (linux_supports_multi_process): New function.
2968 (linux_target_ops): Install it as target_supports_multi_process
2971 2009-05-24 Doug Evans <dje@google.com>
2973 Global renaming of find_thread_pid to find_thread_ptid.
2974 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2975 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2976 All callers updated.
2978 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2979 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2982 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2983 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2984 (linux_resume_one_lwp): Ditto.
2986 2009-05-23 Doug Evans <dje@google.com>
2988 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2989 from struct inferior_list_entry * to struct lwp_info *.
2990 All callers updated.
2992 2009-05-13 Doug Evans <dje@google.com>
2994 * linux-x86-low.c: Don't include assert.h.
2995 (x86_siginfo_fixup): Use fatal, not assert.
2996 (x86_arch_setup): Fix comment.
2998 2009-05-12 Doug Evans <dje@google.com>
3000 Biarch support for i386/amd64 gdbserver.
3001 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
3002 Add linux-x86-low.c.
3003 (linux-i386-low.o, linux-x86-64-low.o): Delete.
3004 (linux-x86-low.o): Add.
3005 * linux-x86-64-low.c: Delete.
3006 * linux-i386-low.c: Delete.
3007 * linux-x86-low.c: New file.
3008 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
3010 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
3012 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
3013 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
3014 (linux_child_pid_to_exec_file): New function.
3015 (elf_64_header_p, elf_64_file_p): New functions.
3016 (siginfo_fixup): New function.
3017 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
3018 give target a chance to convert layout.
3019 * linux-low.h (linux_target_ops): New member siginfo_fixup.
3020 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
3022 2009-05-07 Doug Evans <dje@google.com>
3024 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
3025 (regsets_store_inferior_registers): Ditto.
3027 2009-05-06 Pedro Alves <pedro@codesourcery.com>
3031 * linux-low.c (must_set_ptrace_flags): Delete.
3032 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
3034 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
3035 `lwp->must_set_ptrace_flags' instead.
3036 (linux_wait_for_event_1): Set ptrace options here.
3037 (linux_wait_1): ... not here.
3039 2009-04-30 Doug Evans <dje@google.com>
3041 * inferiors.c (started_inferior_callback): New function.
3042 (attached_inferior_callback): New function.
3043 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
3044 * server.c (print_started_pid, print_attached_pid): New functions.
3045 (detach_or_kill_for_exit): New function.
3046 (main): Call it instead of for_each_inferior (kill_inferior_callback).
3047 * server.h (have_started_inferiors_p): Declare.
3048 (have_attached_inferiors_p): Declare.
3050 * inferiors.c (remove_process): Fix memory leak, free process.
3051 * linux-low.c (linux_remove_process): New function.
3052 (linux_kill): Call it instead of remove_process.
3053 (linux_detach, linux_wait_1): Ditto.
3055 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
3057 * configure.srv: Add x86 Windows CE target.
3059 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3061 * inferiors.c (get_thread_process): Make global.
3062 * server.h (get_thread_process): Add prototype.
3063 * thread-db.c (find_one_thread): Use get_thread_process
3064 instead of current_process.
3065 (thread_db_get_tls_address): Do not crash if called when
3066 thread layer is not yet initialized.
3068 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
3070 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
3071 * spu-low.c (current_tid): Rename to ...
3072 (current_ptid): ... this.
3073 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
3074 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
3075 ptid_get_lwp (current_ptid) instead of current_tid.
3076 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
3077 instead of current_tid. Use find_process_pid to verify pid
3078 argument is valid. Pass proper argument to remove_process.
3079 (spu_thread_alive): Compare current_ptid instead of current_tid.
3080 (spu_resume): Likewise.
3082 2009-04-02 Pedro Alves <pedro@codesourcery.com>
3084 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
3087 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3089 Implement the multiprocess extensions, and add linux multiprocess
3092 * server.h (ULONGEST): Declare.
3093 (struct ptid, ptid_t): New.
3094 (minus_one_ptid, null_ptid): Declare.
3095 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3096 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
3097 (struct inferior_list_entry): Change `id' type from unsigned from
3099 (struct sym_cache, struct breakpoint, struct
3100 process_info_private): Forward declare.
3101 (struct process_info): Declare.
3102 (current_process): Declare.
3103 (all_processes): Declare.
3104 (initialize_inferiors): Declare.
3105 (add_thread): Adjust to use ptid_t.
3106 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
3107 (add_process, remove_process, find_thread_pid): Declare.
3108 (find_inferior_id): Adjust to use ptid_t.
3109 (cont_thread, general_thread, step_thread): Change type to ptid_t.
3110 (multi_process): Declare.
3111 (push_event): Adjust to use ptid_t.
3112 (read_ptid, write_ptid): Declare.
3113 (prepare_resume_reply): Adjust to use ptid_t.
3114 (clear_symbol_cache): Declare.
3115 * inferiors.c (all_processes): New.
3116 (null_ptid, minus_one_ptid): New.
3117 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
3118 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
3119 (add_thread): Change unsigned long to ptid. Remove gdb_id
3121 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
3122 (gdb_id_to_thread): Rename to ...
3123 (find_thread_pid): ... this. Change unsigned long to ptid.
3124 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
3125 (loaded_dll, pull_pid_from_list): Adjust.
3126 (add_process, remove_process, find_process_pid)
3127 (get_thread_process, current_process, initialize_inferiors): New.
3128 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
3129 (struct target_waitstatus) <related_pid>: Ditto.
3130 (struct target_ops) <kill, detach>: Add `pid' argument. Change
3132 (struct target_ops) <join>: Add `pid' argument.
3133 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
3134 (struct target_ops) <wait>: Add `ptid' field. Change return type
3136 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
3137 (mywait): Add `ptid' argument. Change return type to ptid_t.
3138 (target_pid_to_str): Declare.
3139 * target.c (set_desired_inferior): Adjust to use ptids.
3140 (mywait): Add new `ptid' argument. Adjust.
3141 (target_pid_to_str): New.
3142 * mem-break.h (free_all_breakpoints): Declare.
3143 * mem-break.c (breakpoints): Delelete.
3144 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
3145 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
3146 to use per-process breakpoint list.
3147 (free_all_breakpoints): New.
3148 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
3149 (symbol_cache, all_symbols_looked_up): Delete.
3151 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
3153 (prepare_resume_reply): Change ptid argument's type from unsigned
3154 long to ptid_t. Adjust. Implement W;process and X;process.
3155 (free_sym_cache, clear_symbol_cache): New.
3156 (look_up_one_symbol): Adjust to per-process symbol cache. *
3157 * server.c (cont_thread, general_thread, step_thread): Change type
3160 (multi_process): New.
3161 (last_ptid): Change type to ptid_t.
3162 (struct vstop_notif) <ptid>: Change type to ptid_t.
3163 (queue_stop_reply, push_event): Change `ptid' argument's type to
3165 (discard_queued_stop_replies): Add `pid' argument.
3166 (start_inferior): Adjust to use ptids. Adjust to mywait interface
3167 changes. Don't reference the `attached' global.
3168 (attach_inferior): Adjust to mywait interface changes.
3169 (handle_query): Adjust to use ptids. Parse GDB's qSupported
3170 features. Handle and report "multiprocess+". Handle
3172 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
3174 (handle_v_kill): New.
3175 (handle_v_stopped): Adjust to use target_pid_to_str.
3176 (handle_v_requests): Allow multiple attaches and runs when
3177 multiprocess extensions are in effect. Handle "vKill".
3178 (myresume): Adjust to use ptids.
3179 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
3180 (handle_status): Adjust to discard_queued_stop_replies interface
3182 (first_thread_of, kill_inferior_callback)
3183 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
3184 (main): Call initialize_inferiors. Adjust to use ptids, killing
3185 and detaching from all inferiors. Handle multiprocess packet
3187 * linux-low.h: Include gdb_proc_service.h.
3188 (struct process_info_private): New.
3189 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
3190 <lwpid_of>: Use ptid_get_lwp.
3191 (get_lwp_thread): Adjust.
3192 (struct lwp_info): Add `dead' member.
3193 (find_lwp_pid): Declare.
3194 * linux-low.c (thread_db_active): Delete.
3195 (new_inferior): Adjust comment.
3196 (inferior_pid): Delete.
3197 (linux_add_process): New.
3198 (handle_extended_wait): Adjust.
3199 (add_lwp): Change unsigned long to ptid.
3200 (linux_create_inferior): Add process to processes table. Adjust
3201 to use ptids. Don't set new_inferior here.
3202 (linux_attach_lwp): Rename to ...
3203 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
3204 it. Adjust to use ptids.
3205 (linux_attach_lwp): New.
3206 (linux_attach): Add process to processes table. Don't set
3208 (struct counter): New.
3209 (second_thread_of_pid_p, last_thread_of_process_p): New.
3210 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
3212 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
3213 processes. Remove process from process table.
3214 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
3215 to multiple processes.
3216 (any_thread_of): New.
3217 (linux_detach): Add `pid' argument, and handle it. Remove process
3218 from processes table.
3219 (linux_join): Add `pid' argument. Handle it.
3220 (linux_thread_alive): Change unsighed long argument to ptid_t.
3221 Consider dead lwps as not being alive.
3222 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
3223 threads we're not interested in.
3224 (same_lwp, find_lwp_pid): New.
3225 (linux_wait_for_lwp): Change `pid' argument's type from int to
3227 (linux_wait_for_event): Rename to ...
3228 (linux_wait_for_event_1): ... this. Change `pid' argument's type
3229 from int to ptid_t. Adjust.
3230 (linux_wait_for_event): New.
3231 (linux_wait_1): Add `ptid' argument. Change return type to
3232 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
3233 that exit from the process table.
3234 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
3236 (mark_lwp_dead): New.
3237 (wait_for_sigstop): Adjust to use ptids. If a process exits while
3238 stopping all threads, mark its main lwp as dead.
3239 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
3241 (fetch_register, usr_store_inferior_registers)
3242 (regsets_fetch_inferior_registers)
3243 (regsets_store_inferior_registers, linux_read_memory)
3244 (linux_write_memory): Inline `inferior_pid'.
3245 (linux_look_up_symbols): Adjust to use per-process
3247 (linux_request_interrupt): Adjust to use ptids.
3248 (linux_read_auxv): Inline `inferior_pid'.
3249 (initialize_low): Don't reference thread_db_active.
3250 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
3251 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
3252 (ps_getpid): Return the pid of the current inferior.
3253 * thread-db.c (proc_handle, thread_agent): Delete.
3254 (thread_db_create_event, thread_db_enable_reporting): Adjust to
3256 (find_one_thread): Change argument type to ptid_t. Adjust to
3258 (maybe_attach_thread): Adjust to per-process data and ptids.
3259 (thread_db_find_new_threads): Ditto.
3260 (thread_db_init): Ditto.
3261 * spu-low.c (spu_create_inferior, spu_attach): Add process to
3262 processes table. Adjust to use ptids.
3263 (spu_kill, spu_detach): Adjust interface. Remove process from
3265 (spu_join, spu_thread_alive): Adjust interface.
3266 (spu_wait): Adjust interface. Remove process from processes
3267 table. Adjust to use ptids.
3268 * win32-low.c (current_inferior_tid): Delete.
3269 (current_inferior_ptid): New.
3270 (debug_event_ptid): New.
3271 (thread_rec): Take a ptid. Adjust.
3272 (child_add_thread): Add `pid' argument. Adjust to use ptids.
3273 (child_delete_thread): Ditto.
3274 (do_initial_child_stuff): Add `attached' argument. Add process to
3276 (child_fetch_inferior_registers, child_store_inferior_registers):
3278 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
3279 (win32_attach): Pass 1 to do_initial_child_stuff.
3280 (win32_kill): Adjust interface. Remove process from processes
3282 (win32_detach): Ditto.
3283 (win32_join): Adjust interface.
3284 (win32_thread_alive): Take a ptid.
3285 (win32_resume): Adjust to use ptids.
3286 (get_child_debug_event): Ditto.
3287 (win32_wait): Adjust interface. Remove exiting process from
3290 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3292 Non-stop mode support.
3294 * server.h (non_stop): Declare.
3295 (gdb_client_data, handler_func): Declare.
3296 (delete_file_handler, add_file_handler, start_event_loop):
3298 (handle_serial_event, handle_target_event, push_event)
3299 (putpkt_notif): Declare.
3300 * target.h (enum resume_kind): New.
3301 (struct thread_resume): Replace `step' field by `kind' field.
3302 (TARGET_WNOHANG): Define.
3303 (struct target_ops) <wait>: Add `options' argument.
3304 <supports_non_stop, async, start_non_stop>: New fields.
3305 (target_supports_non_stop, target_async): New.
3306 (start_non_stop): Declare.
3307 (mywait): Add `options' argument.
3308 * target.c (mywait): Add `options' argument. Print child exit
3310 (start_non_stop): New.
3311 * server.c (non_stop, own_buf, mem_buf): New globals.
3312 (struct vstop_notif): New.
3313 (notif_queue): New global.
3314 (queue_stop_reply, push_event, discard_queued_stop_replies)
3315 (send_next_stop_reply): New.
3316 (start_inferior): Adjust to use resume_kind. Adjust to mywait
3318 (attach_inferior): In non-stop mode, don't wait for the target
3320 (handle_general_set): Handle QNonStop.
3321 (handle_query): When handling qC, return the current general
3322 thread, instead of the first thread of the list.
3323 (handle_query): If the backend supports non-stop mode, include
3324 QNonStop+ in the qSupported query response.
3325 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
3327 (handle_v_attach, handle_v_run): Handle non-stop mode.
3328 (handle_v_stopped): New.
3329 (handle_v_requests): Report support for vCont;t. Handle vStopped.
3330 (myresume): Adjust to use resume_kind. Handle non-stop.
3331 (queue_stop_reply_callback): New.
3332 (handle_status): Handle non-stop mode.
3333 (main): Clear non_stop flag on reconnection. Use the event-loop.
3334 Refactor serial protocol handling from here ...
3335 (process_serial_event): ... to this new function. When GDB
3336 selects any thread, select one here. In non-stop mode, wait until
3337 GDB acks all pending events before exiting.
3338 (handle_serial_event, handle_target_event): New.
3339 * remote-utils.c (remote_open): Install remote_desc in the event
3341 (remote_close): Remove remote_desc from the event loop.
3342 (putpkt_binary): Rename to...
3343 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
3344 (putpkt_binary): New as wrapper around putpkt_binary_1.
3345 (putpkt_notif): New.
3346 (prepare_resume_reply): In non-stop mode, don't change the
3348 * event-loop.c: New.
3349 * Makefile.in (OBJ): Add event-loop.o.
3350 (event-loop.o): New rule.
3352 * linux-low.h (pid_of): Moved here.
3354 (get_lwp_thread): Use lwpid_of.
3355 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
3356 * linux-low.c (pid_of): Delete.
3357 (inferior_pid): Use lwpid_of.
3358 (linux_event_pipe): New.
3359 (target_is_async_p): New.
3361 (handle_extended_wait): Use lwpid_of.
3362 (add_lwp): Don't set lwpid field.
3363 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
3364 (linux_kill_one_lwp): If killing a running lwp, stop it first.
3365 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
3366 (linux_detach_one_lwp): If detaching from a running lwp, stop it
3367 first. Adjust to linux_wait_for_event interface changes. Use
3369 (linux_detach): Don't delete the main lwp here.
3370 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
3371 (status_pending_p): Don't consider explicitly suspended lwps.
3372 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
3373 pointer. Add OPTIONS argument. Change return type to int. Use
3374 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
3375 (linux_wait_for_event): Take an integer pid instead of a lwp_info
3376 pointer. Add status pointer argument. Return a pid instead of a
3377 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
3378 changes. In non-stop mode, don't switch to a random thread.
3379 (linux_wait): Rename to...
3380 (linux_wait_1): ... this. Add target_options argument, and handle
3381 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
3382 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
3383 clean exit and signal exit code. Don't stop all threads in
3384 non-stop mode. In all-stop mode, only stop all threads when
3385 reporting a stop to GDB. Handle explicit thread stop requests.
3386 (async_file_flush, async_file_mark): New.
3388 (send_sigstop): Use lwpid_of.
3389 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
3390 interface changes. In non-stop mode, don't switch to a random
3392 (linux_resume_one_lwp): Use lwpid_of.
3393 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
3394 (linux_resume_one_thread): ... this. Handle resume_stop. In
3395 non-stop mode, don't look for pending flag in all threads.
3396 (resume_status_pending_p): Don't consider explicitly suspended
3398 (my_waitpid): Reimplement. Emulate __WALL.
3399 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3401 (sigchld_handler, linux_supports_non_stop, linux_async)
3402 (linux_start_non_stop): New.
3403 (linux_target_ops): Register linux_supports_non_stop, linux_async
3404 and linux_start_non_stop.
3405 (initialize_low): Install SIGCHLD handler.
3406 * thread-db.c (thread_db_create_event, find_one_thread)
3407 (thread_db_get_tls_address): Use lwpid_of.
3408 * win32-low.c (win32_detach): Adjust to use resume_kind.
3409 (win32_wait): Add `options' argument.
3410 * spu-low.c (spu_resume): Adjust to use resume_kind.
3411 (spu_wait): Add `options' argument.
3413 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3415 Decouple target code from remote protocol.
3417 * target.h (enum target_waitkind): New.
3418 (struct target_waitstatus): New.
3419 (struct target_ops) <wait>: Return an unsigned long. Take a
3420 target_waitstatus pointer instead of a char pointer.
3422 * target.c (mywait): Change prototype to return an unsigned long.
3423 Take a target_waitstatus pointer instead of a char pointer. Adjust.
3424 * server.h (thread_from_wait, old_thread_from_wait): Delete
3426 (prepare_resume_reply): Change prototype to take a
3428 * server.c (thread_from_wait, old_thread_from_wait): Delete.
3429 (last_status, last_ptid): New.
3430 (start_inferior): Remove "statusptr" argument. Adjust. Return a
3431 pid instead of a signal.
3432 (attach_inferior): Remove "status" and "signal" parameters.
3434 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
3436 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
3437 (handle_v_requests, myresume): Remove "status" and "signal"
3439 (handle_status): New.
3440 (main): Delete local `status'. Adjust.
3441 * remote-utils.c: Include target.h.
3442 (prepare_resume_reply): Change prototype to take a
3443 target_waitstatus. Adjust.
3445 * linux-low.c (linux_wait): Adjust to new target_ops->wait
3447 * spu-low.c (spu_wait): Adjust.
3448 * win32-low.c (enum target_waitkind, struct target_waitstatus):
3450 (win32_wait): Adjust.
3452 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3454 * target.h (struct thread_resume): Delete leave_stopped member.
3455 (struct target_ops): Add a `n' argument to the `resume' callback.
3456 * server.c (start_inferior): Adjust.
3457 (handle_v_cont, myresume): Adjust.
3458 * linux-low.c (check_removed_breakpoint): Adjust to resume
3459 interface change, and to removed leave_stopped field.
3460 (resume_ptr): Delete.
3461 (struct thread_resume_array): New.
3462 (linux_set_resume_request): Add new `arg' parameter. Adjust to
3463 resume interface change.
3464 (linux_continue_one_thread, linux_queue_one_thread)
3465 (resume_status_pending_p): Check if the resume field is NULL
3466 instead of checking the leave_stopped member.
3467 (linux_resume): Adjust to the target resume interface change.
3468 * spu-low.c (spu_resume): Adjust to the target resume interface
3470 * win32-low.c (win32_detach, win32_resume): Ditto.
3472 2009-04-01 Pedro Alves <pedro@codesourcery.com>
3474 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
3476 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
3478 (linux_continue_one_thread): Only preserve the stepping flag if
3479 there's a pending breakpoint.
3481 2009-03-31 Pedro Alves <pedro@codesourcery.com>
3483 * server.c (main): After the inferior having exited, call
3484 remote_close before exiting gdbserver.
3486 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
3488 Fix size of FPSCR in Power 7 processors.
3489 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
3490 (PPC_FEATURE_HAS_DFP): New #define.
3491 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
3494 2009-03-23 Pedro Alves <pedro@codesourcery.com>
3496 * server.c (handle_query) Whitespace and formatting.
3498 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3500 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
3501 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
3502 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
3503 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
3504 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
3505 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
3506 Makefile.in, configure.ac: Fix whitespace throughout.
3507 * configure: Regenerate.
3509 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3511 * inferiors.c (find_inferior): Make it safe for the callback
3512 function to delete the currently iterated inferior.
3514 2009-03-22 Pedro Alves <pedro@codesourcery.com>
3516 * Makefile.in (linuw_low_h): Move higher.
3517 (thread-db.o): Depend on $(linux_low_h).
3519 2009-03-17 Pedro Alves <pedro@codesourcery.com>
3521 Rename "process" to "lwp" throughout.
3523 * linux-low.c (all_processes): Rename to...
3524 (all_lwps): ... this.
3525 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
3526 (add_process): Rename to ...
3527 (add_lwp): ... this. Adjust.
3528 (linux_create_inferior): Adjust.
3529 (linux_attach_lwp): Adjust.
3530 (linux_attach): Adjust.
3531 (linux_kill_one_process): Rename to ...
3532 (linux_kill_one_lwp): ... this. Adjust.
3533 (linux_kill): Adjust.
3534 (linux_detach_one_process): Rename to ...
3535 (linux_detach_one_lwp): ... this. Adjust.
3536 (linux_detach): Adjust.
3537 (check_removed_breakpoint): Adjust.
3538 (status_pending_p): Adjust.
3539 (linux_wait_for_process): Rename to ...
3540 (linux_wait_for_lwp): ... this. Adjust.
3541 (linux_wait_for_event): Adjust.
3542 (send_sigstop): Adjust.
3543 (wait_for_sigstop): Adjust.
3544 (stop_all_processes): Rename to ...
3545 (stop_all_lwps): ... this.
3546 (linux_resume_one_process): Rename to ...
3547 (linux_resume_one_lwp): ... this. Adjust.
3548 (linux_set_resume_request, linux_continue_one_thread)
3549 (linux_queue_one_thread, resume_status_pending_p)
3550 (usr_store_inferior_registers, regsets_store_inferior_registers)
3551 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
3553 * linux-low.h (get_process): Rename to ...
3554 (get_lwp): ... this. Adjust.
3555 (get_thread_process): Rename to ...
3556 (get_thread_lwp): ... this. Adjust.
3557 (get_process_thread): Rename to ...
3558 (get_lwp_thread): ... this. Adjust.
3559 (struct process_info): Rename to ...
3560 (struct lwp_info): ... this.
3561 (all_processes): Rename to ...
3562 (all_lwps): ... this.
3563 * proc-service.c (ps_lgetregs): Adjust.
3564 * thread-db.c (thread_db_create_event, find_one_thread)
3565 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
3567 2009-03-14 Pedro Alves <pedro@codesourcery.com>
3569 * server.c (handle_query): Handle "qAttached".
3571 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
3573 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
3574 GPLv3, update license URL.
3576 2009-03-01 Doug Evans <dje@google.com>
3578 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
3579 (server_h): Add gdb_signals.h.
3580 (signals.o): Update.
3581 * server.h (target_signal_from_host,target_signal_to_host_p)
3582 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
3584 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
3586 * remote-utils.c (getpkt): Also generate remote-debug
3587 information if noack_mode is set.
3589 2009-02-06 Pedro Alves <pedro@codesourcery.com>
3591 * server.c (handle_query): Report qXfer:siginfo:read and
3592 qXfer:siginfo:write as supported and handle them.
3593 * target.h (struct target_ops) <qxfer_siginfo>: New field.
3594 * linux-low.c (linux_xfer_siginfo): New.
3595 (linux_target_ops): Set it.
3597 2009-01-26 Pedro Alves <pedro@codesourcery.com>
3599 * server.c (gdbserver_usage): Mention --remote-debug.
3600 (main): Accept '--remote-debug' switch.
3602 2009-01-18 Doug Evans <dje@google.com>
3604 * regcache.c (new_register_cache): No need to check result of xcalloc.
3605 * server.c (handle_search_memory): Back out calls to xmalloc,
3606 result is checked and error is returned to user upon failure.
3607 (handle_query): Ditto. Add more checks for result of malloc.
3608 (handle_v_cont): Check result of malloc, report error back to
3610 (handle_v_run): Ditto. Call freeargv.
3611 * server.h (freeargv): Declare.
3612 * utils.c (freeargv): New fn.
3614 2009-01-15 Doug Evans <dje@google.com>
3616 * gdbreplay.c (perror_with_name): Make arg const char *.
3617 * server.h (target_signal_to_name): Make return type const char *.
3618 * thread-db.c (thread_db_err_str): Make return type const char *.
3619 * utils.c (perror_with_name): Make arg const char *.
3621 2009-01-14 Pedro Alves <pedro@codesourcery.com>
3623 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
3624 when handling a EXIT_PROCESS_DEBUG_EVENT.
3626 2009-01-06 Joel Brobecker <brobecker@adacore.com>
3628 * gdbreplay.c (gdbreplay_version): Update copyright year.
3629 * server.c (gdbserver_version): Likewise.
3631 2009-01-05 Doug Evans <dje@google.com>
3633 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
3634 (handle_extended_wait): Improve comment.
3636 2008-12-13 Doug Evans <dje@google.com>
3638 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
3639 * server.h (ATTR_MALLOC): New macro.
3640 (xmalloc,xcalloc,xstrdup): Declare.
3641 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
3642 * inferiors.c: Ditto.
3643 * linux-low.c: Ditto.
3644 * mem-break.c: Ditto.
3645 * regcache.c: Ditto.
3646 * remote-utils.c: Ditto.
3649 * win32-low.c: Ditto.
3651 2008-12-12 Doug Evans <dje@google.com>
3653 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
3654 in debugging printf.
3656 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
3658 2008-12-09 Doug Evans <dje@google.com>
3660 * linux-low.h (struct process_info): Delete member tid, unused.
3661 * thread-db.c (find_one_thread): Update.
3662 (maybe_attach_thread): Update.
3664 2008-12-02 Pedro Alves <pedro@codesourcery.com>
3666 * target.h (struct target_ops): Add qxfer_osdata member.
3667 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
3669 (linux_qxfer_osdata): New functions.
3670 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
3672 * server.c (handle_query): Handle "qXfer:osdata:read:".
3673 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
3674 (buffer_xml_printf): New functions.
3675 * server.h (struct buffer): New.
3676 (buffer_grow_str, buffer_grow_str0): New macros.
3677 (buffer_grow, buffer_free, buffer_init, buffer_finish)
3678 (buffer_xml_printf): Declare.
3680 2008-11-24 Doug Evans <dje@google.com>
3682 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
3684 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
3686 * server.c (handle_v_run): Always use the supplied argument list.
3688 2008-11-19 Bob Wilson <bob.wilson@acm.org>
3690 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
3691 (xtensa_regmap_table): Add entry for scompare1.
3693 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
3695 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
3696 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
3697 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
3698 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
3699 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
3700 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
3701 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
3702 XML target descriptions.
3703 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
3704 when inferior is running on an ISA 2.05 or later processor. Add
3705 special case to return offset for full 64-bit slot of FPSCR when
3708 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
3710 * Makefile.in (SFILES, clean): Added sparc64 files.
3711 (reg-sparc64.o, reg-sparc64.c): New.
3712 * configure.srv (sparc*-*-linux*): New configuration.
3713 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
3714 syscall arguments for SPARC.
3715 (regsets_store_inferior_registers): Likewise.
3716 * linux-sparc-low.c: New file.
3718 2008-10-21 Doug Evans <dje@google.com>
3720 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
3721 (READLINE_DIR,READLINE_DEP): Delete.
3722 (INTERNAL_CFLAGS): Update.
3723 (LINTFLAGS): Update.
3725 2008-10-10 Pedro Alves <pedro@codesourcery.com>
3727 * server.c (handle_v_run): If GDB didn't specify an argv, use the
3728 whole argv from the last run, not just argv[0].
3730 2008-09-08 Pedro Alves <pedro@codesourcery.com>
3732 * regcache.c (new_register_cache): Return NULL if the register
3733 cache size isn't known yet.
3734 (free_register_cache): Avoid dereferencing a NULL regcache.
3736 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3738 * configure.srv: Merge MIPS and MIPS64.
3740 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
3742 * Makefile.in (uninstall): Apply $(EXEEXT) too.
3744 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
3746 * Makefile.in: Add required vsx dependencies.
3748 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
3749 Declare init_registers_powerpc_vsx32l.
3750 Declare init_registers_powerpc_vsx64l.
3751 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
3752 (ppc_arch_setup): Check for VSX in hwcap.
3753 (ppc_fill_vsxregset): New function.
3754 (ppc_store_vsxregset): New function.
3755 Add new VSX entry in regset_info target_regsets.
3757 * configure.srv: Add new VSX dependencies.
3759 2008-08-12 Pedro Alves <pedro@codesourcery.com>
3761 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
3762 (remote_open): Set or clear transport_is_reliable.
3763 (putpkt_binary): Don't expect acks in noack mode.
3764 (getpkt): Don't send ack/nac in noack mode.
3765 * server.c (handle_general_set): Handle QStartNoAckMode.
3766 (handle_query): If connected by tcp pass QStartNoAckMode+ in
3768 (main): Reset noack_mode on every connection.
3769 * server.h (noack_mode): Declare.
3771 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3773 * Makefile.in (GDBREPLAY_OBS): New variable.
3774 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
3776 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
3777 Daniel Jacobowitz <dan@codesourcery.com>
3779 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
3780 (usr_store_inferior_registers): Likewise.
3781 (regsets_store_inferior_registers): Likewise.
3783 2008-07-31 Rolf Jansen <rj@surtec.com>
3784 Pedro Alves <pedro@codesourcery.com>
3786 * configure.ac: Check for memmem declaration.
3787 * server.c [HAVE_MALLOC_H]: Include malloc.h.
3788 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
3789 (disable_packet_qfThreadInfo): Unconditionally compile.
3790 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
3791 * configure, config.in: Regenerate.
3793 2008-07-28 Doug Kwan <dougkwan@google.com>
3795 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
3796 (linux_write_memory): Remove declaration of errno.
3798 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
3800 * linux-low.c (handle_extended_wait): Do not use "status"
3801 variable uninitialized.
3803 2008-07-07 Pedro Alves <pedro@codesourcery.com>
3805 * server.c (handle_v_attach): Inhibit reporting dll changes.
3807 2008-06-27 Pedro Alves <pedro@codesourcery.com>
3809 * remote-utils.c (prepare_resume_reply): If requested, don't
3810 output "thread:TID" in the T stop reply.
3812 * server.c (disable_packet_vCont, disable_packet_Tthread)
3813 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
3814 (handle_query): If requested, disable support for qC, qfThreadInfo
3816 (handle_v_requests): If requested, disable support for vCont.
3817 (gdbserver_show_disableable): New.
3818 (main): Handle --disable-packet and --disable-packet=LIST.
3820 * server.h (disable_packet_vCont, disable_packet_Tthread)
3821 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
3823 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
3825 * server.c (gdbserver_usage): Mention --version.
3827 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
3829 * Makefile.in (gdbreplay.o): New rule.
3831 2008-06-06 Joseph Myers <joseph@codesourcery.com>
3833 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
3834 message, not gdbserver.
3836 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
3837 Nathan Sidwell <nathan@codesourcery.com>
3838 Joseph Myers <joseph@codesourcery.com>
3840 * acinclude.m4: Include ../../config/acx.m4.
3841 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
3842 * configure, config.in: Regenerate.
3843 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
3844 * server.c (gdbserver_version): Print PKGVERSION.
3845 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
3846 (main): Adjust gdbserver_usage calls.
3847 * gdbreplay.c (version, host_name): Add declarations.
3848 (gdbreplay_version, gdbreplay_usage): New.
3849 (main): Accept --version and --help options.
3851 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
3853 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
3854 (arm_breakpoint_at): Handle Thumb.
3855 (the_low_target): Add comment.
3857 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
3859 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
3861 2008-05-09 Doug Evans <dje@google.com>
3863 * server.h (decode_search_memory_packet): Declare.
3864 * remote-utils.c (decode_search_memory_packet): New fn.
3865 * server.c (handle_search_memory_1): New fn.
3866 (handle_search_memory): New fn.
3867 (handle_query): Process qSearch:memory packets.
3869 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3871 * regcache.c (registers_length): Remove.
3872 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
3873 full register packet.
3874 * regcache.h (registers_length): Remove prototype.
3875 * server.h (PBUFSIZ): Define to 16384.
3877 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
3879 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
3880 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
3881 powerpc-64l.o, and powerpc-altivec64l.o.
3882 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
3883 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
3884 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
3885 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
3886 rs6000/power-linux.xml, and rs6000/power64-linux.xml
3889 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
3890 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
3891 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
3892 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
3893 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
3894 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
3895 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
3896 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
3897 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
3898 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
3901 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
3902 (init_registers_powerpc_32l): ... this new prototype.
3903 (init_registers_powerpc_32): Remove, replace by ...
3904 (init_registers_powerpc_altivec32l): ... this new prototype.
3905 (init_registers_powerpc_e500): Remove, replace by ...
3906 (init_registers_powerpc_e500l): ... this new prototype.
3907 (init_registers_ppc64): Remove, replace by ...
3908 (init_registers_powerpc_64l): ... this new prototype.
3909 (init_registers_powerpc_64): Remove, replace by ...
3910 (init_registers_powerpc_altivec64l): ... this new prototype.
3911 (ppc_num_regs): Set to 73.
3912 (PT_ORIG_R3, PT_TRAP): Define if necessary.
3913 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
3914 (ppc_cannot_store_register): Handle orig_r3 and trap.
3915 (ppc_arch_setup): Update init_registers_... calls.
3916 (ppc_fill_gregset): Handle orig_r3 and trap.
3918 * inferiors.c (clear_inferiors): Reset current_inferior.
3920 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
3922 * acinclude.m4: Add override.m4.
3923 * configure: Regenerate.
3925 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3927 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
3928 initial call to init_register_ppc64.
3930 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3932 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3933 powerpc*-*-linux* case.
3934 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3936 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3938 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3939 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3941 * linux-ppc-low.c: Include <elf.h>.
3942 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3943 (ppc_hwcap): New global variable.
3944 (ppc_regmap): Remove __SPE__ #ifdef sections.
3945 (ppc_regmap_e500): New global variable.
3946 (ppc_cannot_store_register): Update __SPE__ special case.
3947 (ppc_get_hwcap): New function.
3948 (ppc_arch_setup): Use it to determine whether inferior supports
3949 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3950 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3951 Do not access registers if target does not support AltiVec.
3952 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3953 Do not access registers if target does not support SPE.
3954 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3956 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3958 * linux-low.c (disabled_regsets, num_regsets): New.
3959 (use_regsets_p): Delete.
3960 (linux_wait_for_process): Clear disabled_regsets.
3961 (regsets_fetch_inferior_registers): Check and set it.
3962 (regsets_store_inferior_registers): Likewise.
3963 (linux_fetch_registers, linux_store_registers): Do not use
3965 (initialize_low): Allocate disabled_regsets.
3967 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3969 * Makefile.in (LIBOBJS): New.
3971 (memmem.o): New rule.
3972 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3973 * configure: Regenerated.
3975 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3977 * server.c (handle_query): Never return "unsupported" for
3978 qXfer:features:read queries.
3980 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3982 * server.c (get_features_xml): Fix inverted condition.
3983 (handle_query): Always support qXfer:feature:read.
3985 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3987 * server.c (wrapper_argv): New.
3988 (start_inferior): Handle wrapper_argv. If set, expect an extra
3990 (gdbserver_usage): Document --wrapper.
3991 (main): Parse --wrapper.
3993 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3995 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3996 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3997 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3998 (ppc_set_pc): Likewise.
3999 (ppc_arch_setup): New function.
4000 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
4001 of collect_register.
4002 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
4004 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4006 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
4007 instead of linux-ppc64-low.o.
4008 * linux-ppc64-low.c: Remove file.
4009 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
4010 (linux-ppc64-low.o): Remove rule.
4012 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
4013 (init_registers_powerpc_64): Likewise.
4014 (ppc_regmap): Conditionally define depending on __powerpc64__.
4015 (ppc_cannot_store_register): Do not special-case "fpscr" when
4016 compiled on __powerpc64__.
4017 (ppc_collect_ptrace_register): New function.
4018 (ppc_supply_ptrace_register): New function.
4019 (ppc_breakpoint): Change type to "unsigned int".
4020 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
4021 (the_low_target): Conditionally provide initializers for the
4022 arch_setup member depending on __powerpc64__. Install
4023 collect_ptrace_register and supply_ptrace_register members.
4025 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4027 * regcache.h (gdbserver_xmltarget): Add extern declaration.
4028 * server.c (gdbserver_xmltarget): Define.
4029 (get_features_xml): Use it to replace "target.xml" and arch_string.
4031 * configure.srv: Remove srv_xmltarget. Add XML files that were
4032 mentioned there to srv_xmlfiles instead. Remove conditional tests
4033 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
4034 srv_xmlfiles and srv_regobj to include all possible choices.
4035 * configure.ac (srv_xmltarget): Remove.
4036 (srv_xmlfiles): Do not add "target.xml".
4037 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
4038 checks for supplementary target information.
4039 * configure: Regenerate.
4040 * Makefile.in (XML_TARGET): Remove.
4041 (target.xml): Remove rule.
4042 (clean): Do not clean up target.xml.
4043 (.PRECIOUS): Do not mention target.xml.
4045 * target.h (struct target_ops): Remove arch_string member.
4046 * linux-low.c (linux_arch_string): Remove.
4047 (linux_target_ops): Remove arch_string initializer.
4048 * linux-low.h (struct linux_target_ops): Remove arch_string member.
4049 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
4050 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
4051 * spu-low.c (spu_arch_string): Remove.
4052 (spu_target_ops): Remove arch_string initializer.
4053 * win32-low.c (win32_arch_string): Remove.
4054 (win32_target_ops): Remove arch_string initializer.
4055 * win32-low.h (struct win32_target_ops): Remove arch_string member.
4056 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
4057 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
4059 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4061 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
4062 by collect_ptrace_register and supply_ptrace_register hooks.
4063 * linux-low.c (fetch_register): Use supply_ptrace_register callback
4064 instead of checking for the_low_target.left_pad_xfer.
4065 (usr_store_inferior_registers): Use collect_ptrace_register callback
4066 instead of checking for the_low_target.left_pad_xfer.
4068 * linux-s390-low.c (s390_collect_ptrace_register): New function.
4069 (s390_supply_ptrace_register): Likewise.
4070 (s390_fill_gregset): Call s390_collect_ptrace_register.
4071 (the_low_target): Update.
4073 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
4074 (ppc_supply_ptrace_register): Likewise.
4075 (the_low_target): Update.
4077 * linux-i386-low.c (the_low_target): Update.
4078 * linux-x86-64-low.c (the_low_target): Update.
4080 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4082 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
4083 reg-s390.o and reg-s390x.o.
4085 * linux-low.c (new_inferior): New global variable.
4086 (linux_create_inferior, linux_attach): Set it.
4087 (linux_wait_for_process): Call the_low_target.arch_setup after the
4088 target has stopped for the first time.
4089 (initialize_low): Do not call the_low_target.arch_setup.
4091 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
4092 (s390_set_pc): Likewise.
4093 (s390_arch_setup): New function.
4094 (the_low_target): Use s390_arch_setup as arch_setup routine.
4096 * regcache.c (realloc_register_cache): New function.
4097 (set_register_cache): Call it for each existing regcache.
4099 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
4101 * server.h (init_registers): Remove prototype.
4103 * linux-low.h (struct linux_target_ops): Add arch_setup field.
4104 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
4105 instead of init_registers ().
4106 * linux-arm-low.c (init_registers_arm): Add prototype.
4107 (init_registers_arm_with_iwmmxt): Likewise.
4108 (the_low_target): Add initializer for arch_setup field.
4109 * linux-cris-low.c (init_registers_cris): Add prototype.
4110 (the_low_target): Add initializer for arch_setup field.
4111 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
4112 (the_low_target): Add initializer for arch_setup field.
4113 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
4114 (the_low_target): Add initializer for arch_setup field.
4115 * linux-ia64-low.c (init_registers_ia64): Add prototype.
4116 (the_low_target): Add initializer for arch_setup field.
4117 * linux-m32r-low.c (init_registers_m32r): Add prototype.
4118 (the_low_target): Add initializer for arch_setup field.
4119 * linux-m68k-low.c (init_registers_m68k): Add prototype.
4120 (the_low_target): Add initializer for arch_setup field.
4121 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
4122 (init_registers_mips64_linux): Likewise.
4123 (the_low_target): Add initializer for arch_setup field.
4124 * linux-ppc-low.c (init_registers_ppc): Add prototype.
4125 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
4126 (the_low_target): Add initializer for arch_setup field.
4127 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
4128 (init_registers_powerpc_64): Likewise.
4129 (the_low_target): Add initializer for arch_setup field.
4130 * linux-s390-low.c (init_registers_s390): Add prototype.
4131 (init_registers_s390x): Likewise.
4132 (the_low_target): Add initializer for arch_setup field.
4133 * linux-sh-low.c (init_registers_sh): Add prototype.
4134 (the_low_target): Add initializer for arch_setup field.
4135 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
4136 (the_low_target): Add initializer for arch_setup field.
4137 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
4138 (the_low_target): Add initializer for arch_setup field.
4140 * win32-low.h (struct win32_target_ops): Add arch_setup field.
4141 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
4142 instead of init_registers ().
4143 * win32-arm-low.c (init_registers_arm): Add prototype.
4144 (the_low_target): Add initializer for arch_setup field.
4145 * win32-i386-low.c (init_registers_i386): Add prototype.
4146 (the_low_target): Add initializer for arch_setup field.
4148 * spu-low.c (init_registers_spu): Add prototype.
4149 (initialize_low): Call initialie_registers_spu () instead of
4150 initialize_registers ().
4152 2008-02-19 Pedro Alves <pedro@codesourcery.com>
4154 * server.c (handle_v_requests): When handling the vRun and vAttach
4155 packets, if already debugging a process, don't kill it. Return an
4158 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
4160 * server.c (handle_query): Correct length check.
4162 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
4164 * win32-low.c (do_initial_child_stuff): Add process handle
4165 parameter. Set current_process_handle and current_process_id from the
4166 parameters. Clear globals.
4167 (win32_create_inferior): Don't set current_process_handle and
4168 current_process_id here. Instead pass them on the call to
4169 do_initial_child_stuff.
4170 (win32_attach): Likewise.
4171 (win32_clear_inferiors): New.
4172 (win32_kill): Don't close the current process handle or the
4173 current thread handle here. Instead call win32_clear_inferiors.
4174 (win32_detach): Don't open a new handle to the process. Call
4175 win32_clear_inferiors.
4176 (win32_join): Don't rely on current_process_handle; open a new
4177 handle using the process id.
4178 (win32_wait): Call win32_clear_inferiors when the inferior process
4181 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
4183 * server.c (monitor_show_help): Add "exit".
4185 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
4187 * Makefile.in (SFILES): Add linux-xtensa-low.c.
4188 (clean): Add reg-xtensa.c.
4189 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
4190 * configure.srv (xtensa*-*-linux*) New target.
4191 * linux-xtensa-low.c: New.
4192 * xtensa-xtregs.c: New.
4194 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
4196 * hostio.c: Don't include errno.h.
4197 (errno_to_fileio_errno): Move to hostio-errno.
4198 * hostio.c: (hostio_error): Remove the error parameter. Defer the
4199 error number outputting to the target->hostio_last_error callback.
4200 (hostio_packet_error): Use FILEIO_EINVAL directly.
4201 (handle_open, handle_pread, hostio_error, handle_unlink): Update
4202 calls to hostio_error.
4203 * hostio-errno.c: New.
4204 * server.h (hostio_last_error_from_errno): Declare.
4205 * target.h (target_ops): Add hostio_last_error member.
4206 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
4207 as hostio_last_error handler.
4208 * spu-low.c (spu_target_ops): Likewise.
4209 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
4210 (wince_hostio_last_error): New functions.
4211 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
4212 as hostio_last_error handler.
4213 (win32_target_ops) [!_WIN32_WCE]: Register
4214 hostio_last_error_from_errno as hostio_last_error handler.
4215 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
4216 (hostio-errno.o): New rule.
4217 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
4218 * configure.srv (srv_hostio_err_objs): New variable. Default to
4220 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
4221 * configure: Regenerate.
4223 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4225 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
4226 (linux_kill, linux_detach): Clean up the process list.
4227 * remote-utils.c (remote_open): Improve port number parsing.
4228 (putpkt_binary, input_interrupt): Only send interrupts if the target
4230 * server.c (extended_protocol): Make static.
4231 (attached): Define earlier.
4232 (exit_requested, response_needed, program_argv): New variables.
4233 (target_running): New.
4234 (start_inferior): Clear attached here.
4235 (attach_inferior): Set attached here.
4236 (require_running): Define.
4237 (handle_query): Use require_running and target_running. Implement
4239 (handle_v_attach, handle_v_run): New.
4240 (handle_v_requests): Use require_running. Handle vAttach and vRun.
4241 (gdbserver_usage): Update.
4242 (main): Redo argument parsing. Handle --debug and --multi. Handle
4243 --attach along with other options or after the port. Save
4244 program_argv. Support no initial program. Resynchronize
4245 communication with GDB after an error. Handle "monitor exit".
4246 Use require_running and target_running. Always allow the extended
4247 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
4248 restart in extended mode.
4249 * README: Refer to the GDB manual. Update --attach usage.
4251 2007-12-20 Andreas Schwab <schwab@suse.de>
4253 * linux-low.c (STACK_SIZE): Define.
4254 (linux_tracefork_child): Use it. Use __clone2 on ia64.
4255 (linux_test_for_tracefork): Likewise.
4257 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
4259 * linux-low.c (linux_wait_for_event): Update messages. Do not
4260 reinsert auto-delete breakpoints.
4261 * mem-break.c (struct breakpoint): Change return type of handler to
4263 (set_breakpoint_at): Update handler type.
4264 (reinsert_breakpoint_handler): Return 1 instead of calling
4266 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
4268 (check_breakpoints): Delete auto-delete breakpoints and return 2.
4269 * mem-break.h (set_breakpoint_at): Update handler type.
4270 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
4271 * win32-low.c (auto_delete_breakpoint): New.
4272 (get_child_debug_event): Use it.
4274 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
4276 * configure.ac: Check for pread and pwrite.
4277 * hostio.c (handle_pread): Fall back to lseek and read.
4278 (handle_pwrite): Fall back to lseek and write.
4279 * config.in, configure: Regenerated.
4281 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
4283 * server.c (myresume): Add own_buf argument.
4284 (main): Update calls.
4286 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
4288 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
4289 * remote-utils.c (remote_open): Do not call disable_async_io.
4290 (block_async_io): Delete.
4291 (unblock_async_io): Make static.
4292 (initialize_async_io): New.
4293 * server.c (handle_v_cont): Handle async I/O here.
4294 (myresume): Likewise. Move other common resume tasks here...
4295 (main): ... from here. Call initialize_async_io. Disable async
4296 I/O before the main loop.
4297 * server.h (initialize_async_io): Declare.
4298 (block_async_io, unblock_async_io): Delete prototypes.
4299 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
4301 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
4303 * remote-utils.c (readchar): Allow binary data in received messages.
4305 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4307 * win32-low.c (attaching): New global.
4308 (win32_create_inferior): Clear the `attaching' global.
4309 (win32_attach): Set the `attaching' global.
4310 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
4311 attaching. Only set a breakpoint at the entry point if not
4314 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4316 * server.c (main): Don't report dll events on the initial
4317 connection on attaches.
4319 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4321 * server.c (main): Relax numerical bases supported for the pid of
4322 the --attach command line argument.
4324 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4326 * win32-low.c (win32_attach): Call OpenProcess before
4327 DebugActiveProcess, not after. Add last error output to error
4330 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
4332 * win32-low.c (win32_get_thread_context)
4333 (win32_set_thread_context): New functions.
4334 (thread_rec): Use win32_get_thread_context.
4335 (continue_one_thread, win32_resume): Use win32_set_thread_context.
4336 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
4339 2007-12-03 Leo Zayas
4340 Pedro Alves <pedro_alves@portugalmail.pt>
4342 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
4344 (child_add_thread): Minor cleanup.
4345 (child_continue): Resume artificially suspended threads before
4346 calling ContinueDebugEvent.
4347 (suspend_one_thread): New.
4348 (fake_breakpoint_event): New.
4349 (get_child_debug_event): Change return type to int. Check here if
4350 gdb sent an interrupt request. If a soft interrupt was requested,
4351 fake a breakpoint event. Return 0 if there is no event to handle,
4353 (win32_wait): Don't check here if gdb sent an interrupt request.
4354 Ensure there is a valid event to handle.
4355 (win32_request_interrupt): Add soft interruption method as last
4358 2007-12-03 Leo Zayas
4359 Pedro Alves <pedro_alves@portugalmail.pt>
4361 * win32-low.h (win32_thread_info): Add descriptions to the
4362 structure members. Replace `suspend_count' counter by a
4364 * win32-low.c (thread_rec): Update condition of when to get the
4365 context from the inferior. Rely on ContextFlags being set if it
4366 has already been retrieved. Only suspend the inferior thread if
4367 we haven't already. Warn if that fails.
4368 (continue_one_thread): s/suspend_count/suspended/. Only call
4369 ResumeThread once. Warn if that fails.
4371 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4373 * win32-low.c (win32_wait): Don't read from the inferior when it
4376 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
4378 * Makefile.in (win32_low_h): New variable.
4379 (win32-low.o): Add dependency on $(win32_low_h).
4380 (win32-arm-low.o, win32-i386-low.o): New rules.
4382 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4384 * hostio.c: Correct copyright year.
4386 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
4388 * Makefile.in (OBS): Add hostio.o.
4389 (hostio.o): New rule.
4390 * server.h (handle_vFile): Declare.
4391 * hostio.c: New file.
4392 * server.c (handle_v_requests): Take packet_len and new_packet_len
4393 for binary packets. Call handle_vFile.
4394 (main): Update call to handle_v_requests.
4396 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
4398 * linux-low.c: Include <sched.h>.
4400 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
4402 * linux-low.c (linux_tracefork_grandchild): New.
4403 (linux_tracefork_child): Use clone.
4404 (linux_test_for_tracefork): Use clone; allocate and free a stack.
4406 2007-10-31 Joel Brobecker <brobecker@adacore.com>
4408 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
4410 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
4412 * linux-low.c (handle_extended_wait): Handle unexpected signals.
4414 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
4416 * inferiors.c (change_inferior_id): Delete.
4417 (add_pid_to_list, pull_pid_from_list): New.
4418 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
4419 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
4420 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
4421 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
4422 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
4423 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
4424 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
4425 (using_threads): Always set to 1.
4426 (handle_extended_wait): New.
4427 (add_process): Do not set TID.
4428 (linux_create_inferior): Set must_set_ptrace_flags.
4429 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
4430 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
4431 (linux_thread_alive): Rename TID argument to LWPID.
4432 (linux_wait_for_process): Handle unknown processes. Do not use TID.
4433 (linux_wait_for_event): Do not use TID or check using_threads. Update
4434 call to dead_thread_notify. Call handle_extended_wait.
4435 (linux_create_inferior): Use PTRACE_SETOPTIONS.
4436 (send_sigstop): Delete sigstop_sent.
4437 (wait_for_sigstop): Avoid TID.
4438 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
4439 (linux_test_for_tracefork): New.
4440 (linux_lookup_signals): Use thread_db_active and
4441 linux_supports_tracefork_flag.
4442 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
4443 * linux-low.h (get_process_thread): Avoid TID.
4444 (struct process_ifo): Move thread_known and tid to the end. Remove
4446 (linux_attach_lwp, thread_db_init): Update prototypes.
4447 * server.h (change_inferior_id): Delete prototype.
4448 (add_pid_to_list, pull_pid_from_list): New prototypes.
4449 * thread-db.c (thread_db_use_events): New.
4450 (find_first_thread): Rename to...
4451 (find_one_thread): ...this. Update callers and messages. Do not
4452 call fatal. Check thread_db_use_events. Do not call
4453 change_inferior_id or new_thread_notify.
4454 (maybe_attach_thread): Update. Do not call new_thread_notify.
4455 (thread_db_init): Set thread_db_use_events. Check use_events.
4456 * utils.c (fatal, warning): Correct message prefix.
4458 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
4460 * Makefile.in (clean): Remove new files.
4461 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
4462 (powerpc-64.o, powerpc-64.c): New rules.
4463 * configure.srv: Use alternate register sets for powerpc64-*-linux*
4464 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
4466 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
4468 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
4469 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
4470 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
4471 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
4472 (target_regsets): Add AltiVec and SPE register sets.
4473 * configure.ac: Check for AltiVec and SPE.
4474 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
4475 (ppc_fill_vrregset, ppc_store_vrregset): New.
4476 (target_regsets): Add AltiVec register set.
4477 * configure: Regenerated.
4479 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
4481 * linux-low.c (O_LARGEFILE): Define.
4482 (linux_read_memory): Use /proc/PID/mem.
4483 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
4484 * configure, config.in: Regenerated.
4486 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
4488 * linux-low.c (linux_wait_for_event): Do not pass signals while
4491 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4493 * win32-low.c (create_process): New.
4494 (win32_create_inferior): Use create_process instead of
4495 CreateProcess. If create_process failed retry appending an ".exe"
4496 suffix. Store the GetLastError result immediatelly after
4497 create_process calls and use it on the call to error.
4499 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
4501 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
4503 2007-08-23 Joel Brobecker <brobecker@adacore.com>
4505 * configure.ac: Switch license to GPLv3.
4507 2007-08-01 Michael Snyder <msnyder@access-company.com>
4509 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
4511 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
4513 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
4515 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
4516 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
4517 CloseToolhelp32Snapshot.
4518 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
4519 CloseToolhelp32Snapshot.
4521 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
4523 * server.c (main): Check for inferior exit before main loop.
4525 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
4527 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
4528 instead of on tmp_desc.
4530 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
4531 Daniel Jacobowitz <dan@codesourcery.com>
4533 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
4534 (add_thread): Minor cleanups.
4535 (clear_inferiors): Move lower in the file. Clear the DLL
4537 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
4538 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
4539 (xml_escape_text): New.
4540 * server.c (handle_query): Handle qXfer:libraries:read. Report it
4542 (handle_v_cont): Report errors.
4543 (gdbserver_version): Update.
4544 (main): Correct size of own_buf. Do not report initial DLL events.
4545 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
4546 (unloaded_dll, xml_escape_text): New.
4547 * win32-low.c (enum target_waitkind): Update comments.
4548 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
4549 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
4550 (win32_EnumProcessModules, win32_GetModuleInformation)
4551 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
4552 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
4553 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
4554 (win32_Module32First, win32_Module32Next, load_toolhelp)
4555 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
4556 (get_child_debug_event): Handle DLL events.
4557 (win32_wait): Likewise.
4559 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4561 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
4562 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
4564 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4566 * win32-low.c (handle_output_debug_string): Ignore event if not
4569 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
4571 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
4573 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
4575 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
4577 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
4579 * inferiors.c (change_inferior_id): Add comment.
4580 * linux-low.c (check_removed_breakpoint): Add an early
4581 prototype. Improve debug output.
4582 (linux_attach): Doc update.
4583 (linux_detach_one_process, linux_detach): Clean up before releasing
4585 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
4586 * linux-low.h (struct process_info): Doc improvement.
4587 * mem-break.c (delete_all_breakpoints): New.
4588 * mem-break.h (delete_all_breakpoints): New prototype.
4589 * thread-db.c (find_first_thread): New.
4590 (thread_db_create_event): Call it instead of
4591 thread_db_find_new_threads. Clean up unused variables.
4592 (maybe_attach_thread): Remove first thread handling.
4593 (thread_db_find_new_threads): Use find_first_thread.
4594 (thread_db_get_tls_address): Likewise.
4596 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
4598 * thread-db.c (thread_db_find_new_threads): Add prototype.
4599 (thread_db_create_event): Check for the main thread before adding
4601 (maybe_attach_thread): Only enable event reporting if TID == 0.
4602 (thread_db_get_tls_address): Check for new threads.
4604 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
4606 * linux-low.c (linux_create_inferior): Try execv before execvp.
4607 * spu-low.c (spu_create_inferior): Likewise.
4609 2007-06-13 Mike Frysinger <vapier@gentoo.org>
4611 * linux-low.c (linux_create_inferior): Change execv to execvp.
4612 * spu-low.c (spu_create_inferior): Likewies.
4614 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
4616 * Makefile.in (clean): Clean new files instead of deleted ones.
4617 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
4618 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
4620 * configure.srv: Specify XML files and new regformats for MIPS and
4622 * linux-mips-low.c (mips_num_regs): Set to only used registers.
4623 (mips_regmap): Do not fetch $0. Remove unused registers. Add
4624 an entry for the restart register.
4625 (mips_cannot_fetch_register, mips_cannot_store_register)
4626 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
4627 register names to match the XML descriptions.
4628 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
4629 restart register instead of $0.
4631 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4632 Markus Deuling <deuling@de.ibm.com>
4634 * remote-utils.c (decode_xfer_write): New function.
4635 * server.h (decode_xfer_write): Add prototype.
4636 * server.c (handle_query): Add PACKET_LEN argument. Support
4637 qXfer:spu:read and qXfer:spu:write packets.
4638 (main): Pass packet_len to handle_query.
4639 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
4640 * target.h (target_ops): Add qxfer_spu.
4642 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
4644 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
4645 accessing non-seekable spufs files.
4647 2007-05-16 Markus Deuling <deuling@de.ibm.com>
4649 * server.c (handle_query): Add reply for qC packet.
4651 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4652 Leo Zayas <lerele@champenstudios@com>
4654 * server.h (check_remote_input_interrupt_request): New function.
4655 * remote_utils.c (INVALID_DESCRIPTOR): New define.
4656 (remote_desc): Initialize with INVALID_DESCRIPTOR.
4657 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
4658 (check_remote_input_interrupt_request): New function.
4659 * server.h (check_remote_input_interrupt_request): Declare.
4660 * win32-low.c (winapi_DebugBreakProcess,
4661 winapi_GenerateConsoleCtrlEvent): New typedefs.
4662 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
4664 (win32_wait): Check for remote interrupt request
4665 with check_remote_input_interrupt_request.
4666 (win32_request_interrupt): New function.
4667 (win32_target_op): Set request_interrupt to win32_request_interrupt.
4669 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4671 * win32-low.c (debug_registers_changed,
4672 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
4673 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
4674 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
4675 (thread_rec): Get context using the low target.
4676 (child_add_thread): Call thread_added on the low target,
4677 which does the same thing.
4679 (do_initial_child_stuff): Remove debug registers references.
4680 Set context using the low target. Resume threads after
4681 setting the contexts.
4682 (child_continue): Remove dead variable. Remove debug
4683 registers references.
4684 (child_fetch_inferior_registers): Go through the low target.
4685 (do_child_store_inferior_registers): Remove.
4686 (child_store_inferior_registers): Go through the low target.
4687 (win32_resume): Remove debug registers references.
4688 Set context using the low target.
4689 (handle_exception): Change return type to void. Don't record
4690 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
4691 first chance exception.
4692 (get_child_debug_event): Change return type to void. Remove
4693 goto loop. Always return after waiting for debug event.
4694 (win32_wait): Convert to switch statement. Handle spurious
4697 * win32-i386-low.c (debug_registers_changed,
4698 debug_registers_used): New.
4699 (initial_stuff): Rename to ...
4700 (i386_initial_stuff): ... this. Clear debug registers
4702 (store_debug_registers): Delete.
4703 (i386_get_thread_context): New.
4704 (load_debug_registers): Delete.
4705 (i386_set_thread_context): New.
4706 (i386_thread_added): New.
4707 (single_step): Rename to ...
4708 (i386_single_step): ... this.
4709 (do_fetch_inferior_registers): Rename to ...
4710 (i386_fetch_inferior_register): ... this.
4711 (i386_store_inferior_register): New.
4712 (the_low_target): Adapt to new interface.
4714 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
4715 (arm_get_thread_context): New.
4716 (arm_set_thread_context): New.
4718 (do_fetch_inferior_registers): Rename to ...
4719 (arm_fetch_inferior_register): ... this.
4720 (arm_store_inferior_register): New.
4721 (arm_wince_breakpoint): Reimplement as unsigned long.
4722 (arm_wince_breakpoint_len): Define.
4723 (the_low_target): Adapt to new interface.
4725 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
4726 load_debug_registers. Add get_thread_context, set_thread_context,
4727 thread_added and store_inferior_register. Rename
4728 fetch_inferior_registers to fetch_inferior_register.
4729 (regptr): Remove declaration.
4731 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4733 * linux-low.c (linux_detach): Change return type to int. Return 0.
4734 * spu-low.c (spu_detach): Likewise.
4736 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4738 * target.h (target_ops): Change return type of detach to int.
4740 (join_inferior): New.
4741 * server.c (main): Don't skip detach support on mingw32.
4742 If the inferior doesn't support detaching return error.
4743 Call join_inferior instead of using waitpid.
4744 * linux-low.c (linux_join): New.
4745 (linux_target_op): Add linux_join.
4746 * spu-low.c (spu_join): New.
4747 (spu_target_ops): Add spu_join.
4748 * win32-low.c (win32_detach): Adapt to new interface.
4749 Reopen current_process_handle before detaching. Issue a child
4750 resume before detaching.
4752 (win32_target_op): Add win32_join.
4754 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4756 * win32-low.c (win32-attach): Fix return value.
4757 * target.h (target_ops): Describe ATTACH return values.
4759 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4761 * win32-low.c (GETPROCADDRESS): Define.
4762 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
4763 (winapi_DebugSetProcessKillOnExit): Likewise.
4764 (win32_create_inferior): Force usage of ansi CreateProcessA.
4765 (win32_attach): Use GETPROCADDRESS.
4766 (win32_detach): Likewise.
4768 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
4770 * win32-low.c (win32_wait): Don't use WSTOPSIG.
4772 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
4774 * win32-low.c: Commit leftover changes from 2007-03-29.
4776 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4778 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
4779 fields short instead of int. Add explicit padding.
4780 (i387_cache_to_fsave): Remove unnecessary casts.
4781 (i387_fsave_to_cache): Doc fix.
4782 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
4784 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
4786 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
4787 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
4789 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4791 * configure.srv (arm*-*-mingw32ce*): Move near the other
4794 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
4796 * configure.ac: Add errno checking.
4797 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
4798 sys/file.h and malloc.h.
4799 (AC_CHECK_DECLS): Add perror.
4800 (srv_mingwce): Handle.
4801 * configure.srv (i[34567]86-*-cygwin*): Add
4802 win32-i386-low.o to srv_tgtobj.
4803 (i[34567]86-*-mingw*): Likewise.
4804 (arm*-*-mingw32ce*): Add case.
4805 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4806 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
4807 [__MINGW32CE__] (strerror): New function.
4808 [__MINGW32CE__] (errno): Define to GetLastError.
4809 [__MINGW32CE__] (COUNTOF): New macro.
4810 (remote_open): Remove extra close call.
4811 * mem-break.c (delete_breakpoint_at): New function.
4812 * mem-break.h (delete_breakpoint_at): Declare.
4813 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
4814 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
4815 [USE_WIN32API] (read, write): Add char* casts.
4816 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
4817 * server.h: Include wincecompat.h on Windows CE.
4818 [HAVE_ERRNO_H]: Check.
4819 (perror): Declare if not declared.
4820 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
4821 (perror_with_name): Remove errno declaration.
4822 * wincecompat.h: New.
4823 * wincecompat.c: New.
4825 * win32-arm-low.c: New.
4826 * win32-i386-low.c: New.
4827 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
4828 (OUTMSG2): Make it safe.
4830 (COUNTOF): New macro.
4831 (NUM_REGS): Get it from the low target.
4832 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
4833 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
4834 (thread_rec): Let low target handle debug registers.
4835 (child_add_thread): Likewise.
4836 (child_init_thread_list): Likewise.
4837 (continue_one_thread): Likewise.
4839 (do_child_fetch_inferior_registers): Move to ...
4840 * win32-i386-low.c: ... here, and rename to ...
4841 (do_fetch_inferior_registers): ... this.
4842 * win32-low.c (child_fetch_inferior_registers):
4843 Go through the low target.
4844 (do_child_store_inferior_registers): Use regptr.
4845 (strwinerror): New function.
4846 (win32_create_inferior): Handle Windows CE.
4847 Use strwinerror instead of strerror on Windows error
4848 codes. Add program to the error output.
4849 Don't close the main thread handle on Windows CE.
4850 (win32_attach): Use coredll.dll on Windows CE.
4851 (win32_kill): Close current process and current
4853 (win32_detach): Use coredll.dll on Windows CE.
4854 (win32_resume): Let low target handle debug registers, and
4856 (handle_exception): Add/Remove initial breakpoint. Avoid
4857 non-existant WSTOPSIG on Windows CE.
4858 (win32_read_inferior_memory): Cast to remove warning.
4859 (win32_arch_string): Go through the low target.
4860 (initialize_low): Call set_breakpoint_data with the low
4861 target's breakpoint.
4862 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
4863 FOP_REGNUM, mappings): Move to ...
4864 * win32-i386-low.c: ... here.
4865 * win32-low.c (win32_thread_info): Move to ...
4866 * win32-low.h: ... here.
4867 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
4868 win32-arm-low.c and wincecompat.c.
4869 (all:): Add $EXEEXT.
4870 (install-only:): Likewise.
4871 (gdbserver:): Likewise.
4872 (gdbreplay:): Likewise.
4873 * config.in: Regenerate.
4874 * configure: Regenerate.
4876 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4878 * win32-low.c: Rename typedef thread_info to
4879 win32_thread_info throughout.
4881 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
4883 * win32-i386-low.c: Rename to ...
4884 * win32-low.c: ... this.
4885 * configure.srv: Replace win32-i386-low.o with win32-low.o.
4886 * Makefile.in: Likewise.
4888 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
4890 * remote-utils.c (monitor_output): Constify msg parameter.
4891 * server.h (monitor_output): Likewise.
4892 * win32-i386-low.c (handle_output_debug_string): New.
4893 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
4894 handle_output_debug_string.
4895 (get_child_debug_event): Likewise.
4897 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
4899 * server.c (main): Correct strtoul check.
4901 2007-03-27 Jon Ringle <jon@ringle.org>
4903 * linux-low.c: Check __ARCH_HAS_MMU__ also.
4905 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
4907 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
4909 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4911 * terminal.h: Check HAVE_SGTTY_H.
4913 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
4915 * remote-utils.c (remote_open): Print out the assigned port number.
4917 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
4919 * remote-utils.c (monitor_output): New function.
4920 * server.c (debug_threads): Define here.
4921 (monitor_show_help): New function.
4922 (handle_query): Handle qRcmd.
4923 (main): Do not handle 'd' packet.
4924 * server.h (debug_threads, remote_debug, monitor_output): Declare.
4925 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
4928 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4930 * Makefile.in (EXEEXT): New.
4931 (clean): Use $(EXEEXT).
4933 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4935 * target.h (target_ops): Rename send_signal to request_interrupt,
4936 and remove enum target_signal parameter.
4937 * linux-low.c (linux_request_interrupt): Rename from
4938 linux_send_signal, and always send SIGINT.
4939 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4940 and always send SIGINT.
4941 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4943 (input_interrupt): Likewise.
4945 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4947 * server.c (get_features_xml): Check if target implemented
4949 * win32-i386-low.c (win32_arch_string): New.
4950 (win32_target_ops): Add win32_arch_string as arch_string member.
4952 2007-02-22 Markus Deuling <deuling@de.ibm.com>
4954 * spu-low.c (spu_arch_string): New.
4955 (spu_target_ops): Add spu_arch_string.
4957 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4959 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4960 * configure.ac: Do not check for terminal.h.
4961 * configure, config.in: Regenerated.
4963 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4965 * Makefile.in (OBS): Add $(XML_BUILTIN).
4966 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4968 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4969 (arm-with-iwmmxt.c): New.
4970 * config.in, configure: Regenerate.
4971 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4972 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4973 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4974 (arm*-*-linux*): Add iWMMXt and regset support.
4975 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4976 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4977 (arm_store_wmmxregset, target_regsets): New.
4978 * server.c (get_features_xml): Take annex argument. Check builtin
4980 (handle_query): Handle multiple annexes.
4982 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4984 * remote-utils.c [USE_WIN32API] (read, write): Define.
4985 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4988 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4990 * linux-i386-low.c (the_low_target): Set arch_string.
4991 * linux-x86-64-low.c (the_low_target): Likewise.
4992 * linux-low.c (linux_arch_string): New.
4993 (linux_target_ops): Add it.
4994 * linux-low.h (struct linux_target_ops): Add arch_string.
4995 * server.c (write_qxfer_response): Use const void * for DATA.
4996 (get_features_xml): New.
4997 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4998 * target.h (struct target_ops): Add arch_string method.
5000 2007-01-03 Denis Pilat <denis.pilat@st.com>
5001 Daniel Jacobowitz <dan@codesourcery.com>
5003 * linux-low.c (linux_kill): Handle being called with no threads.
5004 * win32-i386-low.c (win32_kill): Likewise.
5005 (get_child_debug_event): Clear current_process_handle.
5007 2006-12-30 Denis PILAT <denis.pilat@st.com>
5008 Daniel Jacobowitz <dan@codesourcery.com>
5010 * remote-utils.c (remote_open): Check the type of specified
5011 serial port devices before opening them.
5012 * server.c (main): Kill the inferior if an error occurs during
5013 the first remote_open.
5015 2006-12-05 Markus Deuling <deuling@de.ibm.com>
5017 * README: Update supported targets.
5019 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
5021 * Makefile.in (clean): Remove reg-mips64.c.
5022 (reg-mips64.c, reg-mips64.o): New rules.
5023 * configure.srv: Handle mips64. Include regset support for mips.
5024 * linux-mips-low.c (union mips_register): New.
5025 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
5026 (mips_breakpoint, mips_breakpoint_at): Use int.
5027 (mips_collect_register, mips_supply_register)
5028 (mips_collect_register_32bit, mips_supply_register_32bit)
5029 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
5030 (mips_store_fpregset, target_regsets): New.
5031 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
5033 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
5035 * configure.srv: Add target "spu*-*-*".
5036 * Makefile.in (clean): Remove reg-spu.c.
5037 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
5038 * spu-low.c: New file.
5040 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5042 * configure.ac: Correct td_thr_tls_get_addr test.
5043 * configure: Regenerated.
5045 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
5047 * linux-low.c (linux_wait_for_event): Reformat. Use the
5049 * remote-utils.c (decode_address_to_semicolon): New.
5050 * server.c (pass_signals, handle_general_set): New.
5051 (handle_query): Mention QPassSignals for qSupported.
5052 (main): Call handle_general_set.
5053 * server.h (pass_signals, decode_address_to_semicolon): New.
5055 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
5057 * server.c (handle_query): Correct error handling for read_auxv.
5059 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
5061 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
5062 and srv_linux_thread_db to yes.
5063 * linux-s390-low.c (s390_fill_gregset): New function.
5064 (target_regsets): Define data structure.
5066 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
5068 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
5069 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
5070 * config.in, configure: Regenerated.
5071 * inferiors.c (gdb_id_to_thread): New function.
5072 (gdb_id_to_thread_id): Use it.
5073 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
5074 * linux-low.h (struct process_info): Add th member.
5075 (thread_db_get_tls_address): New prototype.
5076 * remote-utils.c (decode_address): Make non-static.
5077 * server.c (handle_query): Handle qGetTLSAddr.
5078 * server.h (gdb_id_to_thread, decode_address): New prototypes.
5079 * target.h (struct target_ops): Add get_tls_address.
5080 * thread-db.c (maybe_attach_thread): Save the thread handle.
5081 (thread_db_get_tls_address): New.
5083 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
5085 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
5086 (linux_resume_one_process): Take a siginfo_t *. Update all
5087 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
5088 (struct pending_signals): Add a siginfo_t.
5089 (linux_wait_for_process): Always set last_status.
5090 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
5091 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
5092 * linux-low.h (struct process_info): Add last_status.
5094 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
5096 * remote-utils.c (try_rle): New function.
5097 (putpkt_binary): Use it.
5099 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
5101 * Makefile.in (clean): Clean reg-x86-64-linux.c.
5102 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
5103 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
5104 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
5105 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
5108 2006-08-08 Richard Sandiford <richard@codesourcery.com>
5110 * server.c (terminal_fd): New variable.
5111 (old_foreground_pgrp): Likewise.
5112 (restore_old_foreground_pgrp): New function.
5113 (start_inferior): Record the terminal file descriptor in terminal_fd
5114 and its original foreground group in old_foreground_pgrp. Register
5115 restore_old_foreground_pgrp with atexit().
5117 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
5119 * server.c (handle_query): Correct qPart to qXfer.
5121 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
5123 * configure.ac: Check for more headers which are missing on
5124 Windows. Automatically supply -lwsock32 and USE_WIN32API.
5125 * configure.srv: Add Cygwin and mingw32.
5126 * remote-utils.c: Don't include headers unconditionally which
5127 are missing on mingw32. Include <winsock.h> for mingw32.
5128 (remote_open): Adjust for mingw32 support. Flush
5129 standard error after writing to it.
5130 (remote_close, putpkt_binary, input_interrupt, block_async_io)
5131 (unblock_async_io, enable_async_io, disable_async_io)
5132 (readchar, getpkt): Update for Winsock support.
5133 (prepare_resume_reply): Expect a protocol signal number.
5134 * server.c: Disable <sys/wait.h> on mingw32.
5135 (start_inferior): Adjust for mingw32 support. Flush
5136 standard error after writing to it.
5137 (attach_inferior): Likewise. Use protocol signal
5139 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
5141 * win32-i386-low.c: New file.
5142 * Makefile.in (XM_CLIBS): Set.
5143 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
5144 (win32-i386-low.o): New dependency rule.
5145 * linux-low.c (linux_wait): Use target signal numbers.
5146 * target.h (struct target_ops): Doc fix.
5147 * server.h (target_signal_to_name): New prototype.
5148 * gdbreplay.c: Don't include headers unconditionally which
5149 are missing on mingw32. Include <winsock.h> for mingw32.
5150 (remote_close, remote_open): Adjust for Winsock support.
5151 * configure, config.in: Regenerated.
5153 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
5155 * server.c (decode_xfer_read, write_qxfer_response): New.
5156 (handle_query): Take a packet length argument. Handle
5157 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
5158 the qSupported response.
5159 (main): Update call to handle_query.
5161 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
5163 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
5164 (putpkt_binary): Renamed from putpkt and adjusted for binary
5166 (putpkt): New wrapper for putpkt_binary.
5167 (readchar): Don't mask off the high bit.
5168 (decode_X_packet): New function.
5169 * server.c (main): Call putpkt_binary if a handler sets the packet
5170 length. Save the length of the incoming packet. Handle 'X'.
5171 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
5173 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
5175 * server.c (handle_query): Handle qSupported.
5177 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5179 * remote-utils.c (all_symbols_looked_up): New variable.
5180 (look_up_one_symbol): Check it.
5181 * server.h (look_up_one_symbol): New declaration.
5182 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
5184 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
5186 * Makefile.in (linux-arm-low.o): Update dependencies.
5187 * linux-arm-low.c: Include "gdb_proc_service.h".
5188 (PTRACE_GET_THREAD_AREA): Define.
5189 (ps_get_thread_area): New function.
5191 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
5193 * configure.srv (m68k*-*-uclinux*): New target.
5194 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
5195 (linux_resume_one_process): Remove extraneous cast.
5196 (linux_read_offsets): New.
5197 (linux_target_op): Add linux_read_offsets on mmuless systems.
5198 * server.c (handle_query): Add qOffsets logic.
5199 * target.h (struct target_ops): Add read_offsets.
5201 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5203 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
5204 (PTRACE_GET_THREAD_AREA): Define.
5205 (ps_get_thread_area): New function.
5206 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
5207 (linux-x86-64-low.o): Update.
5209 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
5211 * configure.ac: Remove checks for prfpregset_t.
5212 * gdb_proc_service.h: New file.
5213 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
5214 new "gdb_proc_service.h".
5215 * proc-service.c: Likewise.
5216 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
5217 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
5218 * Makefile.in (gdb_proc_service_h): Updated.
5219 * configure, config.in: Regenerated.
5221 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5223 * remote-utils.c (prepare_resume_reply): Move declaration
5224 of gdb_id_from_wait to the top of the block.
5226 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
5228 * linux-low.c (regsets_store_inferior_registers): Read the regset
5229 from the target before filling it.
5231 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
5233 * server.c (attach_inferior): Return SIGTRAP for a successful
5236 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
5238 * Makefile.in (OBS): Add version.o.
5239 (STAGESTUFF): Delete.
5240 (version.o): Add dependencies.
5241 (version.c): Replace rule.
5242 (clean): Remove version.c.
5243 * server.c (gdbserver_version): New.
5244 (gdbserver_usage): Use printf.
5245 (main): Handle --version and --help.
5246 * server.h (version, host_name): Add declarations.
5248 2005-12-23 Eli Zaretskii <eliz@gnu.org>
5260 * linux-x86-64-low.c:
5263 * linux-ppc64-low.c:
5272 * linux-crisv32-low.c:
5284 * gdbserver.1: Add (C) after Copyright. Update the FSF
5287 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
5289 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
5290 (arm_breakpoint_at): Recognize both breakpoints.
5291 (the_low_target): Use the correct breakpoint instruction.
5293 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
5295 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
5296 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
5297 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
5298 (the_low_target): Update.
5300 2005-10-25 Andreas Schwab <schwab@suse.de>
5302 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
5304 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
5305 (ia64_num_regs): Reduce to 462.
5307 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
5309 * acinclude.m4: Correct quoting.
5310 * aclocal.m4: Regenerated.
5312 Suggested by SZOKOVACS Robert <szo@ies.hu>:
5313 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
5314 (thread_db_init): Call thread_db_err_str.
5315 * configure.ac: Check for TD_VERSION.
5316 * config.in, configure: Regenerated.
5318 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5320 * server.h (error, fatal, warning): Add ATTR_FORMAT.
5322 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5324 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
5325 is not available. Define HAVE_PTRACE_GETREGS if it is.
5326 * config.in, configure: Regenerated.
5327 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
5328 * linux-i386-low.c, linux-m68k-low.c: Update to use
5329 HAVE_PTRACE_GETREGS.
5330 * linux-low.c (regsets_fetch_inferior_registers)
5331 (regsets_store_inferior_registers): Only return 0 if we processed
5333 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
5334 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
5336 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5338 * inferiors.c (struct thread_info): Add gdb_id.
5339 (add_thread): Add gdb_id argument.
5340 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
5341 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
5342 calls to add_thread.
5343 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
5344 * server.c (handle_query): Use thread_to_gdb_id.
5345 (handle_v_cont, main): Use gdb_id_to_thread_id.
5346 * server.h (add_thread): Update prototype.
5347 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
5350 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
5352 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
5353 left-padded registers.
5354 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
5355 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
5357 2005-07-01 Steve Ellcey <sje@cup.hp.com>
5359 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
5360 * configure: Regenerate.
5361 * config.in: Regenerate.
5362 * server.h (NEED_DECLARATION_STRERROR):
5363 Replace with !HAVE_DECL_STRERROR.
5365 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
5367 * linux-low.c (linux_wait, linux_send_signal): Don't test
5368 an unsigned long variable for > 0 if it could be MAX_ULONG.
5369 * server.c (myresume): Likewise.
5370 * target.c (set_desired_inferior): Likewise.
5372 2005-06-13 Mark Kettenis <kettenis@gnu.org>
5374 * configure.ac: Simplify and improve check for socklen_t.
5375 * configure, config.in: Regenerate.
5377 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
5379 * acconfig.h: Remove.
5380 * configure.ac: Add a test for socklen_t. Use three-argument
5381 AC_DEFINE throughout.
5382 * config.in: Regenerated using autoheader 2.59.
5383 * configure: Regenerated.
5385 * gdbreplay.c (socklen_t): Provide a default.
5386 (remote_open): Use socklen_t.
5387 * remote-utils.c (socklen_t): Provide a default.
5388 (remote_open): Use socklen_t.
5389 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
5392 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
5394 * linux-low.c (linux_read_memory, linux_write_memory)
5395 (linux_read_auxv): Likewise.
5396 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
5397 (check_mem_write): Likewise.
5398 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
5400 * regcache.c (struct inferior_rgcache_data, registers_to_string)
5401 (registers_from_string, register_data): Likewise.
5402 * server.c (handle_query, main): Likewise.
5403 * server.h (convert_ascii_to_int, convert_int_to_ascii)
5404 (decode_M_packet): Likewise.
5405 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
5406 * target.h (struct target_ops): Update read_memory, write_memory,
5408 (read_inferior_memory, write_inferior_memory): Update.
5409 * linux-low.h (struct linux_target_ops): Change type of breakpoint
5411 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
5412 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
5413 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
5414 linux-s390-low.c, linux-sh-low.c: Update for changes in
5415 read_inferior_memory and the_low_target->breakpoint.
5417 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
5419 * Makefile.in (SFILES): Add linux-ppc64-low.c.
5420 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
5421 * configure.srv: Add powerpc64-*-linux*.
5422 * linux-ppc64-low.c: New file.
5424 2005-05-23 Orjan Friberg <orjanf@axis.com>
5426 * linux-cris-low.c: New file with support for CRIS.
5427 * linux-crisv32-low.c: Ditto for CRISv32.
5428 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
5429 (clean): Add reg-cris.c and reg-crisv32.c.
5430 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
5431 reg-crisv32.o, and reg-crisv32.c to make rules.
5432 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
5435 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
5437 * linux-low.c (fetch_register): Ensure buffer size is a multiple
5438 of sizeof (PTRACE_XFER_TYPE).
5439 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
5441 2005-05-12 Orjan Friberg <orjanf@axis.com>
5443 * target.h (struct target_ops): Add insert_watchpoint,
5444 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
5445 pointers for hardware watchpoint support.
5446 * linux-low.h (struct linux_target_ops): Ditto.
5447 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
5448 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
5449 to linux_target_ops.
5450 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
5452 * server.c (main): Recognize 'Z' and 'z' packets.
5454 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
5456 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
5457 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
5458 (the_low_target): Add new members.
5460 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5462 * proc-service.c (ps_lgetregs): Search all_processes instead of
5465 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
5467 * server.c (start_inferior): Change return type to int.
5468 (attach_inferior): Change sigptr to int *.
5469 (handle_v_cont, handle_v_requests): Change signal to int *.
5470 (main): Change signal to int.
5472 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
5474 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
5475 * configure.srv: Add m32r*-*-linux*.
5476 * linux-m32r-low.c: New file.
5478 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
5480 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
5482 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
5484 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
5485 Take unsigned long arguments for PIDs.
5486 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
5487 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
5488 (wait_for_sigstop, linux_resume_one_process)
5489 (regsets_fetch_inferior_registers, linux_send_signal)
5490 (linux_read_auxv): Likewise. Update the types of variables holding
5491 PIDs. Update format string specifiers.
5492 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
5493 * remote-utils.c (prepare_resume_reply): Likewise.
5494 * server.c (cont_thread, general_thread, step_thread)
5495 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
5497 (handle_query): Update format specifiers.
5498 (handle_v_cont, main): Use strtoul for thread IDs.
5499 * server.h (struct inferior_list_entry): Use unsigned long for ID.
5500 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
5501 (general_thread, step_thread, thread_from_wait)
5502 (old_thread_from_wait): Update.
5503 * target.h (struct thread_resume): Use unsigned long for THREAD.
5504 (struct target_ops): Use unsigned long for arguments to attach and
5507 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
5509 * acinclude.m4: Include bfd/bfd.m4 directly.
5510 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
5511 <agriffis@toolchain.org>.
5512 * aclocal.m4, configure: Regenerated.
5514 2005-01-07 Andrew Cagney <cagney@gnu.org>
5516 * configure.ac: Rename configure.in, require autoconf 2.59.
5517 * configure: Re-generate.
5519 2004-12-08 Daniel Jacobowitz <dan@debian.org>
5521 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
5523 * aclocal.m4: Regenerated.
5524 * configure: Regenerated.
5526 2004-11-21 Andreas Schwab <schwab@suse.de>
5528 * linux-m68k-low.c (m68k_num_gregs): Define.
5529 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
5530 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
5531 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
5532 (m68k_breakpoint_at): New. Add to the_low_target.
5534 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
5535 srv_linux_thread_db to yes.
5537 2004-10-20 Joel Brobecker <brobecker@gnat.com>
5539 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
5540 (ARCH_SET_FS): Likewise.
5541 (ARCH_GET_FS): Likewise.
5542 (ARCH_GET_GS): Likewise.
5544 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5546 * linux-i386-low.c (ps_get_thread_area): New.
5547 * linux-x86-64-low.c (ps_get_thread_area): New.
5548 * linux-low.c: Include <sys/syscall.h>.
5549 (linux_kill_one_process): Don't kill the first thread here.
5550 (linux_kill): Kill the first thread here.
5551 (kill_lwp): New function.
5552 (send_sigstop, linux_send_signal): Use it.
5553 * proc-service.c: Clean up #ifdefs.
5554 (fpregset_info): Delete.
5555 (ps_lgetregs): Update and enable implementation.
5556 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
5558 * remote-utils.c (struct sym_cache, symbol_cache): New.
5559 (input_interrupt): Print a clearer message.
5560 (async_io_enabled): New variable.
5561 (enable_async_io, disable_async_io): Use it. Update comments.
5562 (look_up_one_symbol): Use the symbol cache.
5563 * thread-db.c (thread_db_look_up_symbols): New function.
5564 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
5566 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5568 * configure.in: Test for -rdynamic.
5569 * configure: Regenerated.
5570 * Makefile (INTERNAL_LDFLAGS): New.
5571 (gdbserver, gdbreplay): Use it.
5573 2004-09-02 Andrew Cagney <cagney@gnu.org>
5575 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
5577 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
5579 * linux-low.c (linux_wait): Clear all_processes list also.
5581 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5583 * linux-low.c: Include <errno.h>. Remove extern declaration of
5586 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
5588 * gdbreplay.c, server.h, utils.c: Update copyright years.
5590 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5592 * server.c (main): Print child status or termination signal from
5593 variable 'signal', not 'sig'.
5595 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
5597 * linux-low.c (linux_read_memory): Change return type to
5598 int. Check for and return error from ptrace().
5599 * target.c (read_inferior_memory): Change return type to int. Pass
5600 back return status from the_target->read_memory().
5601 * target.h (struct target_ops): Adapt *read_memory() prototype.
5603 (read_inferior_memory): Adapt prototype.
5604 * server.c (main): Return an error packet if
5605 read_inferior_memory() returns an error.
5607 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
5609 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
5610 Unify with other clean targets.
5612 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5614 * server.c (handle_v_cont): Call set_desired_inferior.
5616 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5618 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
5620 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5622 * linux-low.c (linux_wait): Unblock async I/O.
5623 (linux_resume): Block and enable async I/O.
5624 * remote-utils.c (block_async_io, unblock_async_io): New functions.
5625 * server.h (block_async_io, unblock_async_io): Add prototypes.
5627 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5629 * remote-utils.c (remote_open): Print a status notice after
5631 * server.c (attach_inferior): Print a status notice after
5634 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
5636 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
5638 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
5640 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
5642 * server.c, target.h: Update copyright years.
5644 2004-02-25 Roland McGrath <roland@redhat.com>
5646 * target.h (struct target_ops): New member `read_auxv'.
5647 * server.c (handle_query): Handle qPart:auxv:read: query using that.
5648 * linux-low.c (linux_read_auxv): New function.
5649 (linux_target_ops): Initialize `read_auxv' member to that.
5651 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5653 Committed by Jim Blandy <jimb@redhat.com>.
5655 * linux-s390-low.c (s390_num_regs): Update.
5656 (s390_regmap): Remove control registers. Use __s390x__ predefine
5657 instead of GPR_SIZE to distiguish s390 and s390x targets.
5659 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
5661 * linux-low.c: Update copyright year.
5662 (check_removed_breakpoint): Clear pending_is_breakpoint.
5663 (linux_set_resume_request, linux_queue_one_thread)
5664 (resume_status_pending_p): New functions.
5665 (linux_continue_one_thread): Use process->resume.
5666 (linux_resume): Only resume threads if there are no pending events.
5667 * linux-low.h (struct process_info): Add resume request
5670 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
5672 * regcache.c (new_register_cache): Clear the allocated register
5673 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
5675 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
5677 * linux-low.c (linux_resume): Take a struct thread_resume *
5679 (linux_wait): Update call.
5680 (resume_ptr): New static variable.
5681 (linux_continue_one_thread): Renamed from
5682 linux_continue_one_process. Use resume_ptr.
5683 (linux_resume): Use linux_continue_one_thread.
5684 * server.c (handle_v_cont, handle_v_requests): New functions.
5685 (myresume): New function.
5686 (main): Handle 'v' case.
5687 * target.h (struct thread_resume): New type.
5688 (struct target_ops): Change argument of "resume" to struct
5690 (myresume): Delete macro.
5692 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
5694 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
5695 (uninstall): Support DESTDIR.
5697 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
5699 * configure.srv: Add xscale*linux copy of arm*linux entry.
5701 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
5703 * linux-arm-low.c (arm_reinsert_addr): New function.
5704 (the_low_target): Add arm_reinsert_addr.
5706 2003-07-08 Mark Kettenis <kettenis@gnu.org>
5708 * mem-break.c: Remove whitespace at end of file.
5710 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5712 * configure.in: Check whether we need to prototype strerror.
5713 * server.h: Optionally prototype strerror.
5714 * gdbreplay.c (perror_with_name): Use strerror.
5715 * linux-low.c (linux_attach_lwp): Use strerror.
5716 * utils.c (perror_with_name): Use strerror.
5717 * config.in, configure: Regenerated.
5719 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
5721 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
5722 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
5724 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
5726 * Makefile.in (SFILES): Update.
5727 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
5728 low-sun3.c: Remove files.
5730 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
5732 * linux-low.c: Move comment to linux_thread_alive where it belonged.
5733 (linux_detach_one_process, linux_detach): New functions.
5734 (linux_target_ops): Add linux_detach.
5735 * server.c (main): Handle 'D' packet.
5736 * target.h (struct target_ops): Add "detach" member.
5737 (detach_inferior): Define.
5739 2003-06-13 Mark Kettenis <kettenis@gnu.org>
5741 From Kelley Cook <kelleycook@wideopenwest.com>:
5742 * configure.srv: Accept i[34567]86 variants.
5744 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
5746 * linux-low.c (linux_wait_for_event): Correct comment typos.
5747 (linux_resume_one_process): Call check_removed_breakpoint.
5748 (linux_send_signal): New function.
5749 (linux_target_ops): Add linux_send_signal.
5750 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
5752 * target.h (struct target_ops): Add send_signal.
5754 2003-05-29 Jim Blandy <jimb@redhat.com>
5756 * linux-low.c (usr_store_inferior_registers): Transfer buf in
5757 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
5758 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
5759 away part of the register's value.
5761 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
5763 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
5764 (linux_wait_for_event, linux_init_signals): Likewise.
5766 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
5768 * configure.in: Check for stdlib.h.
5769 * configure: Regenerated.
5770 * config.in: Regenerated.
5772 2003-01-04 Andreas Schwab <schwab@suse.de>
5774 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
5776 2003-01-02 Andrew Cagney <ac131313@redhat.com>
5778 * Makefile.in: Remove obsolete code.
5780 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
5782 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
5783 defined(PT_FPR0_HI).
5785 2002-11-17 Stuart Hughes <seh@zee2.com>
5787 * linux-arm-low.c (arm_num_regs): Increase.
5788 (arm_regmap): Include status register.
5790 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
5792 * linux-low.c (register_addr): Remove incorrect -1 check.
5794 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
5796 * linux-low.c (linux_create_inferior): Call setpgid. Return
5798 (unstopped_p, linux_signal_pid): Remove.
5799 (linux_target_ops): Remove linux_signal_pid.
5800 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
5801 global instead of target method.
5802 * target.h (struct target_ops): Remove signal_pid. Update comment
5803 for create_inferior.
5804 * server.c (signal_pid): New variable.
5805 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
5806 gdbserver. Set the child to be the foreground process group.
5807 (attach_inferior): Set signal_pid.
5809 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
5811 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
5813 2002-08-20 Jim Blandy <jimb@redhat.com>
5815 * Makefile.in (LDFLAGS): Allow the configure script to establish a
5818 2002-08-01 Andrew Cagney <cagney@redhat.com>
5820 * Makefile.in: Make chill references obsolete.
5822 2002-07-24 Kevin Buettner <kevinb@redhat.com>
5824 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
5825 * configure: Regenerate.
5826 * config.in: Regenerate.
5828 2002-07-09 David O'Brien <obrien@FreeBSD.org>
5830 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
5831 (perror_with_name, remote_close, remote_open, expect, play): Static.
5833 2002-07-04 Michal Ludvig <mludvig@suse.cz>
5835 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
5836 byte offsets instead of an array of indexes.
5837 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
5839 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
5841 * regcache.c: Add comment.
5843 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
5845 * thread-db.c: New file.
5846 * proc-service.c: New file.
5847 * acinclude.m4: New file.
5848 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
5849 proc-service.o, and thread-db.o.
5850 (linux-low.o): Add USE_THREAD_DB.
5851 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
5852 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
5853 * aclocal.m4: Regenerated.
5854 * config.in: Regenerated.
5855 * configure: Regenerated.
5856 * configure.in: Check for proc_service.h, sys/procfs.h,
5857 thread_db.h, and linux/elf.h headrs.
5858 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
5859 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
5860 Check for -lthread_db and thread support.
5861 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
5862 PowerPC, and SuperH.
5863 * i387-fp.c: Constify arguments.
5864 * i387-fp.h: Likewise.
5865 * inferiors.c: (struct thread_info): Renamed from
5866 `struct inferior_info'. Remove PID member. Use generic inferior
5867 list header. All uses updated.
5868 (inferiors, signal_pid): Removed.
5869 (all_threads): New variable.
5870 (get_thread): Define.
5871 (add_inferior_to_list): New function.
5872 (for_each_inferior): New function.
5873 (change_inferior_id): New function.
5874 (add_inferior): Removed.
5875 (remove_inferior): New function.
5876 (add_thread): New function.
5877 (free_one_thread): New function.
5878 (remove_thread): New function.
5879 (clear_inferiors): Use for_each_inferior and free_one_thread.
5880 (find_inferior): New function.
5881 (find_inferior_id): New function.
5882 (inferior_target_data): Update argument type.
5883 (set_inferior_target_data): Likewise.
5884 (inferior_regcache_data): Likewise.
5885 (set_inferior_regcache_data): Likewise.
5886 * linux-low.c (linux_bp_reinsert): Remove.
5887 (all_processes, stopping_threads, using_thrads)
5888 (struct pending_signals, debug_threads, pid_of): New.
5889 (inferior_pid): Replace with macro.
5890 (struct inferior_linux_data): Remove.
5891 (get_stop_pc, add_process): New functions.
5892 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
5893 Use add_process and add_thread.
5894 (linux_attach_lwp): New function, based on old linux_attach. Use
5895 add_process and add_thread. Set stop_expected for new threads.
5896 (linux_attach): New function.
5897 (linux_kill_one_process): New function.
5898 (linux_kill): Kill all LWPs.
5899 (linux_thread_alive): Use find_inferior_id.
5900 (check_removed_breakpoints, status_pending_p): New functions.
5901 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
5902 Update. Use WNOHANG. Wait for cloned processes also. Update process
5903 struct for the found process.
5904 (linux_wait_for_event): New function.
5905 (linux_wait): Use it. Support LWPs.
5906 (send_sigstop, wait_for_sigstop, stop_all_processes)
5907 (linux_resume_one_process, linux_continue_one_process): New functions.
5908 (linux_resume): Support LWPs.
5909 (REGISTER_RAW_SIZE): Remove.
5910 (fetch_register): Use register_size instead. Call supply_register.
5911 (usr_store_inferior_registers): Likewise. Call collect_register.
5913 (regsets_fetch_inferior_registers): Improve error message.
5914 (regsets_store_inferior_registers): Add debugging.
5915 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
5916 (unstopped_p, linux_signal_pid): New functions.
5917 (linux_target_ops): Add linux_signal_pid.
5918 (linux_init_signals): New function.
5919 (initialize_low): Call it. Initialize using_threads.
5920 * regcache.c (inferior_regcache_data): Add valid
5922 (get_regcache): Fetch registers lazily. Add fetch argument
5923 and update all callers.
5924 (regcache_invalidate_one, regcache_invalidate): New
5926 (new_register_cache): Renamed from create_register_cache.
5927 Return the new regcache.
5928 (free_register_cache): Change argument to a void *.
5929 (registers_to_string, registers_from_string): Call get_regcache
5930 with fetch flag set.
5931 (register_data): Make static. Pass fetch flag to get_regcache.
5932 (supply_register): Call get_regcache with fetch flag clear.
5933 (collect_register): Call get_regcache with fetch flag set.
5934 (collect_register_as_string): New function.
5935 * regcache.h: Update.
5936 * remote-utils.c (putpkt): Flush after debug output and use
5938 Handle input interrupts while waiting for an ACK.
5939 (input_interrupt): Use signal_pid method.
5940 (getpkt): Flush after debug output and use stderr.
5941 (outreg): Use collect_register_as_string.
5942 (new_thread_notify, dead_thread_notify): New functions.
5943 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5945 (look_up_one_symbol): Flush after debug output.
5946 * server.c (step_thread, server_waiting): New variables.
5947 (start_inferior): Don't use signal_pid. Update call to mywait.
5948 (attach_inferior): Update call to mywait.
5949 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5950 (main): Don't fetch/store registers explicitly. Use
5951 set_desired_inferior. Support proposed ``Hs'' packet. Update
5954 (struct inferior_list, struct_inferior_list_entry): New.
5955 * target.c (set_desired_inferior): New.
5956 (write_inferior_memory): Constify.
5957 (mywait): New function.
5959 (struct target_ops): New signal_pid method.
5960 (mywait): Removed macro, added prototype.
5962 * linux-low.h (regset_func): Removed.
5963 (regset_fill_func, regset_store_func): New.
5964 (enum regset_type): New.
5965 (struct regset_info): Add type field. Use new operation types.
5966 (struct linux_target_ops): stop_pc renamed to get_pc.
5967 Add decr_pc_after_break and breakpoint_at.
5968 (get_process, get_thread_proess, get_process_thread)
5969 (strut process_info, all_processes, linux_attach_lwp)
5970 (thread_db_init): New.
5972 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5973 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5974 (the_low_target): Add new members.
5975 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5976 (i386_store_fpxregset): Constify.
5977 (target_regsets): Add new kind identifier.
5978 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5979 (i386_set_pc): Add debugging.
5980 (i386_breakpoint_at): New function.
5981 (the_low_target): Add new members.
5982 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5983 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5984 (mips_breakpoint_at): New.
5985 (the_low_target): Add new members.
5986 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5987 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5988 (the_low_target): Add new members.
5989 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5990 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5991 (the_low_target): Add new members.
5992 * linux-x86-64-low.c (target_regsets): Add new kind
5995 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
5997 From Martin Pool <mbp@samba.org>:
5998 * server.c (gdbserver_usage): New function.
6001 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
6003 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
6006 2002-05-04 Andrew Cagney <ac131313@redhat.com>
6008 * Makefile.in: Remove obsolete code.
6010 2002-04-24 Michal Ludvig <mludvig@suse.cz>
6012 * linux-low.c (regsets_fetch_inferior_registers),
6013 (regsets_store_inferior_registers): Removed cast to int from
6015 * regcache.h: Added declaration of struct inferior_info.
6017 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6019 * inferiors.c (struct inferior_info): Add regcache_data.
6020 (add_inferior): Call create_register_cache.
6021 (clear_inferiors): Call free_register_cache.
6022 (inferior_regcache_data, set_inferior_regcache_data): New functions.
6023 * regcache.c (struct inferior_regcache_data): New.
6024 (registers): Remove.
6025 (get_regcache): New function.
6026 (create_register_cache, free_register_cache): New functions.
6027 (set_register_cache): Don't initialize the register cache here.
6028 (registers_to_string, registers_from_string, register_data): Call
6030 * regcache.h: Add prototypes.
6031 * server.h: Likewise.
6033 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
6035 * mem-break.c: New file.
6036 * mem-break.h: New file.
6037 * Makefile.in: Add mem-break.o rule; update server.h
6039 * inferiors.c (struct inferior_info): Add target_data
6041 (clear_inferiors): Free target_data member if set.
6042 (inferior_target_data, set_inferior_target_data): New functions.
6043 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
6044 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
6045 * linux-low.c (linux_bp_reinsert): New variable.
6046 (struct inferior_linux_data): New.
6047 (linux_create_inferior): Use set_inferior_target_data.
6048 (linux_attach): Likewise. Call add_inferior.
6049 (linux_wait_for_one_inferior): New function.
6050 (linux_wait): Call it.
6051 (linux_write_memory): Add const.
6052 (initialize_low): Call set_breakpoint_data.
6053 * linux-low.h (struct linux_target_ops): Add breakpoint
6055 * server.c (attach_inferior): Remove extra add_inferior
6057 * server.h: Include mem-break.h. Update inferior.c
6059 * target.c (read_inferior_memory)
6060 (write_inferior_memory): New functions.
6061 * target.h (read_inferior_memory)
6062 (write_inferior_memory): Change macros to prototypes.
6063 (struct target_ops): Update comments. Add const to write_memory
6066 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
6068 * linux-low.c (usr_store_inferior_registers): Support
6069 registers which are allowed to fail to store.
6070 * linux-low.h (linux_target_ops): Likewise.
6071 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
6072 (ppc_cannot_store_register): FPSCR may not be storable.
6074 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6076 * server.h: Include <string.h> if HAVE_STRING_H.
6077 * ChangeLog: Correct paths in last ChangeLog entry.
6079 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6081 * linux-low.h: Remove obsolete prototypes.
6082 (struct linux_target_ops): New.
6083 (extern the_low_target): New.
6084 * linux-low.c (num_regs, regmap): Remove declarations.
6085 (register_addr): Use the_low_target explicitly.
6086 (fetch_register): Likewise.
6087 (usr_fetch_inferior_registers): Likewise.
6088 (usr_store_inferior_registers): Likewise.
6089 * linux-arm-low.c (num_regs): Remove.
6090 (arm_num_regs): Define.
6091 (arm_regmap): Renamed from regmap, made static.
6092 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
6094 (arm_cannot_store_register): Renamed from cannot_store_register,
6096 (the_low_target): New.
6097 * linux-i386-low.c (num_regs): Remove.
6098 (i386_num_regs): Define.
6099 (i386_regmap): Renamed from regmap, made static.
6100 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
6102 (i386_cannot_store_register): Renamed from cannot_store_register,
6104 (the_low_target): New.
6105 * linux-ia64-low.c (num_regs): Remove.
6106 (ia64_num_regs): Define.
6107 (ia64_regmap): Renamed from regmap, made static.
6108 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
6110 (ia64_cannot_store_register): Renamed from cannot_store_register,
6112 (the_low_target): New.
6113 * linux-m68k-low.c (num_regs): Remove.
6114 (m68k_num_regs): Define.
6115 (m68k_regmap): Renamed from regmap, made static.
6116 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
6118 (m68k_cannot_store_register): Renamed from cannot_store_register,
6120 (the_low_target): New.
6121 * linux-mips-low.c (num_regs): Remove.
6122 (mips_num_regs): Define.
6123 (mips_regmap): Renamed from regmap, made static.
6124 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
6126 (mips_cannot_store_register): Renamed from cannot_store_register,
6128 (the_low_target): New.
6129 * linux-ppc-low.c (num_regs): Remove.
6130 (ppc_num_regs): Define.
6131 (ppc_regmap): Renamed from regmap, made static.
6132 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
6134 (ppc_cannot_store_register): Renamed from cannot_store_register,
6136 (the_low_target): New.
6137 * linux-s390-low.c (num_regs): Remove.
6138 (s390_num_regs): Define.
6139 (s390_regmap): Renamed from regmap, made static.
6140 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
6142 (s390_cannot_store_register): Renamed from cannot_store_register,
6144 (the_low_target): New.
6145 * linux-sh-low.c (num_regs): Remove.
6146 (sh_num_regs): Define.
6147 (sh_regmap): Renamed from regmap, made static.
6148 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
6150 (sh_cannot_store_register): Renamed from cannot_store_register,
6152 (the_low_target): New.
6153 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
6154 (the_low_target): New.
6156 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6158 * Makefile.in: Add stamp-h target.
6159 * configure.in: Create stamp-h.
6160 * configure: Regenerated.
6162 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6164 * inferiors.c: New file.
6165 * target.c: New file.
6166 * target.h: New file.
6167 * Makefile.in: Add target.o and inferiors.o. Update
6169 * linux-low.c (inferior_pid): New static variable,
6170 moved from server.c.
6171 (linux_create_inferior): Renamed from create_inferior.
6172 Call add_inferior. Return 0 on success instead of a PID.
6173 (linux_attach): Renamed from myattach.
6174 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
6175 (linux_thread_alive): Renamed from mythread_alive.
6176 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
6178 (linux_resume): Renamed from myresume. Add missing ``return 0''.
6179 (regsets_store_inferior_registers): Correct error message.
6180 Add missing ``return 0''.
6181 (linux_fetch_registers): Renamed from fetch_inferior_registers.
6182 (linux_store_registers): Renamed from store_inferior_registers.
6183 (linux_read_memory): Renamed from read_inferior_memory.
6184 (linux_write_memory): Renamed from write_inferior_memory.
6185 (linux_target_ops): New structure.
6186 (initialize_low): Call set_target_ops ().
6187 * remote-utils.c (unhexify): New function.
6188 (hexify): New function.
6189 (input_interrupt): Send signals to ``signal_pid''.
6190 * server.c (inferior_pid): Remove.
6191 (start_inferior): Update create_inferior call.
6192 (attach_inferior): Call add_inferior.
6193 (handle_query): New function.
6194 (main): Call handle_query for `q' packets.
6195 * server.h: Include "target.h". Remove obsolete prototypes.
6196 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
6198 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
6200 * Makefile.in: Add WARN_CFLAGS. Update configury
6202 * configure.in: Check for <string.h>
6203 * configure: Regenerate.
6204 * config.in: Regenerate.
6205 * gdbreplay.c: Include needed system headers.
6206 (remote_open): Remove strchr prototype.
6207 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
6208 * regcache.c (supply_register): Change buf argument to const void *.
6209 (supply_register_by_name): Likewise.
6210 (collect_register): Change buf argument to void *.
6211 (collect_register_by_name): Likewise.
6212 * regcache.h: Add missing prototypes.
6213 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
6214 * server.c (handle_query): New function.
6215 (attached): New static variable, moved out of main.
6216 (main): Quiet longjmp clobber warnings.
6217 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
6218 * utils.c (error): Remove NORETURN.