1 2015-05-12 Don Breazeal <donb@codesourcery.com>
3 * mem-break.c (APPEND_TO_LIST): Define macro.
4 (clone_agent_expr): New function.
5 (clone_one_breakpoint): New function.
6 (clone_all_breakpoints): New function.
7 * mem-break.h: Declare new functions.
9 2015-05-12 Don Breazeal <donb@codesourcery.com>
11 * linux-low.c (linux_supports_fork_events): New function.
12 (linux_supports_vfork_events): New function.
13 (linux_target_ops): Initialize new structure members.
14 (initialize_low): Call linux_check_ptrace_features.
15 * lynx-low.c (lynx_target_ops): Initialize new structure
17 * server.c (report_fork_events, report_vfork_events):
19 (handle_query): Add new features to qSupported packet and
21 (captured_main): Initialize new global variables.
22 * target.h (struct target_ops) <supports_fork_events>:
24 <supports_vfork_events>: New member.
25 (target_supports_fork_events): New macro.
26 (target_supports_vfork_events): New macro.
27 * win32-low.c (win32_target_ops): Initialize new structure
30 2015-05-12 Gary Benson <gbenson@redhat.com>
32 * server.c (handle_qxfer_exec_file): Use current process
35 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
37 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
38 Remove HAVE_PTRACE_GETREGS conditionals.
39 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
40 instead of PTRACE_GETREGS and PTRACE_SETREGS.
42 2015-05-08 Yao Qi <yao.qi@linaro.org>
44 * linux-low.c (linux_supports_conditional_breakpoints): New
46 (linux_target_ops): Install new target method.
47 * lynx-low.c (lynx_target_ops): Install NULL hook for
48 supports_conditional_breakpoints.
49 * nto-low.c (nto_target_ops): Likewise.
50 * spu-low.c (spu_target_ops): Likewise.
51 * win32-low.c (win32_target_ops): Likewise.
52 * server.c (handle_query): Check
53 target_supports_conditional_breakpoints.
54 * target.h (struct target_ops) <supports_conditional_breakpoints>:
56 (target_supports_conditional_breakpoints): New macro.
58 2015-05-06 Pedro Alves <palves@redhat.com>
61 * server.c (start_inferior): If the process exits, mourn it.
63 2015-04-21 Gary Benson <gbenson@redhat.com>
65 * hostio.c (fileio_open_flags_to_host): Factored out to
66 fileio_to_host_openflags in common/fileio.c. Single use
69 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
71 * linux-xtensa-low.c (xtensa_fill_gregset)
72 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
75 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
77 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
78 (regs_info): Replace usrregs pointer with NULL.
80 2015-04-17 Gary Benson <gbenson@redhat.com>
82 * target.h (struct target_ops) <pid_to_exec_file>: New field.
83 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
84 * server.c (handle_qxfer_exec_file): New function.
85 (qxfer_packets): Add exec-file entry.
86 (handle_query): Report qXfer:exec-file:read as supported packet.
88 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
90 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
92 2015-04-09 Gary Benson <gbenson@redhat.com>
94 * hostio-errno.c (errno_to_fileio_error): Remove function.
95 Update caller to use remote_fileio_to_fio_error.
97 2015-04-09 Yao Qi <yao.qi@linaro.org>
99 * linux-low.c (linux_insert_point): Call
100 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
101 (linux_remove_point): Call remove_memory_breakpoint if type is
103 * linux-x86-low.c (x86_insert_point): Don't call
104 insert_memory_breakpoint.
105 (x86_remove_point): Don't call remove_memory_breakpoint.
107 2015-04-01 Pedro Alves <palves@redhat.com>
108 Cleber Rosa <crosa@redhat.com>
110 * server.c (gdbserver_usage): Reorganize and extend the usage
113 2015-03-24 Pedro Alves <palves@redhat.com>
115 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
116 output. Also dump TRAP_TRACE.
117 (linux_low_filter_event): In debug output, distinguish a
118 resume_stop SIGSTOP from a delayed SIGSTOP.
120 2015-03-24 Gary Benson <gbenson@redhat.com>
122 * linux-x86-low.c (x86_linux_new_thread): Moved to
124 (x86_linux_prepare_to_resume): Likewise.
126 2015-03-24 Gary Benson <gbenson@redhat.com>
128 * Makefile.in (x86-linux-dregs.o): New rule.
129 * configure.srv: Add x86-linux-dregs.o to relevant targets.
130 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
131 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
132 (x86_linux_dr_get): Likewise.
133 (x86_linux_dr_set): Likewise.
134 (update_debug_registers_callback): Likewise.
135 (x86_linux_dr_set_addr): Likewise.
136 (x86_linux_dr_get_addr): Likewise.
137 (x86_linux_dr_set_control): Likewise.
138 (x86_linux_dr_get_control): Likewise.
139 (x86_linux_dr_get_status): Likewise.
140 (x86_linux_update_debug_registers): Likewise.
142 2015-03-24 Gary Benson <gbenson@redhat.com>
144 * linux-x86-low.c (x86_linux_update_debug_registers):
145 New function, factored out from...
146 (x86_linux_prepare_to_resume): ...this.
148 2015-03-24 Gary Benson <gbenson@redhat.com>
150 * linux-x86-low.c (x86_linux_dr_get): Update comments.
151 (x86_linux_dr_set): Likewise.
152 (update_debug_registers_callback): Likewise.
153 (x86_linux_dr_set_addr): Likewise.
154 (x86_linux_dr_get_addr): Likewise.
155 (x86_linux_dr_set_control): Likewise.
156 (x86_linux_dr_get_control): Likewise.
157 (x86_linux_dr_get_status): Likewise.
158 (x86_linux_prepare_to_resume): Likewise.
160 2015-03-24 Gary Benson <gbenson@redhat.com>
162 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
163 Use perror_with_name. Pass string through gettext.
164 (x86_linux_dr_set): Likewise.
166 2015-03-24 Gary Benson <gbenson@redhat.com>
168 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
169 (x86_linux_dr_set_addr): ...this.
170 (x86_dr_low_get_addr): Rename to...
171 (x86_linux_dr_get_addr): ...this.
172 (x86_dr_low_set_control): Rename to...
173 (x86_linux_dr_set_control): ...this.
174 (x86_dr_low_get_control): Rename to...
175 (x86_linux_dr_get_control): ...this.
176 (x86_dr_low_get_status): Rename to...
177 (x86_linux_dr_get_status): ...this.
178 (x86_dr_low): Update with new function names.
180 2015-03-24 Gary Benson <gbenson@redhat.com>
182 * Makefile.in (x86-linux.o): New rule.
183 * configure.srv: Add x86-linux.o to relevant targets.
184 * linux-low.c (lwp_set_arch_private_info): New function.
185 (lwp_arch_private_info): Likewise.
186 * linux-x86-low.c: Include nat/x86-linux.h.
187 (arch_lwp_info): Removed structure.
188 (update_debug_registers_callback):
189 Use lwp_set_debug_registers_changed.
190 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
191 and lwp_set_debug_registers_changed.
192 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
194 2015-03-24 Gary Benson <gbenson@redhat.com>
196 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
197 * linux-arm-low.c (arm_new_thread): Likewise.
198 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
199 * linux-mips-low.c (mips_linux_new_thread): Likewise.
200 * linux-x86-low.c (x86_linux_new_thread): Likewise.
201 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
203 2015-03-24 Gary Benson <gbenson@redhat.com>
205 * linux-low.c (ptid_of_lwp): New function.
206 (lwp_is_stopped): Likewise.
207 (lwp_stop_reason): Likewise.
208 * linux-x86-low.c (update_debug_registers_callback):
210 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
213 2015-03-24 Gary Benson <gbenson@redhat.com>
215 * linux-low.h (linux_stop_lwp): Remove declaration.
217 2015-03-24 Gary Benson <gbenson@redhat.com>
219 * linux-low.h: Include nat/linux-nat.h.
220 * linux-low.c (iterate_over_lwps_args): New structure.
221 (iterate_over_lwps_filter): New function.
222 (iterate_over_lwps): Likewise.
223 * linux-x86-low.c (update_debug_registers_callback):
224 Update signature to what iterate_over_lwps expects.
225 Remove PID check that iterate_over_lwps now performs.
226 (x86_dr_low_set_addr): Use iterate_over_lwps.
227 (x86_dr_low_set_control): Likewise.
229 2015-03-24 Gary Benson <gbenson@redhat.com>
231 * linux-x86-low.c (x86_debug_reg_state): New function.
232 (x86_linux_prepare_to_resume): Use the above.
234 2015-03-24 Gary Benson <gbenson@redhat.com>
236 * linux-low.c (current_lwp_ptid): New function.
237 * linux-x86-low.c: Include nat/linux-nat.h.
238 (x86_dr_low_get_addr): Use current_lwp_ptid.
239 (x86_dr_low_get_control): Likewise.
240 (x86_dr_low_get_status): Likewise.
242 2015-03-20 Pedro Alves <palves@redhat.com>
244 * tracepoint.c (cmd_qtstatus): Make "str" const.
246 2015-03-20 Pedro Alves <palves@redhat.com>
248 * server.c (handle_general_set): Make "req_str" const.
250 2015-03-19 Pedro Alves <palves@redhat.com>
252 * linux-low.c (linux_resume_one_lwp): Rename to ...
253 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
254 instead call perror_with_name.
255 (check_ptrace_stopped_lwp_gone): New function.
256 (linux_resume_one_lwp): Reimplement as wrapper around
257 linux_resume_one_lwp_throw that swallows errors if the LWP is
260 2015-03-19 Pedro Alves <palves@redhat.com>
262 * linux-low.c (count_events_callback, select_event_lwp_callback):
263 No longer check whether the thread has resume_stop as last resume
266 2015-03-19 Pedro Alves <palves@redhat.com>
268 * linux-low.c (count_events_callback, select_event_lwp_callback):
269 Use the lwp's status_pending_p field, not the thread's.
271 2015-03-19 Pedro Alves <palves@redhat.com>
273 * linux-low.c (select_event_lwp_callback): Update comments to
274 no longer mention SIGTRAP.
276 2015-03-18 Gary Benson <gbenson@redhat.com>
278 * server.c (handle_query): Do not report vFile:fstat as supported.
280 2015-03-11 Gary Benson <gbenson@redhat.com>
282 * hostio.c (sys/types.h): New include.
283 (sys/stat.h): Likewise.
284 (common-remote-fileio.h): Likewise.
285 (handle_fstat): New function.
286 (handle_vFile): Handle vFile:fstat packets.
288 2015-03-11 Gary Benson <gbenson@redhat.com>
290 * configure.ac (AC_CHECK_MEMBERS): Add checks for
291 struct stat.st_blocks and struct stat.st_blksize.
292 * configure: Regenerate.
293 * config.in: Likewise.
294 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
295 (OBS): Add common-remote-fileio.o.
296 (common-remote-fileio.o): New rule.
298 2015-03-09 Pedro Alves <palves@redhat.com>
300 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
301 'struct sockaddr' pointer in 'accept' call.
303 2015-03-09 Pedro Alves <palves@redhat.com>
306 2015-03-07 Pedro Alves <palves@redhat.com>
307 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
308 or <winsock2.h> here. Instead include "gdb_socket.h".
309 (remote_open): Use union gdb_sockaddr_u.
310 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
311 or <winsock2.h> here. Instead include "gdb_socket.h".
312 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
313 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
315 (init_named_socket, gdb_agent_helper_thread): Use union
318 2015-03-07 Pedro Alves <palves@redhat.com>
320 * configure.ac (build_warnings): Move
321 -Wdeclaration-after-statement to the C-specific set.
322 * configure: Regenerate.
324 2015-03-07 Pedro Alves <palves@redhat.com>
326 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
327 or <winsock2.h> here. Instead include "gdb_socket.h".
328 (remote_open): Use union gdb_sockaddr_u.
329 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
330 or <winsock2.h> here. Instead include "gdb_socket.h".
331 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
332 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
334 (init_named_socket, gdb_agent_helper_thread): Use union
337 2015-03-07 Pedro Alves <palves@redhat.com>
339 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
342 2015-03-06 Yao Qi <yao.qi@linaro.org>
344 * linux-aarch64-low.c (aarch64_insert_point): Use
345 show_debug_regs as a boolean.
346 (aarch64_remove_point): Likewise.
348 2015-03-05 Pedro Alves <palves@redhat.com>
350 * lynx-low.c (lynx_target_ops): Install NULL hooks for
351 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
352 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
353 * nto-low.c (nto_target_ops): Likewise.
354 * spu-low.c (spu_target_ops): Likewise.
355 * win32-low.c (win32_target_ops): Likewise.
357 2015-03-04 Pedro Alves <palves@redhat.com>
359 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
360 Decide whether a breakpoint triggered based on the SIGTRAP's
362 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
363 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
364 (linux_low_filter_event): Check for breakpoints before checking
366 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
368 (linux_stopped_by_sw_breakpoint)
369 (linux_supports_stopped_by_sw_breakpoint)
370 (linux_stopped_by_hw_breakpoint)
371 (linux_supports_stopped_by_hw_breakpoint): New functions.
372 (linux_target_ops): Install new target methods.
374 2015-03-04 Pedro Alves <palves@redhat.com>
376 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
377 * server.c (swbreak_feature, hwbreak_feature): New globals.
378 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
379 (captured_main): Clear swbreak_feature and hwbreak_feature.
380 * server.h (swbreak_feature, hwbreak_feature): Declare.
381 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
382 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
383 supports_stopped_by_hw_breakpoint>: New fields.
384 (target_supports_stopped_by_sw_breakpoint)
385 (target_stopped_by_sw_breakpoint)
386 (target_supports_stopped_by_hw_breakpoint)
387 (target_stopped_by_hw_breakpoint): Declare.
389 2015-03-04 Pedro Alves <palves@redhat.com>
391 enum lwp_stop_reason -> enum target_stop_reason
392 * linux-low.c (check_stopped_by_breakpoint): Adjust.
393 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
394 (linux_wait_1, stuck_in_jump_pad_callback)
395 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
396 (linux_stopped_by_watchpoint):
397 * linux-low.h (enum lwp_stop_reason): Delete.
398 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
399 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
401 2015-03-04 Yao Qi <yao.qi@linaro.org>
403 * Makefile.in (SFILES): Add linux-aarch64-low.c.
405 2015-03-03 Gary Benson <gbenson@redhat.com>
407 * hostio.c (handle_vFile): Fix prefix lengths.
409 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
411 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
414 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
416 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
417 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
418 (clean): Add "rm -f" for above C files.
419 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
420 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
421 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
422 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
423 * linux-s390-low.c (HWCAP_S390_VX): New macro.
424 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
425 (init_registers_s390x_vx_linux64)
426 (init_registers_s390x_tevx_linux64)
427 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
428 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
430 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
431 (s390_store_vxrs_high): New functions.
432 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
434 (s390_arch_setup): Add logic for selecting one of the new target
435 descriptions. Activate the new vector regsets if applicable.
436 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
437 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
438 and init_registers_s390x_tevx_linux64.
440 2015-03-01 Pedro Alves <palves@redhat.com>
442 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
445 2015-02-27 Pedro Alves <palves@redhat.com>
447 * linux-x86-low.c (u_debugreg_offset): New function.
448 (x86_linux_dr_get, x86_linux_dr_set): Use it.
450 2015-02-27 Pedro Alves <palves@redhat.com>
452 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
453 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
454 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
455 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
456 (ps_lsetfpregs, ps_getpid)
457 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
458 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
459 (ps_lsetxregs, ps_plog): Declare.
461 2015-02-27 Pedro Alves <palves@redhat.com>
463 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
464 IP_AGENT_EXPORT_FUNC.
465 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
466 IP_AGENT_EXPORT_FUNC.
467 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
468 (IP_AGENT_EXPORT): Delete.
469 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
470 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
471 (gdb_trampoline_buffer_error, collecting, gdb_collect)
472 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
473 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
474 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
475 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
476 (traceframe_read_count, traceframe_write_count)
477 (traceframes_created, trace_state_variables, get_raw_reg)
478 (get_trace_state_variable_value, set_trace_state_variable_value)
479 (ust_loaded, helper_thread_id, cmd_buf): Use
480 IPA_SYM_EXPORTED_NAME.
481 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
482 (tracepoints) Use IP_AGENT_EXPORT_VAR.
483 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
484 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
485 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
486 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
487 EXTERN_C_PUSH/EXTERN_C_POP.
488 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
489 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
490 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
491 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
492 (traceframe_write_count, traceframe_read_count)
493 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
494 (about_to_request_buffer_space, get_trace_state_variable_value)
495 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
496 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
497 EXTERN_C_PUSH/EXTERN_C_POP.
498 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
499 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
500 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
501 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
502 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
503 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
504 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
505 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
507 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
508 (IP_AGENT_EXPORT_VAR_DECL): Define.
510 (gdb_agent_get_raw_reg): Declare.
512 2015-02-27 Tom Tromey <tromey@redhat.com>
513 Pedro Alves <palves@redhat.com>
515 Rename symbols whose names are reserved C++ keywords throughout.
517 2015-02-27 Pedro Alves <palves@redhat.com>
519 * Makefile.in (COMPILER): New, get it from autoconf.
520 (CXX): Get from autoconf instead.
521 (COMPILE.pre): Use COMPILER.
522 (CC-LD): Rename to ...
523 (CC_LD): ... this. Use COMPILER.
524 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
525 (CXX_FOR_TARGET): Default to g++ instead of gcc.
526 * acinclude.m4: Include build-with-cxx.m4.
527 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
528 Disable -Werror by default if building in C++ mode.
529 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
530 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
531 the C++ compiler. Save/restore CXXFLAGS too.
532 * configure: Regenerate.
534 2015-02-27 Pedro Alves <palves@redhat.com>
536 * acinclude.m4: Include libiberty.m4.
537 * configure.ac: Call libiberty_INIT.
538 * config.in, configure: Regenerate.
540 2015-02-26 Pedro Alves <palves@redhat.com>
542 * linux-low.c (linux_wait_1): When incrementing the PC past a
543 program breakpoint always use the_low_target.breakpoint_len as
544 increment, rather than the maximum between that and
545 the_low_target.decr_pc_after_break.
547 2015-02-23 Pedro Alves <palves@redhat.com>
549 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
550 thread was doing a step-over; always adjust the PC if
551 we stepped over a permanent breakpoint.
552 (linux_wait_1): If we stepped over breakpoint that was on top of a
553 permanent breakpoint, manually advance the PC past it.
555 2015-02-23 Pedro Alves <palves@redhat.com>
557 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
559 (x86_fill_gregset, x86_store_gregset): Use it when handling
562 2015-02-20 Pedro Alves <palves@redhat.com>
564 * thread-db.c: Include "nat/linux-procfs.h".
565 (thread_db_init): Skip listing new threads if the kernel supports
566 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
568 2015-02-20 Pedro Alves <palves@redhat.com>
570 * linux-low.c (status_pending_p_callback): Use ptid_match.
572 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
575 * linux-low.c (wstatus_maybe_breakpoint): Remove.
576 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
577 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
579 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
582 * tracepoint.c (cmd_qtinit): Add check for current_thread.
584 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
586 * linux-low.c (linux_low_btrace_conf): Print size.
587 * server.c (handle_btrace_conf_general_set): New.
588 (hanle_general_set): Call handle_btrace_conf_general_set.
589 (handle_query): Report Qbtrace-conf:bts:size as supported.
591 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
593 * linux-low.c (linux_low_enable_btrace): Update parameters.
594 (linux_low_btrace_conf): New.
595 (linux_target_ops)<to_btrace_conf>: Initialize.
596 * server.c (current_btrace_conf): New.
597 (handle_btrace_enable): Rename to ...
598 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
599 to target_enable_btrace. Update comment. Update users.
600 (handle_qxfer_btrace_conf): New.
601 (qxfer_packets): Add btrace-conf entry.
602 (handle_query): Report qXfer:btrace-conf:read as supported packet.
603 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
604 (target_ops)<read_btrace_conf>: New.
605 (target_enable_btrace): Update parameters.
606 (target_read_btrace_conf): New.
608 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
610 * server.c (handle_btrace_general_set): Remove call to
611 target_supports_btrace.
612 (supported_btrace_packets): New.
613 (handle_query): Call supported_btrace_packets.
614 * target.h: include btrace-common.h.
615 (btrace_target_info): Removed.
616 (supports_btrace, target_supports_btrace): Update parameters.
618 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
620 * Makefile.in (SFILES): Add common/btrace-common.c.
621 (OBS): Add common/btrace-common.o.
622 (btrace-common.o): Add build rules.
623 * linux-low: Include btrace-common.h.
624 (linux_low_read_btrace): Use struct btrace_data. Call
625 btrace_data_init and btrace_data_fini.
627 2015-02-06 Pedro Alves <palves@redhat.com>
629 * thread-db.c (find_new_threads_callback): Add debug output.
631 2015-02-04 Pedro Alves <palves@redhat.com>
633 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
634 (resume_stopped_resumed_lwps): New function.
635 (linux_wait_for_event_filtered): Use it.
637 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
639 * Makefile.in (SFILES): Add linux-personality.c.
640 (linux-personality.o): New rule.
641 * configure.srv (srv_linux_obj): Add linux-personality.o to the
642 list of objects to be built.
643 * linux-low.c: Include nat/linux-personality.h.
644 (linux_create_inferior): Remove code to disable address space
645 randomization (moved to ../nat/linux-personality.c). Create
646 cleanup to disable address space randomization.
648 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
650 * Makefile.in (posix-strerror.o): New rule.
651 (mingw-strerror.o): Likewise.
652 * configure: Regenerated.
653 * configure.ac: Source file ../common/common.host. Initialize new
654 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
656 2015-01-14 Yao Qi <yao@codesourcery.com>
658 * Makefile.in (SFILES): Add nat/ppc-linux.c.
659 (ppc-linux.o): New rule.
660 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
661 * configure.ac: AC_CHECK_FUNCS(getauxval).
662 * config.in: Re-generated.
663 * configure: Re-generated.
664 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
665 ppc64_64bit_inferior_p
667 2015-01-14 Yao Qi <yao@codesourcery.com>
669 * linux-ppc-low.c: Include "nat/ppc-linux.h".
670 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
671 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
672 (PT_ORIG_R3, PT_TRAP): Likewise.
673 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
674 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
675 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
677 2015-01-10 Joel Brobecker <brobecker@adacore.com>
679 * i387-fp.c (i387_cache_to_xsave): In look over
680 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
681 zmmh_low_space field by use of zmmh_high_space.
683 2015-01-09 Pedro Alves <palves@redhat.com>
685 * linux-low.c (step_over_bkpt): Move higher up in the file.
686 (handle_extended_wait): Don't store the stop_pc here.
687 (get_stop_pc): Adjust comments and rename to ...
688 (check_stopped_by_breakpoint): ... this. Record whether the LWP
689 stopped for a software breakpoint or hardware breakpoint.
690 (thread_still_has_status_pending_p): New function.
691 (status_pending_p_callback): Use
692 thread_still_has_status_pending_p. If the event is no longer
693 interesting, resume the LWP.
694 (handle_tracepoints): Add assert.
695 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
696 (wstatus_maybe_breakpoint): New function.
697 (cancel_breakpoint): Delete function.
698 (check_stopped_by_watchpoint): New function, factored out from
699 linux_low_filter_event.
700 (lp_status_maybe_breakpoint): Delete function.
701 (linux_low_filter_event): Remove filter_ptid argument.
702 Leave thread group exits pending here. Store the LWP's stop PC.
703 Always leave events pending.
704 (linux_wait_for_event_filtered): Pull all events out of the
705 kernel, and leave them all pending.
706 (count_events_callback, select_event_lwp_callback): Consider all
708 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
709 (select_event_lwp): Only give preference to the stepping LWP in
710 all-stop mode. Adjust comments.
711 (ignore_event): New function.
712 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
713 references to cancel_breakpoints. Adjust to renames. Also give
714 equal priority to all LWPs that have had events in non-stop mode.
715 If reporting a software breakpoint event, unadjust the LWP's PC.
716 (linux_wait): If linux_wait_1 returned an ignored event, retry.
717 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
719 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
720 (resume_status_pending_p): Use thread_still_has_status_pending_p.
721 (linux_stopped_by_watchpoint): Adjust.
722 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
723 * linux-low.h (enum lwp_stop_reason): New.
724 (struct lwp_info) <stop_pc>: Adjust comment.
725 <stopped_by_watchpoint>: Delete field.
726 <stop_reason>: New field.
727 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
728 * mem-break.c (software_breakpoint_inserted_here)
729 (hardware_breakpoint_inserted_here): New function.
730 * mem-break.h (software_breakpoint_inserted_here)
731 (hardware_breakpoint_inserted_here): Declare.
732 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
733 (cancel_breakpoints): Delete.
734 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
735 (upload_fast_traceframes): Remove references to
738 2015-01-09 Pedro Alves <palves@redhat.com>
740 * thread-db.c (find_new_threads_callback): Ignore thread if the
741 kernel thread ID is -1.
743 2015-01-09 Pedro Alves <palves@redhat.com>
745 * linux-low.c (linux_attach_fail_reason_string): Move to
746 nat/linux-ptrace.c, and rename.
747 (linux_attach_lwp): Update comment.
748 (attach_proc_task_lwp_callback): New function.
749 (linux_attach): Adjust to rename and use
750 linux_proc_attach_tgid_threads.
751 (linux_attach_fail_reason_string): Delete declaration.
753 2015-01-01 Joel Brobecker <brobecker@adacore.com>
755 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
756 * server.c (gdbserver_version): Likewise.
758 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
760 * remote-utils.c: Include ctype.h.
761 (input_interrupt): Explicitly handle the case when the char
762 received is the NUL byte. Improve the printing of non-ASCII
765 2014-12-16 Joel Brobecker <brobecker@adacore.com>
767 * linux-low.c (linux_low_filter_event): Update call to
768 linux_enable_event_reporting following the addition of
769 a new parameter to that function.
771 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
774 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
775 (AARCH64_FPCR_REGNO): Likewise.
776 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
777 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
778 (aarch64_store_fpregset): Likewise.
780 2014-12-15 Joel Brobecker <brobecker@adacore.com>
782 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
783 Remove FIXME comment about assumption about N.
785 2014-12-13 Joel Brobecker <brobecker@adacore.com>
787 * configure.ac: If large-file support is disabled in GDBserver,
788 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
789 * configure: Regenerate.
791 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
793 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
794 warning upon ENODATA from ptrace.
795 * linux-s390-low.c (s390_store_tdb): New.
796 (s390_regsets): Add regset for NT_S390_TDB.
798 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
800 * linux-low.c (regsets_store_inferior_registers): Skip regsets
801 without a fill_function.
802 * linux-s390-low.c (s390_fill_last_break): Remove.
803 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
804 (s390_arch_setup): Use regset's size instead of fill_function for
807 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
809 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
810 the regset's store function when ptrace returned an error.
811 * regcache.c (get_thread_regcache): Invalidate register cache
812 before fetching inferior's registers.
814 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
816 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
817 while-loop as for-loop.
818 (regsets_store_inferior_registers): Likewise.
820 2014-11-28 Yao Qi <yao@codesourcery.com>
822 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
823 * config.in, configure: Re-generate.
824 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
827 2014-11-21 Yao Qi <yao@codesourcery.com>
829 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
830 (AC_CHECK_HEADERS): Remove malloc.h.
831 * configure: Re-generated.
832 * config.in: Re-generated.
833 * server.h: Don't include alloca.h and malloc.h.
834 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
835 Don't include malloc.h.
837 2014-11-17 Joel Brobecker <brobecker@adacore.com>
839 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
840 corresponding ERRNO check in same block.
842 2014-11-12 Pedro Alves <palves@redhat.com>
844 * server.c (cont_thread): Update comment.
845 (start_inferior, attach_inferior): No longer clear cont_thread.
846 (handle_v_cont): No longer set cont_thread.
847 (captured_main): Clear cont_thread each time a GDB connects.
849 2014-11-12 Pedro Alves <palves@redhat.com>
851 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
852 thread, and don't resume all threads if the Hc thread has exited.
854 2014-11-12 Pedro Alves <palves@redhat.com>
856 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
857 the process group instead of to a specific LWP.
859 2014-10-15 Pedro Alves <palves@redhat.com>
862 * win32-arm-low.c (arm_set_thread_context): Remove current_event
864 (arm_set_thread_context): Delete.
865 (the_low_target): Adjust.
866 * win32-i386-low.c (debug_registers_changed)
867 (debug_registers_used): Delete.
868 (update_debug_registers_callback): New function.
869 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
870 needing to update their debug registers.
871 (win32_get_current_dr): New function.
872 (x86_dr_low_get_addr, x86_dr_low_get_control)
873 (x86_dr_low_get_status): Fetch the debug register from the thread
875 (i386_initial_stuff): Adjust.
876 (i386_get_thread_context): Remove current_event parameter. Don't
877 clear debug_registers_changed nor copy DR values to
879 (i386_set_thread_context): Delete.
880 (i386_prepare_to_resume): New function.
881 (i386_thread_added): Mark the thread as needing to update irs
883 (the_low_target): Remove i386_set_thread_context and install
884 i386_prepare_to_resume.
885 * win32-low.c (win32_get_thread_context): Adjust.
886 (win32_set_thread_context): Use SetThreadContext
888 (win32_prepare_to_resume): New function.
889 (win32_require_context): New function, factored out from ...
890 (thread_rec): ... this.
891 (continue_one_thread): Call win32_prepare_to_resume on each thread
892 we're about to continue.
893 (win32_resume): Call win32_prepare_to_resume on the event thread.
894 * win32-low.h (struct win32_thread_info)
895 <debug_registers_changed>: New field.
896 (struct win32_target_ops): Change prototype of set_thread_context,
897 delete set_thread_context and add prepare_to_resume.
898 (win32_require_context): New declaration.
900 2014-10-08 Gary Benson <gbenson@redhat.com>
902 * server.h: Do not include common-exceptions.h.
904 2014-10-08 Gary Benson <gbenson@redhat.com>
906 * server.h: Do not include cleanups.h.
908 2014-09-30 James Hogan <james.hogan@imgtec.com>
910 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
913 2014-09-23 Yao Qi <yao@codesourcery.com>
915 * linux-low.c (lp_status_maybe_breakpoint): New function.
916 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
917 (count_events_callback): Likewise.
918 (select_event_lwp_callback): Likewise.
919 (cancel_breakpoints_callback): Likewise.
921 2014-09-19 Don Breazeal <donb@codesourcery.com>
923 * linux-low.c (handle_extended_wait): Call
924 linux_ptrace_get_extended_event.
925 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
926 linux_is_extended_waitstatus.
928 2014-09-16 Joel Brobecker <brobecker@adacore.com>
930 * Makefile.in (CPPFLAGS): Define.
931 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
932 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
934 2014-09-16 Gary Benson <gbenson@redhat.com>
936 * inferiors.h (current_inferior): Renamed as...
937 (current_thread): New variable. All uses updated.
938 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
939 (maybe_move_out_of_jump_pad): Likewise.
940 (cancel_breakpoint): Likewise.
941 (linux_low_filter_event): Likewise.
942 (wait_for_sigstop): Likewise.
943 (linux_resume_one_lwp): Likewise.
944 (need_step_over_p): Likewise.
945 (start_step_over): Likewise.
946 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
947 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
948 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
949 and save_inferior as saved_thread.
950 * regcache.c (get_thread_regcache): Renamed saved_inferior as
952 (regcache_invalidate_thread): Likewise.
953 * remote-utils.c (prepare_resume_reply): Likewise.
954 * thread-db.c (thread_db_get_tls_address): Likewise.
955 (disable_thread_event_reporting): Likewise.
956 (remove_thread_event_breakpoints): Likewise.
957 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
959 * target.h (set_desired_inferior): Renamed as...
960 (set_desired_thread): New declaration. All uses updated.
961 * server.c (myresume): Updated comment to reference thread instead
963 (handle_serial_event): Likewise.
964 (handle_target_event): Likewise.
966 2014-09-12 Tom Tromey <tromey@redhat.com>
967 Gary Benson <gbenson@redhat.com>
969 * regcache.h: Include common-regcache.h.
970 (regcache_read_pc): Don't declare.
971 * regcache.c (get_thread_regcache_for_ptid): New function.
973 2014-09-11 Tom Tromey <tromey@redhat.com>
974 Gary Benson <gbenson@redhat.com>
976 * symbol.c: New file.
977 * Makefile.in (SFILES): Add symbol.c.
980 2014-09-11 Gary Benson <gbenson@redhat.com>
982 * target.c (target_stop_ptid, target_continue_ptid): New
985 2014-09-11 Tom Tromey <tromey@redhat.com>
986 Gary Benson <gbenson@redhat.com>
988 * target.h: Include target/target.h.
989 * target.c (target_read_memory, target_read_uint32)
990 (target_write_memory): New functions.
992 2014-09-11 Gary Benson <gbenson@redhat.com>
994 * server.h (debug_hw_points): Don't declare.
995 * server.c (debug_hw_points): Don't define. Replace all uses
996 with show_debug_regs.
997 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
998 all uses with show_debug_regs.
1000 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1002 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1003 endianness into account.
1004 (ppc_supply_ptrace_register): Likewise.
1006 2014-09-03 James Hogan <james.hogan@imgtec.com>
1008 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1009 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1011 2014-09-03 Gary Benson <gbenson@redhat.com>
1013 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1014 ALL_DEBUG_ADDRESS_REGISTERS.
1016 2014-09-02 Gary Benson <gbenson@redhat.com>
1018 * i386-low.h: Renamed as...
1019 * x86-low.h: New file. All type, function and variable name
1020 prefixes changed from "i386_" to "x86_". All references updated.
1021 * i386-low.c: Renamed as...
1022 * x86-low.c: New file. All type, function and variable name
1023 prefixes changed from "i386_" to "x86_". All references updated.
1025 2014-09-02 Gary Benson <gbenson@redhat.com>
1027 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1028 (x86_linux_new_thread): Likewise.
1030 2014-08-29 Gary Benson <gbenson@redhat.com>
1032 * server.h (setjmp.h): Do not include.
1033 (toplevel): Do not declare.
1034 (common-exceptions.h): Include.
1035 (cleanups.h): Likewise.
1036 * server.c (toplevel): Do not define.
1037 (exit_code): New static global.
1038 (detach_or_kill_for_exit_cleanup): New function.
1039 (main): New function. Original main renamed to...
1040 (captured_main): New function.
1041 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1043 2014-08-29 Gary Benson <gbenson@redhat.com>
1045 * Makefile.in (SFILES): Add common/common-exceptions.c.
1046 (OBS): Add common-exceptions.o.
1047 (common-exceptions.o): New rule.
1048 * utils.c (prepare_to_throw_exception): New function.
1050 2014-08-29 Gary Benson <gbenson@redhat.com>
1052 * config.in: Regenerate.
1053 * configure: Likewise.
1055 2014-08-29 Gary Benson <gbenson@redhat.com>
1057 * Makefile.in (SFILES): Add common/cleanups.c.
1059 (cleanups.o): New rule.
1061 2014-08-29 Gary Benson <gbenson@redhat.com>
1063 * utils.c (internal_vwarning): New function.
1065 2014-08-28 Gary Benson <gbenson@redhat.com>
1067 * utils.h (fatal): Remove declaration.
1068 * utils.c (fatal): Remove function.
1070 2014-08-28 Gary Benson <gbenson@redhat.com>
1072 * tracepoint.c (gdb_agent_init): Replace fatal with
1074 (initialize_tracepoint): Likewise.
1076 2014-08-28 Gary Benson <gbenson@redhat.com>
1078 * remote-utils.c (remote_prepare): Replace fatal with error.
1080 2014-08-28 Gary Benson <gbenson@redhat.com>
1082 * linux-low.c (linux_async): Replace fatal with warning.
1084 (linux_start_non_stop): Return -1 if linux_async failed.
1086 2014-08-28 Gary Benson <gbenson@redhat.com>
1088 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1090 (i386_dr_low_get_addr): Remove vague comment.
1091 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1094 2014-08-28 Gary Benson <gbenson@redhat.com>
1096 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1097 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1099 (linux_resume_one_lwp): Likewise.
1100 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1102 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1103 with internal_error.
1104 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1105 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1106 (find_register_by_name): Replace fatal with internal_error.
1107 (find_regno): Likewise.
1108 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1109 * thread-db.c (thread_db_create_event): Likewise.
1110 (thread_db_load_search): Likewise.
1111 (try_thread_db_load_1): Likewise.
1112 * tracepoint.c (get_jump_space_head): Replace fatal with
1114 (claim_trampoline_space): Likewise.
1115 (have_fast_tracepoint_trampoline_buffer): Likewise.
1116 (cmd_qtstart): Likewise.
1117 (stop_tracing): Likewise.
1118 (fast_tracepoint_collecting): Likewise.
1119 (target_malloc): Likewise.
1120 (download_tracepoint): Likewise.
1121 (download_trace_state_variables): Replace check with gdb_assert.
1122 (upload_fast_traceframes): Replace fatal with internal_error.
1124 2014-08-19 Tom Tromey <tromey@redhat.com>
1125 Gary Benson <gbenson@redhat.com>
1127 * Makefile.in (SFILES): Add common/common-debug.c.
1128 (OBS): Add common-debug.o.
1129 (common-debug.o): New rule.
1130 * debug.h (debug_printf): Don't declare.
1131 * debug.c (debug_printf): Renamed and rewritten as...
1132 (debug_vprintf): New function.
1134 2014-08-19 Gary Benson <gbenson@redhat.com>
1136 * utils.h: Do not include print-utils.h.
1138 2014-08-19 Tom Tromey <tromey@redhat.com>
1139 Gary Benson <gbenson@redhat.com>
1141 * server.h: Add static assertion.
1142 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1144 2014-08-19 Tom Tromey <tromey@redhat.com>
1145 Gary Benson <gbenson@redhat.com>
1147 * Makefile.in (SFILES): Add common/errors.c.
1148 (OBS): Add errors.o.
1149 (IPA_OBS): Add errors-ipa.o.
1150 (errors.o): New rule.
1151 (errors-ipa.o): Likewise.
1152 * utils.h (perror_with_name, error, warning): Don't declare.
1153 * utils.c (warning): Renamed and rewritten as...
1154 (vwarning): New function.
1155 (error): Renamed and rewritten as...
1156 (verror): New function.
1157 (internal_error): Renamed and rewritten as...
1158 (internal_verror): New function.
1160 2014-08-07 Gary Benson <gbenson@redhat.com>
1162 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1163 * configure: Regenerate.
1164 * config.in: Likewise.
1165 * server.h: Do not include errno.h.
1166 * event-loop.c: Likewise.
1167 * hostio-errno.c: Likewise.
1168 * linux-low.c: Likewise.
1169 * remote-utils.c: Likewise.
1170 * spu-low.c: Likewise.
1171 * utils.c: Likewise.
1172 * gdbreplay.c: Unconditionally include errno.h.
1174 2014-08-07 Gary Benson <gbenson@redhat.com>
1176 * server.h: Do not include string.h.
1177 * event-loop.c: Likewise.
1178 * linux-low.c: Likewise.
1179 * regcache.c: Likewise.
1180 * remote-utils.c: Likewise.
1181 * spu-low.c: Likewise.
1182 * utils.c: Likewise.
1184 2014-08-07 Gary Benson <gbenson@redhat.com>
1186 * server.h: Do not include gdb_assert.h.
1188 2014-08-07 Gary Benson <gbenson@redhat.com>
1190 * server.h: Do not include common-utils.h.
1192 2014-08-07 Gary Benson <gbenson@redhat.com>
1194 * server.h: Do not include ptid.h.
1195 * notif.h: Likewise.
1197 2014-08-07 Gary Benson <gbenson@redhat.com>
1199 * server.h: Do not include gdb_locale.h.
1201 2014-08-07 Gary Benson <gbenson@redhat.com>
1203 * server.h: Do not include gdb/signals.h.
1204 * win32-low.c: Likewise.
1206 2014-08-07 Gary Benson <gbenson@redhat.com>
1208 * server.h: Do not include pathmax.h.
1210 2014-08-07 Gary Benson <gbenson@redhat.com>
1212 * server.h: Do not include libiberty.h.
1213 * linux-bfin-low.c: Likewise.
1215 2014-08-07 Gary Benson <gbenson@redhat.com>
1217 * server.h: Do not include ansidecl.h.
1219 2014-08-07 Gary Benson <gbenson@redhat.com>
1221 * linux-x86-low.c: Do not include stddef.h.
1222 * lynx-ppc-low.c: Likewise.
1223 * tracepoint.c: Likewise.
1225 2014-08-07 Gary Benson <gbenson@redhat.com>
1227 * server.h: Do not include stdarg.h.
1228 * nto-low.c: Likewise.
1230 2014-08-07 Gary Benson <gbenson@redhat.com>
1232 * server.h: Do not include stdlib.h.
1233 * inferiors.c: Likewise.
1234 * linux-low.c: Likewise.
1235 * regcache.c: Likewise.
1236 * spu-low.c: Likewise.
1237 * tracepoint.c: Likewise.
1238 * utils.c: Likewise.
1240 2014-08-07 Gary Benson <gbenson@redhat.com>
1242 * server.h: Do not include stdio.h.
1243 * linux-low.c: Likewise.
1244 * remote-utils.c: Likewise.
1245 * spu-low.c: Likewise.
1246 * utils.c: Likewise.
1247 * wincecompat.c: Likewise.
1249 2014-08-06 Gary Benson <gbenson@redhat.com>
1251 * regcache.c (init_register_cache): Move conditionals inside if.
1253 2014-08-06 Gary Benson <gbenson@redhat.com>
1255 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1257 2014-07-31 Gary Benson <gbenson@redhat.com>
1259 * ax.h: Do not include server.h.
1260 * gdbthread.h: Likewise.
1261 * lynx-low.h: Likewise.
1262 * notif.h: Likewise.
1264 2014-07-30 Gary Benson <gbenson@redhat.com>
1266 * server.h: Include common-defs.h.
1267 Do not include config.h or build-gnulib-gdbserver/config.h.
1269 2014-07-30 Gary Benson <gbenson@redhat.com>
1271 * hostio-errno.c: Move server.h to top of includes list.
1272 * inferiors.c: Likewise.
1273 * linux-x86-low.c: Likewise.
1274 * notif.c: Include server.h.
1276 2014-07-24 Tom Tromey <tromey@redhat.com>
1277 Gary Benson <gbenson@redhat.com>
1279 * server.h (CORE_ADDR): Now unsigned.
1281 2014-07-16 Pedro Alves <palves@redhat.com>
1283 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1285 2014-07-15 Pedro Alves <palves@redhat.com>
1287 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1290 2014-07-11 Pedro Alves <palves@redhat.com>
1292 * linux-low.c (kill_wait_lwp): New function, based on
1293 kill_one_lwp_callback, but use my_waitpid directly.
1294 (kill_one_lwp_callback, linux_kill): Use it.
1296 2014-06-23 Pedro Alves <palves@redhat.com>
1298 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1299 before setting DR0..DR3.
1301 2014-06-20 Gary Benson <gbenson@redhat.com>
1303 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1304 * configure: Regenerated.
1305 * config.in: Likewise.
1307 2014-06-20 Gary Benson <gbenson@redhat.com>
1309 * Makefile.in (SFILES): Update locations for files moved
1311 (object file files): Reordered.
1313 2014-06-20 Gary Benson <gbenson@redhat.com>
1315 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1316 (i386_dr_low_set_addr): Likewise.
1317 (i386_dr_low_get_addr): Likewise.
1318 (i386_dr_low_can_set_control): Likewise.
1319 (i386_dr_low_set_control): Likewise.
1320 (i386_dr_low_get_control): Likewise.
1321 (i386_dr_low_get_status): Likewise.
1322 (i386_get_debug_register_length): Likewise.
1323 * linux-x86-low.c (i386_dr_low_set_addr):
1324 Changed signature. Made static.
1325 (i386_dr_low_get_addr): Likewise.
1326 (i386_dr_low_set_control): Likewise.
1327 (i386_dr_low_get_control): Likewise.
1328 (i386_dr_low_get_status): Likewise.
1329 (i386_dr_low): New global variable.
1330 * win32-i386-low.c (i386_dr_low_set_addr):
1331 Changed signature. Made static.
1332 (i386_dr_low_get_addr): Likewise.
1333 (i386_dr_low_set_control): Likewise.
1334 (i386_dr_low_get_control): Likewise.
1335 (i386_dr_low_get_status): Likewise.
1336 (i386_dr_low): New global variable.
1338 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1340 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1341 * Makefile.in (AR, AR_FLAGS): Define.
1342 * configure: Regenerate.
1344 2014-06-19 Gary Benson <gbenson@redhat.com>
1346 * Makefile.in (i386-dregs.o): New rule.
1347 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1348 * i386-low.c (target.h): Remove include.
1349 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1350 (DR_CONTROL_SHIFT): Likewise.
1351 (DR_CONTROL_SIZE): Likewise.
1352 (DR_RW_EXECUTE): Likewise.
1353 (DR_RW_WRITE): Likewise.
1354 (DR_RW_READ): Likewise.
1355 (DR_RW_IORW): Likewise.
1356 (DR_LEN_1): Likewise.
1357 (DR_LEN_2): Likewise.
1358 (DR_LEN_4): Likewise.
1359 (DR_LEN_8): Likewise.
1360 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1361 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1362 (DR_ENABLE_SIZE): Likewise.
1363 (DR_LOCAL_SLOWDOWN): Likewise.
1364 (DR_GLOBAL_SLOWDOWN): Likewise.
1365 (DR_CONTROL_RESERVED): Likewise.
1366 (I386_DR_CONTROL_MASK): Likewise.
1367 (I386_DR_VACANT): Likewise.
1368 (I386_DR_LOCAL_ENABLE): Likewise.
1369 (I386_DR_GLOBAL_ENABLE): Likewise.
1370 (I386_DR_DISABLE): Likewise.
1371 (I386_DR_SET_RW_LEN): Likewise.
1372 (I386_DR_GET_RW_LEN): Likewise.
1373 (I386_DR_WATCH_HIT): Likewise.
1374 (i386_wp_op_t): Likewise.
1375 (i386_show_dr): Likewise.
1376 (i386_length_and_rw_bits): Likewise.
1377 (i386_insert_aligned_watchpoint): Likewise.
1378 (i386_remove_aligned_watchpoint): Likewise.
1379 (i386_handle_nonaligned_watchpoint): Likewise.
1380 i386_update_inferior_debug_regs(): Likewise.
1381 (i386_dr_insert_watchpoint): Likewise.
1382 (i386_dr_remove_watchpoint): Likewise.
1383 (i386_dr_region_ok_for_watchpoint): Likewise.
1384 (i386_dr_stopped_data_address): Likewise.
1385 (i386_dr_stopped_by_watchpoint): Likewise.
1387 2014-06-19 Gary Benson <gbenson@redhat.com>
1389 * i386-low.c (i386_dr_show): Renamed to
1390 i386_show_dr and made static. All uses updated.
1391 (i386_dr_length_and_rw_bits): Renamed to
1392 i386_length_and_rw_bits and made static.
1394 (i386_dr_insert_aligned_watchpoint): Renamed to
1395 i386_insert_aligned_watchpoint and made static.
1397 (i386_dr_remove_aligned_watchpoint): Renamed to
1398 i386_remove_aligned_watchpoint and made static.
1400 (i386_dr_update_inferior_debug_regs): Renamed to
1401 i386_update_inferior_debug_regs and made static.
1404 2014-06-18 Gary Benson <gbenson@redhat.com>
1406 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1407 (i386_dr_low_can_set_control): Likewise.
1408 (i386_get_debug_register_length): Likewise.
1409 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1410 (i386_dr_low_can_set_control): Likewise.
1411 (i386_get_debug_register_length): Likewise.
1413 2014-06-17 Gary Benson <gbenson@redhat.com>
1415 * i386-low.h (i386-dregs.h): New include.
1416 (DR_FIRSTADDR): Now in i386-dregs.h.
1417 (DR_LASTADDR): Likewise.
1418 (DR_NADDR): Likewise.
1419 (DR_STATUS): Likewise.
1420 (DR_CONTROL): Likewise.
1421 (i386_debug_reg_state): Likewise.
1422 (i386_dr_insert_watchpoint): Likewise.
1423 (i386_dr_remove_watchpoint): Likewise.
1424 (i386_dr_region_ok_for_watchpoint): Likewise.
1425 (i386_dr_stopped_data_address): Likewise.
1426 (i386_dr_stopped_by_watchpoint): Likewise.
1427 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1429 2014-06-18 Gary Benson <gbenson@redhat.com>
1431 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1432 i386_dr_insert_watchpoint.
1433 (i386_low_remove_watchpoint): Renamed to
1434 i386_dr_remove_watchpoint.
1435 (i386_low_region_ok_for_watchpoint): Renamed to
1436 i386_dr_region_ok_for_watchpoint.
1437 (i386_low_stopped_data_address): Renamed to
1438 i386_dr_stopped_data_address.
1439 (i386_low_stopped_by_watchpoint): Renamed to
1440 i386_dr_stopped_by_watchpoint.
1441 * i386-low.c (i386_show_dr): Renamed to
1442 i386_dr_show and made nonstatic. All uses updated.
1443 (i386_length_and_rw_bits): Renamed to
1444 i386_dr_length_and_rw_bits and made nonstatic.
1446 (i386_insert_aligned_watchpoint): Renamed to
1447 i386_dr_insert_aligned_watchpoint and made nonstatic.
1449 (i386_remove_aligned_watchpoint): Renamed to
1450 i386_dr_remove_aligned_watchpoint and made nonstatic.
1452 (i386_update_inferior_debug_regs): Renamed to
1453 i386_dr_update_inferior_debug_regs and made nonstatic.
1455 (i386_low_insert_watchpoint): Renamed to
1456 i386_dr_insert_watchpoint. All uses updated.
1457 (i386_low_remove_watchpoint): Renamed to
1458 i386_dr_remove_watchpoint. All uses updated.
1459 (i386_low_region_ok_for_watchpoint): Renamed to
1460 i386_dr_region_ok_for_watchpoint. All uses updated.
1461 (i386_low_stopped_data_address): Renamed to
1462 i386_dr_stopped_data_address. All uses updated.
1463 (i386_low_stopped_by_watchpoint): Renamed to
1464 i386_dr_stopped_by_watchpoint. All uses updated.
1466 2014-06-18 Gary Benson <gbenson@redhat.com>
1468 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1469 (i386_dr_low_can_set_control): Likewise.
1470 (i386_insert_aligned_watchpoint): New check.
1472 2014-06-18 Gary Benson <gbenson@redhat.com>
1474 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1477 2014-06-18 Gary Benson <gbenson@redhat.com>
1479 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1480 instead of fatal and error.
1481 (i386_handle_nonaligned_watchpoint): Likewise.
1483 2014-06-18 Gary Benson <gbenson@redhat.com>
1485 * i386-low.c (i386_get_debug_register_length): New macro.
1486 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1487 (i386_show_dr): Use debug_printf instead of fprintf. Use
1488 phex to format values.
1490 2014-06-18 Gary Benson <gbenson@redhat.com>
1492 * i386-low.h: Comment changes.
1493 * i386-low.c: Likewise.
1495 2014-06-18 Gary Benson <gbenson@redhat.com>
1497 * i386-low.c: Whitespace changes.
1499 2014-06-12 Tom Tromey <tromey@redhat.com>
1501 * utils.c (freeargv): Remove.
1503 2014-06-12 Tom Tromey <tromey@redhat.com>
1505 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1506 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1507 (parse_debug_format_options): Likewise.
1508 (gdbserver_usage): Likewise.
1509 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1510 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1511 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1513 ($(LIBGNU)): Depend on libiberty.
1514 (all-lib): Recurse into all subdirs.
1515 (install-only): Invoke "install" target in subdirs.
1516 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1518 * configure: Rebuild.
1519 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1520 for vasprintf, vsnprintf, or gettimeofday.
1521 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1524 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1526 * development.sh: Delete.
1527 * Makefile.in (config.status): Adjust dependency on development.sh.
1528 * configure.ac: Adjust development.sh source call.
1529 * configure: Regenerate.
1531 2014-06-02 Pedro Alves <palves@redhat.com>
1533 * ax.c (gdb_free_agent_expr): New function.
1534 * ax.h (gdb_free_agent_expr): New declaration.
1535 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1537 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1539 (clear_breakpoint_conditions_and_commands): New function.
1540 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1541 (clear_breakpoint_conditions_and_commands): New declaration.
1543 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1545 * linux-aarch64-low.c (asm/ptrace.h): Include.
1547 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1549 Fix TLS access for -static -pthread.
1550 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1551 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1552 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1554 2014-05-20 Pedro Alves <palves@redhat.com>
1556 * linux-aarch64-low.c (aarch64_insert_point)
1557 (aarch64_remove_point): No longer check whether the type is
1558 supported here. Adjust to new interface.
1559 (the_low_target): Install aarch64_supports_z_point_type as
1560 supports_z_point_type method.
1561 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1562 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1563 instead of a Z packet char. Adjust.
1564 (arm_supports_z_point_type): New function.
1565 (arm_insert_point, arm_remove_point): Adjust to new interface.
1566 (the_low_target): Install arm_supports_z_point_type.
1567 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1568 (cris_insert_point, cris_remove_point): Adjust to new interface.
1569 Don't check whether the type is supported here.
1570 (the_low_target): Install cris_supports_z_point_type.
1571 * linux-low.c (linux_supports_z_point_type): New function.
1572 (linux_insert_point, linux_remove_point): Adjust to new interface.
1573 * linux-low.h (struct linux_target_ops) <insert_point,
1574 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1575 raw_breakpoint pointer parameter.
1576 <supports_z_point_type>: New method.
1577 * linux-mips-low.c (mips_supports_z_point_type): New function.
1578 (mips_insert_point, mips_remove_point): Adjust to new interface.
1579 Use mips_supports_z_point_type.
1580 (the_low_target): Install mips_supports_z_point_type.
1581 * linux-ppc-low.c (the_low_target): Install NULL as
1582 supports_z_point_type method.
1583 * linux-s390-low.c (the_low_target): Install NULL as
1584 supports_z_point_type method.
1585 * linux-sparc-low.c (the_low_target): Install NULL as
1586 supports_z_point_type method.
1587 * linux-x86-low.c (x86_supports_z_point_type): New function.
1588 (x86_insert_point): Adjust to new insert_point interface. Use
1589 insert_memory_breakpoint. Adjust to new
1590 i386_low_insert_watchpoint interface.
1591 (x86_remove_point): Adjust to remove_point interface. Use
1592 remove_memory_breakpoint. Adjust to new
1593 i386_low_remove_watchpoint interface.
1594 (the_low_target): Install x86_supports_z_point_type.
1595 * lynx-low.c (lynx_target_ops): Install NULL as
1596 supports_z_point_type callback.
1597 * nto-low.c (nto_supports_z_point_type): New.
1598 (nto_insert_point, nto_remove_point): Adjust to new interface.
1599 (nto_target_ops): Install nto_supports_z_point_type.
1600 * mem-break.c: Adjust intro comment.
1601 (struct raw_breakpoint) <raw_type, size>: New fields.
1602 <inserted>: Update comment.
1603 <shlib_disabled>: Delete field.
1604 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1605 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1606 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1607 (raw_bkpt_type_to_target_hw_bp_type): New function.
1608 (find_enabled_raw_code_breakpoint_at): New function.
1609 (find_raw_breakpoint_at): New type and size parameters. Use them.
1610 (insert_memory_breakpoint): New function, based off
1611 set_raw_breakpoint_at.
1612 (remove_memory_breakpoint): New function.
1613 (set_raw_breakpoint_at): Reimplement.
1614 (set_breakpoint): New, based on set_breakpoint_at.
1615 (set_breakpoint_at): Reimplement.
1616 (delete_raw_breakpoint): Go through the_target->remove_point
1617 instead of assuming memory breakpoints.
1618 (find_gdb_breakpoint_at): Delete.
1619 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1620 (find_gdb_breakpoint): New function.
1621 (set_gdb_breakpoint_at): Delete.
1622 (z_type_supported): New function.
1623 (set_gdb_breakpoint_1): New function, loosely based off
1624 set_gdb_breakpoint_at.
1625 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1626 (delete_gdb_breakpoint_at): Delete.
1627 (delete_gdb_breakpoint_1): New function, loosely based off
1628 delete_gdb_breakpoint_at.
1629 (delete_gdb_breakpoint): New function.
1630 (clear_gdb_breakpoint_conditions): Rename to ...
1631 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1633 (add_condition_to_breakpoint): Make static.
1634 (add_breakpoint_condition): Take a struct breakpoint pointer
1635 instead of an address. Adjust.
1636 (gdb_condition_true_at_breakpoint): Rename to ...
1637 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1639 (gdb_condition_true_at_breakpoint): Reimplement.
1640 (add_breakpoint_commands): Take a struct breakpoint pointer
1641 instead of an address. Adjust.
1642 (gdb_no_commands_at_breakpoint): Rename to ...
1643 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1644 parameter. Return true if no breakpoint was found. Change debug
1646 (gdb_no_commands_at_breakpoint): Reimplement.
1647 (run_breakpoint_commands): Rename to ...
1648 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1649 and change return type to boolean.
1650 (run_breakpoint_commands): New function.
1651 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1652 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1653 breakpoint. Go through the_target->remove_point instead of
1654 assuming memory breakpoint.
1655 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1656 software and hardware breakpoints.
1657 (reinsert_raw_breakpoint): Go through the_target->insert_point
1658 instead of assuming memory breakpoint.
1659 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1660 software and hardware breakpoints.
1661 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1662 Check both software and hardware breakpoints.
1663 (validate_inserted_breakpoint): Assert the breakpoint is a
1664 software breakpoint. Set the inserted flag to -1 instead of
1665 setting shlib_disabled.
1666 (delete_disabled_breakpoints): Adjust.
1667 (validate_breakpoints): Only validate software breakpoints.
1668 Adjust to inserted flag change.
1669 (check_mem_read, check_mem_write): Skip breakpoint types other
1670 than software breakpoints. Adjust to inserted flag change.
1671 * mem-break.h (enum raw_bkpt_type): New enum.
1672 (raw_breakpoint, struct process_info): Forward declare.
1673 (Z_packet_to_target_hw_bp_type): Delete declaration.
1674 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1675 (set_gdb_breakpoint, delete_gdb_breakpoint)
1676 (clear_breakpoint_conditions): New declarations.
1677 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1678 (breakpoint_inserted_here): Update comment.
1679 (add_breakpoint_condition, add_breakpoint_commands): Replace
1680 address parameter with a breakpoint pointer parameter.
1681 (gdb_breakpoint_here): Update comment.
1682 (delete_gdb_breakpoint_at): Delete.
1683 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1684 * server.c (process_point_options): Take a struct breakpoint
1685 pointer instead of an address. Adjust.
1686 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1687 delete_gdb_breakpoint.
1688 * spu-low.c (spu_target_ops): Install NULL as
1689 supports_z_point_type method.
1690 * target.h: Include mem-break.h.
1691 (struct target_ops) <prepare_to_access_memory>: Update comment.
1692 <supports_z_point_type>: New field.
1693 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1694 instead of a char. Also take a raw breakpoint pointer.
1695 * win32-arm-low.c (the_low_target): Install NULL as
1696 supports_z_point_type.
1697 * win32-i386-low.c (i386_supports_z_point_type): New function.
1698 (i386_insert_point, i386_remove_point): Adjust to new interface.
1699 (the_low_target): Install i386_supports_z_point_type.
1700 * win32-low.c (win32_supports_z_point_type): New function.
1701 (win32_insert_point, win32_remove_point): Adjust to new interface.
1702 (win32_target_ops): Install win32_supports_z_point_type.
1703 * win32-low.h (struct win32_target_ops):
1704 <supports_z_point_type>: New method.
1705 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1706 instead of a char. Also take a raw breakpoint pointer.
1708 2014-05-20 Pedro Alves <palves@redhat.com>
1710 * mem-break.h: Include break-common.h.
1711 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1712 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1713 (Z_packet_to_target_hw_bp_type): New declaration.
1714 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1715 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1716 (Z_PACKET_ACCESS_WP): Delete macros.
1717 (Z_packet_to_hw_type): Delete function.
1718 * i386-low.h: Don't include break-common.h here.
1719 (Z_packet_to_hw_type): Delete declaration.
1720 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1721 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1722 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1723 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1724 * linux-aarch64-low.c: Don't include break-common.h here.
1725 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1726 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1727 (Z_packet_to_target_hw_bp_type): Delete function.
1728 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1730 (mips_insert_point, mips_remove_point): Use
1731 Z_packet_to_target_hw_bp_type.
1733 2014-05-20 Pedro Alves <palves@redhat.com>
1735 * linux-aarch64-low.c: Include break-common.h.
1736 (enum target_point_type): Delete.
1737 (Z_packet_to_point_type): Rename to ...
1738 (Z_packet_to_target_hw_bp_type): ... this, and return a
1739 target_hw_bp_type instead.
1740 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1741 instead of an enum target_point_type.
1742 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1744 (aarch64_dr_state_insert_one_point)
1745 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1746 (aarch64_handle_aligned_watchpoint)
1747 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1748 Take an enum target_hw_bp_type instead of an enum
1750 (aarch64_supports_z_point_type): New function.
1751 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1752 use Z_packet_to_target_hw_bp_type.
1754 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1756 * configure.ac: Only use -Werror by default when DEVELOPMENT
1758 * configure: Regenerate.
1760 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1762 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1763 * linux-x86-low.c (X86_64_USER_REGS): New.
1764 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1766 2014-04-28 Yao Qi <yao@codesourcery.com>
1768 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1771 2014-04-25 Pedro Alves <palves@redhat.com>
1774 * linux-low.c (linux_attach_fail_reason_string): New function.
1775 (linux_attach_lwp): Delete.
1776 (linux_attach_lwp_1): Rename to ...
1777 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1778 argument. Remove "initial" parameter. Return int instead of
1779 void. Don't error or warn here.
1780 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1781 failure to attach to the tgid. Call warning when failing to
1783 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1784 argument. Remove "initial" parameter. Return int instead of
1785 void. Don't error or warn here.
1786 (linux_attach_fail_reason_string): New declaration.
1787 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1788 interface change. Use linux_attach_fail_reason_string.
1790 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1791 Walfred Tedeschi <walfred.tedeschi@intel.com>
1793 * Makefile.in: Added rules to handle new files
1794 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1795 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1796 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1797 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1798 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1799 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1801 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1802 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1803 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1804 i386/x32-avx512.xml.
1805 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1806 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1807 i386/x32-avx512-linux.xml.
1808 * i387-fp.c (num_avx512_k_registers): New constant for number
1810 (num_avx512_zmmh_low_registers): New constant for number of
1811 lower ZMM registers (0-15).
1812 (num_avx512_zmmh_high_registers): New constant for number of
1813 higher ZMM registers (16-31).
1814 (num_avx512_ymmh_registers): New contant for number of higher
1815 YMM registers (ymm16-31 added by avx521 on x86_64).
1816 (num_avx512_xmm_registers): New constant for number of higher
1817 XMM registers (xmm16-31 added by AVX512 on x86_64).
1818 (struct i387_xsave): Add space for AVX512 registers.
1819 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1820 Add code to handle AVX512 registers.
1821 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1822 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1823 prototypei from generated file.
1824 (tdesc_amd64_avx512_linux): Likewise.
1825 (init_registers_x32_avx512_linux): Likewise.
1826 (tdesc_x32_avx512_linux): Likewise.
1827 (init_registers_i386_avx512_linux): Likewise.
1828 (tdesc_i386_avx512_linux): Likewise.
1829 (x86_64_regmap): Add AVX512 registers.
1830 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1832 (initialize_low_arch): Add code to initialize AVX512 registers.
1834 2014-04-23 Pedro Alves <palves@redhat.com>
1836 * mem-break.c (find_gdb_breakpoint_at): Make static.
1837 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1839 2014-04-23 Pedro Alves <palves@redhat.com>
1841 * i386-low.c: Don't include break-common.h here.
1842 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1843 prototype to take target_hw_bp_type as argument instead of a Z
1845 * i386-low.h: Include break-common.h here.
1846 (Z_packet_to_hw_type): Declare.
1847 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1849 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1850 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1851 (x86_remove_point): Convert the packet number to a
1852 target_hw_bp_type before calling i386_low_remove_watchpoint.
1853 * win32-i386-low.c (i386_insert_point): Convert the packet number
1854 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1855 (i386_remove_point): Convert the packet number to a
1856 target_hw_bp_type before calling i386_low_remove_watchpoint.
1858 2014-04-23 Pedro Alves <palves@redhat.com>
1860 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1862 2014-04-10 Pedro Alves <palves@redhat.com>
1864 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1865 Check if the condition or command is NULL before checking if the
1866 breakpoint is known. On success, return true.
1867 * mem-break.h (add_breakpoint_condition): Document return.
1868 (add_breakpoint_commands): Add describing comment.
1869 * server.c (skip_to_semicolon): New function.
1870 (process_point_options): Use it.
1872 2014-04-09 Pedro Alves <palves@redhat.com>
1874 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1877 2014-02-27 Pedro Alves <palves@redhat.com>
1880 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1882 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1884 (last_thread_of_process_p): Take a PID argument instead of a
1886 (linux_wait_for_lwp): Delete.
1887 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1889 (linux_low_filter_event): New function, party factored out from
1890 linux_wait_for_event.
1891 (linux_wait_for_event): Rename to ...
1892 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1893 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1894 sigsuspend. Check for zombie leaders.
1895 (linux_wait_for_event): Reimplement as wrapper around
1896 linux_wait_for_event_filtered.
1897 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1898 a normal or signal exit is seen, it's the whole process exiting.
1899 (wait_for_sigstop): No longer a for_each_inferior callback.
1900 Rewrite on top of linux_wait_for_event_filtered.
1901 (stop_all_lwps): Call wait_for_sigstop directly.
1902 * server.c (resume, handle_target_event): Handle
1903 TARGET_WAITKIND_NO_RESUMED.
1905 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1907 * win32-low.c (psapi_get_dll_name,
1908 * win32_CreateToolhelp32Snapshot): Delete.
1909 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1910 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1912 (handle_load_dll): Add function description.
1913 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1915 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1917 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1919 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1920 base address when calling win32_add_one_solib.
1921 (handle_load_dll): Delete local variable load_addr.
1922 Remove 0x1000 offset applied to DLL base address when calling
1923 win32_add_one_solib.
1924 (handle_unload_dll): Add comment.
1926 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1928 * win32-low.c (win32_add_all_dlls): Renames
1929 win32_ensure_ntdll_loaded. Rewrite function documentation.
1930 Adjust implementation to always load all DLLs.
1931 Add 0x1000 offset to DLL base address when calling
1932 win32_add_one_solib.
1933 (child_initialization_done): New static global.
1934 (do_initial_child_stuff): Set child_initialization_done to
1935 zero during child initialization, and 1 after. Replace call
1936 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1938 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1939 (handle_unload_dll): Add function documentation.
1940 (get_child_debug_event): Ignore load and unload DLL events
1941 during child initialization.
1943 2014-02-20 Doug Evans <dje@google.com>
1945 Remove global all_lwps.
1946 * inferiors.h (ptid_of): Move here from linux-low.h.
1947 (pid_of, lwpid_of): Ditto.
1948 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1949 parameter is a struct thread_info * now.
1950 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1951 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1952 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1954 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1955 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1956 * linux-arm-low.c (update_registers_callback): Update, "entry"
1957 parameter is a struct thread_info * now.
1958 Fetch lwpid from current_inferior directly.
1959 (arm_insert_point): Pass &all_threads to find_inferior instead of
1961 (arm_remove_point): Ditto.
1962 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1963 (arm_prepare_to_resume): Fetch pid from thread.
1964 (arm_read_description): Fetch lwpid from current_inferior directly.
1965 * linux-low.c (all_lwps): Delete.
1966 (delete_lwp): Delete call to remove_inferior.
1967 (handle_extended_wait): Fetch lwpid from thread.
1968 (add_lwp): Don't set lwp->entry.id. Remove call to
1969 add_inferior_to_list.
1970 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1971 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1972 (kill_one_lwp_callback): Ditto.
1973 (linux_kill): Don't dereference NULL pointer.
1974 Fetch ptid,lwpid from thread.
1975 (get_detach_signal): Fetch ptid from thread.
1976 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1977 Simplify call to regcache_invalidate_thread.
1978 (delete_lwp_callback): Update, "entry" parameter is a
1979 struct thread_info * now. Fetch pid from thread.
1980 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1981 (status_pending_p_callback): Update, "entry" parameter is a
1982 struct thread_info * now. Fetch ptid from thread.
1983 (find_lwp_pid): Update, "entry" parameter is a
1984 struct thread_info * now.
1985 (linux_wait_for_lwp): Fetch pid from thread.
1986 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1987 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1988 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1989 (dequeue_one_deferred_signal): Ditto.
1990 (cancel_breakpoint): Fetch ptid from current_inferior.
1991 (linux_wait_for_event): Pass &all_threads to find_inferior,
1992 not &all_lwps. Fetch ptid, lwpid from thread.
1993 (count_events_callback): Update, "entry" parameter is a
1994 struct thread_info * now.
1995 (select_singlestep_lwp_callback): Ditto.
1996 (select_event_lwp_callback): Ditto.
1997 (cancel_breakpoints_callback): Ditto.
1998 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2000 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2001 (unsuspend_one_lwp): Update, "entry" parameter is a
2002 struct thread_info * now.
2003 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2005 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2006 Fetch lwpid from thread, not lwp.
2007 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2008 Pass &all_threads to find_inferior, not &all_lwps.
2009 (send_sigstop): Fetch lwpid from thread, not lwp.
2010 (send_sigstop_callback): Update, "entry" parameter is a
2011 struct thread_info * now.
2012 (suspend_and_send_sigstop_callback): Ditto.
2013 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2014 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2015 struct thread_info * now.
2016 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2018 (lwp_running): Update, "entry" parameter is a
2019 struct thread_info * now.
2020 (stop_all_lwps): Fetch ptid from thread.
2021 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2022 (linux_resume_one_lwp): Fetch lwpid from thread.
2023 (linux_set_resume_request): Update, "entry" parameter is a
2024 struct thread_info * now. Fetch pid, lwpid from thread.
2025 (resume_status_pending_p): Update, "entry" parameter is a
2026 struct thread_info * now.
2027 (need_step_over_p): Ditto. Fetch lwpid from thread.
2028 (start_step_over): Fetch lwpid from thread.
2029 (linux_resume_one_thread): Update, "entry" parameter is a
2030 struct thread_info * now. Fetch lwpid from thread.
2031 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2032 (proceed_one_lwp): Update, "entry" parameter is a
2033 struct thread_info * now. Fetch lwpid from thread.
2034 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2035 struct thread_info * now.
2036 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2037 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2038 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2040 (regsets_store_inferior_registers): Ditto.
2041 (fetch_register, store_register): Ditto.
2042 (linux_read_memory, linux_write_memory): Ditto.
2043 (linux_request_interrupt): Ditto.
2044 (linux_read_auxv): Ditto.
2045 (linux_xfer_siginfo): Ditto.
2046 (linux_qxfer_spu): Ditto.
2047 (linux_qxfer_libraries_svr4): Ditto.
2048 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2049 moved to inferiors.h.
2051 (get_thread_lwp): Update.
2052 (struct lwp_info): Delete member "entry". Simplify comment for
2055 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2056 current_inferior directly.
2057 (update_watch_registers_callback): Update, "entry" parameter is a
2058 struct thread_info * now. Fetch pid from thread.
2059 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2060 (mips_insert_point): Fetch lwpid from current_inferior.
2061 Pass &all_threads to find_inferior, not &all_lwps.
2062 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2063 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2065 (mips_stopped_data_address): Ditto.
2066 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2068 * linux-tile-low.c (tile_arch_setup): Ditto.
2069 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2070 (update_debug_registers_callback): Update, "entry" parameter is a
2071 struct thread_info * now. Fetch pid from thread.
2072 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2073 Pass &all_threads to find_inferior, not &all_lwps.
2074 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2075 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2076 Pass &all_threads to find_inferior, not &all_lwps.
2077 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2078 (i386_dr_low_get_status): Ditto.
2079 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2080 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2081 (x86_linux_read_description): Ditto.
2082 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2084 2014-02-20 Doug Evans <dje@google.com>
2086 * inferiors.c (get_first_inferior): Fix buglet.
2088 2014-02-19 Doug Evans <dje@google.com>
2090 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2091 * inferiors.c (add_thread): Change result type to struct thread_info *.
2092 All callers updated.
2093 (add_lwp): Call add_thread here instead of in callers.
2094 All callers updated.
2095 * linux-low.h (get_lwp_thread): Rewrite.
2096 (struct lwp_info): New member "thread".
2098 2014-02-19 Doug Evans <dje@google.com>
2100 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2101 All callers updated.
2103 2014-02-19 Doug Evans <dje@google.com>
2105 * inferiors.c (add_thread): Fix whitespace.
2107 2014-02-19 Doug Evans <dje@google.com>
2109 * dll.c (clear_dlls): Replace accessing list implemention details
2111 * gdbthread.h (get_first_thread): Declare.
2112 * inferiors.c (for_each_inferior_with_data): New function.
2113 (get_first_thread): New function.
2114 (find_thread_ptid): Simplify.
2115 (get_first_inferior): New function.
2116 (clear_list): Delete.
2117 (one_inferior_p): New function.
2118 (clear_inferior_list): New function.
2119 (clear_inferiors): Update.
2120 * inferiors.h (for_each_inferior_with_data): Declare.
2121 (clear_inferior_list): Declare.
2122 (one_inferior_p): Declare.
2123 (get_first_inferior): Declare.
2124 * linux-low.c (linux_wait_for_event): Replace accessing list
2125 implemention details with API function.
2126 * server.c (target_running): Ditto.
2127 (accumulate_file_name_length): New function.
2128 (emit_dll_description): New function.
2129 (handle_qxfer_libraries): Replace accessing list implemention
2130 details with API function.
2131 (handle_qxfer_threads_worker): New function.
2132 (handle_qxfer_threads_proper): Replace accessing list implemention
2133 details with API function.
2134 (handle_query): Ditto.
2135 (visit_actioned_threads_callback_ftype): New typedef.
2136 (visit_actioned_threads_data): New struct.
2137 (visit_actioned_threads): Rewrite to be find_inferior callback.
2138 (resume): Call find_inferior.
2139 (handle_status): Replace accessing list implemention
2140 details with API function.
2141 (process_serial_event): Replace accessing list implemention details
2143 * target.c (set_desired_inferior): Replace accessing list implemention
2144 details with API function.
2145 * tracepoint.c (same_process_p): New function.
2146 (gdb_agent_about_to_close): Replace accessing list implemention
2147 details with API function.
2148 * win32-low.c (child_delete_thread): Replace accessing list
2149 implemention details with API function.
2150 (match_dll_by_basename): New function.
2151 (dll_is_loaded_by_basename): New function.
2152 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2153 details call to dll_is_loaded_by_basename.
2155 2014-02-19 Doug Evans <dje@google.com>
2157 * dll.h (struct dll_info): Add comment.
2158 * gdbthread.h (struct thread_info): Add comment.
2159 (current_ptid): Simplify.
2160 * inferiors.c (add_process): Update.
2161 (remove_process): Update.
2162 * inferiors.h (struct process_info): Rename member "head" to "entry".
2163 * linux-low.c (delete_lwp): Update.
2165 (last_thread_of_process_p): Update.
2166 (kill_one_lwp_callback, linux_kill): Update.
2167 (status_pending_p_callback): Update.
2168 (wait_for_sigstop): Update. Simplify read of ptid.
2169 (start_step_over): Update.
2170 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2171 (get_lwp_thread): Update.
2172 (struct lwp_info): Rename member "head" to "entry".
2173 * regcache.h (inferior_list_entry): Delete.
2174 * server.c (kill_inferior_callback): Update.
2175 (detach_or_kill_inferior_callback): Update.
2176 (print_started_pid): Update.
2177 (print_attached_pid): Update.
2178 (process_serial_event): Simplify read of ptid.
2179 * thread-db.c (thread_db_create_event): Update.
2180 (thread_db_get_tls_address): Update.
2181 * win32-low.c (current_inferior_ptid): Simplify.
2183 2014-02-19 Tom Tromey <tromey@redhat.com>
2185 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2187 (target_supports_btrace): Update.
2189 2014-02-14 Yao Qi <yao@codesourcery.com>
2191 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2192 (rsp-low-ipa.o): New target.
2194 2014-02-12 Tom Tromey <tromey@redhat.com>
2196 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2197 convert_ascii_to_int.
2198 * regcache.c (registers_to_string): Likewise.
2199 * remote-utils.c (decode_M_packet): Likewise.
2200 * server.c (process_serial_event): Likewise.
2202 2014-02-12 Tom Tromey <tromey@redhat.com>
2204 * server.c (handle_query, handle_v_run): Use hex2bin, not
2206 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2208 2014-02-12 Tom Tromey <tromey@redhat.com>
2210 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2211 convert_int_to_ascii.
2212 * regcache.c (registers_to_string, collect_register_as_string):
2214 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2216 * server.c (process_serial_event): Likewise.
2217 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2218 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2220 2014-02-12 Tom Tromey <tromey@redhat.com>
2222 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2223 bin2hex, not hexify.
2224 * tracepoint.c (cmd_qtstatus): Likewise.
2226 2014-02-12 Tom Tromey <tromey@redhat.com>
2228 * remote-utils.c (monitor_output): Pass explicit length to
2231 2014-02-12 Tom Tromey <tromey@redhat.com>
2233 * tracepoint.c: Include rsp-low.h.
2234 * server.c: Include rsp-low.h.
2235 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2236 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2238 * remote-utils.c: Include rsp-low.h.
2239 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2240 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2241 (convert_int_to_ascii, convert_ascii_to_int): Move to
2243 * regcache.c: Include rsp-low.h.
2244 * ax.c: Include rsp-low.h.
2245 * Makefile.in (SFILES): Add common/rsp-low.c.
2246 (OBS): Add rsp-low.o.
2247 (rsp-low.o): New target.
2249 2014-02-12 Tom Tromey <tromey@redhat.com>
2251 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2252 Include print-utils.h.
2253 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2254 (plongest, thirty_two, phex_nz): Remove.
2255 * Makefile.in (SFILES): Add common/print-utils.c.
2256 (OBS): Add print-utils.o.
2257 (print-utils-ipa.o): New target.
2258 (print-utils.o): New target.
2259 (IPA_OBJS): Add print-utils-ipa.o.
2261 2014-02-06 Tom Tromey <tromey@redhat.com>
2263 * Makefile.in (SFILES): Fix indentation.
2265 2014-02-05 Doug Evans <dje@google.com>
2267 * linux-low.c (linux_wait_for_event): Improve comment.
2268 (linux_wait_1): Keep current_inferior in sync with event_child.
2270 2014-01-22 Doug Evans <dje@google.com>
2272 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2274 2014-01-22 Doug Evans <dje@google.com>
2276 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2277 * configure: Regenerate.
2278 * config.in: Regenerate.
2279 * Makefile.in (SFILES): Add debug.c.
2281 * debug.c: New file.
2282 * debug.h: New file.
2283 * linux-aarch64-low.c (*): Update all debugging printfs to use
2284 debug_printf instead of fprintf.
2285 * linux-arm-low.c (*): Ditto.
2286 * linux-cris-low.c (*): Ditto.
2287 * linux-crisv32-low.c (*): Ditto.
2288 * linux-m32r-low.c (*): Ditto.
2289 * linux-sparc-low.c (*): Ditto.
2290 * linux-x86.c (*): Ditto.
2291 * linux-low.c (*): Ditto.
2292 (linux_wait_1): Add calls to debug_enter, debug_exit.
2293 (linux_wait): Remove redundant debugging printf.
2294 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2295 (linux_resume, unstop_all_lwps): Ditto.
2296 * mem-break.c (*): Update all debugging printfs to use
2297 debug_printf instead of fprintf.
2298 * remote-utils.c (*): Ditto.
2299 * thread-db.c (*): Ditto.
2300 * server.c #include <ctype.h>, "gdb_vecs.h".
2301 (debug_threads): Moved to debug.c.
2302 (*): Update all debugging printfs to use debug_printf instead of
2304 (start_inferior): Replace call to fflush with call to debug_flush.
2305 (monitor_show_help): Mention set debug-format.
2306 (parse_debug_format_options): New function.
2307 (handle_monitor_command): Handle "monitor set debug-format".
2308 (gdbserver_usage): Mention --debug-format.
2309 (main): Parse --debug-format.
2310 * server.h (debug_threads): Declaration moved to debug.h.
2312 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2313 trace_debug_1 that uses debug_printf.
2314 (tracepoint_look_up_symbols): Update all debugging printfs to use
2315 debug_printf instead of fprintf.
2317 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2319 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2322 2014-01-17 Pedro Alves <palves@redhat.com>
2325 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2326 defined after including gdb_proc_service.h.
2328 2014-01-16 Doug Evans <dje@google.com>
2330 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2331 (match_dll): Use it.
2333 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2335 * target.h (target_ops) <read_btrace>: Change parameters and
2336 return type to allow error reporting.
2337 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2338 trace reading errors on.
2339 * linux-low.c (linux_low_read_btrace): Pass trace reading
2341 (linux_low_disable_btrace): New.
2343 2014-01-15 Doug Evans <dje@google.com>
2345 * inferiors.c (thread_id_to_gdb_id): Delete.
2346 * inferiors.h (thread_id_to_gdb_id): Delete.
2348 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2350 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2351 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2354 2014-01-08 Pedro Alves <palves@redhat.com>
2356 * server.c (handle_status): Don't discard previous queued stop
2357 replies or thread's pending status here.
2358 (main) <disconnection>: Do it here instead.
2360 2014-01-08 Pedro Alves <palves@redhat.com>
2362 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2363 * server.c (visit_actioned_threads, handle_pending_status): New
2365 (handle_v_cont): Factor out parts to ...
2366 (resume): ... this new function. If in all-stop, and a thread
2367 being resumed has a pending status, report it without actually
2369 (myresume): Adjust to use the new 'resume' function.
2370 (clear_pending_status_callback, set_pending_status_callback)
2371 (find_status_pending_thread_callback): New functions.
2372 (handle_status): Handle the case of multiple threads having
2373 interesting statuses to report. Report threads' real last signal
2374 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2375 with an interesting thread to report the status for, instead of
2376 always reporting the status of the first thread.
2378 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2380 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2381 * gdbreplay.c (gdbreplay_version): Likewise.
2383 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2385 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2386 iov.iov_len with the real length in use.
2388 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2390 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2391 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2392 for all targets that use win32-low.c.
2393 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2394 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2396 2013-12-13 Pedro Alves <palves@redhat.com>
2398 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2399 if equal to TARGET_WAITKIND_LOADED.
2400 * win32-low.c (cached_status): New static global.
2401 (win32_wait): Add declaration.
2402 (do_initial_child_stuff): Flush all initial pending debug events
2403 up to the initial breakpoint.
2404 (win32_wait): If CACHED_STATUS was set, return that instead
2405 of doing a real wait. Remove the code resuming the execution
2406 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2407 during the initial phase. Also remove the code changing
2408 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2409 TARGET_WAITKIND_STOPPED.
2411 2013-12-11 Yao Qi <yao@codesourcery.com>
2413 * notif.c (handle_notif_ack): Return 0 if no notification
2416 2013-11-20 Doug Evans <dje@google.com>
2418 * linux-low.c (linux_set_resume_request): Fix comment.
2420 2013-11-20 Doug Evans <dje@google.com>
2422 * linux-low.c (resume_status_pending_p): Tweak comment.
2424 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2426 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2427 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2428 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2429 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2430 (srv_amd64_regobj): Add amd64-mpx.o.
2431 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2432 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2433 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2434 * i387-fp.c (num_pl_bnd_register) Added constant.
2435 (num_pl_bnd_cfg_registers) Added constant.
2436 (struct i387_xsave) Added reserved area and MPX fields.
2437 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2438 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2440 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2441 (init_registers_amd64_mpx_linux): Declare new function.
2442 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2443 (x86_64_regmap): Add MPX registers.
2444 (x86_linux_read_description): Add MPX case.
2445 (initialize_low_arch): Initialize MPX targets.
2447 2013-11-18 Tom Tromey <tromey@redhat.com>
2449 * configure: Rebuild.
2450 * configure.ac: Don't check for stdlib.h.
2451 * gdbreplay.c: Unconditionally include stdlib.h.
2453 2013-11-18 Tom Tromey <tromey@redhat.com>
2455 * config.in: Rebuild.
2456 * configure: Rebuild.
2457 * configure.ac: Don't use AC_HEADER_DIRENT.
2459 2013-11-18 Tom Tromey <tromey@redhat.com>
2461 * server.h: Don't check HAVE_STRING_H.
2462 * gdbreplay.c: Don't check HAVE_STRING_H.
2463 * configure: Rebuild.
2465 2013-11-18 Tom Tromey <tromey@redhat.com>
2467 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2470 2013-11-08 Tom Tromey <tromey@redhat.com>
2472 * configure, config.in: Rebuild.
2473 * configure.ac: Remove unused configury.
2475 2013-11-08 Tom Tromey <tromey@redhat.com>
2477 * acinclude.m4: Include common.m4, codeset.m4.
2478 * configure, config.in: Rebuild.
2479 * configure.ac: Use GDB_AC_COMMON.
2481 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2483 * linux-s390-low.c (HWCAP_S390_TE): New define.
2484 (s390_arch_setup): Consider the TE field in the HWCAP for
2485 determining 'have_regset_tdb'.
2487 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2490 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2493 2013-10-02 Pedro Alves <palves@redhat.com>
2495 * server.c (process_serial_event): Don't output "GDBserver
2496 exiting" if GDB is connected through stdio.
2497 * target.c (mywait): Likewise, be silent if GDB is connected
2500 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2502 * lynx-low.c (lynx_add_threads_after_attach): New function.
2503 (lynx_attach): Remove call to add_thread. Add call to
2504 lynx_add_threads_after_attach instead.
2506 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2508 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2509 * config.in, configure: Regenerated.
2511 2013-09-18 Yao Qi <yao@codesourcery.com>
2514 * server.c (start_inferior): Clear 'resume_info'.
2516 2013-09-16 Jiong Wang <jiwang@tilera.com>
2518 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2521 2013-09-16 Jiong Wang <jiwang@tilera.com>
2523 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2524 linux-tile-low.o to srv_tgtobj.
2526 2013-09-16 Will Newton <will.newton@linaro.org>
2528 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2531 2013-09-06 Pedro Alves <palves@redhat.com>
2533 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2534 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2535 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2536 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2537 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2538 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2540 2013-09-06 Pedro Alves <palves@redhat.com>
2542 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2543 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2545 2013-09-06 Pedro Alves <palves@redhat.com>
2547 * linux-amd64-ipa.c: Include tracepoint.h.
2548 * linux-i386-ipa.c: Include tracepoint.h.
2550 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2552 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2553 (ps_get_thread_area): New function.
2555 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2557 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2558 (initialize_low_arch): Call init_registers_crisv32 rather than
2559 init_register_crisv32.
2561 2013-09-05 Pedro Alves <palves@redhat.com>
2563 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2565 * hostio.h: ... this new file.
2566 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2567 win32-low.c: Include hostio.h.
2569 2013-09-05 Pedro Alves <palves@redhat.com>
2571 * server.h (gdb_client_data, handler_func, callback_handler_func)
2572 (delete_file_handler, add_file_handler, append_callback_event)
2573 (delete_callback_event, start_event_loop, initialize_event_loop):
2574 Move to event-loop.h and include it.
2575 * event-loop.h: New file.
2577 2013-09-05 Pedro Alves <palves@redhat.com>
2579 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2580 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2581 (loaded_dll, unloaded_dll): Move to ...
2582 * dll.h: ... this new file.
2583 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2585 2013-09-05 Pedro Alves <palves@redhat.com>
2587 * server.h (current_process, get_thread_process, all_processes)
2588 (add_inferior_to_list, for_each_inferior, current_inferior)
2589 (remove_inferior, add_process, remove_process, find_process_pid)
2590 (have_started_inferiors_p, have_attached_inferiors_p)
2591 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2592 (clear_inferiors, find_inferior, find_inferior_id)
2593 (inferior_target_data, set_inferior_target_data)
2594 (inferior_regcache_data, set_inferior_regcache_data): Move to
2595 inferiors.h, and include it.
2596 * inferiors.h: New file.
2598 2013-09-05 Pedro Alves <palves@redhat.com>
2600 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2604 2013-09-05 Pedro Alves <palves@redhat.com>
2606 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2608 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2609 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2610 (handle_tracepoint_general_set, handle_tracepoint_query)
2611 (tracepoint_finished_step, tracepoint_was_hit)
2612 (release_while_stepping_state_list, current_traceframe)
2613 (in_readonly_region, traceframe_read_mem)
2614 (fetch_traceframe_registers, traceframe_read_sdata)
2615 (traceframe_read_info, struct fast_tpoint_collect_status)
2616 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2617 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2618 (supply_fast_tracepoint_registers)
2619 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2620 (ipa_tdesc, claim_trampoline_space)
2621 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2622 (agent_mem_read, agent_get_trace_state_variable_value)
2623 (agent_set_trace_state_variable_value, agent_tsv_read)
2624 (agent_mem_read_string, get_raw_reg_func_addr)
2625 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2626 * tracepoint.h: ... this new file.
2628 2013-09-05 Pedro Alves <palves@redhat.com>
2630 * server.h (perror_with_name, error, fatal, warning, paddress)
2631 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2633 * utils.h: New file.
2635 2013-09-05 Pedro Alves <palves@redhat.com>
2637 * server.h (remote_debug, noack_mode, transport_is_reliable)
2638 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2639 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2640 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2641 (write_enn, initialize_async_io, enable_async_io)
2642 (disable_async_io, check_remote_input_interrupt_request)
2643 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2644 (dead_thread_notify, prepare_resume_reply)
2645 (decode_address_to_semicolon, decode_address, decode_m_packet)
2646 (decode_M_packet, decode_X_packet, decode_xfer_write)
2647 (decode_search_memory_packet, unhexify, hexify)
2648 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2649 (look_up_one_symbol, relocate_instruction)
2650 (monitor_output): Move to remote-utils.h, and include it.
2651 * remote-utils.h: New file.
2653 2013-09-05 Pedro Alves <palves@redhat.com>
2655 * server.h (_): Delete.
2657 2013-09-02 Pedro Alves <palves@redhat.com>
2659 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2660 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2662 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2664 2013-09-02 Pierre Muller <muller@sourceware.org>
2666 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2667 or WriteProcessMemory complete successfully and handle
2668 ERROR_PARTIAL_COPY error.
2670 2013-09-02 Pedro Alves <palves@redhat.com>
2672 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2673 error instead of EIO.
2675 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2678 * linux-low.c: Include filestuff.h.
2679 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2680 * lynx-low.c: Include filestuff.h.
2681 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2682 * server.c: Include filestuff.h.
2683 (main): Call notice_open_fds.
2684 * spu-low.c: Include filestuff.h.
2685 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2687 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2689 * Makefile.in: Explain why ../target and ../nat are not
2690 listed as include file search paths.
2691 (linux-waitpid.o): New object file rule.
2692 * configure.srv (srv_native_linux_obj): New variable.
2693 Replace all occurrences of linux native object files with
2694 $srv_native_linux_obj.
2695 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2696 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2697 (linux_enable_event_reporting): Remove declaration.
2698 (my_waitpid): Moved to common/linux-waitpid.c.
2699 (linux_wait_for_event): Pass ptid when calling
2700 linux_enable_event_reporting.
2701 (linux_supports_tracefork_flag): Remove.
2702 (linux_enable_event_reporting): Likewise.
2703 (linux_tracefork_grandchild): Remove.
2704 (STACK_SIZE): Moved to common/linux-ptrace.c.
2705 (linux_tracefork_child): Remove.
2706 (linux_test_for_tracefork): Remove.
2707 (linux_look_up_symbols): Call linux_supports_traceclone.
2708 (initialize_low): Remove call to linux_test_for_tracefork.
2709 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2710 common/linux-ptrace.h.
2711 (PTRACE_TYPE_ARG4): Likewise.
2712 Include linux-ptrace.h.
2714 2013-08-21 Pedro Alves <palves@redhat.com>
2716 * config.in: Renegerate.
2718 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2720 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2721 (SFILES): Remove $(srcdir)/common/target-common.c and
2722 add $(srcdir)/target/waitstatus.c.
2723 (OBS): Remove target-common.o and add waitstatus.o.
2724 (server_h): Remove $(srcdir)/../common/target-common.h and
2725 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2726 and $(srcdir)/../target/waitstatus.h.
2727 (target-common.o): Remove.
2728 (waitstatus.o): New target object file.
2729 * target.h: Do not include target-common.h and
2730 include target/resume.h, target/wait.h and
2731 target/waitstatus.h.
2733 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2735 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2736 to PTRACE_TYPE_ARG3.
2737 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2738 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2740 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2741 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2743 2013-07-27 Jie Zhang <jie@codesourcery.com>
2744 Daniel Jacobowitz <dan@codesourcery.com>
2745 Yao Qi <yao@codesourcery.com>
2747 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2748 (mips-linux-watch.o): New rule.
2749 (mips_linux_watch_h): New variable.
2750 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2752 * linux-mips-low.c: Include mips-linux-watch.h.
2753 (struct arch_process_info, struct arch_lwp_info): New.
2754 (update_watch_registers_callback): New function.
2755 (mips_linux_new_process, mips_linux_new_thread) New functions.
2756 (mips_linux_prepare_to_resume, mips_insert_point): New
2758 (mips_remove_point, mips_stopped_by_watchpoint): New
2760 (rsp_bp_type_to_target_hw_bp_type): New function.
2761 (mips_stopped_data_address): New function.
2762 (the_low_target): Add watchpoint support functions.
2764 2013-07-27 Yao Qi <yao@codesourcery.com>
2766 * i386-low.c: Include break-common.h.
2767 (enum target_hw_bp_type): Remove.
2769 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2771 * Makefile.in (SFILES): /common/target-common.c.
2772 (OBS): Add target-common.o.
2773 (server_h): Add $(srcdir)/../common/target-common.h.
2774 (target-common.o): New target.
2775 * server.c (queue_stop_reply_callback): Free
2776 status string after use.
2777 * target.c (target_waitstatus_to_string): Remove.
2778 * target.h: Include target-common.h.
2779 (resume_kind): Likewise.
2780 (target_waitkind): Likewise.
2781 (target_waitstatus): Likewise.
2782 (TARGET_WNOHANG): Likewise.
2784 2013-07-04 Yao Qi <yao@codesourcery.com>
2786 * Makefile.in (host_alias): Use @host_noncanonical@.
2787 (target_alias): Use @target_noncanonical@.
2788 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2789 ACX_NONCANONICAL_HOST.
2790 * configure: Regenerated.
2793 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2795 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2796 * configure: Rebuild.
2797 * Makefile.in (version_host, version_target): Get from configure.
2798 (version.c): Use $(version_host) and $(version_target).
2800 2013-07-03 Pedro Alves <palves@redhat.com>
2802 * Makefile.in (config.status): Depend on development.sh.
2803 * acinclude.m4: Include libmcheck.m4.
2804 * configure: Regenerate.
2806 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2808 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2809 attribute inside the parentheses.
2810 (winapi_DebugSetProcessKillOnExit): Ditto.
2811 (winapi_DebugBreakProcess): Ditto.
2812 (winapi_GenerateConsoleCtrlEvent): Ditto.
2814 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2816 * notif.h (notif_event): Add a dummy member to avoid compiler
2819 2013-07-01 Pedro Alves <palves@redhat.com>
2821 * hostio.c (HOSTIO_PATH_MAX): Define.
2822 (require_filename, handle_open, handle_unlink, handle_readlink):
2825 2013-07-01 Pedro Alves <palves@redhat.com>
2827 * server.h: Include "pathmax.h".
2828 * linux-low.c: Don't include sys/param.h.
2829 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2831 * win32-low.c: Don't include sys/param.h.
2832 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2834 2013-07-01 Pedro Alves <palves@redhat.com>
2836 * event-loop.c: Don't check HAVE_UNISTD_H before including
2838 * gdbreplay.c: Likewise.
2839 * remote-utils.c: Likewise.
2840 * server.c: Likewise.
2841 * configure.ac: Don't check for unistd.h.
2842 * configure: Regenerate.
2844 2013-06-28 Tom Tromey <tromey@redhat.com>
2846 * Makefile.in (version.c): Use version.in, not
2849 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2851 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2852 * configure: Rebuild.
2853 * Makefile.in (version_host, version_target): Get from configure.
2854 (version.c): Use $(version_host) and $(version_target).
2856 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2858 Fix trace-status to output user name without trailing colon.
2859 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2861 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2863 Fix trace-status to output proper start-time and stop-time.
2864 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2865 output start time and stop time in hex as gdb expects.
2867 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2869 * tracepoint.c (build_traceframe_info_xml): Output trace state
2870 variables present in the trace buffer.
2872 2013-06-24 Tom Tromey <tromey@redhat.com>
2874 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2876 (version.o): Remove.
2877 * gdbreplay.c: Include version.h.
2878 (version, host_name): Don't declare.
2879 * server.h: Include version.h.
2880 (version, host_name): Don't declare.
2882 2013-06-12 Pedro Alves <palves@redhat.com>
2884 * linux-x86-low.c (linux_is_elf64): Delete global.
2885 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2886 with local linux_pid_exe_is_elf_64_file use.
2888 2013-06-11 Pedro Alves <palves@redhat.com>
2890 * linux-low.c (regset_disabled, disable_regset): New functions.
2891 (regsets_fetch_inferior_registers)
2892 (regsets_store_inferior_registers): Use them.
2893 (initialize_regsets_info); Don't allocate the disabled_regsets
2895 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2898 2013-06-11 Pedro Alves <palves@redhat.com>
2900 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2903 2013-06-11 Pedro Alves <palves@redhat.com>
2905 * linux-x86-low.c (initialize_low_arch): Call
2906 init_registers_x32_avx_linux.
2908 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2910 Fix compatibility with Android Bionic.
2911 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2914 2013-06-07 Pedro Alves <palves@redhat.com>
2917 * Makefile.in (OBS): Add tdesc.o.
2918 (IPA_OBJS): Add tdesc-ipa.o.
2919 (tdesc-ipa.o): New rule.
2920 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2922 * linux-low.c (new_inferior): Delete.
2923 (disabled_regsets, num_regsets): Delete.
2924 (linux_add_process): Adjust to set the new per-process
2926 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2927 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2928 was a stop. When calling arch_setup, switch the current inferior
2929 to the thread that got an event.
2930 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2931 (regsets_fetch_inferior_registers)
2932 (regsets_store_inferior_registers): New regsets_info parameter.
2934 (linux_register_in_regsets): New regs_info parameter. Adjust to
2936 (register_addr, fetch_register, store_register): New usrregs_info
2937 parameter. Adjust to use it.
2938 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2939 parameter regs_info. Adjust to use it.
2940 (linux_fetch_registers): Get the current inferior's regs_info, and
2942 (linux_store_registers): Ditto.
2943 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2944 (initialize_low): Don't initialize the target_regsets here. Call
2945 initialize_low_arch.
2946 * linux-low.h (target_regsets): Delete declaration.
2947 (struct regsets_info): New.
2948 (struct usrregs_info): New.
2949 (struct regs_info): New.
2950 (struct process_info_private) <new_inferior>: New field.
2951 (struct linux_target_ops): Delete the num_regs, regmap, and
2952 regset_bitmap fields. New field regs_info.
2953 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2954 * i387-fp.c (num_xmm_registers): Delete.
2955 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2956 calls to new interface.
2957 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2958 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2959 Infer the number of xmm registers from the regcache's target
2961 * i387-fp.h (num_xmm_registers): Delete.
2962 * inferiors.c (add_thread): Don't install the thread's regcache
2964 * proc-service.c (gregset_info): Fetch the current inferior's
2965 regs_info. Adjust to use it.
2966 * regcache.c: Include tdesc.h.
2967 (register_bytes, reg_defs, num_registers)
2968 (gdbserver_expedite_regs): Delete.
2969 (get_thread_regcache): If the thread doesn't have a regcache yet,
2970 create one, instead of aborting gdbserver.
2971 (regcache_invalidate_one): Rename to ...
2972 (regcache_invalidate_thread): ... this.
2973 (regcache_invalidate_one): New.
2974 (regcache_invalidate): Only invalidate registers of the current
2976 (init_register_cache): Add target_desc parameter, and use it.
2977 (new_register_cache): Ditto. Assert the target description has a
2978 non zero registers_size.
2979 (regcache_cpy): Add assertions. Adjust.
2980 (realloc_register_cache, set_register_cache): Delete.
2981 (registers_to_string, registers_from_string): Adjust.
2982 (find_register_by_name, find_regno, find_register_by_number)
2983 (register_cache_size): Add target_desc parameter, and use it.
2984 (free_register_cache_thread, free_register_cache_thread_one)
2985 (regcache_release, register_cache_size): New.
2986 (register_size): Add target_desc parameter, and use it.
2987 (register_data, supply_register, supply_register_zeroed)
2988 (supply_regblock, supply_register_by_name, collect_register)
2989 (collect_register_as_string, collect_register_by_name): Adjust.
2990 * regcache.h (struct target_desc): Forward declare.
2991 (struct regcache) <tdesc>: New field.
2992 (init_register_cache, new_register_cache): Add target_desc
2994 (regcache_invalidate_thread): Declare.
2995 (regcache_invalidate_one): Delete declaration.
2996 (regcache_release): Declare.
2997 (find_register_by_number, register_cache_size, register_size)
2998 (find_regno): Add target_desc parameter.
2999 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3001 * remote-utils.c: Include tdesc.h.
3002 (outreg, prepare_resume_reply): Adjust.
3003 * server.c: Include tdesc.h.
3004 (gdbserver_xmltarget): Delete declaration.
3005 (get_features_xml, process_serial_event): Adjust.
3006 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3008 (struct process_info) <tdesc>: New field.
3009 (ipa_tdesc): Declare.
3010 * tdesc.c: New file.
3011 * tdesc.h: New file.
3012 * tracepoint.c: Include tdesc.h.
3013 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3014 (get_context_regcache): Adjust to pass ipa_tdesc down.
3015 (do_action_at_tracepoint): Adjust to get the register cache size
3016 from the context regcache's description.
3017 (traceframe_walk_blocks): Adjust to get the register cache size
3018 from the current trace frame's description.
3019 (traceframe_get_pc): Adjust to get current trace frame's
3020 description and pass it down.
3021 (gdb_collect): Adjust to get the register cache size from the
3023 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3024 (gdbserver_xmltarget): Delete.
3025 (initialize_low_tracepoint): Set the ipa's target description.
3026 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3027 (initialize_low_tracepoint): Set the ipa's target description.
3028 * linux-x86-low.c: Include tdesc.h.
3029 [__x86_64__] (is_64bit_tdesc): New.
3030 (ps_get_thread_area, x86_get_thread_area): Use it.
3031 (i386_cannot_store_register): Rename to ...
3032 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3033 (i386_cannot_fetch_register): Rename to ...
3034 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3035 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3037 (target_regsets): Rename to ...
3038 (x86_regsets): ... this.
3039 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3041 (x86_siginfo_fixup): Use is_64bit_tdesc.
3042 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3043 (tdesc_x32_avx_linux, tdesc_x32_linux)
3044 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3046 (x86_linux_update_xmltarget): Delete.
3047 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3048 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3049 (AMD64_LINUX_USER64_CS): New.
3050 (x86_linux_read_description): New, based on
3051 x86_linux_update_xmltarget.
3052 (same_process_callback): New.
3053 (x86_arch_setup_process_callback): New.
3054 (x86_linux_update_xmltarget): New.
3055 (x86_regsets_info): New.
3056 (amd64_linux_regs_info): New.
3057 (i386_linux_usrregs_info): New.
3058 (i386_linux_regs_info): New.
3059 (x86_linux_regs_info): New.
3060 (x86_arch_setup): Reimplement.
3061 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3062 (x86_emit_ops): Ditto.
3063 (the_low_target): Adjust. Install x86_linux_regs_info,
3064 x86_cannot_fetch_register, and x86_cannot_store_register.
3065 (initialize_low_arch): New.
3066 * linux-ia64-low.c (tdesc_ia64): Declare.
3067 (ia64_fetch_register): Adjust.
3068 (ia64_usrregs_info, regs_info): New globals.
3069 (ia64_regs_info): New function.
3070 (the_low_target): Adjust.
3071 (initialize_low_arch): New function.
3072 * linux-sparc-low.c (tdesc_sparc64): Declare.
3073 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3075 (sparc_arch_setup): New function.
3076 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3077 (the_low_target): Adjust.
3078 (initialize_low_arch): New function.
3079 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3080 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3081 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3082 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3083 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3084 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3085 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3086 (tdesc_powerpc_isa205_vsx64l): Declare.
3087 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3088 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3089 (ppc_set_pc, ppc_get_hwcap): Adjust.
3090 (ppc_usrregs_info): Forward declare.
3091 (!__powerpc64__) ppc_regmap_adjusted: New global.
3092 (ppc_arch_setup): Adjust to the current process'es target
3094 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3095 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3096 (ppc_store_evrregset): Adjust.
3097 (target_regsets): Rename to ...
3098 (ppc_regsets): ... this, and make static.
3099 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3100 (ppc_regs_info): New function.
3101 (the_low_target): Adjust.
3102 (initialize_low_arch): New function.
3103 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3104 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3105 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3106 (tdesc_s390x_linux64v2): Declare.
3107 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3108 (s390_fill_gregset, s390_store_last_break): Adjust.
3109 (target_regsets): Rename to ...
3110 (s390_regsets): ... this, and make static.
3111 (s390_get_pc, s390_set_pc): Adjust.
3112 (s390_get_hwcap): New target_desc parameter, and use it.
3113 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3114 (s390_arch_setup): Adjust to set the current process'es target
3115 description. Don't adjust the regmap.
3116 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3117 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3118 (regs_info_3264): New globals.
3119 (s390_regs_info): New function.
3120 (the_low_target): Adjust.
3121 (initialize_low_arch): New function.
3122 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3123 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3124 [__mips64] (init_registers_mips_linux)
3125 (init_registers_mips_dsp_linux): Delete defines.
3126 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3127 (have_dsp): New global.
3128 (mips_read_description): New, based on mips_arch_setup.
3129 (mips_arch_setup): Reimplement.
3130 (get_usrregs_info): New function.
3131 (mips_cannot_fetch_register, mips_cannot_store_register)
3132 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3133 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3134 (target_regsets): Rename to ...
3135 (mips_regsets): ... this, and make static.
3136 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3137 (dsp_regs_info, regs_info): New globals.
3138 (mips_regs_info): New function.
3139 (the_low_target): Adjust.
3140 (initialize_low_arch): New function.
3141 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3142 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3144 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3145 (arm_read_description): New, with bits factored from
3147 (arm_arch_setup): Reimplement.
3148 (target_regsets): Rename to ...
3149 (arm_regsets): ... this, and make static.
3150 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3151 (arm_regs_info): New function.
3152 (the_low_target): Adjust.
3153 (initialize_low_arch): New function.
3154 * linux-m68k-low.c (tdesc_m68k): Declare.
3155 (target_regsets): Rename to ...
3156 (m68k_regsets): ... this, and make static.
3157 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3158 (m68k_regs_info): New function.
3159 (m68k_arch_setup): New function.
3160 (the_low_target): Adjust.
3161 (initialize_low_arch): New function.
3162 * linux-sh-low.c (tdesc_sharch): Declare.
3163 (target_regsets): Rename to ...
3164 (sh_regsets): ... this, and make static.
3165 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3166 (sh_regs_info, sh_arch_setup): New functions.
3167 (the_low_target): Adjust.
3168 (initialize_low_arch): New function.
3169 * linux-bfin-low.c (tdesc_bfin): Declare.
3170 (bfin_arch_setup): New function.
3171 (bfin_usrregs_info, regs_info): New globals.
3172 (bfin_regs_info): New function.
3173 (the_low_target): Adjust.
3174 (initialize_low_arch): New function.
3175 * linux-cris-low.c (tdesc_cris): Declare.
3176 (cris_arch_setup): New function.
3177 (cris_usrregs_info, regs_info): New globals.
3178 (cris_regs_info): New function.
3179 (the_low_target): Adjust.
3180 (initialize_low_arch): New function.
3181 * linux-cris-low.c (tdesc_crisv32): Declare.
3182 (cris_arch_setup): New function.
3183 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3184 (cris_regs_info): New function.
3185 (the_low_target): Adjust.
3186 (initialize_low_arch): New function.
3187 * linux-m32r-low.c (tdesc_m32r): Declare.
3188 (m32r_arch_setup): New function.
3189 (m32r_usrregs_info, regs_info): New globals.
3190 (m32r_regs_info): Adjust.
3191 (initialize_low_arch): New function.
3192 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3193 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3194 (tic6x_usrregs_info): Forward declare.
3195 (tic6x_read_description): New function, based on ...
3196 (tic6x_arch_setup): ... this. Reimplement.
3197 (target_regsets): Rename to ...
3198 (tic6x_regsets): ... this, and make static.
3199 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3200 (tic6x_regs_info): New function.
3201 (the_low_target): Adjust.
3202 (initialize_low_arch): New function.
3203 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3204 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3205 (target_regsets): Rename to ...
3206 (xtensa_regsets): ... this, and make static.
3207 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3209 (xtensa_arch_setup, xtensa_regs_info): New functions.
3210 (the_low_target): Adjust.
3211 (initialize_low_arch): New function.
3212 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3213 (nios2_arch_setup): Set the current process'es tdesc.
3214 (target_regsets): Rename to ...
3215 (nios2_regsets): ... this.
3216 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3217 (nios2_regs_info): New function.
3218 (the_low_target): Adjust.
3219 (initialize_low_arch): New function.
3220 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3221 (aarch64_arch_setup): Set the current process'es tdesc.
3222 (target_regsets): Rename to ...
3223 (aarch64_regsets): ... this.
3224 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3225 (aarch64_regs_info): New function.
3226 (the_low_target): Adjust.
3227 (initialize_low_arch): New function.
3228 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3230 (target_regsets): Rename to ...
3231 (tile_regsets): ... this.
3232 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3233 (tile_regs_info): New function.
3234 (tile_arch_setup): Set the current process'es tdesc.
3235 (the_low_target): Adjust.
3236 (initialize_low_arch): New function.
3237 * spu-low.c (tdesc_spu): Declare.
3238 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3239 * win32-arm-low.c (tdesc_arm): Declare.
3240 (arm_arch_setup): New function.
3241 (the_low_target): Install arm_arch_setup instead of
3243 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3244 (init_windows_x86): Rename to ...
3245 (i386_arch_setup): ... this. Set `win32_tdesc'.
3246 (the_low_target): Adjust.
3247 * win32-low.c (win32_tdesc): New global.
3248 (child_add_thread): Don't create the thread cache here.
3249 (do_initial_child_stuff): Set the new process'es tdesc.
3250 * win32-low.h (struct target_desc): Forward declare.
3251 (win32_tdesc): Declare.
3252 * lynx-i386-low.c (tdesc_i386): Declare global.
3253 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3254 * lynx-low.c (lynx_tdesc): New global.
3255 (lynx_add_process): Set the new process'es tdesc.
3256 * lynx-low.h (struct target_desc): Forward declare.
3257 (lynx_tdesc): Declare global.
3258 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3259 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3260 * nto-low.c (nto_tdesc): New global.
3261 (do_attach): Set the new process'es tdesc.
3262 * nto-low.h (struct target_desc): Forward declare.
3263 (nto_tdesc): Declare.
3264 * nto-x86-low.c (tdesc_i386): Declare.
3265 (nto_x86_arch_setup): Set `nto_tdesc'.
3267 2013-06-04 Gary Benson <gbenson@redhat.com>
3269 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3270 to qSupported response when appropriate.
3271 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3272 with nonzero-length annex.
3273 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3274 arguments supplied in annex.
3276 2013-05-31 Doug Evans <dje@google.com>
3279 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3280 64 bits in 64-cross-32 environment.
3282 2013-05-28 Pedro Alves <palves@redhat.com>
3284 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3285 (aarch64-without-fpu.c): Delete rule.
3286 * configure.srv (aarch64*-*-linux*): Remove references to
3287 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3288 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3291 2013-05-24 Pedro Alves <palves@redhat.com>
3293 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3294 instead of strchr/decode_address. Error if the range isn't split
3295 with a ','. Don't assume there's be a ':' in the action.
3297 2013-05-23 Yao Qi <yao@codesourcery.com>
3298 Pedro Alves <palves@redhat.com>
3300 * linux-low.c (lwp_in_step_range): New function.
3301 (linux_wait_1): If the thread was range stepping and stopped
3302 outside the stepping range, report the stop to GDB. Otherwise,
3303 continue stepping. Add range stepping debug output.
3304 (linux_set_resume_request): Copy the step range from the resume
3306 (linux_supports_range_stepping): New.
3307 (linux_target_ops) <supports_range_stepping>: Set to
3308 linux_supports_range_stepping.
3309 * linux-low.h (struct linux_target_ops)
3310 <supports_range_stepping>: New field.
3311 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3312 * linux-x86-low.c (x86_supports_range_stepping): New.
3313 (the_low_target) <supports_range_stepping>: Set to
3314 x86_supports_range_stepping.
3315 * server.c (handle_v_cont): Handle 'r' action.
3316 (handle_v_requests): Append ";r" if the target supports range
3318 * target.h (struct thread_resume) <step_range_start,
3319 step_range_end>: New fields.
3320 (struct target_ops) <supports_range_stepping>:
3322 (target_supports_range_stepping): New macro.
3324 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3326 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3327 confusion in comment.
3329 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3331 * lynx-low.c (struct process_info_private): New type.
3332 (lynx_add_process): New function.
3333 (lynx_create_inferior, lynx_attach): Replace calls to
3334 add_process by calls to lynx_add_process.
3335 (lynx_resume): If PTID is null, then try using
3336 current_process()->private->last_wait_event_ptid.
3338 (lynx_clear_inferiors): Delete. The contents of that function
3339 has been inlined in lynx_mourn;
3340 (lynx_wait_1): Save the ptid in the process's private data.
3341 (lynx_mourn): Free the process' private data. Replace call
3342 to lynx_clear_inferiors by call to clear_inferiors.
3344 2013-05-17 Yao Qi <yao@codesourcery.com>
3346 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3349 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3351 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3352 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3353 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3354 PT_TEXT_END_ADDR guards. Update comments.
3355 (linux_target_op) <read_offsets>: Conditionally define to
3356 linux_read_offsets if the target is UCLIBC and if it defines
3357 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3359 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3360 Andrew Jenner <andrew@codesourcery.com>
3362 * Makefile.in (SFILES): Add linux-nios2-low.c.
3363 (clean): Add action to delete nios2-linux.c.
3364 (nios2-linux.c): New rule.
3365 * configure.srv: Add nios2*-*-linux*.
3366 * linux-nios2-low.c: New.
3368 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3370 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3372 2013-04-25 Hui Zhu <hui@codesourcery.com>
3375 * ax.c (ax_printf): Add fflush.
3377 2013-04-22 Tom Tromey <tromey@redhat.com>
3379 * Makefile.in (SFILES): Add filestuff.c.
3380 (OBS): Add filestuff.o.
3381 (filestuff.o): New target.
3382 * config.in, configure: Rebuild.
3383 * configure.ac: Check for fdwalk, pipe2.
3385 2013-04-17 Pedro Alves <palves@redhat.com>
3387 * configure.ac (USE_THREAD_DB): Delete variable.
3388 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3389 Don't AC_SUBST USE_THREAD_DB.
3390 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3391 * config.in, configure: Regenerate.
3393 2013-04-16 Pedro Alves <palves@redhat.com>
3395 * linux-low.h (struct lwp_info) <thread_known>: Move under
3396 the USE_THREAD_DB #ifdef.
3398 2013-04-16 Pedro Alves <palves@redhat.com>
3400 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3401 (linux-low.o): Delete rule.
3402 * linux-low.h: Always include "gdb_thread_db.h" instead of
3403 conditionally including thread_db.h.
3404 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3407 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3409 * Makefile.in (install-only): Fix make install regression.
3411 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3413 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3414 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3416 * gdbserver.1: Remove.
3418 2013-03-22 Pedro Alves <palves@redhat.com>
3420 * linux-low.c (handle_extended_wait): Don't call
3421 linux_enable_event_reporting.
3423 2013-03-15 Tony Theodore <tonyt@logyst.com>
3426 * Makefile.in (SHELL): Use @SHELL@.
3428 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3430 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3433 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3435 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3436 Remove extraneous NULL element.
3438 2013-03-13 Yao Qi <yao@codesourcery.com>
3440 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3441 'V' block in trace frame.
3443 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3445 * target.h (struct target_ops): Add btrace ops.
3446 (target_supports_btrace): New macro.
3447 (target_enable_btrace): New macro.
3448 (target_disable_btrace): New macro.
3449 (target_read_btrace): New macro.
3450 * gdbthread.h (struct thread_info): Add btrace field.
3451 * server.c: Include btrace-common.h.
3452 (handle_btrace_general_set): New function.
3453 (handle_btrace_enable): New function.
3454 (handle_btrace_disable): New function.
3455 (handle_general_set): Call handle_btrace_general_set.
3456 (handle_qxfer_btrace): New function.
3457 (struct qxfer qxfer_packets[]): Add btrace entry.
3458 * inferiors.c (remove_thread): Disable btrace.
3459 * linux-low: Include linux-btrace.h.
3460 (linux_low_enable_btrace): New function.
3461 (linux_low_read_btrace): New function.
3462 (linux_target_ops): Add btrace ops.
3463 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3464 Add srv_linux_btrace=yes.
3465 (x86_64-*-linux*): Add linux-btrace.o.
3466 Add srv_linux_btrace=yes.
3467 * configure.ac: Define HAVE_LINUX_BTRACE.
3468 * config.in: Regenerated.
3469 * configure: Regenerated.
3471 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3473 * server.c (handle_qxfer): Preserve error message if -3 is
3475 (qxfer): Document the -3 return value.
3477 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3479 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3480 (linux_btrace_h): New variable.
3481 (linux-btrace.o): New rule.
3483 2013-03-08 Stan Shebs <stan@codesourcery.com>
3484 Hafiz Abid Qadeer <abidh@codesourcery.com>
3486 * tracepoint.c (trace_buffer_size): New global.
3487 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3488 (init_trace_buffer): Change to one-argument function. Allocate
3489 trace buffer memory.
3490 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3491 handle QTBuffer:size packet.
3492 (cmd_bigqtbuffer_size): New function.
3493 (initialize_tracepoint): Call init_trace_buffer with
3494 DEFAULT_TRACE_BUFFER_SIZE.
3495 * server.c (handle_query): Add QTBuffer:size in the
3498 2013-03-07 Yao Qi <yao@codesourcery.com>
3500 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3501 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3503 (cmd_qtsp): Adjust condition. Do post increment.
3504 Set cur_action and cur_step_action back to 0.
3506 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3509 * linux-low.c (linux_write_memory): Return early success if LEN is
3512 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3514 * configure.srv: Add x86_64-*-cygwin* as target.
3516 2013-02-28 Tom Tromey <tromey@redhat.com>
3518 * configure.ac: Invoke AC_SYS_LARGEFILE.
3519 * configure, config.in: Rebuild.
3521 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3523 * win32-low.c: Throughout, fix format strings and casts of
3524 printf-like functions to avoid type related warnings on all
3526 (get_child_debug_event): Print dwDebugEventCode as hex since
3527 that's how it's usually documented.
3529 2013-02-28 Yao Qi <yao@codesourcery.com>
3531 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3534 2013-02-27 Jiong Wang <jiwang@tilera.com>
3536 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3537 (reg-tilegx32.c): New rule.
3538 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3539 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3540 different register info initializer according to elf class.
3541 (init_registers_tilgx32): New function. The tilegx32 register info
3543 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3544 (tile_store_gregset): Likewise.
3546 2013-02-27 Yao Qi <yao@codesourcery.com>
3548 * server.c (process_point_options): Print debug message when
3549 debug_threads is true.
3551 2013-02-26 Yao Qi <yao@codesourcery.com>
3553 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3555 2013-02-19 Pedro Alves <palves@redhat.com>
3556 Kai Tietz <ktietz@redhat.com>
3560 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3561 instead of strtoul to extract address from packet.
3562 (process_serial_event) <'z'>: Likewise.
3564 2013-02-18 Yao Qi <yao@codesourcery.com>
3566 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3568 2013-02-14 Pedro Alves <palves@redhat.com>
3572 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3573 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3575 2013-02-14 Pedro Alves <palves@redhat.com>
3577 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3579 2013-02-14 Pedro Alves <palves@redhat.com>
3581 * tracepoint.c (save_string): Delete.
3582 (add_tracepoint_action): Use savestring instead of save_string.
3584 2013-02-12 Pedro Alves <palves@redhat.com>
3586 * linux-xtensa-low.c: Ditto.
3587 * xtensa-xtregs.c: Ditto.
3589 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3591 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3594 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3596 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3597 aarch64_num_wp_regs and aarch64_num_bp_regs to
3598 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3600 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3602 * linux-aarch64-low.c (ps_get_thread_area): Replace
3603 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3605 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3606 Marcus Shawcroft <marcus.shawcroft@arm.com>
3607 Nigel Stephens <nigel.stephens@arm.com>
3608 Yufeng Zhang <yufeng.zhang@arm.com>
3610 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3611 (aarch64.c, aarch64-without-fpu.c): New targets.
3612 * configure.srv (aarch64*-*-linux*): New.
3613 * linux-aarch64-low.c: New file.
3615 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3617 * linux-low.c (handle_extended_wait, linux_create_inferior)
3618 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3619 (dequeue_one_deferred_signal, linux_resume_one_thread)
3620 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3621 (linux_tracefork_grandchild, linux_test_for_tracefork)
3622 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3623 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3624 where the argument is 0.
3626 2013-01-25 Yao Qi <yao@codesourcery.com>
3628 * event-loop.c: Include "queue.h".
3629 (gdb_event_p): New typedef.
3630 (struct gdb_event) <next_event>: Remove.
3631 (event_queue): Change to QUEUE(gdb_event_p).
3632 (async_queue_event): Remove.
3633 (gdb_event_xfree): New.
3634 (initialize_event_loop): New.
3635 (process_event): Use API from QUEUE.
3636 (wait_for_event): Likewise.
3637 * server.c (main): Call initialize_event_loop.
3638 * server.h (initialize_event_loop): Declare.
3640 2013-01-18 Yao Qi <yao@codesourcery.com>
3642 * ax.h (struct eval_agent_expr_context): New.
3643 (gdb_eval_agent_expr): Update declaration.
3644 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3645 TFRAME. Add new argument CTX.
3646 * server.h (struct eval_agent_expr_context): Declare.
3647 (agent_mem_read, agent_tsv_read): Update declaration.
3648 (agent_mem_read_string): Likewise.
3649 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3650 (add_traceframe_block): Add new argument TPOINT.
3651 Increase TPOINT->traceframe_usage.
3652 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3653 eval_tracepoint_agent_expr.
3654 (condition_true_at_tracepoint): Likewise.
3655 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3656 (agent_mem_read_string, agent_tsv_read): Likewise.
3658 2013-01-16 Yao Qi <yao@codesourcery.com>
3660 * linux-low.c (linux_resume_one_lwp): Don't check
3661 'lwp->bp_reinsert != 0'.
3663 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3664 Pedro Alves <palves@redhat.com>
3666 * lynx-low.c (ptrace_request_to_str): Define a temporary
3667 macro and use it to simplify this function's implementation.
3669 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3671 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3674 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3676 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3678 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3680 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3682 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3684 * lynx-low.c (lynx_resume): Use the resume_info parameter
3685 to determine the ptid for the lynx_ptrace call, unless
3686 it is equal to minus_one_ptid, in which case we use the
3687 ptid of the current_inferior.
3688 (lynx_wait_1): After having received a thread create/exit
3689 event, resume the inferior's execution using the signaling
3690 thread's ptid, rather than the old ptid.
3692 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3694 * lynx-low.c (lynx_resume): Delete variable ret.
3696 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3698 * gdbreplay.c (gdbreplay_version): Update copyright year.
3699 * server.c (gdbserver_version): Likewise.
3701 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3703 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3706 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3708 * lynx-low.c (ptrace_request_to_str): Add handling for
3711 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3713 * lynx-low.c (lynx_attach): Delete variable new_process.
3715 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3717 * lynx-low.c (lynx_create_inferior): Delete variable
3720 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3722 * lynx-low.c (ptrace_request_to_str): Do not handle
3723 PTRACE_GETTHREADLIST if this macro does not exist.
3725 2012-12-15 Yao Qi <yao@codesourcery.com>
3727 * Makefile.in (OBS): Add notif.o.
3728 * notif.c, notif.h: New.
3729 * server.c: Include "notif.h".
3730 (struct vstop_notif) <next>: Remove.
3732 (queue_stop_reply): Update.
3733 (push_event, send_next_stop_reply): Remove.
3734 (discard_queued_stop_replies): Update.
3735 (notif_stop): New variable.
3736 (handle_v_stopped): Remove.
3737 (handle_v_requests): Don't call handle_v_stopped. Call
3738 handle_ack_notif instead.
3739 (queue_stop_reply_callback): Call notif_event_enque instead
3740 of queue_stop_reply.
3741 (handle_status): Don't call send_next_stop_reply, call
3742 notif_write_event instead.
3743 (kill_inferior_callback): Likewise.
3744 (detach_or_kill_inferior_callback): Likewise.
3745 (main): Call initialize_notif.
3746 (process_serial_event): Call QUEUE_is_empty.
3747 (handle_target_event): Call notif_push instead of push event.
3748 * server.h (push_event): Remove declaration.
3750 2012-12-10 Tom Tromey <tromey@redhat.com>
3752 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3753 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3756 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3757 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3758 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3759 (amd64-linux-ipa.o, ax.o): Rewrite.
3760 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3761 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3762 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3763 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3764 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3765 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3766 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3767 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3768 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3769 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3770 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3771 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3772 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3773 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3774 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3775 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3776 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3777 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3778 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3779 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3780 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3781 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3782 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3783 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3784 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3785 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3786 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3787 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3788 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3789 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3790 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3791 (reg-tilegx.o): Remove.
3792 (all_object_files): New macro.
3793 Include .deps files.
3794 * aclocal.m4, configure: Rebuild.
3795 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3796 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3797 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3799 2012-12-05 Tom Tromey <tromey@redhat.com>
3802 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3804 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3806 * configure.ac: Check for linux/perf_event.h.
3807 * config.in: Regenerated.
3808 * configure: Regenerated.
3810 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3812 * hostio.c (handle_readlink): Decrease buffer size
3813 parameter passed to readlink by one byte.
3815 2012-11-26 Yao Qi <yao@codesourcery.com>
3817 * configure.ac (build_warnings): Append '-Wempty-body'.
3818 * configure: Regenerated.
3819 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3822 2012-11-15 Pierre Muller <muller@sourceware.org>
3824 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3825 * config.in: Regenerate.
3826 * configure: Regenerate.
3827 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3828 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3829 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3830 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3832 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3833 instead of <sys/wait.h> header.
3834 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3836 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3838 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3839 (various make rules): Remove -DGDBSERVER
3841 2012-11-09 Yao Qi <yao@codesourcery.com>
3843 * spu-low.c (current_ptid): Move it to ..
3844 * gdbthread.h: ... here. New.
3845 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3846 * server.c (myresume, process_serial_event): Likewise.
3847 * thread-db.c (thread_db_find_new_threads): Likewise.
3848 * tracepoint.c (run_inferior_command): Likewise.
3850 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3852 * server.c (handle_search_memory_1): Include access length in
3855 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3857 * linux-crisv32-low.c: Fix compile errors.
3859 2012-09-04 Yao Qi <yao@codesourcery.com>
3861 * tracepoint.c (cmd_qtsv): Adjust debug message.
3862 Don't check CUR_TPOINT.
3864 2012-08-28 Yao Qi <yao@codesourcery.com>
3866 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3867 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3868 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3869 Remove declarations of xmalloc, xreallloc, xstrdup and
3871 * Makefile.in (libiberty_h): New.
3872 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3873 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3875 2012-08-23 Yao Qi <yao@codesourcery.com>
3877 * server.h: Remove declaration of 'xsnprintf'.
3879 2012-08-22 Keith Seitz <keiths@redhat.com>
3881 * server.h: Include build-gnulib-gbserver/config.h.
3882 * gdbreplay.c: Likewise.
3884 2012-08-08 Doug Evans <dje@google.com>
3886 * Makefile.in (SFILES): Add gdb_vecs.c.
3887 (OBS): Add gdb_vecs.o.
3888 (gdb_vecs_h, host_defs_h): New variables.
3889 (thread-db.o): Add $(gdb_vecs_h) dependency.
3890 (gdb_vecs.o): New rule.
3891 * thread-db.c: #include "gdb_vecs.h".
3892 (thread_db_load_search): Use a vector to iterate over path elements.
3893 Handle text appearing after "$pdir".
3895 * configure.ac: Add check for strstr.
3896 * config.in: Regenerate.
3897 * configure: Regenerate.
3899 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3901 * hostio.c (handle_pread): If pread fails, fall back to attempting
3903 (handle_pwrite): Likewise for pwrite.
3905 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3907 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3908 between unsupported TYPE and unimplementable ADDR/LEN combination.
3909 (arm_insert_point): Act on new return value.
3911 2012-07-31 Pedro Alves <palves@redhat.com>
3913 * server.c (process_point_options): Only skip tokens if we find
3914 one that is unrecognized. Don't treat 'X' specially while
3915 skipping unrecognized tokens.
3917 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3919 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3920 to 4-byte-align HW breakpoint addresses for Thumb.
3922 2012-07-27 Yao Qi <yao@codesourcery.com>
3926 * server.h: Declare gdb_agent_about_to_close.
3927 * target.c (kill_inferior): Include "agent.h".
3928 New. Send command 'kill'.
3929 * target.h (kill_inferior): Removed macro.
3930 * tracepoint.c (gdb_agent_about_to_close): New.
3931 (gdb_agent_helper_thread): Handle command 'close'.
3932 Wait endlessly until the inferior stops.
3933 Install gdb_agent_remove_socket to atexit hook.
3934 (agent_socket_name): New static variable.
3935 (gdb_agent_socket_init): Replace local variable 'name' with
3936 'agent_socket_name'.
3937 (gdb_agent_remove_socket): New.
3939 2012-07-27 Yao Qi <yao@codesourcery.com>
3941 * server.c (process_point_options): Stop at 'X' when parsing.
3943 2012-07-19 Michael Eager <eager@eagercon.com>
3945 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3947 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3948 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3949 hardware breakpoint.
3951 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3953 * gdbserver/linux-low.c (initialize_low): Call
3954 linux_ptrace_init_warnings.
3956 2012-07-02 Doug Evans <dje@google.com>
3958 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3961 2012-07-02 Stan Shebs <stan@codesourcery.com>
3963 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3964 (ax.o): Add it to build rule.
3966 (OBS): Add format.o.
3967 (IPA_OBS): Add format.o.
3968 * server.c (handle_query): Claim support for breakpoint commands.
3969 (process_point_options): Add command case.
3970 (process_serial_event): Leave running if there are printfs in
3972 * mem-break.h (any_persistent_commands): Declare.
3973 (add_breakpoint_commands): Declare.
3974 (gdb_no_commands_at_breakpoint): Declare.
3975 (run_breakpoint_commands): Declare.
3976 * mem-break.c (struct point_command_list): New struct.
3977 (struct breakpoint): New field command_list.
3978 (any_persistent_commands): New function.
3979 (add_commands_to_breakpoint): New function.
3980 (add_breakpoint_commands): New function.
3981 (gdb_no_commands_at_breakpoint): New function.
3982 (run_breakpoint_commands): New function.
3983 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3985 * ax.c: Include format.h.
3986 (ax_printf): New function.
3987 (gdb_eval_agent_expr): Add printf opcode.
3989 2012-06-13 Yao Qi <yao@codesourcery.com>
3991 * server.c (start_inferior): Remove duplicated writes to fields
3992 'last_resume_kind' and 'last_status' of 'current_inferior'.
3994 2012-06-12 Yao Qi <yao@codesourcery.com>
3995 Pedro Alves <palves@redhat.com>
3997 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3999 * server.c (handle_v_cont): Extend comment.
4001 2012-06-11 Yao Qi <yao@codesourcery.com>
4003 * linux-low.c (linux_attach): Add 'static'.
4005 2012-06-06 Yao Qi <yao@codesourcery.com>
4007 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4009 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4011 Fix gcc -flto compilation warning.
4012 * server.c (main): Make variable multi_mode and attach volatile.
4014 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4016 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4017 if the platform doesn't know about it.
4019 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4021 * Makefile.in (SFILES): Add linux-tile-low.c.
4022 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4023 * configure.srv: Handle tilegx-*-linux*.
4024 * linux-tile-low.c: New file.
4026 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4028 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4030 2012-05-24 Pedro Alves <palves@redhat.com>
4034 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4036 2012-05-24 Pedro Alves <palves@redhat.com>
4040 Replace target_signal with gdb_signal throughout.
4042 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4044 * linux-low.c (linux_store_registers): Avoid the copying sequence
4045 when no data has been retrieved by ptrace.
4047 2012-05-22 Will Deacon <will.deacon@arm.com>
4049 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4050 Include asm/ptrace.h.
4051 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4054 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4056 * linux-low.c (linux_store_registers): Don't re-retrieve data
4057 with ptrace that has already been obtained from /proc. Always
4058 copy any data retrieved with ptrace to the buffer supplied.
4060 2012-05-11 Yao Qi <yao@codesourcery.com>
4061 Pedro Alves <palves@redhat.com>
4063 * linux-low.c (enum stopping_threads_kind): New.
4064 (stopping_threads): Change type to `enum stopping_threads_kind'.
4065 (handle_extended_wait): If stopping and suspending threads, leave
4066 the new_lwp suspended too.
4067 (linux_wait_for_event): Adjust.
4068 (stop_all_lwps): Set `stopping_threads' to
4069 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4070 whether we're suspending threads or just stopping them. Assert no
4073 2012-04-29 Yao Qi <yao@codesourcery.com>
4075 * server.h: Move some code to ...
4076 * gdbthread.h: ... here. New.
4077 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4078 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4079 (nto-low.o, win32-low.o): Likewise.
4080 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4081 * regcache.c, remote-utils.c, server.c: Likewise.
4082 * target.c, tracepoint.c, win32-low.c: Likewise.
4084 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4086 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4087 (PTRACE_ARG4_TYPE): Likewise.
4088 (PTRACE_XFER_TYPE): Likewise.
4089 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4090 ptrace to PTRACE_ARG3_TYPE.
4091 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4092 (PTRACE_ARG4_TYPE): Likewise.
4093 (PTRACE_XFER_TYPE): Likewise.
4094 (linux_detach_one_lwp): Cast fourth argument of
4095 ptrace to long then PTRACE_ARG4_TYPE.
4096 (regsets_fetch_inferior_registers): Cast third argument of
4097 ptrace to long then PTRACE_ARG3_TYPE.
4098 (regsets_store_inferior_registers): Likewise.
4100 2012-04-20 Pedro Alves <palves@redhat.com>
4102 * configure: Regenerate.
4104 2012-04-19 Pedro Alves <palves@redhat.com>
4106 * Makefile.in (GNULIB_BUILDDIR): New.
4107 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4108 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4109 (all, install-only, uninstall, clean-info, all-lib, clean): No
4110 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4111 (maintainer-clean realclean distclean): Use subdir_do.
4113 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4114 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4115 * acinclude.m4: Include acx_configure_dir.m4.
4116 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4117 calls. Call AC_PROG_RANLIB. Configure gnulib using
4120 (GNULIB_STDINT_H): Adjust.
4121 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4122 * gdbreplay.c: Include build-gnulib/config.h.
4123 * server.h: Likewise.
4124 * aclocal.m4: Regenerate.
4125 * config.in: Regenerate.
4126 * configure: Regenerate.
4128 2012-04-19 Pedro Alves <palves@redhat.com>
4130 * Makefile.in (LIBGNU, INCGNU): Adjust.
4131 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4132 (all, install-only, uninstall, clean-info, all-lib, clean)
4133 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4134 * configure.ac: Adjust AC_OUTPUT output.
4135 * aclocal.m4: Regenerate.
4136 * configure: Regenerate.
4138 2012-04-19 Pedro Alves <palves@redhat.com>
4140 * Makefile.in (generated_files): New.
4141 (server_h): Remove the explicit dependency on config.h, and depend
4142 on $generated_files.
4144 2012-04-19 Pedro Alves <palves@redhat.com>
4146 * Makefile.in (INCGNU): Add -Ignulib.
4148 2012-04-19 Pedro Alves <palves@redhat.com>
4150 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4151 (INCGNU): ... this, and spell out -I here.
4152 (GNULIB_LIB): Rename to ...
4154 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4156 2012-04-19 Pedro Alves <palves@redhat.com>
4158 * config.in: Regenerate.
4160 2012-04-19 Pedro Alves <palves@redhat.com>
4162 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4163 * server.h (memmem): Remove declaration.
4164 * config.in: Regenerate.
4165 * configure: Regenerate.
4167 2012-04-19 Yao Qi <yao@codesourcery.com>
4169 * Makefile.in (SFILES): Add common/vec.c.
4173 2012-04-19 Yao Qi <yao@codesourcery.com>
4175 * remote-utils.c (prepare_resume_reply): Replace with macro
4176 target_core_of_thread.
4177 * server.c (handle_qxfer_threads_proper): Likewise.
4178 * target.h (traget_core_of_thread): New macro.
4180 2012-04-18 Pedro Alves <palves@redhat.com>
4182 * aclocal.m4: Regenerate.
4183 * configure: Regenerate.
4185 2012-04-16 Yao Qi <yao@codesourcery.com>
4187 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4188 duplicated on address.
4190 2012-04-16 Yao Qi <yao@codesourcery.com>
4192 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4193 (struct tracepoint_action_ops) <send>: New field.
4194 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4195 (agent_expr_send, x_tracepoint_action_send): New.
4196 (l_tracepoint_action_send): New.
4197 (cmd_qtdp): Download and install tracepoint
4198 according to `use_agent'.
4199 (run_inferior_command): Add one more parameter `len'.
4201 (tracepoint_send_agent): New.
4202 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4204 2012-04-16 Yao Qi <yao@codesourcery.com>
4206 * tracepoint.c (download_tracepoints): Moved to ...
4207 (cmd_qtstart): ... here.
4209 2012-04-14 Yao Qi <yao@codesourcery.com>
4211 * tracepoint.c: Include inttypes.h.
4212 (struct collect_memory_action): Use sized types.
4213 (struct tracepoint): Likewise.
4214 (cmd_qtdp, stop_tracing): Update print specifiers.
4215 (cmd_qtp, response_tracepoint): Likewise.
4216 (collect_data_at_tracepoint): Likewise.
4217 (collect_data_at_step): Likewise.
4219 2012-04-14 Yao Qi <yao@codesourcery.com>
4221 Import gnulib module inttypes.
4222 * aclocal.m4, config.in, configure: Regenerated.
4224 2012-04-14 Yao Qi <yao@codesourcery.com>
4226 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4227 Makefile and config.status at last.
4229 2012-04-13 Yao Qi <yao@codesourcery.com>
4231 * tracepoint.c: Include stdint.h unconditionally.
4233 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4235 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4236 on BFD_HAVE_SYS_PROCFS_TYPE.
4237 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4238 * configure: Regenerate.
4239 * config.in: Likewise.
4241 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4243 * Makefile.in (clean): Also remove x32.c x32-linux.c
4244 x32-avx.c x32-avx-linux.c.
4245 (x32.o): New target.
4247 (x32-linux.o): Likewise.
4248 (x32-linux.c): Likewise.
4249 (x32-avx.o): Likewise.
4250 (x32-avx.c): Likewise.
4251 (x32-avx-linux.o): Likewise.
4252 (x32-avx-linux.c): Likewise.
4254 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4255 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4256 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4257 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4258 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4259 i386/x32-avx-linux.xml.
4261 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4262 (init_registers_x32_avx_linux): Likwise.
4263 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4264 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4266 2012-04-13 Pedro Alves <palves@redhat.com>
4268 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4269 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4270 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4271 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4274 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4276 * linux-x86-low.c (compat_x32_clock_t): New.
4277 (compat_x32_siginfo_t): Likewise.
4278 (compat_x32_siginfo_from_siginfo): Likewise.
4279 (siginfo_from_compat_x32_siginfo): Likewise.
4280 (linux_is_elf64): Likewise.
4281 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4282 and siginfo_from_compat_x32_siginfo for x32.
4283 (x86_arch_setup): Set linux_is_elf64.
4285 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4288 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4290 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4291 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4292 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4293 compatible with process.
4295 2012-04-12 Yao Qi <yao@codesourcery.com>
4297 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4298 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4299 (install-only, install-info, clean): Handle sub dir gnulib.
4300 (all-lib, am--refresh): New targets.
4301 (memmem.o): Remove target.
4302 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4303 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4304 (AC_REPLACE_FUNCS): Remove memmem.
4305 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4306 (AC_OUTPUT): Generate Makefile in gnulib/.
4307 * aclocal.m4, config.in, configure: Regenerated.
4309 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4311 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4313 2012-04-05 Pedro Alves <palves@redhat.com>
4315 -Werror=strict-aliasing
4317 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4320 2012-04-04 Pedro Alves <palves@redhat.com>
4322 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4323 (sparc_store_gregset_from_stack, sparc_store_gregset)
4324 (sparc_breakpoint_at): Fix formatting.
4326 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4328 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4330 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4331 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4332 * config.in: Regenerate.
4333 * configure: Likewise.
4335 2012-03-29 Pedro Alves <palves@redhat.com>
4337 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4338 Correct ptrace arguments.
4340 2012-03-28 Pedro Alves <palves@redhat.com>
4342 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4343 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4344 (IA64_FR1_REGNUM): New defines.
4345 (ia64_fetch_register): New.
4346 (the_low_target): Install it.
4347 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4349 * linux-low.c (linux_fetch_registers): Try the
4350 the_low_target.fetch_register hook first.
4352 * linux-arm-low.c (the_low_target): Adjust.
4353 * linux-bfin-low.c (the_low_target): Adjust.
4354 * linux-cris-low.c (the_low_target): Adjust.
4355 * linux-crisv32-low.c (the_low_target): Adjust.
4356 * linux-m32r-low.c (the_low_target): Adjust.
4357 * linux-m68k-low.c (the_low_target): Adjust.
4358 * linux-mips-low.c (the_low_target): Adjust.
4359 * linux-ppc-low.c (the_low_target): Adjust.
4360 * linux-s390-low.c (the_low_target): Adjust.
4361 * linux-sh-low.c (the_low_target): Adjust.
4362 * linux-sparc-low.c (the_low_target): Adjust.
4363 * linux-tic6x-low.c (the_low_target): Adjust.
4364 * linux-x86-low.c (the_low_target): Adjust.
4365 * linux-xtensa-low.c (the_low_target): Adjust.
4367 2012-03-26 Pedro Alves <palves@redhat.com>
4369 * server.c (handle_qxfer_libraries): Don't bail early if
4370 the_target->qxfer_libraries_svr4 is not NULL.
4372 2012-03-26 Pedro Alves <palves@redhat.com>
4374 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4376 2012-03-23 Pedro Alves <palves@redhat.com>
4378 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4379 "library-list-svr4" element's start tag when the the DSO list is
4382 2012-03-23 Pedro Alves <palves@redhat.com>
4384 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4385 a variable whose type size is the same as the inferior's pointer
4388 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4390 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4392 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4393 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4394 * linux-low.h: Include <signal.h>.
4395 (struct siginfo): Remove forward declaration.
4396 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4399 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4401 * .gitignore: Ignore more files.
4403 2012-03-19 Pedro Alves <palves@redhat.com>
4404 Jan Kratochvil <jan.kratochvil@redhat.com>
4406 * server.c (cont_thread, general_thread): Add describing comments.
4407 (start_inferior): Clear `cont_thread'.
4408 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4411 2012-03-15 Yao Qi <yao@codesourcery.com>
4413 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4415 (cmd_qtdp): ... here.
4417 2012-03-15 Yao Qi <yao@codesourcery.com>
4419 * tracepoint.c (struct tracepoint_action_ops): New.
4420 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4421 (m_tracepoint_action_download): New.
4422 (r_tracepoint_action_download): New.
4423 (x_tracepoint_action_download): New.
4424 (l_tracepoint_action_download): New.
4425 (add_tracepoint_action): Install `action->ops' according type.
4426 (download_tracepoint_1): Move code `download' function pointer
4427 of various tracepoint_action_ops.
4429 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4431 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4432 linux_ptrace_attach_warnings.
4434 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4436 * Makefile.in (linux-ptrace.o): New.
4437 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4438 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4439 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4440 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4441 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4443 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4445 2012-03-08 Yao Qi <yao@codesourcery.com>
4446 Pedro Alves <palves@redhat.com>
4448 Fix PR server/13392.
4449 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4451 * tracepoint.c (remove_tracepoint): New.
4452 (cmd_qtdp): Call remove_tracepoint when failed to install.
4454 2012-03-07 Pedro Alves <palves@redhat.com>
4456 * linux-low.c (get_detach_signal): New.
4457 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4458 Pass on pending signals to PTRACE_DETACH. Check the result of the
4460 * server.c (program_signals, program_signals_p): New.
4461 (handle_general_set): Handle QProgramSignals.
4462 * server.h (program_signals, program_signals_p): Declare.
4464 2012-03-05 Pedro Alves <palves@redhat.com>
4465 Jan Kratochvil <jan.kratochvil@redhat.com>
4467 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4470 2012-03-03 Yao Qi <yao@codesourcery.com>
4472 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4473 agent_look_up_symbols.
4475 2012-03-03 Yao Qi <yao@codesourcery.com>
4477 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4478 (linux-x86-low.o): Likewise.
4479 * server.h: Remove in_process_agent_loaded.
4480 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4484 2012-03-03 Yao Qi <yao@codesourcery.com>
4486 * tracepoint.c (gdb_agent_capability): New global.
4487 (in_process_agent_loaded_ust): Renamed to
4488 `in_process_agent_supports_ust'.
4490 (in_process_agent_supports_ust): Call agent_capability_check.
4491 (clear_installed_tracepoints): Assert that agent supports
4494 2012-03-03 Yao Qi <yao@codesourcery.com>
4496 * linux-low.c (linux_supports_agent): New.
4497 (linux_target_ops): Initialize field `supports_agent' with
4498 linux_supports_agent.
4499 * target.h (struct target_ops) <supports_agent>: New.
4500 (target_supports_agent): New macro.
4501 * server.c (handle_general_set): Handle packet 'QAgent'.
4502 (handle_query): Send `QAgent+'.
4503 * Makefile.in (server.o): Depends on agent.h.
4505 2012-03-03 Yao Qi <yao@codesourcery.com>
4507 * Makefile.in (OBS): Add agent.o.
4508 Add new rule for agent.o.
4509 Track dependence of tracepoint.c on agent.h.
4510 * tracepoint.c (run_inferior_command_1):
4511 (run_inferior_command): Call agent_run_command.
4512 (gdb_ust_connect_sync_socket): Deleted. Move it to
4514 (resume_thread, stop_thread): Likewise.
4515 (gdb_ust_socket_init): Renamed to ...
4516 (gdb_agent_socket_init): ... New.
4517 (gdb_ust_thread): Renamed to ...
4518 (gdb_agent_helper_thread): ... New.
4519 (gdb_ust_init): Move some code to ...
4520 (gdb_agent_init): ... here. New.
4521 [HAVE_UST]: Call gdb_ust_init.
4522 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4523 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4524 * config.in, configure: Regenerated.
4526 2012-03-02 Pedro Alves <palves@redhat.com>
4528 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4529 * linux-low.c (struct simple_pid_list): New.
4530 (stopped_pids): New a struct simple_pid_list pointer.
4531 (add_to_pid_list, pull_pid_from_list): New.
4532 (handle_extended_wait): Don't assume the first signal new children
4533 report is SIGSTOP. Adjust call to pull_pid_from_list.
4534 (linux_wait_for_lwp): Adjust.
4536 2012-03-02 Yao Qi <yao@codesourcery.com>
4538 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4541 2012-03-02 Yao Qi <yao@codesourcery.com>
4543 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4544 `stop_pc' and `tpoint'. Update caller.
4546 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4548 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4549 * linux-low.c (use_linux_regsets): New macro.
4550 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4551 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4552 (linux_register_in_regsets): New function.
4553 (usr_fetch_inferior_registers): Skip registers covered by
4555 (usr_store_inferior_registers): Likewise.
4556 (usr_fetch_inferior_registers): New macro.
4557 (usr_store_inferior_registers): Likewise.
4558 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4559 (linux_store_registers): Likewise.
4560 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4562 (init_registers_mips64_dsp_linux): Likewise.
4563 (init_registers_mips_linux): New macro.
4564 (init_registers_mips_dsp_linux): Likewise.
4565 (mips_dsp_num_regs): Likewise.
4566 (DSP_BASE, DSP_CONTROL): New fallback macros.
4567 (mips_base_regs): New macro.
4568 (mips_regmap): Use it. Fix the size.
4569 (mips_dsp_regmap): New variable.
4570 (mips_dsp_regset_bitmap): Likewise.
4571 (mips_arch_setup): New function.
4572 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4574 (mips_cannot_store_register): Likewise.
4575 (the_low_target): Update .arch_setup, .num_regs and .regmap
4576 initializers. Add .regset_bitmap initializer.
4577 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4579 * linux-bfin-low.c (the_low_target): Likewise.
4580 * linux-cris-low.c (the_low_target): Likewise.
4581 * linux-crisv32-low.c (the_low_target): Likewise.
4582 * linux-ia64-low.c (the_low_target): Likewise.
4583 * linux-m32r-low.c (the_low_target): Likewise.
4584 * linux-m68k-low.c (the_low_target): Likewise.
4585 * linux-ppc-low.c (the_low_target): Likewise.
4586 * linux-s390-low.c (the_low_target): Likewise.
4587 * linux-sh-low.c (the_low_target): Likewise.
4588 * linux-sparc-low.c (the_low_target): Likewise.
4589 * linux-tic6x-low.c (the_low_target): Likewise.
4590 * linux-x86-low.c (the_low_target): Likewise.
4591 * linux-xtensa-low.c (the_low_target): Likewise.
4592 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4593 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4594 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4596 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4597 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4599 2012-02-29 Yao Qi <yao@codesourcery.com>
4600 Pedro Alves <palves@redhat.com>
4602 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4603 `step_over_finished' is true.
4605 2012-02-27 Pedro Alves <palves@redhat.com>
4607 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4608 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4610 2012-02-27 Pedro Alves <palves@redhat.com>
4613 * linux-low.c (pid_is_stopped): New.
4614 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4616 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4618 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4621 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4623 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4625 2012-02-24 Luis Machado <lgustavo@codesourcery>
4627 * server.c (handle_query): Advertise support for target-side
4628 breakpoint condition evaluation.
4629 (process_point_options): New function.
4630 (process_serial_event): When inserting a breakpoint, check for
4631 a target-side condition that should be evaluated.
4633 * mem-break.c: Include regcache.h and ax.h.
4634 (point_cond_list_t): New data structure.
4635 (breakpoint) <cond_list>: New field.
4636 (find_gdb_breakpoint_at): Make non-static.
4637 (delete_gdb_breakpoint_at): Clear any target-side
4639 (clear_gdb_breakpoint_conditions): New function.
4640 (add_condition_to_breakpoint): Likewise.
4641 (add_breakpoint_condition): Likewise.
4642 (gdb_condition_true_at_breakpoint): Likewise.
4643 (gdb_breakpoint_here): Return result directly instead
4644 of going through a local variable.
4646 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4647 (clear_gdb_breakpoint_conditions): Likewise.
4648 (add_breakpoint_condition): Likewise.
4649 (gdb_condition_true_at_breakpoint): Likewise.
4651 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4652 (need_step_over_p): Take target-side breakpoint condition into
4655 2012-02-24 Luis Machado <lgustavo@codesourcery>
4657 * server.h: Include tracepoint.h.
4658 (agent_mem_read, agent_get_trace_state_variable_value,
4659 agent_set_trace_state_variable_value,
4660 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4661 get_set_tsv_func_addr): New prototypes.
4663 * ax.h: New include file.
4664 * ax.c: New source file.
4666 * tracepoint.c: Include ax.h.
4667 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4668 agent_expr, eval_result_type): Move to ax.h.
4669 (parse_agent_expr): Rename to ...
4670 (gdb_parse_agent_expr): ... this, make it non-static and move
4672 (unparse_agent_expr) Rename to ...
4673 (gdb_unparse_agent_expr): ... this, make it non-static and move
4675 (eval_agent_expr): Rename to ...
4676 (eval_tracepoint_agent_expr): ... this.
4677 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4678 forward declarations.
4679 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4680 (agent_get_trace_state_variable_value): New function.
4681 (agent_set_trace_state_variable_value): New function.
4682 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4683 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4684 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4685 (condition_true_at_tracepoint): Likewise.
4686 (parse_agent_expr): Rename to ...
4687 (gdb_parse_agent_expr): ... this and move to ax.c.
4688 (unparse_agent_expr): Rename to ...
4689 (gdb_unparse_agent_expr): ... this and move to ax.c.
4690 (gdb_agent_op_name): Move to ax.c.
4691 (eval_agent_expr): Rename to ...
4692 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4694 (eval_tracepoint_agent_expr): New function.
4695 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4697 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4699 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4700 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4701 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4702 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4703 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4704 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4705 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4706 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4707 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4708 (compile_bytecodes): Remove forward declaration.
4709 (is_goto_target): Move to ax.c.
4710 (compile_bytecodes): Move to ax.c and call
4711 agent_get_trace_state_variable_value (...) and
4712 agent_set_trace_state_variable_value (...).
4714 * Makefile.in: Update ax.c and IPA dependencies.
4716 2012-02-24 Pedro Alves <palves@redhat.com>
4718 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4719 (cmd_bigqtbuffer_circular): ... this. Only handle
4720 'QTBuffer:circular:'.
4721 (handle_tracepoint_general_set): Adjust.
4723 2012-02-16 Yao Qi <yao@codesourcery.com>
4725 * inferiors.c: Move code to ...
4726 * dll.c: .... here. New.
4727 * server.h: Declare clear_dlls.
4728 * Makefile.in (SFILES): Add dll.c.
4732 2012-02-11 Yao Qi <yao@codesourcery.com>
4734 * server.c: (handle_monitor_command): Add a new parameter
4736 (handle_query): Update caller.
4738 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4740 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4741 * configure, config.in: Regenerate.
4742 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4745 2012-02-02 Pedro Alves <palves@redhat.com>
4747 Try SIGKILL first, then PTRACE_KILL.
4748 * linux-low.c (linux_kill_one_lwp): New.
4749 (linux_kill_one_lwp): Rename to ...
4750 (kill_one_lwp_callback): ... this. Use the new
4753 2012-02-02 Pedro Alves <palves@redhat.com>
4755 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4758 2012-01-27 Pedro Alves <palves@redhat.com>
4760 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4761 (elf_64_file_p): Make static.
4762 (linux_pid_exe_is_elf_64_file): New.
4763 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4764 Delete declarations.
4765 (linux_pid_exe_is_elf_64_file): Declare.
4766 * linux-x86-low.c (x86_arch_setup): Use
4767 linux_pid_exe_is_elf_64_file.
4769 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4771 * linux-low.c (linux_wait_for_event_1): Rename to ...
4772 (linux_wait_for_event): ... here and merge it with former
4773 linux_wait_for_event - new variable wait_ptid, use it.
4774 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4776 2012-01-23 Pedro Alves <palves@redhat.com>
4778 * server.c (main): Avoid yet another case of infinite loop while
4779 detaching/killing after a longjmp.
4781 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4784 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4786 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4788 * hostio.c (handle_readlink): New function.
4789 (handle_vFile): Call it to handle "vFile:readlink" packets.
4791 2012-01-20 Pedro Alves <palves@redhat.com>
4792 Ulrich Weigand <ulrich.weigand@linaro.org>
4794 * server.c (handle_v_requests): Only support vAttach and vRun to
4795 start multiple processes when in extended protocol mode.
4797 2012-01-17 Pedro Alves <palves@redhat.com>
4799 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4800 memalign plus mprotect to allocate the scratch buffer.
4802 2012-01-13 Pedro Alves <palves@redhat.com>
4804 * server.c (attach_inferior): Clear `cont_thread'.
4806 2012-01-13 Pedro Alves <palves@redhat.com>
4808 * server.c (main): Avoid infinite loop while detaching/killing
4811 2012-01-09 Doug Evans <dje@google.com>
4813 * server.c (start_inferior): Set last_ptid in --wrapper case.
4815 2012-01-06 Yao Qi <yao@codesourcery.com>
4817 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4819 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4821 2012-01-04 Yao Qi <yao@codesourcery.com>
4823 * tracepoint.c (cmd_qtdp): Print debug message
4824 for static tracepoint.
4826 2012-01-04 Yao Qi <yao@codesourcery.com>
4828 * tracepoint.c (trace_vdebug): Differentiate debug message
4829 between gdbserver and IPA.
4831 2012-01-03 Yao Qi <yao@codesourcery.com>
4833 * tracepoint.c (tracepoint_was_hit): Don't collect for
4836 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4838 * terminal.h: Reformat copyright header.
4840 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4842 * server.c (gdbserver_version): Update copyright year.
4843 * gdbreplay.c (gdbreplay_version): Likewise.
4845 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4847 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4850 2011-12-18 Hui Zhu <teawater@gmail.com>
4851 * linux-low.c (linux_create_inferior): Save return value to ret.
4853 2011-12-18 Hui Zhu <teawater@gmail.com>
4855 * linux-low.c (linux_create_inferior): Save return value to ret.
4857 2011-12-16 Doug Evans <dje@google.com>
4859 * linux-low.c (linux_create_inferior): If stdio connection,
4860 redirect stdin from /dev/null, stdout to stderr.
4861 * remote-utils.c (remote_is_stdio): New static global.
4862 (remote_connection_is_stdio): New function.
4863 (remote_prepare): Handle stdio connection.
4864 (remote_open): Ditto.
4865 (remote_close): Don't close stdin for stdio connections.
4866 (read_prim,write_prim): New functions. Replace all calls to
4867 read/write to these.
4868 * server.c (main): Watch for "-" argument. Move call to
4869 remote_prepare before start_inferior.
4870 * server.h (STDIO_CONNECTION_NAME): New macro.
4871 (remote_connection_is_stdio): Declare.
4873 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4874 in debugging output.
4876 2011-12-15 Yao Qi <yao@codesourcery.com>
4878 * tracepoint.c: Include sys/syscall.h.
4879 (gdb_ust_thread): Remove preprocessor conditional.
4881 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4883 * linux-low.c (linux_detach_one_lwp): Call
4884 the_low_target.prepare_to_resume before detaching.
4886 2011-12-14 Yao Qi <yao@codesourcery.com>
4888 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4891 2011-12-14 Yao Qi <yao@codesourcery.com>
4893 * i386-low.c (i386_low_stopped_data_address): Initialize local
4896 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4900 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4901 DR_CONTROL unless necessary. Extend comments.
4902 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4903 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4905 2011-12-13 Yao Qi <yao@codesourcery.com>
4907 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4909 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4911 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4913 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4914 Print new debug message for such case.
4916 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4918 Fix overlapping memcpy.
4919 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4920 the read_inferior_memory transfer.
4921 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4922 write_inferior_memory transfer.
4923 (set_fast_tracepoint_jump): New variable buf. Use it for the
4924 read_inferior_memory and write_inferior_memory transfers.
4925 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4926 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4927 Use it for the write_inferior_memory transfer.
4928 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4931 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4933 * linux-low.c (fetch_register, store_register): Make code
4934 consistent, fix formatting.
4936 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4938 * linux-low.c (usr_store_inferior_registers): Factor out code
4939 to handle individual registers into...
4940 (store_register): ... this new function.
4942 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4944 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4945 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4946 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4947 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4948 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4949 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4950 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4951 (srv_xmlfiles): Add new XML files.
4953 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4955 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4956 (init_registers_s390_linux32v1): Add prototype.
4957 (init_registers_s390_linux32v2): Likewise.
4958 (init_registers_s390_linux64v1): Likewise.
4959 (init_registers_s390_linux64v2): Likewise.
4960 (init_registers_s390x_linux64v1): Likewise.
4961 (init_registers_s390x_linux64v2): Likewise.
4962 (s390_num_regs): Increment to 52.
4963 (s390_regmap): Add orig_r2 register.
4964 (s390_num_regs_3264): Increment to 68.
4965 (s390_regmap_3264): Add orig_r2 register.
4966 (s390_collect_ptrace_register): Handle orig_r2 register.
4967 (s390_supply_ptrace_register): Likewise.
4968 (s390_fill_last_break): New function.
4969 (s390_store_last_break): Likewise.
4970 (s390_fill_system_call): New function.
4971 (s390_store_system_call): Likewise.
4972 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4974 (s390_check_regset): New function.
4975 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4976 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4977 Update target_regsets for available register sets.
4979 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4980 Jan Kratochvil <jan.kratochvil@redhat.com>
4982 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4983 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4985 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4986 * linux-low.h (struct process_info_private): New member r_debug.
4987 * server.c (handle_qxfer_libraries): Call
4988 the_target->qxfer_libraries_svr4.
4989 (handle_qxfer_libraries_svr4): New function.
4990 (qxfer_packets): New entry "libraries-svr4".
4991 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4992 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4993 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4994 PACKET_qXfer_libraries_svr4.
4996 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4998 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4999 PSW address/mask between 8-byte and 16-byte formats.
5000 (s390_supply_ptrace_register): Likewise.
5001 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5002 basic addressing mode bit.
5004 2011-11-24 Stan Shebs <stan@codesourcery.com>
5006 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5008 2011-11-17 Stan Shebs <stan@codesourcery.com>
5010 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5011 (tracing_start_time): New global.
5012 (tracing_stop_time): New global.
5013 (tracing_user_name): New global.
5014 (tracing_notes): New global.
5015 (tracing_stop_note): New global.
5016 (cmd_qtstart): Set traceframe_usage, start_time.
5017 (stop_tracing): Set stop_time.
5018 (cmd_qtstatus): Report additional status.
5019 (cmd_qtp): New function.
5020 (handle_tracepoint_query): Call it.
5021 (cmd_qtnotes): New function.
5022 (handle_tracepoint_general_set): Call it.
5023 (get_timestamp): Rename from tsv_get_timestamp.
5025 2011-11-14 Stan Shebs <stan@codesourcery.com>
5026 Kwok Cheung Yeung <kcy@codesourcery.com>
5028 * linux-x86-low.c (small_jump_insn): New.
5029 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5030 trampoline and error message, build a trampoline and issue a small
5031 jump instruction to it.
5032 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5033 trampoline and error message.
5034 (x86_get_min_fast_tracepoint_insn_len): New.
5035 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5036 * linux-low.h (struct linux_target_ops): Add arguments to
5037 install_fast_tracepoint_jump_pad operation, add new operation.
5038 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5040 (linux_get_min_fast_tracepoint_insn_len): New function.
5041 (linux_target_op): Add new operation.
5042 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5043 (gdb_trampoline_buffer_end): Ditto.
5044 (gdb_trampoline_buffer_error): Ditto.
5045 (struct ipa_sym_addresses): Add fields for new IPA variables.
5046 (symbol_list): Add entries for new IPA variables.
5047 (struct tracepoint): Add fields to hold the address range of the
5048 trampoline used by the tracepoint.
5049 (trampoline_buffer_head): New static variable.
5050 (trampoline_buffer_tail): Ditto.
5051 (claim_trampoline_space): New function.
5052 (have_fast_tracepoint_trampoline_buffer): New function.
5053 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5055 (install_fast_tracepoint): Ditto, also add error buffer argument.
5056 (cmd_qtminftpilen): New function.
5057 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5058 (fast_tracepoint_from_trampoline_address): New function.
5059 (fast_tracepoint_collecting): Handle trampoline as part of jump
5061 (set_trampoline_buffer_space): New function.
5062 (initialize_tracepoint): Initialize new IPA variables.
5063 * target.h (struct target_ops): Add arguments to
5064 install_fast_tracepoint_jump_pad operation, add new
5065 get_min_fast_tracepoint_insn_len operation.
5066 (target_get_min_fast_tracepoint_insn_len): New.
5067 (install_fast_tracepoint_jump_pad): Add arguments.
5068 * server.h (IPA_BUFSIZ): Define.
5069 * linux-i386-ipa.c: Include extra header files.
5070 (initialize_fast_tracepoint_trampoline_buffer): New function.
5071 (initialize_low_tracepoint): Call it.
5072 * server.h (set_trampoline_buffer_space): Declare.
5073 (claim_trampoline_space): Ditto.
5074 (have_fast_tracepoint_trampoline_buffer): Ditto.
5076 2011-11-14 Yao Qi <yao@codesourcery.com>
5078 * server.c (handle_query): Handle InstallInTrace for qSupported.
5079 * tracepoint.c (add_tracepoint): Sort list.
5080 (install_tracepoint, download_tracepoint): New.
5081 (cmd_qtdp): Call them to install and download tracepoints.
5082 (sort_tracepoints): Removed.
5083 (cmd_qtstart): Update.
5085 2011-11-14 Yao Qi <yao@codesourcery.com>
5087 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5088 * mem-break.h: Declare.
5089 * tracepoint.c (cmd_qtstart): Move some code to ...
5090 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5092 (download_tracepoints): Move some code to ...
5093 (download_tracepoint_1): ... here. New.
5095 2011-11-08 Yao Qi <yao@codesourcery.com>
5097 * remote-utils.c (relocate_instruction): A comment fix.
5099 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5101 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5102 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5103 dr_status_mirror and dr_control_mirror from debug_reg_state.
5104 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5105 (i386_initial_stuff): Remove use of deleted globals.
5106 (i386_get_thread_context, i386_set_thread_context,
5107 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5108 from debug_reg_state.
5110 2011-11-05 Yao Qi <yao@codesourcery.com>
5112 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5113 address as TPOINT's.
5115 2011-11-02 Stan Shebs <stan@codesourcery.com>
5117 * tracepoint.c (agent_mem_read_string): New function.
5118 (eval_agent_expr): Call it for tracenz.
5119 * server.c (handle_query): Report support for tracenz.
5121 2011-11-02 Yao Qi <yao@codesourcery.com>
5123 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5125 2011-11-02 Yao Qi <yao@codesourcery.com>
5127 * target.h: Fix a typo in comment.
5129 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5131 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5132 clobber the breakpoints' shadows with fast tracepoint jumps.
5133 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5134 * target.c (write_inferior_memory): Also pass MYADDR down to
5137 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5139 * configure.ac: Check support for personality routine.
5140 * configure: Regenerate.
5141 * config.in: Likewise.
5142 * linux-low.c: Include <sys/personality.h>.
5143 Define ADDR_NO_RANDOMIZE if necessary.
5144 (linux_create_inferior): Disable address space randomization when
5145 forking inferior, if requested.
5146 (linux_supports_disable_randomization): New function.
5147 (linux_target_ops): Install it.
5148 * server.h (disable_randomization): Declare.
5149 * server.c (disable_randomization): New global variable.
5150 (handle_general_set): Handle QDisableRandomization.
5151 (handle_query): Likewise for qSupported.
5152 (main): Support --disable-randomization and --no-disable-randomization
5153 command line arguments.
5154 * target.h (struct target_ops): Add supports_disable_randomization.
5155 (target_supports_disable_randomization): New macro.
5157 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5159 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5161 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5162 [!PT_GETDSBT] (target_loadmap): New definition.
5163 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5164 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5165 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5166 and PT_GETDSBT to LINUX_LOADMAP.
5167 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5168 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5170 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5172 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5173 (arm_linux_hwbp_cap): New static variable.
5174 (arm_linux_get_hwbp_cap): Replace by ...
5175 (arm_linux_init_hwbp_cap): ... this new function.
5176 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5177 (arm_linux_get_hw_watchpoint_count): Likewise.
5178 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5179 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5180 (arm_prepare_to_resume): Use perror_with_name instead of error.
5182 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5184 * linux-arm-low.c: Include <signal.h>.
5185 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5186 (struct arm_linux_hwbp_cap): New data type.
5187 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5188 (struct arm_linux_hw_breakpoint): New data type.
5189 (MAX_BPTS, MAX_WPTS): Define.
5190 (struct arch_process_info, struct arch_lwp_info): New data types.
5191 (arm_linux_get_hwbp_cap): New function.
5192 (arm_linux_get_hw_breakpoint_count): Likewise.
5193 (arm_linux_get_hw_watchpoint_count): Likewise.
5194 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5195 (arm_hwbp_control_initialize): Likewise.
5196 (arm_hwbp_control_is_enabled): Likewise.
5197 (arm_hwbp_control_is_initialized): Likewise.
5198 (arm_hwbp_control_disable): Likewise.
5199 (arm_linux_hw_breakpoint_equal): Likewise.
5200 (arm_linux_hw_point_initialize): Likewise.
5201 (struct update_registers_data): New data structure.
5202 (update_registers_callback: New function.
5203 (arm_insert_point): Likewise.
5204 (arm_remove_point): Likewise.
5205 (arm_stopped_by_watchpoint): Likewise.
5206 (arm_stopped_data_address): Likewise.
5207 (arm_new_process): Likewise.
5208 (arm_new_thread): Likewise.
5209 (arm_prepare_to_resume): Likewise.
5210 (the_low_target): Register arm_insert_point, arm_remove_point,
5211 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5212 arm_new_thread, and arm_prepare_to_resume.
5214 2011-09-15 Stan Shebs <stan@codesourcery.com>
5216 * server.h (struct emit_ops): Add compare-goto fields.
5217 * tracepoint.c (gdb_agent_op_sizes): New table.
5218 (emit_eq_goto): New function.
5219 (emit_ne_goto): New function.
5220 (emit_lt_goto): New function.
5221 (emit_le_goto): New function.
5222 (emit_gt_goto): New function.
5223 (emit_ge_goto): New function.
5224 (is_goto_target): New function.
5225 (compile_bytecodes): Recognize special cases of compare-goto
5226 combinations and call specialized emitters for them.
5227 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5228 (amd64_emit_ne_goto): New function.
5229 (amd64_emit_lt_goto): New function.
5230 (amd64_emit_le_goto): New function.
5231 (amd64_emit_gt_goto): New function.
5232 (amd64_emit_ge_goto): New function.
5233 (amd64_emit_ops): Add the new functions.
5234 (i386_emit_eq_goto): New function.
5235 (i386_emit_ne_goto): New function.
5236 (i386_emit_lt_goto): New function.
5237 (i386_emit_le_goto): New function.
5238 (i386_emit_gt_goto): New function.
5239 (i386_emit_ge_goto): New function.
5240 (i386_emit_ops): Add the new functions.
5242 2011-09-08 Stan Shebs <stan@codesourcery.com>
5244 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5245 (i386_emit_epilogue): Restore %ebx.
5247 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5249 * server.c (step_thread): Remove definition.
5250 (process_serial_event): Don't handle Hs.
5251 * server.h (step_thread): Remove declaration.
5252 * target.c (set_desired_inferior): Remove use of step_thread.
5254 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5256 * linux-low.c: Include linux-procfs.h.
5257 (linux_attach_lwp_1): Update comments.
5258 (linux_attach): Scan for existing threads when attaching to a
5259 process that is the tgid.
5260 * Makefile.in: Update dependencies.
5262 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5264 * configure.srv: Add linux-procfs.o dependencies.
5266 2011-08-14 Yao Qi <yao@codesourcery.com>
5268 * target.h (struct target_ops): Fix indent.
5269 * win32-low.c (win32_target_ops): Fix comment.
5271 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5272 Yao Qi <yao@codesourcery.com>
5274 * Makefile.in (clean): Remove tic6x-*.c files.
5275 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5276 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5277 (tic6x-c64xp-linux.c): Likewise.
5278 * configure.srv: Add support for tic6x-*-uclinux.
5279 * linux-tic6x-low.c: New.
5280 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5282 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5283 Yao Qi <yao@codesourcery.com>
5285 * target.h (struct target_ops): Add read_loadmap.
5286 * linux-low.c (struct target_loadseg): New type.
5287 (struct target_loadmap): New type.
5288 (linux_read_loadmap): New function.
5289 (linux_target_ops): Add linux_read_loadmap.
5290 * server.c (handle_query): Support qXfer:fdpic:read packet.
5291 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5294 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5296 * win32-low.c: Include <stdint.h>.
5298 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5300 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5301 to the inferior here.
5302 (i386_remove_aligned_watchpoint): Ditto.
5303 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5304 fit part of the watchpoint in the debug registers.
5305 (i386_update_inferior_debug_regs): New.
5306 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5307 registers, and only update the inferior on success.
5308 (i386_low_remove_watchpoint): Ditto.
5310 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5312 * linux-low.c (compare_ints, unique, list_threads, show_process,
5313 linux_core_of_thread): Delete.
5314 (linux_target_ops): Change linux_core_of_thread to
5315 linux_common_core_of_thread.
5316 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5317 * utils.c (malloc_failure): Change type of argument.
5318 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5319 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5320 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5321 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5322 (IPA_OBJS): Add common-utils-ipa.o.
5323 (ptid_h, linux_osdata_h): New macros.
5324 (server_h): Add common/common-utils.h, common/xml-utils.h,
5325 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5327 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5328 ptid.o, buffer.o): New rules.
5329 (linux-low.o): Add common/linux-osdata.h as a dependency.
5330 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5331 * configure.ac: Add AC_HEADER_DIRENT check.
5332 * config.in: Regenerate.
5333 * configure: Regenerate.
5334 * remote-utils.c (xml_escape_text): Delete.
5335 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5336 buffer_xml_printf): Move to common/buffer.c.
5337 * server.c (main): Remove call to initialize_inferiors.
5338 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5339 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5340 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5341 internal_error, gdb_assert, gdb_assert_fail): Delete.
5342 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5343 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5345 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5346 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5347 initialize_inferiors): Delete.
5349 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5351 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5354 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5356 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5358 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5360 2011-05-26 Yao Qi <yao@codesourcery.com>
5362 * Makefile.in (thread-db.o): Track dependence to
5363 common/gdb_thread_db.h.
5364 * thread-db.c: include gdb_thread_db.h from right place.
5366 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5368 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5369 __FILE__ and __LINE__ to internal_error.
5371 2011-05-13 Doug Evans <dje@google.com>
5373 * thread-db.c (try_thread_db_load_from_sdir): New function.
5374 (try_thread_db_load_from_dir): New function.
5375 (thread_db_load_search): Handle $sdir, ignore $pdir.
5376 Remove trying of system directories if search of
5377 libthread-db-search-path fails, that is now done via $sdir.
5379 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5381 * server.c (handle_query): Add EnableDisableTracepoints to the list
5382 of supported features.
5383 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5385 (cmd_qtenable_disable): New.
5386 (cmd_qtstart): Install tracepoints even if disabled.
5387 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5388 receiving a QTEnable or QTDisable packet.
5389 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5390 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5392 (gdb_probe): Skip data collection if static tracepoint is disabled.
5394 2011-05-10 Doug Evans <dje@google.com>
5396 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5398 2011-05-04 Doug Evans <dje@google.com>
5400 * linux-low.c (linux_join): Skip process lookup.
5401 * spu-low.c (spu_join): Ditto.
5402 * server.c (join_inferiors_callback): Delete.
5403 (process_serial_event): For 'D' packet (detach) call join_inferior
5406 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5408 * README: Don't mention xscale*-*-linux*.
5409 * configure.srv (xscale*-*-linux*): Don't handle target.
5411 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5413 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5415 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5416 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5417 (i386_emit_void_call_2): Likewise.
5419 2011-04-26 Yao Qi <yao@codesourcery.com>
5421 * linux-low.c: Move common macros to linux-ptrace.h.
5422 Include linux-ptrace.h.
5423 * Makefile.in (linux_ptrace_h): New.
5424 (linux-low.o): Depends on linux-ptrace.h.
5426 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5428 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5429 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5430 (remote_prepare): New function with most of the TCP code from ...
5431 (remote_open): ... here. Detect PORT here unconditionally. Move also
5432 setting transport_is_reliable.
5433 * server.c (run_once): New variable.
5434 (gdbserver_usage): Document it.
5435 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5436 the first run if RUN_ONCE.
5437 * server.h (run_once, remote_prepare): New declarations.
5439 2011-04-19 Tom Tromey <tromey@redhat.com>
5441 * win32-low.c (handle_load_dll): Remove duplicate "the".
5443 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5445 Remove support for old Cygwin 1.5 versions.
5446 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5447 function to avoid warning.
5448 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5451 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5453 * gdbserver/server.h (Macro _): Define it if not available.
5455 2011-03-14 Michael Snyder <msnyder@vmware.com>
5457 * hostio.c (handle_close): Remove unnecessary null test.
5459 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5461 * Makefile.in (maintainer-clean realclean distclean): Remove
5462 "make ... subdir_do" command.
5464 2011-03-10 Michael Snyder <msnyder@vmware.com>
5466 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5468 * server.c (handle_v_run): Free alloced buffer on early return.
5470 2011-03-09 Yao Qi <yao@codesourcery.com>
5473 2011-03-04 Yao Qi <yao@codesourcery.com>
5475 * Makefile.in: Remove GNU make feature --directory.
5477 2011-03-05 Yao Qi <yao@codesourcery.com>
5479 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5480 (subdir_do): New make target. Copied from gdb/Makefile.
5481 (maintainer-clean, realclean, distclean, clean): Call corresponding
5482 make targets in common/Makefile.
5484 2011-02-11 Yao Qi <yao@codesourcery.com>
5486 * configure.ac: Call AC_PROG_RANLIB.
5487 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5488 * configure: Regenerate.
5490 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5492 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5494 2011-03-06 Yao Qi <yao@codesourcery.com>
5496 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5498 2011-03-05 Yao Qi <yao@codesourcery.com>
5500 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5501 (subdir_do): New make target. Copied from gdb/Makefile.
5502 (maintainer-clean, realclean, distclean, clean): Call corresponding
5503 make targets in common/Makefile.
5505 2011-03-04 Yao Qi <yao@codesourcery.com>
5507 * Makefile.in: Remove GNU make feature --directory.
5509 2011-03-04 Michael Snyder <msnyder@vmware.com>
5511 * server.c (queue_stop_reply): Call xmalloc not malloc.
5513 2011-03-02 Michael Snyder <msnyder@vmware.com>
5515 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5517 2011-02-28 Michael Snyder <msnyder@vmware.com>
5519 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5520 (cmd_qtframe): Ditto.
5521 (cmd_qtbuffer): Ditto.
5522 (cmd_bigqtbuffer): Ditto.
5524 * utils.c (decimal2str): Initialize 'width' to nine, then
5527 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5529 * hostio.c (require_data): Free *data, not data.
5531 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5533 * hostio.c (require_data): Use free, not xfree.
5535 2011-02-27 Michael Snyder <msnyder@vmware.com>
5537 * server.c (handle_query): Discard unused value.
5539 * hostio.c (require_data): Free malloc memory before returning
5542 2011-02-26 Michael Snyder <msnyder@vmware.com>
5544 * linux-low.c (list_threads): Call closedir for dirent.
5546 2011-02-27 Michael Snyder <msnyder@vmware.com>
5548 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5549 a case statement falls through.
5551 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5553 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5556 2011-02-26 Michael Snyder <msnyder@vmware.com>
5558 * utils.c (decimal2str): Eliminate dead code and dead param.
5559 (pulongest): Drop dead param from call to decimal2str.
5562 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5564 Revert the following patch (not approved yet):
5565 2011-02-21 Hui Zhu <teawater@gmail.com>
5566 * tracepoint.c (tp_printf): New function.
5567 (eval_agent_expr): Handle gdb_agent_op_printf.
5569 2011-02-21 Hui Zhu <teawater@gmail.com>
5571 * tracepoint.c (tp_printf): New function.
5572 (eval_agent_expr): Handle gdb_agent_op_printf.
5574 2011-02-18 Tom Tromey <tromey@redhat.com>
5576 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5577 (tracepoint.o): Likewise.
5578 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5579 (gdb_agent_op_names): Likewise.
5581 2011-02-18 Tom Tromey <tromey@redhat.com>
5583 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5584 gdb_agent_op_rot>: New constants.
5585 (gdb_agent_op_names): Add pick and roll.
5586 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5589 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5591 * aclocal.m4: Regenerated with aclocal-1.11.1.
5593 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5595 * server.c (handle_qxfer_traceframe_info): New.
5596 (qxfer_packets): Register "traceframe-info".
5597 (handle_query): Report support for qXfer:traceframe-info:read+.
5598 * tracepoint.c (match_blocktype): New.
5599 (traceframe_find_block_type): Rename to ...
5600 (traceframe_walk_blocks): ... this. Add callback filter argument,
5602 (traceframe_find_block_type): New, reimplemented on top of
5603 traceframe_walk_blocks.
5604 (build_traceframe_info_xml): New.
5605 (traceframe_read_info): New.
5606 * server.h (traceframe_read_info): Declare.
5608 2011-02-11 Yao Qi <yao@codesourcery.com>
5610 * configure.ac: Call AC_PROG_RANLIB.
5611 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5612 * configure: Regenerate.
5614 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5616 * server.c (gdb_read_memory): Change return semantics to allow
5618 (handle_search_memory_1): Adjust.
5619 (process_serial_event) <'m' packet>: Handle partial transfers.
5620 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5622 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5624 * regcache.c (init_register_cache): Initialize
5625 regcache->register_status.
5626 (free_register_cache): Release regcache->register_status.
5627 (regcache_cpy): Copy register_status.
5628 (registers_to_string): Print 'x's for unavailable registers.
5629 (supply_register): Mark the register's status valid or
5630 unavailable, depending on whether a buffer was passed in or not.
5631 (supply_register_zeroed): New.
5632 (supply_regblock): Mark the registers' status valid or
5633 unavailable, depending on whether a buffer was passed in or not.
5634 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5635 (struct regcache): New `register_status' field.
5636 (supply_register_zeroed): Declare.
5637 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5638 supply_register_zeroed, rather than passing a NULL buffer to
5640 * tracepoint.c (fetch_traceframe_registers): Update comment.
5642 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5644 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5647 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5649 * server.h (decode_xfer_write): Change prototype.
5650 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5651 and don't extract the annex here.
5652 * server.c (decode_xfer_read): Remove `annex' parameter,
5653 and don't extract the annex here.
5655 (struct qxfer): New.
5656 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5657 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5658 (handle_qxfer_statictrace): New functions, abstracted out from
5659 handle_query, and made to use the struct qxfer interface.
5660 (handle_threads_qxfer_proper): Rename to ...
5661 (handle_qxfer_threads_proper): ... this.
5662 (handle_threads_qxfer): Rename to ...
5663 (handle_qxfer_threads): ... this. Adjust.
5664 (qxfer_packets): New array.
5665 (handle_qxfer): New function.
5666 (handle_query): Use handle_qxfer.
5668 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5670 * gdbreplay.c: Shorten lines of >= 80 columns.
5671 * linux-low.c: Ditto.
5672 * linux-ppc-low.c: Ditto.
5673 * linux-s390-low.c: Ditto.
5674 * linux-sparc-low.c: Ditto.
5675 * linux-x86-low.c: Ditto.
5676 * linux-xtensa-low.c: Ditto.
5677 * mem-break.c: Ditto.
5679 * regcache.h: Ditto.
5680 * remote-utils.c: Ditto.
5683 * thread-db.c: Ditto.
5684 * tracepoint.c: Ditto.
5686 * win32-low.h: Ditto.
5688 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5690 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5693 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5695 * server.c (gdbserver_version): Update copyright year in version
5697 * gdbreplay.c (gdbreplay_version): Ditto.
5699 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5701 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5702 * linux-bfin-low.c: New file.
5703 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5704 PT_DATA_ADDR for BFIN targets.
5705 * Makefile.in (SFILES): Add linux-bfin-low.c.
5706 (clean): Remove reg-bfin.c.
5707 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5708 * README: Mention supported Blackfin targets.
5710 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5712 * .gitignore: New file.
5714 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5716 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5718 2010-10-22 Jie Zhang <jie@codesourcery.com>
5720 * Makefile.in: Add FLAGS_TO_PASS variable.
5721 (install): Remove dependency of install-only and recursively
5722 invoke make for install-only.
5724 2010-10-04 Doug Evans <dje@google.com>
5726 * Makefile.in (uninstall): Use $(DESTDIR).
5728 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5732 * linux-x86-low.c (compat_siginfo_from_siginfo)
5733 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5734 si_code is < 0. Check for si_code == SI_TIMER before checking for
5737 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5739 * lynx-i386-low.c: New file.
5740 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5742 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5744 * lynx-low.c (ptrace_request_to_str): Remove handling for
5745 request values that have been removed in LynxOS 5.x.
5747 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5749 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5752 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5754 * configure.ac: Add --enable-inprocess-agent option.
5755 * configure: Rebuilt.
5757 2010-09-06 Yao Qi <yao@codesourcery.com>
5759 * linux-low.c (linux_kill): Remove unused variable.
5760 (linux_stabilize_threads): Likewise.
5761 * server.c (start_inferior): Likewise.
5762 (queue_stop_reply_callback): Likewise.
5763 * tracepoint.c (do_action_at_tracepoint): Likewise.
5765 2010-09-06 Yao Qi <yao@codesourcery.com>
5767 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5770 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5772 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5774 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5776 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5779 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5781 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5782 gdbserver/lynx-ppc-low.c: New files.
5783 * Makefile.in (lynx_low_h): New variable.
5784 (lynx-low.o, lynx-ppc-low.o): New rules.
5785 * configure.ac: On LynxOS, link with -lnetinet.
5786 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5787 * configure: regenerate.
5789 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5791 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5792 * configure.ac: Add check for vasprintf and vsnprintf.
5793 * configure, config.in: Regenerate.
5794 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5796 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5798 * gdbreplay.c: Move include of alloca.h up, next to include of
5800 * server.h: Add include of malloc.h.
5801 * mem-break.c: Remove include of malloc.h.
5802 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5804 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5806 * Makefile.in (memmem.o): Build with -Wno-error.
5808 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5810 * utils.c (xsnprintf): Make non-static.
5811 * server.h: Add xsnprintf declaration.
5812 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5813 replace calls to snprintf by calls to xsnprintf throughout.
5815 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5817 * configure.ac: Add configure check for alloca.
5818 * configure, config.in: Regenerate.
5819 * server.h: Include alloca.h if it exists.
5820 * gdbreplay.c: Include alloca.h if it exists.
5822 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5824 * linux-low.c (__SIGRTMIN): Define if not already defined.
5825 (linux_create_inferior): Check for __ANDROID__ rather than
5827 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5828 are already deferred.
5829 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5830 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5831 stopped and already has a pending signal to report.
5832 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5833 a pending signal to report or is moving out of a jump pad.
5834 (linux_init_signals): Check for __ANDROID__ rather than
5837 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5839 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5840 debug_threads check. Avoid a linear search when not doing debug
5843 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5845 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5846 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5847 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5848 (process_event): Change local fd's type to gdb_fildes_t.
5849 (create_file_handler): Adjust prototype.
5850 (delete_file_handler): Adjust prototype.
5851 (handle_file_event): Adjust prototype. Use pfildes.
5852 (create_file_event): Adjsut prototype.
5853 * remote-utils.c (remote_desc, listen_desc): Change type to
5855 * server.h: New gdb_fildes_t typedef.
5856 [USE_WIN32API]: Include winsock2.h.
5857 (delete_file_handler, add_file_handler): Adjust prototypes.
5859 * utils.c (pfildes): New.
5861 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5863 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5864 * configure: Regenerate.
5866 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5868 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5869 (linux_done_accessing_memory): ... this.
5870 (linux_target_ops): Adjust.
5871 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5872 * nto-low.c (nto_target_ops): Adjust comment.
5873 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5874 * spu-low.c (spu_target_ops): Adjust comment.
5875 * target.h (target_ops): Rename unprepare_to_access_memory field
5876 to done_accessing_memory.
5877 (unprepare_to_access_memory): Rename to ...
5878 (done_accessing_memory): ... this.
5880 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5882 * linux-low.c (linux_prepare_to_access_memory): New.
5883 (linux_unprepare_to_access_memory): New.
5884 (linux_target_ops): Install them.
5885 * server.c (read_memory): Rename to ...
5886 (gdb_read_memory): ... this. Use
5887 prepare_to_access_memory/prepare_to_access_memory.
5888 (write_memory): Rename to ...
5889 (gdb_write_memory): ... this. Use
5890 prepare_to_access_memory/prepare_to_access_memory.
5891 (handle_search_memory_1): Adjust.
5892 (process_serial_event): Adjust.
5893 * target.h (struct target_ops): New fields
5894 prepare_to_access_memory and unprepare_to_access_memory.
5895 (prepare_to_access_memory, unprepare_to_access_memory): New.
5896 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5897 prepare_to_access_memory/prepare_to_access_memory.
5898 * nto-low.c (nto_target_ops): Adjust.
5899 * spu-low.c (spu_target_ops): Adjust.
5900 * win32-low.c (win32_target_ops): Adjust.
5902 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5904 * Makefile.in (WARN_CFLAGS): Get it from configure.
5905 (WERROR_CFLAGS): New.
5906 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5907 * configure.ac: Introduce --enable-werror, which adds -Werror to
5908 the compiler command line. Enabled by default. Disable with
5909 --disable-werror. Add -Wdeclaration-after-statement
5910 Wpointer-arith and -Wformat-nonliteral to warning flags.
5911 * configure: Regenerate.
5913 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5915 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5917 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5919 * gdbreplay.c (remote_error): New.
5921 (expect): Use gdbchar. Check for error reading from GDB.
5922 Clarify sync error output.
5923 (play): Check for errors writing to GDB.
5924 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5925 * remote-utils.c (getpkt): Check for errors writing to the remote
5928 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5930 * linux-low.c (linux_wait_1): Move non-debugging code out of
5931 `debug_threads' control.
5933 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5935 * linux-low.c (linux_wait_1): Don't set last_status here.
5936 * server.c (push_event, queue_stop_reply_callback): Assert we're
5937 not pushing a TARGET_WAITKIND_IGNORE event.
5938 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5939 (myresume, handle_target_event): Set the thread's last_resume_kind
5940 and last_status from the target returned status.
5942 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5946 * linux-x86-low.c (update_debug_registers_callback): New.
5947 (i386_dr_low_set_addr): Use it.
5948 (i386_dr_low_get_addr): New.
5949 (i386_dr_low_set_control): Use update_debug_registers_callback.
5950 (i386_dr_low_get_control): New.
5951 (i386_dr_low_get_status): Adjust.
5952 * linux-low.c (linux_stop_lwp): New.
5953 * linux-low.h (linux_stop_lwp): Declare.
5955 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5956 argument instead of a i386_debug_reg_state.
5957 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5958 a i386_debug_reg_state.
5959 (i386_insert_aligned_watchpoint): Adjust.
5960 (i386_remove_aligned_watchpoint): Adjust.
5961 (i386_low_stopped_data_address): Read the debug registers from the
5962 inferior instead of from the mirrors.
5963 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5964 (i386_dr_low_get_addr): Declare.
5965 (i386_dr_low_get_control): Declare.
5966 (i386_dr_low_get_status): Change prototype.
5968 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5969 (i386_dr_low_get_addr): New.
5970 (i386_dr_low_get_control): New.
5971 (i386_dr_low_get_status): Adjust prototype. Return
5973 (i386_initial_stuff): Clear dr_status_mirror and
5975 (i386_get_thread_context): Adjust.
5976 (i386_set_thread_context): Adjust.
5977 (i386_thread_added): Adjust.
5979 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5981 * linux-low.h (linux_thread_area): Delete declaration.
5983 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5985 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5986 after its termination.
5988 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5990 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5991 (gdb_wants_all_stopped): Delete.
5992 (linux_wait_1): Don't call them.
5993 * server.c (handle_v_cont): Tag all threads as want-stopped.
5994 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5995 stopped as "client-wants-stopped".
5997 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5999 * Makefile.in (signals_h): New.
6000 (server_h): Depend on it.
6001 (server.o): Don't depend on $(signals_def).
6002 (signals.o): Depend on $(signals_def).
6004 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6006 * Makefile.in (signals_def): New.
6007 (server_h): Append include/gdb/signals.h and signals_def.
6008 (server.o): Append signals_def.
6010 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6012 * server.c (handle_target_event): Use target_signal_to_host for
6013 resume_info.sig initialization.
6014 * target.h (struct thread_resume) <sig>: New comment.
6016 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6018 * server.c (handle_query): strcpy() the returned string from paddress()
6019 instead of sprintf().
6020 * utils.c (paddress): Return phex_nz().
6022 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6024 * server.c (handle_v_cont): Call mourn_inferior if process
6026 (myresume): Likewise.
6028 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6030 Static tracepoints, and integration with UST.
6032 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6033 * mem-break.c (uninsert_all_breakpoints)
6034 (reinsert_all_breakpoints): New.
6035 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6036 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6037 (gdb_agent_ust_loaded, helper_thread_id)
6038 (gdb_agent_helper_thread_id): New macros.
6039 (struct ipa_sym_addresses): Add addr_ust_loaded,
6040 addr_helper_thread_id, addr_cmd_buf.
6041 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6042 (in_process_agent_loaded_ust): New.
6043 (write_e_ust_not_loaded): New.
6044 (maybe_write_ipa_ust_not_loaded): New.
6045 (struct collect_static_trace_data_action): New.
6046 (enum tracepoint_type) <static_tracepoint>: New.
6047 (struct tracepoint) <handle>: Mention static tracepoints.
6048 (struct static_tracepoint_ctx): New.
6049 (CMD_BUF_SIZE): New.
6050 (add_tracepoint_action): Handle static tracepoint actions.
6051 (unprobe_marker_at): New.
6052 (clear_installed_tracepoints): Handle static tracepoints.
6053 (cmd_qtdp): Handle static tracepoints.
6054 (probe_marker_at): New.
6055 (cmd_qtstart): Handle static tracepoints.
6056 (response_tracepoint): Handle static tracepoints.
6057 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6058 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6059 (get_context_regcache): Handle static tracepoints.
6060 (do_action_at_tracepoint): Handle static tracepoint actions.
6061 (traceframe_find_block_type): Handle static trace data blocks.
6062 (traceframe_read_sdata): New.
6063 (download_tracepoints): Download static tracepoint actions.
6064 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6065 (GDB_PROBE_NAME): New.
6070 (ust_marker_to_static_tracepoint): New.
6072 (collect_ust_data_at_tracepoint): New.
6073 (gdb_ust_probe): New.
6074 (UNIX_PATH_MAX, SOCK_DIR): New.
6075 (gdb_ust_connect_sync_socket): New.
6076 (resume_thread, stop_thread): New.
6077 (run_inferior_command): New.
6078 (init_named_socket): New.
6079 (gdb_ust_socket_init): New.
6080 (cstr_to_hexstr): New.
6082 (first_marker, next_marker): New.
6083 (response_ust_marker): New.
6084 (cmd_qtfstm, cmd_qtsstm): New.
6085 (unprobe_marker_at, probe_marker_at): New.
6086 (cmd_qtstmat, gdb_ust_thread): New.
6087 (gdb_ust_init): New.
6088 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6089 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6091 (x86_64_st_collect_regmap): New.
6092 (X86_64_NUM_ST_COLLECT_GREGS): New.
6093 (AMD64_RIP_REGNUM): New.
6094 (supply_static_tracepoint_registers): New.
6095 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6097 (i386_st_collect_regmap): New.
6098 (i386_NUM_ST_COLLECT_GREGS): New.
6099 (supply_static_tracepoint_registers): New.
6100 * server.c (handle_query): Handle qXfer:statictrace:read.
6101 <qSupported>: Report support for StaticTracepoints, and
6102 qXfer:statictrace:read features.
6103 * server.h (traceframe_read_sdata)
6104 (supply_static_tracepoint_registers): Declare.
6105 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6106 (unpack_varlen_hex): Include in IPA build.
6107 * Makefile.in (ustlibs, ustinc): New.
6108 (IPA_OBJS): Add remote-utils-ipa.o.
6109 ($(IPA_LIB)): Link -ldl and -lpthread.
6111 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6112 * config.in, configure: Regenerate.
6114 2010-06-20 Ian Lance Taylor <iant@google.com>
6115 Pedro Alves <pedro@codesourcery.com>
6117 * linux-x86-low.c (always_true): Delete.
6118 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6119 trying to fool the compiler with always_true.
6121 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6123 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6124 conditions in gdbserver.
6126 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6128 * spu-low.c (spu_read_memory): Wrap around local store limit.
6129 (spu_write_memory): Likewise.
6131 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6133 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6134 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6136 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6138 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6139 uses with LONGEST uses.
6141 2010-06-14 Stan Shebs <stan@codesourcery.com>
6142 Pedro Alves <pedro@codesourcery.com>
6146 * linux-x86-low.c: Include limits.h.
6151 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6152 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6153 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6154 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6155 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6156 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6157 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6158 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6159 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6160 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6161 (amd64_emit_void_call_2): New.
6162 (amd64_emit_ops): New.
6163 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6164 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6165 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6166 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6167 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6168 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6169 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6170 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6171 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6172 (i386_emit_stack_adjust, i386_emit_int_call_1)
6173 (i386_emit_void_call_2): New.
6174 (i386_emit_ops): New.
6175 (x86_emit_ops): New.
6176 (the_low_target): Install x86_emit_ops.
6177 * server.h (struct emit_ops): New.
6178 (get_raw_reg_func_addr): Declare.
6179 (current_insn_ptr, emit_error): Declare.
6180 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6181 (set_trace_state_variable_value): New defines.
6182 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6183 addr_get_trace_state_variable_value and
6184 addr_set_trace_state_variable_value.
6185 (symbol_list): New fields for get_raw_reg,
6186 get_trace_state_variable_value and set_trace_state_variable_value.
6187 (condfn): New typedef.
6188 (struct tracepoint): New field `compiled_cond'.
6189 (do_action_at_tracepoint): Clear compiled_cond.
6190 (get_trace_state_variable_value, set_trace_state_variable_value):
6192 (condition_true_at_tracepoint): If there's a compiled condition,
6194 (current_insn_ptr, emit_error): New globals.
6195 (struct bytecode_address): New.
6196 (get_raw_reg_func_addr): New.
6197 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6198 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6199 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6200 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6201 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6202 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6203 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6204 (compile_tracepoint_condition, compile_bytecodes): New.
6205 * target.h (emit_ops): Forward declare.
6206 (struct target_ops): New field emit_ops.
6207 (target_emit_ops): New.
6208 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6209 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6210 * linux-low.c (linux_emit_ops): New.
6211 (linux_target_ops): Install it.
6212 * linux-low.h (struct linux_target_ops): New field emit_ops.
6214 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6216 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6217 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6219 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6220 Stan Shebs <stan@codesourcery.com>
6222 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6223 (all): Depend on $(extra_libraries).
6224 (install-only): Install the IPA.
6225 (IPA_OBJS, IPA_LIB): New.
6226 (clean): Remove the IPA lib.
6227 (IPAGENT_CFLAGS): New.
6228 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6229 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6230 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6231 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6232 * configure.ac: Check for atomic builtins support in the compiler.
6233 (IPA_DEPFILES, extra_libraries): Define.
6234 * configure.srv (ipa_obj): Add description.
6235 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6236 (i[34567]86-*-linux*): Set ipa_obj.
6237 (x86_64-*-linux*): Set ipa_obj.
6238 * linux-low.c (stabilizing_threads): New.
6239 (supports_fast_tracepoints): New.
6240 (linux_detach): Stabilize threads before detaching.
6241 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6242 the lwp is either not stabilizing, or is moving out of a jump pad.
6243 (linux_fast_tracepoint_collecting): New.
6244 (maybe_move_out_of_jump_pad): New.
6245 (enqueue_one_deferred_signal): New.
6246 (dequeue_one_deferred_signal): New.
6247 (linux_wait_for_event_1): If moving out of a jump pad, defer
6248 pending signals to later.
6249 (linux_stabilize_threads): New.
6250 (linux_wait_1): Check if threads need moving out of jump pads, and
6252 (stuck_in_jump_pad_callback): New.
6253 (move_out_of_jump_pad_callback): New.
6255 (linux_resume_one_lwp): Handle moving out of jump pads.
6256 (linux_set_resume_request): Dequeue deferred signals.
6257 (need_step_over_p): Also step over fast tracepoint jumps.
6258 (start_step_over): Also uninsert fast tracepoint jumps.
6259 (finish_step_over): Also reinsert fast tracepoint jumps.
6260 (linux_install_fast_tracepoint_jump): New.
6261 (linux_target_ops): Install linux_stabilize_threads and
6262 linux_install_fast_tracepoint_jump_pad.
6263 * linux-low.h (linux_target_ops) <get_thread_area,
6264 install_fast_tracepoint_jump_pad>: New fields.
6265 (struct lwp_info) <collecting_fast_tracepoint,
6266 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6267 (linux_get_thread_area): Declare.
6268 * linux-x86-low.c (jump_insn): New.
6269 (x86_get_thread_area): New.
6270 (append_insns): New.
6272 (amd64_install_fast_tracepoint_jump_pad): New.
6273 (i386_install_fast_tracepoint_jump_pad): New.
6274 (x86_install_fast_tracepoint_jump_pad): New.
6275 (the_low_target): Install x86_get_thread_area and
6276 x86_install_fast_tracepoint_jump_pad.
6277 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6278 (struct fast_tracepoint_jump): New.
6279 (fast_tracepoint_jump_insn): New.
6280 (fast_tracepoint_jump_shadow): New.
6281 (find_fast_tracepoint_jump_at): New.
6282 (fast_tracepoint_jump_here): New.
6283 (delete_fast_tracepoint_jump): New.
6284 (set_fast_tracepoint_jump): New.
6285 (uninsert_fast_tracepoint_jumps_at): New.
6286 (reinsert_fast_tracepoint_jumps_at): New.
6287 (set_breakpoint_at): Use write_inferior_memory.
6288 (uninsert_raw_breakpoint): Use write_inferior_memory.
6289 (check_mem_read): Mask out fast tracepoint jumps.
6290 (check_mem_write): Mask out fast tracepoint jumps.
6291 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6292 (set_fast_tracepoint_jump): Declare.
6293 (delete_fast_tracepoint_jump)
6294 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6295 (reinsert_fast_tracepoint_jumps_at): Declare.
6296 * regcache.c: Don't compile many functions when building the
6297 in-process agent library.
6298 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6299 the register buffer in the heap.
6300 (free_register_cache): If the register buffer isn't owned by the
6301 regcache, don't free it.
6302 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6303 pre-existing register caches.
6304 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6306 (convert_ascii_to_int): : Constify `from' parameter type.
6307 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6308 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6309 the needed buffer in-place.
6310 (relocate_instruction): New.
6311 * server.c (handle_query) <qSymbols>: If the target supports
6312 tracepoints, give it a chance of looking up symbols. Report
6313 support for fast tracepoints.
6314 (handle_status): Stabilize threads.
6315 (process_serial_event): Adjust.
6316 * server.h (struct fast_tracepoint_jump): Forward declare.
6317 (struct process_info) <fast_tracepoint_jumps>: New field.
6318 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6319 (decode_X_packet, decode_M_packet): Adjust.
6320 (relocate_instruction): Declare.
6321 (in_process_agent_loaded): Declare.
6322 (tracepoint_look_up_symbols): Declare.
6323 (struct fast_tpoint_collect_status): Declare.
6324 (fast_tracepoint_collecting): Declare.
6325 (force_unlock_trace_buffer): Declare.
6326 (handle_tracepoint_bkpts): Declare.
6327 (initialize_low_tracepoint)
6328 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6329 * target.h (struct target_ops) <stabilize_threads,
6330 install_fast_tracepoint_jump_pad>: New fields.
6331 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6332 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6333 [HAVE_STDINT_H]: Include stdint.h.
6334 (trace_debug_1): Rename to ...
6335 (trace_vdebug): ... this.
6336 (trace_debug): Rename to ...
6337 (trace_debug_1): ... this. Add `level' parameter.
6339 (ATTR_USED, ATTR_NOINLINE): New.
6340 (IP_AGENT_EXPORT): New.
6341 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6342 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6343 (about_to_request_buffer_space, trace_buffer_is_full)
6344 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6345 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6346 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6347 (traceframe_write_count, traceframes_created)
6348 (trace_state_variables)
6349 New renaming defines.
6350 (struct ipa_sym_addresses): New.
6351 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6353 (ipa_sym_addrs): New.
6354 (all_tracepoint_symbols_looked_up): New.
6355 (in_process_agent_loaded): New.
6356 (write_e_ipa_not_loaded): New.
6357 (maybe_write_ipa_not_loaded): New.
6358 (tracepoint_look_up_symbols): New.
6359 (debug_threads) [IN_PROCESS_AGENT]: New.
6360 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6361 (UNKNOWN_SIDE_EFFECTS): New.
6362 (stop_tracing): New.
6363 (flush_trace_buffer): New.
6364 (stop_tracing_bkpt): New.
6365 (flush_trace_buffer_bkpt): New.
6366 (read_inferior_integer): New.
6367 (read_inferior_uinteger): New.
6368 (read_inferior_data_pointer): New.
6369 (write_inferior_data_pointer): New.
6370 (write_inferior_integer): New.
6371 (write_inferior_uinteger): New.
6372 (struct collect_static_trace_data_action): Delete.
6373 (enum tracepoint_type): New.
6374 (struct tracepoint) <type>: New field `type'.
6375 <actions_str, step_actions, step_actions_str>: Only include in
6377 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6378 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6379 (tracepoints): Use IP_AGENT_EXPORT.
6380 (last_tracepoint): Don't include in the IPA.
6381 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6382 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6383 (alloced_trace_state_variables): New.
6384 (trace_state_variables): Use IP_AGENT_EXPORT.
6385 (traceframe_t): Delete unused variable.
6386 (circular_trace_buffer): Don't include in the IPA.
6387 (trace_buffer_start): Delete.
6388 (struct trace_buffer_control): New.
6389 (trace_buffer_free): Delete.
6390 (struct ipa_trace_buffer_control): New.
6391 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6392 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6394 (trace_buffer_ctrl): New.
6395 (TRACE_BUFFER_CTRL_CURR): New.
6396 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6397 Reimplement as macros.
6398 (trace_buffer_wrap): Delete.
6399 (traceframe_write_count, traceframe_read_count)
6400 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6401 (struct tracepoint_hit_ctx) <type>: New field.
6402 (struct fast_tracepoint_ctx): New.
6403 (memory_barrier): New.
6405 (record_tracepoint_error): Update atomically in the IPA.
6406 (clear_inferior_trace_buffer): New.
6407 (about_to_request_buffer_space): New.
6408 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6409 updating the same buffer.
6410 (add_tracepoint): Default the tracepoint's type to trap
6411 tracepoint, and orig_size to -1.
6412 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6414 (create_trace_state_variable): New parameter `gdb'. Handle it.
6415 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6416 (cmd_qtdp): Handle fast tracepoints.
6418 (max_jump_pad_size): New.
6419 (gdb_jump_pad_head): New.
6420 (get_jump_space_head): New.
6421 (claim_jump_space): New.
6422 (sort_tracepoints): New.
6423 (MAX_JUMP_SIZE): New.
6424 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6426 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6427 support. Upload fast traceframes, and delete internal IPA
6429 (stop_tracing_handler): New.
6430 (flush_trace_buffer_handler): New.
6431 (cmd_qtstop): Upload fast tracepoints.
6432 (response_tracepoint): Handle fast tracepoints.
6433 (tracepoint_finished_step): Upload fast traceframes. Set the
6434 tracepoint hit context's tracepoint type.
6435 (handle_tracepoint_bkpts): New.
6436 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6437 type. Add comment about fast tracepoints.
6438 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6439 non-existing action_str field.
6440 (get_context_regcache): Handle fast tracepoints.
6441 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6443 (fast_tracepoint_from_jump_pad_address): New.
6444 (fast_tracepoint_from_ipa_tpoint_address): New.
6445 (collecting_t): New.
6446 (force_unlock_trace_buffer): New.
6447 (fast_tracepoint_collecting): New.
6450 (write_inferior_data_ptr): New.
6451 (target_tp_heap): New.
6452 (target_malloc): New.
6453 (download_agent_expr): New.
6455 (download_tracepoints): New.
6456 (download_trace_state_variables): New.
6457 (upload_fast_traceframes): New.
6458 (IPA_FIRST_TRACEFRAME): New.
6459 (IPA_NEXT_TRACEFRAME_1): New.
6460 (IPA_NEXT_TRACEFRAME): New.
6461 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6462 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6463 (gdb_jump_pad_buffer_end): New.
6464 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6465 (initialize_tracepoint): Adjust.
6466 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6467 buffer. Initialize the low module.
6468 * utils.c (PREFIX, TOOLNAME): New.
6469 (malloc_failure): Use PREFIX.
6470 (error): In the IPA, an error causes an exit.
6471 (fatal, warning): Use PREFIX.
6472 (internal_error): Use TOOLNAME.
6473 (NUMCELLS): Increase to 10.
6474 * configure, config.in: Regenerate.
6476 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6478 * server.c (handle_query) <qSupported>: Do two passes over the
6479 qSupported string to avoid nesting strtok.
6481 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6483 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6485 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6487 * configure: Regenerate.
6488 * proc-service.list: New.
6490 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6492 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6495 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6497 * gdbreplay.c (remote_open): Check error return from socket() call by
6498 its equality to -1 not by it being negative.
6499 * remote-utils.c (remote_open): Likewise.
6501 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6503 * config.h: Regenerate.
6505 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6507 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6508 doesn't provide PTRACE_GET_THREAD_AREA.
6510 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6512 * linux-m68k-low.c: Include <asm/ptrace.h>
6513 (ps_get_thread_area): Implement.
6515 2010-05-03 Doug Evans <dje@google.com>
6517 * event-loop.c (struct callback_event): New struct.
6518 (callback_list): New global.
6519 (append_callback_event, delete_callback_event): New functions.
6520 (process_callback): New function.
6521 (start_event_loop): Call it.
6522 * remote-utils.c (NOT_SCHEDULED): Define.
6523 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6524 moved out of readchar.
6525 (readchar): Rewrite. Call reschedule before returning.
6526 (reset_readchar): New function.
6527 (remote_close): Call it.
6528 (process_remaining, reschedule): New functions.
6529 * server.h (callback_handler_func): New typedef.
6530 (append_callback_event, delete_callback_event): Declare.
6532 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6534 * proc-service.c (ps_pglobal_lookup): Use
6535 thread_db_look_up_one_symbol.
6536 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6537 parameter. Use it instead of all_symbols_looked_up.
6538 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6540 (all_symbols_looked_up): Don't declare.
6541 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6542 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6544 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6545 Set all_symbols_looked_up here.
6546 (thread_db_look_up_one_symbol): New.
6547 (thread_db_get_tls_address): Adjust.
6548 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6549 thread_db object on the heap, and tentatively set it in the
6551 (thread_db_init): Don't set all_symbols_looked_up here.
6552 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6554 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6556 * linux-low.c (linux_kill, linux_detach): Adjust.
6557 (status_pending_p_callback): Remove redundant statement. Check
6558 for !TARGET_WAITIKIND_IGNORE, instead of
6559 TARGET_WAITKIND_STOPPED.
6560 (handle_tracepoints): Make sure LWP is locked. Adjust.
6561 (linux_wait_for_event_1): Adjust.
6562 (linux_cancel_breakpoints): New.
6563 (unsuspend_one_lwp): New.
6564 (unsuspend_all_lwps): New.
6565 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6566 (send_sigstop_callback): Change return type to int, add new
6567 `except' parameter and handle it.
6568 (suspend_and_send_sigstop_callback): New.
6569 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6570 pass them down. If SUSPEND, also increment the lwp's suspend
6572 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6573 (need_step_over_p): Don't consider suspended LWPs.
6574 (start_step_over): Adjust.
6575 (proceed_one_lwp): Change return type to int, add new `except'
6576 parameter and handle it.
6577 (unsuspend_and_proceed_one_lwp): New.
6578 (proceed_all_lwps): Use find_inferior instead of
6580 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6581 also decrement the suspend count of LWPs. Pass `except' down,
6582 instead of hacking its suspend count.
6583 (linux_pause_all): Add `freeze' parameter. Adjust.
6584 (linux_unpause_all): New.
6585 (linux_target_ops): Install linux_unpause_all.
6586 * server.c (handle_status): Adjust.
6587 * target.h (struct target_ops): New fields `unpause_all' and
6588 `cancel_breakpoints'. Add new parameter to `pause_all'.
6589 (pause_all): Add new `freeze' parameter.
6591 (cancel_breakpoints): New.
6592 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6594 (cmd_qtstart): Pause threads.
6595 (stop_tracing): Pause threads, and cancel breakpoints.
6596 * win32-low.c (win32_target_ops): Adjust.
6598 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6600 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6601 the inferior right away from here...
6602 (linux_wait_1): ... to here, and adjust to check the thread's
6603 last_resume_kind instead of the lwp's step or stop_expected flags.
6605 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6607 * README: Use consistent `GDB' and `GDBserver' spellings.
6609 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6611 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6612 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6613 (linux_detach_one_lwp): Assume the lwp is stopped.
6614 (any_thread_of): Delete.
6615 (linux_detach): Stop all lwps here. Don't blindly delete all
6617 (delete_lwp_callback): New.
6618 (linux_mourn): Delete all lwps of the process that is gone.
6619 (linux_wait_1): Don't delete the last lwp of the process here.
6620 * mem-break.h (mark_breakpoints_out): Declare.
6621 * mem-break.c (mark_breakpoints_out): New.
6622 (free_all_breakpoints): Use it.
6623 * server.c (handle_target_event): If the process is gone, mark
6625 * thread-db.c (struct thread_db) <create_bp>: New field.
6626 (thread_db_enable_reporting): Fix prototype. Store a thread event
6627 breakpoint reference in the thread_db struct.
6628 (thread_db_load_search): Clear the thread_db object.
6629 (try_thread_db_load_1): Ditto.
6630 (switch_to_process): New.
6631 (disable_thread_event_reporting): Use it.
6632 (remove_thread_event_breakpoints): New.
6633 (thread_db_detach, thread_db_mourn): Use it.
6635 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6637 * linux-low.c (linux_enable_event_reporting): New.
6638 (linux_wait_for_event_1, handle_extended_wait): Use it.
6640 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6642 * linux-low.c (linux_kill_one_lwp, linux_kill)
6643 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6644 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6645 SIGSTOP even if the LWP is stopped.
6646 (send_sigstop_callback): New.
6647 (stop_all_lwps): Use send_sigstop_callback instead.
6648 (linux_resume_one_thread): Adjust.
6649 (proceed_one_lwp): Still proceed an LWP that the client has
6650 requested to stop, if we haven't reported it as stopped yet. Make
6651 sure that LWPs the client want stopped, have a pending SIGSTOP.
6653 2010-04-26 Doug Evans <dje@google.com>
6655 * server.c (handle_general_set): Make static.
6657 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6658 Print received char after testing for error/eof instead of before.
6659 (input_interrupt): Tweak comment.
6661 2010-04-23 Doug Evans <dje@google.com>
6663 * server.c (start_inferior): Print inferior argv if --debug.
6665 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6667 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6668 * nto-x86-low.c: Include server.h
6670 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6672 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6673 be consistent with other sources of this directory.
6674 (init_registers_amd64): Correct name of source file of this function
6677 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6679 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6682 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6684 * win32-i386-low.c: Add 64-bit support.
6685 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6686 (init_registers_amd64): Declare.
6687 (mappings): Add 64-bit version of array.
6688 (init_windows_x86): New function.
6689 (the_low_target): Change init_arch field to init_windows_x86.
6691 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6693 * win32-low.c: Adapt to support also 64-bit architecture.
6694 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6695 (get_image_name): Use SIZE_T type for local variable `done'.
6696 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6697 (toolhelp_get_dll_name): Idem.
6698 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6699 Use uintptr_t typecast to avoid warning.
6700 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6701 (handle_exception): Use phex_nz to avoid warning.
6702 (win32_wait): Remove unused local variable `process'.
6704 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6706 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6709 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6711 * configure.ac: Use `ws2_32' library for srv_mingw.
6712 * configure: Regenerate.
6713 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6714 * remote-utils.c: Likewise.
6716 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6718 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6719 if __x86_64__ is defined.
6721 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6723 * configure: Regenerate.
6725 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6727 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6728 * target.h (target_ops): New get_tib_address field.
6729 * win32-low.h (win32_thread_info): Add thread_local_base field.
6730 * win32-low.c (child_add_thread): Add tlb argument.
6731 Set thread_local_base field to TLB.
6732 (get_child_debug_event): Adapt to child_add_thread change.
6733 (win32_get_tib_address): New function.
6734 (win32_target_ops): Set get_tib_address field to
6735 win32_get_tib_address.
6736 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6738 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6740 * linux-low.c (linux_mourn): Also remove the process.
6741 * server.c (handle_target_event): Don't remove the process here.
6742 * nto-low.c (nto_mourn): New.
6743 (nto_target_ops): Install it.
6744 * spu-low.c (spu_mourn): New.
6745 (spu_target_ops): Install it.
6746 * win32-low.c (win32_mourn): New.
6747 (win32_target_ops): Install it.
6749 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6751 * server.h (buffer_xml_printf): Remove redundant `;'.
6753 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6755 * regcache.c (set_register_cache): Invalidate regcaches before
6756 changing the register cache layout.
6757 (regcache_invalidate_one): Allow a NULL regcache.
6758 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6759 regcaches before changing the register cache layout or the target
6762 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6764 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6765 variable warning on Linux/x86-64.
6767 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6769 GDBserver disconnected tracing support.
6771 * linux-low.c (linux_remove_process): Delete.
6772 (add_lwp): Don't set last_resume_kind here.
6773 (linux_kill): Use `mourn'.
6774 (linux_detach): Use `thread_db_detach', and `mourn'.
6776 (linux_attach_lwp_1): Adjust comment.
6777 (linux_attach): last_resume_kind moved the thread_info; adjust.
6778 (status_pending_p_callback): Adjust.
6779 (linux_wait_for_event_1): Adjust.
6780 (count_events_callback, select_singlestep_lwp_callback)
6781 (select_event_lwp_callback, cancel_breakpoints_callback)
6782 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6783 (proceed_one_lwp): Adjust.
6784 (linux_async): Add debug output.
6785 (linux_thread_stopped): New.
6786 (linux_pause_all): New.
6787 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6789 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6790 (thread_db_free): Delete declaration.
6791 (thread_db_detach, thread_db_mourn): Declare.
6792 * thread-db.c (thread_db_init): Use thread_db_mourn.
6793 (thread_db_free): Delete, split in two.
6794 (disable_thread_event_reporting): New.
6795 (thread_db_detach): New.
6796 (thread_db_mourn): New.
6798 * server.h (struct thread_info) <last_resume_kind>: New field.
6799 <attached>: Add comment.
6800 <gdb_detached>: New field.
6801 (handler_func): Change return type to int.
6802 (handle_serial_event, handle_target_event): Ditto.
6803 (gdb_connected): Declare.
6805 (disconnected_tracing): Declare.
6806 (stop_tracing): Declare.
6808 * server.c (handle_query) <qSupported>: Report support for
6809 disconnected tracing.
6810 (queue_stop_reply_callback): Account for running threads.
6811 (gdb_wants_thread_stopped): New.
6812 (gdb_wants_all_threads_stopped): New.
6813 (gdb_reattached_process): New.
6814 (handle_status): Clear the `gdb_detached' flag of all processes.
6815 In all-stop, stop all threads.
6816 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6817 (process_serial_event): If the remote connection breaks, or if an
6818 exit was forced with "monitor exit", force an event loop exit.
6819 Handle disconnected tracing on detach.
6820 (handle_serial_event): Adjust.
6821 (handle_target_event): If GDB isn't connected, forward events back
6822 to the inferior, unless the last process exited, in which case,
6823 exit gdbserver. Adjust interface.
6825 * remote-utils.c (remote_open): Don't block in accept. Instead
6826 register an event loop source on the listen socket file
6827 descriptor. Refactor bits into ...
6828 (listen_desc): ... this new global.
6829 (gdb_connected): ... this new function.
6830 (enable_async_notification): ... this new function.
6831 (handle_accept_event): ... this new function.
6832 (remote_close): Clear remote_desc.
6834 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6836 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6838 (mourn_inferior): Define.
6839 (target_process_qsupported): Avoid the dangling else problem.
6840 (thread_stopped): Define.
6841 (pause_all): Define.
6842 (target_waitstatus_to_string): Declare.
6843 * target.c (target_waitstatus_to_string): New.
6845 * tracepoint.c (tracing): Make extern.
6846 (disconnected_tracing): New.
6847 (stop_tracing): Make extern. Handle tracing stops due to GDB
6849 (cmd_qtdisconnected): New.
6850 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6851 (handle_tracepoint_general_set): Handle QTDisconnected.
6853 * event-loop.c (event_handler_func): Change return type to int.
6854 (process_event): Bail out if the event handler wants the event
6856 (handle_file_event): Ditto.
6857 (start_event_loop): Bail out if the event handler wants the event
6860 * nto-low.c (nto_target_ops): Adjust.
6861 * spu-low.c (spu_wait): Don't remove the process here.
6862 (spu_target_ops): Adjust.
6863 * win32-low.c (win32_wait): Don't remove the process here.
6864 (win32_target_ops): Adjust.
6866 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6868 * regcache.c (realloc_register_cache): Invalidate inferior's
6869 regcache before recreating it.
6871 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6873 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6875 2010-04-09 Stan Shebs <stan@codesourcery.com>
6876 Pedro Alves <pedro@codesourcery.com>
6878 * server.h (LONGEST): New.
6879 (struct thread_info) <while_stepping>: New field.
6880 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6882 (initialize_tracepoint, handle_tracepoint_general_set)
6883 (handle_tracepoint_query, tracepoint_finished_step)
6884 (tracepoint_was_hit, release_while_stepping_state_list):
6885 (current_traceframe): Declare.
6886 * server.c (handle_general_set): Handle tracepoint packets.
6888 (write_memory): New.
6889 (handle_search_memory_1): Use read_memory.
6890 (handle_query): Report support for conditional tracepoints, trace
6891 state variables, and tracepoint sources. Handle tracepoint
6893 (main): Initialize the tracepoints module.
6894 (process_serial_event): Handle traceframe reads/writes.
6896 * linux-low.c (handle_tracepoints): New.
6897 (linux_wait_1): Call it.
6898 (linux_resume_one_lwp): Handle while-stepping.
6899 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6900 (linux_target_ops): Install them.
6901 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6903 * linux-x86-low.c (x86_supports_tracepoints): New.
6904 (the_low_target). Install it.
6906 * mem-break.h (delete_breakpoint): Declare.
6907 * mem-break.c (delete_breakpoint): Make external.
6909 * target.h (struct target_ops): Add `supports_tracepoints',
6910 `read_pc', and `write_pc' fields.
6911 (target_supports_tracepoints): Define.
6912 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6915 * regcache.h (struct regcache) <registers_owned>: New field.
6916 (init_register_cache, regcache_cpy): Declare.
6917 (regcache_read_pc, regcache_write_pc): Declare.
6918 (register_cache_size): Declare.
6919 (supply_regblock): Declare.
6920 * regcache.c (init_register_cache): New.
6921 (new_register_cache): Use it.
6922 (regcache_cpy): New.
6923 (register_cache_size): New.
6924 (supply_regblock): New.
6925 (regcache_read_pc, regcache_write_pc): New.
6927 * tracepoint.c: New.
6929 * Makefile.in (OBS): Add tracepoint.o.
6930 (tracepoint.o): New rule.
6932 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6934 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6936 (i386-mmx.c): Likewise.
6937 (i386-mmx-linux.o): Likewise.
6938 (i386-mmx-linux.c): Likewise.
6940 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6941 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6942 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6943 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6945 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6946 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6947 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6949 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6951 * Makefile.in (clean): Updated.
6953 (i386-avx.c): Likewise.
6954 (i386-avx-linux.o): Likewise.
6955 (i386-avx-linux.c): Likewise.
6956 (amd64-avx.o): Likewise.
6957 (amd64-avx.c): Likewise.
6958 (amd64-avx-linux.o): Likewise.
6959 (amd64-avx-linux.c): Likewise.
6961 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6962 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6963 (srv_amd64_regobj): Add amd64-avx.o.
6964 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6967 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6968 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6969 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6972 * i387-fp.c: Include "i386-xstate.h".
6974 (i387_cache_to_xsave): Likewise.
6975 (i387_xsave_to_cache): Likewise.
6976 (x86_xcr0): Likewise.
6978 * i387-fp.h (i387_cache_to_xsave): Likewise.
6979 (i387_xsave_to_cache): Likewise.
6980 (x86_xcr0): Likewise.
6982 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6983 * linux-crisv32-low.c (target_regsets): Likewise.
6984 * linux-m68k-low.c (target_regsets): Likewise.
6985 * linux-mips-low.c (target_regsets): Likewise.
6986 * linux-ppc-low.c (target_regsets): Likewise.
6987 * linux-s390-low.c (target_regsets): Likewise.
6988 * linux-sh-low.c (target_regsets): Likewise.
6989 * linux-sparc-low.c (target_regsets): Likewise.
6990 * linux-xtensa-low.c (target_regsets): Likewise.
6992 * linux-low.c: Include <sys/uio.h>.
6993 (regsets_fetch_inferior_registers): Support nt_type.
6994 (regsets_store_inferior_registers): Likewise.
6995 (linux_process_qsupported): New.
6996 (linux_target_ops): Add linux_process_qsupported.
6998 * linux-low.h (regset_info): Add nt_type.
6999 (linux_target_ops): Add process_qsupported.
7001 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7003 (init_registers_i386_avx_linux): New.
7004 (init_registers_amd64_avx_linux): Likewise.
7005 (xmltarget_i386_linux_no_xml): Likewise.
7006 (xmltarget_amd64_linux_no_xml): Likewise.
7007 (PTRACE_GETREGSET): Likewise.
7008 (PTRACE_SETREGSET): Likewise.
7009 (x86_fill_xstateregset): Likewise.
7010 (x86_store_xstateregset): Likewise.
7011 (use_xml): Likewise.
7012 (x86_linux_update_xmltarget): Likewise.
7013 (x86_linux_process_qsupported): Likewise.
7014 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7015 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7016 init_registers_i386_linux here. Call
7017 x86_linux_update_xmltarget.
7018 (the_low_target): Add x86_linux_process_qsupported.
7020 * server.c (handle_query): Call target_process_qsupported.
7022 * target.h (target_ops): Add process_qsupported.
7023 (target_process_qsupported): New.
7025 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7027 * inferiors.c (add_thread): Set last_status kind to
7028 TARGET_WAITKIND_IGNORE.
7029 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7030 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7031 (linux_wait_1): Move `thread' local definition to block that uses
7032 it. Don't NULL initialize `event_child'.
7033 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7034 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7035 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7037 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7039 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7040 an extended waitstatus, or by a watchpoint.
7041 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7042 thread was stepping or has been stopped by a watchpoint.
7044 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7046 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7047 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7048 of another, then delete the previous, and validate all
7050 (validate_inserted_breakpoint): New.
7051 (delete_disabled_breakpoints): New.
7052 (validate_breakpoints): New.
7053 (check_mem_read): Validate breakpoints before trusting their
7054 shadow. Delete disabled breakpoints.
7055 (check_mem_write): Validate breakpoints before trusting they
7056 should be inserted. Delete disabled breakpoints.
7057 * mem-break.h (validate_breakpoints):
7058 * server.c (handle_query): Validate breakpoints when we see a
7061 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7063 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7064 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7065 if we could tell there's a GDB breakpoint at stop_pc.
7066 (need_step_over_p): Don't do a step over if we find a GDB
7067 breakpoint at the resume PC.
7069 * mem-break.c (struct raw_breakpoint): New.
7070 (enum bkpt_type): New type `gdb_breakpoint'.
7071 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7072 fields. New field `raw'.
7073 (find_raw_breakpoint_at): New.
7074 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7076 (set_breakpoint_at): Adjust.
7077 (delete_raw_breakpoint): New.
7078 (release_breakpoint): New.
7079 (delete_breakpoint): Rename to...
7080 (delete_breakpoint_1): ... this. Add proc parameter. Use
7081 release_breakpoint. Return ENOENT.
7082 (delete_breakpoint): Reimplement.
7083 (find_breakpoint_at): Delete.
7084 (find_gdb_breakpoint_at): New.
7085 (delete_breakpoint_at): Delete.
7086 (set_gdb_breakpoint_at): New.
7087 (delete_gdb_breakpoint_at): New.
7088 (gdb_breakpoint_here): New.
7089 (set_reinsert_breakpoint): Use release_breakpoint.
7090 (uninsert_breakpoint): Rename to ...
7091 (uninsert_raw_breakpoint): ... this.
7092 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7093 (reinsert_raw_breakpoint): Change parameter type to
7095 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7097 (check_breakpoints): Adjust. Use release_breakpoint.
7098 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7099 (breakpoint_inserted_here): Ditto.
7100 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7101 Don't trust the breakpoint's shadow if it is not inserted.
7102 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7103 (delete_all_breakpoints): Adjust.
7104 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7105 use delete_breakpoint_1.
7107 * mem-break.h (breakpoints_supported): Delete declaration.
7108 (set_gdb_breakpoint_at): Declare.
7109 (gdb_breakpoint_here): Declare.
7110 (delete_breakpoint_at): Delete.
7111 (delete_gdb_breakpoint_at): Declare.
7113 * server.h (struct raw_breakpoint): Forward declare.
7114 (struct process_info): New field `raw_breakpoints'.
7116 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7119 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7121 * linux-low.c (status_pending_p_callback): Fix comment.
7122 (linux_wait_for_event_1): Move most of the internal breakpoint
7123 handling from here...
7124 (linux_wait_1): ... to here.
7125 (count_events_callback): New.
7126 (select_singlestep_lwp_callback): New.
7127 (select_event_lwp_callback): New.
7128 (cancel_breakpoints_callback): New.
7129 (select_event_lwp): New.
7130 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7131 priority to all LWPs that have had events that should be reported
7132 to the client. Cancel breakpoints when about to reporting the
7133 event to the client, not while stopping lwps. No longer cancel
7134 finished single-steps here.
7135 (cancel_finished_single_step): Delete.
7136 (cancel_finished_single_steps): Delete.
7138 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7140 * mem-break.c (enum bkpt_type): New.
7141 (struct breakpoint): New field `type'.
7142 (set_breakpoint_at): Change return type to struct breakpoint
7143 pointer. Set type to `other_breakpoint' by default.
7144 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7145 in the breakpoint list.
7146 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7147 (reinsert_breakpoint): Rename to ...
7148 (reinsert_raw_breakpoint): ... this.
7149 (reinsert_breakpoints_at): Adjust.
7150 * mem-break.h (struct breakpoint): Declare.
7151 (set_breakpoint_at): Change return type to struct breakpoint
7154 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7156 * server.c (handle_query): Assign, not compare.
7158 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7160 Teach linux gdbserver to step-over-breakpoints.
7162 * linux-low.c (can_hardware_single_step): New.
7163 (supports_breakpoints): New.
7164 (handle_extended_wait): If stopping threads, read the stop pc of
7167 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7168 low target doesn't support retrieving the PC.
7169 (add_lwp): Set last_resume_kind to resume_continue.
7170 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7171 (linux_attach): Don't clear stop_expected. Set the lwp's
7172 last_resume_kind to resume_stop.
7173 (linux_detach_one_lwp): Don't check for removed breakpoints.
7174 (check_removed_breakpoint): Delete.
7175 (status_pending_p): Rename to ...
7176 (status_pending_p_callback): ... this. Don't check for removed
7177 breakpoints. Don't consider threads that are stopped from GDB's
7179 (linux_wait_for_lwp): Always read the stop_pc here.
7180 (cancel_breakpoint): New.
7181 (step_over_bkpt): New global.
7182 (linux_wait_for_event_1): Implement stepping over breakpoints.
7183 (gdb_wants_lwp_stopped): New.
7184 (gdb_wants_all_stopped): New.
7185 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7186 single-step traps here. Store the thread's last reported target
7188 (send_sigstop): Don't clear stop_expected. Always set it,
7190 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7191 (cancel_finished_single_step): New.
7192 (cancel_finished_single_steps): New.
7193 (wait_for_sigstop): Don't cancel finished single-step traps here.
7194 (linux_resume_one_lwp): Don't check for removed breakpoints.
7195 Don't set `step' on non-hardware step archs.
7196 (linux_set_resume_request): Ignore resume_stop requests if already
7197 stopping or stopped. Set the lwp's last_resume_kind.
7198 (resume_status_pending_p): Don't check for removed breakpoints.
7199 (need_step_over_p): New.
7200 (start_step_over): New.
7201 (finish_step_over): New.
7202 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7203 requests. Clear the thread's last reported target waitstatus.
7204 Don't use the `suspended' flag. Don't consider pending breakpoints.
7205 (linux_resume): Start a step-over if necessary.
7206 (proceed_one_lwp): New.
7207 (proceed_all_lwps): New.
7208 (unstop_all_lwps): New.
7209 * linux-low.h (struct lwp_info): Rewrite comment for the
7210 `suspended' flag. Add the `stop_pc' field. Delete the
7211 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7212 Add `'last_resume_kind' and `need_step_over' fields.
7213 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7214 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7215 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7216 (set_raw_breakpoint_at): New.
7217 (set_breakpoint_at): Rewrite to use it.
7218 (reinsert_breakpoint_handler): Delete.
7219 (set_reinsert_breakpoint): New.
7220 (reinsert_breakpoint_by_bp): Delete.
7221 (delete_reinsert_breakpoints): New.
7222 (uninsert_breakpoint): Rewrite.
7223 (uninsert_breakpoints_at): New.
7224 (reinsert_breakpoint): Rewrite.
7225 (reinsert_breakpoints_at): New.
7226 (check_breakpoints): Rewrite.
7227 (breakpoint_here): New.
7228 (breakpoint_inserted_here): New.
7229 (check_mem_read): Adjust.
7230 * mem-break.h (breakpoints_supported, breakpoint_here)
7231 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7232 (reinsert_breakpoint_by_bp): Delete declaration.
7233 (delete_reinsert_breakpoints): Declare.
7234 (reinsert_breakpoint): Delete declaration.
7235 (reinsert_breakpoints_at): Declare.
7236 (uninsert_breakpoint): Delete declaration.
7237 (uninsert_breakpoints_at): Declare.
7238 (check_breakpoints): Adjust prototype.
7239 * server.h: Adjust include order.
7240 (struct thread_info): Declare here. Add a `last_status' field.
7242 2010-03-23 Michael Snyder <msnyder@vmware.com>
7244 * server.c (crc32): New function.
7245 (handle_query): Add handling for 'qCRC:' request.
7247 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7249 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7250 lwp had been stopped by a watchpoint.
7252 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7254 * server.h (internal_error): Declare.
7255 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7256 * utils.c (internal_error): New function.
7258 2010-03-15 Andreas Schwab <schwab@redhat.com>
7260 * configure.srv: Fix typo setting srv_regobj.
7262 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7264 * linux-low.c (fetch_register): Avoid passing a non string literal
7266 (usr_store_inferior_registers): Ditto.
7268 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7270 * linux-low.c (linux_write_memory): Bail out early if peeking
7273 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7275 * linux-low.h (struct lwp_info): New fields
7276 `stopped_by_watchpoint' and `stopped_data_address'.
7277 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7278 here, and cache them in the lwp object.
7279 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7281 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7283 (linux_stopped_by_watchpoint): Rewrite.
7284 (linux_stopped_data_address): Rewrite.
7286 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7288 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7289 switching the current inferior, not before.
7291 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7293 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7294 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7295 i386-linux.c and amd64-linux.c.
7296 (reg-i386.o): Removed.
7297 (reg-i386.c): Likewise.
7298 (reg-i386-linux.o): Likewise.
7299 (reg-i386-linux.c): Likewise.
7300 (reg-x86-64.o): Likewise.
7301 (reg-x86-64.c): Likewise.
7302 (reg-x86-64-linux.o): Likewise.
7303 (reg-x86-64-linux.c): Likewise.
7306 (i386-linux.o): Likewise.
7307 (i386-linux.c): Likewise.
7308 (amd64.o): Likewise.
7309 (amd64.c): Likewise.
7310 (amd64-linux.o): Likewise.
7311 (amd64-linux.c): Likewise.
7313 * configure.srv (srv_i386_regobj): New.
7314 (srv_i386_linux_regobj): Likewise.
7315 (srv_amd64_regobj): Likewise.
7316 (srv_amd64_linux_regobj): Likewise.
7317 (srv_i386_32bit_xmlfiles): Likewise.
7318 (srv_i386_64bit_xmlfiles): Likewise.
7319 (srv_i386_xmlfiles): Likewise.
7320 (srv_amd64_xmlfiles): Likewise.
7321 (srv_i386_linux_xmlfiles): Likewise.
7322 (srv_amd64_linux_xmlfiles): Likewise.
7323 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7324 srv_xmlfiles to $srv_i386_xmlfiles.
7325 (i[34567]86-*-mingw32ce*): Likewise.
7326 (i[34567]86-*-mingw*): Likewise.
7327 (i[34567]86-*-nto*): Likewise.
7328 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7329 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7330 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7331 (x86_64-*-linux*): Likewise.
7333 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7334 (init_registers_amd64_linux): New.
7335 (x86_arch_setup): Replace init_registers_x86_64_linux with
7336 init_registers_amd64_linux.
7338 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7340 * configure.ac: Check for libdl. If it is not available link against
7341 static libthread_db.
7342 * configure: Regenerate.
7344 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7348 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7349 handing a read watchpoint.
7350 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7352 2010-02-12 Doug Evans <dje@google.com>
7354 * linux-low.c (linux_supports_tracefork_flag): Document.
7355 (linux_look_up_symbols): Add comment.
7357 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7359 * regcache.c (supply_register): Clear regcache if buf is NULL.
7361 2010-02-02 Nicolas Roche <roche@sourceware.org>
7362 Joel Brobecker <brobecker@adacore.com>
7364 * inferiors.c (find_inferior): Add function documentation.
7365 (unloaded_dll): Handle the case where the unloaded dll has not
7366 been previously registered in the dll list.
7368 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7370 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7371 (thumb2_breakpoint): New.
7372 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7374 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7376 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7377 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7380 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7382 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7384 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7386 * linux-s390-low.c (s390_collect_ptrace_register)
7387 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7389 2010-01-21 Doug Evans <dje@google.com>
7391 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7392 (PTRACE_ARG4_TYPE): New macro.
7393 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7394 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7395 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7396 (usr_store_inferior_registers): Ditto.
7397 (linux_read_memory, linux_write_memory): Ditto.
7398 (linux_test_for_tracefork): Ditto.
7400 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7401 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7403 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7405 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7408 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7410 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7411 prototype to take a regcache. Adjust.
7413 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7415 * regcache.h (struct thread_info): Forward declare.
7416 (struct regcache): New.
7417 (new_register_cache): Adjust prototype.
7418 (get_thread_regcache): Declare.
7419 (free_register_cache): Adjust prototype.
7420 (registers_to_string, registers_from_string): Ditto.
7421 (supply_register, supply_register_by_name, collect_register)
7422 (collect_register_as_string, collect_register_by_name): Ditto.
7423 * regcache.c (struct inferior_regcache_data): Delete.
7424 (get_regcache): Rename to ...
7425 (get_thread_regcache): ... this. Adjust. Switch inferior before
7427 (regcache_invalidate_one): Adjust.
7428 (regcache_invalidate): Fix prototype.
7429 (new_register_cache): Return the new register cache.
7430 (free_register_cache): Change prototype.
7431 (realloc_register_cache): Adjust.
7432 (registers_to_string): Change prototype to take a regcache. Adjust.
7433 (registers_from_string): Ditto.
7434 (register_data): Ditto.
7435 (supply_register): Ditto.
7436 (supply_register_by_name): Ditto.
7437 (collect_register): Ditto.
7438 (collect_register_as_string): Ditto.
7439 (collect_register_by_name): Ditto.
7440 * server.c (process_serial_event): Adjust.
7441 * linux-low.h (regset_fill_func, regset_store_func): Change
7443 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7445 * linux-low.c (get_stop_pc): Adjust.
7446 (check_removed_breakpoint): Adjust.
7447 (linux_wait_for_event): Adjust.
7448 (linux_resume_one_lwp): Adjust.
7449 (fetch_register): Add regcache parameter. Adjust.
7450 (usr_store_inferior_registers): Ditto.
7451 (regsets_fetch_inferior_registers): Ditto.
7452 (regsets_store_inferior_registers): Ditto.
7453 (linux_fetch_registers, linux_store_registers): Ditto.
7454 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7456 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7458 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7459 prototype to take a regcache.
7460 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7461 * remote-utils.c (convert_ascii_to_int, outreg)
7462 (prepare_resume_reply): Change prototype to take a regcache.
7464 * target.h (struct target_ops) <fetch_registers, store_registers>:
7465 Change prototype to take a regcache.
7466 (fetch_inferior_registers, store_inferior_registers): Change
7467 prototype to take a regcache. Adjust.
7468 * proc-service.c (ps_lgetregs): Adjust.
7469 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7470 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7471 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7472 take a regcache. Adjust.
7473 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7474 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7475 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7476 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7477 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7478 (cris_cannot_fetch_register):
7479 (cris_breakpoint_at): Change prototype to take a regcache.
7481 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7482 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7483 to take a regcache. Adjust.
7484 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7486 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7487 take a regcache. Adjust.
7488 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7489 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7490 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7491 * linux-mips-low.c (mips_get_pc):
7492 (mips_set_pc): Change prototype to take a regcache. Adjust.
7493 (mips_reinsert_addr): Adjust.
7494 (mips_collect_register): Change prototype to take a regcache.
7496 (mips_supply_register):
7497 (mips_collect_register_32bit, mips_supply_register_32bit)
7498 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7499 (mips_store_fpregset): Ditto.
7500 * linux-ppc-low.c (ppc_supply_ptrace_register)
7501 (ppc_supply_ptrace_register): Ditto.
7502 (parse_spufs_run): Adjust.
7503 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7504 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7505 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7506 take a regcache. Adjust.
7507 * linux-s390-low.c (s390_collect_ptrace_register)
7508 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7509 (s390_set_pc): Change prototype to take a regcache. Adjust.
7510 (s390_arch_setup): Adjust.
7511 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7512 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7513 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7514 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7515 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7517 (sparc_breakpoint_at): Adjust.
7518 * linux-xtensa-low.c (xtensa_fill_gregset):
7519 (xtensa_store_gregset):
7520 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7521 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7522 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7523 prototype to take a regcache. Adjust.
7524 * win32-arm-low.c (arm_fetch_inferior_register)
7525 (arm_store_inferior_register): Change prototype to take a
7527 * win32-i386-low.c (i386_fetch_inferior_register)
7528 (i386_store_inferior_register): Change prototype to take a
7530 * win32-low.c (child_fetch_inferior_registers)
7531 (child_store_inferior_registers): Change prototype to take a
7533 (win32_wait): Adjust.
7534 (win32_fetch_inferior_registers): Change prototype to take a
7536 (win32_store_inferior_registers): Adjust.
7537 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7538 store_inferior_register>: Change prototype to take a regcache.
7540 2010-01-20 Doug Evans <dje@google.com>
7542 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7544 (linux_wait_for_event1, linux_init_signals): Ditto.
7545 (W_STOPCODE): Provide definition if missing.
7547 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7549 * linux-low.c (linux_core_of_thread): New.
7550 (compare_ints, show_process, list_threads): New.
7551 (linux_qxfer_osdata): Report threads and cores.
7552 (linux_target_op): Register linux_core_of_thread.
7553 * remote-utils.c (prepare_resume_reply): Report the core.
7554 (buffer_xml_printf): Support %d specifier.
7555 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7557 (handle_query): Handle qXfer:threads. Announce availability
7559 * target.h (struct target_ops): New field core_of_thread.
7561 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7563 * Makefile.in (clean): Remove new generated files.
7564 (reg-s390.o, reg-s390.c): Remove rules.
7565 (reg-s390x.o, reg-s390x.c): Likewise.
7566 (s390-linux32.o, s390-linux32.c): Add rules.
7567 (s390-linux64.o, s390-linux64.c): Likewise.
7568 (s390x-linux64.o, s390x-linux64.c): Likewise.
7569 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7570 * linux-s390-low.c: Include <elf.h>.
7571 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7572 (init_registers_s390): Remove prototype.
7573 (init_registers_s390x): Likewise.
7574 (init_registers_s390_linux32): Add prototype.
7575 (init_registers_s390_linux64): Likewise.
7576 (init_registers_s390x_linux64): Likewise.
7577 (s390_num_regs_3264): New define.
7578 (s390_regmap_3264): New global variable.
7579 (s390_cannot_fetch_register): Remove obsolete check.
7580 (s390_cannot_store_register): Likewise.
7581 (s390_collect_ptrace_register): Handle upper/lower register halves.
7582 (s390_supply_ptrace_register): Likewise.
7583 (s390_fill_gregset): Update to register number changes.
7584 (s390_get_hwcap): New routine.
7585 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7586 Install appropriate regmap and register set.
7588 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7590 * server.c (gdbserver_version): Update copyright year to 2010.
7591 * gdbreplay.c (gdbreplay_version): Likewise.
7593 2009-12-28 Doug Evans <dje@google.com>
7595 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7596 elf/external.h. Include <elf.h> instead but only if necessary.
7598 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7600 * linux-low.c (linux_remove_process): Remove `detaching'
7601 parameter. Don't release/detach from thread_db here.
7602 (linux_kill): Release/detach from thread_db here, ...
7603 (linux_detach): ... and here, before actually detaching.
7604 (linux_wait_1): ... and here, when a process exits.
7605 * thread-db.c (any_thread_of): New.
7606 (thread_db_free): Switch the current inferior to a thread of the
7609 2009-12-21 Doug Evans <dje@google.com>
7611 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7613 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7614 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7615 warning ifndef __NR_tkill. Move setting of errno there too.
7616 Delete unnecessary resetting of errno after syscall.
7617 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7619 * configure.ac: Check for dladdr.
7620 * config.in: Regenerate.
7621 * configure: Regenerate.
7622 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7623 (try_thread_db_load): Update.
7625 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7627 2009-12-18 Doug Evans <dje@google.com>
7629 * event-loop.c: Include unistd.h if it exists.
7631 * linux-low.c (my_waitpid): Move definition away from being in
7632 between linux_tracefork_child/linux_test_for_tracefork.
7634 * gdb_proc_service.h (psaddr_t): Fix type.
7635 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7636 signature to match glibc.
7638 2009-12-16 Doug Evans <dje@google.com>
7640 * linux-low.c (linux_read_memory): Fix argument to read.
7642 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7644 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7645 events, don't leave current_inferior pointing at null.
7647 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7649 * win32-low.c (LOG): Delete.
7650 (OUTMSG): Output to stderr.
7651 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7652 on compile time LOG macro.
7653 (win32_wait): Fix debug output.
7655 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7657 * win32-low.c (win32_add_one_solib): If the dll name is
7658 "ntdll.dll", prepend the system directory to the dll path.
7660 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7662 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7664 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7665 Vladimir Prus <vladimir@codesourcery.com>
7667 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7668 * configure.ac: Check for __mcoldfire__ and set
7669 gdb_cv_m68k_is_coldfire.
7670 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7671 reg-cf.o and reg-m68k.o.
7672 * configure: Regenerated.
7674 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7676 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7677 Pass it to thread_db_free.
7678 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7679 proper `detaching' argument to linux_remove_process.
7680 * linux-low.h (thread_db_free): Add `detaching' parameter.
7681 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7683 (thread_db_free): Add `detaching' parameter. Only
7684 call td_ta_clear_event if detaching from process.
7686 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7688 * thread-db.c (thread_db_free): Fix typo.
7690 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7693 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7695 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7697 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7698 with an i686 compiler.
7699 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7701 * configure: Rebuilt.
7703 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7707 * server.c (handle_search_memory_1): Correct read_addr initialization
7708 in loop for searching subsequent chunks.
7710 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7712 * configure.ac: New --with-libthread-db option.
7713 * thread-db.c: Allow direct dependence on libthread_db.
7714 (thread_db_free): Adjust.
7715 * config.in: Regenerate.
7716 * configure: Likewise.
7718 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7721 * thread-db.c (attach_thread): New function.
7722 (maybe_attach_thread): Return success/failure.
7723 (find_new_threads_callback): Adjust.
7724 (thread_db_find_new_threads): Loop until no new threads.
7726 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7728 * proc-service.c (ps_lgetregs): Formatting.
7730 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7732 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7733 * configure.ac: Adjust.
7734 * linux-low.h (struct process_info_private): Move members to struct
7736 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7737 * linux-low.c (linux_remove_process): Adjust.
7738 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7739 * server.c (handle_query): Move code ...
7740 (handle_monitor_command): ... here. New function.
7741 * target.h (struct target_ops): New member.
7742 * thread-db.c (struct thread_db): New.
7743 (libthread_db_search_path): New variable.
7744 (thread_db_create_event, thread_db_enable_reporting)
7745 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7746 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7747 (try_thread_db_load_1, dladdr_to_soname): New functions.
7748 (try_thread_db_load, thread_db_load_search): New functions.
7749 (thread_db_init): Search for libthread_db.
7750 (thread_db_free): New function.
7751 (thread_db_handle_monitor_command): Likewise.
7752 * config.in: Regenerate.
7753 * configure: Regenerate.
7755 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7757 * spu-low.c (spu_kill): Wait for inferior to terminate.
7758 Call clear_inferiors.
7759 (spu_detach): Call clear_inferiors.
7761 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7763 * aclocal.m4: Regenerate.
7764 * config.in: Likewise.
7765 * configure: Likewise.
7767 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7769 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7770 (parse_spufs_run): New function.
7771 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7772 (ppc_breakpoint_at): Handle SPU breakpoints.
7774 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7776 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7777 (SPUFS_MAGIC): Define.
7778 (spu_enumerate_spu_ids): New function.
7779 (linux_qxfer_spu): New function.
7780 (linux_target_ops): Install linux_qxfer_spu.
7782 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7784 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7785 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7786 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7787 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7788 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7789 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7790 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7791 (init_registers_powerpc_cell32l): Add prototype.
7792 (init_registers_powerpc_cell64l): Likewise.
7793 (ppc_arch_setup): Detect Cell/B.E. architecture.
7795 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7797 * Makefile.in (datarootdir): New variable.
7799 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7801 * linux-low.c (linux_write_memory): Update debugging output.
7802 * Makefile.in (clean): Add new descriptions.
7803 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7804 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7805 * configure.srv: Add new files for arm*-*-linux*.
7806 * linux-arm-low.c: Add new declarations.
7807 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7808 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7809 (HWCAP_VFPv3D16): New.
7810 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7811 instead of __IWMMXT__.
7812 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7813 (arm_arch_setup): New.
7814 (target_regsets): Remove #ifdef. Add VFP regset.
7815 (the_low_target): Use arm_arch_setup.
7817 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7819 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7820 the main thread again.
7822 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7824 Adding Neutrino gdbserver.
7825 * configure: Regenerated.
7826 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7827 * configure.srv (i[34567]86-*-nto*): New target.
7828 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7829 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7830 (nto_comctrl) [__QNX__]: New function.
7831 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7833 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7835 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7838 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7839 Pedro Alves <pedro@codesourcery.com>
7841 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7842 don't support CONTEXT_EXTENDED_REGISTERS.
7843 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7844 (the_low_target): Install them.
7845 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7846 failing with ERROR_PIPE_NOT_CONNECTED.
7848 2009-06-30 Doug Evans <dje@google.com>
7849 Pierre Muller <muller@ics.u-strasbg.fr>
7851 Add h/w watchpoint support to x86-linux, win32-i386.
7852 * Makefile.in (SFILES): Add i386-low.c
7853 (i386_low_h): Define.
7854 (i386-low.o): Add dependencies.
7855 (linux-x86-low.o): Add i386-low.h dependency.
7856 (win32-i386-low.o): Ditto.
7857 * i386-low.c: New file.
7858 * i386-low.h: New file.
7859 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7860 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7861 * linux-low.c (linux_add_process): Initialize arch_private.
7862 (linux_remove_process): Free arch_private.
7863 (add_lwp): Initialize arch_private.
7864 (delete_lwp): Free arch_private.
7865 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7867 * linux-low.h (process_info_private): New member arch_private.
7868 (lwp_info): New member arch_private.
7869 (linux_target_ops): New members new_process, new_thread,
7871 (ptid_of): New macro.
7872 * linux-x86-low.c: Include stddef.h, i386-low.h.
7873 (arch_process_info): New struct.
7874 (arch_lwp_info): New struct.
7875 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7876 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7877 (i386_dr_low_get_status): New function.
7878 (x86_insert_point, x86_remove_point): New functions.
7879 (x86_stopped_by_watchpoint): New function.
7880 (x86_stopped_data_address): New function.
7881 (x86_linux_new_process, x86_linux_new_thread): New functions.
7882 (x86_linux_prepare_to_resume): New function.
7883 (the_low_target): Add entries for insert_point, remove_point,
7884 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7886 * server.c (debug_hw_points): New global.
7887 (monitor_show_help): Document set debug-hw-points.
7888 (handle_query): Process "set debug-hw-points".
7889 * server.h (debug_hw_points): Declare.
7890 (paddress): Declare.
7891 * utils.c (NUMCELLS, CELLSIZE): New macros.
7892 (get_sell, xsnprintf, paddress): New functions.
7893 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7894 remove_point, stopped_by_watchpoint, stopped_data_address.
7895 * win32-i386-low.c: Include i386-low.h.
7896 (debug_reg_state): Replaces dr.
7897 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7898 (i386_dr_low_get_status): New function.
7899 (i386_insert_point, i386_remove_point): New functions.
7900 (i386_stopped_by_watchpoint): New function.
7901 (i386_stopped_data_address): New function.
7902 (i386_initial_stuff): Update.
7903 (get_thread_context,set_thread_context,i386_thread_added): Update.
7904 (the_low_target): Add entries for insert_point,
7905 remove_point, stopped_by_watchpoint, stopped_data_address.
7906 * win32-low.c (win32_insert_watchpoint): New function.
7907 (win32_remove_watchpoint): New function.
7908 (win32_stopped_by_watchpoint): New function.
7909 (win32_stopped_data_address): New function.
7910 (win32_target_ops): Add entries for insert_watchpoint,
7911 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7912 * win32-low.h (win32_target_ops): New members insert_point,
7913 remove_point, stopped_by_watchpoint, stopped_data_address.
7915 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7917 * server.c (process_serial_event): Re-return unsupported, not
7918 error, if the type isn't recognized. Re-allow supporting only
7919 insert or remove packets. Also call require_running for
7920 breakpoints. Add missing break statement to default case. Tidy.
7921 * target.h (struct target_ops): Rename insert_watchpoint to
7922 insert_point, and remove_watchpoint to remove_point.
7924 * linux-low.h (struct linux_target_ops): Likewise.
7925 * linux-low.c (linux_insert_watchpoint): Rename to ...
7926 (linux_insert_point): ... this. Adjust.
7927 (linux_remove_watchpoint): Rename to ...
7928 (linux_remove_point): ... this. Adjust.
7929 (linux_target_ops): Adjust.
7930 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7931 (cris_insert_point): ... this.
7932 (cris_remove_watchpoint): Rename to ...
7933 (cris_remove_point): ... this.
7934 (the_low_target): Adjust.
7936 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7938 * server.c (handle_v_kill): Pass signal_pid to
7939 kill_inferior if multi_process is zero.
7941 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7943 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7944 * target.h (target_ops): Comment for *_watchpoint to make it clear
7945 the functions can get types '0' and '1'.
7947 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7949 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7950 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7951 * regcache.c (get_regcache): Likewise.
7952 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7953 * win32-low.c (child_fetch_inferior_registers): Remove check for
7956 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7957 Pedro Alves <pedro@codesourcery.com>
7959 * target.h (struct target_ops) <supports_multi_process>: New
7961 (target_supports_multi_process): New.
7962 * server.c (handle_query): Even if GDB reports support, only
7963 enable multi-process if the target also supports it. Report
7964 multi-process support only if the target backend supports it.
7965 * linux-low.c (linux_supports_multi_process): New function.
7966 (linux_target_ops): Install it as target_supports_multi_process
7969 2009-05-24 Doug Evans <dje@google.com>
7971 Global renaming of find_thread_pid to find_thread_ptid.
7972 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7973 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7974 All callers updated.
7976 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7977 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7980 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7981 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7982 (linux_resume_one_lwp): Ditto.
7984 2009-05-23 Doug Evans <dje@google.com>
7986 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7987 from struct inferior_list_entry * to struct lwp_info *.
7988 All callers updated.
7990 2009-05-13 Doug Evans <dje@google.com>
7992 * linux-x86-low.c: Don't include assert.h.
7993 (x86_siginfo_fixup): Use fatal, not assert.
7994 (x86_arch_setup): Fix comment.
7996 2009-05-12 Doug Evans <dje@google.com>
7998 Biarch support for i386/amd64 gdbserver.
7999 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8000 Add linux-x86-low.c.
8001 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8002 (linux-x86-low.o): Add.
8003 * linux-x86-64-low.c: Delete.
8004 * linux-i386-low.c: Delete.
8005 * linux-x86-low.c: New file.
8006 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8008 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8010 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8011 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8012 (linux_child_pid_to_exec_file): New function.
8013 (elf_64_header_p, elf_64_file_p): New functions.
8014 (siginfo_fixup): New function.
8015 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8016 give target a chance to convert layout.
8017 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8018 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8020 2009-05-07 Doug Evans <dje@google.com>
8022 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8023 (regsets_store_inferior_registers): Ditto.
8025 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8029 * linux-low.c (must_set_ptrace_flags): Delete.
8030 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8032 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8033 `lwp->must_set_ptrace_flags' instead.
8034 (linux_wait_for_event_1): Set ptrace options here.
8035 (linux_wait_1): ... not here.
8037 2009-04-30 Doug Evans <dje@google.com>
8039 * inferiors.c (started_inferior_callback): New function.
8040 (attached_inferior_callback): New function.
8041 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8042 * server.c (print_started_pid, print_attached_pid): New functions.
8043 (detach_or_kill_for_exit): New function.
8044 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8045 * server.h (have_started_inferiors_p): Declare.
8046 (have_attached_inferiors_p): Declare.
8048 * inferiors.c (remove_process): Fix memory leak, free process.
8049 * linux-low.c (linux_remove_process): New function.
8050 (linux_kill): Call it instead of remove_process.
8051 (linux_detach, linux_wait_1): Ditto.
8053 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8055 * configure.srv: Add x86 Windows CE target.
8057 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8059 * inferiors.c (get_thread_process): Make global.
8060 * server.h (get_thread_process): Add prototype.
8061 * thread-db.c (find_one_thread): Use get_thread_process
8062 instead of current_process.
8063 (thread_db_get_tls_address): Do not crash if called when
8064 thread layer is not yet initialized.
8066 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8068 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8069 * spu-low.c (current_tid): Rename to ...
8070 (current_ptid): ... this.
8071 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8072 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8073 ptid_get_lwp (current_ptid) instead of current_tid.
8074 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8075 instead of current_tid. Use find_process_pid to verify pid
8076 argument is valid. Pass proper argument to remove_process.
8077 (spu_thread_alive): Compare current_ptid instead of current_tid.
8078 (spu_resume): Likewise.
8080 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8082 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8085 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8087 Implement the multiprocess extensions, and add linux multiprocess
8090 * server.h (ULONGEST): Declare.
8091 (struct ptid, ptid_t): New.
8092 (minus_one_ptid, null_ptid): Declare.
8093 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8094 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8095 (struct inferior_list_entry): Change `id' type from unsigned from
8097 (struct sym_cache, struct breakpoint, struct
8098 process_info_private): Forward declare.
8099 (struct process_info): Declare.
8100 (current_process): Declare.
8101 (all_processes): Declare.
8102 (initialize_inferiors): Declare.
8103 (add_thread): Adjust to use ptid_t.
8104 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8105 (add_process, remove_process, find_thread_pid): Declare.
8106 (find_inferior_id): Adjust to use ptid_t.
8107 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8108 (multi_process): Declare.
8109 (push_event): Adjust to use ptid_t.
8110 (read_ptid, write_ptid): Declare.
8111 (prepare_resume_reply): Adjust to use ptid_t.
8112 (clear_symbol_cache): Declare.
8113 * inferiors.c (all_processes): New.
8114 (null_ptid, minus_one_ptid): New.
8115 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8116 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8117 (add_thread): Change unsigned long to ptid. Remove gdb_id
8119 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8120 (gdb_id_to_thread): Rename to ...
8121 (find_thread_pid): ... this. Change unsigned long to ptid.
8122 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8123 (loaded_dll, pull_pid_from_list): Adjust.
8124 (add_process, remove_process, find_process_pid)
8125 (get_thread_process, current_process, initialize_inferiors): New.
8126 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8127 (struct target_waitstatus) <related_pid>: Ditto.
8128 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8130 (struct target_ops) <join>: Add `pid' argument.
8131 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8132 (struct target_ops) <wait>: Add `ptid' field. Change return type
8134 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8135 (mywait): Add `ptid' argument. Change return type to ptid_t.
8136 (target_pid_to_str): Declare.
8137 * target.c (set_desired_inferior): Adjust to use ptids.
8138 (mywait): Add new `ptid' argument. Adjust.
8139 (target_pid_to_str): New.
8140 * mem-break.h (free_all_breakpoints): Declare.
8141 * mem-break.c (breakpoints): Delelete.
8142 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8143 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8144 to use per-process breakpoint list.
8145 (free_all_breakpoints): New.
8146 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8147 (symbol_cache, all_symbols_looked_up): Delete.
8149 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8151 (prepare_resume_reply): Change ptid argument's type from unsigned
8152 long to ptid_t. Adjust. Implement W;process and X;process.
8153 (free_sym_cache, clear_symbol_cache): New.
8154 (look_up_one_symbol): Adjust to per-process symbol cache. *
8155 * server.c (cont_thread, general_thread, step_thread): Change type
8158 (multi_process): New.
8159 (last_ptid): Change type to ptid_t.
8160 (struct vstop_notif) <ptid>: Change type to ptid_t.
8161 (queue_stop_reply, push_event): Change `ptid' argument's type to
8163 (discard_queued_stop_replies): Add `pid' argument.
8164 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8165 changes. Don't reference the `attached' global.
8166 (attach_inferior): Adjust to mywait interface changes.
8167 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8168 features. Handle and report "multiprocess+". Handle
8170 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8172 (handle_v_kill): New.
8173 (handle_v_stopped): Adjust to use target_pid_to_str.
8174 (handle_v_requests): Allow multiple attaches and runs when
8175 multiprocess extensions are in effect. Handle "vKill".
8176 (myresume): Adjust to use ptids.
8177 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8178 (handle_status): Adjust to discard_queued_stop_replies interface
8180 (first_thread_of, kill_inferior_callback)
8181 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8182 (main): Call initialize_inferiors. Adjust to use ptids, killing
8183 and detaching from all inferiors. Handle multiprocess packet
8185 * linux-low.h: Include gdb_proc_service.h.
8186 (struct process_info_private): New.
8187 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8188 <lwpid_of>: Use ptid_get_lwp.
8189 (get_lwp_thread): Adjust.
8190 (struct lwp_info): Add `dead' member.
8191 (find_lwp_pid): Declare.
8192 * linux-low.c (thread_db_active): Delete.
8193 (new_inferior): Adjust comment.
8194 (inferior_pid): Delete.
8195 (linux_add_process): New.
8196 (handle_extended_wait): Adjust.
8197 (add_lwp): Change unsigned long to ptid.
8198 (linux_create_inferior): Add process to processes table. Adjust
8199 to use ptids. Don't set new_inferior here.
8200 (linux_attach_lwp): Rename to ...
8201 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8202 it. Adjust to use ptids.
8203 (linux_attach_lwp): New.
8204 (linux_attach): Add process to processes table. Don't set
8206 (struct counter): New.
8207 (second_thread_of_pid_p, last_thread_of_process_p): New.
8208 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8210 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8211 processes. Remove process from process table.
8212 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8213 to multiple processes.
8214 (any_thread_of): New.
8215 (linux_detach): Add `pid' argument, and handle it. Remove process
8216 from processes table.
8217 (linux_join): Add `pid' argument. Handle it.
8218 (linux_thread_alive): Change unsighed long argument to ptid_t.
8219 Consider dead lwps as not being alive.
8220 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8221 threads we're not interested in.
8222 (same_lwp, find_lwp_pid): New.
8223 (linux_wait_for_lwp): Change `pid' argument's type from int to
8225 (linux_wait_for_event): Rename to ...
8226 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8227 from int to ptid_t. Adjust.
8228 (linux_wait_for_event): New.
8229 (linux_wait_1): Add `ptid' argument. Change return type to
8230 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8231 that exit from the process table.
8232 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8234 (mark_lwp_dead): New.
8235 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8236 stopping all threads, mark its main lwp as dead.
8237 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8239 (fetch_register, usr_store_inferior_registers)
8240 (regsets_fetch_inferior_registers)
8241 (regsets_store_inferior_registers, linux_read_memory)
8242 (linux_write_memory): Inline `inferior_pid'.
8243 (linux_look_up_symbols): Adjust to use per-process
8245 (linux_request_interrupt): Adjust to use ptids.
8246 (linux_read_auxv): Inline `inferior_pid'.
8247 (initialize_low): Don't reference thread_db_active.
8248 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8249 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8250 (ps_getpid): Return the pid of the current inferior.
8251 * thread-db.c (proc_handle, thread_agent): Delete.
8252 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8254 (find_one_thread): Change argument type to ptid_t. Adjust to
8256 (maybe_attach_thread): Adjust to per-process data and ptids.
8257 (thread_db_find_new_threads): Ditto.
8258 (thread_db_init): Ditto.
8259 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8260 processes table. Adjust to use ptids.
8261 (spu_kill, spu_detach): Adjust interface. Remove process from
8263 (spu_join, spu_thread_alive): Adjust interface.
8264 (spu_wait): Adjust interface. Remove process from processes
8265 table. Adjust to use ptids.
8266 * win32-low.c (current_inferior_tid): Delete.
8267 (current_inferior_ptid): New.
8268 (debug_event_ptid): New.
8269 (thread_rec): Take a ptid. Adjust.
8270 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8271 (child_delete_thread): Ditto.
8272 (do_initial_child_stuff): Add `attached' argument. Add process to
8274 (child_fetch_inferior_registers, child_store_inferior_registers):
8276 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8277 (win32_attach): Pass 1 to do_initial_child_stuff.
8278 (win32_kill): Adjust interface. Remove process from processes
8280 (win32_detach): Ditto.
8281 (win32_join): Adjust interface.
8282 (win32_thread_alive): Take a ptid.
8283 (win32_resume): Adjust to use ptids.
8284 (get_child_debug_event): Ditto.
8285 (win32_wait): Adjust interface. Remove exiting process from
8288 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8290 Non-stop mode support.
8292 * server.h (non_stop): Declare.
8293 (gdb_client_data, handler_func): Declare.
8294 (delete_file_handler, add_file_handler, start_event_loop):
8296 (handle_serial_event, handle_target_event, push_event)
8297 (putpkt_notif): Declare.
8298 * target.h (enum resume_kind): New.
8299 (struct thread_resume): Replace `step' field by `kind' field.
8300 (TARGET_WNOHANG): Define.
8301 (struct target_ops) <wait>: Add `options' argument.
8302 <supports_non_stop, async, start_non_stop>: New fields.
8303 (target_supports_non_stop, target_async): New.
8304 (start_non_stop): Declare.
8305 (mywait): Add `options' argument.
8306 * target.c (mywait): Add `options' argument. Print child exit
8308 (start_non_stop): New.
8309 * server.c (non_stop, own_buf, mem_buf): New globals.
8310 (struct vstop_notif): New.
8311 (notif_queue): New global.
8312 (queue_stop_reply, push_event, discard_queued_stop_replies)
8313 (send_next_stop_reply): New.
8314 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8316 (attach_inferior): In non-stop mode, don't wait for the target
8318 (handle_general_set): Handle QNonStop.
8319 (handle_query): When handling qC, return the current general
8320 thread, instead of the first thread of the list.
8321 (handle_query): If the backend supports non-stop mode, include
8322 QNonStop+ in the qSupported query response.
8323 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8325 (handle_v_attach, handle_v_run): Handle non-stop mode.
8326 (handle_v_stopped): New.
8327 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8328 (myresume): Adjust to use resume_kind. Handle non-stop.
8329 (queue_stop_reply_callback): New.
8330 (handle_status): Handle non-stop mode.
8331 (main): Clear non_stop flag on reconnection. Use the event-loop.
8332 Refactor serial protocol handling from here ...
8333 (process_serial_event): ... to this new function. When GDB
8334 selects any thread, select one here. In non-stop mode, wait until
8335 GDB acks all pending events before exiting.
8336 (handle_serial_event, handle_target_event): New.
8337 * remote-utils.c (remote_open): Install remote_desc in the event
8339 (remote_close): Remove remote_desc from the event loop.
8340 (putpkt_binary): Rename to...
8341 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8342 (putpkt_binary): New as wrapper around putpkt_binary_1.
8343 (putpkt_notif): New.
8344 (prepare_resume_reply): In non-stop mode, don't change the
8346 * event-loop.c: New.
8347 * Makefile.in (OBJ): Add event-loop.o.
8348 (event-loop.o): New rule.
8350 * linux-low.h (pid_of): Moved here.
8352 (get_lwp_thread): Use lwpid_of.
8353 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8354 * linux-low.c (pid_of): Delete.
8355 (inferior_pid): Use lwpid_of.
8356 (linux_event_pipe): New.
8357 (target_is_async_p): New.
8359 (handle_extended_wait): Use lwpid_of.
8360 (add_lwp): Don't set lwpid field.
8361 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8362 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8363 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8364 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8365 first. Adjust to linux_wait_for_event interface changes. Use
8367 (linux_detach): Don't delete the main lwp here.
8368 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8369 (status_pending_p): Don't consider explicitly suspended lwps.
8370 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8371 pointer. Add OPTIONS argument. Change return type to int. Use
8372 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8373 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8374 pointer. Add status pointer argument. Return a pid instead of a
8375 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8376 changes. In non-stop mode, don't switch to a random thread.
8377 (linux_wait): Rename to...
8378 (linux_wait_1): ... this. Add target_options argument, and handle
8379 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8380 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8381 clean exit and signal exit code. Don't stop all threads in
8382 non-stop mode. In all-stop mode, only stop all threads when
8383 reporting a stop to GDB. Handle explicit thread stop requests.
8384 (async_file_flush, async_file_mark): New.
8386 (send_sigstop): Use lwpid_of.
8387 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8388 interface changes. In non-stop mode, don't switch to a random
8390 (linux_resume_one_lwp): Use lwpid_of.
8391 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8392 (linux_resume_one_thread): ... this. Handle resume_stop. In
8393 non-stop mode, don't look for pending flag in all threads.
8394 (resume_status_pending_p): Don't consider explicitly suspended
8396 (my_waitpid): Reimplement. Emulate __WALL.
8397 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8399 (sigchld_handler, linux_supports_non_stop, linux_async)
8400 (linux_start_non_stop): New.
8401 (linux_target_ops): Register linux_supports_non_stop, linux_async
8402 and linux_start_non_stop.
8403 (initialize_low): Install SIGCHLD handler.
8404 * thread-db.c (thread_db_create_event, find_one_thread)
8405 (thread_db_get_tls_address): Use lwpid_of.
8406 * win32-low.c (win32_detach): Adjust to use resume_kind.
8407 (win32_wait): Add `options' argument.
8408 * spu-low.c (spu_resume): Adjust to use resume_kind.
8409 (spu_wait): Add `options' argument.
8411 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8413 Decouple target code from remote protocol.
8415 * target.h (enum target_waitkind): New.
8416 (struct target_waitstatus): New.
8417 (struct target_ops) <wait>: Return an unsigned long. Take a
8418 target_waitstatus pointer instead of a char pointer.
8420 * target.c (mywait): Change prototype to return an unsigned long.
8421 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8422 * server.h (thread_from_wait, old_thread_from_wait): Delete
8424 (prepare_resume_reply): Change prototype to take a
8426 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8427 (last_status, last_ptid): New.
8428 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8429 pid instead of a signal.
8430 (attach_inferior): Remove "status" and "signal" parameters.
8432 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8434 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8435 (handle_v_requests, myresume): Remove "status" and "signal"
8437 (handle_status): New.
8438 (main): Delete local `status'. Adjust.
8439 * remote-utils.c: Include target.h.
8440 (prepare_resume_reply): Change prototype to take a
8441 target_waitstatus. Adjust.
8443 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8445 * spu-low.c (spu_wait): Adjust.
8446 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8448 (win32_wait): Adjust.
8450 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8452 * target.h (struct thread_resume): Delete leave_stopped member.
8453 (struct target_ops): Add a `n' argument to the `resume' callback.
8454 * server.c (start_inferior): Adjust.
8455 (handle_v_cont, myresume): Adjust.
8456 * linux-low.c (check_removed_breakpoint): Adjust to resume
8457 interface change, and to removed leave_stopped field.
8458 (resume_ptr): Delete.
8459 (struct thread_resume_array): New.
8460 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8461 resume interface change.
8462 (linux_continue_one_thread, linux_queue_one_thread)
8463 (resume_status_pending_p): Check if the resume field is NULL
8464 instead of checking the leave_stopped member.
8465 (linux_resume): Adjust to the target resume interface change.
8466 * spu-low.c (spu_resume): Adjust to the target resume interface
8468 * win32-low.c (win32_detach, win32_resume): Ditto.
8470 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8472 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8474 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8476 (linux_continue_one_thread): Only preserve the stepping flag if
8477 there's a pending breakpoint.
8479 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8481 * server.c (main): After the inferior having exited, call
8482 remote_close before exiting gdbserver.
8484 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8486 Fix size of FPSCR in Power 7 processors.
8487 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8488 (PPC_FEATURE_HAS_DFP): New #define.
8489 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8492 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8494 * server.c (handle_query) Whitespace and formatting.
8496 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8498 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8499 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8500 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8501 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8502 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8503 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8504 Makefile.in, configure.ac: Fix whitespace throughout.
8505 * configure: Regenerate.
8507 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8509 * inferiors.c (find_inferior): Make it safe for the callback
8510 function to delete the currently iterated inferior.
8512 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8514 * Makefile.in (linuw_low_h): Move higher.
8515 (thread-db.o): Depend on $(linux_low_h).
8517 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8519 Rename "process" to "lwp" throughout.
8521 * linux-low.c (all_processes): Rename to...
8522 (all_lwps): ... this.
8523 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8524 (add_process): Rename to ...
8525 (add_lwp): ... this. Adjust.
8526 (linux_create_inferior): Adjust.
8527 (linux_attach_lwp): Adjust.
8528 (linux_attach): Adjust.
8529 (linux_kill_one_process): Rename to ...
8530 (linux_kill_one_lwp): ... this. Adjust.
8531 (linux_kill): Adjust.
8532 (linux_detach_one_process): Rename to ...
8533 (linux_detach_one_lwp): ... this. Adjust.
8534 (linux_detach): Adjust.
8535 (check_removed_breakpoint): Adjust.
8536 (status_pending_p): Adjust.
8537 (linux_wait_for_process): Rename to ...
8538 (linux_wait_for_lwp): ... this. Adjust.
8539 (linux_wait_for_event): Adjust.
8540 (send_sigstop): Adjust.
8541 (wait_for_sigstop): Adjust.
8542 (stop_all_processes): Rename to ...
8543 (stop_all_lwps): ... this.
8544 (linux_resume_one_process): Rename to ...
8545 (linux_resume_one_lwp): ... this. Adjust.
8546 (linux_set_resume_request, linux_continue_one_thread)
8547 (linux_queue_one_thread, resume_status_pending_p)
8548 (usr_store_inferior_registers, regsets_store_inferior_registers)
8549 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8551 * linux-low.h (get_process): Rename to ...
8552 (get_lwp): ... this. Adjust.
8553 (get_thread_process): Rename to ...
8554 (get_thread_lwp): ... this. Adjust.
8555 (get_process_thread): Rename to ...
8556 (get_lwp_thread): ... this. Adjust.
8557 (struct process_info): Rename to ...
8558 (struct lwp_info): ... this.
8559 (all_processes): Rename to ...
8560 (all_lwps): ... this.
8561 * proc-service.c (ps_lgetregs): Adjust.
8562 * thread-db.c (thread_db_create_event, find_one_thread)
8563 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8565 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8567 * server.c (handle_query): Handle "qAttached".
8569 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8571 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8572 GPLv3, update license URL.
8574 2009-03-01 Doug Evans <dje@google.com>
8576 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8577 (server_h): Add gdb_signals.h.
8578 (signals.o): Update.
8579 * server.h (target_signal_from_host,target_signal_to_host_p)
8580 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8582 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8584 * remote-utils.c (getpkt): Also generate remote-debug
8585 information if noack_mode is set.
8587 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8589 * server.c (handle_query): Report qXfer:siginfo:read and
8590 qXfer:siginfo:write as supported and handle them.
8591 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8592 * linux-low.c (linux_xfer_siginfo): New.
8593 (linux_target_ops): Set it.
8595 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8597 * server.c (gdbserver_usage): Mention --remote-debug.
8598 (main): Accept '--remote-debug' switch.
8600 2009-01-18 Doug Evans <dje@google.com>
8602 * regcache.c (new_register_cache): No need to check result of xcalloc.
8603 * server.c (handle_search_memory): Back out calls to xmalloc,
8604 result is checked and error is returned to user upon failure.
8605 (handle_query): Ditto. Add more checks for result of malloc.
8606 (handle_v_cont): Check result of malloc, report error back to
8608 (handle_v_run): Ditto. Call freeargv.
8609 * server.h (freeargv): Declare.
8610 * utils.c (freeargv): New fn.
8612 2009-01-15 Doug Evans <dje@google.com>
8614 * gdbreplay.c (perror_with_name): Make arg const char *.
8615 * server.h (target_signal_to_name): Make return type const char *.
8616 * thread-db.c (thread_db_err_str): Make return type const char *.
8617 * utils.c (perror_with_name): Make arg const char *.
8619 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8621 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8622 when handling a EXIT_PROCESS_DEBUG_EVENT.
8624 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8626 * gdbreplay.c (gdbreplay_version): Update copyright year.
8627 * server.c (gdbserver_version): Likewise.
8629 2009-01-05 Doug Evans <dje@google.com>
8631 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8632 (handle_extended_wait): Improve comment.
8634 2008-12-13 Doug Evans <dje@google.com>
8636 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8637 * server.h (ATTR_MALLOC): New macro.
8638 (xmalloc,xcalloc,xstrdup): Declare.
8639 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8640 * inferiors.c: Ditto.
8641 * linux-low.c: Ditto.
8642 * mem-break.c: Ditto.
8643 * regcache.c: Ditto.
8644 * remote-utils.c: Ditto.
8647 * win32-low.c: Ditto.
8649 2008-12-12 Doug Evans <dje@google.com>
8651 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8652 in debugging printf.
8654 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8656 2008-12-09 Doug Evans <dje@google.com>
8658 * linux-low.h (struct process_info): Delete member tid, unused.
8659 * thread-db.c (find_one_thread): Update.
8660 (maybe_attach_thread): Update.
8662 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8664 * target.h (struct target_ops): Add qxfer_osdata member.
8665 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8667 (linux_qxfer_osdata): New functions.
8668 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8670 * server.c (handle_query): Handle "qXfer:osdata:read:".
8671 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8672 (buffer_xml_printf): New functions.
8673 * server.h (struct buffer): New.
8674 (buffer_grow_str, buffer_grow_str0): New macros.
8675 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8676 (buffer_xml_printf): Declare.
8678 2008-11-24 Doug Evans <dje@google.com>
8680 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8682 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8684 * server.c (handle_v_run): Always use the supplied argument list.
8686 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8688 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8689 (xtensa_regmap_table): Add entry for scompare1.
8691 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8693 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8694 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8695 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8696 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8697 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8698 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8699 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8700 XML target descriptions.
8701 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8702 when inferior is running on an ISA 2.05 or later processor. Add
8703 special case to return offset for full 64-bit slot of FPSCR when
8706 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8708 * Makefile.in (SFILES, clean): Added sparc64 files.
8709 (reg-sparc64.o, reg-sparc64.c): New.
8710 * configure.srv (sparc*-*-linux*): New configuration.
8711 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8712 syscall arguments for SPARC.
8713 (regsets_store_inferior_registers): Likewise.
8714 * linux-sparc-low.c: New file.
8716 2008-10-21 Doug Evans <dje@google.com>
8718 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8719 (READLINE_DIR,READLINE_DEP): Delete.
8720 (INTERNAL_CFLAGS): Update.
8721 (LINTFLAGS): Update.
8723 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8725 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8726 whole argv from the last run, not just argv[0].
8728 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8730 * regcache.c (new_register_cache): Return NULL if the register
8731 cache size isn't known yet.
8732 (free_register_cache): Avoid dereferencing a NULL regcache.
8734 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8736 * configure.srv: Merge MIPS and MIPS64.
8738 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8740 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8742 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8744 * Makefile.in: Add required vsx dependencies.
8746 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8747 Declare init_registers_powerpc_vsx32l.
8748 Declare init_registers_powerpc_vsx64l.
8749 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8750 (ppc_arch_setup): Check for VSX in hwcap.
8751 (ppc_fill_vsxregset): New function.
8752 (ppc_store_vsxregset): New function.
8753 Add new VSX entry in regset_info target_regsets.
8755 * configure.srv: Add new VSX dependencies.
8757 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8759 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8760 (remote_open): Set or clear transport_is_reliable.
8761 (putpkt_binary): Don't expect acks in noack mode.
8762 (getpkt): Don't send ack/nac in noack mode.
8763 * server.c (handle_general_set): Handle QStartNoAckMode.
8764 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8766 (main): Reset noack_mode on every connection.
8767 * server.h (noack_mode): Declare.
8769 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8771 * Makefile.in (GDBREPLAY_OBS): New variable.
8772 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8774 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8775 Daniel Jacobowitz <dan@codesourcery.com>
8777 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8778 (usr_store_inferior_registers): Likewise.
8779 (regsets_store_inferior_registers): Likewise.
8781 2008-07-31 Rolf Jansen <rj@surtec.com>
8782 Pedro Alves <pedro@codesourcery.com>
8784 * configure.ac: Check for memmem declaration.
8785 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8786 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8787 (disable_packet_qfThreadInfo): Unconditionally compile.
8788 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8789 * configure, config.in: Regenerate.
8791 2008-07-28 Doug Kwan <dougkwan@google.com>
8793 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8794 (linux_write_memory): Remove declaration of errno.
8796 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8798 * linux-low.c (handle_extended_wait): Do not use "status"
8799 variable uninitialized.
8801 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8803 * server.c (handle_v_attach): Inhibit reporting dll changes.
8805 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8807 * remote-utils.c (prepare_resume_reply): If requested, don't
8808 output "thread:TID" in the T stop reply.
8810 * server.c (disable_packet_vCont, disable_packet_Tthread)
8811 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8812 (handle_query): If requested, disable support for qC, qfThreadInfo
8814 (handle_v_requests): If requested, disable support for vCont.
8815 (gdbserver_show_disableable): New.
8816 (main): Handle --disable-packet and --disable-packet=LIST.
8818 * server.h (disable_packet_vCont, disable_packet_Tthread)
8819 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8821 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8823 * server.c (gdbserver_usage): Mention --version.
8825 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8827 * Makefile.in (gdbreplay.o): New rule.
8829 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8831 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8832 message, not gdbserver.
8834 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8835 Nathan Sidwell <nathan@codesourcery.com>
8836 Joseph Myers <joseph@codesourcery.com>
8838 * acinclude.m4: Include ../../config/acx.m4.
8839 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8840 * configure, config.in: Regenerate.
8841 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8842 * server.c (gdbserver_version): Print PKGVERSION.
8843 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8844 (main): Adjust gdbserver_usage calls.
8845 * gdbreplay.c (version, host_name): Add declarations.
8846 (gdbreplay_version, gdbreplay_usage): New.
8847 (main): Accept --version and --help options.
8849 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8851 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8852 (arm_breakpoint_at): Handle Thumb.
8853 (the_low_target): Add comment.
8855 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8857 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8859 2008-05-09 Doug Evans <dje@google.com>
8861 * server.h (decode_search_memory_packet): Declare.
8862 * remote-utils.c (decode_search_memory_packet): New fn.
8863 * server.c (handle_search_memory_1): New fn.
8864 (handle_search_memory): New fn.
8865 (handle_query): Process qSearch:memory packets.
8867 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8869 * regcache.c (registers_length): Remove.
8870 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8871 full register packet.
8872 * regcache.h (registers_length): Remove prototype.
8873 * server.h (PBUFSIZ): Define to 16384.
8875 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8877 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8878 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8879 powerpc-64l.o, and powerpc-altivec64l.o.
8880 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8881 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8882 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8883 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8884 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8887 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8888 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8889 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8890 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8891 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8892 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8893 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8894 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8895 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8896 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8899 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8900 (init_registers_powerpc_32l): ... this new prototype.
8901 (init_registers_powerpc_32): Remove, replace by ...
8902 (init_registers_powerpc_altivec32l): ... this new prototype.
8903 (init_registers_powerpc_e500): Remove, replace by ...
8904 (init_registers_powerpc_e500l): ... this new prototype.
8905 (init_registers_ppc64): Remove, replace by ...
8906 (init_registers_powerpc_64l): ... this new prototype.
8907 (init_registers_powerpc_64): Remove, replace by ...
8908 (init_registers_powerpc_altivec64l): ... this new prototype.
8909 (ppc_num_regs): Set to 73.
8910 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8911 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8912 (ppc_cannot_store_register): Handle orig_r3 and trap.
8913 (ppc_arch_setup): Update init_registers_... calls.
8914 (ppc_fill_gregset): Handle orig_r3 and trap.
8916 * inferiors.c (clear_inferiors): Reset current_inferior.
8918 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8920 * acinclude.m4: Add override.m4.
8921 * configure: Regenerate.
8923 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8925 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8926 initial call to init_register_ppc64.
8928 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8930 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8931 single powerpc*-*-linux* case.
8932 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8934 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8936 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8937 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8939 * linux-ppc-low.c: Include <elf.h>.
8940 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8941 (ppc_hwcap): New global variable.
8942 (ppc_regmap): Remove __SPE__ #ifdef sections.
8943 (ppc_regmap_e500): New global variable.
8944 (ppc_cannot_store_register): Update __SPE__ special case.
8945 (ppc_get_hwcap): New function.
8946 (ppc_arch_setup): Use it to determine whether inferior supports
8947 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8948 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8949 Do not access registers if target does not support AltiVec.
8950 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8951 Do not access registers if target does not support SPE.
8952 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8954 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8956 * linux-low.c (disabled_regsets, num_regsets): New.
8957 (use_regsets_p): Delete.
8958 (linux_wait_for_process): Clear disabled_regsets.
8959 (regsets_fetch_inferior_registers): Check and set it.
8960 (regsets_store_inferior_registers): Likewise.
8961 (linux_fetch_registers, linux_store_registers): Do not use
8963 (initialize_low): Allocate disabled_regsets.
8965 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8967 * Makefile.in (LIBOBJS): New.
8969 (memmem.o): New rule.
8970 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8971 * configure: Regenerated.
8973 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8975 * server.c (handle_query): Never return "unsupported" for
8976 qXfer:features:read queries.
8978 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8980 * server.c (get_features_xml): Fix inverted condition.
8981 (handle_query): Always support qXfer:feature:read.
8983 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8985 * server.c (wrapper_argv): New.
8986 (start_inferior): Handle wrapper_argv. If set, expect an extra
8988 (gdbserver_usage): Document --wrapper.
8989 (main): Parse --wrapper.
8991 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8993 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8994 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8995 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8996 (ppc_set_pc): Likewise.
8997 (ppc_arch_setup): New function.
8998 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8999 of collect_register.
9000 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9002 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9004 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9005 instead of linux-ppc64-low.o.
9006 * linux-ppc64-low.c: Remove file.
9007 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9008 (linux-ppc64-low.o): Remove rule.
9010 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9011 (init_registers_powerpc_64): Likewise.
9012 (ppc_regmap): Conditionally define depending on __powerpc64__.
9013 (ppc_cannot_store_register): Do not special-case "fpscr" when
9014 compiled on __powerpc64__.
9015 (ppc_collect_ptrace_register): New function.
9016 (ppc_supply_ptrace_register): New function.
9017 (ppc_breakpoint): Change type to "unsigned int".
9018 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9019 (the_low_target): Conditionally provide initializers for the
9020 arch_setup member depending on __powerpc64__. Install
9021 collect_ptrace_register and supply_ptrace_register members.
9023 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9025 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9026 * server.c (gdbserver_xmltarget): Define.
9027 (get_features_xml): Use it to replace "target.xml" and arch_string.
9029 * configure.srv: Remove srv_xmltarget. Add XML files that were
9030 mentioned there to srv_xmlfiles instead. Remove conditional tests
9031 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9032 srv_xmlfiles and srv_regobj to include all possible choices.
9033 * configure.ac (srv_xmltarget): Remove.
9034 (srv_xmlfiles): Do not add "target.xml".
9035 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9036 checks for supplementary target information.
9037 * configure: Regenerate.
9038 * Makefile.in (XML_TARGET): Remove.
9039 (target.xml): Remove rule.
9040 (clean): Do not clean up target.xml.
9041 (.PRECIOUS): Do not mention target.xml.
9043 * target.h (struct target_ops): Remove arch_string member.
9044 * linux-low.c (linux_arch_string): Remove.
9045 (linux_target_ops): Remove arch_string initializer.
9046 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9047 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9048 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9049 * spu-low.c (spu_arch_string): Remove.
9050 (spu_target_ops): Remove arch_string initializer.
9051 * win32-low.c (win32_arch_string): Remove.
9052 (win32_target_ops): Remove arch_string initializer.
9053 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9054 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9055 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9057 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9059 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9060 by collect_ptrace_register and supply_ptrace_register hooks.
9061 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9062 instead of checking for the_low_target.left_pad_xfer.
9063 (usr_store_inferior_registers): Use collect_ptrace_register callback
9064 instead of checking for the_low_target.left_pad_xfer.
9066 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9067 (s390_supply_ptrace_register): Likewise.
9068 (s390_fill_gregset): Call s390_collect_ptrace_register.
9069 (the_low_target): Update.
9071 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9072 (ppc_supply_ptrace_register): Likewise.
9073 (the_low_target): Update.
9075 * linux-i386-low.c (the_low_target): Update.
9076 * linux-x86-64-low.c (the_low_target): Update.
9078 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9080 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9081 reg-s390.o and reg-s390x.o.
9083 * linux-low.c (new_inferior): New global variable.
9084 (linux_create_inferior, linux_attach): Set it.
9085 (linux_wait_for_process): Call the_low_target.arch_setup after the
9086 target has stopped for the first time.
9087 (initialize_low): Do not call the_low_target.arch_setup.
9089 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9090 (s390_set_pc): Likewise.
9091 (s390_arch_setup): New function.
9092 (the_low_target): Use s390_arch_setup as arch_setup routine.
9094 * regcache.c (realloc_register_cache): New function.
9095 (set_register_cache): Call it for each existing regcache.
9097 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9099 * server.h (init_registers): Remove prototype.
9101 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9102 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9103 instead of init_registers ().
9104 * linux-arm-low.c (init_registers_arm): Add prototype.
9105 (init_registers_arm_with_iwmmxt): Likewise.
9106 (the_low_target): Add initializer for arch_setup field.
9107 * linux-cris-low.c (init_registers_cris): Add prototype.
9108 (the_low_target): Add initializer for arch_setup field.
9109 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9110 (the_low_target): Add initializer for arch_setup field.
9111 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9112 (the_low_target): Add initializer for arch_setup field.
9113 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9114 (the_low_target): Add initializer for arch_setup field.
9115 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9116 (the_low_target): Add initializer for arch_setup field.
9117 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9118 (the_low_target): Add initializer for arch_setup field.
9119 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9120 (init_registers_mips64_linux): Likewise.
9121 (the_low_target): Add initializer for arch_setup field.
9122 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9123 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9124 (the_low_target): Add initializer for arch_setup field.
9125 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9126 (init_registers_powerpc_64): Likewise.
9127 (the_low_target): Add initializer for arch_setup field.
9128 * linux-s390-low.c (init_registers_s390): Add prototype.
9129 (init_registers_s390x): Likewise.
9130 (the_low_target): Add initializer for arch_setup field.
9131 * linux-sh-low.c (init_registers_sh): Add prototype.
9132 (the_low_target): Add initializer for arch_setup field.
9133 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9134 (the_low_target): Add initializer for arch_setup field.
9135 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9136 (the_low_target): Add initializer for arch_setup field.
9138 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9139 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9140 instead of init_registers ().
9141 * win32-arm-low.c (init_registers_arm): Add prototype.
9142 (the_low_target): Add initializer for arch_setup field.
9143 * win32-i386-low.c (init_registers_i386): Add prototype.
9144 (the_low_target): Add initializer for arch_setup field.
9146 * spu-low.c (init_registers_spu): Add prototype.
9147 (initialize_low): Call initialie_registers_spu () instead of
9148 initialize_registers ().
9150 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9152 * server.c (handle_v_requests): When handling the vRun and vAttach
9153 packets, if already debugging a process, don't kill it. Return an
9156 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9158 * server.c (handle_query): Correct length check.
9160 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9162 * win32-low.c (do_initial_child_stuff): Add process handle
9163 parameter. Set current_process_handle and current_process_id from the
9164 parameters. Clear globals.
9165 (win32_create_inferior): Don't set current_process_handle and
9166 current_process_id here. Instead pass them on the call to
9167 do_initial_child_stuff.
9168 (win32_attach): Likewise.
9169 (win32_clear_inferiors): New.
9170 (win32_kill): Don't close the current process handle or the
9171 current thread handle here. Instead call win32_clear_inferiors.
9172 (win32_detach): Don't open a new handle to the process. Call
9173 win32_clear_inferiors.
9174 (win32_join): Don't rely on current_process_handle; open a new
9175 handle using the process id.
9176 (win32_wait): Call win32_clear_inferiors when the inferior process
9179 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9181 * server.c (monitor_show_help): Add "exit".
9183 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9185 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9186 (clean): Add reg-xtensa.c.
9187 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9188 * configure.srv (xtensa*-*-linux*) New target.
9189 * linux-xtensa-low.c: New.
9190 * xtensa-xtregs.c: New.
9192 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9194 * hostio.c: Don't include errno.h.
9195 (errno_to_fileio_errno): Move to hostio-errno.
9196 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9197 error number outputting to the target->hostio_last_error callback.
9198 (hostio_packet_error): Use FILEIO_EINVAL directly.
9199 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9200 calls to hostio_error.
9201 * hostio-errno.c: New.
9202 * server.h (hostio_last_error_from_errno): Declare.
9203 * target.h (target_ops): Add hostio_last_error member.
9204 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9205 as hostio_last_error handler.
9206 * spu-low.c (spu_target_ops): Likewise.
9207 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9208 (wince_hostio_last_error): New functions.
9209 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9210 as hostio_last_error handler.
9211 (win32_target_ops) [!_WIN32_WCE]: Register
9212 hostio_last_error_from_errno as hostio_last_error handler.
9213 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9214 (hostio-errno.o): New rule.
9215 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9216 * configure.srv (srv_hostio_err_objs): New variable. Default to
9218 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9219 * configure: Regenerate.
9221 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9223 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9224 (linux_kill, linux_detach): Clean up the process list.
9225 * remote-utils.c (remote_open): Improve port number parsing.
9226 (putpkt_binary, input_interrupt): Only send interrupts if the target
9228 * server.c (extended_protocol): Make static.
9229 (attached): Define earlier.
9230 (exit_requested, response_needed, program_argv): New variables.
9231 (target_running): New.
9232 (start_inferior): Clear attached here.
9233 (attach_inferior): Set attached here.
9234 (require_running): Define.
9235 (handle_query): Use require_running and target_running. Implement
9237 (handle_v_attach, handle_v_run): New.
9238 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9239 (gdbserver_usage): Update.
9240 (main): Redo argument parsing. Handle --debug and --multi. Handle
9241 --attach along with other options or after the port. Save
9242 program_argv. Support no initial program. Resynchronize
9243 communication with GDB after an error. Handle "monitor exit".
9244 Use require_running and target_running. Always allow the extended
9245 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9246 restart in extended mode.
9247 * README: Refer to the GDB manual. Update --attach usage.
9249 2007-12-20 Andreas Schwab <schwab@suse.de>
9251 * linux-low.c (STACK_SIZE): Define.
9252 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9253 (linux_test_for_tracefork): Likewise.
9255 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9257 * linux-low.c (linux_wait_for_event): Update messages. Do not
9258 reinsert auto-delete breakpoints.
9259 * mem-break.c (struct breakpoint): Change return type of handler to
9261 (set_breakpoint_at): Update handler type.
9262 (reinsert_breakpoint_handler): Return 1 instead of calling
9264 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9266 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9267 * mem-break.h (set_breakpoint_at): Update handler type.
9268 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9269 * win32-low.c (auto_delete_breakpoint): New.
9270 (get_child_debug_event): Use it.
9272 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9274 * configure.ac: Check for pread and pwrite.
9275 * hostio.c (handle_pread): Fall back to lseek and read.
9276 (handle_pwrite): Fall back to lseek and write.
9277 * config.in, configure: Regenerated.
9279 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9281 * server.c (myresume): Add own_buf argument.
9282 (main): Update calls.
9284 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9286 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9287 * remote-utils.c (remote_open): Do not call disable_async_io.
9288 (block_async_io): Delete.
9289 (unblock_async_io): Make static.
9290 (initialize_async_io): New.
9291 * server.c (handle_v_cont): Handle async I/O here.
9292 (myresume): Likewise. Move other common resume tasks here...
9293 (main): ... from here. Call initialize_async_io. Disable async
9294 I/O before the main loop.
9295 * server.h (initialize_async_io): Declare.
9296 (block_async_io, unblock_async_io): Delete prototypes.
9297 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9299 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9301 * remote-utils.c (readchar): Allow binary data in received messages.
9303 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9305 * win32-low.c (attaching): New global.
9306 (win32_create_inferior): Clear the `attaching' global.
9307 (win32_attach): Set the `attaching' global.
9308 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9309 attaching. Only set a breakpoint at the entry point if not
9312 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9314 * server.c (main): Don't report dll events on the initial
9315 connection on attaches.
9317 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9319 * server.c (main): Relax numerical bases supported for the pid of
9320 the --attach command line argument.
9322 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9324 * win32-low.c (win32_attach): Call OpenProcess before
9325 DebugActiveProcess, not after. Add last error output to error
9328 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9330 * win32-low.c (win32_get_thread_context)
9331 (win32_set_thread_context): New functions.
9332 (thread_rec): Use win32_get_thread_context.
9333 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9334 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9337 2007-12-03 Leo Zayas
9338 Pedro Alves <pedro_alves@portugalmail.pt>
9340 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9342 (child_add_thread): Minor cleanup.
9343 (child_continue): Resume artificially suspended threads before
9344 calling ContinueDebugEvent.
9345 (suspend_one_thread): New.
9346 (fake_breakpoint_event): New.
9347 (get_child_debug_event): Change return type to int. Check here if
9348 gdb sent an interrupt request. If a soft interrupt was requested,
9349 fake a breakpoint event. Return 0 if there is no event to handle,
9351 (win32_wait): Don't check here if gdb sent an interrupt request.
9352 Ensure there is a valid event to handle.
9353 (win32_request_interrupt): Add soft interruption method as last
9356 2007-12-03 Leo Zayas
9357 Pedro Alves <pedro_alves@portugalmail.pt>
9359 * win32-low.h (win32_thread_info): Add descriptions to the
9360 structure members. Replace `suspend_count' counter by a
9362 * win32-low.c (thread_rec): Update condition of when to get the
9363 context from the inferior. Rely on ContextFlags being set if it
9364 has already been retrieved. Only suspend the inferior thread if
9365 we haven't already. Warn if that fails.
9366 (continue_one_thread): s/suspend_count/suspended/. Only call
9367 ResumeThread once. Warn if that fails.
9369 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9371 * win32-low.c (win32_wait): Don't read from the inferior when it
9374 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9376 * Makefile.in (win32_low_h): New variable.
9377 (win32-low.o): Add dependency on $(win32_low_h).
9378 (win32-arm-low.o, win32-i386-low.o): New rules.
9380 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9382 * hostio.c: Correct copyright year.
9384 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9386 * Makefile.in (OBS): Add hostio.o.
9387 (hostio.o): New rule.
9388 * server.h (handle_vFile): Declare.
9389 * hostio.c: New file.
9390 * server.c (handle_v_requests): Take packet_len and new_packet_len
9391 for binary packets. Call handle_vFile.
9392 (main): Update call to handle_v_requests.
9394 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9396 * linux-low.c: Include <sched.h>.
9398 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9400 * linux-low.c (linux_tracefork_grandchild): New.
9401 (linux_tracefork_child): Use clone.
9402 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9404 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9406 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9408 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9410 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9412 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9414 * inferiors.c (change_inferior_id): Delete.
9415 (add_pid_to_list, pull_pid_from_list): New.
9416 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9417 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9418 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9419 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9420 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9421 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9422 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9423 (using_threads): Always set to 1.
9424 (handle_extended_wait): New.
9425 (add_process): Do not set TID.
9426 (linux_create_inferior): Set must_set_ptrace_flags.
9427 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9428 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9429 (linux_thread_alive): Rename TID argument to LWPID.
9430 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9431 (linux_wait_for_event): Do not use TID or check using_threads. Update
9432 call to dead_thread_notify. Call handle_extended_wait.
9433 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9434 (send_sigstop): Delete sigstop_sent.
9435 (wait_for_sigstop): Avoid TID.
9436 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9437 (linux_test_for_tracefork): New.
9438 (linux_lookup_signals): Use thread_db_active and
9439 linux_supports_tracefork_flag.
9440 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9441 * linux-low.h (get_process_thread): Avoid TID.
9442 (struct process_ifo): Move thread_known and tid to the end. Remove
9444 (linux_attach_lwp, thread_db_init): Update prototypes.
9445 * server.h (change_inferior_id): Delete prototype.
9446 (add_pid_to_list, pull_pid_from_list): New prototypes.
9447 * thread-db.c (thread_db_use_events): New.
9448 (find_first_thread): Rename to...
9449 (find_one_thread): ...this. Update callers and messages. Do not
9450 call fatal. Check thread_db_use_events. Do not call
9451 change_inferior_id or new_thread_notify.
9452 (maybe_attach_thread): Update. Do not call new_thread_notify.
9453 (thread_db_init): Set thread_db_use_events. Check use_events.
9454 * utils.c (fatal, warning): Correct message prefix.
9456 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9458 * Makefile.in (clean): Remove new files.
9459 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9460 (powerpc-64.o, powerpc-64.c): New rules.
9461 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9462 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9464 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9466 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9467 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9468 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9469 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9470 (target_regsets): Add AltiVec and SPE register sets.
9471 * configure.ac: Check for AltiVec and SPE.
9472 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9473 (ppc_fill_vrregset, ppc_store_vrregset): New.
9474 (target_regsets): Add AltiVec register set.
9475 * configure: Regenerated.
9477 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9479 * linux-low.c (O_LARGEFILE): Define.
9480 (linux_read_memory): Use /proc/PID/mem.
9481 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9482 * configure, config.in: Regenerated.
9484 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9486 * linux-low.c (linux_wait_for_event): Do not pass signals while
9489 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9491 * win32-low.c (create_process): New.
9492 (win32_create_inferior): Use create_process instead of
9493 CreateProcess. If create_process failed retry appending an ".exe"
9494 suffix. Store the GetLastError result immediatelly after
9495 create_process calls and use it on the call to error.
9497 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9499 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9501 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9503 * configure.ac: Switch license to GPLv3.
9505 2007-08-01 Michael Snyder <msnyder@access-company.com>
9507 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9509 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9511 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9513 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9514 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9515 CloseToolhelp32Snapshot.
9516 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9517 CloseToolhelp32Snapshot.
9519 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9521 * server.c (main): Check for inferior exit before main loop.
9523 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9525 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9526 instead of on tmp_desc.
9528 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9529 Daniel Jacobowitz <dan@codesourcery.com>
9531 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9532 (add_thread): Minor cleanups.
9533 (clear_inferiors): Move lower in the file. Clear the DLL
9535 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9536 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9537 (xml_escape_text): New.
9538 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9540 (handle_v_cont): Report errors.
9541 (gdbserver_version): Update.
9542 (main): Correct size of own_buf. Do not report initial DLL events.
9543 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9544 (unloaded_dll, xml_escape_text): New.
9545 * win32-low.c (enum target_waitkind): Update comments.
9546 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9547 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9548 (win32_EnumProcessModules, win32_GetModuleInformation)
9549 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9550 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9551 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9552 (win32_Module32First, win32_Module32Next, load_toolhelp)
9553 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9554 (get_child_debug_event): Handle DLL events.
9555 (win32_wait): Likewise.
9557 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9559 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9560 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9562 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9564 * win32-low.c (handle_output_debug_string): Ignore event if not
9567 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9569 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9571 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9573 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9575 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9577 * inferiors.c (change_inferior_id): Add comment.
9578 * linux-low.c (check_removed_breakpoint): Add an early
9579 prototype. Improve debug output.
9580 (linux_attach): Doc update.
9581 (linux_detach_one_process, linux_detach): Clean up before releasing
9583 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9584 * linux-low.h (struct process_info): Doc improvement.
9585 * mem-break.c (delete_all_breakpoints): New.
9586 * mem-break.h (delete_all_breakpoints): New prototype.
9587 * thread-db.c (find_first_thread): New.
9588 (thread_db_create_event): Call it instead of
9589 thread_db_find_new_threads. Clean up unused variables.
9590 (maybe_attach_thread): Remove first thread handling.
9591 (thread_db_find_new_threads): Use find_first_thread.
9592 (thread_db_get_tls_address): Likewise.
9594 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9596 * thread-db.c (thread_db_find_new_threads): Add prototype.
9597 (thread_db_create_event): Check for the main thread before adding
9599 (maybe_attach_thread): Only enable event reporting if TID == 0.
9600 (thread_db_get_tls_address): Check for new threads.
9602 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9604 * linux-low.c (linux_create_inferior): Try execv before execvp.
9605 * spu-low.c (spu_create_inferior): Likewise.
9607 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9609 * linux-low.c (linux_create_inferior): Change execv to execvp.
9610 * spu-low.c (spu_create_inferior): Likewies.
9612 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9614 * Makefile.in (clean): Clean new files instead of deleted ones.
9615 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9616 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9618 * configure.srv: Specify XML files and new regformats for MIPS and
9620 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9621 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9622 an entry for the restart register.
9623 (mips_cannot_fetch_register, mips_cannot_store_register)
9624 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9625 register names to match the XML descriptions.
9626 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9627 restart register instead of $0.
9629 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9630 Markus Deuling <deuling@de.ibm.com>
9632 * remote-utils.c (decode_xfer_write): New function.
9633 * server.h (decode_xfer_write): Add prototype.
9634 * server.c (handle_query): Add PACKET_LEN argument. Support
9635 qXfer:spu:read and qXfer:spu:write packets.
9636 (main): Pass packet_len to handle_query.
9637 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9638 * target.h (target_ops): Add qxfer_spu.
9640 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9642 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9643 accessing non-seekable spufs files.
9645 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9647 * server.c (handle_query): Add reply for qC packet.
9649 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9650 Leo Zayas <lerele@champenstudios@com>
9652 * server.h (check_remote_input_interrupt_request): New function.
9653 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9654 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9655 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9656 (check_remote_input_interrupt_request): New function.
9657 * server.h (check_remote_input_interrupt_request): Declare.
9658 * win32-low.c (winapi_DebugBreakProcess,
9659 winapi_GenerateConsoleCtrlEvent): New typedefs.
9660 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9662 (win32_wait): Check for remote interrupt request
9663 with check_remote_input_interrupt_request.
9664 (win32_request_interrupt): New function.
9665 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9667 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9669 * win32-low.c (debug_registers_changed,
9670 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9671 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9672 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9673 (thread_rec): Get context using the low target.
9674 (child_add_thread): Call thread_added on the low target,
9675 which does the same thing.
9677 (do_initial_child_stuff): Remove debug registers references.
9678 Set context using the low target. Resume threads after
9679 setting the contexts.
9680 (child_continue): Remove dead variable. Remove debug
9681 registers references.
9682 (child_fetch_inferior_registers): Go through the low target.
9683 (do_child_store_inferior_registers): Remove.
9684 (child_store_inferior_registers): Go through the low target.
9685 (win32_resume): Remove debug registers references.
9686 Set context using the low target.
9687 (handle_exception): Change return type to void. Don't record
9688 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9689 first chance exception.
9690 (get_child_debug_event): Change return type to void. Remove
9691 goto loop. Always return after waiting for debug event.
9692 (win32_wait): Convert to switch statement. Handle spurious
9695 * win32-i386-low.c (debug_registers_changed,
9696 debug_registers_used): New.
9697 (initial_stuff): Rename to ...
9698 (i386_initial_stuff): ... this. Clear debug registers
9700 (store_debug_registers): Delete.
9701 (i386_get_thread_context): New.
9702 (load_debug_registers): Delete.
9703 (i386_set_thread_context): New.
9704 (i386_thread_added): New.
9705 (single_step): Rename to ...
9706 (i386_single_step): ... this.
9707 (do_fetch_inferior_registers): Rename to ...
9708 (i386_fetch_inferior_register): ... this.
9709 (i386_store_inferior_register): New.
9710 (the_low_target): Adapt to new interface.
9712 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9713 (arm_get_thread_context): New.
9714 (arm_set_thread_context): New.
9716 (do_fetch_inferior_registers): Rename to ...
9717 (arm_fetch_inferior_register): ... this.
9718 (arm_store_inferior_register): New.
9719 (arm_wince_breakpoint): Reimplement as unsigned long.
9720 (arm_wince_breakpoint_len): Define.
9721 (the_low_target): Adapt to new interface.
9723 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9724 load_debug_registers. Add get_thread_context, set_thread_context,
9725 thread_added and store_inferior_register. Rename
9726 fetch_inferior_registers to fetch_inferior_register.
9727 (regptr): Remove declaration.
9729 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9731 * linux-low.c (linux_detach): Change return type to int. Return 0.
9732 * spu-low.c (spu_detach): Likewise.
9734 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9736 * target.h (target_ops): Change return type of detach to int.
9738 (join_inferior): New.
9739 * server.c (main): Don't skip detach support on mingw32.
9740 If the inferior doesn't support detaching return error.
9741 Call join_inferior instead of using waitpid.
9742 * linux-low.c (linux_join): New.
9743 (linux_target_op): Add linux_join.
9744 * spu-low.c (spu_join): New.
9745 (spu_target_ops): Add spu_join.
9746 * win32-low.c (win32_detach): Adapt to new interface.
9747 Reopen current_process_handle before detaching. Issue a child
9748 resume before detaching.
9750 (win32_target_op): Add win32_join.
9752 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9754 * win32-low.c (win32-attach): Fix return value.
9755 * target.h (target_ops): Describe ATTACH return values.
9757 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9759 * win32-low.c (GETPROCADDRESS): Define.
9760 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9761 (winapi_DebugSetProcessKillOnExit): Likewise.
9762 (win32_create_inferior): Force usage of ansi CreateProcessA.
9763 (win32_attach): Use GETPROCADDRESS.
9764 (win32_detach): Likewise.
9766 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9768 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9770 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9772 * win32-low.c: Commit leftover changes from 2007-03-29.
9774 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9776 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9777 fields short instead of int. Add explicit padding.
9778 (i387_cache_to_fsave): Remove unnecessary casts.
9779 (i387_fsave_to_cache): Doc fix.
9780 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9782 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9784 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9785 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9787 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9789 * configure.srv (arm*-*-mingw32ce*): Move near the other
9792 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9794 * configure.ac: Add errno checking.
9795 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9796 sys/file.h and malloc.h.
9797 (AC_CHECK_DECLS): Add perror.
9798 (srv_mingwce): Handle.
9799 * configure.srv (i[34567]86-*-cygwin*): Add
9800 win32-i386-low.o to srv_tgtobj.
9801 (i[34567]86-*-mingw*): Likewise.
9802 (arm*-*-mingw32ce*): Add case.
9803 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9804 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9805 [__MINGW32CE__] (strerror): New function.
9806 [__MINGW32CE__] (errno): Define to GetLastError.
9807 [__MINGW32CE__] (COUNTOF): New macro.
9808 (remote_open): Remove extra close call.
9809 * mem-break.c (delete_breakpoint_at): New function.
9810 * mem-break.h (delete_breakpoint_at): Declare.
9811 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9812 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9813 [USE_WIN32API] (read, write): Add char* casts.
9814 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9815 * server.h: Include wincecompat.h on Windows CE.
9816 [HAVE_ERRNO_H]: Check.
9817 (perror): Declare if not declared.
9818 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9819 (perror_with_name): Remove errno declaration.
9820 * wincecompat.h: New.
9821 * wincecompat.c: New.
9823 * win32-arm-low.c: New.
9824 * win32-i386-low.c: New.
9825 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9826 (OUTMSG2): Make it safe.
9828 (COUNTOF): New macro.
9829 (NUM_REGS): Get it from the low target.
9830 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9831 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9832 (thread_rec): Let low target handle debug registers.
9833 (child_add_thread): Likewise.
9834 (child_init_thread_list): Likewise.
9835 (continue_one_thread): Likewise.
9837 (do_child_fetch_inferior_registers): Move to ...
9838 * win32-i386-low.c: ... here, and rename to ...
9839 (do_fetch_inferior_registers): ... this.
9840 * win32-low.c (child_fetch_inferior_registers):
9841 Go through the low target.
9842 (do_child_store_inferior_registers): Use regptr.
9843 (strwinerror): New function.
9844 (win32_create_inferior): Handle Windows CE.
9845 Use strwinerror instead of strerror on Windows error
9846 codes. Add program to the error output.
9847 Don't close the main thread handle on Windows CE.
9848 (win32_attach): Use coredll.dll on Windows CE.
9849 (win32_kill): Close current process and current
9851 (win32_detach): Use coredll.dll on Windows CE.
9852 (win32_resume): Let low target handle debug registers, and
9854 (handle_exception): Add/Remove initial breakpoint. Avoid
9855 non-existant WSTOPSIG on Windows CE.
9856 (win32_read_inferior_memory): Cast to remove warning.
9857 (win32_arch_string): Go through the low target.
9858 (initialize_low): Call set_breakpoint_data with the low
9859 target's breakpoint.
9860 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9861 FOP_REGNUM, mappings): Move to ...
9862 * win32-i386-low.c: ... here.
9863 * win32-low.c (win32_thread_info): Move to ...
9864 * win32-low.h: ... here.
9865 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9866 win32-arm-low.c and wincecompat.c.
9867 (all:): Add $EXEEXT.
9868 (install-only:): Likewise.
9869 (gdbserver:): Likewise.
9870 (gdbreplay:): Likewise.
9871 * config.in: Regenerate.
9872 * configure: Regenerate.
9874 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9876 * win32-low.c: Rename typedef thread_info to
9877 win32_thread_info throughout.
9879 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9881 * win32-i386-low.c: Rename to ...
9882 * win32-low.c: ... this.
9883 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9884 * Makefile.in: Likewise.
9886 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9888 * remote-utils.c (monitor_output): Constify msg parameter.
9889 * server.h (monitor_output): Likewise.
9890 * win32-i386-low.c (handle_output_debug_string): New.
9891 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9892 handle_output_debug_string.
9893 (get_child_debug_event): Likewise.
9895 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9897 * server.c (main): Correct strtoul check.
9899 2007-03-27 Jon Ringle <jon@ringle.org>
9901 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9903 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9905 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9907 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9909 * terminal.h: Check HAVE_SGTTY_H.
9911 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9913 * remote-utils.c (remote_open): Print out the assigned port number.
9915 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9917 * remote-utils.c (monitor_output): New function.
9918 * server.c (debug_threads): Define here.
9919 (monitor_show_help): New function.
9920 (handle_query): Handle qRcmd.
9921 (main): Do not handle 'd' packet.
9922 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9923 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9926 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9928 * Makefile.in (EXEEXT): New.
9929 (clean): Use $(EXEEXT).
9931 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9933 * target.h (target_ops): Rename send_signal to request_interrupt,
9934 and remove enum target_signal parameter.
9935 * linux-low.c (linux_request_interrupt): Rename from
9936 linux_send_signal, and always send SIGINT.
9937 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9938 and always send SIGINT.
9939 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9941 (input_interrupt): Likewise.
9943 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9945 * server.c (get_features_xml): Check if target implemented
9947 * win32-i386-low.c (win32_arch_string): New.
9948 (win32_target_ops): Add win32_arch_string as arch_string member.
9950 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9952 * spu-low.c (spu_arch_string): New.
9953 (spu_target_ops): Add spu_arch_string.
9955 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9957 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9958 * configure.ac: Do not check for terminal.h.
9959 * configure, config.in: Regenerated.
9961 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9963 * Makefile.in (OBS): Add $(XML_BUILTIN).
9964 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9966 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9967 (arm-with-iwmmxt.c): New.
9968 * config.in, configure: Regenerate.
9969 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9970 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9971 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9972 (arm*-*-linux*): Add iWMMXt and regset support.
9973 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9974 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9975 (arm_store_wmmxregset, target_regsets): New.
9976 * server.c (get_features_xml): Take annex argument. Check builtin
9978 (handle_query): Handle multiple annexes.
9980 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9982 * remote-utils.c [USE_WIN32API] (read, write): Define.
9983 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9986 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9988 * linux-i386-low.c (the_low_target): Set arch_string.
9989 * linux-x86-64-low.c (the_low_target): Likewise.
9990 * linux-low.c (linux_arch_string): New.
9991 (linux_target_ops): Add it.
9992 * linux-low.h (struct linux_target_ops): Add arch_string.
9993 * server.c (write_qxfer_response): Use const void * for DATA.
9994 (get_features_xml): New.
9995 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9996 * target.h (struct target_ops): Add arch_string method.
9998 2007-01-03 Denis Pilat <denis.pilat@st.com>
9999 Daniel Jacobowitz <dan@codesourcery.com>
10001 * linux-low.c (linux_kill): Handle being called with no threads.
10002 * win32-i386-low.c (win32_kill): Likewise.
10003 (get_child_debug_event): Clear current_process_handle.
10005 2006-12-30 Denis PILAT <denis.pilat@st.com>
10006 Daniel Jacobowitz <dan@codesourcery.com>
10008 * remote-utils.c (remote_open): Check the type of specified
10009 serial port devices before opening them.
10010 * server.c (main): Kill the inferior if an error occurs during
10011 the first remote_open.
10013 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10015 * README: Update supported targets.
10017 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10019 * Makefile.in (clean): Remove reg-mips64.c.
10020 (reg-mips64.c, reg-mips64.o): New rules.
10021 * configure.srv: Handle mips64. Include regset support for mips.
10022 * linux-mips-low.c (union mips_register): New.
10023 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10024 (mips_breakpoint, mips_breakpoint_at): Use int.
10025 (mips_collect_register, mips_supply_register)
10026 (mips_collect_register_32bit, mips_supply_register_32bit)
10027 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10028 (mips_store_fpregset, target_regsets): New.
10029 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10031 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10033 * configure.srv: Add target "spu*-*-*".
10034 * Makefile.in (clean): Remove reg-spu.c.
10035 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10036 * spu-low.c: New file.
10038 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10040 * configure.ac: Correct td_thr_tls_get_addr test.
10041 * configure: Regenerated.
10043 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10045 * linux-low.c (linux_wait_for_event): Reformat. Use the
10046 pass_signals array.
10047 * remote-utils.c (decode_address_to_semicolon): New.
10048 * server.c (pass_signals, handle_general_set): New.
10049 (handle_query): Mention QPassSignals for qSupported.
10050 (main): Call handle_general_set.
10051 * server.h (pass_signals, decode_address_to_semicolon): New.
10053 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10055 * server.c (handle_query): Correct error handling for read_auxv.
10057 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10059 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10060 and srv_linux_thread_db to yes.
10061 * linux-s390-low.c (s390_fill_gregset): New function.
10062 (target_regsets): Define data structure.
10064 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10066 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10067 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10068 * config.in, configure: Regenerated.
10069 * inferiors.c (gdb_id_to_thread): New function.
10070 (gdb_id_to_thread_id): Use it.
10071 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10072 * linux-low.h (struct process_info): Add th member.
10073 (thread_db_get_tls_address): New prototype.
10074 * remote-utils.c (decode_address): Make non-static.
10075 * server.c (handle_query): Handle qGetTLSAddr.
10076 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10077 * target.h (struct target_ops): Add get_tls_address.
10078 * thread-db.c (maybe_attach_thread): Save the thread handle.
10079 (thread_db_get_tls_address): New.
10081 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10083 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10084 (linux_resume_one_process): Take a siginfo_t *. Update all
10085 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10086 (struct pending_signals): Add a siginfo_t.
10087 (linux_wait_for_process): Always set last_status.
10088 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10089 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10090 * linux-low.h (struct process_info): Add last_status.
10092 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10094 * remote-utils.c (try_rle): New function.
10095 (putpkt_binary): Use it.
10097 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10099 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10100 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10101 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10102 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10103 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10106 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10108 * server.c (terminal_fd): New variable.
10109 (old_foreground_pgrp): Likewise.
10110 (restore_old_foreground_pgrp): New function.
10111 (start_inferior): Record the terminal file descriptor in terminal_fd
10112 and its original foreground group in old_foreground_pgrp. Register
10113 restore_old_foreground_pgrp with atexit().
10115 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10117 * server.c (handle_query): Correct qPart to qXfer.
10119 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10121 * configure.ac: Check for more headers which are missing on
10122 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10123 * configure.srv: Add Cygwin and mingw32.
10124 * remote-utils.c: Don't include headers unconditionally which
10125 are missing on mingw32. Include <winsock.h> for mingw32.
10126 (remote_open): Adjust for mingw32 support. Flush
10127 standard error after writing to it.
10128 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10129 (unblock_async_io, enable_async_io, disable_async_io)
10130 (readchar, getpkt): Update for Winsock support.
10131 (prepare_resume_reply): Expect a protocol signal number.
10132 * server.c: Disable <sys/wait.h> on mingw32.
10133 (start_inferior): Adjust for mingw32 support. Flush
10134 standard error after writing to it.
10135 (attach_inferior): Likewise. Use protocol signal
10137 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10139 * win32-i386-low.c: New file.
10140 * Makefile.in (XM_CLIBS): Set.
10141 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10142 (win32-i386-low.o): New dependency rule.
10143 * linux-low.c (linux_wait): Use target signal numbers.
10144 * target.h (struct target_ops): Doc fix.
10145 * server.h (target_signal_to_name): New prototype.
10146 * gdbreplay.c: Don't include headers unconditionally which
10147 are missing on mingw32. Include <winsock.h> for mingw32.
10148 (remote_close, remote_open): Adjust for Winsock support.
10149 * configure, config.in: Regenerated.
10151 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10153 * server.c (decode_xfer_read, write_qxfer_response): New.
10154 (handle_query): Take a packet length argument. Handle
10155 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10156 the qSupported response.
10157 (main): Update call to handle_query.
10159 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10161 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10162 (putpkt_binary): Renamed from putpkt and adjusted for binary
10164 (putpkt): New wrapper for putpkt_binary.
10165 (readchar): Don't mask off the high bit.
10166 (decode_X_packet): New function.
10167 * server.c (main): Call putpkt_binary if a handler sets the packet
10168 length. Save the length of the incoming packet. Handle 'X'.
10169 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10171 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10173 * server.c (handle_query): Handle qSupported.
10175 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10177 * remote-utils.c (all_symbols_looked_up): New variable.
10178 (look_up_one_symbol): Check it.
10179 * server.h (look_up_one_symbol): New declaration.
10180 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10182 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10184 * Makefile.in (linux-arm-low.o): Update dependencies.
10185 * linux-arm-low.c: Include "gdb_proc_service.h".
10186 (PTRACE_GET_THREAD_AREA): Define.
10187 (ps_get_thread_area): New function.
10189 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10191 * configure.srv (m68k*-*-uclinux*): New target.
10192 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10193 (linux_resume_one_process): Remove extraneous cast.
10194 (linux_read_offsets): New.
10195 (linux_target_op): Add linux_read_offsets on mmuless systems.
10196 * server.c (handle_query): Add qOffsets logic.
10197 * target.h (struct target_ops): Add read_offsets.
10199 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10201 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10202 (PTRACE_GET_THREAD_AREA): Define.
10203 (ps_get_thread_area): New function.
10204 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10205 (linux-x86-64-low.o): Update.
10207 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10209 * configure.ac: Remove checks for prfpregset_t.
10210 * gdb_proc_service.h: New file.
10211 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10212 new "gdb_proc_service.h".
10213 * proc-service.c: Likewise.
10214 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10215 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10216 * Makefile.in (gdb_proc_service_h): Updated.
10217 * configure, config.in: Regenerated.
10219 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10221 * remote-utils.c (prepare_resume_reply): Move declaration
10222 of gdb_id_from_wait to the top of the block.
10224 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10226 * linux-low.c (regsets_store_inferior_registers): Read the regset
10227 from the target before filling it.
10229 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10231 * server.c (attach_inferior): Return SIGTRAP for a successful
10234 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10236 * Makefile.in (OBS): Add version.o.
10237 (STAGESTUFF): Delete.
10238 (version.o): Add dependencies.
10239 (version.c): Replace rule.
10240 (clean): Remove version.c.
10241 * server.c (gdbserver_version): New.
10242 (gdbserver_usage): Use printf.
10243 (main): Handle --version and --help.
10244 * server.h (version, host_name): Add declarations.
10246 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10258 * linux-x86-64-low.c:
10260 * linux-s390-low.c:
10261 * linux-ppc64-low.c:
10263 * linux-mips-low.c:
10264 * linux-m68k-low.c:
10265 * linux-m32r-low.c:
10268 * linux-ia64-low.c:
10269 * linux-i386-low.c:
10270 * linux-crisv32-low.c:
10282 * gdbserver.1: Add (C) after Copyright. Update the FSF
10285 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10287 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10288 (arm_breakpoint_at): Recognize both breakpoints.
10289 (the_low_target): Use the correct breakpoint instruction.
10291 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10293 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10294 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10295 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10296 (the_low_target): Update.
10298 2005-10-25 Andreas Schwab <schwab@suse.de>
10300 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10302 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10303 (ia64_num_regs): Reduce to 462.
10305 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10307 * acinclude.m4: Correct quoting.
10308 * aclocal.m4: Regenerated.
10310 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10311 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10312 (thread_db_init): Call thread_db_err_str.
10313 * configure.ac: Check for TD_VERSION.
10314 * config.in, configure: Regenerated.
10316 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10318 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10320 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10322 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10323 is not available. Define HAVE_PTRACE_GETREGS if it is.
10324 * config.in, configure: Regenerated.
10325 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10326 * linux-i386-low.c, linux-m68k-low.c: Update to use
10327 HAVE_PTRACE_GETREGS.
10328 * linux-low.c (regsets_fetch_inferior_registers)
10329 (regsets_store_inferior_registers): Only return 0 if we processed
10331 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10332 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10334 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10336 * inferiors.c (struct thread_info): Add gdb_id.
10337 (add_thread): Add gdb_id argument.
10338 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10339 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10340 calls to add_thread.
10341 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10342 * server.c (handle_query): Use thread_to_gdb_id.
10343 (handle_v_cont, main): Use gdb_id_to_thread_id.
10344 * server.h (add_thread): Update prototype.
10345 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10348 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10350 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10351 left-padded registers.
10352 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10353 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10355 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10357 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10358 * configure: Regenerate.
10359 * config.in: Regenerate.
10360 * server.h (NEED_DECLARATION_STRERROR):
10361 Replace with !HAVE_DECL_STRERROR.
10363 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10365 * linux-low.c (linux_wait, linux_send_signal): Don't test
10366 an unsigned long variable for > 0 if it could be MAX_ULONG.
10367 * server.c (myresume): Likewise.
10368 * target.c (set_desired_inferior): Likewise.
10370 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10372 * configure.ac: Simplify and improve check for socklen_t.
10373 * configure, config.in: Regenerate.
10375 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10377 * acconfig.h: Remove.
10378 * configure.ac: Add a test for socklen_t. Use three-argument
10379 AC_DEFINE throughout.
10380 * config.in: Regenerated using autoheader 2.59.
10381 * configure: Regenerated.
10383 * gdbreplay.c (socklen_t): Provide a default.
10384 (remote_open): Use socklen_t.
10385 * remote-utils.c (socklen_t): Provide a default.
10386 (remote_open): Use socklen_t.
10387 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10390 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10392 * linux-low.c (linux_read_memory, linux_write_memory)
10393 (linux_read_auxv): Likewise.
10394 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10395 (check_mem_write): Likewise.
10396 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10398 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10399 (registers_from_string, register_data): Likewise.
10400 * server.c (handle_query, main): Likewise.
10401 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10402 (decode_M_packet): Likewise.
10403 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10404 * target.h (struct target_ops): Update read_memory, write_memory,
10406 (read_inferior_memory, write_inferior_memory): Update.
10407 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10408 to unsigned char *.
10409 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10410 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10411 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10412 linux-s390-low.c, linux-sh-low.c: Update for changes in
10413 read_inferior_memory and the_low_target->breakpoint.
10415 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10417 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10418 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10419 * configure.srv: Add powerpc64-*-linux*.
10420 * linux-ppc64-low.c: New file.
10422 2005-05-23 Orjan Friberg <orjanf@axis.com>
10424 * linux-cris-low.c: New file with support for CRIS.
10425 * linux-crisv32-low.c: Ditto for CRISv32.
10426 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10427 (clean): Add reg-cris.c and reg-crisv32.c.
10428 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10429 reg-crisv32.o, and reg-crisv32.c to make rules.
10430 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10431 recognized targets.
10433 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10435 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10436 of sizeof (PTRACE_XFER_TYPE).
10437 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10439 2005-05-12 Orjan Friberg <orjanf@axis.com>
10441 * target.h (struct target_ops): Add insert_watchpoint,
10442 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10443 pointers for hardware watchpoint support.
10444 * linux-low.h (struct linux_target_ops): Ditto.
10445 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10446 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10447 to linux_target_ops.
10448 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10450 * server.c (main): Recognize 'Z' and 'z' packets.
10452 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10454 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10455 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10456 (the_low_target): Add new members.
10458 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10460 * proc-service.c (ps_lgetregs): Search all_processes instead of
10463 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10465 * server.c (start_inferior): Change return type to int.
10466 (attach_inferior): Change sigptr to int *.
10467 (handle_v_cont, handle_v_requests): Change signal to int *.
10468 (main): Change signal to int.
10470 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10472 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10473 * configure.srv: Add m32r*-*-linux*.
10474 * linux-m32r-low.c: New file.
10476 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10478 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10480 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10482 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10483 Take unsigned long arguments for PIDs.
10484 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10485 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10486 (wait_for_sigstop, linux_resume_one_process)
10487 (regsets_fetch_inferior_registers, linux_send_signal)
10488 (linux_read_auxv): Likewise. Update the types of variables holding
10489 PIDs. Update format string specifiers.
10490 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10491 * remote-utils.c (prepare_resume_reply): Likewise.
10492 * server.c (cont_thread, general_thread, step_thread)
10493 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10495 (handle_query): Update format specifiers.
10496 (handle_v_cont, main): Use strtoul for thread IDs.
10497 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10498 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10499 (general_thread, step_thread, thread_from_wait)
10500 (old_thread_from_wait): Update.
10501 * target.h (struct thread_resume): Use unsigned long for THREAD.
10502 (struct target_ops): Use unsigned long for arguments to attach and
10505 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10507 * acinclude.m4: Include bfd/bfd.m4 directly.
10508 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10509 <agriffis@toolchain.org>.
10510 * aclocal.m4, configure: Regenerated.
10512 2005-01-07 Andrew Cagney <cagney@gnu.org>
10514 * configure.ac: Rename configure.in, require autoconf 2.59.
10515 * configure: Re-generate.
10517 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10519 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10520 LIBS when finished.
10521 * aclocal.m4: Regenerated.
10522 * configure: Regenerated.
10524 2004-11-21 Andreas Schwab <schwab@suse.de>
10526 * linux-m68k-low.c (m68k_num_gregs): Define.
10527 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10528 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10529 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10530 (m68k_breakpoint_at): New. Add to the_low_target.
10532 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10533 srv_linux_thread_db to yes.
10535 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10537 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10538 (ARCH_SET_FS): Likewise.
10539 (ARCH_GET_FS): Likewise.
10540 (ARCH_GET_GS): Likewise.
10542 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10544 * linux-i386-low.c (ps_get_thread_area): New.
10545 * linux-x86-64-low.c (ps_get_thread_area): New.
10546 * linux-low.c: Include <sys/syscall.h>.
10547 (linux_kill_one_process): Don't kill the first thread here.
10548 (linux_kill): Kill the first thread here.
10549 (kill_lwp): New function.
10550 (send_sigstop, linux_send_signal): Use it.
10551 * proc-service.c: Clean up #ifdefs.
10552 (fpregset_info): Delete.
10553 (ps_lgetregs): Update and enable implementation.
10554 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10556 * remote-utils.c (struct sym_cache, symbol_cache): New.
10557 (input_interrupt): Print a clearer message.
10558 (async_io_enabled): New variable.
10559 (enable_async_io, disable_async_io): Use it. Update comments.
10560 (look_up_one_symbol): Use the symbol cache.
10561 * thread-db.c (thread_db_look_up_symbols): New function.
10562 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10564 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10566 * configure.in: Test for -rdynamic.
10567 * configure: Regenerated.
10568 * Makefile (INTERNAL_LDFLAGS): New.
10569 (gdbserver, gdbreplay): Use it.
10571 2004-09-02 Andrew Cagney <cagney@gnu.org>
10573 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10575 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10577 * linux-low.c (linux_wait): Clear all_processes list also.
10579 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10581 * linux-low.c: Include <errno.h>. Remove extern declaration of
10584 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10586 * gdbreplay.c, server.h, utils.c: Update copyright years.
10588 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10590 * server.c (main): Print child status or termination signal from
10591 variable 'signal', not 'sig'.
10593 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10595 * linux-low.c (linux_read_memory): Change return type to
10596 int. Check for and return error from ptrace().
10597 * target.c (read_inferior_memory): Change return type to int. Pass
10598 back return status from the_target->read_memory().
10599 * target.h (struct target_ops): Adapt *read_memory() prototype.
10601 (read_inferior_memory): Adapt prototype.
10602 * server.c (main): Return an error packet if
10603 read_inferior_memory() returns an error.
10605 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10607 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10608 Unify with other clean targets.
10610 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10612 * server.c (handle_v_cont): Call set_desired_inferior.
10614 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10616 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10618 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10620 * linux-low.c (linux_wait): Unblock async I/O.
10621 (linux_resume): Block and enable async I/O.
10622 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10623 * server.h (block_async_io, unblock_async_io): Add prototypes.
10625 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10627 * remote-utils.c (remote_open): Print a status notice after
10628 opening a TCP port.
10629 * server.c (attach_inferior): Print a status notice after
10632 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10634 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10636 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10638 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10640 * server.c, target.h: Update copyright years.
10642 2004-02-25 Roland McGrath <roland@redhat.com>
10644 * target.h (struct target_ops): New member `read_auxv'.
10645 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10646 * linux-low.c (linux_read_auxv): New function.
10647 (linux_target_ops): Initialize `read_auxv' member to that.
10649 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10651 Committed by Jim Blandy <jimb@redhat.com>.
10653 * linux-s390-low.c (s390_num_regs): Update.
10654 (s390_regmap): Remove control registers. Use __s390x__ predefine
10655 instead of GPR_SIZE to distiguish s390 and s390x targets.
10657 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10659 * linux-low.c: Update copyright year.
10660 (check_removed_breakpoint): Clear pending_is_breakpoint.
10661 (linux_set_resume_request, linux_queue_one_thread)
10662 (resume_status_pending_p): New functions.
10663 (linux_continue_one_thread): Use process->resume.
10664 (linux_resume): Only resume threads if there are no pending events.
10665 * linux-low.h (struct process_info): Add resume request
10668 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10670 * regcache.c (new_register_cache): Clear the allocated register
10671 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10673 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10675 * linux-low.c (linux_resume): Take a struct thread_resume *
10677 (linux_wait): Update call.
10678 (resume_ptr): New static variable.
10679 (linux_continue_one_thread): Renamed from
10680 linux_continue_one_process. Use resume_ptr.
10681 (linux_resume): Use linux_continue_one_thread.
10682 * server.c (handle_v_cont, handle_v_requests): New functions.
10683 (myresume): New function.
10684 (main): Handle 'v' case.
10685 * target.h (struct thread_resume): New type.
10686 (struct target_ops): Change argument of "resume" to struct
10688 (myresume): Delete macro.
10690 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10692 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10693 (uninstall): Support DESTDIR.
10695 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10697 * configure.srv: Add xscale*linux copy of arm*linux entry.
10699 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10701 * linux-arm-low.c (arm_reinsert_addr): New function.
10702 (the_low_target): Add arm_reinsert_addr.
10704 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10706 * mem-break.c: Remove whitespace at end of file.
10708 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10710 * configure.in: Check whether we need to prototype strerror.
10711 * server.h: Optionally prototype strerror.
10712 * gdbreplay.c (perror_with_name): Use strerror.
10713 * linux-low.c (linux_attach_lwp): Use strerror.
10714 * utils.c (perror_with_name): Use strerror.
10715 * config.in, configure: Regenerated.
10717 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10719 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10720 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10722 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10724 * Makefile.in (SFILES): Update.
10725 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10726 low-sun3.c: Remove files.
10728 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10730 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10731 (linux_detach_one_process, linux_detach): New functions.
10732 (linux_target_ops): Add linux_detach.
10733 * server.c (main): Handle 'D' packet.
10734 * target.h (struct target_ops): Add "detach" member.
10735 (detach_inferior): Define.
10737 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10739 From Kelley Cook <kelleycook@wideopenwest.com>:
10740 * configure.srv: Accept i[34567]86 variants.
10742 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10744 * linux-low.c (linux_wait_for_event): Correct comment typos.
10745 (linux_resume_one_process): Call check_removed_breakpoint.
10746 (linux_send_signal): New function.
10747 (linux_target_ops): Add linux_send_signal.
10748 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10750 * target.h (struct target_ops): Add send_signal.
10752 2003-05-29 Jim Blandy <jimb@redhat.com>
10754 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10755 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10756 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10757 away part of the register's value.
10759 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10761 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10762 (linux_wait_for_event, linux_init_signals): Likewise.
10764 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10766 * configure.in: Check for stdlib.h.
10767 * configure: Regenerated.
10768 * config.in: Regenerated.
10770 2003-01-04 Andreas Schwab <schwab@suse.de>
10772 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10774 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10776 * Makefile.in: Remove obsolete code.
10778 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10780 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10781 defined(PT_FPR0_HI).
10783 2002-11-17 Stuart Hughes <seh@zee2.com>
10785 * linux-arm-low.c (arm_num_regs): Increase.
10786 (arm_regmap): Include status register.
10788 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10790 * linux-low.c (register_addr): Remove incorrect -1 check.
10792 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10794 * linux-low.c (linux_create_inferior): Call setpgid. Return
10796 (unstopped_p, linux_signal_pid): Remove.
10797 (linux_target_ops): Remove linux_signal_pid.
10798 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10799 global instead of target method.
10800 * target.h (struct target_ops): Remove signal_pid. Update comment
10801 for create_inferior.
10802 * server.c (signal_pid): New variable.
10803 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10804 gdbserver. Set the child to be the foreground process group.
10805 (attach_inferior): Set signal_pid.
10807 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10809 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10811 2002-08-20 Jim Blandy <jimb@redhat.com>
10813 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10816 2002-08-01 Andrew Cagney <cagney@redhat.com>
10818 * Makefile.in: Make chill references obsolete.
10820 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10822 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10823 * configure: Regenerate.
10824 * config.in: Regenerate.
10826 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10828 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10829 (perror_with_name, remote_close, remote_open, expect, play): Static.
10831 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10833 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10834 byte offsets instead of an array of indexes.
10835 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10837 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10839 * regcache.c: Add comment.
10841 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10843 * thread-db.c: New file.
10844 * proc-service.c: New file.
10845 * acinclude.m4: New file.
10846 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10847 proc-service.o, and thread-db.o.
10848 (linux-low.o): Add USE_THREAD_DB.
10849 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10850 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10851 * aclocal.m4: Regenerated.
10852 * config.in: Regenerated.
10853 * configure: Regenerated.
10854 * configure.in: Check for proc_service.h, sys/procfs.h,
10855 thread_db.h, and linux/elf.h headrs.
10856 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10857 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10858 Check for -lthread_db and thread support.
10859 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10860 PowerPC, and SuperH.
10861 * i387-fp.c: Constify arguments.
10862 * i387-fp.h: Likewise.
10863 * inferiors.c: (struct thread_info): Renamed from
10864 `struct inferior_info'. Remove PID member. Use generic inferior
10865 list header. All uses updated.
10866 (inferiors, signal_pid): Removed.
10867 (all_threads): New variable.
10868 (get_thread): Define.
10869 (add_inferior_to_list): New function.
10870 (for_each_inferior): New function.
10871 (change_inferior_id): New function.
10872 (add_inferior): Removed.
10873 (remove_inferior): New function.
10874 (add_thread): New function.
10875 (free_one_thread): New function.
10876 (remove_thread): New function.
10877 (clear_inferiors): Use for_each_inferior and free_one_thread.
10878 (find_inferior): New function.
10879 (find_inferior_id): New function.
10880 (inferior_target_data): Update argument type.
10881 (set_inferior_target_data): Likewise.
10882 (inferior_regcache_data): Likewise.
10883 (set_inferior_regcache_data): Likewise.
10884 * linux-low.c (linux_bp_reinsert): Remove.
10885 (all_processes, stopping_threads, using_thrads)
10886 (struct pending_signals, debug_threads, pid_of): New.
10887 (inferior_pid): Replace with macro.
10888 (struct inferior_linux_data): Remove.
10889 (get_stop_pc, add_process): New functions.
10890 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10891 Use add_process and add_thread.
10892 (linux_attach_lwp): New function, based on old linux_attach. Use
10893 add_process and add_thread. Set stop_expected for new threads.
10894 (linux_attach): New function.
10895 (linux_kill_one_process): New function.
10896 (linux_kill): Kill all LWPs.
10897 (linux_thread_alive): Use find_inferior_id.
10898 (check_removed_breakpoints, status_pending_p): New functions.
10899 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10900 Update. Use WNOHANG. Wait for cloned processes also. Update process
10901 struct for the found process.
10902 (linux_wait_for_event): New function.
10903 (linux_wait): Use it. Support LWPs.
10904 (send_sigstop, wait_for_sigstop, stop_all_processes)
10905 (linux_resume_one_process, linux_continue_one_process): New functions.
10906 (linux_resume): Support LWPs.
10907 (REGISTER_RAW_SIZE): Remove.
10908 (fetch_register): Use register_size instead. Call supply_register.
10909 (usr_store_inferior_registers): Likewise. Call collect_register.
10910 Fix recursive case.
10911 (regsets_fetch_inferior_registers): Improve error message.
10912 (regsets_store_inferior_registers): Add debugging.
10913 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10914 (unstopped_p, linux_signal_pid): New functions.
10915 (linux_target_ops): Add linux_signal_pid.
10916 (linux_init_signals): New function.
10917 (initialize_low): Call it. Initialize using_threads.
10918 * regcache.c (inferior_regcache_data): Add valid
10920 (get_regcache): Fetch registers lazily. Add fetch argument
10921 and update all callers.
10922 (regcache_invalidate_one, regcache_invalidate): New
10924 (new_register_cache): Renamed from create_register_cache.
10925 Return the new regcache.
10926 (free_register_cache): Change argument to a void *.
10927 (registers_to_string, registers_from_string): Call get_regcache
10928 with fetch flag set.
10929 (register_data): Make static. Pass fetch flag to get_regcache.
10930 (supply_register): Call get_regcache with fetch flag clear.
10931 (collect_register): Call get_regcache with fetch flag set.
10932 (collect_register_as_string): New function.
10933 * regcache.h: Update.
10934 * remote-utils.c (putpkt): Flush after debug output and use
10936 Handle input interrupts while waiting for an ACK.
10937 (input_interrupt): Use signal_pid method.
10938 (getpkt): Flush after debug output and use stderr.
10939 (outreg): Use collect_register_as_string.
10940 (new_thread_notify, dead_thread_notify): New functions.
10941 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10942 and general_thread.
10943 (look_up_one_symbol): Flush after debug output.
10944 * server.c (step_thread, server_waiting): New variables.
10945 (start_inferior): Don't use signal_pid. Update call to mywait.
10946 (attach_inferior): Update call to mywait.
10947 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10948 (main): Don't fetch/store registers explicitly. Use
10949 set_desired_inferior. Support proposed ``Hs'' packet. Update
10951 * server.h: Update.
10952 (struct inferior_list, struct_inferior_list_entry): New.
10953 * target.c (set_desired_inferior): New.
10954 (write_inferior_memory): Constify.
10955 (mywait): New function.
10956 * target.h: Update.
10957 (struct target_ops): New signal_pid method.
10958 (mywait): Removed macro, added prototype.
10960 * linux-low.h (regset_func): Removed.
10961 (regset_fill_func, regset_store_func): New.
10962 (enum regset_type): New.
10963 (struct regset_info): Add type field. Use new operation types.
10964 (struct linux_target_ops): stop_pc renamed to get_pc.
10965 Add decr_pc_after_break and breakpoint_at.
10966 (get_process, get_thread_proess, get_process_thread)
10967 (strut process_info, all_processes, linux_attach_lwp)
10968 (thread_db_init): New.
10970 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10971 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10972 (the_low_target): Add new members.
10973 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10974 (i386_store_fpxregset): Constify.
10975 (target_regsets): Add new kind identifier.
10976 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10977 (i386_set_pc): Add debugging.
10978 (i386_breakpoint_at): New function.
10979 (the_low_target): Add new members.
10980 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10981 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10982 (mips_breakpoint_at): New.
10983 (the_low_target): Add new members.
10984 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10985 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10986 (the_low_target): Add new members.
10987 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10988 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10989 (the_low_target): Add new members.
10990 * linux-x86-64-low.c (target_regsets): Add new kind
10993 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10995 From Martin Pool <mbp@samba.org>:
10996 * server.c (gdbserver_usage): New function.
10999 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11001 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11002 stop_at -> stop_pc.
11004 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11006 * Makefile.in: Remove obsolete code.
11008 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11010 * linux-low.c (regsets_fetch_inferior_registers),
11011 (regsets_store_inferior_registers): Removed cast to int from
11013 * regcache.h: Added declaration of struct inferior_info.
11015 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11017 * inferiors.c (struct inferior_info): Add regcache_data.
11018 (add_inferior): Call create_register_cache.
11019 (clear_inferiors): Call free_register_cache.
11020 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11021 * regcache.c (struct inferior_regcache_data): New.
11022 (registers): Remove.
11023 (get_regcache): New function.
11024 (create_register_cache, free_register_cache): New functions.
11025 (set_register_cache): Don't initialize the register cache here.
11026 (registers_to_string, registers_from_string, register_data): Call
11028 * regcache.h: Add prototypes.
11029 * server.h: Likewise.
11031 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11033 * mem-break.c: New file.
11034 * mem-break.h: New file.
11035 * Makefile.in: Add mem-break.o rule; update server.h
11037 * inferiors.c (struct inferior_info): Add target_data
11039 (clear_inferiors): Free target_data member if set.
11040 (inferior_target_data, set_inferior_target_data): New functions.
11041 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11042 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11043 * linux-low.c (linux_bp_reinsert): New variable.
11044 (struct inferior_linux_data): New.
11045 (linux_create_inferior): Use set_inferior_target_data.
11046 (linux_attach): Likewise. Call add_inferior.
11047 (linux_wait_for_one_inferior): New function.
11048 (linux_wait): Call it.
11049 (linux_write_memory): Add const.
11050 (initialize_low): Call set_breakpoint_data.
11051 * linux-low.h (struct linux_target_ops): Add breakpoint
11053 * server.c (attach_inferior): Remove extra add_inferior
11055 * server.h: Include mem-break.h. Update inferior.c
11057 * target.c (read_inferior_memory)
11058 (write_inferior_memory): New functions.
11059 * target.h (read_inferior_memory)
11060 (write_inferior_memory): Change macros to prototypes.
11061 (struct target_ops): Update comments. Add const to write_memory
11064 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11066 * linux-low.c (usr_store_inferior_registers): Support
11067 registers which are allowed to fail to store.
11068 * linux-low.h (linux_target_ops): Likewise.
11069 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11070 (ppc_cannot_store_register): FPSCR may not be storable.
11072 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11074 * server.h: Include <string.h> if HAVE_STRING_H.
11075 * ChangeLog: Correct paths in last ChangeLog entry.
11077 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11079 * linux-low.h: Remove obsolete prototypes.
11080 (struct linux_target_ops): New.
11081 (extern the_low_target): New.
11082 * linux-low.c (num_regs, regmap): Remove declarations.
11083 (register_addr): Use the_low_target explicitly.
11084 (fetch_register): Likewise.
11085 (usr_fetch_inferior_registers): Likewise.
11086 (usr_store_inferior_registers): Likewise.
11087 * linux-arm-low.c (num_regs): Remove.
11088 (arm_num_regs): Define.
11089 (arm_regmap): Renamed from regmap, made static.
11090 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11092 (arm_cannot_store_register): Renamed from cannot_store_register,
11094 (the_low_target): New.
11095 * linux-i386-low.c (num_regs): Remove.
11096 (i386_num_regs): Define.
11097 (i386_regmap): Renamed from regmap, made static.
11098 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11100 (i386_cannot_store_register): Renamed from cannot_store_register,
11102 (the_low_target): New.
11103 * linux-ia64-low.c (num_regs): Remove.
11104 (ia64_num_regs): Define.
11105 (ia64_regmap): Renamed from regmap, made static.
11106 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11108 (ia64_cannot_store_register): Renamed from cannot_store_register,
11110 (the_low_target): New.
11111 * linux-m68k-low.c (num_regs): Remove.
11112 (m68k_num_regs): Define.
11113 (m68k_regmap): Renamed from regmap, made static.
11114 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11116 (m68k_cannot_store_register): Renamed from cannot_store_register,
11118 (the_low_target): New.
11119 * linux-mips-low.c (num_regs): Remove.
11120 (mips_num_regs): Define.
11121 (mips_regmap): Renamed from regmap, made static.
11122 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11124 (mips_cannot_store_register): Renamed from cannot_store_register,
11126 (the_low_target): New.
11127 * linux-ppc-low.c (num_regs): Remove.
11128 (ppc_num_regs): Define.
11129 (ppc_regmap): Renamed from regmap, made static.
11130 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11132 (ppc_cannot_store_register): Renamed from cannot_store_register,
11134 (the_low_target): New.
11135 * linux-s390-low.c (num_regs): Remove.
11136 (s390_num_regs): Define.
11137 (s390_regmap): Renamed from regmap, made static.
11138 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11140 (s390_cannot_store_register): Renamed from cannot_store_register,
11142 (the_low_target): New.
11143 * linux-sh-low.c (num_regs): Remove.
11144 (sh_num_regs): Define.
11145 (sh_regmap): Renamed from regmap, made static.
11146 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11148 (sh_cannot_store_register): Renamed from cannot_store_register,
11150 (the_low_target): New.
11151 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11152 (the_low_target): New.
11154 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11156 * Makefile.in: Add stamp-h target.
11157 * configure.in: Create stamp-h.
11158 * configure: Regenerated.
11160 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11162 * inferiors.c: New file.
11163 * target.c: New file.
11164 * target.h: New file.
11165 * Makefile.in: Add target.o and inferiors.o. Update
11167 * linux-low.c (inferior_pid): New static variable,
11168 moved from server.c.
11169 (linux_create_inferior): Renamed from create_inferior.
11170 Call add_inferior. Return 0 on success instead of a PID.
11171 (linux_attach): Renamed from myattach.
11172 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11173 (linux_thread_alive): Renamed from mythread_alive.
11174 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11176 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11177 (regsets_store_inferior_registers): Correct error message.
11178 Add missing ``return 0''.
11179 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11180 (linux_store_registers): Renamed from store_inferior_registers.
11181 (linux_read_memory): Renamed from read_inferior_memory.
11182 (linux_write_memory): Renamed from write_inferior_memory.
11183 (linux_target_ops): New structure.
11184 (initialize_low): Call set_target_ops ().
11185 * remote-utils.c (unhexify): New function.
11186 (hexify): New function.
11187 (input_interrupt): Send signals to ``signal_pid''.
11188 * server.c (inferior_pid): Remove.
11189 (start_inferior): Update create_inferior call.
11190 (attach_inferior): Call add_inferior.
11191 (handle_query): New function.
11192 (main): Call handle_query for `q' packets.
11193 * server.h: Include "target.h". Remove obsolete prototypes.
11194 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11196 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11198 * Makefile.in: Add WARN_CFLAGS. Update configury
11200 * configure.in: Check for <string.h>
11201 * configure: Regenerate.
11202 * config.in: Regenerate.
11203 * gdbreplay.c: Include needed system headers.
11204 (remote_open): Remove strchr prototype.
11205 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11206 * regcache.c (supply_register): Change buf argument to const void *.
11207 (supply_register_by_name): Likewise.
11208 (collect_register): Change buf argument to void *.
11209 (collect_register_by_name): Likewise.
11210 * regcache.h: Add missing prototypes.
11211 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11212 * server.c (handle_query): New function.
11213 (attached): New static variable, moved out of main.
11214 (main): Quiet longjmp clobber warnings.
11215 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11216 * utils.c (error): Remove NORETURN.