1 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4 Remove HAVE_PTRACE_GETREGS conditionals.
5 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8 2015-05-08 Yao Qi <yao.qi@linaro.org>
10 * linux-low.c (linux_supports_conditional_breakpoints): New
12 (linux_target_ops): Install new target method.
13 * lynx-low.c (lynx_target_ops): Install NULL hook for
14 supports_conditional_breakpoints.
15 * nto-low.c (nto_target_ops): Likewise.
16 * spu-low.c (spu_target_ops): Likewise.
17 * win32-low.c (win32_target_ops): Likewise.
18 * server.c (handle_query): Check
19 target_supports_conditional_breakpoints.
20 * target.h (struct target_ops) <supports_conditional_breakpoints>:
22 (target_supports_conditional_breakpoints): New macro.
24 2015-05-06 Pedro Alves <palves@redhat.com>
27 * server.c (start_inferior): If the process exits, mourn it.
29 2015-04-21 Gary Benson <gbenson@redhat.com>
31 * hostio.c (fileio_open_flags_to_host): Factored out to
32 fileio_to_host_openflags in common/fileio.c. Single use
35 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
37 * linux-xtensa-low.c (xtensa_fill_gregset)
38 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
41 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
43 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
44 (regs_info): Replace usrregs pointer with NULL.
46 2015-04-17 Gary Benson <gbenson@redhat.com>
48 * target.h (struct target_ops) <pid_to_exec_file>: New field.
49 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
50 * server.c (handle_qxfer_exec_file): New function.
51 (qxfer_packets): Add exec-file entry.
52 (handle_query): Report qXfer:exec-file:read as supported packet.
54 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
56 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
58 2015-04-09 Gary Benson <gbenson@redhat.com>
60 * hostio-errno.c (errno_to_fileio_error): Remove function.
61 Update caller to use remote_fileio_to_fio_error.
63 2015-04-09 Yao Qi <yao.qi@linaro.org>
65 * linux-low.c (linux_insert_point): Call
66 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
67 (linux_remove_point): Call remove_memory_breakpoint if type is
69 * linux-x86-low.c (x86_insert_point): Don't call
70 insert_memory_breakpoint.
71 (x86_remove_point): Don't call remove_memory_breakpoint.
73 2015-04-01 Pedro Alves <palves@redhat.com>
74 Cleber Rosa <crosa@redhat.com>
76 * server.c (gdbserver_usage): Reorganize and extend the usage
79 2015-03-24 Pedro Alves <palves@redhat.com>
81 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
82 output. Also dump TRAP_TRACE.
83 (linux_low_filter_event): In debug output, distinguish a
84 resume_stop SIGSTOP from a delayed SIGSTOP.
86 2015-03-24 Gary Benson <gbenson@redhat.com>
88 * linux-x86-low.c (x86_linux_new_thread): Moved to
90 (x86_linux_prepare_to_resume): Likewise.
92 2015-03-24 Gary Benson <gbenson@redhat.com>
94 * Makefile.in (x86-linux-dregs.o): New rule.
95 * configure.srv: Add x86-linux-dregs.o to relevant targets.
96 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
97 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
98 (x86_linux_dr_get): Likewise.
99 (x86_linux_dr_set): Likewise.
100 (update_debug_registers_callback): Likewise.
101 (x86_linux_dr_set_addr): Likewise.
102 (x86_linux_dr_get_addr): Likewise.
103 (x86_linux_dr_set_control): Likewise.
104 (x86_linux_dr_get_control): Likewise.
105 (x86_linux_dr_get_status): Likewise.
106 (x86_linux_update_debug_registers): Likewise.
108 2015-03-24 Gary Benson <gbenson@redhat.com>
110 * linux-x86-low.c (x86_linux_update_debug_registers):
111 New function, factored out from...
112 (x86_linux_prepare_to_resume): ...this.
114 2015-03-24 Gary Benson <gbenson@redhat.com>
116 * linux-x86-low.c (x86_linux_dr_get): Update comments.
117 (x86_linux_dr_set): Likewise.
118 (update_debug_registers_callback): Likewise.
119 (x86_linux_dr_set_addr): Likewise.
120 (x86_linux_dr_get_addr): Likewise.
121 (x86_linux_dr_set_control): Likewise.
122 (x86_linux_dr_get_control): Likewise.
123 (x86_linux_dr_get_status): Likewise.
124 (x86_linux_prepare_to_resume): Likewise.
126 2015-03-24 Gary Benson <gbenson@redhat.com>
128 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
129 Use perror_with_name. Pass string through gettext.
130 (x86_linux_dr_set): Likewise.
132 2015-03-24 Gary Benson <gbenson@redhat.com>
134 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
135 (x86_linux_dr_set_addr): ...this.
136 (x86_dr_low_get_addr): Rename to...
137 (x86_linux_dr_get_addr): ...this.
138 (x86_dr_low_set_control): Rename to...
139 (x86_linux_dr_set_control): ...this.
140 (x86_dr_low_get_control): Rename to...
141 (x86_linux_dr_get_control): ...this.
142 (x86_dr_low_get_status): Rename to...
143 (x86_linux_dr_get_status): ...this.
144 (x86_dr_low): Update with new function names.
146 2015-03-24 Gary Benson <gbenson@redhat.com>
148 * Makefile.in (x86-linux.o): New rule.
149 * configure.srv: Add x86-linux.o to relevant targets.
150 * linux-low.c (lwp_set_arch_private_info): New function.
151 (lwp_arch_private_info): Likewise.
152 * linux-x86-low.c: Include nat/x86-linux.h.
153 (arch_lwp_info): Removed structure.
154 (update_debug_registers_callback):
155 Use lwp_set_debug_registers_changed.
156 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
157 and lwp_set_debug_registers_changed.
158 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
160 2015-03-24 Gary Benson <gbenson@redhat.com>
162 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
163 * linux-arm-low.c (arm_new_thread): Likewise.
164 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
165 * linux-mips-low.c (mips_linux_new_thread): Likewise.
166 * linux-x86-low.c (x86_linux_new_thread): Likewise.
167 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
169 2015-03-24 Gary Benson <gbenson@redhat.com>
171 * linux-low.c (ptid_of_lwp): New function.
172 (lwp_is_stopped): Likewise.
173 (lwp_stop_reason): Likewise.
174 * linux-x86-low.c (update_debug_registers_callback):
176 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
179 2015-03-24 Gary Benson <gbenson@redhat.com>
181 * linux-low.h (linux_stop_lwp): Remove declaration.
183 2015-03-24 Gary Benson <gbenson@redhat.com>
185 * linux-low.h: Include nat/linux-nat.h.
186 * linux-low.c (iterate_over_lwps_args): New structure.
187 (iterate_over_lwps_filter): New function.
188 (iterate_over_lwps): Likewise.
189 * linux-x86-low.c (update_debug_registers_callback):
190 Update signature to what iterate_over_lwps expects.
191 Remove PID check that iterate_over_lwps now performs.
192 (x86_dr_low_set_addr): Use iterate_over_lwps.
193 (x86_dr_low_set_control): Likewise.
195 2015-03-24 Gary Benson <gbenson@redhat.com>
197 * linux-x86-low.c (x86_debug_reg_state): New function.
198 (x86_linux_prepare_to_resume): Use the above.
200 2015-03-24 Gary Benson <gbenson@redhat.com>
202 * linux-low.c (current_lwp_ptid): New function.
203 * linux-x86-low.c: Include nat/linux-nat.h.
204 (x86_dr_low_get_addr): Use current_lwp_ptid.
205 (x86_dr_low_get_control): Likewise.
206 (x86_dr_low_get_status): Likewise.
208 2015-03-20 Pedro Alves <palves@redhat.com>
210 * tracepoint.c (cmd_qtstatus): Make "str" const.
212 2015-03-20 Pedro Alves <palves@redhat.com>
214 * server.c (handle_general_set): Make "req_str" const.
216 2015-03-19 Pedro Alves <palves@redhat.com>
218 * linux-low.c (linux_resume_one_lwp): Rename to ...
219 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
220 instead call perror_with_name.
221 (check_ptrace_stopped_lwp_gone): New function.
222 (linux_resume_one_lwp): Reimplement as wrapper around
223 linux_resume_one_lwp_throw that swallows errors if the LWP is
226 2015-03-19 Pedro Alves <palves@redhat.com>
228 * linux-low.c (count_events_callback, select_event_lwp_callback):
229 No longer check whether the thread has resume_stop as last resume
232 2015-03-19 Pedro Alves <palves@redhat.com>
234 * linux-low.c (count_events_callback, select_event_lwp_callback):
235 Use the lwp's status_pending_p field, not the thread's.
237 2015-03-19 Pedro Alves <palves@redhat.com>
239 * linux-low.c (select_event_lwp_callback): Update comments to
240 no longer mention SIGTRAP.
242 2015-03-18 Gary Benson <gbenson@redhat.com>
244 * server.c (handle_query): Do not report vFile:fstat as supported.
246 2015-03-11 Gary Benson <gbenson@redhat.com>
248 * hostio.c (sys/types.h): New include.
249 (sys/stat.h): Likewise.
250 (common-remote-fileio.h): Likewise.
251 (handle_fstat): New function.
252 (handle_vFile): Handle vFile:fstat packets.
254 2015-03-11 Gary Benson <gbenson@redhat.com>
256 * configure.ac (AC_CHECK_MEMBERS): Add checks for
257 struct stat.st_blocks and struct stat.st_blksize.
258 * configure: Regenerate.
259 * config.in: Likewise.
260 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
261 (OBS): Add common-remote-fileio.o.
262 (common-remote-fileio.o): New rule.
264 2015-03-09 Pedro Alves <palves@redhat.com>
266 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
267 'struct sockaddr' pointer in 'accept' call.
269 2015-03-09 Pedro Alves <palves@redhat.com>
272 2015-03-07 Pedro Alves <palves@redhat.com>
273 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
274 or <winsock2.h> here. Instead include "gdb_socket.h".
275 (remote_open): Use union gdb_sockaddr_u.
276 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
277 or <winsock2.h> here. Instead include "gdb_socket.h".
278 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
279 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
281 (init_named_socket, gdb_agent_helper_thread): Use union
284 2015-03-07 Pedro Alves <palves@redhat.com>
286 * configure.ac (build_warnings): Move
287 -Wdeclaration-after-statement to the C-specific set.
288 * configure: Regenerate.
290 2015-03-07 Pedro Alves <palves@redhat.com>
292 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
293 or <winsock2.h> here. Instead include "gdb_socket.h".
294 (remote_open): Use union gdb_sockaddr_u.
295 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
296 or <winsock2.h> here. Instead include "gdb_socket.h".
297 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
298 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
300 (init_named_socket, gdb_agent_helper_thread): Use union
303 2015-03-07 Pedro Alves <palves@redhat.com>
305 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
308 2015-03-06 Yao Qi <yao.qi@linaro.org>
310 * linux-aarch64-low.c (aarch64_insert_point): Use
311 show_debug_regs as a boolean.
312 (aarch64_remove_point): Likewise.
314 2015-03-05 Pedro Alves <palves@redhat.com>
316 * lynx-low.c (lynx_target_ops): Install NULL hooks for
317 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
318 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
319 * nto-low.c (nto_target_ops): Likewise.
320 * spu-low.c (spu_target_ops): Likewise.
321 * win32-low.c (win32_target_ops): Likewise.
323 2015-03-04 Pedro Alves <palves@redhat.com>
325 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
326 Decide whether a breakpoint triggered based on the SIGTRAP's
328 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
329 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
330 (linux_low_filter_event): Check for breakpoints before checking
332 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
334 (linux_stopped_by_sw_breakpoint)
335 (linux_supports_stopped_by_sw_breakpoint)
336 (linux_stopped_by_hw_breakpoint)
337 (linux_supports_stopped_by_hw_breakpoint): New functions.
338 (linux_target_ops): Install new target methods.
340 2015-03-04 Pedro Alves <palves@redhat.com>
342 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
343 * server.c (swbreak_feature, hwbreak_feature): New globals.
344 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
345 (captured_main): Clear swbreak_feature and hwbreak_feature.
346 * server.h (swbreak_feature, hwbreak_feature): Declare.
347 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
348 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
349 supports_stopped_by_hw_breakpoint>: New fields.
350 (target_supports_stopped_by_sw_breakpoint)
351 (target_stopped_by_sw_breakpoint)
352 (target_supports_stopped_by_hw_breakpoint)
353 (target_stopped_by_hw_breakpoint): Declare.
355 2015-03-04 Pedro Alves <palves@redhat.com>
357 enum lwp_stop_reason -> enum target_stop_reason
358 * linux-low.c (check_stopped_by_breakpoint): Adjust.
359 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
360 (linux_wait_1, stuck_in_jump_pad_callback)
361 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
362 (linux_stopped_by_watchpoint):
363 * linux-low.h (enum lwp_stop_reason): Delete.
364 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
365 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
367 2015-03-04 Yao Qi <yao.qi@linaro.org>
369 * Makefile.in (SFILES): Add linux-aarch64-low.c.
371 2015-03-03 Gary Benson <gbenson@redhat.com>
373 * hostio.c (handle_vFile): Fix prefix lengths.
375 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
377 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
380 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
382 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
383 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
384 (clean): Add "rm -f" for above C files.
385 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
386 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
387 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
388 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
389 * linux-s390-low.c (HWCAP_S390_VX): New macro.
390 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
391 (init_registers_s390x_vx_linux64)
392 (init_registers_s390x_tevx_linux64)
393 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
394 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
396 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
397 (s390_store_vxrs_high): New functions.
398 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
400 (s390_arch_setup): Add logic for selecting one of the new target
401 descriptions. Activate the new vector regsets if applicable.
402 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
403 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
404 and init_registers_s390x_tevx_linux64.
406 2015-03-01 Pedro Alves <palves@redhat.com>
408 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
411 2015-02-27 Pedro Alves <palves@redhat.com>
413 * linux-x86-low.c (u_debugreg_offset): New function.
414 (x86_linux_dr_get, x86_linux_dr_set): Use it.
416 2015-02-27 Pedro Alves <palves@redhat.com>
418 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
419 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
420 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
421 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
422 (ps_lsetfpregs, ps_getpid)
423 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
424 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
425 (ps_lsetxregs, ps_plog): Declare.
427 2015-02-27 Pedro Alves <palves@redhat.com>
429 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
430 IP_AGENT_EXPORT_FUNC.
431 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
432 IP_AGENT_EXPORT_FUNC.
433 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
434 (IP_AGENT_EXPORT): Delete.
435 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
436 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
437 (gdb_trampoline_buffer_error, collecting, gdb_collect)
438 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
439 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
440 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
441 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
442 (traceframe_read_count, traceframe_write_count)
443 (traceframes_created, trace_state_variables, get_raw_reg)
444 (get_trace_state_variable_value, set_trace_state_variable_value)
445 (ust_loaded, helper_thread_id, cmd_buf): Use
446 IPA_SYM_EXPORTED_NAME.
447 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
448 (tracepoints) Use IP_AGENT_EXPORT_VAR.
449 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
450 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
451 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
452 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
453 EXTERN_C_PUSH/EXTERN_C_POP.
454 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
455 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
456 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
457 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
458 (traceframe_write_count, traceframe_read_count)
459 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
460 (about_to_request_buffer_space, get_trace_state_variable_value)
461 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
462 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
463 EXTERN_C_PUSH/EXTERN_C_POP.
464 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
465 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
466 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
467 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
468 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
469 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
470 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
471 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
473 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
474 (IP_AGENT_EXPORT_VAR_DECL): Define.
476 (gdb_agent_get_raw_reg): Declare.
478 2015-02-27 Tom Tromey <tromey@redhat.com>
479 Pedro Alves <palves@redhat.com>
481 Rename symbols whose names are reserved C++ keywords throughout.
483 2015-02-27 Pedro Alves <palves@redhat.com>
485 * Makefile.in (COMPILER): New, get it from autoconf.
486 (CXX): Get from autoconf instead.
487 (COMPILE.pre): Use COMPILER.
488 (CC-LD): Rename to ...
489 (CC_LD): ... this. Use COMPILER.
490 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
491 (CXX_FOR_TARGET): Default to g++ instead of gcc.
492 * acinclude.m4: Include build-with-cxx.m4.
493 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
494 Disable -Werror by default if building in C++ mode.
495 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
496 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
497 the C++ compiler. Save/restore CXXFLAGS too.
498 * configure: Regenerate.
500 2015-02-27 Pedro Alves <palves@redhat.com>
502 * acinclude.m4: Include libiberty.m4.
503 * configure.ac: Call libiberty_INIT.
504 * config.in, configure: Regenerate.
506 2015-02-26 Pedro Alves <palves@redhat.com>
508 * linux-low.c (linux_wait_1): When incrementing the PC past a
509 program breakpoint always use the_low_target.breakpoint_len as
510 increment, rather than the maximum between that and
511 the_low_target.decr_pc_after_break.
513 2015-02-23 Pedro Alves <palves@redhat.com>
515 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
516 thread was doing a step-over; always adjust the PC if
517 we stepped over a permanent breakpoint.
518 (linux_wait_1): If we stepped over breakpoint that was on top of a
519 permanent breakpoint, manually advance the PC past it.
521 2015-02-23 Pedro Alves <palves@redhat.com>
523 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
525 (x86_fill_gregset, x86_store_gregset): Use it when handling
528 2015-02-20 Pedro Alves <palves@redhat.com>
530 * thread-db.c: Include "nat/linux-procfs.h".
531 (thread_db_init): Skip listing new threads if the kernel supports
532 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
534 2015-02-20 Pedro Alves <palves@redhat.com>
536 * linux-low.c (status_pending_p_callback): Use ptid_match.
538 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
541 * linux-low.c (wstatus_maybe_breakpoint): Remove.
542 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
543 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
545 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
548 * tracepoint.c (cmd_qtinit): Add check for current_thread.
550 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
552 * linux-low.c (linux_low_btrace_conf): Print size.
553 * server.c (handle_btrace_conf_general_set): New.
554 (hanle_general_set): Call handle_btrace_conf_general_set.
555 (handle_query): Report Qbtrace-conf:bts:size as supported.
557 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
559 * linux-low.c (linux_low_enable_btrace): Update parameters.
560 (linux_low_btrace_conf): New.
561 (linux_target_ops)<to_btrace_conf>: Initialize.
562 * server.c (current_btrace_conf): New.
563 (handle_btrace_enable): Rename to ...
564 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
565 to target_enable_btrace. Update comment. Update users.
566 (handle_qxfer_btrace_conf): New.
567 (qxfer_packets): Add btrace-conf entry.
568 (handle_query): Report qXfer:btrace-conf:read as supported packet.
569 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
570 (target_ops)<read_btrace_conf>: New.
571 (target_enable_btrace): Update parameters.
572 (target_read_btrace_conf): New.
574 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
576 * server.c (handle_btrace_general_set): Remove call to
577 target_supports_btrace.
578 (supported_btrace_packets): New.
579 (handle_query): Call supported_btrace_packets.
580 * target.h: include btrace-common.h.
581 (btrace_target_info): Removed.
582 (supports_btrace, target_supports_btrace): Update parameters.
584 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
586 * Makefile.in (SFILES): Add common/btrace-common.c.
587 (OBS): Add common/btrace-common.o.
588 (btrace-common.o): Add build rules.
589 * linux-low: Include btrace-common.h.
590 (linux_low_read_btrace): Use struct btrace_data. Call
591 btrace_data_init and btrace_data_fini.
593 2015-02-06 Pedro Alves <palves@redhat.com>
595 * thread-db.c (find_new_threads_callback): Add debug output.
597 2015-02-04 Pedro Alves <palves@redhat.com>
599 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
600 (resume_stopped_resumed_lwps): New function.
601 (linux_wait_for_event_filtered): Use it.
603 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
605 * Makefile.in (SFILES): Add linux-personality.c.
606 (linux-personality.o): New rule.
607 * configure.srv (srv_linux_obj): Add linux-personality.o to the
608 list of objects to be built.
609 * linux-low.c: Include nat/linux-personality.h.
610 (linux_create_inferior): Remove code to disable address space
611 randomization (moved to ../nat/linux-personality.c). Create
612 cleanup to disable address space randomization.
614 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
616 * Makefile.in (posix-strerror.o): New rule.
617 (mingw-strerror.o): Likewise.
618 * configure: Regenerated.
619 * configure.ac: Source file ../common/common.host. Initialize new
620 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
622 2015-01-14 Yao Qi <yao@codesourcery.com>
624 * Makefile.in (SFILES): Add nat/ppc-linux.c.
625 (ppc-linux.o): New rule.
626 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
627 * configure.ac: AC_CHECK_FUNCS(getauxval).
628 * config.in: Re-generated.
629 * configure: Re-generated.
630 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
631 ppc64_64bit_inferior_p
633 2015-01-14 Yao Qi <yao@codesourcery.com>
635 * linux-ppc-low.c: Include "nat/ppc-linux.h".
636 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
637 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
638 (PT_ORIG_R3, PT_TRAP): Likewise.
639 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
640 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
641 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
643 2015-01-10 Joel Brobecker <brobecker@adacore.com>
645 * i387-fp.c (i387_cache_to_xsave): In look over
646 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
647 zmmh_low_space field by use of zmmh_high_space.
649 2015-01-09 Pedro Alves <palves@redhat.com>
651 * linux-low.c (step_over_bkpt): Move higher up in the file.
652 (handle_extended_wait): Don't store the stop_pc here.
653 (get_stop_pc): Adjust comments and rename to ...
654 (check_stopped_by_breakpoint): ... this. Record whether the LWP
655 stopped for a software breakpoint or hardware breakpoint.
656 (thread_still_has_status_pending_p): New function.
657 (status_pending_p_callback): Use
658 thread_still_has_status_pending_p. If the event is no longer
659 interesting, resume the LWP.
660 (handle_tracepoints): Add assert.
661 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
662 (wstatus_maybe_breakpoint): New function.
663 (cancel_breakpoint): Delete function.
664 (check_stopped_by_watchpoint): New function, factored out from
665 linux_low_filter_event.
666 (lp_status_maybe_breakpoint): Delete function.
667 (linux_low_filter_event): Remove filter_ptid argument.
668 Leave thread group exits pending here. Store the LWP's stop PC.
669 Always leave events pending.
670 (linux_wait_for_event_filtered): Pull all events out of the
671 kernel, and leave them all pending.
672 (count_events_callback, select_event_lwp_callback): Consider all
674 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
675 (select_event_lwp): Only give preference to the stepping LWP in
676 all-stop mode. Adjust comments.
677 (ignore_event): New function.
678 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
679 references to cancel_breakpoints. Adjust to renames. Also give
680 equal priority to all LWPs that have had events in non-stop mode.
681 If reporting a software breakpoint event, unadjust the LWP's PC.
682 (linux_wait): If linux_wait_1 returned an ignored event, retry.
683 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
685 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
686 (resume_status_pending_p): Use thread_still_has_status_pending_p.
687 (linux_stopped_by_watchpoint): Adjust.
688 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
689 * linux-low.h (enum lwp_stop_reason): New.
690 (struct lwp_info) <stop_pc>: Adjust comment.
691 <stopped_by_watchpoint>: Delete field.
692 <stop_reason>: New field.
693 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
694 * mem-break.c (software_breakpoint_inserted_here)
695 (hardware_breakpoint_inserted_here): New function.
696 * mem-break.h (software_breakpoint_inserted_here)
697 (hardware_breakpoint_inserted_here): Declare.
698 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
699 (cancel_breakpoints): Delete.
700 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
701 (upload_fast_traceframes): Remove references to
704 2015-01-09 Pedro Alves <palves@redhat.com>
706 * thread-db.c (find_new_threads_callback): Ignore thread if the
707 kernel thread ID is -1.
709 2015-01-09 Pedro Alves <palves@redhat.com>
711 * linux-low.c (linux_attach_fail_reason_string): Move to
712 nat/linux-ptrace.c, and rename.
713 (linux_attach_lwp): Update comment.
714 (attach_proc_task_lwp_callback): New function.
715 (linux_attach): Adjust to rename and use
716 linux_proc_attach_tgid_threads.
717 (linux_attach_fail_reason_string): Delete declaration.
719 2015-01-01 Joel Brobecker <brobecker@adacore.com>
721 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
722 * server.c (gdbserver_version): Likewise.
724 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
726 * remote-utils.c: Include ctype.h.
727 (input_interrupt): Explicitly handle the case when the char
728 received is the NUL byte. Improve the printing of non-ASCII
731 2014-12-16 Joel Brobecker <brobecker@adacore.com>
733 * linux-low.c (linux_low_filter_event): Update call to
734 linux_enable_event_reporting following the addition of
735 a new parameter to that function.
737 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
740 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
741 (AARCH64_FPCR_REGNO): Likewise.
742 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
743 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
744 (aarch64_store_fpregset): Likewise.
746 2014-12-15 Joel Brobecker <brobecker@adacore.com>
748 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
749 Remove FIXME comment about assumption about N.
751 2014-12-13 Joel Brobecker <brobecker@adacore.com>
753 * configure.ac: If large-file support is disabled in GDBserver,
754 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
755 * configure: Regenerate.
757 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
759 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
760 warning upon ENODATA from ptrace.
761 * linux-s390-low.c (s390_store_tdb): New.
762 (s390_regsets): Add regset for NT_S390_TDB.
764 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
766 * linux-low.c (regsets_store_inferior_registers): Skip regsets
767 without a fill_function.
768 * linux-s390-low.c (s390_fill_last_break): Remove.
769 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
770 (s390_arch_setup): Use regset's size instead of fill_function for
773 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
775 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
776 the regset's store function when ptrace returned an error.
777 * regcache.c (get_thread_regcache): Invalidate register cache
778 before fetching inferior's registers.
780 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
782 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
783 while-loop as for-loop.
784 (regsets_store_inferior_registers): Likewise.
786 2014-11-28 Yao Qi <yao@codesourcery.com>
788 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
789 * config.in, configure: Re-generate.
790 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
793 2014-11-21 Yao Qi <yao@codesourcery.com>
795 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
796 (AC_CHECK_HEADERS): Remove malloc.h.
797 * configure: Re-generated.
798 * config.in: Re-generated.
799 * server.h: Don't include alloca.h and malloc.h.
800 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
801 Don't include malloc.h.
803 2014-11-17 Joel Brobecker <brobecker@adacore.com>
805 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
806 corresponding ERRNO check in same block.
808 2014-11-12 Pedro Alves <palves@redhat.com>
810 * server.c (cont_thread): Update comment.
811 (start_inferior, attach_inferior): No longer clear cont_thread.
812 (handle_v_cont): No longer set cont_thread.
813 (captured_main): Clear cont_thread each time a GDB connects.
815 2014-11-12 Pedro Alves <palves@redhat.com>
817 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
818 thread, and don't resume all threads if the Hc thread has exited.
820 2014-11-12 Pedro Alves <palves@redhat.com>
822 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
823 the process group instead of to a specific LWP.
825 2014-10-15 Pedro Alves <palves@redhat.com>
828 * win32-arm-low.c (arm_set_thread_context): Remove current_event
830 (arm_set_thread_context): Delete.
831 (the_low_target): Adjust.
832 * win32-i386-low.c (debug_registers_changed)
833 (debug_registers_used): Delete.
834 (update_debug_registers_callback): New function.
835 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
836 needing to update their debug registers.
837 (win32_get_current_dr): New function.
838 (x86_dr_low_get_addr, x86_dr_low_get_control)
839 (x86_dr_low_get_status): Fetch the debug register from the thread
841 (i386_initial_stuff): Adjust.
842 (i386_get_thread_context): Remove current_event parameter. Don't
843 clear debug_registers_changed nor copy DR values to
845 (i386_set_thread_context): Delete.
846 (i386_prepare_to_resume): New function.
847 (i386_thread_added): Mark the thread as needing to update irs
849 (the_low_target): Remove i386_set_thread_context and install
850 i386_prepare_to_resume.
851 * win32-low.c (win32_get_thread_context): Adjust.
852 (win32_set_thread_context): Use SetThreadContext
854 (win32_prepare_to_resume): New function.
855 (win32_require_context): New function, factored out from ...
856 (thread_rec): ... this.
857 (continue_one_thread): Call win32_prepare_to_resume on each thread
858 we're about to continue.
859 (win32_resume): Call win32_prepare_to_resume on the event thread.
860 * win32-low.h (struct win32_thread_info)
861 <debug_registers_changed>: New field.
862 (struct win32_target_ops): Change prototype of set_thread_context,
863 delete set_thread_context and add prepare_to_resume.
864 (win32_require_context): New declaration.
866 2014-10-08 Gary Benson <gbenson@redhat.com>
868 * server.h: Do not include common-exceptions.h.
870 2014-10-08 Gary Benson <gbenson@redhat.com>
872 * server.h: Do not include cleanups.h.
874 2014-09-30 James Hogan <james.hogan@imgtec.com>
876 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
879 2014-09-23 Yao Qi <yao@codesourcery.com>
881 * linux-low.c (lp_status_maybe_breakpoint): New function.
882 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
883 (count_events_callback): Likewise.
884 (select_event_lwp_callback): Likewise.
885 (cancel_breakpoints_callback): Likewise.
887 2014-09-19 Don Breazeal <donb@codesourcery.com>
889 * linux-low.c (handle_extended_wait): Call
890 linux_ptrace_get_extended_event.
891 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
892 linux_is_extended_waitstatus.
894 2014-09-16 Joel Brobecker <brobecker@adacore.com>
896 * Makefile.in (CPPFLAGS): Define.
897 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
898 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
900 2014-09-16 Gary Benson <gbenson@redhat.com>
902 * inferiors.h (current_inferior): Renamed as...
903 (current_thread): New variable. All uses updated.
904 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
905 (maybe_move_out_of_jump_pad): Likewise.
906 (cancel_breakpoint): Likewise.
907 (linux_low_filter_event): Likewise.
908 (wait_for_sigstop): Likewise.
909 (linux_resume_one_lwp): Likewise.
910 (need_step_over_p): Likewise.
911 (start_step_over): Likewise.
912 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
913 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
914 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
915 and save_inferior as saved_thread.
916 * regcache.c (get_thread_regcache): Renamed saved_inferior as
918 (regcache_invalidate_thread): Likewise.
919 * remote-utils.c (prepare_resume_reply): Likewise.
920 * thread-db.c (thread_db_get_tls_address): Likewise.
921 (disable_thread_event_reporting): Likewise.
922 (remove_thread_event_breakpoints): Likewise.
923 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
925 * target.h (set_desired_inferior): Renamed as...
926 (set_desired_thread): New declaration. All uses updated.
927 * server.c (myresume): Updated comment to reference thread instead
929 (handle_serial_event): Likewise.
930 (handle_target_event): Likewise.
932 2014-09-12 Tom Tromey <tromey@redhat.com>
933 Gary Benson <gbenson@redhat.com>
935 * regcache.h: Include common-regcache.h.
936 (regcache_read_pc): Don't declare.
937 * regcache.c (get_thread_regcache_for_ptid): New function.
939 2014-09-11 Tom Tromey <tromey@redhat.com>
940 Gary Benson <gbenson@redhat.com>
942 * symbol.c: New file.
943 * Makefile.in (SFILES): Add symbol.c.
946 2014-09-11 Gary Benson <gbenson@redhat.com>
948 * target.c (target_stop_ptid, target_continue_ptid): New
951 2014-09-11 Tom Tromey <tromey@redhat.com>
952 Gary Benson <gbenson@redhat.com>
954 * target.h: Include target/target.h.
955 * target.c (target_read_memory, target_read_uint32)
956 (target_write_memory): New functions.
958 2014-09-11 Gary Benson <gbenson@redhat.com>
960 * server.h (debug_hw_points): Don't declare.
961 * server.c (debug_hw_points): Don't define. Replace all uses
962 with show_debug_regs.
963 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
964 all uses with show_debug_regs.
966 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
968 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
969 endianness into account.
970 (ppc_supply_ptrace_register): Likewise.
972 2014-09-03 James Hogan <james.hogan@imgtec.com>
974 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
975 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
977 2014-09-03 Gary Benson <gbenson@redhat.com>
979 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
980 ALL_DEBUG_ADDRESS_REGISTERS.
982 2014-09-02 Gary Benson <gbenson@redhat.com>
984 * i386-low.h: Renamed as...
985 * x86-low.h: New file. All type, function and variable name
986 prefixes changed from "i386_" to "x86_". All references updated.
987 * i386-low.c: Renamed as...
988 * x86-low.c: New file. All type, function and variable name
989 prefixes changed from "i386_" to "x86_". All references updated.
991 2014-09-02 Gary Benson <gbenson@redhat.com>
993 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
994 (x86_linux_new_thread): Likewise.
996 2014-08-29 Gary Benson <gbenson@redhat.com>
998 * server.h (setjmp.h): Do not include.
999 (toplevel): Do not declare.
1000 (common-exceptions.h): Include.
1001 (cleanups.h): Likewise.
1002 * server.c (toplevel): Do not define.
1003 (exit_code): New static global.
1004 (detach_or_kill_for_exit_cleanup): New function.
1005 (main): New function. Original main renamed to...
1006 (captured_main): New function.
1007 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1009 2014-08-29 Gary Benson <gbenson@redhat.com>
1011 * Makefile.in (SFILES): Add common/common-exceptions.c.
1012 (OBS): Add common-exceptions.o.
1013 (common-exceptions.o): New rule.
1014 * utils.c (prepare_to_throw_exception): New function.
1016 2014-08-29 Gary Benson <gbenson@redhat.com>
1018 * config.in: Regenerate.
1019 * configure: Likewise.
1021 2014-08-29 Gary Benson <gbenson@redhat.com>
1023 * Makefile.in (SFILES): Add common/cleanups.c.
1025 (cleanups.o): New rule.
1027 2014-08-29 Gary Benson <gbenson@redhat.com>
1029 * utils.c (internal_vwarning): New function.
1031 2014-08-28 Gary Benson <gbenson@redhat.com>
1033 * utils.h (fatal): Remove declaration.
1034 * utils.c (fatal): Remove function.
1036 2014-08-28 Gary Benson <gbenson@redhat.com>
1038 * tracepoint.c (gdb_agent_init): Replace fatal with
1040 (initialize_tracepoint): Likewise.
1042 2014-08-28 Gary Benson <gbenson@redhat.com>
1044 * remote-utils.c (remote_prepare): Replace fatal with error.
1046 2014-08-28 Gary Benson <gbenson@redhat.com>
1048 * linux-low.c (linux_async): Replace fatal with warning.
1050 (linux_start_non_stop): Return -1 if linux_async failed.
1052 2014-08-28 Gary Benson <gbenson@redhat.com>
1054 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1056 (i386_dr_low_get_addr): Remove vague comment.
1057 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1060 2014-08-28 Gary Benson <gbenson@redhat.com>
1062 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1063 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1065 (linux_resume_one_lwp): Likewise.
1066 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1068 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1069 with internal_error.
1070 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1071 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1072 (find_register_by_name): Replace fatal with internal_error.
1073 (find_regno): Likewise.
1074 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1075 * thread-db.c (thread_db_create_event): Likewise.
1076 (thread_db_load_search): Likewise.
1077 (try_thread_db_load_1): Likewise.
1078 * tracepoint.c (get_jump_space_head): Replace fatal with
1080 (claim_trampoline_space): Likewise.
1081 (have_fast_tracepoint_trampoline_buffer): Likewise.
1082 (cmd_qtstart): Likewise.
1083 (stop_tracing): Likewise.
1084 (fast_tracepoint_collecting): Likewise.
1085 (target_malloc): Likewise.
1086 (download_tracepoint): Likewise.
1087 (download_trace_state_variables): Replace check with gdb_assert.
1088 (upload_fast_traceframes): Replace fatal with internal_error.
1090 2014-08-19 Tom Tromey <tromey@redhat.com>
1091 Gary Benson <gbenson@redhat.com>
1093 * Makefile.in (SFILES): Add common/common-debug.c.
1094 (OBS): Add common-debug.o.
1095 (common-debug.o): New rule.
1096 * debug.h (debug_printf): Don't declare.
1097 * debug.c (debug_printf): Renamed and rewritten as...
1098 (debug_vprintf): New function.
1100 2014-08-19 Gary Benson <gbenson@redhat.com>
1102 * utils.h: Do not include print-utils.h.
1104 2014-08-19 Tom Tromey <tromey@redhat.com>
1105 Gary Benson <gbenson@redhat.com>
1107 * server.h: Add static assertion.
1108 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1110 2014-08-19 Tom Tromey <tromey@redhat.com>
1111 Gary Benson <gbenson@redhat.com>
1113 * Makefile.in (SFILES): Add common/errors.c.
1114 (OBS): Add errors.o.
1115 (IPA_OBS): Add errors-ipa.o.
1116 (errors.o): New rule.
1117 (errors-ipa.o): Likewise.
1118 * utils.h (perror_with_name, error, warning): Don't declare.
1119 * utils.c (warning): Renamed and rewritten as...
1120 (vwarning): New function.
1121 (error): Renamed and rewritten as...
1122 (verror): New function.
1123 (internal_error): Renamed and rewritten as...
1124 (internal_verror): New function.
1126 2014-08-07 Gary Benson <gbenson@redhat.com>
1128 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1129 * configure: Regenerate.
1130 * config.in: Likewise.
1131 * server.h: Do not include errno.h.
1132 * event-loop.c: Likewise.
1133 * hostio-errno.c: Likewise.
1134 * linux-low.c: Likewise.
1135 * remote-utils.c: Likewise.
1136 * spu-low.c: Likewise.
1137 * utils.c: Likewise.
1138 * gdbreplay.c: Unconditionally include errno.h.
1140 2014-08-07 Gary Benson <gbenson@redhat.com>
1142 * server.h: Do not include string.h.
1143 * event-loop.c: Likewise.
1144 * linux-low.c: Likewise.
1145 * regcache.c: Likewise.
1146 * remote-utils.c: Likewise.
1147 * spu-low.c: Likewise.
1148 * utils.c: Likewise.
1150 2014-08-07 Gary Benson <gbenson@redhat.com>
1152 * server.h: Do not include gdb_assert.h.
1154 2014-08-07 Gary Benson <gbenson@redhat.com>
1156 * server.h: Do not include common-utils.h.
1158 2014-08-07 Gary Benson <gbenson@redhat.com>
1160 * server.h: Do not include ptid.h.
1161 * notif.h: Likewise.
1163 2014-08-07 Gary Benson <gbenson@redhat.com>
1165 * server.h: Do not include gdb_locale.h.
1167 2014-08-07 Gary Benson <gbenson@redhat.com>
1169 * server.h: Do not include gdb/signals.h.
1170 * win32-low.c: Likewise.
1172 2014-08-07 Gary Benson <gbenson@redhat.com>
1174 * server.h: Do not include pathmax.h.
1176 2014-08-07 Gary Benson <gbenson@redhat.com>
1178 * server.h: Do not include libiberty.h.
1179 * linux-bfin-low.c: Likewise.
1181 2014-08-07 Gary Benson <gbenson@redhat.com>
1183 * server.h: Do not include ansidecl.h.
1185 2014-08-07 Gary Benson <gbenson@redhat.com>
1187 * linux-x86-low.c: Do not include stddef.h.
1188 * lynx-ppc-low.c: Likewise.
1189 * tracepoint.c: Likewise.
1191 2014-08-07 Gary Benson <gbenson@redhat.com>
1193 * server.h: Do not include stdarg.h.
1194 * nto-low.c: Likewise.
1196 2014-08-07 Gary Benson <gbenson@redhat.com>
1198 * server.h: Do not include stdlib.h.
1199 * inferiors.c: Likewise.
1200 * linux-low.c: Likewise.
1201 * regcache.c: Likewise.
1202 * spu-low.c: Likewise.
1203 * tracepoint.c: Likewise.
1204 * utils.c: Likewise.
1206 2014-08-07 Gary Benson <gbenson@redhat.com>
1208 * server.h: Do not include stdio.h.
1209 * linux-low.c: Likewise.
1210 * remote-utils.c: Likewise.
1211 * spu-low.c: Likewise.
1212 * utils.c: Likewise.
1213 * wincecompat.c: Likewise.
1215 2014-08-06 Gary Benson <gbenson@redhat.com>
1217 * regcache.c (init_register_cache): Move conditionals inside if.
1219 2014-08-06 Gary Benson <gbenson@redhat.com>
1221 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1223 2014-07-31 Gary Benson <gbenson@redhat.com>
1225 * ax.h: Do not include server.h.
1226 * gdbthread.h: Likewise.
1227 * lynx-low.h: Likewise.
1228 * notif.h: Likewise.
1230 2014-07-30 Gary Benson <gbenson@redhat.com>
1232 * server.h: Include common-defs.h.
1233 Do not include config.h or build-gnulib-gdbserver/config.h.
1235 2014-07-30 Gary Benson <gbenson@redhat.com>
1237 * hostio-errno.c: Move server.h to top of includes list.
1238 * inferiors.c: Likewise.
1239 * linux-x86-low.c: Likewise.
1240 * notif.c: Include server.h.
1242 2014-07-24 Tom Tromey <tromey@redhat.com>
1243 Gary Benson <gbenson@redhat.com>
1245 * server.h (CORE_ADDR): Now unsigned.
1247 2014-07-16 Pedro Alves <palves@redhat.com>
1249 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1251 2014-07-15 Pedro Alves <palves@redhat.com>
1253 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1256 2014-07-11 Pedro Alves <palves@redhat.com>
1258 * linux-low.c (kill_wait_lwp): New function, based on
1259 kill_one_lwp_callback, but use my_waitpid directly.
1260 (kill_one_lwp_callback, linux_kill): Use it.
1262 2014-06-23 Pedro Alves <palves@redhat.com>
1264 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1265 before setting DR0..DR3.
1267 2014-06-20 Gary Benson <gbenson@redhat.com>
1269 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1270 * configure: Regenerated.
1271 * config.in: Likewise.
1273 2014-06-20 Gary Benson <gbenson@redhat.com>
1275 * Makefile.in (SFILES): Update locations for files moved
1277 (object file files): Reordered.
1279 2014-06-20 Gary Benson <gbenson@redhat.com>
1281 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1282 (i386_dr_low_set_addr): Likewise.
1283 (i386_dr_low_get_addr): Likewise.
1284 (i386_dr_low_can_set_control): Likewise.
1285 (i386_dr_low_set_control): Likewise.
1286 (i386_dr_low_get_control): Likewise.
1287 (i386_dr_low_get_status): Likewise.
1288 (i386_get_debug_register_length): Likewise.
1289 * linux-x86-low.c (i386_dr_low_set_addr):
1290 Changed signature. Made static.
1291 (i386_dr_low_get_addr): Likewise.
1292 (i386_dr_low_set_control): Likewise.
1293 (i386_dr_low_get_control): Likewise.
1294 (i386_dr_low_get_status): Likewise.
1295 (i386_dr_low): New global variable.
1296 * win32-i386-low.c (i386_dr_low_set_addr):
1297 Changed signature. Made static.
1298 (i386_dr_low_get_addr): Likewise.
1299 (i386_dr_low_set_control): Likewise.
1300 (i386_dr_low_get_control): Likewise.
1301 (i386_dr_low_get_status): Likewise.
1302 (i386_dr_low): New global variable.
1304 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1306 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1307 * Makefile.in (AR, AR_FLAGS): Define.
1308 * configure: Regenerate.
1310 2014-06-19 Gary Benson <gbenson@redhat.com>
1312 * Makefile.in (i386-dregs.o): New rule.
1313 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1314 * i386-low.c (target.h): Remove include.
1315 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1316 (DR_CONTROL_SHIFT): Likewise.
1317 (DR_CONTROL_SIZE): Likewise.
1318 (DR_RW_EXECUTE): Likewise.
1319 (DR_RW_WRITE): Likewise.
1320 (DR_RW_READ): Likewise.
1321 (DR_RW_IORW): Likewise.
1322 (DR_LEN_1): Likewise.
1323 (DR_LEN_2): Likewise.
1324 (DR_LEN_4): Likewise.
1325 (DR_LEN_8): Likewise.
1326 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1327 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1328 (DR_ENABLE_SIZE): Likewise.
1329 (DR_LOCAL_SLOWDOWN): Likewise.
1330 (DR_GLOBAL_SLOWDOWN): Likewise.
1331 (DR_CONTROL_RESERVED): Likewise.
1332 (I386_DR_CONTROL_MASK): Likewise.
1333 (I386_DR_VACANT): Likewise.
1334 (I386_DR_LOCAL_ENABLE): Likewise.
1335 (I386_DR_GLOBAL_ENABLE): Likewise.
1336 (I386_DR_DISABLE): Likewise.
1337 (I386_DR_SET_RW_LEN): Likewise.
1338 (I386_DR_GET_RW_LEN): Likewise.
1339 (I386_DR_WATCH_HIT): Likewise.
1340 (i386_wp_op_t): Likewise.
1341 (i386_show_dr): Likewise.
1342 (i386_length_and_rw_bits): Likewise.
1343 (i386_insert_aligned_watchpoint): Likewise.
1344 (i386_remove_aligned_watchpoint): Likewise.
1345 (i386_handle_nonaligned_watchpoint): Likewise.
1346 i386_update_inferior_debug_regs(): Likewise.
1347 (i386_dr_insert_watchpoint): Likewise.
1348 (i386_dr_remove_watchpoint): Likewise.
1349 (i386_dr_region_ok_for_watchpoint): Likewise.
1350 (i386_dr_stopped_data_address): Likewise.
1351 (i386_dr_stopped_by_watchpoint): Likewise.
1353 2014-06-19 Gary Benson <gbenson@redhat.com>
1355 * i386-low.c (i386_dr_show): Renamed to
1356 i386_show_dr and made static. All uses updated.
1357 (i386_dr_length_and_rw_bits): Renamed to
1358 i386_length_and_rw_bits and made static.
1360 (i386_dr_insert_aligned_watchpoint): Renamed to
1361 i386_insert_aligned_watchpoint and made static.
1363 (i386_dr_remove_aligned_watchpoint): Renamed to
1364 i386_remove_aligned_watchpoint and made static.
1366 (i386_dr_update_inferior_debug_regs): Renamed to
1367 i386_update_inferior_debug_regs and made static.
1370 2014-06-18 Gary Benson <gbenson@redhat.com>
1372 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1373 (i386_dr_low_can_set_control): Likewise.
1374 (i386_get_debug_register_length): Likewise.
1375 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1376 (i386_dr_low_can_set_control): Likewise.
1377 (i386_get_debug_register_length): Likewise.
1379 2014-06-17 Gary Benson <gbenson@redhat.com>
1381 * i386-low.h (i386-dregs.h): New include.
1382 (DR_FIRSTADDR): Now in i386-dregs.h.
1383 (DR_LASTADDR): Likewise.
1384 (DR_NADDR): Likewise.
1385 (DR_STATUS): Likewise.
1386 (DR_CONTROL): Likewise.
1387 (i386_debug_reg_state): Likewise.
1388 (i386_dr_insert_watchpoint): Likewise.
1389 (i386_dr_remove_watchpoint): Likewise.
1390 (i386_dr_region_ok_for_watchpoint): Likewise.
1391 (i386_dr_stopped_data_address): Likewise.
1392 (i386_dr_stopped_by_watchpoint): Likewise.
1393 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1395 2014-06-18 Gary Benson <gbenson@redhat.com>
1397 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1398 i386_dr_insert_watchpoint.
1399 (i386_low_remove_watchpoint): Renamed to
1400 i386_dr_remove_watchpoint.
1401 (i386_low_region_ok_for_watchpoint): Renamed to
1402 i386_dr_region_ok_for_watchpoint.
1403 (i386_low_stopped_data_address): Renamed to
1404 i386_dr_stopped_data_address.
1405 (i386_low_stopped_by_watchpoint): Renamed to
1406 i386_dr_stopped_by_watchpoint.
1407 * i386-low.c (i386_show_dr): Renamed to
1408 i386_dr_show and made nonstatic. All uses updated.
1409 (i386_length_and_rw_bits): Renamed to
1410 i386_dr_length_and_rw_bits and made nonstatic.
1412 (i386_insert_aligned_watchpoint): Renamed to
1413 i386_dr_insert_aligned_watchpoint and made nonstatic.
1415 (i386_remove_aligned_watchpoint): Renamed to
1416 i386_dr_remove_aligned_watchpoint and made nonstatic.
1418 (i386_update_inferior_debug_regs): Renamed to
1419 i386_dr_update_inferior_debug_regs and made nonstatic.
1421 (i386_low_insert_watchpoint): Renamed to
1422 i386_dr_insert_watchpoint. All uses updated.
1423 (i386_low_remove_watchpoint): Renamed to
1424 i386_dr_remove_watchpoint. All uses updated.
1425 (i386_low_region_ok_for_watchpoint): Renamed to
1426 i386_dr_region_ok_for_watchpoint. All uses updated.
1427 (i386_low_stopped_data_address): Renamed to
1428 i386_dr_stopped_data_address. All uses updated.
1429 (i386_low_stopped_by_watchpoint): Renamed to
1430 i386_dr_stopped_by_watchpoint. All uses updated.
1432 2014-06-18 Gary Benson <gbenson@redhat.com>
1434 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1435 (i386_dr_low_can_set_control): Likewise.
1436 (i386_insert_aligned_watchpoint): New check.
1438 2014-06-18 Gary Benson <gbenson@redhat.com>
1440 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1443 2014-06-18 Gary Benson <gbenson@redhat.com>
1445 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1446 instead of fatal and error.
1447 (i386_handle_nonaligned_watchpoint): Likewise.
1449 2014-06-18 Gary Benson <gbenson@redhat.com>
1451 * i386-low.c (i386_get_debug_register_length): New macro.
1452 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1453 (i386_show_dr): Use debug_printf instead of fprintf. Use
1454 phex to format values.
1456 2014-06-18 Gary Benson <gbenson@redhat.com>
1458 * i386-low.h: Comment changes.
1459 * i386-low.c: Likewise.
1461 2014-06-18 Gary Benson <gbenson@redhat.com>
1463 * i386-low.c: Whitespace changes.
1465 2014-06-12 Tom Tromey <tromey@redhat.com>
1467 * utils.c (freeargv): Remove.
1469 2014-06-12 Tom Tromey <tromey@redhat.com>
1471 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1472 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1473 (parse_debug_format_options): Likewise.
1474 (gdbserver_usage): Likewise.
1475 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1476 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1477 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1479 ($(LIBGNU)): Depend on libiberty.
1480 (all-lib): Recurse into all subdirs.
1481 (install-only): Invoke "install" target in subdirs.
1482 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1484 * configure: Rebuild.
1485 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1486 for vasprintf, vsnprintf, or gettimeofday.
1487 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1490 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1492 * development.sh: Delete.
1493 * Makefile.in (config.status): Adjust dependency on development.sh.
1494 * configure.ac: Adjust development.sh source call.
1495 * configure: Regenerate.
1497 2014-06-02 Pedro Alves <palves@redhat.com>
1499 * ax.c (gdb_free_agent_expr): New function.
1500 * ax.h (gdb_free_agent_expr): New declaration.
1501 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1503 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1505 (clear_breakpoint_conditions_and_commands): New function.
1506 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1507 (clear_breakpoint_conditions_and_commands): New declaration.
1509 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1511 * linux-aarch64-low.c (asm/ptrace.h): Include.
1513 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1515 Fix TLS access for -static -pthread.
1516 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1517 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1518 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1520 2014-05-20 Pedro Alves <palves@redhat.com>
1522 * linux-aarch64-low.c (aarch64_insert_point)
1523 (aarch64_remove_point): No longer check whether the type is
1524 supported here. Adjust to new interface.
1525 (the_low_target): Install aarch64_supports_z_point_type as
1526 supports_z_point_type method.
1527 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1528 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1529 instead of a Z packet char. Adjust.
1530 (arm_supports_z_point_type): New function.
1531 (arm_insert_point, arm_remove_point): Adjust to new interface.
1532 (the_low_target): Install arm_supports_z_point_type.
1533 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1534 (cris_insert_point, cris_remove_point): Adjust to new interface.
1535 Don't check whether the type is supported here.
1536 (the_low_target): Install cris_supports_z_point_type.
1537 * linux-low.c (linux_supports_z_point_type): New function.
1538 (linux_insert_point, linux_remove_point): Adjust to new interface.
1539 * linux-low.h (struct linux_target_ops) <insert_point,
1540 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1541 raw_breakpoint pointer parameter.
1542 <supports_z_point_type>: New method.
1543 * linux-mips-low.c (mips_supports_z_point_type): New function.
1544 (mips_insert_point, mips_remove_point): Adjust to new interface.
1545 Use mips_supports_z_point_type.
1546 (the_low_target): Install mips_supports_z_point_type.
1547 * linux-ppc-low.c (the_low_target): Install NULL as
1548 supports_z_point_type method.
1549 * linux-s390-low.c (the_low_target): Install NULL as
1550 supports_z_point_type method.
1551 * linux-sparc-low.c (the_low_target): Install NULL as
1552 supports_z_point_type method.
1553 * linux-x86-low.c (x86_supports_z_point_type): New function.
1554 (x86_insert_point): Adjust to new insert_point interface. Use
1555 insert_memory_breakpoint. Adjust to new
1556 i386_low_insert_watchpoint interface.
1557 (x86_remove_point): Adjust to remove_point interface. Use
1558 remove_memory_breakpoint. Adjust to new
1559 i386_low_remove_watchpoint interface.
1560 (the_low_target): Install x86_supports_z_point_type.
1561 * lynx-low.c (lynx_target_ops): Install NULL as
1562 supports_z_point_type callback.
1563 * nto-low.c (nto_supports_z_point_type): New.
1564 (nto_insert_point, nto_remove_point): Adjust to new interface.
1565 (nto_target_ops): Install nto_supports_z_point_type.
1566 * mem-break.c: Adjust intro comment.
1567 (struct raw_breakpoint) <raw_type, size>: New fields.
1568 <inserted>: Update comment.
1569 <shlib_disabled>: Delete field.
1570 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1571 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1572 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1573 (raw_bkpt_type_to_target_hw_bp_type): New function.
1574 (find_enabled_raw_code_breakpoint_at): New function.
1575 (find_raw_breakpoint_at): New type and size parameters. Use them.
1576 (insert_memory_breakpoint): New function, based off
1577 set_raw_breakpoint_at.
1578 (remove_memory_breakpoint): New function.
1579 (set_raw_breakpoint_at): Reimplement.
1580 (set_breakpoint): New, based on set_breakpoint_at.
1581 (set_breakpoint_at): Reimplement.
1582 (delete_raw_breakpoint): Go through the_target->remove_point
1583 instead of assuming memory breakpoints.
1584 (find_gdb_breakpoint_at): Delete.
1585 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1586 (find_gdb_breakpoint): New function.
1587 (set_gdb_breakpoint_at): Delete.
1588 (z_type_supported): New function.
1589 (set_gdb_breakpoint_1): New function, loosely based off
1590 set_gdb_breakpoint_at.
1591 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1592 (delete_gdb_breakpoint_at): Delete.
1593 (delete_gdb_breakpoint_1): New function, loosely based off
1594 delete_gdb_breakpoint_at.
1595 (delete_gdb_breakpoint): New function.
1596 (clear_gdb_breakpoint_conditions): Rename to ...
1597 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1599 (add_condition_to_breakpoint): Make static.
1600 (add_breakpoint_condition): Take a struct breakpoint pointer
1601 instead of an address. Adjust.
1602 (gdb_condition_true_at_breakpoint): Rename to ...
1603 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1605 (gdb_condition_true_at_breakpoint): Reimplement.
1606 (add_breakpoint_commands): Take a struct breakpoint pointer
1607 instead of an address. Adjust.
1608 (gdb_no_commands_at_breakpoint): Rename to ...
1609 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1610 parameter. Return true if no breakpoint was found. Change debug
1612 (gdb_no_commands_at_breakpoint): Reimplement.
1613 (run_breakpoint_commands): Rename to ...
1614 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1615 and change return type to boolean.
1616 (run_breakpoint_commands): New function.
1617 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1618 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1619 breakpoint. Go through the_target->remove_point instead of
1620 assuming memory breakpoint.
1621 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1622 software and hardware breakpoints.
1623 (reinsert_raw_breakpoint): Go through the_target->insert_point
1624 instead of assuming memory breakpoint.
1625 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1626 software and hardware breakpoints.
1627 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1628 Check both software and hardware breakpoints.
1629 (validate_inserted_breakpoint): Assert the breakpoint is a
1630 software breakpoint. Set the inserted flag to -1 instead of
1631 setting shlib_disabled.
1632 (delete_disabled_breakpoints): Adjust.
1633 (validate_breakpoints): Only validate software breakpoints.
1634 Adjust to inserted flag change.
1635 (check_mem_read, check_mem_write): Skip breakpoint types other
1636 than software breakpoints. Adjust to inserted flag change.
1637 * mem-break.h (enum raw_bkpt_type): New enum.
1638 (raw_breakpoint, struct process_info): Forward declare.
1639 (Z_packet_to_target_hw_bp_type): Delete declaration.
1640 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1641 (set_gdb_breakpoint, delete_gdb_breakpoint)
1642 (clear_breakpoint_conditions): New declarations.
1643 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1644 (breakpoint_inserted_here): Update comment.
1645 (add_breakpoint_condition, add_breakpoint_commands): Replace
1646 address parameter with a breakpoint pointer parameter.
1647 (gdb_breakpoint_here): Update comment.
1648 (delete_gdb_breakpoint_at): Delete.
1649 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1650 * server.c (process_point_options): Take a struct breakpoint
1651 pointer instead of an address. Adjust.
1652 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1653 delete_gdb_breakpoint.
1654 * spu-low.c (spu_target_ops): Install NULL as
1655 supports_z_point_type method.
1656 * target.h: Include mem-break.h.
1657 (struct target_ops) <prepare_to_access_memory>: Update comment.
1658 <supports_z_point_type>: New field.
1659 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1660 instead of a char. Also take a raw breakpoint pointer.
1661 * win32-arm-low.c (the_low_target): Install NULL as
1662 supports_z_point_type.
1663 * win32-i386-low.c (i386_supports_z_point_type): New function.
1664 (i386_insert_point, i386_remove_point): Adjust to new interface.
1665 (the_low_target): Install i386_supports_z_point_type.
1666 * win32-low.c (win32_supports_z_point_type): New function.
1667 (win32_insert_point, win32_remove_point): Adjust to new interface.
1668 (win32_target_ops): Install win32_supports_z_point_type.
1669 * win32-low.h (struct win32_target_ops):
1670 <supports_z_point_type>: New method.
1671 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1672 instead of a char. Also take a raw breakpoint pointer.
1674 2014-05-20 Pedro Alves <palves@redhat.com>
1676 * mem-break.h: Include break-common.h.
1677 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1678 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1679 (Z_packet_to_target_hw_bp_type): New declaration.
1680 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1681 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1682 (Z_PACKET_ACCESS_WP): Delete macros.
1683 (Z_packet_to_hw_type): Delete function.
1684 * i386-low.h: Don't include break-common.h here.
1685 (Z_packet_to_hw_type): Delete declaration.
1686 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1687 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1688 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1689 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1690 * linux-aarch64-low.c: Don't include break-common.h here.
1691 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1692 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1693 (Z_packet_to_target_hw_bp_type): Delete function.
1694 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1696 (mips_insert_point, mips_remove_point): Use
1697 Z_packet_to_target_hw_bp_type.
1699 2014-05-20 Pedro Alves <palves@redhat.com>
1701 * linux-aarch64-low.c: Include break-common.h.
1702 (enum target_point_type): Delete.
1703 (Z_packet_to_point_type): Rename to ...
1704 (Z_packet_to_target_hw_bp_type): ... this, and return a
1705 target_hw_bp_type instead.
1706 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1707 instead of an enum target_point_type.
1708 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1710 (aarch64_dr_state_insert_one_point)
1711 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1712 (aarch64_handle_aligned_watchpoint)
1713 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1714 Take an enum target_hw_bp_type instead of an enum
1716 (aarch64_supports_z_point_type): New function.
1717 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1718 use Z_packet_to_target_hw_bp_type.
1720 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1722 * configure.ac: Only use -Werror by default when DEVELOPMENT
1724 * configure: Regenerate.
1726 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1728 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1729 * linux-x86-low.c (X86_64_USER_REGS): New.
1730 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1732 2014-04-28 Yao Qi <yao@codesourcery.com>
1734 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1737 2014-04-25 Pedro Alves <palves@redhat.com>
1740 * linux-low.c (linux_attach_fail_reason_string): New function.
1741 (linux_attach_lwp): Delete.
1742 (linux_attach_lwp_1): Rename to ...
1743 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1744 argument. Remove "initial" parameter. Return int instead of
1745 void. Don't error or warn here.
1746 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1747 failure to attach to the tgid. Call warning when failing to
1749 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1750 argument. Remove "initial" parameter. Return int instead of
1751 void. Don't error or warn here.
1752 (linux_attach_fail_reason_string): New declaration.
1753 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1754 interface change. Use linux_attach_fail_reason_string.
1756 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1757 Walfred Tedeschi <walfred.tedeschi@intel.com>
1759 * Makefile.in: Added rules to handle new files
1760 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1761 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1762 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1763 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1764 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1765 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1767 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1768 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1769 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1770 i386/x32-avx512.xml.
1771 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1772 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1773 i386/x32-avx512-linux.xml.
1774 * i387-fp.c (num_avx512_k_registers): New constant for number
1776 (num_avx512_zmmh_low_registers): New constant for number of
1777 lower ZMM registers (0-15).
1778 (num_avx512_zmmh_high_registers): New constant for number of
1779 higher ZMM registers (16-31).
1780 (num_avx512_ymmh_registers): New contant for number of higher
1781 YMM registers (ymm16-31 added by avx521 on x86_64).
1782 (num_avx512_xmm_registers): New constant for number of higher
1783 XMM registers (xmm16-31 added by AVX512 on x86_64).
1784 (struct i387_xsave): Add space for AVX512 registers.
1785 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1786 Add code to handle AVX512 registers.
1787 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1788 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1789 prototypei from generated file.
1790 (tdesc_amd64_avx512_linux): Likewise.
1791 (init_registers_x32_avx512_linux): Likewise.
1792 (tdesc_x32_avx512_linux): Likewise.
1793 (init_registers_i386_avx512_linux): Likewise.
1794 (tdesc_i386_avx512_linux): Likewise.
1795 (x86_64_regmap): Add AVX512 registers.
1796 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1798 (initialize_low_arch): Add code to initialize AVX512 registers.
1800 2014-04-23 Pedro Alves <palves@redhat.com>
1802 * mem-break.c (find_gdb_breakpoint_at): Make static.
1803 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1805 2014-04-23 Pedro Alves <palves@redhat.com>
1807 * i386-low.c: Don't include break-common.h here.
1808 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1809 prototype to take target_hw_bp_type as argument instead of a Z
1811 * i386-low.h: Include break-common.h here.
1812 (Z_packet_to_hw_type): Declare.
1813 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1815 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1816 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1817 (x86_remove_point): Convert the packet number to a
1818 target_hw_bp_type before calling i386_low_remove_watchpoint.
1819 * win32-i386-low.c (i386_insert_point): Convert the packet number
1820 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1821 (i386_remove_point): Convert the packet number to a
1822 target_hw_bp_type before calling i386_low_remove_watchpoint.
1824 2014-04-23 Pedro Alves <palves@redhat.com>
1826 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1828 2014-04-10 Pedro Alves <palves@redhat.com>
1830 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1831 Check if the condition or command is NULL before checking if the
1832 breakpoint is known. On success, return true.
1833 * mem-break.h (add_breakpoint_condition): Document return.
1834 (add_breakpoint_commands): Add describing comment.
1835 * server.c (skip_to_semicolon): New function.
1836 (process_point_options): Use it.
1838 2014-04-09 Pedro Alves <palves@redhat.com>
1840 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1843 2014-02-27 Pedro Alves <palves@redhat.com>
1846 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1848 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1850 (last_thread_of_process_p): Take a PID argument instead of a
1852 (linux_wait_for_lwp): Delete.
1853 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1855 (linux_low_filter_event): New function, party factored out from
1856 linux_wait_for_event.
1857 (linux_wait_for_event): Rename to ...
1858 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1859 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1860 sigsuspend. Check for zombie leaders.
1861 (linux_wait_for_event): Reimplement as wrapper around
1862 linux_wait_for_event_filtered.
1863 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1864 a normal or signal exit is seen, it's the whole process exiting.
1865 (wait_for_sigstop): No longer a for_each_inferior callback.
1866 Rewrite on top of linux_wait_for_event_filtered.
1867 (stop_all_lwps): Call wait_for_sigstop directly.
1868 * server.c (resume, handle_target_event): Handle
1869 TARGET_WAITKIND_NO_RESUMED.
1871 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1873 * win32-low.c (psapi_get_dll_name,
1874 * win32_CreateToolhelp32Snapshot): Delete.
1875 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1876 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1878 (handle_load_dll): Add function description.
1879 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1881 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1883 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1885 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1886 base address when calling win32_add_one_solib.
1887 (handle_load_dll): Delete local variable load_addr.
1888 Remove 0x1000 offset applied to DLL base address when calling
1889 win32_add_one_solib.
1890 (handle_unload_dll): Add comment.
1892 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1894 * win32-low.c (win32_add_all_dlls): Renames
1895 win32_ensure_ntdll_loaded. Rewrite function documentation.
1896 Adjust implementation to always load all DLLs.
1897 Add 0x1000 offset to DLL base address when calling
1898 win32_add_one_solib.
1899 (child_initialization_done): New static global.
1900 (do_initial_child_stuff): Set child_initialization_done to
1901 zero during child initialization, and 1 after. Replace call
1902 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1904 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1905 (handle_unload_dll): Add function documentation.
1906 (get_child_debug_event): Ignore load and unload DLL events
1907 during child initialization.
1909 2014-02-20 Doug Evans <dje@google.com>
1911 Remove global all_lwps.
1912 * inferiors.h (ptid_of): Move here from linux-low.h.
1913 (pid_of, lwpid_of): Ditto.
1914 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1915 parameter is a struct thread_info * now.
1916 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1917 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1918 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1920 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1921 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1922 * linux-arm-low.c (update_registers_callback): Update, "entry"
1923 parameter is a struct thread_info * now.
1924 Fetch lwpid from current_inferior directly.
1925 (arm_insert_point): Pass &all_threads to find_inferior instead of
1927 (arm_remove_point): Ditto.
1928 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1929 (arm_prepare_to_resume): Fetch pid from thread.
1930 (arm_read_description): Fetch lwpid from current_inferior directly.
1931 * linux-low.c (all_lwps): Delete.
1932 (delete_lwp): Delete call to remove_inferior.
1933 (handle_extended_wait): Fetch lwpid from thread.
1934 (add_lwp): Don't set lwp->entry.id. Remove call to
1935 add_inferior_to_list.
1936 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1937 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1938 (kill_one_lwp_callback): Ditto.
1939 (linux_kill): Don't dereference NULL pointer.
1940 Fetch ptid,lwpid from thread.
1941 (get_detach_signal): Fetch ptid from thread.
1942 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1943 Simplify call to regcache_invalidate_thread.
1944 (delete_lwp_callback): Update, "entry" parameter is a
1945 struct thread_info * now. Fetch pid from thread.
1946 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1947 (status_pending_p_callback): Update, "entry" parameter is a
1948 struct thread_info * now. Fetch ptid from thread.
1949 (find_lwp_pid): Update, "entry" parameter is a
1950 struct thread_info * now.
1951 (linux_wait_for_lwp): Fetch pid from thread.
1952 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1953 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1954 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1955 (dequeue_one_deferred_signal): Ditto.
1956 (cancel_breakpoint): Fetch ptid from current_inferior.
1957 (linux_wait_for_event): Pass &all_threads to find_inferior,
1958 not &all_lwps. Fetch ptid, lwpid from thread.
1959 (count_events_callback): Update, "entry" parameter is a
1960 struct thread_info * now.
1961 (select_singlestep_lwp_callback): Ditto.
1962 (select_event_lwp_callback): Ditto.
1963 (cancel_breakpoints_callback): Ditto.
1964 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1966 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1967 (unsuspend_one_lwp): Update, "entry" parameter is a
1968 struct thread_info * now.
1969 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1971 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1972 Fetch lwpid from thread, not lwp.
1973 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1974 Pass &all_threads to find_inferior, not &all_lwps.
1975 (send_sigstop): Fetch lwpid from thread, not lwp.
1976 (send_sigstop_callback): Update, "entry" parameter is a
1977 struct thread_info * now.
1978 (suspend_and_send_sigstop_callback): Ditto.
1979 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1980 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1981 struct thread_info * now.
1982 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1984 (lwp_running): Update, "entry" parameter is a
1985 struct thread_info * now.
1986 (stop_all_lwps): Fetch ptid from thread.
1987 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1988 (linux_resume_one_lwp): Fetch lwpid from thread.
1989 (linux_set_resume_request): Update, "entry" parameter is a
1990 struct thread_info * now. Fetch pid, lwpid from thread.
1991 (resume_status_pending_p): Update, "entry" parameter is a
1992 struct thread_info * now.
1993 (need_step_over_p): Ditto. Fetch lwpid from thread.
1994 (start_step_over): Fetch lwpid from thread.
1995 (linux_resume_one_thread): Update, "entry" parameter is a
1996 struct thread_info * now. Fetch lwpid from thread.
1997 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1998 (proceed_one_lwp): Update, "entry" parameter is a
1999 struct thread_info * now. Fetch lwpid from thread.
2000 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2001 struct thread_info * now.
2002 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2003 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2004 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2006 (regsets_store_inferior_registers): Ditto.
2007 (fetch_register, store_register): Ditto.
2008 (linux_read_memory, linux_write_memory): Ditto.
2009 (linux_request_interrupt): Ditto.
2010 (linux_read_auxv): Ditto.
2011 (linux_xfer_siginfo): Ditto.
2012 (linux_qxfer_spu): Ditto.
2013 (linux_qxfer_libraries_svr4): Ditto.
2014 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2015 moved to inferiors.h.
2017 (get_thread_lwp): Update.
2018 (struct lwp_info): Delete member "entry". Simplify comment for
2021 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2022 current_inferior directly.
2023 (update_watch_registers_callback): Update, "entry" parameter is a
2024 struct thread_info * now. Fetch pid from thread.
2025 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2026 (mips_insert_point): Fetch lwpid from current_inferior.
2027 Pass &all_threads to find_inferior, not &all_lwps.
2028 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2029 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2031 (mips_stopped_data_address): Ditto.
2032 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2034 * linux-tile-low.c (tile_arch_setup): Ditto.
2035 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2036 (update_debug_registers_callback): Update, "entry" parameter is a
2037 struct thread_info * now. Fetch pid from thread.
2038 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2039 Pass &all_threads to find_inferior, not &all_lwps.
2040 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2041 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2042 Pass &all_threads to find_inferior, not &all_lwps.
2043 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2044 (i386_dr_low_get_status): Ditto.
2045 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2046 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2047 (x86_linux_read_description): Ditto.
2048 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2050 2014-02-20 Doug Evans <dje@google.com>
2052 * inferiors.c (get_first_inferior): Fix buglet.
2054 2014-02-19 Doug Evans <dje@google.com>
2056 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2057 * inferiors.c (add_thread): Change result type to struct thread_info *.
2058 All callers updated.
2059 (add_lwp): Call add_thread here instead of in callers.
2060 All callers updated.
2061 * linux-low.h (get_lwp_thread): Rewrite.
2062 (struct lwp_info): New member "thread".
2064 2014-02-19 Doug Evans <dje@google.com>
2066 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2067 All callers updated.
2069 2014-02-19 Doug Evans <dje@google.com>
2071 * inferiors.c (add_thread): Fix whitespace.
2073 2014-02-19 Doug Evans <dje@google.com>
2075 * dll.c (clear_dlls): Replace accessing list implemention details
2077 * gdbthread.h (get_first_thread): Declare.
2078 * inferiors.c (for_each_inferior_with_data): New function.
2079 (get_first_thread): New function.
2080 (find_thread_ptid): Simplify.
2081 (get_first_inferior): New function.
2082 (clear_list): Delete.
2083 (one_inferior_p): New function.
2084 (clear_inferior_list): New function.
2085 (clear_inferiors): Update.
2086 * inferiors.h (for_each_inferior_with_data): Declare.
2087 (clear_inferior_list): Declare.
2088 (one_inferior_p): Declare.
2089 (get_first_inferior): Declare.
2090 * linux-low.c (linux_wait_for_event): Replace accessing list
2091 implemention details with API function.
2092 * server.c (target_running): Ditto.
2093 (accumulate_file_name_length): New function.
2094 (emit_dll_description): New function.
2095 (handle_qxfer_libraries): Replace accessing list implemention
2096 details with API function.
2097 (handle_qxfer_threads_worker): New function.
2098 (handle_qxfer_threads_proper): Replace accessing list implemention
2099 details with API function.
2100 (handle_query): Ditto.
2101 (visit_actioned_threads_callback_ftype): New typedef.
2102 (visit_actioned_threads_data): New struct.
2103 (visit_actioned_threads): Rewrite to be find_inferior callback.
2104 (resume): Call find_inferior.
2105 (handle_status): Replace accessing list implemention
2106 details with API function.
2107 (process_serial_event): Replace accessing list implemention details
2109 * target.c (set_desired_inferior): Replace accessing list implemention
2110 details with API function.
2111 * tracepoint.c (same_process_p): New function.
2112 (gdb_agent_about_to_close): Replace accessing list implemention
2113 details with API function.
2114 * win32-low.c (child_delete_thread): Replace accessing list
2115 implemention details with API function.
2116 (match_dll_by_basename): New function.
2117 (dll_is_loaded_by_basename): New function.
2118 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2119 details call to dll_is_loaded_by_basename.
2121 2014-02-19 Doug Evans <dje@google.com>
2123 * dll.h (struct dll_info): Add comment.
2124 * gdbthread.h (struct thread_info): Add comment.
2125 (current_ptid): Simplify.
2126 * inferiors.c (add_process): Update.
2127 (remove_process): Update.
2128 * inferiors.h (struct process_info): Rename member "head" to "entry".
2129 * linux-low.c (delete_lwp): Update.
2131 (last_thread_of_process_p): Update.
2132 (kill_one_lwp_callback, linux_kill): Update.
2133 (status_pending_p_callback): Update.
2134 (wait_for_sigstop): Update. Simplify read of ptid.
2135 (start_step_over): Update.
2136 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2137 (get_lwp_thread): Update.
2138 (struct lwp_info): Rename member "head" to "entry".
2139 * regcache.h (inferior_list_entry): Delete.
2140 * server.c (kill_inferior_callback): Update.
2141 (detach_or_kill_inferior_callback): Update.
2142 (print_started_pid): Update.
2143 (print_attached_pid): Update.
2144 (process_serial_event): Simplify read of ptid.
2145 * thread-db.c (thread_db_create_event): Update.
2146 (thread_db_get_tls_address): Update.
2147 * win32-low.c (current_inferior_ptid): Simplify.
2149 2014-02-19 Tom Tromey <tromey@redhat.com>
2151 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2153 (target_supports_btrace): Update.
2155 2014-02-14 Yao Qi <yao@codesourcery.com>
2157 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2158 (rsp-low-ipa.o): New target.
2160 2014-02-12 Tom Tromey <tromey@redhat.com>
2162 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2163 convert_ascii_to_int.
2164 * regcache.c (registers_to_string): Likewise.
2165 * remote-utils.c (decode_M_packet): Likewise.
2166 * server.c (process_serial_event): Likewise.
2168 2014-02-12 Tom Tromey <tromey@redhat.com>
2170 * server.c (handle_query, handle_v_run): Use hex2bin, not
2172 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2174 2014-02-12 Tom Tromey <tromey@redhat.com>
2176 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2177 convert_int_to_ascii.
2178 * regcache.c (registers_to_string, collect_register_as_string):
2180 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2182 * server.c (process_serial_event): Likewise.
2183 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2184 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2186 2014-02-12 Tom Tromey <tromey@redhat.com>
2188 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2189 bin2hex, not hexify.
2190 * tracepoint.c (cmd_qtstatus): Likewise.
2192 2014-02-12 Tom Tromey <tromey@redhat.com>
2194 * remote-utils.c (monitor_output): Pass explicit length to
2197 2014-02-12 Tom Tromey <tromey@redhat.com>
2199 * tracepoint.c: Include rsp-low.h.
2200 * server.c: Include rsp-low.h.
2201 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2202 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2204 * remote-utils.c: Include rsp-low.h.
2205 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2206 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2207 (convert_int_to_ascii, convert_ascii_to_int): Move to
2209 * regcache.c: Include rsp-low.h.
2210 * ax.c: Include rsp-low.h.
2211 * Makefile.in (SFILES): Add common/rsp-low.c.
2212 (OBS): Add rsp-low.o.
2213 (rsp-low.o): New target.
2215 2014-02-12 Tom Tromey <tromey@redhat.com>
2217 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2218 Include print-utils.h.
2219 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2220 (plongest, thirty_two, phex_nz): Remove.
2221 * Makefile.in (SFILES): Add common/print-utils.c.
2222 (OBS): Add print-utils.o.
2223 (print-utils-ipa.o): New target.
2224 (print-utils.o): New target.
2225 (IPA_OBJS): Add print-utils-ipa.o.
2227 2014-02-06 Tom Tromey <tromey@redhat.com>
2229 * Makefile.in (SFILES): Fix indentation.
2231 2014-02-05 Doug Evans <dje@google.com>
2233 * linux-low.c (linux_wait_for_event): Improve comment.
2234 (linux_wait_1): Keep current_inferior in sync with event_child.
2236 2014-01-22 Doug Evans <dje@google.com>
2238 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2240 2014-01-22 Doug Evans <dje@google.com>
2242 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2243 * configure: Regenerate.
2244 * config.in: Regenerate.
2245 * Makefile.in (SFILES): Add debug.c.
2247 * debug.c: New file.
2248 * debug.h: New file.
2249 * linux-aarch64-low.c (*): Update all debugging printfs to use
2250 debug_printf instead of fprintf.
2251 * linux-arm-low.c (*): Ditto.
2252 * linux-cris-low.c (*): Ditto.
2253 * linux-crisv32-low.c (*): Ditto.
2254 * linux-m32r-low.c (*): Ditto.
2255 * linux-sparc-low.c (*): Ditto.
2256 * linux-x86.c (*): Ditto.
2257 * linux-low.c (*): Ditto.
2258 (linux_wait_1): Add calls to debug_enter, debug_exit.
2259 (linux_wait): Remove redundant debugging printf.
2260 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2261 (linux_resume, unstop_all_lwps): Ditto.
2262 * mem-break.c (*): Update all debugging printfs to use
2263 debug_printf instead of fprintf.
2264 * remote-utils.c (*): Ditto.
2265 * thread-db.c (*): Ditto.
2266 * server.c #include <ctype.h>, "gdb_vecs.h".
2267 (debug_threads): Moved to debug.c.
2268 (*): Update all debugging printfs to use debug_printf instead of
2270 (start_inferior): Replace call to fflush with call to debug_flush.
2271 (monitor_show_help): Mention set debug-format.
2272 (parse_debug_format_options): New function.
2273 (handle_monitor_command): Handle "monitor set debug-format".
2274 (gdbserver_usage): Mention --debug-format.
2275 (main): Parse --debug-format.
2276 * server.h (debug_threads): Declaration moved to debug.h.
2278 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2279 trace_debug_1 that uses debug_printf.
2280 (tracepoint_look_up_symbols): Update all debugging printfs to use
2281 debug_printf instead of fprintf.
2283 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2285 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2288 2014-01-17 Pedro Alves <palves@redhat.com>
2291 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2292 defined after including gdb_proc_service.h.
2294 2014-01-16 Doug Evans <dje@google.com>
2296 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2297 (match_dll): Use it.
2299 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2301 * target.h (target_ops) <read_btrace>: Change parameters and
2302 return type to allow error reporting.
2303 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2304 trace reading errors on.
2305 * linux-low.c (linux_low_read_btrace): Pass trace reading
2307 (linux_low_disable_btrace): New.
2309 2014-01-15 Doug Evans <dje@google.com>
2311 * inferiors.c (thread_id_to_gdb_id): Delete.
2312 * inferiors.h (thread_id_to_gdb_id): Delete.
2314 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2316 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2317 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2320 2014-01-08 Pedro Alves <palves@redhat.com>
2322 * server.c (handle_status): Don't discard previous queued stop
2323 replies or thread's pending status here.
2324 (main) <disconnection>: Do it here instead.
2326 2014-01-08 Pedro Alves <palves@redhat.com>
2328 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2329 * server.c (visit_actioned_threads, handle_pending_status): New
2331 (handle_v_cont): Factor out parts to ...
2332 (resume): ... this new function. If in all-stop, and a thread
2333 being resumed has a pending status, report it without actually
2335 (myresume): Adjust to use the new 'resume' function.
2336 (clear_pending_status_callback, set_pending_status_callback)
2337 (find_status_pending_thread_callback): New functions.
2338 (handle_status): Handle the case of multiple threads having
2339 interesting statuses to report. Report threads' real last signal
2340 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2341 with an interesting thread to report the status for, instead of
2342 always reporting the status of the first thread.
2344 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2346 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2347 * gdbreplay.c (gdbreplay_version): Likewise.
2349 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2351 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2352 iov.iov_len with the real length in use.
2354 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2356 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2357 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2358 for all targets that use win32-low.c.
2359 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2360 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2362 2013-12-13 Pedro Alves <palves@redhat.com>
2364 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2365 if equal to TARGET_WAITKIND_LOADED.
2366 * win32-low.c (cached_status): New static global.
2367 (win32_wait): Add declaration.
2368 (do_initial_child_stuff): Flush all initial pending debug events
2369 up to the initial breakpoint.
2370 (win32_wait): If CACHED_STATUS was set, return that instead
2371 of doing a real wait. Remove the code resuming the execution
2372 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2373 during the initial phase. Also remove the code changing
2374 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2375 TARGET_WAITKIND_STOPPED.
2377 2013-12-11 Yao Qi <yao@codesourcery.com>
2379 * notif.c (handle_notif_ack): Return 0 if no notification
2382 2013-11-20 Doug Evans <dje@google.com>
2384 * linux-low.c (linux_set_resume_request): Fix comment.
2386 2013-11-20 Doug Evans <dje@google.com>
2388 * linux-low.c (resume_status_pending_p): Tweak comment.
2390 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2392 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2393 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2394 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2395 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2396 (srv_amd64_regobj): Add amd64-mpx.o.
2397 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2398 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2399 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2400 * i387-fp.c (num_pl_bnd_register) Added constant.
2401 (num_pl_bnd_cfg_registers) Added constant.
2402 (struct i387_xsave) Added reserved area and MPX fields.
2403 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2404 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2406 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2407 (init_registers_amd64_mpx_linux): Declare new function.
2408 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2409 (x86_64_regmap): Add MPX registers.
2410 (x86_linux_read_description): Add MPX case.
2411 (initialize_low_arch): Initialize MPX targets.
2413 2013-11-18 Tom Tromey <tromey@redhat.com>
2415 * configure: Rebuild.
2416 * configure.ac: Don't check for stdlib.h.
2417 * gdbreplay.c: Unconditionally include stdlib.h.
2419 2013-11-18 Tom Tromey <tromey@redhat.com>
2421 * config.in: Rebuild.
2422 * configure: Rebuild.
2423 * configure.ac: Don't use AC_HEADER_DIRENT.
2425 2013-11-18 Tom Tromey <tromey@redhat.com>
2427 * server.h: Don't check HAVE_STRING_H.
2428 * gdbreplay.c: Don't check HAVE_STRING_H.
2429 * configure: Rebuild.
2431 2013-11-18 Tom Tromey <tromey@redhat.com>
2433 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2436 2013-11-08 Tom Tromey <tromey@redhat.com>
2438 * configure, config.in: Rebuild.
2439 * configure.ac: Remove unused configury.
2441 2013-11-08 Tom Tromey <tromey@redhat.com>
2443 * acinclude.m4: Include common.m4, codeset.m4.
2444 * configure, config.in: Rebuild.
2445 * configure.ac: Use GDB_AC_COMMON.
2447 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2449 * linux-s390-low.c (HWCAP_S390_TE): New define.
2450 (s390_arch_setup): Consider the TE field in the HWCAP for
2451 determining 'have_regset_tdb'.
2453 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2456 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2459 2013-10-02 Pedro Alves <palves@redhat.com>
2461 * server.c (process_serial_event): Don't output "GDBserver
2462 exiting" if GDB is connected through stdio.
2463 * target.c (mywait): Likewise, be silent if GDB is connected
2466 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2468 * lynx-low.c (lynx_add_threads_after_attach): New function.
2469 (lynx_attach): Remove call to add_thread. Add call to
2470 lynx_add_threads_after_attach instead.
2472 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2474 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2475 * config.in, configure: Regenerated.
2477 2013-09-18 Yao Qi <yao@codesourcery.com>
2480 * server.c (start_inferior): Clear 'resume_info'.
2482 2013-09-16 Jiong Wang <jiwang@tilera.com>
2484 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2487 2013-09-16 Jiong Wang <jiwang@tilera.com>
2489 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2490 linux-tile-low.o to srv_tgtobj.
2492 2013-09-16 Will Newton <will.newton@linaro.org>
2494 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2497 2013-09-06 Pedro Alves <palves@redhat.com>
2499 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2500 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2501 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2502 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2503 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2504 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2506 2013-09-06 Pedro Alves <palves@redhat.com>
2508 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2509 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2511 2013-09-06 Pedro Alves <palves@redhat.com>
2513 * linux-amd64-ipa.c: Include tracepoint.h.
2514 * linux-i386-ipa.c: Include tracepoint.h.
2516 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2518 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2519 (ps_get_thread_area): New function.
2521 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2523 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2524 (initialize_low_arch): Call init_registers_crisv32 rather than
2525 init_register_crisv32.
2527 2013-09-05 Pedro Alves <palves@redhat.com>
2529 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2531 * hostio.h: ... this new file.
2532 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2533 win32-low.c: Include hostio.h.
2535 2013-09-05 Pedro Alves <palves@redhat.com>
2537 * server.h (gdb_client_data, handler_func, callback_handler_func)
2538 (delete_file_handler, add_file_handler, append_callback_event)
2539 (delete_callback_event, start_event_loop, initialize_event_loop):
2540 Move to event-loop.h and include it.
2541 * event-loop.h: New file.
2543 2013-09-05 Pedro Alves <palves@redhat.com>
2545 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2546 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2547 (loaded_dll, unloaded_dll): Move to ...
2548 * dll.h: ... this new file.
2549 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2551 2013-09-05 Pedro Alves <palves@redhat.com>
2553 * server.h (current_process, get_thread_process, all_processes)
2554 (add_inferior_to_list, for_each_inferior, current_inferior)
2555 (remove_inferior, add_process, remove_process, find_process_pid)
2556 (have_started_inferiors_p, have_attached_inferiors_p)
2557 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2558 (clear_inferiors, find_inferior, find_inferior_id)
2559 (inferior_target_data, set_inferior_target_data)
2560 (inferior_regcache_data, set_inferior_regcache_data): Move to
2561 inferiors.h, and include it.
2562 * inferiors.h: New file.
2564 2013-09-05 Pedro Alves <palves@redhat.com>
2566 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2570 2013-09-05 Pedro Alves <palves@redhat.com>
2572 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2574 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2575 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2576 (handle_tracepoint_general_set, handle_tracepoint_query)
2577 (tracepoint_finished_step, tracepoint_was_hit)
2578 (release_while_stepping_state_list, current_traceframe)
2579 (in_readonly_region, traceframe_read_mem)
2580 (fetch_traceframe_registers, traceframe_read_sdata)
2581 (traceframe_read_info, struct fast_tpoint_collect_status)
2582 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2583 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2584 (supply_fast_tracepoint_registers)
2585 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2586 (ipa_tdesc, claim_trampoline_space)
2587 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2588 (agent_mem_read, agent_get_trace_state_variable_value)
2589 (agent_set_trace_state_variable_value, agent_tsv_read)
2590 (agent_mem_read_string, get_raw_reg_func_addr)
2591 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2592 * tracepoint.h: ... this new file.
2594 2013-09-05 Pedro Alves <palves@redhat.com>
2596 * server.h (perror_with_name, error, fatal, warning, paddress)
2597 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2599 * utils.h: New file.
2601 2013-09-05 Pedro Alves <palves@redhat.com>
2603 * server.h (remote_debug, noack_mode, transport_is_reliable)
2604 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2605 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2606 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2607 (write_enn, initialize_async_io, enable_async_io)
2608 (disable_async_io, check_remote_input_interrupt_request)
2609 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2610 (dead_thread_notify, prepare_resume_reply)
2611 (decode_address_to_semicolon, decode_address, decode_m_packet)
2612 (decode_M_packet, decode_X_packet, decode_xfer_write)
2613 (decode_search_memory_packet, unhexify, hexify)
2614 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2615 (look_up_one_symbol, relocate_instruction)
2616 (monitor_output): Move to remote-utils.h, and include it.
2617 * remote-utils.h: New file.
2619 2013-09-05 Pedro Alves <palves@redhat.com>
2621 * server.h (_): Delete.
2623 2013-09-02 Pedro Alves <palves@redhat.com>
2625 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2626 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2628 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2630 2013-09-02 Pierre Muller <muller@sourceware.org>
2632 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2633 or WriteProcessMemory complete successfully and handle
2634 ERROR_PARTIAL_COPY error.
2636 2013-09-02 Pedro Alves <palves@redhat.com>
2638 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2639 error instead of EIO.
2641 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2644 * linux-low.c: Include filestuff.h.
2645 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2646 * lynx-low.c: Include filestuff.h.
2647 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2648 * server.c: Include filestuff.h.
2649 (main): Call notice_open_fds.
2650 * spu-low.c: Include filestuff.h.
2651 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2653 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2655 * Makefile.in: Explain why ../target and ../nat are not
2656 listed as include file search paths.
2657 (linux-waitpid.o): New object file rule.
2658 * configure.srv (srv_native_linux_obj): New variable.
2659 Replace all occurrences of linux native object files with
2660 $srv_native_linux_obj.
2661 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2662 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2663 (linux_enable_event_reporting): Remove declaration.
2664 (my_waitpid): Moved to common/linux-waitpid.c.
2665 (linux_wait_for_event): Pass ptid when calling
2666 linux_enable_event_reporting.
2667 (linux_supports_tracefork_flag): Remove.
2668 (linux_enable_event_reporting): Likewise.
2669 (linux_tracefork_grandchild): Remove.
2670 (STACK_SIZE): Moved to common/linux-ptrace.c.
2671 (linux_tracefork_child): Remove.
2672 (linux_test_for_tracefork): Remove.
2673 (linux_look_up_symbols): Call linux_supports_traceclone.
2674 (initialize_low): Remove call to linux_test_for_tracefork.
2675 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2676 common/linux-ptrace.h.
2677 (PTRACE_TYPE_ARG4): Likewise.
2678 Include linux-ptrace.h.
2680 2013-08-21 Pedro Alves <palves@redhat.com>
2682 * config.in: Renegerate.
2684 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2686 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2687 (SFILES): Remove $(srcdir)/common/target-common.c and
2688 add $(srcdir)/target/waitstatus.c.
2689 (OBS): Remove target-common.o and add waitstatus.o.
2690 (server_h): Remove $(srcdir)/../common/target-common.h and
2691 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2692 and $(srcdir)/../target/waitstatus.h.
2693 (target-common.o): Remove.
2694 (waitstatus.o): New target object file.
2695 * target.h: Do not include target-common.h and
2696 include target/resume.h, target/wait.h and
2697 target/waitstatus.h.
2699 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2701 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2702 to PTRACE_TYPE_ARG3.
2703 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2704 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2706 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2707 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2709 2013-07-27 Jie Zhang <jie@codesourcery.com>
2710 Daniel Jacobowitz <dan@codesourcery.com>
2711 Yao Qi <yao@codesourcery.com>
2713 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2714 (mips-linux-watch.o): New rule.
2715 (mips_linux_watch_h): New variable.
2716 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2718 * linux-mips-low.c: Include mips-linux-watch.h.
2719 (struct arch_process_info, struct arch_lwp_info): New.
2720 (update_watch_registers_callback): New function.
2721 (mips_linux_new_process, mips_linux_new_thread) New functions.
2722 (mips_linux_prepare_to_resume, mips_insert_point): New
2724 (mips_remove_point, mips_stopped_by_watchpoint): New
2726 (rsp_bp_type_to_target_hw_bp_type): New function.
2727 (mips_stopped_data_address): New function.
2728 (the_low_target): Add watchpoint support functions.
2730 2013-07-27 Yao Qi <yao@codesourcery.com>
2732 * i386-low.c: Include break-common.h.
2733 (enum target_hw_bp_type): Remove.
2735 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2737 * Makefile.in (SFILES): /common/target-common.c.
2738 (OBS): Add target-common.o.
2739 (server_h): Add $(srcdir)/../common/target-common.h.
2740 (target-common.o): New target.
2741 * server.c (queue_stop_reply_callback): Free
2742 status string after use.
2743 * target.c (target_waitstatus_to_string): Remove.
2744 * target.h: Include target-common.h.
2745 (resume_kind): Likewise.
2746 (target_waitkind): Likewise.
2747 (target_waitstatus): Likewise.
2748 (TARGET_WNOHANG): Likewise.
2750 2013-07-04 Yao Qi <yao@codesourcery.com>
2752 * Makefile.in (host_alias): Use @host_noncanonical@.
2753 (target_alias): Use @target_noncanonical@.
2754 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2755 ACX_NONCANONICAL_HOST.
2756 * configure: Regenerated.
2759 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2761 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2762 * configure: Rebuild.
2763 * Makefile.in (version_host, version_target): Get from configure.
2764 (version.c): Use $(version_host) and $(version_target).
2766 2013-07-03 Pedro Alves <palves@redhat.com>
2768 * Makefile.in (config.status): Depend on development.sh.
2769 * acinclude.m4: Include libmcheck.m4.
2770 * configure: Regenerate.
2772 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2774 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2775 attribute inside the parentheses.
2776 (winapi_DebugSetProcessKillOnExit): Ditto.
2777 (winapi_DebugBreakProcess): Ditto.
2778 (winapi_GenerateConsoleCtrlEvent): Ditto.
2780 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2782 * notif.h (notif_event): Add a dummy member to avoid compiler
2785 2013-07-01 Pedro Alves <palves@redhat.com>
2787 * hostio.c (HOSTIO_PATH_MAX): Define.
2788 (require_filename, handle_open, handle_unlink, handle_readlink):
2791 2013-07-01 Pedro Alves <palves@redhat.com>
2793 * server.h: Include "pathmax.h".
2794 * linux-low.c: Don't include sys/param.h.
2795 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2797 * win32-low.c: Don't include sys/param.h.
2798 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2800 2013-07-01 Pedro Alves <palves@redhat.com>
2802 * event-loop.c: Don't check HAVE_UNISTD_H before including
2804 * gdbreplay.c: Likewise.
2805 * remote-utils.c: Likewise.
2806 * server.c: Likewise.
2807 * configure.ac: Don't check for unistd.h.
2808 * configure: Regenerate.
2810 2013-06-28 Tom Tromey <tromey@redhat.com>
2812 * Makefile.in (version.c): Use version.in, not
2815 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2817 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2818 * configure: Rebuild.
2819 * Makefile.in (version_host, version_target): Get from configure.
2820 (version.c): Use $(version_host) and $(version_target).
2822 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2824 Fix trace-status to output user name without trailing colon.
2825 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2827 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2829 Fix trace-status to output proper start-time and stop-time.
2830 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2831 output start time and stop time in hex as gdb expects.
2833 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2835 * tracepoint.c (build_traceframe_info_xml): Output trace state
2836 variables present in the trace buffer.
2838 2013-06-24 Tom Tromey <tromey@redhat.com>
2840 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2842 (version.o): Remove.
2843 * gdbreplay.c: Include version.h.
2844 (version, host_name): Don't declare.
2845 * server.h: Include version.h.
2846 (version, host_name): Don't declare.
2848 2013-06-12 Pedro Alves <palves@redhat.com>
2850 * linux-x86-low.c (linux_is_elf64): Delete global.
2851 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2852 with local linux_pid_exe_is_elf_64_file use.
2854 2013-06-11 Pedro Alves <palves@redhat.com>
2856 * linux-low.c (regset_disabled, disable_regset): New functions.
2857 (regsets_fetch_inferior_registers)
2858 (regsets_store_inferior_registers): Use them.
2859 (initialize_regsets_info); Don't allocate the disabled_regsets
2861 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2864 2013-06-11 Pedro Alves <palves@redhat.com>
2866 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2869 2013-06-11 Pedro Alves <palves@redhat.com>
2871 * linux-x86-low.c (initialize_low_arch): Call
2872 init_registers_x32_avx_linux.
2874 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2876 Fix compatibility with Android Bionic.
2877 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2880 2013-06-07 Pedro Alves <palves@redhat.com>
2883 * Makefile.in (OBS): Add tdesc.o.
2884 (IPA_OBJS): Add tdesc-ipa.o.
2885 (tdesc-ipa.o): New rule.
2886 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2888 * linux-low.c (new_inferior): Delete.
2889 (disabled_regsets, num_regsets): Delete.
2890 (linux_add_process): Adjust to set the new per-process
2892 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2893 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2894 was a stop. When calling arch_setup, switch the current inferior
2895 to the thread that got an event.
2896 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2897 (regsets_fetch_inferior_registers)
2898 (regsets_store_inferior_registers): New regsets_info parameter.
2900 (linux_register_in_regsets): New regs_info parameter. Adjust to
2902 (register_addr, fetch_register, store_register): New usrregs_info
2903 parameter. Adjust to use it.
2904 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2905 parameter regs_info. Adjust to use it.
2906 (linux_fetch_registers): Get the current inferior's regs_info, and
2908 (linux_store_registers): Ditto.
2909 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2910 (initialize_low): Don't initialize the target_regsets here. Call
2911 initialize_low_arch.
2912 * linux-low.h (target_regsets): Delete declaration.
2913 (struct regsets_info): New.
2914 (struct usrregs_info): New.
2915 (struct regs_info): New.
2916 (struct process_info_private) <new_inferior>: New field.
2917 (struct linux_target_ops): Delete the num_regs, regmap, and
2918 regset_bitmap fields. New field regs_info.
2919 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2920 * i387-fp.c (num_xmm_registers): Delete.
2921 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2922 calls to new interface.
2923 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2924 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2925 Infer the number of xmm registers from the regcache's target
2927 * i387-fp.h (num_xmm_registers): Delete.
2928 * inferiors.c (add_thread): Don't install the thread's regcache
2930 * proc-service.c (gregset_info): Fetch the current inferior's
2931 regs_info. Adjust to use it.
2932 * regcache.c: Include tdesc.h.
2933 (register_bytes, reg_defs, num_registers)
2934 (gdbserver_expedite_regs): Delete.
2935 (get_thread_regcache): If the thread doesn't have a regcache yet,
2936 create one, instead of aborting gdbserver.
2937 (regcache_invalidate_one): Rename to ...
2938 (regcache_invalidate_thread): ... this.
2939 (regcache_invalidate_one): New.
2940 (regcache_invalidate): Only invalidate registers of the current
2942 (init_register_cache): Add target_desc parameter, and use it.
2943 (new_register_cache): Ditto. Assert the target description has a
2944 non zero registers_size.
2945 (regcache_cpy): Add assertions. Adjust.
2946 (realloc_register_cache, set_register_cache): Delete.
2947 (registers_to_string, registers_from_string): Adjust.
2948 (find_register_by_name, find_regno, find_register_by_number)
2949 (register_cache_size): Add target_desc parameter, and use it.
2950 (free_register_cache_thread, free_register_cache_thread_one)
2951 (regcache_release, register_cache_size): New.
2952 (register_size): Add target_desc parameter, and use it.
2953 (register_data, supply_register, supply_register_zeroed)
2954 (supply_regblock, supply_register_by_name, collect_register)
2955 (collect_register_as_string, collect_register_by_name): Adjust.
2956 * regcache.h (struct target_desc): Forward declare.
2957 (struct regcache) <tdesc>: New field.
2958 (init_register_cache, new_register_cache): Add target_desc
2960 (regcache_invalidate_thread): Declare.
2961 (regcache_invalidate_one): Delete declaration.
2962 (regcache_release): Declare.
2963 (find_register_by_number, register_cache_size, register_size)
2964 (find_regno): Add target_desc parameter.
2965 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2967 * remote-utils.c: Include tdesc.h.
2968 (outreg, prepare_resume_reply): Adjust.
2969 * server.c: Include tdesc.h.
2970 (gdbserver_xmltarget): Delete declaration.
2971 (get_features_xml, process_serial_event): Adjust.
2972 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2974 (struct process_info) <tdesc>: New field.
2975 (ipa_tdesc): Declare.
2976 * tdesc.c: New file.
2977 * tdesc.h: New file.
2978 * tracepoint.c: Include tdesc.h.
2979 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2980 (get_context_regcache): Adjust to pass ipa_tdesc down.
2981 (do_action_at_tracepoint): Adjust to get the register cache size
2982 from the context regcache's description.
2983 (traceframe_walk_blocks): Adjust to get the register cache size
2984 from the current trace frame's description.
2985 (traceframe_get_pc): Adjust to get current trace frame's
2986 description and pass it down.
2987 (gdb_collect): Adjust to get the register cache size from the
2989 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2990 (gdbserver_xmltarget): Delete.
2991 (initialize_low_tracepoint): Set the ipa's target description.
2992 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2993 (initialize_low_tracepoint): Set the ipa's target description.
2994 * linux-x86-low.c: Include tdesc.h.
2995 [__x86_64__] (is_64bit_tdesc): New.
2996 (ps_get_thread_area, x86_get_thread_area): Use it.
2997 (i386_cannot_store_register): Rename to ...
2998 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2999 (i386_cannot_fetch_register): Rename to ...
3000 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3001 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3003 (target_regsets): Rename to ...
3004 (x86_regsets): ... this.
3005 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3007 (x86_siginfo_fixup): Use is_64bit_tdesc.
3008 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3009 (tdesc_x32_avx_linux, tdesc_x32_linux)
3010 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3012 (x86_linux_update_xmltarget): Delete.
3013 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3014 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3015 (AMD64_LINUX_USER64_CS): New.
3016 (x86_linux_read_description): New, based on
3017 x86_linux_update_xmltarget.
3018 (same_process_callback): New.
3019 (x86_arch_setup_process_callback): New.
3020 (x86_linux_update_xmltarget): New.
3021 (x86_regsets_info): New.
3022 (amd64_linux_regs_info): New.
3023 (i386_linux_usrregs_info): New.
3024 (i386_linux_regs_info): New.
3025 (x86_linux_regs_info): New.
3026 (x86_arch_setup): Reimplement.
3027 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3028 (x86_emit_ops): Ditto.
3029 (the_low_target): Adjust. Install x86_linux_regs_info,
3030 x86_cannot_fetch_register, and x86_cannot_store_register.
3031 (initialize_low_arch): New.
3032 * linux-ia64-low.c (tdesc_ia64): Declare.
3033 (ia64_fetch_register): Adjust.
3034 (ia64_usrregs_info, regs_info): New globals.
3035 (ia64_regs_info): New function.
3036 (the_low_target): Adjust.
3037 (initialize_low_arch): New function.
3038 * linux-sparc-low.c (tdesc_sparc64): Declare.
3039 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3041 (sparc_arch_setup): New function.
3042 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3043 (the_low_target): Adjust.
3044 (initialize_low_arch): New function.
3045 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3046 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3047 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3048 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3049 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3050 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3051 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3052 (tdesc_powerpc_isa205_vsx64l): Declare.
3053 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3054 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3055 (ppc_set_pc, ppc_get_hwcap): Adjust.
3056 (ppc_usrregs_info): Forward declare.
3057 (!__powerpc64__) ppc_regmap_adjusted: New global.
3058 (ppc_arch_setup): Adjust to the current process'es target
3060 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3061 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3062 (ppc_store_evrregset): Adjust.
3063 (target_regsets): Rename to ...
3064 (ppc_regsets): ... this, and make static.
3065 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3066 (ppc_regs_info): New function.
3067 (the_low_target): Adjust.
3068 (initialize_low_arch): New function.
3069 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3070 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3071 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3072 (tdesc_s390x_linux64v2): Declare.
3073 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3074 (s390_fill_gregset, s390_store_last_break): Adjust.
3075 (target_regsets): Rename to ...
3076 (s390_regsets): ... this, and make static.
3077 (s390_get_pc, s390_set_pc): Adjust.
3078 (s390_get_hwcap): New target_desc parameter, and use it.
3079 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3080 (s390_arch_setup): Adjust to set the current process'es target
3081 description. Don't adjust the regmap.
3082 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3083 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3084 (regs_info_3264): New globals.
3085 (s390_regs_info): New function.
3086 (the_low_target): Adjust.
3087 (initialize_low_arch): New function.
3088 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3089 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3090 [__mips64] (init_registers_mips_linux)
3091 (init_registers_mips_dsp_linux): Delete defines.
3092 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3093 (have_dsp): New global.
3094 (mips_read_description): New, based on mips_arch_setup.
3095 (mips_arch_setup): Reimplement.
3096 (get_usrregs_info): New function.
3097 (mips_cannot_fetch_register, mips_cannot_store_register)
3098 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3099 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3100 (target_regsets): Rename to ...
3101 (mips_regsets): ... this, and make static.
3102 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3103 (dsp_regs_info, regs_info): New globals.
3104 (mips_regs_info): New function.
3105 (the_low_target): Adjust.
3106 (initialize_low_arch): New function.
3107 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3108 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3110 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3111 (arm_read_description): New, with bits factored from
3113 (arm_arch_setup): Reimplement.
3114 (target_regsets): Rename to ...
3115 (arm_regsets): ... this, and make static.
3116 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3117 (arm_regs_info): New function.
3118 (the_low_target): Adjust.
3119 (initialize_low_arch): New function.
3120 * linux-m68k-low.c (tdesc_m68k): Declare.
3121 (target_regsets): Rename to ...
3122 (m68k_regsets): ... this, and make static.
3123 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3124 (m68k_regs_info): New function.
3125 (m68k_arch_setup): New function.
3126 (the_low_target): Adjust.
3127 (initialize_low_arch): New function.
3128 * linux-sh-low.c (tdesc_sharch): Declare.
3129 (target_regsets): Rename to ...
3130 (sh_regsets): ... this, and make static.
3131 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3132 (sh_regs_info, sh_arch_setup): New functions.
3133 (the_low_target): Adjust.
3134 (initialize_low_arch): New function.
3135 * linux-bfin-low.c (tdesc_bfin): Declare.
3136 (bfin_arch_setup): New function.
3137 (bfin_usrregs_info, regs_info): New globals.
3138 (bfin_regs_info): New function.
3139 (the_low_target): Adjust.
3140 (initialize_low_arch): New function.
3141 * linux-cris-low.c (tdesc_cris): Declare.
3142 (cris_arch_setup): New function.
3143 (cris_usrregs_info, regs_info): New globals.
3144 (cris_regs_info): New function.
3145 (the_low_target): Adjust.
3146 (initialize_low_arch): New function.
3147 * linux-cris-low.c (tdesc_crisv32): Declare.
3148 (cris_arch_setup): New function.
3149 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3150 (cris_regs_info): New function.
3151 (the_low_target): Adjust.
3152 (initialize_low_arch): New function.
3153 * linux-m32r-low.c (tdesc_m32r): Declare.
3154 (m32r_arch_setup): New function.
3155 (m32r_usrregs_info, regs_info): New globals.
3156 (m32r_regs_info): Adjust.
3157 (initialize_low_arch): New function.
3158 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3159 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3160 (tic6x_usrregs_info): Forward declare.
3161 (tic6x_read_description): New function, based on ...
3162 (tic6x_arch_setup): ... this. Reimplement.
3163 (target_regsets): Rename to ...
3164 (tic6x_regsets): ... this, and make static.
3165 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3166 (tic6x_regs_info): New function.
3167 (the_low_target): Adjust.
3168 (initialize_low_arch): New function.
3169 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3170 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3171 (target_regsets): Rename to ...
3172 (xtensa_regsets): ... this, and make static.
3173 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3175 (xtensa_arch_setup, xtensa_regs_info): New functions.
3176 (the_low_target): Adjust.
3177 (initialize_low_arch): New function.
3178 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3179 (nios2_arch_setup): Set the current process'es tdesc.
3180 (target_regsets): Rename to ...
3181 (nios2_regsets): ... this.
3182 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3183 (nios2_regs_info): New function.
3184 (the_low_target): Adjust.
3185 (initialize_low_arch): New function.
3186 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3187 (aarch64_arch_setup): Set the current process'es tdesc.
3188 (target_regsets): Rename to ...
3189 (aarch64_regsets): ... this.
3190 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3191 (aarch64_regs_info): New function.
3192 (the_low_target): Adjust.
3193 (initialize_low_arch): New function.
3194 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3196 (target_regsets): Rename to ...
3197 (tile_regsets): ... this.
3198 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3199 (tile_regs_info): New function.
3200 (tile_arch_setup): Set the current process'es tdesc.
3201 (the_low_target): Adjust.
3202 (initialize_low_arch): New function.
3203 * spu-low.c (tdesc_spu): Declare.
3204 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3205 * win32-arm-low.c (tdesc_arm): Declare.
3206 (arm_arch_setup): New function.
3207 (the_low_target): Install arm_arch_setup instead of
3209 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3210 (init_windows_x86): Rename to ...
3211 (i386_arch_setup): ... this. Set `win32_tdesc'.
3212 (the_low_target): Adjust.
3213 * win32-low.c (win32_tdesc): New global.
3214 (child_add_thread): Don't create the thread cache here.
3215 (do_initial_child_stuff): Set the new process'es tdesc.
3216 * win32-low.h (struct target_desc): Forward declare.
3217 (win32_tdesc): Declare.
3218 * lynx-i386-low.c (tdesc_i386): Declare global.
3219 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3220 * lynx-low.c (lynx_tdesc): New global.
3221 (lynx_add_process): Set the new process'es tdesc.
3222 * lynx-low.h (struct target_desc): Forward declare.
3223 (lynx_tdesc): Declare global.
3224 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3225 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3226 * nto-low.c (nto_tdesc): New global.
3227 (do_attach): Set the new process'es tdesc.
3228 * nto-low.h (struct target_desc): Forward declare.
3229 (nto_tdesc): Declare.
3230 * nto-x86-low.c (tdesc_i386): Declare.
3231 (nto_x86_arch_setup): Set `nto_tdesc'.
3233 2013-06-04 Gary Benson <gbenson@redhat.com>
3235 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3236 to qSupported response when appropriate.
3237 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3238 with nonzero-length annex.
3239 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3240 arguments supplied in annex.
3242 2013-05-31 Doug Evans <dje@google.com>
3245 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3246 64 bits in 64-cross-32 environment.
3248 2013-05-28 Pedro Alves <palves@redhat.com>
3250 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3251 (aarch64-without-fpu.c): Delete rule.
3252 * configure.srv (aarch64*-*-linux*): Remove references to
3253 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3254 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3257 2013-05-24 Pedro Alves <palves@redhat.com>
3259 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3260 instead of strchr/decode_address. Error if the range isn't split
3261 with a ','. Don't assume there's be a ':' in the action.
3263 2013-05-23 Yao Qi <yao@codesourcery.com>
3264 Pedro Alves <palves@redhat.com>
3266 * linux-low.c (lwp_in_step_range): New function.
3267 (linux_wait_1): If the thread was range stepping and stopped
3268 outside the stepping range, report the stop to GDB. Otherwise,
3269 continue stepping. Add range stepping debug output.
3270 (linux_set_resume_request): Copy the step range from the resume
3272 (linux_supports_range_stepping): New.
3273 (linux_target_ops) <supports_range_stepping>: Set to
3274 linux_supports_range_stepping.
3275 * linux-low.h (struct linux_target_ops)
3276 <supports_range_stepping>: New field.
3277 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3278 * linux-x86-low.c (x86_supports_range_stepping): New.
3279 (the_low_target) <supports_range_stepping>: Set to
3280 x86_supports_range_stepping.
3281 * server.c (handle_v_cont): Handle 'r' action.
3282 (handle_v_requests): Append ";r" if the target supports range
3284 * target.h (struct thread_resume) <step_range_start,
3285 step_range_end>: New fields.
3286 (struct target_ops) <supports_range_stepping>:
3288 (target_supports_range_stepping): New macro.
3290 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3292 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3293 confusion in comment.
3295 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3297 * lynx-low.c (struct process_info_private): New type.
3298 (lynx_add_process): New function.
3299 (lynx_create_inferior, lynx_attach): Replace calls to
3300 add_process by calls to lynx_add_process.
3301 (lynx_resume): If PTID is null, then try using
3302 current_process()->private->last_wait_event_ptid.
3304 (lynx_clear_inferiors): Delete. The contents of that function
3305 has been inlined in lynx_mourn;
3306 (lynx_wait_1): Save the ptid in the process's private data.
3307 (lynx_mourn): Free the process' private data. Replace call
3308 to lynx_clear_inferiors by call to clear_inferiors.
3310 2013-05-17 Yao Qi <yao@codesourcery.com>
3312 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3315 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3317 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3318 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3319 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3320 PT_TEXT_END_ADDR guards. Update comments.
3321 (linux_target_op) <read_offsets>: Conditionally define to
3322 linux_read_offsets if the target is UCLIBC and if it defines
3323 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3325 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3326 Andrew Jenner <andrew@codesourcery.com>
3328 * Makefile.in (SFILES): Add linux-nios2-low.c.
3329 (clean): Add action to delete nios2-linux.c.
3330 (nios2-linux.c): New rule.
3331 * configure.srv: Add nios2*-*-linux*.
3332 * linux-nios2-low.c: New.
3334 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3336 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3338 2013-04-25 Hui Zhu <hui@codesourcery.com>
3341 * ax.c (ax_printf): Add fflush.
3343 2013-04-22 Tom Tromey <tromey@redhat.com>
3345 * Makefile.in (SFILES): Add filestuff.c.
3346 (OBS): Add filestuff.o.
3347 (filestuff.o): New target.
3348 * config.in, configure: Rebuild.
3349 * configure.ac: Check for fdwalk, pipe2.
3351 2013-04-17 Pedro Alves <palves@redhat.com>
3353 * configure.ac (USE_THREAD_DB): Delete variable.
3354 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3355 Don't AC_SUBST USE_THREAD_DB.
3356 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3357 * config.in, configure: Regenerate.
3359 2013-04-16 Pedro Alves <palves@redhat.com>
3361 * linux-low.h (struct lwp_info) <thread_known>: Move under
3362 the USE_THREAD_DB #ifdef.
3364 2013-04-16 Pedro Alves <palves@redhat.com>
3366 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3367 (linux-low.o): Delete rule.
3368 * linux-low.h: Always include "gdb_thread_db.h" instead of
3369 conditionally including thread_db.h.
3370 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3373 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3375 * Makefile.in (install-only): Fix make install regression.
3377 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3379 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3380 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3382 * gdbserver.1: Remove.
3384 2013-03-22 Pedro Alves <palves@redhat.com>
3386 * linux-low.c (handle_extended_wait): Don't call
3387 linux_enable_event_reporting.
3389 2013-03-15 Tony Theodore <tonyt@logyst.com>
3392 * Makefile.in (SHELL): Use @SHELL@.
3394 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3396 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3399 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3401 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3402 Remove extraneous NULL element.
3404 2013-03-13 Yao Qi <yao@codesourcery.com>
3406 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3407 'V' block in trace frame.
3409 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3411 * target.h (struct target_ops): Add btrace ops.
3412 (target_supports_btrace): New macro.
3413 (target_enable_btrace): New macro.
3414 (target_disable_btrace): New macro.
3415 (target_read_btrace): New macro.
3416 * gdbthread.h (struct thread_info): Add btrace field.
3417 * server.c: Include btrace-common.h.
3418 (handle_btrace_general_set): New function.
3419 (handle_btrace_enable): New function.
3420 (handle_btrace_disable): New function.
3421 (handle_general_set): Call handle_btrace_general_set.
3422 (handle_qxfer_btrace): New function.
3423 (struct qxfer qxfer_packets[]): Add btrace entry.
3424 * inferiors.c (remove_thread): Disable btrace.
3425 * linux-low: Include linux-btrace.h.
3426 (linux_low_enable_btrace): New function.
3427 (linux_low_read_btrace): New function.
3428 (linux_target_ops): Add btrace ops.
3429 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3430 Add srv_linux_btrace=yes.
3431 (x86_64-*-linux*): Add linux-btrace.o.
3432 Add srv_linux_btrace=yes.
3433 * configure.ac: Define HAVE_LINUX_BTRACE.
3434 * config.in: Regenerated.
3435 * configure: Regenerated.
3437 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3439 * server.c (handle_qxfer): Preserve error message if -3 is
3441 (qxfer): Document the -3 return value.
3443 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3445 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3446 (linux_btrace_h): New variable.
3447 (linux-btrace.o): New rule.
3449 2013-03-08 Stan Shebs <stan@codesourcery.com>
3450 Hafiz Abid Qadeer <abidh@codesourcery.com>
3452 * tracepoint.c (trace_buffer_size): New global.
3453 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3454 (init_trace_buffer): Change to one-argument function. Allocate
3455 trace buffer memory.
3456 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3457 handle QTBuffer:size packet.
3458 (cmd_bigqtbuffer_size): New function.
3459 (initialize_tracepoint): Call init_trace_buffer with
3460 DEFAULT_TRACE_BUFFER_SIZE.
3461 * server.c (handle_query): Add QTBuffer:size in the
3464 2013-03-07 Yao Qi <yao@codesourcery.com>
3466 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3467 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3469 (cmd_qtsp): Adjust condition. Do post increment.
3470 Set cur_action and cur_step_action back to 0.
3472 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3475 * linux-low.c (linux_write_memory): Return early success if LEN is
3478 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3480 * configure.srv: Add x86_64-*-cygwin* as target.
3482 2013-02-28 Tom Tromey <tromey@redhat.com>
3484 * configure.ac: Invoke AC_SYS_LARGEFILE.
3485 * configure, config.in: Rebuild.
3487 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3489 * win32-low.c: Throughout, fix format strings and casts of
3490 printf-like functions to avoid type related warnings on all
3492 (get_child_debug_event): Print dwDebugEventCode as hex since
3493 that's how it's usually documented.
3495 2013-02-28 Yao Qi <yao@codesourcery.com>
3497 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3500 2013-02-27 Jiong Wang <jiwang@tilera.com>
3502 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3503 (reg-tilegx32.c): New rule.
3504 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3505 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3506 different register info initializer according to elf class.
3507 (init_registers_tilgx32): New function. The tilegx32 register info
3509 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3510 (tile_store_gregset): Likewise.
3512 2013-02-27 Yao Qi <yao@codesourcery.com>
3514 * server.c (process_point_options): Print debug message when
3515 debug_threads is true.
3517 2013-02-26 Yao Qi <yao@codesourcery.com>
3519 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3521 2013-02-19 Pedro Alves <palves@redhat.com>
3522 Kai Tietz <ktietz@redhat.com>
3526 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3527 instead of strtoul to extract address from packet.
3528 (process_serial_event) <'z'>: Likewise.
3530 2013-02-18 Yao Qi <yao@codesourcery.com>
3532 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3534 2013-02-14 Pedro Alves <palves@redhat.com>
3538 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3539 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3541 2013-02-14 Pedro Alves <palves@redhat.com>
3543 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3545 2013-02-14 Pedro Alves <palves@redhat.com>
3547 * tracepoint.c (save_string): Delete.
3548 (add_tracepoint_action): Use savestring instead of save_string.
3550 2013-02-12 Pedro Alves <palves@redhat.com>
3552 * linux-xtensa-low.c: Ditto.
3553 * xtensa-xtregs.c: Ditto.
3555 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3557 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3560 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3562 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3563 aarch64_num_wp_regs and aarch64_num_bp_regs to
3564 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3566 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3568 * linux-aarch64-low.c (ps_get_thread_area): Replace
3569 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3571 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3572 Marcus Shawcroft <marcus.shawcroft@arm.com>
3573 Nigel Stephens <nigel.stephens@arm.com>
3574 Yufeng Zhang <yufeng.zhang@arm.com>
3576 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3577 (aarch64.c, aarch64-without-fpu.c): New targets.
3578 * configure.srv (aarch64*-*-linux*): New.
3579 * linux-aarch64-low.c: New file.
3581 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3583 * linux-low.c (handle_extended_wait, linux_create_inferior)
3584 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3585 (dequeue_one_deferred_signal, linux_resume_one_thread)
3586 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3587 (linux_tracefork_grandchild, linux_test_for_tracefork)
3588 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3589 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3590 where the argument is 0.
3592 2013-01-25 Yao Qi <yao@codesourcery.com>
3594 * event-loop.c: Include "queue.h".
3595 (gdb_event_p): New typedef.
3596 (struct gdb_event) <next_event>: Remove.
3597 (event_queue): Change to QUEUE(gdb_event_p).
3598 (async_queue_event): Remove.
3599 (gdb_event_xfree): New.
3600 (initialize_event_loop): New.
3601 (process_event): Use API from QUEUE.
3602 (wait_for_event): Likewise.
3603 * server.c (main): Call initialize_event_loop.
3604 * server.h (initialize_event_loop): Declare.
3606 2013-01-18 Yao Qi <yao@codesourcery.com>
3608 * ax.h (struct eval_agent_expr_context): New.
3609 (gdb_eval_agent_expr): Update declaration.
3610 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3611 TFRAME. Add new argument CTX.
3612 * server.h (struct eval_agent_expr_context): Declare.
3613 (agent_mem_read, agent_tsv_read): Update declaration.
3614 (agent_mem_read_string): Likewise.
3615 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3616 (add_traceframe_block): Add new argument TPOINT.
3617 Increase TPOINT->traceframe_usage.
3618 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3619 eval_tracepoint_agent_expr.
3620 (condition_true_at_tracepoint): Likewise.
3621 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3622 (agent_mem_read_string, agent_tsv_read): Likewise.
3624 2013-01-16 Yao Qi <yao@codesourcery.com>
3626 * linux-low.c (linux_resume_one_lwp): Don't check
3627 'lwp->bp_reinsert != 0'.
3629 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3630 Pedro Alves <palves@redhat.com>
3632 * lynx-low.c (ptrace_request_to_str): Define a temporary
3633 macro and use it to simplify this function's implementation.
3635 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3637 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3640 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3642 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3644 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3646 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3648 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3650 * lynx-low.c (lynx_resume): Use the resume_info parameter
3651 to determine the ptid for the lynx_ptrace call, unless
3652 it is equal to minus_one_ptid, in which case we use the
3653 ptid of the current_inferior.
3654 (lynx_wait_1): After having received a thread create/exit
3655 event, resume the inferior's execution using the signaling
3656 thread's ptid, rather than the old ptid.
3658 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3660 * lynx-low.c (lynx_resume): Delete variable ret.
3662 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3664 * gdbreplay.c (gdbreplay_version): Update copyright year.
3665 * server.c (gdbserver_version): Likewise.
3667 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3669 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3672 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3674 * lynx-low.c (ptrace_request_to_str): Add handling for
3677 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3679 * lynx-low.c (lynx_attach): Delete variable new_process.
3681 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3683 * lynx-low.c (lynx_create_inferior): Delete variable
3686 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3688 * lynx-low.c (ptrace_request_to_str): Do not handle
3689 PTRACE_GETTHREADLIST if this macro does not exist.
3691 2012-12-15 Yao Qi <yao@codesourcery.com>
3693 * Makefile.in (OBS): Add notif.o.
3694 * notif.c, notif.h: New.
3695 * server.c: Include "notif.h".
3696 (struct vstop_notif) <next>: Remove.
3698 (queue_stop_reply): Update.
3699 (push_event, send_next_stop_reply): Remove.
3700 (discard_queued_stop_replies): Update.
3701 (notif_stop): New variable.
3702 (handle_v_stopped): Remove.
3703 (handle_v_requests): Don't call handle_v_stopped. Call
3704 handle_ack_notif instead.
3705 (queue_stop_reply_callback): Call notif_event_enque instead
3706 of queue_stop_reply.
3707 (handle_status): Don't call send_next_stop_reply, call
3708 notif_write_event instead.
3709 (kill_inferior_callback): Likewise.
3710 (detach_or_kill_inferior_callback): Likewise.
3711 (main): Call initialize_notif.
3712 (process_serial_event): Call QUEUE_is_empty.
3713 (handle_target_event): Call notif_push instead of push event.
3714 * server.h (push_event): Remove declaration.
3716 2012-12-10 Tom Tromey <tromey@redhat.com>
3718 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3719 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3722 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3723 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3724 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3725 (amd64-linux-ipa.o, ax.o): Rewrite.
3726 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3727 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3728 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3729 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3730 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3731 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3732 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3733 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3734 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3735 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3736 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3737 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3738 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3739 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3740 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3741 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3742 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3743 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3744 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3745 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3746 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3747 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3748 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3749 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3750 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3751 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3752 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3753 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3754 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3755 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3756 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3757 (reg-tilegx.o): Remove.
3758 (all_object_files): New macro.
3759 Include .deps files.
3760 * aclocal.m4, configure: Rebuild.
3761 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3762 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3763 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3765 2012-12-05 Tom Tromey <tromey@redhat.com>
3768 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3770 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3772 * configure.ac: Check for linux/perf_event.h.
3773 * config.in: Regenerated.
3774 * configure: Regenerated.
3776 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3778 * hostio.c (handle_readlink): Decrease buffer size
3779 parameter passed to readlink by one byte.
3781 2012-11-26 Yao Qi <yao@codesourcery.com>
3783 * configure.ac (build_warnings): Append '-Wempty-body'.
3784 * configure: Regenerated.
3785 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3788 2012-11-15 Pierre Muller <muller@sourceware.org>
3790 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3791 * config.in: Regenerate.
3792 * configure: Regenerate.
3793 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3794 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3795 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3796 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3798 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3799 instead of <sys/wait.h> header.
3800 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3802 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3804 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3805 (various make rules): Remove -DGDBSERVER
3807 2012-11-09 Yao Qi <yao@codesourcery.com>
3809 * spu-low.c (current_ptid): Move it to ..
3810 * gdbthread.h: ... here. New.
3811 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3812 * server.c (myresume, process_serial_event): Likewise.
3813 * thread-db.c (thread_db_find_new_threads): Likewise.
3814 * tracepoint.c (run_inferior_command): Likewise.
3816 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3818 * server.c (handle_search_memory_1): Include access length in
3821 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3823 * linux-crisv32-low.c: Fix compile errors.
3825 2012-09-04 Yao Qi <yao@codesourcery.com>
3827 * tracepoint.c (cmd_qtsv): Adjust debug message.
3828 Don't check CUR_TPOINT.
3830 2012-08-28 Yao Qi <yao@codesourcery.com>
3832 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3833 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3834 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3835 Remove declarations of xmalloc, xreallloc, xstrdup and
3837 * Makefile.in (libiberty_h): New.
3838 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3839 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3841 2012-08-23 Yao Qi <yao@codesourcery.com>
3843 * server.h: Remove declaration of 'xsnprintf'.
3845 2012-08-22 Keith Seitz <keiths@redhat.com>
3847 * server.h: Include build-gnulib-gbserver/config.h.
3848 * gdbreplay.c: Likewise.
3850 2012-08-08 Doug Evans <dje@google.com>
3852 * Makefile.in (SFILES): Add gdb_vecs.c.
3853 (OBS): Add gdb_vecs.o.
3854 (gdb_vecs_h, host_defs_h): New variables.
3855 (thread-db.o): Add $(gdb_vecs_h) dependency.
3856 (gdb_vecs.o): New rule.
3857 * thread-db.c: #include "gdb_vecs.h".
3858 (thread_db_load_search): Use a vector to iterate over path elements.
3859 Handle text appearing after "$pdir".
3861 * configure.ac: Add check for strstr.
3862 * config.in: Regenerate.
3863 * configure: Regenerate.
3865 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3867 * hostio.c (handle_pread): If pread fails, fall back to attempting
3869 (handle_pwrite): Likewise for pwrite.
3871 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3873 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3874 between unsupported TYPE and unimplementable ADDR/LEN combination.
3875 (arm_insert_point): Act on new return value.
3877 2012-07-31 Pedro Alves <palves@redhat.com>
3879 * server.c (process_point_options): Only skip tokens if we find
3880 one that is unrecognized. Don't treat 'X' specially while
3881 skipping unrecognized tokens.
3883 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3885 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3886 to 4-byte-align HW breakpoint addresses for Thumb.
3888 2012-07-27 Yao Qi <yao@codesourcery.com>
3892 * server.h: Declare gdb_agent_about_to_close.
3893 * target.c (kill_inferior): Include "agent.h".
3894 New. Send command 'kill'.
3895 * target.h (kill_inferior): Removed macro.
3896 * tracepoint.c (gdb_agent_about_to_close): New.
3897 (gdb_agent_helper_thread): Handle command 'close'.
3898 Wait endlessly until the inferior stops.
3899 Install gdb_agent_remove_socket to atexit hook.
3900 (agent_socket_name): New static variable.
3901 (gdb_agent_socket_init): Replace local variable 'name' with
3902 'agent_socket_name'.
3903 (gdb_agent_remove_socket): New.
3905 2012-07-27 Yao Qi <yao@codesourcery.com>
3907 * server.c (process_point_options): Stop at 'X' when parsing.
3909 2012-07-19 Michael Eager <eager@eagercon.com>
3911 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3913 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3914 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3915 hardware breakpoint.
3917 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3919 * gdbserver/linux-low.c (initialize_low): Call
3920 linux_ptrace_init_warnings.
3922 2012-07-02 Doug Evans <dje@google.com>
3924 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3927 2012-07-02 Stan Shebs <stan@codesourcery.com>
3929 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3930 (ax.o): Add it to build rule.
3932 (OBS): Add format.o.
3933 (IPA_OBS): Add format.o.
3934 * server.c (handle_query): Claim support for breakpoint commands.
3935 (process_point_options): Add command case.
3936 (process_serial_event): Leave running if there are printfs in
3938 * mem-break.h (any_persistent_commands): Declare.
3939 (add_breakpoint_commands): Declare.
3940 (gdb_no_commands_at_breakpoint): Declare.
3941 (run_breakpoint_commands): Declare.
3942 * mem-break.c (struct point_command_list): New struct.
3943 (struct breakpoint): New field command_list.
3944 (any_persistent_commands): New function.
3945 (add_commands_to_breakpoint): New function.
3946 (add_breakpoint_commands): New function.
3947 (gdb_no_commands_at_breakpoint): New function.
3948 (run_breakpoint_commands): New function.
3949 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3951 * ax.c: Include format.h.
3952 (ax_printf): New function.
3953 (gdb_eval_agent_expr): Add printf opcode.
3955 2012-06-13 Yao Qi <yao@codesourcery.com>
3957 * server.c (start_inferior): Remove duplicated writes to fields
3958 'last_resume_kind' and 'last_status' of 'current_inferior'.
3960 2012-06-12 Yao Qi <yao@codesourcery.com>
3961 Pedro Alves <palves@redhat.com>
3963 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3965 * server.c (handle_v_cont): Extend comment.
3967 2012-06-11 Yao Qi <yao@codesourcery.com>
3969 * linux-low.c (linux_attach): Add 'static'.
3971 2012-06-06 Yao Qi <yao@codesourcery.com>
3973 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3975 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3977 Fix gcc -flto compilation warning.
3978 * server.c (main): Make variable multi_mode and attach volatile.
3980 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3982 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3983 if the platform doesn't know about it.
3985 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3987 * Makefile.in (SFILES): Add linux-tile-low.c.
3988 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3989 * configure.srv: Handle tilegx-*-linux*.
3990 * linux-tile-low.c: New file.
3992 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3994 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3996 2012-05-24 Pedro Alves <palves@redhat.com>
4000 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4002 2012-05-24 Pedro Alves <palves@redhat.com>
4006 Replace target_signal with gdb_signal throughout.
4008 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4010 * linux-low.c (linux_store_registers): Avoid the copying sequence
4011 when no data has been retrieved by ptrace.
4013 2012-05-22 Will Deacon <will.deacon@arm.com>
4015 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4016 Include asm/ptrace.h.
4017 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4020 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4022 * linux-low.c (linux_store_registers): Don't re-retrieve data
4023 with ptrace that has already been obtained from /proc. Always
4024 copy any data retrieved with ptrace to the buffer supplied.
4026 2012-05-11 Yao Qi <yao@codesourcery.com>
4027 Pedro Alves <palves@redhat.com>
4029 * linux-low.c (enum stopping_threads_kind): New.
4030 (stopping_threads): Change type to `enum stopping_threads_kind'.
4031 (handle_extended_wait): If stopping and suspending threads, leave
4032 the new_lwp suspended too.
4033 (linux_wait_for_event): Adjust.
4034 (stop_all_lwps): Set `stopping_threads' to
4035 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4036 whether we're suspending threads or just stopping them. Assert no
4039 2012-04-29 Yao Qi <yao@codesourcery.com>
4041 * server.h: Move some code to ...
4042 * gdbthread.h: ... here. New.
4043 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4044 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4045 (nto-low.o, win32-low.o): Likewise.
4046 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4047 * regcache.c, remote-utils.c, server.c: Likewise.
4048 * target.c, tracepoint.c, win32-low.c: Likewise.
4050 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4052 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4053 (PTRACE_ARG4_TYPE): Likewise.
4054 (PTRACE_XFER_TYPE): Likewise.
4055 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4056 ptrace to PTRACE_ARG3_TYPE.
4057 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4058 (PTRACE_ARG4_TYPE): Likewise.
4059 (PTRACE_XFER_TYPE): Likewise.
4060 (linux_detach_one_lwp): Cast fourth argument of
4061 ptrace to long then PTRACE_ARG4_TYPE.
4062 (regsets_fetch_inferior_registers): Cast third argument of
4063 ptrace to long then PTRACE_ARG3_TYPE.
4064 (regsets_store_inferior_registers): Likewise.
4066 2012-04-20 Pedro Alves <palves@redhat.com>
4068 * configure: Regenerate.
4070 2012-04-19 Pedro Alves <palves@redhat.com>
4072 * Makefile.in (GNULIB_BUILDDIR): New.
4073 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4074 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4075 (all, install-only, uninstall, clean-info, all-lib, clean): No
4076 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4077 (maintainer-clean realclean distclean): Use subdir_do.
4079 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4080 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4081 * acinclude.m4: Include acx_configure_dir.m4.
4082 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4083 calls. Call AC_PROG_RANLIB. Configure gnulib using
4086 (GNULIB_STDINT_H): Adjust.
4087 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4088 * gdbreplay.c: Include build-gnulib/config.h.
4089 * server.h: Likewise.
4090 * aclocal.m4: Regenerate.
4091 * config.in: Regenerate.
4092 * configure: Regenerate.
4094 2012-04-19 Pedro Alves <palves@redhat.com>
4096 * Makefile.in (LIBGNU, INCGNU): Adjust.
4097 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4098 (all, install-only, uninstall, clean-info, all-lib, clean)
4099 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4100 * configure.ac: Adjust AC_OUTPUT output.
4101 * aclocal.m4: Regenerate.
4102 * configure: Regenerate.
4104 2012-04-19 Pedro Alves <palves@redhat.com>
4106 * Makefile.in (generated_files): New.
4107 (server_h): Remove the explicit dependency on config.h, and depend
4108 on $generated_files.
4110 2012-04-19 Pedro Alves <palves@redhat.com>
4112 * Makefile.in (INCGNU): Add -Ignulib.
4114 2012-04-19 Pedro Alves <palves@redhat.com>
4116 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4117 (INCGNU): ... this, and spell out -I here.
4118 (GNULIB_LIB): Rename to ...
4120 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4122 2012-04-19 Pedro Alves <palves@redhat.com>
4124 * config.in: Regenerate.
4126 2012-04-19 Pedro Alves <palves@redhat.com>
4128 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4129 * server.h (memmem): Remove declaration.
4130 * config.in: Regenerate.
4131 * configure: Regenerate.
4133 2012-04-19 Yao Qi <yao@codesourcery.com>
4135 * Makefile.in (SFILES): Add common/vec.c.
4139 2012-04-19 Yao Qi <yao@codesourcery.com>
4141 * remote-utils.c (prepare_resume_reply): Replace with macro
4142 target_core_of_thread.
4143 * server.c (handle_qxfer_threads_proper): Likewise.
4144 * target.h (traget_core_of_thread): New macro.
4146 2012-04-18 Pedro Alves <palves@redhat.com>
4148 * aclocal.m4: Regenerate.
4149 * configure: Regenerate.
4151 2012-04-16 Yao Qi <yao@codesourcery.com>
4153 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4154 duplicated on address.
4156 2012-04-16 Yao Qi <yao@codesourcery.com>
4158 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4159 (struct tracepoint_action_ops) <send>: New field.
4160 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4161 (agent_expr_send, x_tracepoint_action_send): New.
4162 (l_tracepoint_action_send): New.
4163 (cmd_qtdp): Download and install tracepoint
4164 according to `use_agent'.
4165 (run_inferior_command): Add one more parameter `len'.
4167 (tracepoint_send_agent): New.
4168 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4170 2012-04-16 Yao Qi <yao@codesourcery.com>
4172 * tracepoint.c (download_tracepoints): Moved to ...
4173 (cmd_qtstart): ... here.
4175 2012-04-14 Yao Qi <yao@codesourcery.com>
4177 * tracepoint.c: Include inttypes.h.
4178 (struct collect_memory_action): Use sized types.
4179 (struct tracepoint): Likewise.
4180 (cmd_qtdp, stop_tracing): Update print specifiers.
4181 (cmd_qtp, response_tracepoint): Likewise.
4182 (collect_data_at_tracepoint): Likewise.
4183 (collect_data_at_step): Likewise.
4185 2012-04-14 Yao Qi <yao@codesourcery.com>
4187 Import gnulib module inttypes.
4188 * aclocal.m4, config.in, configure: Regenerated.
4190 2012-04-14 Yao Qi <yao@codesourcery.com>
4192 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4193 Makefile and config.status at last.
4195 2012-04-13 Yao Qi <yao@codesourcery.com>
4197 * tracepoint.c: Include stdint.h unconditionally.
4199 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4201 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4202 on BFD_HAVE_SYS_PROCFS_TYPE.
4203 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4204 * configure: Regenerate.
4205 * config.in: Likewise.
4207 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4209 * Makefile.in (clean): Also remove x32.c x32-linux.c
4210 x32-avx.c x32-avx-linux.c.
4211 (x32.o): New target.
4213 (x32-linux.o): Likewise.
4214 (x32-linux.c): Likewise.
4215 (x32-avx.o): Likewise.
4216 (x32-avx.c): Likewise.
4217 (x32-avx-linux.o): Likewise.
4218 (x32-avx-linux.c): Likewise.
4220 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4221 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4222 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4223 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4224 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4225 i386/x32-avx-linux.xml.
4227 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4228 (init_registers_x32_avx_linux): Likwise.
4229 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4230 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4232 2012-04-13 Pedro Alves <palves@redhat.com>
4234 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4235 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4236 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4237 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4240 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4242 * linux-x86-low.c (compat_x32_clock_t): New.
4243 (compat_x32_siginfo_t): Likewise.
4244 (compat_x32_siginfo_from_siginfo): Likewise.
4245 (siginfo_from_compat_x32_siginfo): Likewise.
4246 (linux_is_elf64): Likewise.
4247 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4248 and siginfo_from_compat_x32_siginfo for x32.
4249 (x86_arch_setup): Set linux_is_elf64.
4251 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4254 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4256 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4257 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4258 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4259 compatible with process.
4261 2012-04-12 Yao Qi <yao@codesourcery.com>
4263 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4264 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4265 (install-only, install-info, clean): Handle sub dir gnulib.
4266 (all-lib, am--refresh): New targets.
4267 (memmem.o): Remove target.
4268 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4269 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4270 (AC_REPLACE_FUNCS): Remove memmem.
4271 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4272 (AC_OUTPUT): Generate Makefile in gnulib/.
4273 * aclocal.m4, config.in, configure: Regenerated.
4275 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4277 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4279 2012-04-05 Pedro Alves <palves@redhat.com>
4281 -Werror=strict-aliasing
4283 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4286 2012-04-04 Pedro Alves <palves@redhat.com>
4288 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4289 (sparc_store_gregset_from_stack, sparc_store_gregset)
4290 (sparc_breakpoint_at): Fix formatting.
4292 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4294 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4296 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4297 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4298 * config.in: Regenerate.
4299 * configure: Likewise.
4301 2012-03-29 Pedro Alves <palves@redhat.com>
4303 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4304 Correct ptrace arguments.
4306 2012-03-28 Pedro Alves <palves@redhat.com>
4308 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4309 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4310 (IA64_FR1_REGNUM): New defines.
4311 (ia64_fetch_register): New.
4312 (the_low_target): Install it.
4313 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4315 * linux-low.c (linux_fetch_registers): Try the
4316 the_low_target.fetch_register hook first.
4318 * linux-arm-low.c (the_low_target): Adjust.
4319 * linux-bfin-low.c (the_low_target): Adjust.
4320 * linux-cris-low.c (the_low_target): Adjust.
4321 * linux-crisv32-low.c (the_low_target): Adjust.
4322 * linux-m32r-low.c (the_low_target): Adjust.
4323 * linux-m68k-low.c (the_low_target): Adjust.
4324 * linux-mips-low.c (the_low_target): Adjust.
4325 * linux-ppc-low.c (the_low_target): Adjust.
4326 * linux-s390-low.c (the_low_target): Adjust.
4327 * linux-sh-low.c (the_low_target): Adjust.
4328 * linux-sparc-low.c (the_low_target): Adjust.
4329 * linux-tic6x-low.c (the_low_target): Adjust.
4330 * linux-x86-low.c (the_low_target): Adjust.
4331 * linux-xtensa-low.c (the_low_target): Adjust.
4333 2012-03-26 Pedro Alves <palves@redhat.com>
4335 * server.c (handle_qxfer_libraries): Don't bail early if
4336 the_target->qxfer_libraries_svr4 is not NULL.
4338 2012-03-26 Pedro Alves <palves@redhat.com>
4340 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4342 2012-03-23 Pedro Alves <palves@redhat.com>
4344 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4345 "library-list-svr4" element's start tag when the the DSO list is
4348 2012-03-23 Pedro Alves <palves@redhat.com>
4350 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4351 a variable whose type size is the same as the inferior's pointer
4354 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4356 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4358 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4359 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4360 * linux-low.h: Include <signal.h>.
4361 (struct siginfo): Remove forward declaration.
4362 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4365 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4367 * .gitignore: Ignore more files.
4369 2012-03-19 Pedro Alves <palves@redhat.com>
4370 Jan Kratochvil <jan.kratochvil@redhat.com>
4372 * server.c (cont_thread, general_thread): Add describing comments.
4373 (start_inferior): Clear `cont_thread'.
4374 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4377 2012-03-15 Yao Qi <yao@codesourcery.com>
4379 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4381 (cmd_qtdp): ... here.
4383 2012-03-15 Yao Qi <yao@codesourcery.com>
4385 * tracepoint.c (struct tracepoint_action_ops): New.
4386 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4387 (m_tracepoint_action_download): New.
4388 (r_tracepoint_action_download): New.
4389 (x_tracepoint_action_download): New.
4390 (l_tracepoint_action_download): New.
4391 (add_tracepoint_action): Install `action->ops' according type.
4392 (download_tracepoint_1): Move code `download' function pointer
4393 of various tracepoint_action_ops.
4395 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4397 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4398 linux_ptrace_attach_warnings.
4400 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4402 * Makefile.in (linux-ptrace.o): New.
4403 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4404 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4405 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4406 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4407 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4409 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4411 2012-03-08 Yao Qi <yao@codesourcery.com>
4412 Pedro Alves <palves@redhat.com>
4414 Fix PR server/13392.
4415 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4417 * tracepoint.c (remove_tracepoint): New.
4418 (cmd_qtdp): Call remove_tracepoint when failed to install.
4420 2012-03-07 Pedro Alves <palves@redhat.com>
4422 * linux-low.c (get_detach_signal): New.
4423 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4424 Pass on pending signals to PTRACE_DETACH. Check the result of the
4426 * server.c (program_signals, program_signals_p): New.
4427 (handle_general_set): Handle QProgramSignals.
4428 * server.h (program_signals, program_signals_p): Declare.
4430 2012-03-05 Pedro Alves <palves@redhat.com>
4431 Jan Kratochvil <jan.kratochvil@redhat.com>
4433 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4436 2012-03-03 Yao Qi <yao@codesourcery.com>
4438 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4439 agent_look_up_symbols.
4441 2012-03-03 Yao Qi <yao@codesourcery.com>
4443 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4444 (linux-x86-low.o): Likewise.
4445 * server.h: Remove in_process_agent_loaded.
4446 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4450 2012-03-03 Yao Qi <yao@codesourcery.com>
4452 * tracepoint.c (gdb_agent_capability): New global.
4453 (in_process_agent_loaded_ust): Renamed to
4454 `in_process_agent_supports_ust'.
4456 (in_process_agent_supports_ust): Call agent_capability_check.
4457 (clear_installed_tracepoints): Assert that agent supports
4460 2012-03-03 Yao Qi <yao@codesourcery.com>
4462 * linux-low.c (linux_supports_agent): New.
4463 (linux_target_ops): Initialize field `supports_agent' with
4464 linux_supports_agent.
4465 * target.h (struct target_ops) <supports_agent>: New.
4466 (target_supports_agent): New macro.
4467 * server.c (handle_general_set): Handle packet 'QAgent'.
4468 (handle_query): Send `QAgent+'.
4469 * Makefile.in (server.o): Depends on agent.h.
4471 2012-03-03 Yao Qi <yao@codesourcery.com>
4473 * Makefile.in (OBS): Add agent.o.
4474 Add new rule for agent.o.
4475 Track dependence of tracepoint.c on agent.h.
4476 * tracepoint.c (run_inferior_command_1):
4477 (run_inferior_command): Call agent_run_command.
4478 (gdb_ust_connect_sync_socket): Deleted. Move it to
4480 (resume_thread, stop_thread): Likewise.
4481 (gdb_ust_socket_init): Renamed to ...
4482 (gdb_agent_socket_init): ... New.
4483 (gdb_ust_thread): Renamed to ...
4484 (gdb_agent_helper_thread): ... New.
4485 (gdb_ust_init): Move some code to ...
4486 (gdb_agent_init): ... here. New.
4487 [HAVE_UST]: Call gdb_ust_init.
4488 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4489 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4490 * config.in, configure: Regenerated.
4492 2012-03-02 Pedro Alves <palves@redhat.com>
4494 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4495 * linux-low.c (struct simple_pid_list): New.
4496 (stopped_pids): New a struct simple_pid_list pointer.
4497 (add_to_pid_list, pull_pid_from_list): New.
4498 (handle_extended_wait): Don't assume the first signal new children
4499 report is SIGSTOP. Adjust call to pull_pid_from_list.
4500 (linux_wait_for_lwp): Adjust.
4502 2012-03-02 Yao Qi <yao@codesourcery.com>
4504 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4507 2012-03-02 Yao Qi <yao@codesourcery.com>
4509 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4510 `stop_pc' and `tpoint'. Update caller.
4512 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4514 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4515 * linux-low.c (use_linux_regsets): New macro.
4516 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4517 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4518 (linux_register_in_regsets): New function.
4519 (usr_fetch_inferior_registers): Skip registers covered by
4521 (usr_store_inferior_registers): Likewise.
4522 (usr_fetch_inferior_registers): New macro.
4523 (usr_store_inferior_registers): Likewise.
4524 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4525 (linux_store_registers): Likewise.
4526 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4528 (init_registers_mips64_dsp_linux): Likewise.
4529 (init_registers_mips_linux): New macro.
4530 (init_registers_mips_dsp_linux): Likewise.
4531 (mips_dsp_num_regs): Likewise.
4532 (DSP_BASE, DSP_CONTROL): New fallback macros.
4533 (mips_base_regs): New macro.
4534 (mips_regmap): Use it. Fix the size.
4535 (mips_dsp_regmap): New variable.
4536 (mips_dsp_regset_bitmap): Likewise.
4537 (mips_arch_setup): New function.
4538 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4540 (mips_cannot_store_register): Likewise.
4541 (the_low_target): Update .arch_setup, .num_regs and .regmap
4542 initializers. Add .regset_bitmap initializer.
4543 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4545 * linux-bfin-low.c (the_low_target): Likewise.
4546 * linux-cris-low.c (the_low_target): Likewise.
4547 * linux-crisv32-low.c (the_low_target): Likewise.
4548 * linux-ia64-low.c (the_low_target): Likewise.
4549 * linux-m32r-low.c (the_low_target): Likewise.
4550 * linux-m68k-low.c (the_low_target): Likewise.
4551 * linux-ppc-low.c (the_low_target): Likewise.
4552 * linux-s390-low.c (the_low_target): Likewise.
4553 * linux-sh-low.c (the_low_target): Likewise.
4554 * linux-sparc-low.c (the_low_target): Likewise.
4555 * linux-tic6x-low.c (the_low_target): Likewise.
4556 * linux-x86-low.c (the_low_target): Likewise.
4557 * linux-xtensa-low.c (the_low_target): Likewise.
4558 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4559 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4560 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4562 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4563 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4565 2012-02-29 Yao Qi <yao@codesourcery.com>
4566 Pedro Alves <palves@redhat.com>
4568 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4569 `step_over_finished' is true.
4571 2012-02-27 Pedro Alves <palves@redhat.com>
4573 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4574 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4576 2012-02-27 Pedro Alves <palves@redhat.com>
4579 * linux-low.c (pid_is_stopped): New.
4580 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4582 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4584 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4587 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4589 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4591 2012-02-24 Luis Machado <lgustavo@codesourcery>
4593 * server.c (handle_query): Advertise support for target-side
4594 breakpoint condition evaluation.
4595 (process_point_options): New function.
4596 (process_serial_event): When inserting a breakpoint, check for
4597 a target-side condition that should be evaluated.
4599 * mem-break.c: Include regcache.h and ax.h.
4600 (point_cond_list_t): New data structure.
4601 (breakpoint) <cond_list>: New field.
4602 (find_gdb_breakpoint_at): Make non-static.
4603 (delete_gdb_breakpoint_at): Clear any target-side
4605 (clear_gdb_breakpoint_conditions): New function.
4606 (add_condition_to_breakpoint): Likewise.
4607 (add_breakpoint_condition): Likewise.
4608 (gdb_condition_true_at_breakpoint): Likewise.
4609 (gdb_breakpoint_here): Return result directly instead
4610 of going through a local variable.
4612 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4613 (clear_gdb_breakpoint_conditions): Likewise.
4614 (add_breakpoint_condition): Likewise.
4615 (gdb_condition_true_at_breakpoint): Likewise.
4617 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4618 (need_step_over_p): Take target-side breakpoint condition into
4621 2012-02-24 Luis Machado <lgustavo@codesourcery>
4623 * server.h: Include tracepoint.h.
4624 (agent_mem_read, agent_get_trace_state_variable_value,
4625 agent_set_trace_state_variable_value,
4626 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4627 get_set_tsv_func_addr): New prototypes.
4629 * ax.h: New include file.
4630 * ax.c: New source file.
4632 * tracepoint.c: Include ax.h.
4633 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4634 agent_expr, eval_result_type): Move to ax.h.
4635 (parse_agent_expr): Rename to ...
4636 (gdb_parse_agent_expr): ... this, make it non-static and move
4638 (unparse_agent_expr) Rename to ...
4639 (gdb_unparse_agent_expr): ... this, make it non-static and move
4641 (eval_agent_expr): Rename to ...
4642 (eval_tracepoint_agent_expr): ... this.
4643 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4644 forward declarations.
4645 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4646 (agent_get_trace_state_variable_value): New function.
4647 (agent_set_trace_state_variable_value): New function.
4648 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4649 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4650 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4651 (condition_true_at_tracepoint): Likewise.
4652 (parse_agent_expr): Rename to ...
4653 (gdb_parse_agent_expr): ... this and move to ax.c.
4654 (unparse_agent_expr): Rename to ...
4655 (gdb_unparse_agent_expr): ... this and move to ax.c.
4656 (gdb_agent_op_name): Move to ax.c.
4657 (eval_agent_expr): Rename to ...
4658 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4660 (eval_tracepoint_agent_expr): New function.
4661 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4663 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4665 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4666 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4667 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4668 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4669 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4670 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4671 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4672 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4673 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4674 (compile_bytecodes): Remove forward declaration.
4675 (is_goto_target): Move to ax.c.
4676 (compile_bytecodes): Move to ax.c and call
4677 agent_get_trace_state_variable_value (...) and
4678 agent_set_trace_state_variable_value (...).
4680 * Makefile.in: Update ax.c and IPA dependencies.
4682 2012-02-24 Pedro Alves <palves@redhat.com>
4684 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4685 (cmd_bigqtbuffer_circular): ... this. Only handle
4686 'QTBuffer:circular:'.
4687 (handle_tracepoint_general_set): Adjust.
4689 2012-02-16 Yao Qi <yao@codesourcery.com>
4691 * inferiors.c: Move code to ...
4692 * dll.c: .... here. New.
4693 * server.h: Declare clear_dlls.
4694 * Makefile.in (SFILES): Add dll.c.
4698 2012-02-11 Yao Qi <yao@codesourcery.com>
4700 * server.c: (handle_monitor_command): Add a new parameter
4702 (handle_query): Update caller.
4704 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4706 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4707 * configure, config.in: Regenerate.
4708 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4711 2012-02-02 Pedro Alves <palves@redhat.com>
4713 Try SIGKILL first, then PTRACE_KILL.
4714 * linux-low.c (linux_kill_one_lwp): New.
4715 (linux_kill_one_lwp): Rename to ...
4716 (kill_one_lwp_callback): ... this. Use the new
4719 2012-02-02 Pedro Alves <palves@redhat.com>
4721 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4724 2012-01-27 Pedro Alves <palves@redhat.com>
4726 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4727 (elf_64_file_p): Make static.
4728 (linux_pid_exe_is_elf_64_file): New.
4729 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4730 Delete declarations.
4731 (linux_pid_exe_is_elf_64_file): Declare.
4732 * linux-x86-low.c (x86_arch_setup): Use
4733 linux_pid_exe_is_elf_64_file.
4735 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4737 * linux-low.c (linux_wait_for_event_1): Rename to ...
4738 (linux_wait_for_event): ... here and merge it with former
4739 linux_wait_for_event - new variable wait_ptid, use it.
4740 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4742 2012-01-23 Pedro Alves <palves@redhat.com>
4744 * server.c (main): Avoid yet another case of infinite loop while
4745 detaching/killing after a longjmp.
4747 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4750 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4752 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4754 * hostio.c (handle_readlink): New function.
4755 (handle_vFile): Call it to handle "vFile:readlink" packets.
4757 2012-01-20 Pedro Alves <palves@redhat.com>
4758 Ulrich Weigand <ulrich.weigand@linaro.org>
4760 * server.c (handle_v_requests): Only support vAttach and vRun to
4761 start multiple processes when in extended protocol mode.
4763 2012-01-17 Pedro Alves <palves@redhat.com>
4765 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4766 memalign plus mprotect to allocate the scratch buffer.
4768 2012-01-13 Pedro Alves <palves@redhat.com>
4770 * server.c (attach_inferior): Clear `cont_thread'.
4772 2012-01-13 Pedro Alves <palves@redhat.com>
4774 * server.c (main): Avoid infinite loop while detaching/killing
4777 2012-01-09 Doug Evans <dje@google.com>
4779 * server.c (start_inferior): Set last_ptid in --wrapper case.
4781 2012-01-06 Yao Qi <yao@codesourcery.com>
4783 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4785 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4787 2012-01-04 Yao Qi <yao@codesourcery.com>
4789 * tracepoint.c (cmd_qtdp): Print debug message
4790 for static tracepoint.
4792 2012-01-04 Yao Qi <yao@codesourcery.com>
4794 * tracepoint.c (trace_vdebug): Differentiate debug message
4795 between gdbserver and IPA.
4797 2012-01-03 Yao Qi <yao@codesourcery.com>
4799 * tracepoint.c (tracepoint_was_hit): Don't collect for
4802 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4804 * terminal.h: Reformat copyright header.
4806 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4808 * server.c (gdbserver_version): Update copyright year.
4809 * gdbreplay.c (gdbreplay_version): Likewise.
4811 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4813 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4816 2011-12-18 Hui Zhu <teawater@gmail.com>
4817 * linux-low.c (linux_create_inferior): Save return value to ret.
4819 2011-12-18 Hui Zhu <teawater@gmail.com>
4821 * linux-low.c (linux_create_inferior): Save return value to ret.
4823 2011-12-16 Doug Evans <dje@google.com>
4825 * linux-low.c (linux_create_inferior): If stdio connection,
4826 redirect stdin from /dev/null, stdout to stderr.
4827 * remote-utils.c (remote_is_stdio): New static global.
4828 (remote_connection_is_stdio): New function.
4829 (remote_prepare): Handle stdio connection.
4830 (remote_open): Ditto.
4831 (remote_close): Don't close stdin for stdio connections.
4832 (read_prim,write_prim): New functions. Replace all calls to
4833 read/write to these.
4834 * server.c (main): Watch for "-" argument. Move call to
4835 remote_prepare before start_inferior.
4836 * server.h (STDIO_CONNECTION_NAME): New macro.
4837 (remote_connection_is_stdio): Declare.
4839 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4840 in debugging output.
4842 2011-12-15 Yao Qi <yao@codesourcery.com>
4844 * tracepoint.c: Include sys/syscall.h.
4845 (gdb_ust_thread): Remove preprocessor conditional.
4847 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4849 * linux-low.c (linux_detach_one_lwp): Call
4850 the_low_target.prepare_to_resume before detaching.
4852 2011-12-14 Yao Qi <yao@codesourcery.com>
4854 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4857 2011-12-14 Yao Qi <yao@codesourcery.com>
4859 * i386-low.c (i386_low_stopped_data_address): Initialize local
4862 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4866 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4867 DR_CONTROL unless necessary. Extend comments.
4868 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4869 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4871 2011-12-13 Yao Qi <yao@codesourcery.com>
4873 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4875 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4877 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4879 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4880 Print new debug message for such case.
4882 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4884 Fix overlapping memcpy.
4885 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4886 the read_inferior_memory transfer.
4887 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4888 write_inferior_memory transfer.
4889 (set_fast_tracepoint_jump): New variable buf. Use it for the
4890 read_inferior_memory and write_inferior_memory transfers.
4891 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4892 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4893 Use it for the write_inferior_memory transfer.
4894 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4897 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4899 * linux-low.c (fetch_register, store_register): Make code
4900 consistent, fix formatting.
4902 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4904 * linux-low.c (usr_store_inferior_registers): Factor out code
4905 to handle individual registers into...
4906 (store_register): ... this new function.
4908 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4910 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4911 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4912 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4913 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4914 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4915 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4916 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4917 (srv_xmlfiles): Add new XML files.
4919 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4921 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4922 (init_registers_s390_linux32v1): Add prototype.
4923 (init_registers_s390_linux32v2): Likewise.
4924 (init_registers_s390_linux64v1): Likewise.
4925 (init_registers_s390_linux64v2): Likewise.
4926 (init_registers_s390x_linux64v1): Likewise.
4927 (init_registers_s390x_linux64v2): Likewise.
4928 (s390_num_regs): Increment to 52.
4929 (s390_regmap): Add orig_r2 register.
4930 (s390_num_regs_3264): Increment to 68.
4931 (s390_regmap_3264): Add orig_r2 register.
4932 (s390_collect_ptrace_register): Handle orig_r2 register.
4933 (s390_supply_ptrace_register): Likewise.
4934 (s390_fill_last_break): New function.
4935 (s390_store_last_break): Likewise.
4936 (s390_fill_system_call): New function.
4937 (s390_store_system_call): Likewise.
4938 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4940 (s390_check_regset): New function.
4941 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4942 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4943 Update target_regsets for available register sets.
4945 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4946 Jan Kratochvil <jan.kratochvil@redhat.com>
4948 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4949 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4951 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4952 * linux-low.h (struct process_info_private): New member r_debug.
4953 * server.c (handle_qxfer_libraries): Call
4954 the_target->qxfer_libraries_svr4.
4955 (handle_qxfer_libraries_svr4): New function.
4956 (qxfer_packets): New entry "libraries-svr4".
4957 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4958 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4959 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4960 PACKET_qXfer_libraries_svr4.
4962 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4964 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4965 PSW address/mask between 8-byte and 16-byte formats.
4966 (s390_supply_ptrace_register): Likewise.
4967 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4968 basic addressing mode bit.
4970 2011-11-24 Stan Shebs <stan@codesourcery.com>
4972 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4974 2011-11-17 Stan Shebs <stan@codesourcery.com>
4976 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4977 (tracing_start_time): New global.
4978 (tracing_stop_time): New global.
4979 (tracing_user_name): New global.
4980 (tracing_notes): New global.
4981 (tracing_stop_note): New global.
4982 (cmd_qtstart): Set traceframe_usage, start_time.
4983 (stop_tracing): Set stop_time.
4984 (cmd_qtstatus): Report additional status.
4985 (cmd_qtp): New function.
4986 (handle_tracepoint_query): Call it.
4987 (cmd_qtnotes): New function.
4988 (handle_tracepoint_general_set): Call it.
4989 (get_timestamp): Rename from tsv_get_timestamp.
4991 2011-11-14 Stan Shebs <stan@codesourcery.com>
4992 Kwok Cheung Yeung <kcy@codesourcery.com>
4994 * linux-x86-low.c (small_jump_insn): New.
4995 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4996 trampoline and error message, build a trampoline and issue a small
4997 jump instruction to it.
4998 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4999 trampoline and error message.
5000 (x86_get_min_fast_tracepoint_insn_len): New.
5001 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5002 * linux-low.h (struct linux_target_ops): Add arguments to
5003 install_fast_tracepoint_jump_pad operation, add new operation.
5004 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5006 (linux_get_min_fast_tracepoint_insn_len): New function.
5007 (linux_target_op): Add new operation.
5008 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5009 (gdb_trampoline_buffer_end): Ditto.
5010 (gdb_trampoline_buffer_error): Ditto.
5011 (struct ipa_sym_addresses): Add fields for new IPA variables.
5012 (symbol_list): Add entries for new IPA variables.
5013 (struct tracepoint): Add fields to hold the address range of the
5014 trampoline used by the tracepoint.
5015 (trampoline_buffer_head): New static variable.
5016 (trampoline_buffer_tail): Ditto.
5017 (claim_trampoline_space): New function.
5018 (have_fast_tracepoint_trampoline_buffer): New function.
5019 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5021 (install_fast_tracepoint): Ditto, also add error buffer argument.
5022 (cmd_qtminftpilen): New function.
5023 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5024 (fast_tracepoint_from_trampoline_address): New function.
5025 (fast_tracepoint_collecting): Handle trampoline as part of jump
5027 (set_trampoline_buffer_space): New function.
5028 (initialize_tracepoint): Initialize new IPA variables.
5029 * target.h (struct target_ops): Add arguments to
5030 install_fast_tracepoint_jump_pad operation, add new
5031 get_min_fast_tracepoint_insn_len operation.
5032 (target_get_min_fast_tracepoint_insn_len): New.
5033 (install_fast_tracepoint_jump_pad): Add arguments.
5034 * server.h (IPA_BUFSIZ): Define.
5035 * linux-i386-ipa.c: Include extra header files.
5036 (initialize_fast_tracepoint_trampoline_buffer): New function.
5037 (initialize_low_tracepoint): Call it.
5038 * server.h (set_trampoline_buffer_space): Declare.
5039 (claim_trampoline_space): Ditto.
5040 (have_fast_tracepoint_trampoline_buffer): Ditto.
5042 2011-11-14 Yao Qi <yao@codesourcery.com>
5044 * server.c (handle_query): Handle InstallInTrace for qSupported.
5045 * tracepoint.c (add_tracepoint): Sort list.
5046 (install_tracepoint, download_tracepoint): New.
5047 (cmd_qtdp): Call them to install and download tracepoints.
5048 (sort_tracepoints): Removed.
5049 (cmd_qtstart): Update.
5051 2011-11-14 Yao Qi <yao@codesourcery.com>
5053 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5054 * mem-break.h: Declare.
5055 * tracepoint.c (cmd_qtstart): Move some code to ...
5056 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5058 (download_tracepoints): Move some code to ...
5059 (download_tracepoint_1): ... here. New.
5061 2011-11-08 Yao Qi <yao@codesourcery.com>
5063 * remote-utils.c (relocate_instruction): A comment fix.
5065 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5067 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5068 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5069 dr_status_mirror and dr_control_mirror from debug_reg_state.
5070 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5071 (i386_initial_stuff): Remove use of deleted globals.
5072 (i386_get_thread_context, i386_set_thread_context,
5073 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5074 from debug_reg_state.
5076 2011-11-05 Yao Qi <yao@codesourcery.com>
5078 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5079 address as TPOINT's.
5081 2011-11-02 Stan Shebs <stan@codesourcery.com>
5083 * tracepoint.c (agent_mem_read_string): New function.
5084 (eval_agent_expr): Call it for tracenz.
5085 * server.c (handle_query): Report support for tracenz.
5087 2011-11-02 Yao Qi <yao@codesourcery.com>
5089 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5091 2011-11-02 Yao Qi <yao@codesourcery.com>
5093 * target.h: Fix a typo in comment.
5095 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5097 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5098 clobber the breakpoints' shadows with fast tracepoint jumps.
5099 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5100 * target.c (write_inferior_memory): Also pass MYADDR down to
5103 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5105 * configure.ac: Check support for personality routine.
5106 * configure: Regenerate.
5107 * config.in: Likewise.
5108 * linux-low.c: Include <sys/personality.h>.
5109 Define ADDR_NO_RANDOMIZE if necessary.
5110 (linux_create_inferior): Disable address space randomization when
5111 forking inferior, if requested.
5112 (linux_supports_disable_randomization): New function.
5113 (linux_target_ops): Install it.
5114 * server.h (disable_randomization): Declare.
5115 * server.c (disable_randomization): New global variable.
5116 (handle_general_set): Handle QDisableRandomization.
5117 (handle_query): Likewise for qSupported.
5118 (main): Support --disable-randomization and --no-disable-randomization
5119 command line arguments.
5120 * target.h (struct target_ops): Add supports_disable_randomization.
5121 (target_supports_disable_randomization): New macro.
5123 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5125 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5127 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5128 [!PT_GETDSBT] (target_loadmap): New definition.
5129 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5130 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5131 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5132 and PT_GETDSBT to LINUX_LOADMAP.
5133 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5134 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5136 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5138 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5139 (arm_linux_hwbp_cap): New static variable.
5140 (arm_linux_get_hwbp_cap): Replace by ...
5141 (arm_linux_init_hwbp_cap): ... this new function.
5142 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5143 (arm_linux_get_hw_watchpoint_count): Likewise.
5144 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5145 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5146 (arm_prepare_to_resume): Use perror_with_name instead of error.
5148 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5150 * linux-arm-low.c: Include <signal.h>.
5151 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5152 (struct arm_linux_hwbp_cap): New data type.
5153 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5154 (struct arm_linux_hw_breakpoint): New data type.
5155 (MAX_BPTS, MAX_WPTS): Define.
5156 (struct arch_process_info, struct arch_lwp_info): New data types.
5157 (arm_linux_get_hwbp_cap): New function.
5158 (arm_linux_get_hw_breakpoint_count): Likewise.
5159 (arm_linux_get_hw_watchpoint_count): Likewise.
5160 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5161 (arm_hwbp_control_initialize): Likewise.
5162 (arm_hwbp_control_is_enabled): Likewise.
5163 (arm_hwbp_control_is_initialized): Likewise.
5164 (arm_hwbp_control_disable): Likewise.
5165 (arm_linux_hw_breakpoint_equal): Likewise.
5166 (arm_linux_hw_point_initialize): Likewise.
5167 (struct update_registers_data): New data structure.
5168 (update_registers_callback: New function.
5169 (arm_insert_point): Likewise.
5170 (arm_remove_point): Likewise.
5171 (arm_stopped_by_watchpoint): Likewise.
5172 (arm_stopped_data_address): Likewise.
5173 (arm_new_process): Likewise.
5174 (arm_new_thread): Likewise.
5175 (arm_prepare_to_resume): Likewise.
5176 (the_low_target): Register arm_insert_point, arm_remove_point,
5177 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5178 arm_new_thread, and arm_prepare_to_resume.
5180 2011-09-15 Stan Shebs <stan@codesourcery.com>
5182 * server.h (struct emit_ops): Add compare-goto fields.
5183 * tracepoint.c (gdb_agent_op_sizes): New table.
5184 (emit_eq_goto): New function.
5185 (emit_ne_goto): New function.
5186 (emit_lt_goto): New function.
5187 (emit_le_goto): New function.
5188 (emit_gt_goto): New function.
5189 (emit_ge_goto): New function.
5190 (is_goto_target): New function.
5191 (compile_bytecodes): Recognize special cases of compare-goto
5192 combinations and call specialized emitters for them.
5193 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5194 (amd64_emit_ne_goto): New function.
5195 (amd64_emit_lt_goto): New function.
5196 (amd64_emit_le_goto): New function.
5197 (amd64_emit_gt_goto): New function.
5198 (amd64_emit_ge_goto): New function.
5199 (amd64_emit_ops): Add the new functions.
5200 (i386_emit_eq_goto): New function.
5201 (i386_emit_ne_goto): New function.
5202 (i386_emit_lt_goto): New function.
5203 (i386_emit_le_goto): New function.
5204 (i386_emit_gt_goto): New function.
5205 (i386_emit_ge_goto): New function.
5206 (i386_emit_ops): Add the new functions.
5208 2011-09-08 Stan Shebs <stan@codesourcery.com>
5210 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5211 (i386_emit_epilogue): Restore %ebx.
5213 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5215 * server.c (step_thread): Remove definition.
5216 (process_serial_event): Don't handle Hs.
5217 * server.h (step_thread): Remove declaration.
5218 * target.c (set_desired_inferior): Remove use of step_thread.
5220 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5222 * linux-low.c: Include linux-procfs.h.
5223 (linux_attach_lwp_1): Update comments.
5224 (linux_attach): Scan for existing threads when attaching to a
5225 process that is the tgid.
5226 * Makefile.in: Update dependencies.
5228 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5230 * configure.srv: Add linux-procfs.o dependencies.
5232 2011-08-14 Yao Qi <yao@codesourcery.com>
5234 * target.h (struct target_ops): Fix indent.
5235 * win32-low.c (win32_target_ops): Fix comment.
5237 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5238 Yao Qi <yao@codesourcery.com>
5240 * Makefile.in (clean): Remove tic6x-*.c files.
5241 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5242 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5243 (tic6x-c64xp-linux.c): Likewise.
5244 * configure.srv: Add support for tic6x-*-uclinux.
5245 * linux-tic6x-low.c: New.
5246 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5248 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5249 Yao Qi <yao@codesourcery.com>
5251 * target.h (struct target_ops): Add read_loadmap.
5252 * linux-low.c (struct target_loadseg): New type.
5253 (struct target_loadmap): New type.
5254 (linux_read_loadmap): New function.
5255 (linux_target_ops): Add linux_read_loadmap.
5256 * server.c (handle_query): Support qXfer:fdpic:read packet.
5257 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5260 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5262 * win32-low.c: Include <stdint.h>.
5264 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5266 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5267 to the inferior here.
5268 (i386_remove_aligned_watchpoint): Ditto.
5269 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5270 fit part of the watchpoint in the debug registers.
5271 (i386_update_inferior_debug_regs): New.
5272 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5273 registers, and only update the inferior on success.
5274 (i386_low_remove_watchpoint): Ditto.
5276 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5278 * linux-low.c (compare_ints, unique, list_threads, show_process,
5279 linux_core_of_thread): Delete.
5280 (linux_target_ops): Change linux_core_of_thread to
5281 linux_common_core_of_thread.
5282 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5283 * utils.c (malloc_failure): Change type of argument.
5284 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5285 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5286 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5287 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5288 (IPA_OBJS): Add common-utils-ipa.o.
5289 (ptid_h, linux_osdata_h): New macros.
5290 (server_h): Add common/common-utils.h, common/xml-utils.h,
5291 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5293 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5294 ptid.o, buffer.o): New rules.
5295 (linux-low.o): Add common/linux-osdata.h as a dependency.
5296 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5297 * configure.ac: Add AC_HEADER_DIRENT check.
5298 * config.in: Regenerate.
5299 * configure: Regenerate.
5300 * remote-utils.c (xml_escape_text): Delete.
5301 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5302 buffer_xml_printf): Move to common/buffer.c.
5303 * server.c (main): Remove call to initialize_inferiors.
5304 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5305 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5306 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5307 internal_error, gdb_assert, gdb_assert_fail): Delete.
5308 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5309 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5311 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5312 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5313 initialize_inferiors): Delete.
5315 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5317 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5320 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5322 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5324 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5326 2011-05-26 Yao Qi <yao@codesourcery.com>
5328 * Makefile.in (thread-db.o): Track dependence to
5329 common/gdb_thread_db.h.
5330 * thread-db.c: include gdb_thread_db.h from right place.
5332 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5334 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5335 __FILE__ and __LINE__ to internal_error.
5337 2011-05-13 Doug Evans <dje@google.com>
5339 * thread-db.c (try_thread_db_load_from_sdir): New function.
5340 (try_thread_db_load_from_dir): New function.
5341 (thread_db_load_search): Handle $sdir, ignore $pdir.
5342 Remove trying of system directories if search of
5343 libthread-db-search-path fails, that is now done via $sdir.
5345 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5347 * server.c (handle_query): Add EnableDisableTracepoints to the list
5348 of supported features.
5349 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5351 (cmd_qtenable_disable): New.
5352 (cmd_qtstart): Install tracepoints even if disabled.
5353 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5354 receiving a QTEnable or QTDisable packet.
5355 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5356 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5358 (gdb_probe): Skip data collection if static tracepoint is disabled.
5360 2011-05-10 Doug Evans <dje@google.com>
5362 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5364 2011-05-04 Doug Evans <dje@google.com>
5366 * linux-low.c (linux_join): Skip process lookup.
5367 * spu-low.c (spu_join): Ditto.
5368 * server.c (join_inferiors_callback): Delete.
5369 (process_serial_event): For 'D' packet (detach) call join_inferior
5372 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5374 * README: Don't mention xscale*-*-linux*.
5375 * configure.srv (xscale*-*-linux*): Don't handle target.
5377 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5379 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5381 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5382 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5383 (i386_emit_void_call_2): Likewise.
5385 2011-04-26 Yao Qi <yao@codesourcery.com>
5387 * linux-low.c: Move common macros to linux-ptrace.h.
5388 Include linux-ptrace.h.
5389 * Makefile.in (linux_ptrace_h): New.
5390 (linux-low.o): Depends on linux-ptrace.h.
5392 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5394 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5395 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5396 (remote_prepare): New function with most of the TCP code from ...
5397 (remote_open): ... here. Detect PORT here unconditionally. Move also
5398 setting transport_is_reliable.
5399 * server.c (run_once): New variable.
5400 (gdbserver_usage): Document it.
5401 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5402 the first run if RUN_ONCE.
5403 * server.h (run_once, remote_prepare): New declarations.
5405 2011-04-19 Tom Tromey <tromey@redhat.com>
5407 * win32-low.c (handle_load_dll): Remove duplicate "the".
5409 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5411 Remove support for old Cygwin 1.5 versions.
5412 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5413 function to avoid warning.
5414 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5417 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5419 * gdbserver/server.h (Macro _): Define it if not available.
5421 2011-03-14 Michael Snyder <msnyder@vmware.com>
5423 * hostio.c (handle_close): Remove unnecessary null test.
5425 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5427 * Makefile.in (maintainer-clean realclean distclean): Remove
5428 "make ... subdir_do" command.
5430 2011-03-10 Michael Snyder <msnyder@vmware.com>
5432 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5434 * server.c (handle_v_run): Free alloced buffer on early return.
5436 2011-03-09 Yao Qi <yao@codesourcery.com>
5439 2011-03-04 Yao Qi <yao@codesourcery.com>
5441 * Makefile.in: Remove GNU make feature --directory.
5443 2011-03-05 Yao Qi <yao@codesourcery.com>
5445 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5446 (subdir_do): New make target. Copied from gdb/Makefile.
5447 (maintainer-clean, realclean, distclean, clean): Call corresponding
5448 make targets in common/Makefile.
5450 2011-02-11 Yao Qi <yao@codesourcery.com>
5452 * configure.ac: Call AC_PROG_RANLIB.
5453 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5454 * configure: Regenerate.
5456 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5458 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5460 2011-03-06 Yao Qi <yao@codesourcery.com>
5462 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5464 2011-03-05 Yao Qi <yao@codesourcery.com>
5466 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5467 (subdir_do): New make target. Copied from gdb/Makefile.
5468 (maintainer-clean, realclean, distclean, clean): Call corresponding
5469 make targets in common/Makefile.
5471 2011-03-04 Yao Qi <yao@codesourcery.com>
5473 * Makefile.in: Remove GNU make feature --directory.
5475 2011-03-04 Michael Snyder <msnyder@vmware.com>
5477 * server.c (queue_stop_reply): Call xmalloc not malloc.
5479 2011-03-02 Michael Snyder <msnyder@vmware.com>
5481 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5483 2011-02-28 Michael Snyder <msnyder@vmware.com>
5485 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5486 (cmd_qtframe): Ditto.
5487 (cmd_qtbuffer): Ditto.
5488 (cmd_bigqtbuffer): Ditto.
5490 * utils.c (decimal2str): Initialize 'width' to nine, then
5493 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5495 * hostio.c (require_data): Free *data, not data.
5497 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5499 * hostio.c (require_data): Use free, not xfree.
5501 2011-02-27 Michael Snyder <msnyder@vmware.com>
5503 * server.c (handle_query): Discard unused value.
5505 * hostio.c (require_data): Free malloc memory before returning
5508 2011-02-26 Michael Snyder <msnyder@vmware.com>
5510 * linux-low.c (list_threads): Call closedir for dirent.
5512 2011-02-27 Michael Snyder <msnyder@vmware.com>
5514 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5515 a case statement falls through.
5517 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5519 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5522 2011-02-26 Michael Snyder <msnyder@vmware.com>
5524 * utils.c (decimal2str): Eliminate dead code and dead param.
5525 (pulongest): Drop dead param from call to decimal2str.
5528 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5530 Revert the following patch (not approved yet):
5531 2011-02-21 Hui Zhu <teawater@gmail.com>
5532 * tracepoint.c (tp_printf): New function.
5533 (eval_agent_expr): Handle gdb_agent_op_printf.
5535 2011-02-21 Hui Zhu <teawater@gmail.com>
5537 * tracepoint.c (tp_printf): New function.
5538 (eval_agent_expr): Handle gdb_agent_op_printf.
5540 2011-02-18 Tom Tromey <tromey@redhat.com>
5542 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5543 (tracepoint.o): Likewise.
5544 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5545 (gdb_agent_op_names): Likewise.
5547 2011-02-18 Tom Tromey <tromey@redhat.com>
5549 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5550 gdb_agent_op_rot>: New constants.
5551 (gdb_agent_op_names): Add pick and roll.
5552 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5555 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5557 * aclocal.m4: Regenerated with aclocal-1.11.1.
5559 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5561 * server.c (handle_qxfer_traceframe_info): New.
5562 (qxfer_packets): Register "traceframe-info".
5563 (handle_query): Report support for qXfer:traceframe-info:read+.
5564 * tracepoint.c (match_blocktype): New.
5565 (traceframe_find_block_type): Rename to ...
5566 (traceframe_walk_blocks): ... this. Add callback filter argument,
5568 (traceframe_find_block_type): New, reimplemented on top of
5569 traceframe_walk_blocks.
5570 (build_traceframe_info_xml): New.
5571 (traceframe_read_info): New.
5572 * server.h (traceframe_read_info): Declare.
5574 2011-02-11 Yao Qi <yao@codesourcery.com>
5576 * configure.ac: Call AC_PROG_RANLIB.
5577 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5578 * configure: Regenerate.
5580 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5582 * server.c (gdb_read_memory): Change return semantics to allow
5584 (handle_search_memory_1): Adjust.
5585 (process_serial_event) <'m' packet>: Handle partial transfers.
5586 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5588 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5590 * regcache.c (init_register_cache): Initialize
5591 regcache->register_status.
5592 (free_register_cache): Release regcache->register_status.
5593 (regcache_cpy): Copy register_status.
5594 (registers_to_string): Print 'x's for unavailable registers.
5595 (supply_register): Mark the register's status valid or
5596 unavailable, depending on whether a buffer was passed in or not.
5597 (supply_register_zeroed): New.
5598 (supply_regblock): Mark the registers' status valid or
5599 unavailable, depending on whether a buffer was passed in or not.
5600 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5601 (struct regcache): New `register_status' field.
5602 (supply_register_zeroed): Declare.
5603 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5604 supply_register_zeroed, rather than passing a NULL buffer to
5606 * tracepoint.c (fetch_traceframe_registers): Update comment.
5608 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5610 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5613 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5615 * server.h (decode_xfer_write): Change prototype.
5616 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5617 and don't extract the annex here.
5618 * server.c (decode_xfer_read): Remove `annex' parameter,
5619 and don't extract the annex here.
5621 (struct qxfer): New.
5622 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5623 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5624 (handle_qxfer_statictrace): New functions, abstracted out from
5625 handle_query, and made to use the struct qxfer interface.
5626 (handle_threads_qxfer_proper): Rename to ...
5627 (handle_qxfer_threads_proper): ... this.
5628 (handle_threads_qxfer): Rename to ...
5629 (handle_qxfer_threads): ... this. Adjust.
5630 (qxfer_packets): New array.
5631 (handle_qxfer): New function.
5632 (handle_query): Use handle_qxfer.
5634 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5636 * gdbreplay.c: Shorten lines of >= 80 columns.
5637 * linux-low.c: Ditto.
5638 * linux-ppc-low.c: Ditto.
5639 * linux-s390-low.c: Ditto.
5640 * linux-sparc-low.c: Ditto.
5641 * linux-x86-low.c: Ditto.
5642 * linux-xtensa-low.c: Ditto.
5643 * mem-break.c: Ditto.
5645 * regcache.h: Ditto.
5646 * remote-utils.c: Ditto.
5649 * thread-db.c: Ditto.
5650 * tracepoint.c: Ditto.
5652 * win32-low.h: Ditto.
5654 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5656 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5659 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5661 * server.c (gdbserver_version): Update copyright year in version
5663 * gdbreplay.c (gdbreplay_version): Ditto.
5665 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5667 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5668 * linux-bfin-low.c: New file.
5669 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5670 PT_DATA_ADDR for BFIN targets.
5671 * Makefile.in (SFILES): Add linux-bfin-low.c.
5672 (clean): Remove reg-bfin.c.
5673 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5674 * README: Mention supported Blackfin targets.
5676 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5678 * .gitignore: New file.
5680 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5682 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5684 2010-10-22 Jie Zhang <jie@codesourcery.com>
5686 * Makefile.in: Add FLAGS_TO_PASS variable.
5687 (install): Remove dependency of install-only and recursively
5688 invoke make for install-only.
5690 2010-10-04 Doug Evans <dje@google.com>
5692 * Makefile.in (uninstall): Use $(DESTDIR).
5694 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5698 * linux-x86-low.c (compat_siginfo_from_siginfo)
5699 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5700 si_code is < 0. Check for si_code == SI_TIMER before checking for
5703 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5705 * lynx-i386-low.c: New file.
5706 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5708 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5710 * lynx-low.c (ptrace_request_to_str): Remove handling for
5711 request values that have been removed in LynxOS 5.x.
5713 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5715 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5718 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5720 * configure.ac: Add --enable-inprocess-agent option.
5721 * configure: Rebuilt.
5723 2010-09-06 Yao Qi <yao@codesourcery.com>
5725 * linux-low.c (linux_kill): Remove unused variable.
5726 (linux_stabilize_threads): Likewise.
5727 * server.c (start_inferior): Likewise.
5728 (queue_stop_reply_callback): Likewise.
5729 * tracepoint.c (do_action_at_tracepoint): Likewise.
5731 2010-09-06 Yao Qi <yao@codesourcery.com>
5733 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5736 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5738 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5740 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5742 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5745 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5747 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5748 gdbserver/lynx-ppc-low.c: New files.
5749 * Makefile.in (lynx_low_h): New variable.
5750 (lynx-low.o, lynx-ppc-low.o): New rules.
5751 * configure.ac: On LynxOS, link with -lnetinet.
5752 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5753 * configure: regenerate.
5755 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5757 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5758 * configure.ac: Add check for vasprintf and vsnprintf.
5759 * configure, config.in: Regenerate.
5760 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5762 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5764 * gdbreplay.c: Move include of alloca.h up, next to include of
5766 * server.h: Add include of malloc.h.
5767 * mem-break.c: Remove include of malloc.h.
5768 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5770 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5772 * Makefile.in (memmem.o): Build with -Wno-error.
5774 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5776 * utils.c (xsnprintf): Make non-static.
5777 * server.h: Add xsnprintf declaration.
5778 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5779 replace calls to snprintf by calls to xsnprintf throughout.
5781 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5783 * configure.ac: Add configure check for alloca.
5784 * configure, config.in: Regenerate.
5785 * server.h: Include alloca.h if it exists.
5786 * gdbreplay.c: Include alloca.h if it exists.
5788 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5790 * linux-low.c (__SIGRTMIN): Define if not already defined.
5791 (linux_create_inferior): Check for __ANDROID__ rather than
5793 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5794 are already deferred.
5795 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5796 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5797 stopped and already has a pending signal to report.
5798 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5799 a pending signal to report or is moving out of a jump pad.
5800 (linux_init_signals): Check for __ANDROID__ rather than
5803 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5805 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5806 debug_threads check. Avoid a linear search when not doing debug
5809 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5811 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5812 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5813 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5814 (process_event): Change local fd's type to gdb_fildes_t.
5815 (create_file_handler): Adjust prototype.
5816 (delete_file_handler): Adjust prototype.
5817 (handle_file_event): Adjust prototype. Use pfildes.
5818 (create_file_event): Adjsut prototype.
5819 * remote-utils.c (remote_desc, listen_desc): Change type to
5821 * server.h: New gdb_fildes_t typedef.
5822 [USE_WIN32API]: Include winsock2.h.
5823 (delete_file_handler, add_file_handler): Adjust prototypes.
5825 * utils.c (pfildes): New.
5827 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5829 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5830 * configure: Regenerate.
5832 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5834 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5835 (linux_done_accessing_memory): ... this.
5836 (linux_target_ops): Adjust.
5837 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5838 * nto-low.c (nto_target_ops): Adjust comment.
5839 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5840 * spu-low.c (spu_target_ops): Adjust comment.
5841 * target.h (target_ops): Rename unprepare_to_access_memory field
5842 to done_accessing_memory.
5843 (unprepare_to_access_memory): Rename to ...
5844 (done_accessing_memory): ... this.
5846 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5848 * linux-low.c (linux_prepare_to_access_memory): New.
5849 (linux_unprepare_to_access_memory): New.
5850 (linux_target_ops): Install them.
5851 * server.c (read_memory): Rename to ...
5852 (gdb_read_memory): ... this. Use
5853 prepare_to_access_memory/prepare_to_access_memory.
5854 (write_memory): Rename to ...
5855 (gdb_write_memory): ... this. Use
5856 prepare_to_access_memory/prepare_to_access_memory.
5857 (handle_search_memory_1): Adjust.
5858 (process_serial_event): Adjust.
5859 * target.h (struct target_ops): New fields
5860 prepare_to_access_memory and unprepare_to_access_memory.
5861 (prepare_to_access_memory, unprepare_to_access_memory): New.
5862 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5863 prepare_to_access_memory/prepare_to_access_memory.
5864 * nto-low.c (nto_target_ops): Adjust.
5865 * spu-low.c (spu_target_ops): Adjust.
5866 * win32-low.c (win32_target_ops): Adjust.
5868 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5870 * Makefile.in (WARN_CFLAGS): Get it from configure.
5871 (WERROR_CFLAGS): New.
5872 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5873 * configure.ac: Introduce --enable-werror, which adds -Werror to
5874 the compiler command line. Enabled by default. Disable with
5875 --disable-werror. Add -Wdeclaration-after-statement
5876 Wpointer-arith and -Wformat-nonliteral to warning flags.
5877 * configure: Regenerate.
5879 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5881 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5883 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5885 * gdbreplay.c (remote_error): New.
5887 (expect): Use gdbchar. Check for error reading from GDB.
5888 Clarify sync error output.
5889 (play): Check for errors writing to GDB.
5890 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5891 * remote-utils.c (getpkt): Check for errors writing to the remote
5894 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5896 * linux-low.c (linux_wait_1): Move non-debugging code out of
5897 `debug_threads' control.
5899 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5901 * linux-low.c (linux_wait_1): Don't set last_status here.
5902 * server.c (push_event, queue_stop_reply_callback): Assert we're
5903 not pushing a TARGET_WAITKIND_IGNORE event.
5904 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5905 (myresume, handle_target_event): Set the thread's last_resume_kind
5906 and last_status from the target returned status.
5908 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5912 * linux-x86-low.c (update_debug_registers_callback): New.
5913 (i386_dr_low_set_addr): Use it.
5914 (i386_dr_low_get_addr): New.
5915 (i386_dr_low_set_control): Use update_debug_registers_callback.
5916 (i386_dr_low_get_control): New.
5917 (i386_dr_low_get_status): Adjust.
5918 * linux-low.c (linux_stop_lwp): New.
5919 * linux-low.h (linux_stop_lwp): Declare.
5921 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5922 argument instead of a i386_debug_reg_state.
5923 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5924 a i386_debug_reg_state.
5925 (i386_insert_aligned_watchpoint): Adjust.
5926 (i386_remove_aligned_watchpoint): Adjust.
5927 (i386_low_stopped_data_address): Read the debug registers from the
5928 inferior instead of from the mirrors.
5929 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5930 (i386_dr_low_get_addr): Declare.
5931 (i386_dr_low_get_control): Declare.
5932 (i386_dr_low_get_status): Change prototype.
5934 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5935 (i386_dr_low_get_addr): New.
5936 (i386_dr_low_get_control): New.
5937 (i386_dr_low_get_status): Adjust prototype. Return
5939 (i386_initial_stuff): Clear dr_status_mirror and
5941 (i386_get_thread_context): Adjust.
5942 (i386_set_thread_context): Adjust.
5943 (i386_thread_added): Adjust.
5945 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5947 * linux-low.h (linux_thread_area): Delete declaration.
5949 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5951 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5952 after its termination.
5954 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5956 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5957 (gdb_wants_all_stopped): Delete.
5958 (linux_wait_1): Don't call them.
5959 * server.c (handle_v_cont): Tag all threads as want-stopped.
5960 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5961 stopped as "client-wants-stopped".
5963 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5965 * Makefile.in (signals_h): New.
5966 (server_h): Depend on it.
5967 (server.o): Don't depend on $(signals_def).
5968 (signals.o): Depend on $(signals_def).
5970 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5972 * Makefile.in (signals_def): New.
5973 (server_h): Append include/gdb/signals.h and signals_def.
5974 (server.o): Append signals_def.
5976 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5978 * server.c (handle_target_event): Use target_signal_to_host for
5979 resume_info.sig initialization.
5980 * target.h (struct thread_resume) <sig>: New comment.
5982 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5984 * server.c (handle_query): strcpy() the returned string from paddress()
5985 instead of sprintf().
5986 * utils.c (paddress): Return phex_nz().
5988 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5990 * server.c (handle_v_cont): Call mourn_inferior if process
5992 (myresume): Likewise.
5994 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5996 Static tracepoints, and integration with UST.
5998 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5999 * mem-break.c (uninsert_all_breakpoints)
6000 (reinsert_all_breakpoints): New.
6001 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6002 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6003 (gdb_agent_ust_loaded, helper_thread_id)
6004 (gdb_agent_helper_thread_id): New macros.
6005 (struct ipa_sym_addresses): Add addr_ust_loaded,
6006 addr_helper_thread_id, addr_cmd_buf.
6007 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6008 (in_process_agent_loaded_ust): New.
6009 (write_e_ust_not_loaded): New.
6010 (maybe_write_ipa_ust_not_loaded): New.
6011 (struct collect_static_trace_data_action): New.
6012 (enum tracepoint_type) <static_tracepoint>: New.
6013 (struct tracepoint) <handle>: Mention static tracepoints.
6014 (struct static_tracepoint_ctx): New.
6015 (CMD_BUF_SIZE): New.
6016 (add_tracepoint_action): Handle static tracepoint actions.
6017 (unprobe_marker_at): New.
6018 (clear_installed_tracepoints): Handle static tracepoints.
6019 (cmd_qtdp): Handle static tracepoints.
6020 (probe_marker_at): New.
6021 (cmd_qtstart): Handle static tracepoints.
6022 (response_tracepoint): Handle static tracepoints.
6023 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6024 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6025 (get_context_regcache): Handle static tracepoints.
6026 (do_action_at_tracepoint): Handle static tracepoint actions.
6027 (traceframe_find_block_type): Handle static trace data blocks.
6028 (traceframe_read_sdata): New.
6029 (download_tracepoints): Download static tracepoint actions.
6030 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6031 (GDB_PROBE_NAME): New.
6036 (ust_marker_to_static_tracepoint): New.
6038 (collect_ust_data_at_tracepoint): New.
6039 (gdb_ust_probe): New.
6040 (UNIX_PATH_MAX, SOCK_DIR): New.
6041 (gdb_ust_connect_sync_socket): New.
6042 (resume_thread, stop_thread): New.
6043 (run_inferior_command): New.
6044 (init_named_socket): New.
6045 (gdb_ust_socket_init): New.
6046 (cstr_to_hexstr): New.
6048 (first_marker, next_marker): New.
6049 (response_ust_marker): New.
6050 (cmd_qtfstm, cmd_qtsstm): New.
6051 (unprobe_marker_at, probe_marker_at): New.
6052 (cmd_qtstmat, gdb_ust_thread): New.
6053 (gdb_ust_init): New.
6054 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6055 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6057 (x86_64_st_collect_regmap): New.
6058 (X86_64_NUM_ST_COLLECT_GREGS): New.
6059 (AMD64_RIP_REGNUM): New.
6060 (supply_static_tracepoint_registers): New.
6061 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6063 (i386_st_collect_regmap): New.
6064 (i386_NUM_ST_COLLECT_GREGS): New.
6065 (supply_static_tracepoint_registers): New.
6066 * server.c (handle_query): Handle qXfer:statictrace:read.
6067 <qSupported>: Report support for StaticTracepoints, and
6068 qXfer:statictrace:read features.
6069 * server.h (traceframe_read_sdata)
6070 (supply_static_tracepoint_registers): Declare.
6071 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6072 (unpack_varlen_hex): Include in IPA build.
6073 * Makefile.in (ustlibs, ustinc): New.
6074 (IPA_OBJS): Add remote-utils-ipa.o.
6075 ($(IPA_LIB)): Link -ldl and -lpthread.
6077 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6078 * config.in, configure: Regenerate.
6080 2010-06-20 Ian Lance Taylor <iant@google.com>
6081 Pedro Alves <pedro@codesourcery.com>
6083 * linux-x86-low.c (always_true): Delete.
6084 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6085 trying to fool the compiler with always_true.
6087 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6089 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6090 conditions in gdbserver.
6092 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6094 * spu-low.c (spu_read_memory): Wrap around local store limit.
6095 (spu_write_memory): Likewise.
6097 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6099 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6100 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6102 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6104 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6105 uses with LONGEST uses.
6107 2010-06-14 Stan Shebs <stan@codesourcery.com>
6108 Pedro Alves <pedro@codesourcery.com>
6112 * linux-x86-low.c: Include limits.h.
6117 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6118 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6119 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6120 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6121 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6122 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6123 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6124 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6125 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6126 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6127 (amd64_emit_void_call_2): New.
6128 (amd64_emit_ops): New.
6129 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6130 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6131 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6132 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6133 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6134 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6135 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6136 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6137 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6138 (i386_emit_stack_adjust, i386_emit_int_call_1)
6139 (i386_emit_void_call_2): New.
6140 (i386_emit_ops): New.
6141 (x86_emit_ops): New.
6142 (the_low_target): Install x86_emit_ops.
6143 * server.h (struct emit_ops): New.
6144 (get_raw_reg_func_addr): Declare.
6145 (current_insn_ptr, emit_error): Declare.
6146 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6147 (set_trace_state_variable_value): New defines.
6148 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6149 addr_get_trace_state_variable_value and
6150 addr_set_trace_state_variable_value.
6151 (symbol_list): New fields for get_raw_reg,
6152 get_trace_state_variable_value and set_trace_state_variable_value.
6153 (condfn): New typedef.
6154 (struct tracepoint): New field `compiled_cond'.
6155 (do_action_at_tracepoint): Clear compiled_cond.
6156 (get_trace_state_variable_value, set_trace_state_variable_value):
6158 (condition_true_at_tracepoint): If there's a compiled condition,
6160 (current_insn_ptr, emit_error): New globals.
6161 (struct bytecode_address): New.
6162 (get_raw_reg_func_addr): New.
6163 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6164 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6165 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6166 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6167 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6168 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6169 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6170 (compile_tracepoint_condition, compile_bytecodes): New.
6171 * target.h (emit_ops): Forward declare.
6172 (struct target_ops): New field emit_ops.
6173 (target_emit_ops): New.
6174 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6175 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6176 * linux-low.c (linux_emit_ops): New.
6177 (linux_target_ops): Install it.
6178 * linux-low.h (struct linux_target_ops): New field emit_ops.
6180 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6182 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6183 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6185 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6186 Stan Shebs <stan@codesourcery.com>
6188 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6189 (all): Depend on $(extra_libraries).
6190 (install-only): Install the IPA.
6191 (IPA_OBJS, IPA_LIB): New.
6192 (clean): Remove the IPA lib.
6193 (IPAGENT_CFLAGS): New.
6194 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6195 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6196 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6197 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6198 * configure.ac: Check for atomic builtins support in the compiler.
6199 (IPA_DEPFILES, extra_libraries): Define.
6200 * configure.srv (ipa_obj): Add description.
6201 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6202 (i[34567]86-*-linux*): Set ipa_obj.
6203 (x86_64-*-linux*): Set ipa_obj.
6204 * linux-low.c (stabilizing_threads): New.
6205 (supports_fast_tracepoints): New.
6206 (linux_detach): Stabilize threads before detaching.
6207 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6208 the lwp is either not stabilizing, or is moving out of a jump pad.
6209 (linux_fast_tracepoint_collecting): New.
6210 (maybe_move_out_of_jump_pad): New.
6211 (enqueue_one_deferred_signal): New.
6212 (dequeue_one_deferred_signal): New.
6213 (linux_wait_for_event_1): If moving out of a jump pad, defer
6214 pending signals to later.
6215 (linux_stabilize_threads): New.
6216 (linux_wait_1): Check if threads need moving out of jump pads, and
6218 (stuck_in_jump_pad_callback): New.
6219 (move_out_of_jump_pad_callback): New.
6221 (linux_resume_one_lwp): Handle moving out of jump pads.
6222 (linux_set_resume_request): Dequeue deferred signals.
6223 (need_step_over_p): Also step over fast tracepoint jumps.
6224 (start_step_over): Also uninsert fast tracepoint jumps.
6225 (finish_step_over): Also reinsert fast tracepoint jumps.
6226 (linux_install_fast_tracepoint_jump): New.
6227 (linux_target_ops): Install linux_stabilize_threads and
6228 linux_install_fast_tracepoint_jump_pad.
6229 * linux-low.h (linux_target_ops) <get_thread_area,
6230 install_fast_tracepoint_jump_pad>: New fields.
6231 (struct lwp_info) <collecting_fast_tracepoint,
6232 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6233 (linux_get_thread_area): Declare.
6234 * linux-x86-low.c (jump_insn): New.
6235 (x86_get_thread_area): New.
6236 (append_insns): New.
6238 (amd64_install_fast_tracepoint_jump_pad): New.
6239 (i386_install_fast_tracepoint_jump_pad): New.
6240 (x86_install_fast_tracepoint_jump_pad): New.
6241 (the_low_target): Install x86_get_thread_area and
6242 x86_install_fast_tracepoint_jump_pad.
6243 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6244 (struct fast_tracepoint_jump): New.
6245 (fast_tracepoint_jump_insn): New.
6246 (fast_tracepoint_jump_shadow): New.
6247 (find_fast_tracepoint_jump_at): New.
6248 (fast_tracepoint_jump_here): New.
6249 (delete_fast_tracepoint_jump): New.
6250 (set_fast_tracepoint_jump): New.
6251 (uninsert_fast_tracepoint_jumps_at): New.
6252 (reinsert_fast_tracepoint_jumps_at): New.
6253 (set_breakpoint_at): Use write_inferior_memory.
6254 (uninsert_raw_breakpoint): Use write_inferior_memory.
6255 (check_mem_read): Mask out fast tracepoint jumps.
6256 (check_mem_write): Mask out fast tracepoint jumps.
6257 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6258 (set_fast_tracepoint_jump): Declare.
6259 (delete_fast_tracepoint_jump)
6260 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6261 (reinsert_fast_tracepoint_jumps_at): Declare.
6262 * regcache.c: Don't compile many functions when building the
6263 in-process agent library.
6264 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6265 the register buffer in the heap.
6266 (free_register_cache): If the register buffer isn't owned by the
6267 regcache, don't free it.
6268 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6269 pre-existing register caches.
6270 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6272 (convert_ascii_to_int): : Constify `from' parameter type.
6273 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6274 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6275 the needed buffer in-place.
6276 (relocate_instruction): New.
6277 * server.c (handle_query) <qSymbols>: If the target supports
6278 tracepoints, give it a chance of looking up symbols. Report
6279 support for fast tracepoints.
6280 (handle_status): Stabilize threads.
6281 (process_serial_event): Adjust.
6282 * server.h (struct fast_tracepoint_jump): Forward declare.
6283 (struct process_info) <fast_tracepoint_jumps>: New field.
6284 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6285 (decode_X_packet, decode_M_packet): Adjust.
6286 (relocate_instruction): Declare.
6287 (in_process_agent_loaded): Declare.
6288 (tracepoint_look_up_symbols): Declare.
6289 (struct fast_tpoint_collect_status): Declare.
6290 (fast_tracepoint_collecting): Declare.
6291 (force_unlock_trace_buffer): Declare.
6292 (handle_tracepoint_bkpts): Declare.
6293 (initialize_low_tracepoint)
6294 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6295 * target.h (struct target_ops) <stabilize_threads,
6296 install_fast_tracepoint_jump_pad>: New fields.
6297 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6298 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6299 [HAVE_STDINT_H]: Include stdint.h.
6300 (trace_debug_1): Rename to ...
6301 (trace_vdebug): ... this.
6302 (trace_debug): Rename to ...
6303 (trace_debug_1): ... this. Add `level' parameter.
6305 (ATTR_USED, ATTR_NOINLINE): New.
6306 (IP_AGENT_EXPORT): New.
6307 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6308 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6309 (about_to_request_buffer_space, trace_buffer_is_full)
6310 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6311 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6312 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6313 (traceframe_write_count, traceframes_created)
6314 (trace_state_variables)
6315 New renaming defines.
6316 (struct ipa_sym_addresses): New.
6317 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6319 (ipa_sym_addrs): New.
6320 (all_tracepoint_symbols_looked_up): New.
6321 (in_process_agent_loaded): New.
6322 (write_e_ipa_not_loaded): New.
6323 (maybe_write_ipa_not_loaded): New.
6324 (tracepoint_look_up_symbols): New.
6325 (debug_threads) [IN_PROCESS_AGENT]: New.
6326 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6327 (UNKNOWN_SIDE_EFFECTS): New.
6328 (stop_tracing): New.
6329 (flush_trace_buffer): New.
6330 (stop_tracing_bkpt): New.
6331 (flush_trace_buffer_bkpt): New.
6332 (read_inferior_integer): New.
6333 (read_inferior_uinteger): New.
6334 (read_inferior_data_pointer): New.
6335 (write_inferior_data_pointer): New.
6336 (write_inferior_integer): New.
6337 (write_inferior_uinteger): New.
6338 (struct collect_static_trace_data_action): Delete.
6339 (enum tracepoint_type): New.
6340 (struct tracepoint) <type>: New field `type'.
6341 <actions_str, step_actions, step_actions_str>: Only include in
6343 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6344 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6345 (tracepoints): Use IP_AGENT_EXPORT.
6346 (last_tracepoint): Don't include in the IPA.
6347 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6348 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6349 (alloced_trace_state_variables): New.
6350 (trace_state_variables): Use IP_AGENT_EXPORT.
6351 (traceframe_t): Delete unused variable.
6352 (circular_trace_buffer): Don't include in the IPA.
6353 (trace_buffer_start): Delete.
6354 (struct trace_buffer_control): New.
6355 (trace_buffer_free): Delete.
6356 (struct ipa_trace_buffer_control): New.
6357 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6358 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6360 (trace_buffer_ctrl): New.
6361 (TRACE_BUFFER_CTRL_CURR): New.
6362 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6363 Reimplement as macros.
6364 (trace_buffer_wrap): Delete.
6365 (traceframe_write_count, traceframe_read_count)
6366 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6367 (struct tracepoint_hit_ctx) <type>: New field.
6368 (struct fast_tracepoint_ctx): New.
6369 (memory_barrier): New.
6371 (record_tracepoint_error): Update atomically in the IPA.
6372 (clear_inferior_trace_buffer): New.
6373 (about_to_request_buffer_space): New.
6374 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6375 updating the same buffer.
6376 (add_tracepoint): Default the tracepoint's type to trap
6377 tracepoint, and orig_size to -1.
6378 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6380 (create_trace_state_variable): New parameter `gdb'. Handle it.
6381 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6382 (cmd_qtdp): Handle fast tracepoints.
6384 (max_jump_pad_size): New.
6385 (gdb_jump_pad_head): New.
6386 (get_jump_space_head): New.
6387 (claim_jump_space): New.
6388 (sort_tracepoints): New.
6389 (MAX_JUMP_SIZE): New.
6390 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6392 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6393 support. Upload fast traceframes, and delete internal IPA
6395 (stop_tracing_handler): New.
6396 (flush_trace_buffer_handler): New.
6397 (cmd_qtstop): Upload fast tracepoints.
6398 (response_tracepoint): Handle fast tracepoints.
6399 (tracepoint_finished_step): Upload fast traceframes. Set the
6400 tracepoint hit context's tracepoint type.
6401 (handle_tracepoint_bkpts): New.
6402 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6403 type. Add comment about fast tracepoints.
6404 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6405 non-existing action_str field.
6406 (get_context_regcache): Handle fast tracepoints.
6407 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6409 (fast_tracepoint_from_jump_pad_address): New.
6410 (fast_tracepoint_from_ipa_tpoint_address): New.
6411 (collecting_t): New.
6412 (force_unlock_trace_buffer): New.
6413 (fast_tracepoint_collecting): New.
6416 (write_inferior_data_ptr): New.
6417 (target_tp_heap): New.
6418 (target_malloc): New.
6419 (download_agent_expr): New.
6421 (download_tracepoints): New.
6422 (download_trace_state_variables): New.
6423 (upload_fast_traceframes): New.
6424 (IPA_FIRST_TRACEFRAME): New.
6425 (IPA_NEXT_TRACEFRAME_1): New.
6426 (IPA_NEXT_TRACEFRAME): New.
6427 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6428 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6429 (gdb_jump_pad_buffer_end): New.
6430 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6431 (initialize_tracepoint): Adjust.
6432 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6433 buffer. Initialize the low module.
6434 * utils.c (PREFIX, TOOLNAME): New.
6435 (malloc_failure): Use PREFIX.
6436 (error): In the IPA, an error causes an exit.
6437 (fatal, warning): Use PREFIX.
6438 (internal_error): Use TOOLNAME.
6439 (NUMCELLS): Increase to 10.
6440 * configure, config.in: Regenerate.
6442 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6444 * server.c (handle_query) <qSupported>: Do two passes over the
6445 qSupported string to avoid nesting strtok.
6447 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6449 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6451 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6453 * configure: Regenerate.
6454 * proc-service.list: New.
6456 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6458 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6461 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6463 * gdbreplay.c (remote_open): Check error return from socket() call by
6464 its equality to -1 not by it being negative.
6465 * remote-utils.c (remote_open): Likewise.
6467 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6469 * config.h: Regenerate.
6471 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6473 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6474 doesn't provide PTRACE_GET_THREAD_AREA.
6476 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6478 * linux-m68k-low.c: Include <asm/ptrace.h>
6479 (ps_get_thread_area): Implement.
6481 2010-05-03 Doug Evans <dje@google.com>
6483 * event-loop.c (struct callback_event): New struct.
6484 (callback_list): New global.
6485 (append_callback_event, delete_callback_event): New functions.
6486 (process_callback): New function.
6487 (start_event_loop): Call it.
6488 * remote-utils.c (NOT_SCHEDULED): Define.
6489 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6490 moved out of readchar.
6491 (readchar): Rewrite. Call reschedule before returning.
6492 (reset_readchar): New function.
6493 (remote_close): Call it.
6494 (process_remaining, reschedule): New functions.
6495 * server.h (callback_handler_func): New typedef.
6496 (append_callback_event, delete_callback_event): Declare.
6498 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6500 * proc-service.c (ps_pglobal_lookup): Use
6501 thread_db_look_up_one_symbol.
6502 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6503 parameter. Use it instead of all_symbols_looked_up.
6504 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6506 (all_symbols_looked_up): Don't declare.
6507 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6508 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6510 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6511 Set all_symbols_looked_up here.
6512 (thread_db_look_up_one_symbol): New.
6513 (thread_db_get_tls_address): Adjust.
6514 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6515 thread_db object on the heap, and tentatively set it in the
6517 (thread_db_init): Don't set all_symbols_looked_up here.
6518 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6520 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6522 * linux-low.c (linux_kill, linux_detach): Adjust.
6523 (status_pending_p_callback): Remove redundant statement. Check
6524 for !TARGET_WAITIKIND_IGNORE, instead of
6525 TARGET_WAITKIND_STOPPED.
6526 (handle_tracepoints): Make sure LWP is locked. Adjust.
6527 (linux_wait_for_event_1): Adjust.
6528 (linux_cancel_breakpoints): New.
6529 (unsuspend_one_lwp): New.
6530 (unsuspend_all_lwps): New.
6531 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6532 (send_sigstop_callback): Change return type to int, add new
6533 `except' parameter and handle it.
6534 (suspend_and_send_sigstop_callback): New.
6535 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6536 pass them down. If SUSPEND, also increment the lwp's suspend
6538 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6539 (need_step_over_p): Don't consider suspended LWPs.
6540 (start_step_over): Adjust.
6541 (proceed_one_lwp): Change return type to int, add new `except'
6542 parameter and handle it.
6543 (unsuspend_and_proceed_one_lwp): New.
6544 (proceed_all_lwps): Use find_inferior instead of
6546 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6547 also decrement the suspend count of LWPs. Pass `except' down,
6548 instead of hacking its suspend count.
6549 (linux_pause_all): Add `freeze' parameter. Adjust.
6550 (linux_unpause_all): New.
6551 (linux_target_ops): Install linux_unpause_all.
6552 * server.c (handle_status): Adjust.
6553 * target.h (struct target_ops): New fields `unpause_all' and
6554 `cancel_breakpoints'. Add new parameter to `pause_all'.
6555 (pause_all): Add new `freeze' parameter.
6557 (cancel_breakpoints): New.
6558 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6560 (cmd_qtstart): Pause threads.
6561 (stop_tracing): Pause threads, and cancel breakpoints.
6562 * win32-low.c (win32_target_ops): Adjust.
6564 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6566 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6567 the inferior right away from here...
6568 (linux_wait_1): ... to here, and adjust to check the thread's
6569 last_resume_kind instead of the lwp's step or stop_expected flags.
6571 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6573 * README: Use consistent `GDB' and `GDBserver' spellings.
6575 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6577 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6578 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6579 (linux_detach_one_lwp): Assume the lwp is stopped.
6580 (any_thread_of): Delete.
6581 (linux_detach): Stop all lwps here. Don't blindly delete all
6583 (delete_lwp_callback): New.
6584 (linux_mourn): Delete all lwps of the process that is gone.
6585 (linux_wait_1): Don't delete the last lwp of the process here.
6586 * mem-break.h (mark_breakpoints_out): Declare.
6587 * mem-break.c (mark_breakpoints_out): New.
6588 (free_all_breakpoints): Use it.
6589 * server.c (handle_target_event): If the process is gone, mark
6591 * thread-db.c (struct thread_db) <create_bp>: New field.
6592 (thread_db_enable_reporting): Fix prototype. Store a thread event
6593 breakpoint reference in the thread_db struct.
6594 (thread_db_load_search): Clear the thread_db object.
6595 (try_thread_db_load_1): Ditto.
6596 (switch_to_process): New.
6597 (disable_thread_event_reporting): Use it.
6598 (remove_thread_event_breakpoints): New.
6599 (thread_db_detach, thread_db_mourn): Use it.
6601 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6603 * linux-low.c (linux_enable_event_reporting): New.
6604 (linux_wait_for_event_1, handle_extended_wait): Use it.
6606 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6608 * linux-low.c (linux_kill_one_lwp, linux_kill)
6609 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6610 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6611 SIGSTOP even if the LWP is stopped.
6612 (send_sigstop_callback): New.
6613 (stop_all_lwps): Use send_sigstop_callback instead.
6614 (linux_resume_one_thread): Adjust.
6615 (proceed_one_lwp): Still proceed an LWP that the client has
6616 requested to stop, if we haven't reported it as stopped yet. Make
6617 sure that LWPs the client want stopped, have a pending SIGSTOP.
6619 2010-04-26 Doug Evans <dje@google.com>
6621 * server.c (handle_general_set): Make static.
6623 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6624 Print received char after testing for error/eof instead of before.
6625 (input_interrupt): Tweak comment.
6627 2010-04-23 Doug Evans <dje@google.com>
6629 * server.c (start_inferior): Print inferior argv if --debug.
6631 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6633 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6634 * nto-x86-low.c: Include server.h
6636 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6638 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6639 be consistent with other sources of this directory.
6640 (init_registers_amd64): Correct name of source file of this function
6643 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6645 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6648 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6650 * win32-i386-low.c: Add 64-bit support.
6651 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6652 (init_registers_amd64): Declare.
6653 (mappings): Add 64-bit version of array.
6654 (init_windows_x86): New function.
6655 (the_low_target): Change init_arch field to init_windows_x86.
6657 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6659 * win32-low.c: Adapt to support also 64-bit architecture.
6660 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6661 (get_image_name): Use SIZE_T type for local variable `done'.
6662 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6663 (toolhelp_get_dll_name): Idem.
6664 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6665 Use uintptr_t typecast to avoid warning.
6666 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6667 (handle_exception): Use phex_nz to avoid warning.
6668 (win32_wait): Remove unused local variable `process'.
6670 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6672 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6675 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6677 * configure.ac: Use `ws2_32' library for srv_mingw.
6678 * configure: Regenerate.
6679 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6680 * remote-utils.c: Likewise.
6682 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6684 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6685 if __x86_64__ is defined.
6687 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6689 * configure: Regenerate.
6691 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6693 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6694 * target.h (target_ops): New get_tib_address field.
6695 * win32-low.h (win32_thread_info): Add thread_local_base field.
6696 * win32-low.c (child_add_thread): Add tlb argument.
6697 Set thread_local_base field to TLB.
6698 (get_child_debug_event): Adapt to child_add_thread change.
6699 (win32_get_tib_address): New function.
6700 (win32_target_ops): Set get_tib_address field to
6701 win32_get_tib_address.
6702 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6704 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6706 * linux-low.c (linux_mourn): Also remove the process.
6707 * server.c (handle_target_event): Don't remove the process here.
6708 * nto-low.c (nto_mourn): New.
6709 (nto_target_ops): Install it.
6710 * spu-low.c (spu_mourn): New.
6711 (spu_target_ops): Install it.
6712 * win32-low.c (win32_mourn): New.
6713 (win32_target_ops): Install it.
6715 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6717 * server.h (buffer_xml_printf): Remove redundant `;'.
6719 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6721 * regcache.c (set_register_cache): Invalidate regcaches before
6722 changing the register cache layout.
6723 (regcache_invalidate_one): Allow a NULL regcache.
6724 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6725 regcaches before changing the register cache layout or the target
6728 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6730 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6731 variable warning on Linux/x86-64.
6733 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6735 GDBserver disconnected tracing support.
6737 * linux-low.c (linux_remove_process): Delete.
6738 (add_lwp): Don't set last_resume_kind here.
6739 (linux_kill): Use `mourn'.
6740 (linux_detach): Use `thread_db_detach', and `mourn'.
6742 (linux_attach_lwp_1): Adjust comment.
6743 (linux_attach): last_resume_kind moved the thread_info; adjust.
6744 (status_pending_p_callback): Adjust.
6745 (linux_wait_for_event_1): Adjust.
6746 (count_events_callback, select_singlestep_lwp_callback)
6747 (select_event_lwp_callback, cancel_breakpoints_callback)
6748 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6749 (proceed_one_lwp): Adjust.
6750 (linux_async): Add debug output.
6751 (linux_thread_stopped): New.
6752 (linux_pause_all): New.
6753 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6755 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6756 (thread_db_free): Delete declaration.
6757 (thread_db_detach, thread_db_mourn): Declare.
6758 * thread-db.c (thread_db_init): Use thread_db_mourn.
6759 (thread_db_free): Delete, split in two.
6760 (disable_thread_event_reporting): New.
6761 (thread_db_detach): New.
6762 (thread_db_mourn): New.
6764 * server.h (struct thread_info) <last_resume_kind>: New field.
6765 <attached>: Add comment.
6766 <gdb_detached>: New field.
6767 (handler_func): Change return type to int.
6768 (handle_serial_event, handle_target_event): Ditto.
6769 (gdb_connected): Declare.
6771 (disconnected_tracing): Declare.
6772 (stop_tracing): Declare.
6774 * server.c (handle_query) <qSupported>: Report support for
6775 disconnected tracing.
6776 (queue_stop_reply_callback): Account for running threads.
6777 (gdb_wants_thread_stopped): New.
6778 (gdb_wants_all_threads_stopped): New.
6779 (gdb_reattached_process): New.
6780 (handle_status): Clear the `gdb_detached' flag of all processes.
6781 In all-stop, stop all threads.
6782 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6783 (process_serial_event): If the remote connection breaks, or if an
6784 exit was forced with "monitor exit", force an event loop exit.
6785 Handle disconnected tracing on detach.
6786 (handle_serial_event): Adjust.
6787 (handle_target_event): If GDB isn't connected, forward events back
6788 to the inferior, unless the last process exited, in which case,
6789 exit gdbserver. Adjust interface.
6791 * remote-utils.c (remote_open): Don't block in accept. Instead
6792 register an event loop source on the listen socket file
6793 descriptor. Refactor bits into ...
6794 (listen_desc): ... this new global.
6795 (gdb_connected): ... this new function.
6796 (enable_async_notification): ... this new function.
6797 (handle_accept_event): ... this new function.
6798 (remote_close): Clear remote_desc.
6800 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6802 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6804 (mourn_inferior): Define.
6805 (target_process_qsupported): Avoid the dangling else problem.
6806 (thread_stopped): Define.
6807 (pause_all): Define.
6808 (target_waitstatus_to_string): Declare.
6809 * target.c (target_waitstatus_to_string): New.
6811 * tracepoint.c (tracing): Make extern.
6812 (disconnected_tracing): New.
6813 (stop_tracing): Make extern. Handle tracing stops due to GDB
6815 (cmd_qtdisconnected): New.
6816 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6817 (handle_tracepoint_general_set): Handle QTDisconnected.
6819 * event-loop.c (event_handler_func): Change return type to int.
6820 (process_event): Bail out if the event handler wants the event
6822 (handle_file_event): Ditto.
6823 (start_event_loop): Bail out if the event handler wants the event
6826 * nto-low.c (nto_target_ops): Adjust.
6827 * spu-low.c (spu_wait): Don't remove the process here.
6828 (spu_target_ops): Adjust.
6829 * win32-low.c (win32_wait): Don't remove the process here.
6830 (win32_target_ops): Adjust.
6832 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6834 * regcache.c (realloc_register_cache): Invalidate inferior's
6835 regcache before recreating it.
6837 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6839 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6841 2010-04-09 Stan Shebs <stan@codesourcery.com>
6842 Pedro Alves <pedro@codesourcery.com>
6844 * server.h (LONGEST): New.
6845 (struct thread_info) <while_stepping>: New field.
6846 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6848 (initialize_tracepoint, handle_tracepoint_general_set)
6849 (handle_tracepoint_query, tracepoint_finished_step)
6850 (tracepoint_was_hit, release_while_stepping_state_list):
6851 (current_traceframe): Declare.
6852 * server.c (handle_general_set): Handle tracepoint packets.
6854 (write_memory): New.
6855 (handle_search_memory_1): Use read_memory.
6856 (handle_query): Report support for conditional tracepoints, trace
6857 state variables, and tracepoint sources. Handle tracepoint
6859 (main): Initialize the tracepoints module.
6860 (process_serial_event): Handle traceframe reads/writes.
6862 * linux-low.c (handle_tracepoints): New.
6863 (linux_wait_1): Call it.
6864 (linux_resume_one_lwp): Handle while-stepping.
6865 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6866 (linux_target_ops): Install them.
6867 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6869 * linux-x86-low.c (x86_supports_tracepoints): New.
6870 (the_low_target). Install it.
6872 * mem-break.h (delete_breakpoint): Declare.
6873 * mem-break.c (delete_breakpoint): Make external.
6875 * target.h (struct target_ops): Add `supports_tracepoints',
6876 `read_pc', and `write_pc' fields.
6877 (target_supports_tracepoints): Define.
6878 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6881 * regcache.h (struct regcache) <registers_owned>: New field.
6882 (init_register_cache, regcache_cpy): Declare.
6883 (regcache_read_pc, regcache_write_pc): Declare.
6884 (register_cache_size): Declare.
6885 (supply_regblock): Declare.
6886 * regcache.c (init_register_cache): New.
6887 (new_register_cache): Use it.
6888 (regcache_cpy): New.
6889 (register_cache_size): New.
6890 (supply_regblock): New.
6891 (regcache_read_pc, regcache_write_pc): New.
6893 * tracepoint.c: New.
6895 * Makefile.in (OBS): Add tracepoint.o.
6896 (tracepoint.o): New rule.
6898 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6900 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6902 (i386-mmx.c): Likewise.
6903 (i386-mmx-linux.o): Likewise.
6904 (i386-mmx-linux.c): Likewise.
6906 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6907 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6908 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6909 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6911 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6912 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6913 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6915 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6917 * Makefile.in (clean): Updated.
6919 (i386-avx.c): Likewise.
6920 (i386-avx-linux.o): Likewise.
6921 (i386-avx-linux.c): Likewise.
6922 (amd64-avx.o): Likewise.
6923 (amd64-avx.c): Likewise.
6924 (amd64-avx-linux.o): Likewise.
6925 (amd64-avx-linux.c): Likewise.
6927 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6928 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6929 (srv_amd64_regobj): Add amd64-avx.o.
6930 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6931 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6932 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6933 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6934 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6935 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6936 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6938 * i387-fp.c: Include "i386-xstate.h".
6940 (i387_cache_to_xsave): Likewise.
6941 (i387_xsave_to_cache): Likewise.
6942 (x86_xcr0): Likewise.
6944 * i387-fp.h (i387_cache_to_xsave): Likewise.
6945 (i387_xsave_to_cache): Likewise.
6946 (x86_xcr0): Likewise.
6948 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6949 * linux-crisv32-low.c (target_regsets): Likewise.
6950 * linux-m68k-low.c (target_regsets): Likewise.
6951 * linux-mips-low.c (target_regsets): Likewise.
6952 * linux-ppc-low.c (target_regsets): Likewise.
6953 * linux-s390-low.c (target_regsets): Likewise.
6954 * linux-sh-low.c (target_regsets): Likewise.
6955 * linux-sparc-low.c (target_regsets): Likewise.
6956 * linux-xtensa-low.c (target_regsets): Likewise.
6958 * linux-low.c: Include <sys/uio.h>.
6959 (regsets_fetch_inferior_registers): Support nt_type.
6960 (regsets_store_inferior_registers): Likewise.
6961 (linux_process_qsupported): New.
6962 (linux_target_ops): Add linux_process_qsupported.
6964 * linux-low.h (regset_info): Add nt_type.
6965 (linux_target_ops): Add process_qsupported.
6967 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6969 (init_registers_i386_avx_linux): New.
6970 (init_registers_amd64_avx_linux): Likewise.
6971 (xmltarget_i386_linux_no_xml): Likewise.
6972 (xmltarget_amd64_linux_no_xml): Likewise.
6973 (PTRACE_GETREGSET): Likewise.
6974 (PTRACE_SETREGSET): Likewise.
6975 (x86_fill_xstateregset): Likewise.
6976 (x86_store_xstateregset): Likewise.
6977 (use_xml): Likewise.
6978 (x86_linux_update_xmltarget): Likewise.
6979 (x86_linux_process_qsupported): Likewise.
6980 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6981 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6982 init_registers_i386_linux here. Call
6983 x86_linux_update_xmltarget.
6984 (the_low_target): Add x86_linux_process_qsupported.
6986 * server.c (handle_query): Call target_process_qsupported.
6988 * target.h (target_ops): Add process_qsupported.
6989 (target_process_qsupported): New.
6991 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6993 * inferiors.c (add_thread): Set last_status kind to
6994 TARGET_WAITKIND_IGNORE.
6995 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6996 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6997 (linux_wait_1): Move `thread' local definition to block that uses
6998 it. Don't NULL initialize `event_child'.
6999 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7000 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7001 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7003 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7005 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7006 an extended waitstatus, or by a watchpoint.
7007 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7008 thread was stepping or has been stopped by a watchpoint.
7010 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7012 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7013 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7014 of another, then delete the previous, and validate all
7016 (validate_inserted_breakpoint): New.
7017 (delete_disabled_breakpoints): New.
7018 (validate_breakpoints): New.
7019 (check_mem_read): Validate breakpoints before trusting their
7020 shadow. Delete disabled breakpoints.
7021 (check_mem_write): Validate breakpoints before trusting they
7022 should be inserted. Delete disabled breakpoints.
7023 * mem-break.h (validate_breakpoints):
7024 * server.c (handle_query): Validate breakpoints when we see a
7027 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7029 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7030 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7031 if we could tell there's a GDB breakpoint at stop_pc.
7032 (need_step_over_p): Don't do a step over if we find a GDB
7033 breakpoint at the resume PC.
7035 * mem-break.c (struct raw_breakpoint): New.
7036 (enum bkpt_type): New type `gdb_breakpoint'.
7037 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7038 fields. New field `raw'.
7039 (find_raw_breakpoint_at): New.
7040 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7042 (set_breakpoint_at): Adjust.
7043 (delete_raw_breakpoint): New.
7044 (release_breakpoint): New.
7045 (delete_breakpoint): Rename to...
7046 (delete_breakpoint_1): ... this. Add proc parameter. Use
7047 release_breakpoint. Return ENOENT.
7048 (delete_breakpoint): Reimplement.
7049 (find_breakpoint_at): Delete.
7050 (find_gdb_breakpoint_at): New.
7051 (delete_breakpoint_at): Delete.
7052 (set_gdb_breakpoint_at): New.
7053 (delete_gdb_breakpoint_at): New.
7054 (gdb_breakpoint_here): New.
7055 (set_reinsert_breakpoint): Use release_breakpoint.
7056 (uninsert_breakpoint): Rename to ...
7057 (uninsert_raw_breakpoint): ... this.
7058 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7059 (reinsert_raw_breakpoint): Change parameter type to
7061 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7063 (check_breakpoints): Adjust. Use release_breakpoint.
7064 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7065 (breakpoint_inserted_here): Ditto.
7066 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7067 Don't trust the breakpoint's shadow if it is not inserted.
7068 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7069 (delete_all_breakpoints): Adjust.
7070 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7071 use delete_breakpoint_1.
7073 * mem-break.h (breakpoints_supported): Delete declaration.
7074 (set_gdb_breakpoint_at): Declare.
7075 (gdb_breakpoint_here): Declare.
7076 (delete_breakpoint_at): Delete.
7077 (delete_gdb_breakpoint_at): Declare.
7079 * server.h (struct raw_breakpoint): Forward declare.
7080 (struct process_info): New field `raw_breakpoints'.
7082 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7085 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7087 * linux-low.c (status_pending_p_callback): Fix comment.
7088 (linux_wait_for_event_1): Move most of the internal breakpoint
7089 handling from here...
7090 (linux_wait_1): ... to here.
7091 (count_events_callback): New.
7092 (select_singlestep_lwp_callback): New.
7093 (select_event_lwp_callback): New.
7094 (cancel_breakpoints_callback): New.
7095 (select_event_lwp): New.
7096 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7097 priority to all LWPs that have had events that should be reported
7098 to the client. Cancel breakpoints when about to reporting the
7099 event to the client, not while stopping lwps. No longer cancel
7100 finished single-steps here.
7101 (cancel_finished_single_step): Delete.
7102 (cancel_finished_single_steps): Delete.
7104 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7106 * mem-break.c (enum bkpt_type): New.
7107 (struct breakpoint): New field `type'.
7108 (set_breakpoint_at): Change return type to struct breakpoint
7109 pointer. Set type to `other_breakpoint' by default.
7110 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7111 in the breakpoint list.
7112 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7113 (reinsert_breakpoint): Rename to ...
7114 (reinsert_raw_breakpoint): ... this.
7115 (reinsert_breakpoints_at): Adjust.
7116 * mem-break.h (struct breakpoint): Declare.
7117 (set_breakpoint_at): Change return type to struct breakpoint
7120 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7122 * server.c (handle_query): Assign, not compare.
7124 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7126 Teach linux gdbserver to step-over-breakpoints.
7128 * linux-low.c (can_hardware_single_step): New.
7129 (supports_breakpoints): New.
7130 (handle_extended_wait): If stopping threads, read the stop pc of
7133 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7134 low target doesn't support retrieving the PC.
7135 (add_lwp): Set last_resume_kind to resume_continue.
7136 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7137 (linux_attach): Don't clear stop_expected. Set the lwp's
7138 last_resume_kind to resume_stop.
7139 (linux_detach_one_lwp): Don't check for removed breakpoints.
7140 (check_removed_breakpoint): Delete.
7141 (status_pending_p): Rename to ...
7142 (status_pending_p_callback): ... this. Don't check for removed
7143 breakpoints. Don't consider threads that are stopped from GDB's
7145 (linux_wait_for_lwp): Always read the stop_pc here.
7146 (cancel_breakpoint): New.
7147 (step_over_bkpt): New global.
7148 (linux_wait_for_event_1): Implement stepping over breakpoints.
7149 (gdb_wants_lwp_stopped): New.
7150 (gdb_wants_all_stopped): New.
7151 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7152 single-step traps here. Store the thread's last reported target
7154 (send_sigstop): Don't clear stop_expected. Always set it,
7156 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7157 (cancel_finished_single_step): New.
7158 (cancel_finished_single_steps): New.
7159 (wait_for_sigstop): Don't cancel finished single-step traps here.
7160 (linux_resume_one_lwp): Don't check for removed breakpoints.
7161 Don't set `step' on non-hardware step archs.
7162 (linux_set_resume_request): Ignore resume_stop requests if already
7163 stopping or stopped. Set the lwp's last_resume_kind.
7164 (resume_status_pending_p): Don't check for removed breakpoints.
7165 (need_step_over_p): New.
7166 (start_step_over): New.
7167 (finish_step_over): New.
7168 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7169 requests. Clear the thread's last reported target waitstatus.
7170 Don't use the `suspended' flag. Don't consider pending breakpoints.
7171 (linux_resume): Start a step-over if necessary.
7172 (proceed_one_lwp): New.
7173 (proceed_all_lwps): New.
7174 (unstop_all_lwps): New.
7175 * linux-low.h (struct lwp_info): Rewrite comment for the
7176 `suspended' flag. Add the `stop_pc' field. Delete the
7177 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7178 Add `'last_resume_kind' and `need_step_over' fields.
7179 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7180 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7181 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7182 (set_raw_breakpoint_at): New.
7183 (set_breakpoint_at): Rewrite to use it.
7184 (reinsert_breakpoint_handler): Delete.
7185 (set_reinsert_breakpoint): New.
7186 (reinsert_breakpoint_by_bp): Delete.
7187 (delete_reinsert_breakpoints): New.
7188 (uninsert_breakpoint): Rewrite.
7189 (uninsert_breakpoints_at): New.
7190 (reinsert_breakpoint): Rewrite.
7191 (reinsert_breakpoints_at): New.
7192 (check_breakpoints): Rewrite.
7193 (breakpoint_here): New.
7194 (breakpoint_inserted_here): New.
7195 (check_mem_read): Adjust.
7196 * mem-break.h (breakpoints_supported, breakpoint_here)
7197 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7198 (reinsert_breakpoint_by_bp): Delete declaration.
7199 (delete_reinsert_breakpoints): Declare.
7200 (reinsert_breakpoint): Delete declaration.
7201 (reinsert_breakpoints_at): Declare.
7202 (uninsert_breakpoint): Delete declaration.
7203 (uninsert_breakpoints_at): Declare.
7204 (check_breakpoints): Adjust prototype.
7205 * server.h: Adjust include order.
7206 (struct thread_info): Declare here. Add a `last_status' field.
7208 2010-03-23 Michael Snyder <msnyder@vmware.com>
7210 * server.c (crc32): New function.
7211 (handle_query): Add handling for 'qCRC:' request.
7213 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7215 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7216 lwp had been stopped by a watchpoint.
7218 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7220 * server.h (internal_error): Declare.
7221 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7222 * utils.c (internal_error): New function.
7224 2010-03-15 Andreas Schwab <schwab@redhat.com>
7226 * configure.srv: Fix typo setting srv_regobj.
7228 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7230 * linux-low.c (fetch_register): Avoid passing a non string literal
7232 (usr_store_inferior_registers): Ditto.
7234 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7236 * linux-low.c (linux_write_memory): Bail out early if peeking
7239 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7241 * linux-low.h (struct lwp_info): New fields
7242 `stopped_by_watchpoint' and `stopped_data_address'.
7243 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7244 here, and cache them in the lwp object.
7245 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7247 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7249 (linux_stopped_by_watchpoint): Rewrite.
7250 (linux_stopped_data_address): Rewrite.
7252 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7254 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7255 switching the current inferior, not before.
7257 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7259 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7260 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7261 i386-linux.c and amd64-linux.c.
7262 (reg-i386.o): Removed.
7263 (reg-i386.c): Likewise.
7264 (reg-i386-linux.o): Likewise.
7265 (reg-i386-linux.c): Likewise.
7266 (reg-x86-64.o): Likewise.
7267 (reg-x86-64.c): Likewise.
7268 (reg-x86-64-linux.o): Likewise.
7269 (reg-x86-64-linux.c): Likewise.
7272 (i386-linux.o): Likewise.
7273 (i386-linux.c): Likewise.
7274 (amd64.o): Likewise.
7275 (amd64.c): Likewise.
7276 (amd64-linux.o): Likewise.
7277 (amd64-linux.c): Likewise.
7279 * configure.srv (srv_i386_regobj): New.
7280 (srv_i386_linux_regobj): Likewise.
7281 (srv_amd64_regobj): Likewise.
7282 (srv_amd64_linux_regobj): Likewise.
7283 (srv_i386_32bit_xmlfiles): Likewise.
7284 (srv_i386_64bit_xmlfiles): Likewise.
7285 (srv_i386_xmlfiles): Likewise.
7286 (srv_amd64_xmlfiles): Likewise.
7287 (srv_i386_linux_xmlfiles): Likewise.
7288 (srv_amd64_linux_xmlfiles): Likewise.
7289 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7290 srv_xmlfiles to $srv_i386_xmlfiles.
7291 (i[34567]86-*-mingw32ce*): Likewise.
7292 (i[34567]86-*-mingw*): Likewise.
7293 (i[34567]86-*-nto*): Likewise.
7294 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7295 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7296 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7297 (x86_64-*-linux*): Likewise.
7299 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7300 (init_registers_amd64_linux): New.
7301 (x86_arch_setup): Replace init_registers_x86_64_linux with
7302 init_registers_amd64_linux.
7304 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7306 * configure.ac: Check for libdl. If it is not available link against
7307 static libthread_db.
7308 * configure: Regenerate.
7310 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7314 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7315 handing a read watchpoint.
7316 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7318 2010-02-12 Doug Evans <dje@google.com>
7320 * linux-low.c (linux_supports_tracefork_flag): Document.
7321 (linux_look_up_symbols): Add comment.
7323 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7325 * regcache.c (supply_register): Clear regcache if buf is NULL.
7327 2010-02-02 Nicolas Roche <roche@sourceware.org>
7328 Joel Brobecker <brobecker@adacore.com>
7330 * inferiors.c (find_inferior): Add function documentation.
7331 (unloaded_dll): Handle the case where the unloaded dll has not
7332 been previously registered in the dll list.
7334 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7336 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7337 (thumb2_breakpoint): New.
7338 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7340 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7342 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7343 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7346 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7348 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7350 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7352 * linux-s390-low.c (s390_collect_ptrace_register)
7353 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7355 2010-01-21 Doug Evans <dje@google.com>
7357 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7358 (PTRACE_ARG4_TYPE): New macro.
7359 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7360 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7361 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7362 (usr_store_inferior_registers): Ditto.
7363 (linux_read_memory, linux_write_memory): Ditto.
7364 (linux_test_for_tracefork): Ditto.
7366 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7367 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7369 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7371 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7374 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7376 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7377 prototype to take a regcache. Adjust.
7379 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7381 * regcache.h (struct thread_info): Forward declare.
7382 (struct regcache): New.
7383 (new_register_cache): Adjust prototype.
7384 (get_thread_regcache): Declare.
7385 (free_register_cache): Adjust prototype.
7386 (registers_to_string, registers_from_string): Ditto.
7387 (supply_register, supply_register_by_name, collect_register)
7388 (collect_register_as_string, collect_register_by_name): Ditto.
7389 * regcache.c (struct inferior_regcache_data): Delete.
7390 (get_regcache): Rename to ...
7391 (get_thread_regcache): ... this. Adjust. Switch inferior before
7393 (regcache_invalidate_one): Adjust.
7394 (regcache_invalidate): Fix prototype.
7395 (new_register_cache): Return the new register cache.
7396 (free_register_cache): Change prototype.
7397 (realloc_register_cache): Adjust.
7398 (registers_to_string): Change prototype to take a regcache. Adjust.
7399 (registers_from_string): Ditto.
7400 (register_data): Ditto.
7401 (supply_register): Ditto.
7402 (supply_register_by_name): Ditto.
7403 (collect_register): Ditto.
7404 (collect_register_as_string): Ditto.
7405 (collect_register_by_name): Ditto.
7406 * server.c (process_serial_event): Adjust.
7407 * linux-low.h (regset_fill_func, regset_store_func): Change
7409 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7411 * linux-low.c (get_stop_pc): Adjust.
7412 (check_removed_breakpoint): Adjust.
7413 (linux_wait_for_event): Adjust.
7414 (linux_resume_one_lwp): Adjust.
7415 (fetch_register): Add regcache parameter. Adjust.
7416 (usr_store_inferior_registers): Ditto.
7417 (regsets_fetch_inferior_registers): Ditto.
7418 (regsets_store_inferior_registers): Ditto.
7419 (linux_fetch_registers, linux_store_registers): Ditto.
7420 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7422 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7424 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7425 prototype to take a regcache.
7426 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7427 * remote-utils.c (convert_ascii_to_int, outreg)
7428 (prepare_resume_reply): Change prototype to take a regcache.
7430 * target.h (struct target_ops) <fetch_registers, store_registers>:
7431 Change prototype to take a regcache.
7432 (fetch_inferior_registers, store_inferior_registers): Change
7433 prototype to take a regcache. Adjust.
7434 * proc-service.c (ps_lgetregs): Adjust.
7435 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7436 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7437 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7438 take a regcache. Adjust.
7439 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7440 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7441 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7442 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7443 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7444 (cris_cannot_fetch_register):
7445 (cris_breakpoint_at): Change prototype to take a regcache.
7447 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7448 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7449 to take a regcache. Adjust.
7450 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7452 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7453 take a regcache. Adjust.
7454 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7455 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7456 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7457 * linux-mips-low.c (mips_get_pc):
7458 (mips_set_pc): Change prototype to take a regcache. Adjust.
7459 (mips_reinsert_addr): Adjust.
7460 (mips_collect_register): Change prototype to take a regcache.
7462 (mips_supply_register):
7463 (mips_collect_register_32bit, mips_supply_register_32bit)
7464 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7465 (mips_store_fpregset): Ditto.
7466 * linux-ppc-low.c (ppc_supply_ptrace_register)
7467 (ppc_supply_ptrace_register): Ditto.
7468 (parse_spufs_run): Adjust.
7469 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7470 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7471 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7472 take a regcache. Adjust.
7473 * linux-s390-low.c (s390_collect_ptrace_register)
7474 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7475 (s390_set_pc): Change prototype to take a regcache. Adjust.
7476 (s390_arch_setup): Adjust.
7477 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7478 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7479 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7480 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7481 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7483 (sparc_breakpoint_at): Adjust.
7484 * linux-xtensa-low.c (xtensa_fill_gregset):
7485 (xtensa_store_gregset):
7486 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7487 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7488 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7489 prototype to take a regcache. Adjust.
7490 * win32-arm-low.c (arm_fetch_inferior_register)
7491 (arm_store_inferior_register): Change prototype to take a
7493 * win32-i386-low.c (i386_fetch_inferior_register)
7494 (i386_store_inferior_register): Change prototype to take a
7496 * win32-low.c (child_fetch_inferior_registers)
7497 (child_store_inferior_registers): Change prototype to take a
7499 (win32_wait): Adjust.
7500 (win32_fetch_inferior_registers): Change prototype to take a
7502 (win32_store_inferior_registers): Adjust.
7503 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7504 store_inferior_register>: Change prototype to take a regcache.
7506 2010-01-20 Doug Evans <dje@google.com>
7508 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7510 (linux_wait_for_event1, linux_init_signals): Ditto.
7511 (W_STOPCODE): Provide definition if missing.
7513 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7515 * linux-low.c (linux_core_of_thread): New.
7516 (compare_ints, show_process, list_threads): New.
7517 (linux_qxfer_osdata): Report threads and cores.
7518 (linux_target_op): Register linux_core_of_thread.
7519 * remote-utils.c (prepare_resume_reply): Report the core.
7520 (buffer_xml_printf): Support %d specifier.
7521 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7523 (handle_query): Handle qXfer:threads. Announce availability
7525 * target.h (struct target_ops): New field core_of_thread.
7527 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7529 * Makefile.in (clean): Remove new generated files.
7530 (reg-s390.o, reg-s390.c): Remove rules.
7531 (reg-s390x.o, reg-s390x.c): Likewise.
7532 (s390-linux32.o, s390-linux32.c): Add rules.
7533 (s390-linux64.o, s390-linux64.c): Likewise.
7534 (s390x-linux64.o, s390x-linux64.c): Likewise.
7535 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7536 * linux-s390-low.c: Include <elf.h>.
7537 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7538 (init_registers_s390): Remove prototype.
7539 (init_registers_s390x): Likewise.
7540 (init_registers_s390_linux32): Add prototype.
7541 (init_registers_s390_linux64): Likewise.
7542 (init_registers_s390x_linux64): Likewise.
7543 (s390_num_regs_3264): New define.
7544 (s390_regmap_3264): New global variable.
7545 (s390_cannot_fetch_register): Remove obsolete check.
7546 (s390_cannot_store_register): Likewise.
7547 (s390_collect_ptrace_register): Handle upper/lower register halves.
7548 (s390_supply_ptrace_register): Likewise.
7549 (s390_fill_gregset): Update to register number changes.
7550 (s390_get_hwcap): New routine.
7551 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7552 Install appropriate regmap and register set.
7554 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7556 * server.c (gdbserver_version): Update copyright year to 2010.
7557 * gdbreplay.c (gdbreplay_version): Likewise.
7559 2009-12-28 Doug Evans <dje@google.com>
7561 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7562 elf/external.h. Include <elf.h> instead but only if necessary.
7564 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7566 * linux-low.c (linux_remove_process): Remove `detaching'
7567 parameter. Don't release/detach from thread_db here.
7568 (linux_kill): Release/detach from thread_db here, ...
7569 (linux_detach): ... and here, before actually detaching.
7570 (linux_wait_1): ... and here, when a process exits.
7571 * thread-db.c (any_thread_of): New.
7572 (thread_db_free): Switch the current inferior to a thread of the
7575 2009-12-21 Doug Evans <dje@google.com>
7577 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7579 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7580 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7581 warning ifndef __NR_tkill. Move setting of errno there too.
7582 Delete unnecessary resetting of errno after syscall.
7583 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7585 * configure.ac: Check for dladdr.
7586 * config.in: Regenerate.
7587 * configure: Regenerate.
7588 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7589 (try_thread_db_load): Update.
7591 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7593 2009-12-18 Doug Evans <dje@google.com>
7595 * event-loop.c: Include unistd.h if it exists.
7597 * linux-low.c (my_waitpid): Move definition away from being in
7598 between linux_tracefork_child/linux_test_for_tracefork.
7600 * gdb_proc_service.h (psaddr_t): Fix type.
7601 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7602 signature to match glibc.
7604 2009-12-16 Doug Evans <dje@google.com>
7606 * linux-low.c (linux_read_memory): Fix argument to read.
7608 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7610 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7611 events, don't leave current_inferior pointing at null.
7613 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7615 * win32-low.c (LOG): Delete.
7616 (OUTMSG): Output to stderr.
7617 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7618 on compile time LOG macro.
7619 (win32_wait): Fix debug output.
7621 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7623 * win32-low.c (win32_add_one_solib): If the dll name is
7624 "ntdll.dll", prepend the system directory to the dll path.
7626 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7628 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7630 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7631 Vladimir Prus <vladimir@codesourcery.com>
7633 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7634 * configure.ac: Check for __mcoldfire__ and set
7635 gdb_cv_m68k_is_coldfire.
7636 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7637 reg-cf.o and reg-m68k.o.
7638 * configure: Regenerated.
7640 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7642 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7643 Pass it to thread_db_free.
7644 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7645 proper `detaching' argument to linux_remove_process.
7646 * linux-low.h (thread_db_free): Add `detaching' parameter.
7647 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7649 (thread_db_free): Add `detaching' parameter. Only
7650 call td_ta_clear_event if detaching from process.
7652 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7654 * thread-db.c (thread_db_free): Fix typo.
7656 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7659 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7661 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7663 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7664 with an i686 compiler.
7665 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7667 * configure: Rebuilt.
7669 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7673 * server.c (handle_search_memory_1): Correct read_addr initialization
7674 in loop for searching subsequent chunks.
7676 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7678 * configure.ac: New --with-libthread-db option.
7679 * thread-db.c: Allow direct dependence on libthread_db.
7680 (thread_db_free): Adjust.
7681 * config.in: Regenerate.
7682 * configure: Likewise.
7684 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7687 * thread-db.c (attach_thread): New function.
7688 (maybe_attach_thread): Return success/failure.
7689 (find_new_threads_callback): Adjust.
7690 (thread_db_find_new_threads): Loop until no new threads.
7692 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7694 * proc-service.c (ps_lgetregs): Formatting.
7696 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7698 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7699 * configure.ac: Adjust.
7700 * linux-low.h (struct process_info_private): Move members to struct
7702 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7703 * linux-low.c (linux_remove_process): Adjust.
7704 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7705 * server.c (handle_query): Move code ...
7706 (handle_monitor_command): ... here. New function.
7707 * target.h (struct target_ops): New member.
7708 * thread-db.c (struct thread_db): New.
7709 (libthread_db_search_path): New variable.
7710 (thread_db_create_event, thread_db_enable_reporting)
7711 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7712 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7713 (try_thread_db_load_1, dladdr_to_soname): New functions.
7714 (try_thread_db_load, thread_db_load_search): New functions.
7715 (thread_db_init): Search for libthread_db.
7716 (thread_db_free): New function.
7717 (thread_db_handle_monitor_command): Likewise.
7718 * config.in: Regenerate.
7719 * configure: Regenerate.
7721 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7723 * spu-low.c (spu_kill): Wait for inferior to terminate.
7724 Call clear_inferiors.
7725 (spu_detach): Call clear_inferiors.
7727 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7729 * aclocal.m4: Regenerate.
7730 * config.in: Likewise.
7731 * configure: Likewise.
7733 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7735 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7736 (parse_spufs_run): New function.
7737 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7738 (ppc_breakpoint_at): Handle SPU breakpoints.
7740 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7742 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7743 (SPUFS_MAGIC): Define.
7744 (spu_enumerate_spu_ids): New function.
7745 (linux_qxfer_spu): New function.
7746 (linux_target_ops): Install linux_qxfer_spu.
7748 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7750 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7751 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7752 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7753 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7754 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7755 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7756 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7757 (init_registers_powerpc_cell32l): Add prototype.
7758 (init_registers_powerpc_cell64l): Likewise.
7759 (ppc_arch_setup): Detect Cell/B.E. architecture.
7761 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7763 * Makefile.in (datarootdir): New variable.
7765 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7767 * linux-low.c (linux_write_memory): Update debugging output.
7768 * Makefile.in (clean): Add new descriptions.
7769 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7770 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7771 * configure.srv: Add new files for arm*-*-linux*.
7772 * linux-arm-low.c: Add new declarations.
7773 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7774 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7775 (HWCAP_VFPv3D16): New.
7776 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7777 instead of __IWMMXT__.
7778 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7779 (arm_arch_setup): New.
7780 (target_regsets): Remove #ifdef. Add VFP regset.
7781 (the_low_target): Use arm_arch_setup.
7783 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7785 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7786 the main thread again.
7788 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7790 Adding Neutrino gdbserver.
7791 * configure: Regenerated.
7792 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7793 * configure.srv (i[34567]86-*-nto*): New target.
7794 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7795 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7796 (nto_comctrl) [__QNX__]: New function.
7797 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7799 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7801 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7804 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7805 Pedro Alves <pedro@codesourcery.com>
7807 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7808 don't support CONTEXT_EXTENDED_REGISTERS.
7809 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7810 (the_low_target): Install them.
7811 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7812 failing with ERROR_PIPE_NOT_CONNECTED.
7814 2009-06-30 Doug Evans <dje@google.com>
7815 Pierre Muller <muller@ics.u-strasbg.fr>
7817 Add h/w watchpoint support to x86-linux, win32-i386.
7818 * Makefile.in (SFILES): Add i386-low.c
7819 (i386_low_h): Define.
7820 (i386-low.o): Add dependencies.
7821 (linux-x86-low.o): Add i386-low.h dependency.
7822 (win32-i386-low.o): Ditto.
7823 * i386-low.c: New file.
7824 * i386-low.h: New file.
7825 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7826 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7827 * linux-low.c (linux_add_process): Initialize arch_private.
7828 (linux_remove_process): Free arch_private.
7829 (add_lwp): Initialize arch_private.
7830 (delete_lwp): Free arch_private.
7831 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7833 * linux-low.h (process_info_private): New member arch_private.
7834 (lwp_info): New member arch_private.
7835 (linux_target_ops): New members new_process, new_thread,
7837 (ptid_of): New macro.
7838 * linux-x86-low.c: Include stddef.h, i386-low.h.
7839 (arch_process_info): New struct.
7840 (arch_lwp_info): New struct.
7841 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7842 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7843 (i386_dr_low_get_status): New function.
7844 (x86_insert_point, x86_remove_point): New functions.
7845 (x86_stopped_by_watchpoint): New function.
7846 (x86_stopped_data_address): New function.
7847 (x86_linux_new_process, x86_linux_new_thread): New functions.
7848 (x86_linux_prepare_to_resume): New function.
7849 (the_low_target): Add entries for insert_point, remove_point,
7850 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7852 * server.c (debug_hw_points): New global.
7853 (monitor_show_help): Document set debug-hw-points.
7854 (handle_query): Process "set debug-hw-points".
7855 * server.h (debug_hw_points): Declare.
7856 (paddress): Declare.
7857 * utils.c (NUMCELLS, CELLSIZE): New macros.
7858 (get_sell, xsnprintf, paddress): New functions.
7859 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7860 remove_point, stopped_by_watchpoint, stopped_data_address.
7861 * win32-i386-low.c: Include i386-low.h.
7862 (debug_reg_state): Replaces dr.
7863 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7864 (i386_dr_low_get_status): New function.
7865 (i386_insert_point, i386_remove_point): New functions.
7866 (i386_stopped_by_watchpoint): New function.
7867 (i386_stopped_data_address): New function.
7868 (i386_initial_stuff): Update.
7869 (get_thread_context,set_thread_context,i386_thread_added): Update.
7870 (the_low_target): Add entries for insert_point,
7871 remove_point, stopped_by_watchpoint, stopped_data_address.
7872 * win32-low.c (win32_insert_watchpoint): New function.
7873 (win32_remove_watchpoint): New function.
7874 (win32_stopped_by_watchpoint): New function.
7875 (win32_stopped_data_address): New function.
7876 (win32_target_ops): Add entries for insert_watchpoint,
7877 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7878 * win32-low.h (win32_target_ops): New members insert_point,
7879 remove_point, stopped_by_watchpoint, stopped_data_address.
7881 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7883 * server.c (process_serial_event): Re-return unsupported, not
7884 error, if the type isn't recognized. Re-allow supporting only
7885 insert or remove packets. Also call require_running for
7886 breakpoints. Add missing break statement to default case. Tidy.
7887 * target.h (struct target_ops): Rename insert_watchpoint to
7888 insert_point, and remove_watchpoint to remove_point.
7890 * linux-low.h (struct linux_target_ops): Likewise.
7891 * linux-low.c (linux_insert_watchpoint): Rename to ...
7892 (linux_insert_point): ... this. Adjust.
7893 (linux_remove_watchpoint): Rename to ...
7894 (linux_remove_point): ... this. Adjust.
7895 (linux_target_ops): Adjust.
7896 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7897 (cris_insert_point): ... this.
7898 (cris_remove_watchpoint): Rename to ...
7899 (cris_remove_point): ... this.
7900 (the_low_target): Adjust.
7902 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7904 * server.c (handle_v_kill): Pass signal_pid to
7905 kill_inferior if multi_process is zero.
7907 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7909 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7910 * target.h (target_ops): Comment for *_watchpoint to make it clear
7911 the functions can get types '0' and '1'.
7913 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7915 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7916 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7917 * regcache.c (get_regcache): Likewise.
7918 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7919 * win32-low.c (child_fetch_inferior_registers): Remove check for
7922 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7923 Pedro Alves <pedro@codesourcery.com>
7925 * target.h (struct target_ops) <supports_multi_process>: New
7927 (target_supports_multi_process): New.
7928 * server.c (handle_query): Even if GDB reports support, only
7929 enable multi-process if the target also supports it. Report
7930 multi-process support only if the target backend supports it.
7931 * linux-low.c (linux_supports_multi_process): New function.
7932 (linux_target_ops): Install it as target_supports_multi_process
7935 2009-05-24 Doug Evans <dje@google.com>
7937 Global renaming of find_thread_pid to find_thread_ptid.
7938 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7939 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7940 All callers updated.
7942 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7943 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7946 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7947 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7948 (linux_resume_one_lwp): Ditto.
7950 2009-05-23 Doug Evans <dje@google.com>
7952 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7953 from struct inferior_list_entry * to struct lwp_info *.
7954 All callers updated.
7956 2009-05-13 Doug Evans <dje@google.com>
7958 * linux-x86-low.c: Don't include assert.h.
7959 (x86_siginfo_fixup): Use fatal, not assert.
7960 (x86_arch_setup): Fix comment.
7962 2009-05-12 Doug Evans <dje@google.com>
7964 Biarch support for i386/amd64 gdbserver.
7965 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7966 Add linux-x86-low.c.
7967 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7968 (linux-x86-low.o): Add.
7969 * linux-x86-64-low.c: Delete.
7970 * linux-i386-low.c: Delete.
7971 * linux-x86-low.c: New file.
7972 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7974 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7976 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7977 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7978 (linux_child_pid_to_exec_file): New function.
7979 (elf_64_header_p, elf_64_file_p): New functions.
7980 (siginfo_fixup): New function.
7981 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7982 give target a chance to convert layout.
7983 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7984 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7986 2009-05-07 Doug Evans <dje@google.com>
7988 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7989 (regsets_store_inferior_registers): Ditto.
7991 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7995 * linux-low.c (must_set_ptrace_flags): Delete.
7996 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7998 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7999 `lwp->must_set_ptrace_flags' instead.
8000 (linux_wait_for_event_1): Set ptrace options here.
8001 (linux_wait_1): ... not here.
8003 2009-04-30 Doug Evans <dje@google.com>
8005 * inferiors.c (started_inferior_callback): New function.
8006 (attached_inferior_callback): New function.
8007 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8008 * server.c (print_started_pid, print_attached_pid): New functions.
8009 (detach_or_kill_for_exit): New function.
8010 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8011 * server.h (have_started_inferiors_p): Declare.
8012 (have_attached_inferiors_p): Declare.
8014 * inferiors.c (remove_process): Fix memory leak, free process.
8015 * linux-low.c (linux_remove_process): New function.
8016 (linux_kill): Call it instead of remove_process.
8017 (linux_detach, linux_wait_1): Ditto.
8019 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8021 * configure.srv: Add x86 Windows CE target.
8023 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8025 * inferiors.c (get_thread_process): Make global.
8026 * server.h (get_thread_process): Add prototype.
8027 * thread-db.c (find_one_thread): Use get_thread_process
8028 instead of current_process.
8029 (thread_db_get_tls_address): Do not crash if called when
8030 thread layer is not yet initialized.
8032 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8034 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8035 * spu-low.c (current_tid): Rename to ...
8036 (current_ptid): ... this.
8037 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8038 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8039 ptid_get_lwp (current_ptid) instead of current_tid.
8040 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8041 instead of current_tid. Use find_process_pid to verify pid
8042 argument is valid. Pass proper argument to remove_process.
8043 (spu_thread_alive): Compare current_ptid instead of current_tid.
8044 (spu_resume): Likewise.
8046 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8048 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8051 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8053 Implement the multiprocess extensions, and add linux multiprocess
8056 * server.h (ULONGEST): Declare.
8057 (struct ptid, ptid_t): New.
8058 (minus_one_ptid, null_ptid): Declare.
8059 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8060 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8061 (struct inferior_list_entry): Change `id' type from unsigned from
8063 (struct sym_cache, struct breakpoint, struct
8064 process_info_private): Forward declare.
8065 (struct process_info): Declare.
8066 (current_process): Declare.
8067 (all_processes): Declare.
8068 (initialize_inferiors): Declare.
8069 (add_thread): Adjust to use ptid_t.
8070 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8071 (add_process, remove_process, find_thread_pid): Declare.
8072 (find_inferior_id): Adjust to use ptid_t.
8073 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8074 (multi_process): Declare.
8075 (push_event): Adjust to use ptid_t.
8076 (read_ptid, write_ptid): Declare.
8077 (prepare_resume_reply): Adjust to use ptid_t.
8078 (clear_symbol_cache): Declare.
8079 * inferiors.c (all_processes): New.
8080 (null_ptid, minus_one_ptid): New.
8081 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8082 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8083 (add_thread): Change unsigned long to ptid. Remove gdb_id
8085 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8086 (gdb_id_to_thread): Rename to ...
8087 (find_thread_pid): ... this. Change unsigned long to ptid.
8088 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8089 (loaded_dll, pull_pid_from_list): Adjust.
8090 (add_process, remove_process, find_process_pid)
8091 (get_thread_process, current_process, initialize_inferiors): New.
8092 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8093 (struct target_waitstatus) <related_pid>: Ditto.
8094 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8096 (struct target_ops) <join>: Add `pid' argument.
8097 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8098 (struct target_ops) <wait>: Add `ptid' field. Change return type
8100 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8101 (mywait): Add `ptid' argument. Change return type to ptid_t.
8102 (target_pid_to_str): Declare.
8103 * target.c (set_desired_inferior): Adjust to use ptids.
8104 (mywait): Add new `ptid' argument. Adjust.
8105 (target_pid_to_str): New.
8106 * mem-break.h (free_all_breakpoints): Declare.
8107 * mem-break.c (breakpoints): Delelete.
8108 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8109 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8110 to use per-process breakpoint list.
8111 (free_all_breakpoints): New.
8112 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8113 (symbol_cache, all_symbols_looked_up): Delete.
8115 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8117 (prepare_resume_reply): Change ptid argument's type from unsigned
8118 long to ptid_t. Adjust. Implement W;process and X;process.
8119 (free_sym_cache, clear_symbol_cache): New.
8120 (look_up_one_symbol): Adjust to per-process symbol cache. *
8121 * server.c (cont_thread, general_thread, step_thread): Change type
8124 (multi_process): New.
8125 (last_ptid): Change type to ptid_t.
8126 (struct vstop_notif) <ptid>: Change type to ptid_t.
8127 (queue_stop_reply, push_event): Change `ptid' argument's type to
8129 (discard_queued_stop_replies): Add `pid' argument.
8130 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8131 changes. Don't reference the `attached' global.
8132 (attach_inferior): Adjust to mywait interface changes.
8133 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8134 features. Handle and report "multiprocess+". Handle
8136 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8138 (handle_v_kill): New.
8139 (handle_v_stopped): Adjust to use target_pid_to_str.
8140 (handle_v_requests): Allow multiple attaches and runs when
8141 multiprocess extensions are in effect. Handle "vKill".
8142 (myresume): Adjust to use ptids.
8143 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8144 (handle_status): Adjust to discard_queued_stop_replies interface
8146 (first_thread_of, kill_inferior_callback)
8147 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8148 (main): Call initialize_inferiors. Adjust to use ptids, killing
8149 and detaching from all inferiors. Handle multiprocess packet
8151 * linux-low.h: Include gdb_proc_service.h.
8152 (struct process_info_private): New.
8153 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8154 <lwpid_of>: Use ptid_get_lwp.
8155 (get_lwp_thread): Adjust.
8156 (struct lwp_info): Add `dead' member.
8157 (find_lwp_pid): Declare.
8158 * linux-low.c (thread_db_active): Delete.
8159 (new_inferior): Adjust comment.
8160 (inferior_pid): Delete.
8161 (linux_add_process): New.
8162 (handle_extended_wait): Adjust.
8163 (add_lwp): Change unsigned long to ptid.
8164 (linux_create_inferior): Add process to processes table. Adjust
8165 to use ptids. Don't set new_inferior here.
8166 (linux_attach_lwp): Rename to ...
8167 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8168 it. Adjust to use ptids.
8169 (linux_attach_lwp): New.
8170 (linux_attach): Add process to processes table. Don't set
8172 (struct counter): New.
8173 (second_thread_of_pid_p, last_thread_of_process_p): New.
8174 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8176 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8177 processes. Remove process from process table.
8178 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8179 to multiple processes.
8180 (any_thread_of): New.
8181 (linux_detach): Add `pid' argument, and handle it. Remove process
8182 from processes table.
8183 (linux_join): Add `pid' argument. Handle it.
8184 (linux_thread_alive): Change unsighed long argument to ptid_t.
8185 Consider dead lwps as not being alive.
8186 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8187 threads we're not interested in.
8188 (same_lwp, find_lwp_pid): New.
8189 (linux_wait_for_lwp): Change `pid' argument's type from int to
8191 (linux_wait_for_event): Rename to ...
8192 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8193 from int to ptid_t. Adjust.
8194 (linux_wait_for_event): New.
8195 (linux_wait_1): Add `ptid' argument. Change return type to
8196 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8197 that exit from the process table.
8198 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8200 (mark_lwp_dead): New.
8201 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8202 stopping all threads, mark its main lwp as dead.
8203 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8205 (fetch_register, usr_store_inferior_registers)
8206 (regsets_fetch_inferior_registers)
8207 (regsets_store_inferior_registers, linux_read_memory)
8208 (linux_write_memory): Inline `inferior_pid'.
8209 (linux_look_up_symbols): Adjust to use per-process
8211 (linux_request_interrupt): Adjust to use ptids.
8212 (linux_read_auxv): Inline `inferior_pid'.
8213 (initialize_low): Don't reference thread_db_active.
8214 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8215 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8216 (ps_getpid): Return the pid of the current inferior.
8217 * thread-db.c (proc_handle, thread_agent): Delete.
8218 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8220 (find_one_thread): Change argument type to ptid_t. Adjust to
8222 (maybe_attach_thread): Adjust to per-process data and ptids.
8223 (thread_db_find_new_threads): Ditto.
8224 (thread_db_init): Ditto.
8225 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8226 processes table. Adjust to use ptids.
8227 (spu_kill, spu_detach): Adjust interface. Remove process from
8229 (spu_join, spu_thread_alive): Adjust interface.
8230 (spu_wait): Adjust interface. Remove process from processes
8231 table. Adjust to use ptids.
8232 * win32-low.c (current_inferior_tid): Delete.
8233 (current_inferior_ptid): New.
8234 (debug_event_ptid): New.
8235 (thread_rec): Take a ptid. Adjust.
8236 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8237 (child_delete_thread): Ditto.
8238 (do_initial_child_stuff): Add `attached' argument. Add process to
8240 (child_fetch_inferior_registers, child_store_inferior_registers):
8242 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8243 (win32_attach): Pass 1 to do_initial_child_stuff.
8244 (win32_kill): Adjust interface. Remove process from processes
8246 (win32_detach): Ditto.
8247 (win32_join): Adjust interface.
8248 (win32_thread_alive): Take a ptid.
8249 (win32_resume): Adjust to use ptids.
8250 (get_child_debug_event): Ditto.
8251 (win32_wait): Adjust interface. Remove exiting process from
8254 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8256 Non-stop mode support.
8258 * server.h (non_stop): Declare.
8259 (gdb_client_data, handler_func): Declare.
8260 (delete_file_handler, add_file_handler, start_event_loop):
8262 (handle_serial_event, handle_target_event, push_event)
8263 (putpkt_notif): Declare.
8264 * target.h (enum resume_kind): New.
8265 (struct thread_resume): Replace `step' field by `kind' field.
8266 (TARGET_WNOHANG): Define.
8267 (struct target_ops) <wait>: Add `options' argument.
8268 <supports_non_stop, async, start_non_stop>: New fields.
8269 (target_supports_non_stop, target_async): New.
8270 (start_non_stop): Declare.
8271 (mywait): Add `options' argument.
8272 * target.c (mywait): Add `options' argument. Print child exit
8274 (start_non_stop): New.
8275 * server.c (non_stop, own_buf, mem_buf): New globals.
8276 (struct vstop_notif): New.
8277 (notif_queue): New global.
8278 (queue_stop_reply, push_event, discard_queued_stop_replies)
8279 (send_next_stop_reply): New.
8280 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8282 (attach_inferior): In non-stop mode, don't wait for the target
8284 (handle_general_set): Handle QNonStop.
8285 (handle_query): When handling qC, return the current general
8286 thread, instead of the first thread of the list.
8287 (handle_query): If the backend supports non-stop mode, include
8288 QNonStop+ in the qSupported query response.
8289 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8291 (handle_v_attach, handle_v_run): Handle non-stop mode.
8292 (handle_v_stopped): New.
8293 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8294 (myresume): Adjust to use resume_kind. Handle non-stop.
8295 (queue_stop_reply_callback): New.
8296 (handle_status): Handle non-stop mode.
8297 (main): Clear non_stop flag on reconnection. Use the event-loop.
8298 Refactor serial protocol handling from here ...
8299 (process_serial_event): ... to this new function. When GDB
8300 selects any thread, select one here. In non-stop mode, wait until
8301 GDB acks all pending events before exiting.
8302 (handle_serial_event, handle_target_event): New.
8303 * remote-utils.c (remote_open): Install remote_desc in the event
8305 (remote_close): Remove remote_desc from the event loop.
8306 (putpkt_binary): Rename to...
8307 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8308 (putpkt_binary): New as wrapper around putpkt_binary_1.
8309 (putpkt_notif): New.
8310 (prepare_resume_reply): In non-stop mode, don't change the
8312 * event-loop.c: New.
8313 * Makefile.in (OBJ): Add event-loop.o.
8314 (event-loop.o): New rule.
8316 * linux-low.h (pid_of): Moved here.
8318 (get_lwp_thread): Use lwpid_of.
8319 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8320 * linux-low.c (pid_of): Delete.
8321 (inferior_pid): Use lwpid_of.
8322 (linux_event_pipe): New.
8323 (target_is_async_p): New.
8325 (handle_extended_wait): Use lwpid_of.
8326 (add_lwp): Don't set lwpid field.
8327 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8328 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8329 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8330 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8331 first. Adjust to linux_wait_for_event interface changes. Use
8333 (linux_detach): Don't delete the main lwp here.
8334 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8335 (status_pending_p): Don't consider explicitly suspended lwps.
8336 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8337 pointer. Add OPTIONS argument. Change return type to int. Use
8338 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8339 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8340 pointer. Add status pointer argument. Return a pid instead of a
8341 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8342 changes. In non-stop mode, don't switch to a random thread.
8343 (linux_wait): Rename to...
8344 (linux_wait_1): ... this. Add target_options argument, and handle
8345 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8346 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8347 clean exit and signal exit code. Don't stop all threads in
8348 non-stop mode. In all-stop mode, only stop all threads when
8349 reporting a stop to GDB. Handle explicit thread stop requests.
8350 (async_file_flush, async_file_mark): New.
8352 (send_sigstop): Use lwpid_of.
8353 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8354 interface changes. In non-stop mode, don't switch to a random
8356 (linux_resume_one_lwp): Use lwpid_of.
8357 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8358 (linux_resume_one_thread): ... this. Handle resume_stop. In
8359 non-stop mode, don't look for pending flag in all threads.
8360 (resume_status_pending_p): Don't consider explicitly suspended
8362 (my_waitpid): Reimplement. Emulate __WALL.
8363 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8365 (sigchld_handler, linux_supports_non_stop, linux_async)
8366 (linux_start_non_stop): New.
8367 (linux_target_ops): Register linux_supports_non_stop, linux_async
8368 and linux_start_non_stop.
8369 (initialize_low): Install SIGCHLD handler.
8370 * thread-db.c (thread_db_create_event, find_one_thread)
8371 (thread_db_get_tls_address): Use lwpid_of.
8372 * win32-low.c (win32_detach): Adjust to use resume_kind.
8373 (win32_wait): Add `options' argument.
8374 * spu-low.c (spu_resume): Adjust to use resume_kind.
8375 (spu_wait): Add `options' argument.
8377 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8379 Decouple target code from remote protocol.
8381 * target.h (enum target_waitkind): New.
8382 (struct target_waitstatus): New.
8383 (struct target_ops) <wait>: Return an unsigned long. Take a
8384 target_waitstatus pointer instead of a char pointer.
8386 * target.c (mywait): Change prototype to return an unsigned long.
8387 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8388 * server.h (thread_from_wait, old_thread_from_wait): Delete
8390 (prepare_resume_reply): Change prototype to take a
8392 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8393 (last_status, last_ptid): New.
8394 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8395 pid instead of a signal.
8396 (attach_inferior): Remove "status" and "signal" parameters.
8398 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8400 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8401 (handle_v_requests, myresume): Remove "status" and "signal"
8403 (handle_status): New.
8404 (main): Delete local `status'. Adjust.
8405 * remote-utils.c: Include target.h.
8406 (prepare_resume_reply): Change prototype to take a
8407 target_waitstatus. Adjust.
8409 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8411 * spu-low.c (spu_wait): Adjust.
8412 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8414 (win32_wait): Adjust.
8416 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8418 * target.h (struct thread_resume): Delete leave_stopped member.
8419 (struct target_ops): Add a `n' argument to the `resume' callback.
8420 * server.c (start_inferior): Adjust.
8421 (handle_v_cont, myresume): Adjust.
8422 * linux-low.c (check_removed_breakpoint): Adjust to resume
8423 interface change, and to removed leave_stopped field.
8424 (resume_ptr): Delete.
8425 (struct thread_resume_array): New.
8426 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8427 resume interface change.
8428 (linux_continue_one_thread, linux_queue_one_thread)
8429 (resume_status_pending_p): Check if the resume field is NULL
8430 instead of checking the leave_stopped member.
8431 (linux_resume): Adjust to the target resume interface change.
8432 * spu-low.c (spu_resume): Adjust to the target resume interface
8434 * win32-low.c (win32_detach, win32_resume): Ditto.
8436 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8438 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8440 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8442 (linux_continue_one_thread): Only preserve the stepping flag if
8443 there's a pending breakpoint.
8445 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8447 * server.c (main): After the inferior having exited, call
8448 remote_close before exiting gdbserver.
8450 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8452 Fix size of FPSCR in Power 7 processors.
8453 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8454 (PPC_FEATURE_HAS_DFP): New #define.
8455 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8458 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8460 * server.c (handle_query) Whitespace and formatting.
8462 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8464 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8465 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8466 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8467 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8468 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8469 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8470 Makefile.in, configure.ac: Fix whitespace throughout.
8471 * configure: Regenerate.
8473 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8475 * inferiors.c (find_inferior): Make it safe for the callback
8476 function to delete the currently iterated inferior.
8478 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8480 * Makefile.in (linuw_low_h): Move higher.
8481 (thread-db.o): Depend on $(linux_low_h).
8483 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8485 Rename "process" to "lwp" throughout.
8487 * linux-low.c (all_processes): Rename to...
8488 (all_lwps): ... this.
8489 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8490 (add_process): Rename to ...
8491 (add_lwp): ... this. Adjust.
8492 (linux_create_inferior): Adjust.
8493 (linux_attach_lwp): Adjust.
8494 (linux_attach): Adjust.
8495 (linux_kill_one_process): Rename to ...
8496 (linux_kill_one_lwp): ... this. Adjust.
8497 (linux_kill): Adjust.
8498 (linux_detach_one_process): Rename to ...
8499 (linux_detach_one_lwp): ... this. Adjust.
8500 (linux_detach): Adjust.
8501 (check_removed_breakpoint): Adjust.
8502 (status_pending_p): Adjust.
8503 (linux_wait_for_process): Rename to ...
8504 (linux_wait_for_lwp): ... this. Adjust.
8505 (linux_wait_for_event): Adjust.
8506 (send_sigstop): Adjust.
8507 (wait_for_sigstop): Adjust.
8508 (stop_all_processes): Rename to ...
8509 (stop_all_lwps): ... this.
8510 (linux_resume_one_process): Rename to ...
8511 (linux_resume_one_lwp): ... this. Adjust.
8512 (linux_set_resume_request, linux_continue_one_thread)
8513 (linux_queue_one_thread, resume_status_pending_p)
8514 (usr_store_inferior_registers, regsets_store_inferior_registers)
8515 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8517 * linux-low.h (get_process): Rename to ...
8518 (get_lwp): ... this. Adjust.
8519 (get_thread_process): Rename to ...
8520 (get_thread_lwp): ... this. Adjust.
8521 (get_process_thread): Rename to ...
8522 (get_lwp_thread): ... this. Adjust.
8523 (struct process_info): Rename to ...
8524 (struct lwp_info): ... this.
8525 (all_processes): Rename to ...
8526 (all_lwps): ... this.
8527 * proc-service.c (ps_lgetregs): Adjust.
8528 * thread-db.c (thread_db_create_event, find_one_thread)
8529 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8531 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8533 * server.c (handle_query): Handle "qAttached".
8535 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8537 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8538 GPLv3, update license URL.
8540 2009-03-01 Doug Evans <dje@google.com>
8542 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8543 (server_h): Add gdb_signals.h.
8544 (signals.o): Update.
8545 * server.h (target_signal_from_host,target_signal_to_host_p)
8546 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8548 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8550 * remote-utils.c (getpkt): Also generate remote-debug
8551 information if noack_mode is set.
8553 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8555 * server.c (handle_query): Report qXfer:siginfo:read and
8556 qXfer:siginfo:write as supported and handle them.
8557 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8558 * linux-low.c (linux_xfer_siginfo): New.
8559 (linux_target_ops): Set it.
8561 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8563 * server.c (gdbserver_usage): Mention --remote-debug.
8564 (main): Accept '--remote-debug' switch.
8566 2009-01-18 Doug Evans <dje@google.com>
8568 * regcache.c (new_register_cache): No need to check result of xcalloc.
8569 * server.c (handle_search_memory): Back out calls to xmalloc,
8570 result is checked and error is returned to user upon failure.
8571 (handle_query): Ditto. Add more checks for result of malloc.
8572 (handle_v_cont): Check result of malloc, report error back to
8574 (handle_v_run): Ditto. Call freeargv.
8575 * server.h (freeargv): Declare.
8576 * utils.c (freeargv): New fn.
8578 2009-01-15 Doug Evans <dje@google.com>
8580 * gdbreplay.c (perror_with_name): Make arg const char *.
8581 * server.h (target_signal_to_name): Make return type const char *.
8582 * thread-db.c (thread_db_err_str): Make return type const char *.
8583 * utils.c (perror_with_name): Make arg const char *.
8585 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8587 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8588 when handling a EXIT_PROCESS_DEBUG_EVENT.
8590 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8592 * gdbreplay.c (gdbreplay_version): Update copyright year.
8593 * server.c (gdbserver_version): Likewise.
8595 2009-01-05 Doug Evans <dje@google.com>
8597 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8598 (handle_extended_wait): Improve comment.
8600 2008-12-13 Doug Evans <dje@google.com>
8602 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8603 * server.h (ATTR_MALLOC): New macro.
8604 (xmalloc,xcalloc,xstrdup): Declare.
8605 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8606 * inferiors.c: Ditto.
8607 * linux-low.c: Ditto.
8608 * mem-break.c: Ditto.
8609 * regcache.c: Ditto.
8610 * remote-utils.c: Ditto.
8613 * win32-low.c: Ditto.
8615 2008-12-12 Doug Evans <dje@google.com>
8617 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8618 in debugging printf.
8620 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8622 2008-12-09 Doug Evans <dje@google.com>
8624 * linux-low.h (struct process_info): Delete member tid, unused.
8625 * thread-db.c (find_one_thread): Update.
8626 (maybe_attach_thread): Update.
8628 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8630 * target.h (struct target_ops): Add qxfer_osdata member.
8631 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8633 (linux_qxfer_osdata): New functions.
8634 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8636 * server.c (handle_query): Handle "qXfer:osdata:read:".
8637 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8638 (buffer_xml_printf): New functions.
8639 * server.h (struct buffer): New.
8640 (buffer_grow_str, buffer_grow_str0): New macros.
8641 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8642 (buffer_xml_printf): Declare.
8644 2008-11-24 Doug Evans <dje@google.com>
8646 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8648 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8650 * server.c (handle_v_run): Always use the supplied argument list.
8652 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8654 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8655 (xtensa_regmap_table): Add entry for scompare1.
8657 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8659 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8660 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8661 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8662 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8663 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8664 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8665 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8666 XML target descriptions.
8667 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8668 when inferior is running on an ISA 2.05 or later processor. Add
8669 special case to return offset for full 64-bit slot of FPSCR when
8672 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8674 * Makefile.in (SFILES, clean): Added sparc64 files.
8675 (reg-sparc64.o, reg-sparc64.c): New.
8676 * configure.srv (sparc*-*-linux*): New configuration.
8677 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8678 syscall arguments for SPARC.
8679 (regsets_store_inferior_registers): Likewise.
8680 * linux-sparc-low.c: New file.
8682 2008-10-21 Doug Evans <dje@google.com>
8684 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8685 (READLINE_DIR,READLINE_DEP): Delete.
8686 (INTERNAL_CFLAGS): Update.
8687 (LINTFLAGS): Update.
8689 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8691 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8692 whole argv from the last run, not just argv[0].
8694 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8696 * regcache.c (new_register_cache): Return NULL if the register
8697 cache size isn't known yet.
8698 (free_register_cache): Avoid dereferencing a NULL regcache.
8700 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8702 * configure.srv: Merge MIPS and MIPS64.
8704 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8706 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8708 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8710 * Makefile.in: Add required vsx dependencies.
8712 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8713 Declare init_registers_powerpc_vsx32l.
8714 Declare init_registers_powerpc_vsx64l.
8715 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8716 (ppc_arch_setup): Check for VSX in hwcap.
8717 (ppc_fill_vsxregset): New function.
8718 (ppc_store_vsxregset): New function.
8719 Add new VSX entry in regset_info target_regsets.
8721 * configure.srv: Add new VSX dependencies.
8723 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8725 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8726 (remote_open): Set or clear transport_is_reliable.
8727 (putpkt_binary): Don't expect acks in noack mode.
8728 (getpkt): Don't send ack/nac in noack mode.
8729 * server.c (handle_general_set): Handle QStartNoAckMode.
8730 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8732 (main): Reset noack_mode on every connection.
8733 * server.h (noack_mode): Declare.
8735 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8737 * Makefile.in (GDBREPLAY_OBS): New variable.
8738 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8740 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8741 Daniel Jacobowitz <dan@codesourcery.com>
8743 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8744 (usr_store_inferior_registers): Likewise.
8745 (regsets_store_inferior_registers): Likewise.
8747 2008-07-31 Rolf Jansen <rj@surtec.com>
8748 Pedro Alves <pedro@codesourcery.com>
8750 * configure.ac: Check for memmem declaration.
8751 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8752 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8753 (disable_packet_qfThreadInfo): Unconditionally compile.
8754 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8755 * configure, config.in: Regenerate.
8757 2008-07-28 Doug Kwan <dougkwan@google.com>
8759 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8760 (linux_write_memory): Remove declaration of errno.
8762 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8764 * linux-low.c (handle_extended_wait): Do not use "status"
8765 variable uninitialized.
8767 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8769 * server.c (handle_v_attach): Inhibit reporting dll changes.
8771 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8773 * remote-utils.c (prepare_resume_reply): If requested, don't
8774 output "thread:TID" in the T stop reply.
8776 * server.c (disable_packet_vCont, disable_packet_Tthread)
8777 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8778 (handle_query): If requested, disable support for qC, qfThreadInfo
8780 (handle_v_requests): If requested, disable support for vCont.
8781 (gdbserver_show_disableable): New.
8782 (main): Handle --disable-packet and --disable-packet=LIST.
8784 * server.h (disable_packet_vCont, disable_packet_Tthread)
8785 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8787 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8789 * server.c (gdbserver_usage): Mention --version.
8791 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8793 * Makefile.in (gdbreplay.o): New rule.
8795 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8797 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8798 message, not gdbserver.
8800 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8801 Nathan Sidwell <nathan@codesourcery.com>
8802 Joseph Myers <joseph@codesourcery.com>
8804 * acinclude.m4: Include ../../config/acx.m4.
8805 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8806 * configure, config.in: Regenerate.
8807 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8808 * server.c (gdbserver_version): Print PKGVERSION.
8809 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8810 (main): Adjust gdbserver_usage calls.
8811 * gdbreplay.c (version, host_name): Add declarations.
8812 (gdbreplay_version, gdbreplay_usage): New.
8813 (main): Accept --version and --help options.
8815 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8817 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8818 (arm_breakpoint_at): Handle Thumb.
8819 (the_low_target): Add comment.
8821 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8823 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8825 2008-05-09 Doug Evans <dje@google.com>
8827 * server.h (decode_search_memory_packet): Declare.
8828 * remote-utils.c (decode_search_memory_packet): New fn.
8829 * server.c (handle_search_memory_1): New fn.
8830 (handle_search_memory): New fn.
8831 (handle_query): Process qSearch:memory packets.
8833 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8835 * regcache.c (registers_length): Remove.
8836 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8837 full register packet.
8838 * regcache.h (registers_length): Remove prototype.
8839 * server.h (PBUFSIZ): Define to 16384.
8841 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8843 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8844 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8845 powerpc-64l.o, and powerpc-altivec64l.o.
8846 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8847 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8848 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8849 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8850 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8853 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8854 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8855 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8856 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8857 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8858 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8859 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8860 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8861 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8862 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8865 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8866 (init_registers_powerpc_32l): ... this new prototype.
8867 (init_registers_powerpc_32): Remove, replace by ...
8868 (init_registers_powerpc_altivec32l): ... this new prototype.
8869 (init_registers_powerpc_e500): Remove, replace by ...
8870 (init_registers_powerpc_e500l): ... this new prototype.
8871 (init_registers_ppc64): Remove, replace by ...
8872 (init_registers_powerpc_64l): ... this new prototype.
8873 (init_registers_powerpc_64): Remove, replace by ...
8874 (init_registers_powerpc_altivec64l): ... this new prototype.
8875 (ppc_num_regs): Set to 73.
8876 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8877 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8878 (ppc_cannot_store_register): Handle orig_r3 and trap.
8879 (ppc_arch_setup): Update init_registers_... calls.
8880 (ppc_fill_gregset): Handle orig_r3 and trap.
8882 * inferiors.c (clear_inferiors): Reset current_inferior.
8884 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8886 * acinclude.m4: Add override.m4.
8887 * configure: Regenerate.
8889 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8891 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8892 initial call to init_register_ppc64.
8894 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8896 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8897 single powerpc*-*-linux* case.
8898 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8900 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8902 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8903 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8905 * linux-ppc-low.c: Include <elf.h>.
8906 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8907 (ppc_hwcap): New global variable.
8908 (ppc_regmap): Remove __SPE__ #ifdef sections.
8909 (ppc_regmap_e500): New global variable.
8910 (ppc_cannot_store_register): Update __SPE__ special case.
8911 (ppc_get_hwcap): New function.
8912 (ppc_arch_setup): Use it to determine whether inferior supports
8913 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8914 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8915 Do not access registers if target does not support AltiVec.
8916 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8917 Do not access registers if target does not support SPE.
8918 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8920 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8922 * linux-low.c (disabled_regsets, num_regsets): New.
8923 (use_regsets_p): Delete.
8924 (linux_wait_for_process): Clear disabled_regsets.
8925 (regsets_fetch_inferior_registers): Check and set it.
8926 (regsets_store_inferior_registers): Likewise.
8927 (linux_fetch_registers, linux_store_registers): Do not use
8929 (initialize_low): Allocate disabled_regsets.
8931 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8933 * Makefile.in (LIBOBJS): New.
8935 (memmem.o): New rule.
8936 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8937 * configure: Regenerated.
8939 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8941 * server.c (handle_query): Never return "unsupported" for
8942 qXfer:features:read queries.
8944 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8946 * server.c (get_features_xml): Fix inverted condition.
8947 (handle_query): Always support qXfer:feature:read.
8949 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8951 * server.c (wrapper_argv): New.
8952 (start_inferior): Handle wrapper_argv. If set, expect an extra
8954 (gdbserver_usage): Document --wrapper.
8955 (main): Parse --wrapper.
8957 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8959 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8960 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8961 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8962 (ppc_set_pc): Likewise.
8963 (ppc_arch_setup): New function.
8964 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8965 of collect_register.
8966 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8968 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8970 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8971 instead of linux-ppc64-low.o.
8972 * linux-ppc64-low.c: Remove file.
8973 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8974 (linux-ppc64-low.o): Remove rule.
8976 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8977 (init_registers_powerpc_64): Likewise.
8978 (ppc_regmap): Conditionally define depending on __powerpc64__.
8979 (ppc_cannot_store_register): Do not special-case "fpscr" when
8980 compiled on __powerpc64__.
8981 (ppc_collect_ptrace_register): New function.
8982 (ppc_supply_ptrace_register): New function.
8983 (ppc_breakpoint): Change type to "unsigned int".
8984 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8985 (the_low_target): Conditionally provide initializers for the
8986 arch_setup member depending on __powerpc64__. Install
8987 collect_ptrace_register and supply_ptrace_register members.
8989 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8991 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8992 * server.c (gdbserver_xmltarget): Define.
8993 (get_features_xml): Use it to replace "target.xml" and arch_string.
8995 * configure.srv: Remove srv_xmltarget. Add XML files that were
8996 mentioned there to srv_xmlfiles instead. Remove conditional tests
8997 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8998 srv_xmlfiles and srv_regobj to include all possible choices.
8999 * configure.ac (srv_xmltarget): Remove.
9000 (srv_xmlfiles): Do not add "target.xml".
9001 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9002 checks for supplementary target information.
9003 * configure: Regenerate.
9004 * Makefile.in (XML_TARGET): Remove.
9005 (target.xml): Remove rule.
9006 (clean): Do not clean up target.xml.
9007 (.PRECIOUS): Do not mention target.xml.
9009 * target.h (struct target_ops): Remove arch_string member.
9010 * linux-low.c (linux_arch_string): Remove.
9011 (linux_target_ops): Remove arch_string initializer.
9012 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9013 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9014 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9015 * spu-low.c (spu_arch_string): Remove.
9016 (spu_target_ops): Remove arch_string initializer.
9017 * win32-low.c (win32_arch_string): Remove.
9018 (win32_target_ops): Remove arch_string initializer.
9019 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9020 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9021 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9023 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9025 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9026 by collect_ptrace_register and supply_ptrace_register hooks.
9027 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9028 instead of checking for the_low_target.left_pad_xfer.
9029 (usr_store_inferior_registers): Use collect_ptrace_register callback
9030 instead of checking for the_low_target.left_pad_xfer.
9032 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9033 (s390_supply_ptrace_register): Likewise.
9034 (s390_fill_gregset): Call s390_collect_ptrace_register.
9035 (the_low_target): Update.
9037 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9038 (ppc_supply_ptrace_register): Likewise.
9039 (the_low_target): Update.
9041 * linux-i386-low.c (the_low_target): Update.
9042 * linux-x86-64-low.c (the_low_target): Update.
9044 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9046 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9047 reg-s390.o and reg-s390x.o.
9049 * linux-low.c (new_inferior): New global variable.
9050 (linux_create_inferior, linux_attach): Set it.
9051 (linux_wait_for_process): Call the_low_target.arch_setup after the
9052 target has stopped for the first time.
9053 (initialize_low): Do not call the_low_target.arch_setup.
9055 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9056 (s390_set_pc): Likewise.
9057 (s390_arch_setup): New function.
9058 (the_low_target): Use s390_arch_setup as arch_setup routine.
9060 * regcache.c (realloc_register_cache): New function.
9061 (set_register_cache): Call it for each existing regcache.
9063 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9065 * server.h (init_registers): Remove prototype.
9067 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9068 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9069 instead of init_registers ().
9070 * linux-arm-low.c (init_registers_arm): Add prototype.
9071 (init_registers_arm_with_iwmmxt): Likewise.
9072 (the_low_target): Add initializer for arch_setup field.
9073 * linux-cris-low.c (init_registers_cris): Add prototype.
9074 (the_low_target): Add initializer for arch_setup field.
9075 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9076 (the_low_target): Add initializer for arch_setup field.
9077 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9078 (the_low_target): Add initializer for arch_setup field.
9079 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9080 (the_low_target): Add initializer for arch_setup field.
9081 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9082 (the_low_target): Add initializer for arch_setup field.
9083 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9084 (the_low_target): Add initializer for arch_setup field.
9085 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9086 (init_registers_mips64_linux): Likewise.
9087 (the_low_target): Add initializer for arch_setup field.
9088 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9089 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9090 (the_low_target): Add initializer for arch_setup field.
9091 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9092 (init_registers_powerpc_64): Likewise.
9093 (the_low_target): Add initializer for arch_setup field.
9094 * linux-s390-low.c (init_registers_s390): Add prototype.
9095 (init_registers_s390x): Likewise.
9096 (the_low_target): Add initializer for arch_setup field.
9097 * linux-sh-low.c (init_registers_sh): Add prototype.
9098 (the_low_target): Add initializer for arch_setup field.
9099 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9100 (the_low_target): Add initializer for arch_setup field.
9101 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9102 (the_low_target): Add initializer for arch_setup field.
9104 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9105 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9106 instead of init_registers ().
9107 * win32-arm-low.c (init_registers_arm): Add prototype.
9108 (the_low_target): Add initializer for arch_setup field.
9109 * win32-i386-low.c (init_registers_i386): Add prototype.
9110 (the_low_target): Add initializer for arch_setup field.
9112 * spu-low.c (init_registers_spu): Add prototype.
9113 (initialize_low): Call initialie_registers_spu () instead of
9114 initialize_registers ().
9116 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9118 * server.c (handle_v_requests): When handling the vRun and vAttach
9119 packets, if already debugging a process, don't kill it. Return an
9122 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9124 * server.c (handle_query): Correct length check.
9126 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9128 * win32-low.c (do_initial_child_stuff): Add process handle
9129 parameter. Set current_process_handle and current_process_id from the
9130 parameters. Clear globals.
9131 (win32_create_inferior): Don't set current_process_handle and
9132 current_process_id here. Instead pass them on the call to
9133 do_initial_child_stuff.
9134 (win32_attach): Likewise.
9135 (win32_clear_inferiors): New.
9136 (win32_kill): Don't close the current process handle or the
9137 current thread handle here. Instead call win32_clear_inferiors.
9138 (win32_detach): Don't open a new handle to the process. Call
9139 win32_clear_inferiors.
9140 (win32_join): Don't rely on current_process_handle; open a new
9141 handle using the process id.
9142 (win32_wait): Call win32_clear_inferiors when the inferior process
9145 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9147 * server.c (monitor_show_help): Add "exit".
9149 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9151 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9152 (clean): Add reg-xtensa.c.
9153 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9154 * configure.srv (xtensa*-*-linux*) New target.
9155 * linux-xtensa-low.c: New.
9156 * xtensa-xtregs.c: New.
9158 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9160 * hostio.c: Don't include errno.h.
9161 (errno_to_fileio_errno): Move to hostio-errno.
9162 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9163 error number outputting to the target->hostio_last_error callback.
9164 (hostio_packet_error): Use FILEIO_EINVAL directly.
9165 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9166 calls to hostio_error.
9167 * hostio-errno.c: New.
9168 * server.h (hostio_last_error_from_errno): Declare.
9169 * target.h (target_ops): Add hostio_last_error member.
9170 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9171 as hostio_last_error handler.
9172 * spu-low.c (spu_target_ops): Likewise.
9173 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9174 (wince_hostio_last_error): New functions.
9175 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9176 as hostio_last_error handler.
9177 (win32_target_ops) [!_WIN32_WCE]: Register
9178 hostio_last_error_from_errno as hostio_last_error handler.
9179 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9180 (hostio-errno.o): New rule.
9181 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9182 * configure.srv (srv_hostio_err_objs): New variable. Default to
9184 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9185 * configure: Regenerate.
9187 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9189 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9190 (linux_kill, linux_detach): Clean up the process list.
9191 * remote-utils.c (remote_open): Improve port number parsing.
9192 (putpkt_binary, input_interrupt): Only send interrupts if the target
9194 * server.c (extended_protocol): Make static.
9195 (attached): Define earlier.
9196 (exit_requested, response_needed, program_argv): New variables.
9197 (target_running): New.
9198 (start_inferior): Clear attached here.
9199 (attach_inferior): Set attached here.
9200 (require_running): Define.
9201 (handle_query): Use require_running and target_running. Implement
9203 (handle_v_attach, handle_v_run): New.
9204 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9205 (gdbserver_usage): Update.
9206 (main): Redo argument parsing. Handle --debug and --multi. Handle
9207 --attach along with other options or after the port. Save
9208 program_argv. Support no initial program. Resynchronize
9209 communication with GDB after an error. Handle "monitor exit".
9210 Use require_running and target_running. Always allow the extended
9211 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9212 restart in extended mode.
9213 * README: Refer to the GDB manual. Update --attach usage.
9215 2007-12-20 Andreas Schwab <schwab@suse.de>
9217 * linux-low.c (STACK_SIZE): Define.
9218 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9219 (linux_test_for_tracefork): Likewise.
9221 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9223 * linux-low.c (linux_wait_for_event): Update messages. Do not
9224 reinsert auto-delete breakpoints.
9225 * mem-break.c (struct breakpoint): Change return type of handler to
9227 (set_breakpoint_at): Update handler type.
9228 (reinsert_breakpoint_handler): Return 1 instead of calling
9230 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9232 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9233 * mem-break.h (set_breakpoint_at): Update handler type.
9234 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9235 * win32-low.c (auto_delete_breakpoint): New.
9236 (get_child_debug_event): Use it.
9238 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9240 * configure.ac: Check for pread and pwrite.
9241 * hostio.c (handle_pread): Fall back to lseek and read.
9242 (handle_pwrite): Fall back to lseek and write.
9243 * config.in, configure: Regenerated.
9245 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9247 * server.c (myresume): Add own_buf argument.
9248 (main): Update calls.
9250 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9252 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9253 * remote-utils.c (remote_open): Do not call disable_async_io.
9254 (block_async_io): Delete.
9255 (unblock_async_io): Make static.
9256 (initialize_async_io): New.
9257 * server.c (handle_v_cont): Handle async I/O here.
9258 (myresume): Likewise. Move other common resume tasks here...
9259 (main): ... from here. Call initialize_async_io. Disable async
9260 I/O before the main loop.
9261 * server.h (initialize_async_io): Declare.
9262 (block_async_io, unblock_async_io): Delete prototypes.
9263 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9265 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9267 * remote-utils.c (readchar): Allow binary data in received messages.
9269 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9271 * win32-low.c (attaching): New global.
9272 (win32_create_inferior): Clear the `attaching' global.
9273 (win32_attach): Set the `attaching' global.
9274 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9275 attaching. Only set a breakpoint at the entry point if not
9278 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9280 * server.c (main): Don't report dll events on the initial
9281 connection on attaches.
9283 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9285 * server.c (main): Relax numerical bases supported for the pid of
9286 the --attach command line argument.
9288 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9290 * win32-low.c (win32_attach): Call OpenProcess before
9291 DebugActiveProcess, not after. Add last error output to error
9294 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9296 * win32-low.c (win32_get_thread_context)
9297 (win32_set_thread_context): New functions.
9298 (thread_rec): Use win32_get_thread_context.
9299 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9300 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9303 2007-12-03 Leo Zayas
9304 Pedro Alves <pedro_alves@portugalmail.pt>
9306 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9308 (child_add_thread): Minor cleanup.
9309 (child_continue): Resume artificially suspended threads before
9310 calling ContinueDebugEvent.
9311 (suspend_one_thread): New.
9312 (fake_breakpoint_event): New.
9313 (get_child_debug_event): Change return type to int. Check here if
9314 gdb sent an interrupt request. If a soft interrupt was requested,
9315 fake a breakpoint event. Return 0 if there is no event to handle,
9317 (win32_wait): Don't check here if gdb sent an interrupt request.
9318 Ensure there is a valid event to handle.
9319 (win32_request_interrupt): Add soft interruption method as last
9322 2007-12-03 Leo Zayas
9323 Pedro Alves <pedro_alves@portugalmail.pt>
9325 * win32-low.h (win32_thread_info): Add descriptions to the
9326 structure members. Replace `suspend_count' counter by a
9328 * win32-low.c (thread_rec): Update condition of when to get the
9329 context from the inferior. Rely on ContextFlags being set if it
9330 has already been retrieved. Only suspend the inferior thread if
9331 we haven't already. Warn if that fails.
9332 (continue_one_thread): s/suspend_count/suspended/. Only call
9333 ResumeThread once. Warn if that fails.
9335 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9337 * win32-low.c (win32_wait): Don't read from the inferior when it
9340 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9342 * Makefile.in (win32_low_h): New variable.
9343 (win32-low.o): Add dependency on $(win32_low_h).
9344 (win32-arm-low.o, win32-i386-low.o): New rules.
9346 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9348 * hostio.c: Correct copyright year.
9350 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9352 * Makefile.in (OBS): Add hostio.o.
9353 (hostio.o): New rule.
9354 * server.h (handle_vFile): Declare.
9355 * hostio.c: New file.
9356 * server.c (handle_v_requests): Take packet_len and new_packet_len
9357 for binary packets. Call handle_vFile.
9358 (main): Update call to handle_v_requests.
9360 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9362 * linux-low.c: Include <sched.h>.
9364 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9366 * linux-low.c (linux_tracefork_grandchild): New.
9367 (linux_tracefork_child): Use clone.
9368 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9370 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9372 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9374 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9376 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9378 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9380 * inferiors.c (change_inferior_id): Delete.
9381 (add_pid_to_list, pull_pid_from_list): New.
9382 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9383 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9384 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9385 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9386 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9387 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9388 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9389 (using_threads): Always set to 1.
9390 (handle_extended_wait): New.
9391 (add_process): Do not set TID.
9392 (linux_create_inferior): Set must_set_ptrace_flags.
9393 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9394 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9395 (linux_thread_alive): Rename TID argument to LWPID.
9396 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9397 (linux_wait_for_event): Do not use TID or check using_threads. Update
9398 call to dead_thread_notify. Call handle_extended_wait.
9399 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9400 (send_sigstop): Delete sigstop_sent.
9401 (wait_for_sigstop): Avoid TID.
9402 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9403 (linux_test_for_tracefork): New.
9404 (linux_lookup_signals): Use thread_db_active and
9405 linux_supports_tracefork_flag.
9406 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9407 * linux-low.h (get_process_thread): Avoid TID.
9408 (struct process_ifo): Move thread_known and tid to the end. Remove
9410 (linux_attach_lwp, thread_db_init): Update prototypes.
9411 * server.h (change_inferior_id): Delete prototype.
9412 (add_pid_to_list, pull_pid_from_list): New prototypes.
9413 * thread-db.c (thread_db_use_events): New.
9414 (find_first_thread): Rename to...
9415 (find_one_thread): ...this. Update callers and messages. Do not
9416 call fatal. Check thread_db_use_events. Do not call
9417 change_inferior_id or new_thread_notify.
9418 (maybe_attach_thread): Update. Do not call new_thread_notify.
9419 (thread_db_init): Set thread_db_use_events. Check use_events.
9420 * utils.c (fatal, warning): Correct message prefix.
9422 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9424 * Makefile.in (clean): Remove new files.
9425 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9426 (powerpc-64.o, powerpc-64.c): New rules.
9427 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9428 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9430 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9432 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9433 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9434 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9435 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9436 (target_regsets): Add AltiVec and SPE register sets.
9437 * configure.ac: Check for AltiVec and SPE.
9438 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9439 (ppc_fill_vrregset, ppc_store_vrregset): New.
9440 (target_regsets): Add AltiVec register set.
9441 * configure: Regenerated.
9443 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9445 * linux-low.c (O_LARGEFILE): Define.
9446 (linux_read_memory): Use /proc/PID/mem.
9447 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9448 * configure, config.in: Regenerated.
9450 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9452 * linux-low.c (linux_wait_for_event): Do not pass signals while
9455 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9457 * win32-low.c (create_process): New.
9458 (win32_create_inferior): Use create_process instead of
9459 CreateProcess. If create_process failed retry appending an ".exe"
9460 suffix. Store the GetLastError result immediatelly after
9461 create_process calls and use it on the call to error.
9463 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9465 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9467 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9469 * configure.ac: Switch license to GPLv3.
9471 2007-08-01 Michael Snyder <msnyder@access-company.com>
9473 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9475 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9477 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9479 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9480 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9481 CloseToolhelp32Snapshot.
9482 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9483 CloseToolhelp32Snapshot.
9485 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9487 * server.c (main): Check for inferior exit before main loop.
9489 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9491 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9492 instead of on tmp_desc.
9494 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9495 Daniel Jacobowitz <dan@codesourcery.com>
9497 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9498 (add_thread): Minor cleanups.
9499 (clear_inferiors): Move lower in the file. Clear the DLL
9501 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9502 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9503 (xml_escape_text): New.
9504 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9506 (handle_v_cont): Report errors.
9507 (gdbserver_version): Update.
9508 (main): Correct size of own_buf. Do not report initial DLL events.
9509 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9510 (unloaded_dll, xml_escape_text): New.
9511 * win32-low.c (enum target_waitkind): Update comments.
9512 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9513 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9514 (win32_EnumProcessModules, win32_GetModuleInformation)
9515 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9516 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9517 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9518 (win32_Module32First, win32_Module32Next, load_toolhelp)
9519 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9520 (get_child_debug_event): Handle DLL events.
9521 (win32_wait): Likewise.
9523 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9525 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9526 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9528 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9530 * win32-low.c (handle_output_debug_string): Ignore event if not
9533 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9535 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9537 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9539 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9541 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9543 * inferiors.c (change_inferior_id): Add comment.
9544 * linux-low.c (check_removed_breakpoint): Add an early
9545 prototype. Improve debug output.
9546 (linux_attach): Doc update.
9547 (linux_detach_one_process, linux_detach): Clean up before releasing
9549 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9550 * linux-low.h (struct process_info): Doc improvement.
9551 * mem-break.c (delete_all_breakpoints): New.
9552 * mem-break.h (delete_all_breakpoints): New prototype.
9553 * thread-db.c (find_first_thread): New.
9554 (thread_db_create_event): Call it instead of
9555 thread_db_find_new_threads. Clean up unused variables.
9556 (maybe_attach_thread): Remove first thread handling.
9557 (thread_db_find_new_threads): Use find_first_thread.
9558 (thread_db_get_tls_address): Likewise.
9560 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9562 * thread-db.c (thread_db_find_new_threads): Add prototype.
9563 (thread_db_create_event): Check for the main thread before adding
9565 (maybe_attach_thread): Only enable event reporting if TID == 0.
9566 (thread_db_get_tls_address): Check for new threads.
9568 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9570 * linux-low.c (linux_create_inferior): Try execv before execvp.
9571 * spu-low.c (spu_create_inferior): Likewise.
9573 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9575 * linux-low.c (linux_create_inferior): Change execv to execvp.
9576 * spu-low.c (spu_create_inferior): Likewies.
9578 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9580 * Makefile.in (clean): Clean new files instead of deleted ones.
9581 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9582 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9584 * configure.srv: Specify XML files and new regformats for MIPS and
9586 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9587 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9588 an entry for the restart register.
9589 (mips_cannot_fetch_register, mips_cannot_store_register)
9590 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9591 register names to match the XML descriptions.
9592 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9593 restart register instead of $0.
9595 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9596 Markus Deuling <deuling@de.ibm.com>
9598 * remote-utils.c (decode_xfer_write): New function.
9599 * server.h (decode_xfer_write): Add prototype.
9600 * server.c (handle_query): Add PACKET_LEN argument. Support
9601 qXfer:spu:read and qXfer:spu:write packets.
9602 (main): Pass packet_len to handle_query.
9603 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9604 * target.h (target_ops): Add qxfer_spu.
9606 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9608 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9609 accessing non-seekable spufs files.
9611 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9613 * server.c (handle_query): Add reply for qC packet.
9615 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9616 Leo Zayas <lerele@champenstudios@com>
9618 * server.h (check_remote_input_interrupt_request): New function.
9619 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9620 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9621 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9622 (check_remote_input_interrupt_request): New function.
9623 * server.h (check_remote_input_interrupt_request): Declare.
9624 * win32-low.c (winapi_DebugBreakProcess,
9625 winapi_GenerateConsoleCtrlEvent): New typedefs.
9626 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9628 (win32_wait): Check for remote interrupt request
9629 with check_remote_input_interrupt_request.
9630 (win32_request_interrupt): New function.
9631 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9633 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9635 * win32-low.c (debug_registers_changed,
9636 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9637 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9638 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9639 (thread_rec): Get context using the low target.
9640 (child_add_thread): Call thread_added on the low target,
9641 which does the same thing.
9643 (do_initial_child_stuff): Remove debug registers references.
9644 Set context using the low target. Resume threads after
9645 setting the contexts.
9646 (child_continue): Remove dead variable. Remove debug
9647 registers references.
9648 (child_fetch_inferior_registers): Go through the low target.
9649 (do_child_store_inferior_registers): Remove.
9650 (child_store_inferior_registers): Go through the low target.
9651 (win32_resume): Remove debug registers references.
9652 Set context using the low target.
9653 (handle_exception): Change return type to void. Don't record
9654 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9655 first chance exception.
9656 (get_child_debug_event): Change return type to void. Remove
9657 goto loop. Always return after waiting for debug event.
9658 (win32_wait): Convert to switch statement. Handle spurious
9661 * win32-i386-low.c (debug_registers_changed,
9662 debug_registers_used): New.
9663 (initial_stuff): Rename to ...
9664 (i386_initial_stuff): ... this. Clear debug registers
9666 (store_debug_registers): Delete.
9667 (i386_get_thread_context): New.
9668 (load_debug_registers): Delete.
9669 (i386_set_thread_context): New.
9670 (i386_thread_added): New.
9671 (single_step): Rename to ...
9672 (i386_single_step): ... this.
9673 (do_fetch_inferior_registers): Rename to ...
9674 (i386_fetch_inferior_register): ... this.
9675 (i386_store_inferior_register): New.
9676 (the_low_target): Adapt to new interface.
9678 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9679 (arm_get_thread_context): New.
9680 (arm_set_thread_context): New.
9682 (do_fetch_inferior_registers): Rename to ...
9683 (arm_fetch_inferior_register): ... this.
9684 (arm_store_inferior_register): New.
9685 (arm_wince_breakpoint): Reimplement as unsigned long.
9686 (arm_wince_breakpoint_len): Define.
9687 (the_low_target): Adapt to new interface.
9689 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9690 load_debug_registers. Add get_thread_context, set_thread_context,
9691 thread_added and store_inferior_register. Rename
9692 fetch_inferior_registers to fetch_inferior_register.
9693 (regptr): Remove declaration.
9695 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9697 * linux-low.c (linux_detach): Change return type to int. Return 0.
9698 * spu-low.c (spu_detach): Likewise.
9700 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9702 * target.h (target_ops): Change return type of detach to int.
9704 (join_inferior): New.
9705 * server.c (main): Don't skip detach support on mingw32.
9706 If the inferior doesn't support detaching return error.
9707 Call join_inferior instead of using waitpid.
9708 * linux-low.c (linux_join): New.
9709 (linux_target_op): Add linux_join.
9710 * spu-low.c (spu_join): New.
9711 (spu_target_ops): Add spu_join.
9712 * win32-low.c (win32_detach): Adapt to new interface.
9713 Reopen current_process_handle before detaching. Issue a child
9714 resume before detaching.
9716 (win32_target_op): Add win32_join.
9718 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9720 * win32-low.c (win32-attach): Fix return value.
9721 * target.h (target_ops): Describe ATTACH return values.
9723 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9725 * win32-low.c (GETPROCADDRESS): Define.
9726 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9727 (winapi_DebugSetProcessKillOnExit): Likewise.
9728 (win32_create_inferior): Force usage of ansi CreateProcessA.
9729 (win32_attach): Use GETPROCADDRESS.
9730 (win32_detach): Likewise.
9732 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9734 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9736 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9738 * win32-low.c: Commit leftover changes from 2007-03-29.
9740 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9742 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9743 fields short instead of int. Add explicit padding.
9744 (i387_cache_to_fsave): Remove unnecessary casts.
9745 (i387_fsave_to_cache): Doc fix.
9746 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9748 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9750 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9751 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9753 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9755 * configure.srv (arm*-*-mingw32ce*): Move near the other
9758 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9760 * configure.ac: Add errno checking.
9761 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9762 sys/file.h and malloc.h.
9763 (AC_CHECK_DECLS): Add perror.
9764 (srv_mingwce): Handle.
9765 * configure.srv (i[34567]86-*-cygwin*): Add
9766 win32-i386-low.o to srv_tgtobj.
9767 (i[34567]86-*-mingw*): Likewise.
9768 (arm*-*-mingw32ce*): Add case.
9769 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9770 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9771 [__MINGW32CE__] (strerror): New function.
9772 [__MINGW32CE__] (errno): Define to GetLastError.
9773 [__MINGW32CE__] (COUNTOF): New macro.
9774 (remote_open): Remove extra close call.
9775 * mem-break.c (delete_breakpoint_at): New function.
9776 * mem-break.h (delete_breakpoint_at): Declare.
9777 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9778 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9779 [USE_WIN32API] (read, write): Add char* casts.
9780 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9781 * server.h: Include wincecompat.h on Windows CE.
9782 [HAVE_ERRNO_H]: Check.
9783 (perror): Declare if not declared.
9784 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9785 (perror_with_name): Remove errno declaration.
9786 * wincecompat.h: New.
9787 * wincecompat.c: New.
9789 * win32-arm-low.c: New.
9790 * win32-i386-low.c: New.
9791 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9792 (OUTMSG2): Make it safe.
9794 (COUNTOF): New macro.
9795 (NUM_REGS): Get it from the low target.
9796 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9797 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9798 (thread_rec): Let low target handle debug registers.
9799 (child_add_thread): Likewise.
9800 (child_init_thread_list): Likewise.
9801 (continue_one_thread): Likewise.
9803 (do_child_fetch_inferior_registers): Move to ...
9804 * win32-i386-low.c: ... here, and rename to ...
9805 (do_fetch_inferior_registers): ... this.
9806 * win32-low.c (child_fetch_inferior_registers):
9807 Go through the low target.
9808 (do_child_store_inferior_registers): Use regptr.
9809 (strwinerror): New function.
9810 (win32_create_inferior): Handle Windows CE.
9811 Use strwinerror instead of strerror on Windows error
9812 codes. Add program to the error output.
9813 Don't close the main thread handle on Windows CE.
9814 (win32_attach): Use coredll.dll on Windows CE.
9815 (win32_kill): Close current process and current
9817 (win32_detach): Use coredll.dll on Windows CE.
9818 (win32_resume): Let low target handle debug registers, and
9820 (handle_exception): Add/Remove initial breakpoint. Avoid
9821 non-existant WSTOPSIG on Windows CE.
9822 (win32_read_inferior_memory): Cast to remove warning.
9823 (win32_arch_string): Go through the low target.
9824 (initialize_low): Call set_breakpoint_data with the low
9825 target's breakpoint.
9826 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9827 FOP_REGNUM, mappings): Move to ...
9828 * win32-i386-low.c: ... here.
9829 * win32-low.c (win32_thread_info): Move to ...
9830 * win32-low.h: ... here.
9831 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9832 win32-arm-low.c and wincecompat.c.
9833 (all:): Add $EXEEXT.
9834 (install-only:): Likewise.
9835 (gdbserver:): Likewise.
9836 (gdbreplay:): Likewise.
9837 * config.in: Regenerate.
9838 * configure: Regenerate.
9840 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9842 * win32-low.c: Rename typedef thread_info to
9843 win32_thread_info throughout.
9845 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9847 * win32-i386-low.c: Rename to ...
9848 * win32-low.c: ... this.
9849 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9850 * Makefile.in: Likewise.
9852 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9854 * remote-utils.c (monitor_output): Constify msg parameter.
9855 * server.h (monitor_output): Likewise.
9856 * win32-i386-low.c (handle_output_debug_string): New.
9857 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9858 handle_output_debug_string.
9859 (get_child_debug_event): Likewise.
9861 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9863 * server.c (main): Correct strtoul check.
9865 2007-03-27 Jon Ringle <jon@ringle.org>
9867 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9869 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9871 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9873 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9875 * terminal.h: Check HAVE_SGTTY_H.
9877 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9879 * remote-utils.c (remote_open): Print out the assigned port number.
9881 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9883 * remote-utils.c (monitor_output): New function.
9884 * server.c (debug_threads): Define here.
9885 (monitor_show_help): New function.
9886 (handle_query): Handle qRcmd.
9887 (main): Do not handle 'd' packet.
9888 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9889 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9892 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9894 * Makefile.in (EXEEXT): New.
9895 (clean): Use $(EXEEXT).
9897 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9899 * target.h (target_ops): Rename send_signal to request_interrupt,
9900 and remove enum target_signal parameter.
9901 * linux-low.c (linux_request_interrupt): Rename from
9902 linux_send_signal, and always send SIGINT.
9903 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9904 and always send SIGINT.
9905 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9907 (input_interrupt): Likewise.
9909 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9911 * server.c (get_features_xml): Check if target implemented
9913 * win32-i386-low.c (win32_arch_string): New.
9914 (win32_target_ops): Add win32_arch_string as arch_string member.
9916 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9918 * spu-low.c (spu_arch_string): New.
9919 (spu_target_ops): Add spu_arch_string.
9921 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9923 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9924 * configure.ac: Do not check for terminal.h.
9925 * configure, config.in: Regenerated.
9927 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9929 * Makefile.in (OBS): Add $(XML_BUILTIN).
9930 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9932 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9933 (arm-with-iwmmxt.c): New.
9934 * config.in, configure: Regenerate.
9935 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9936 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9937 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9938 (arm*-*-linux*): Add iWMMXt and regset support.
9939 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9940 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9941 (arm_store_wmmxregset, target_regsets): New.
9942 * server.c (get_features_xml): Take annex argument. Check builtin
9944 (handle_query): Handle multiple annexes.
9946 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9948 * remote-utils.c [USE_WIN32API] (read, write): Define.
9949 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9952 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9954 * linux-i386-low.c (the_low_target): Set arch_string.
9955 * linux-x86-64-low.c (the_low_target): Likewise.
9956 * linux-low.c (linux_arch_string): New.
9957 (linux_target_ops): Add it.
9958 * linux-low.h (struct linux_target_ops): Add arch_string.
9959 * server.c (write_qxfer_response): Use const void * for DATA.
9960 (get_features_xml): New.
9961 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9962 * target.h (struct target_ops): Add arch_string method.
9964 2007-01-03 Denis Pilat <denis.pilat@st.com>
9965 Daniel Jacobowitz <dan@codesourcery.com>
9967 * linux-low.c (linux_kill): Handle being called with no threads.
9968 * win32-i386-low.c (win32_kill): Likewise.
9969 (get_child_debug_event): Clear current_process_handle.
9971 2006-12-30 Denis PILAT <denis.pilat@st.com>
9972 Daniel Jacobowitz <dan@codesourcery.com>
9974 * remote-utils.c (remote_open): Check the type of specified
9975 serial port devices before opening them.
9976 * server.c (main): Kill the inferior if an error occurs during
9977 the first remote_open.
9979 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9981 * README: Update supported targets.
9983 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9985 * Makefile.in (clean): Remove reg-mips64.c.
9986 (reg-mips64.c, reg-mips64.o): New rules.
9987 * configure.srv: Handle mips64. Include regset support for mips.
9988 * linux-mips-low.c (union mips_register): New.
9989 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9990 (mips_breakpoint, mips_breakpoint_at): Use int.
9991 (mips_collect_register, mips_supply_register)
9992 (mips_collect_register_32bit, mips_supply_register_32bit)
9993 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9994 (mips_store_fpregset, target_regsets): New.
9995 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9997 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9999 * configure.srv: Add target "spu*-*-*".
10000 * Makefile.in (clean): Remove reg-spu.c.
10001 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10002 * spu-low.c: New file.
10004 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10006 * configure.ac: Correct td_thr_tls_get_addr test.
10007 * configure: Regenerated.
10009 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10011 * linux-low.c (linux_wait_for_event): Reformat. Use the
10012 pass_signals array.
10013 * remote-utils.c (decode_address_to_semicolon): New.
10014 * server.c (pass_signals, handle_general_set): New.
10015 (handle_query): Mention QPassSignals for qSupported.
10016 (main): Call handle_general_set.
10017 * server.h (pass_signals, decode_address_to_semicolon): New.
10019 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10021 * server.c (handle_query): Correct error handling for read_auxv.
10023 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10025 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10026 and srv_linux_thread_db to yes.
10027 * linux-s390-low.c (s390_fill_gregset): New function.
10028 (target_regsets): Define data structure.
10030 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10032 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10033 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10034 * config.in, configure: Regenerated.
10035 * inferiors.c (gdb_id_to_thread): New function.
10036 (gdb_id_to_thread_id): Use it.
10037 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10038 * linux-low.h (struct process_info): Add th member.
10039 (thread_db_get_tls_address): New prototype.
10040 * remote-utils.c (decode_address): Make non-static.
10041 * server.c (handle_query): Handle qGetTLSAddr.
10042 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10043 * target.h (struct target_ops): Add get_tls_address.
10044 * thread-db.c (maybe_attach_thread): Save the thread handle.
10045 (thread_db_get_tls_address): New.
10047 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10049 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10050 (linux_resume_one_process): Take a siginfo_t *. Update all
10051 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10052 (struct pending_signals): Add a siginfo_t.
10053 (linux_wait_for_process): Always set last_status.
10054 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10055 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10056 * linux-low.h (struct process_info): Add last_status.
10058 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10060 * remote-utils.c (try_rle): New function.
10061 (putpkt_binary): Use it.
10063 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10065 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10066 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10067 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10068 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10069 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10072 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10074 * server.c (terminal_fd): New variable.
10075 (old_foreground_pgrp): Likewise.
10076 (restore_old_foreground_pgrp): New function.
10077 (start_inferior): Record the terminal file descriptor in terminal_fd
10078 and its original foreground group in old_foreground_pgrp. Register
10079 restore_old_foreground_pgrp with atexit().
10081 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10083 * server.c (handle_query): Correct qPart to qXfer.
10085 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10087 * configure.ac: Check for more headers which are missing on
10088 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10089 * configure.srv: Add Cygwin and mingw32.
10090 * remote-utils.c: Don't include headers unconditionally which
10091 are missing on mingw32. Include <winsock.h> for mingw32.
10092 (remote_open): Adjust for mingw32 support. Flush
10093 standard error after writing to it.
10094 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10095 (unblock_async_io, enable_async_io, disable_async_io)
10096 (readchar, getpkt): Update for Winsock support.
10097 (prepare_resume_reply): Expect a protocol signal number.
10098 * server.c: Disable <sys/wait.h> on mingw32.
10099 (start_inferior): Adjust for mingw32 support. Flush
10100 standard error after writing to it.
10101 (attach_inferior): Likewise. Use protocol signal
10103 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10105 * win32-i386-low.c: New file.
10106 * Makefile.in (XM_CLIBS): Set.
10107 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10108 (win32-i386-low.o): New dependency rule.
10109 * linux-low.c (linux_wait): Use target signal numbers.
10110 * target.h (struct target_ops): Doc fix.
10111 * server.h (target_signal_to_name): New prototype.
10112 * gdbreplay.c: Don't include headers unconditionally which
10113 are missing on mingw32. Include <winsock.h> for mingw32.
10114 (remote_close, remote_open): Adjust for Winsock support.
10115 * configure, config.in: Regenerated.
10117 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10119 * server.c (decode_xfer_read, write_qxfer_response): New.
10120 (handle_query): Take a packet length argument. Handle
10121 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10122 the qSupported response.
10123 (main): Update call to handle_query.
10125 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10127 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10128 (putpkt_binary): Renamed from putpkt and adjusted for binary
10130 (putpkt): New wrapper for putpkt_binary.
10131 (readchar): Don't mask off the high bit.
10132 (decode_X_packet): New function.
10133 * server.c (main): Call putpkt_binary if a handler sets the packet
10134 length. Save the length of the incoming packet. Handle 'X'.
10135 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10137 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10139 * server.c (handle_query): Handle qSupported.
10141 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10143 * remote-utils.c (all_symbols_looked_up): New variable.
10144 (look_up_one_symbol): Check it.
10145 * server.h (look_up_one_symbol): New declaration.
10146 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10148 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10150 * Makefile.in (linux-arm-low.o): Update dependencies.
10151 * linux-arm-low.c: Include "gdb_proc_service.h".
10152 (PTRACE_GET_THREAD_AREA): Define.
10153 (ps_get_thread_area): New function.
10155 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10157 * configure.srv (m68k*-*-uclinux*): New target.
10158 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10159 (linux_resume_one_process): Remove extraneous cast.
10160 (linux_read_offsets): New.
10161 (linux_target_op): Add linux_read_offsets on mmuless systems.
10162 * server.c (handle_query): Add qOffsets logic.
10163 * target.h (struct target_ops): Add read_offsets.
10165 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10167 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10168 (PTRACE_GET_THREAD_AREA): Define.
10169 (ps_get_thread_area): New function.
10170 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10171 (linux-x86-64-low.o): Update.
10173 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10175 * configure.ac: Remove checks for prfpregset_t.
10176 * gdb_proc_service.h: New file.
10177 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10178 new "gdb_proc_service.h".
10179 * proc-service.c: Likewise.
10180 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10181 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10182 * Makefile.in (gdb_proc_service_h): Updated.
10183 * configure, config.in: Regenerated.
10185 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10187 * remote-utils.c (prepare_resume_reply): Move declaration
10188 of gdb_id_from_wait to the top of the block.
10190 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10192 * linux-low.c (regsets_store_inferior_registers): Read the regset
10193 from the target before filling it.
10195 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10197 * server.c (attach_inferior): Return SIGTRAP for a successful
10200 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10202 * Makefile.in (OBS): Add version.o.
10203 (STAGESTUFF): Delete.
10204 (version.o): Add dependencies.
10205 (version.c): Replace rule.
10206 (clean): Remove version.c.
10207 * server.c (gdbserver_version): New.
10208 (gdbserver_usage): Use printf.
10209 (main): Handle --version and --help.
10210 * server.h (version, host_name): Add declarations.
10212 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10224 * linux-x86-64-low.c:
10226 * linux-s390-low.c:
10227 * linux-ppc64-low.c:
10229 * linux-mips-low.c:
10230 * linux-m68k-low.c:
10231 * linux-m32r-low.c:
10234 * linux-ia64-low.c:
10235 * linux-i386-low.c:
10236 * linux-crisv32-low.c:
10248 * gdbserver.1: Add (C) after Copyright. Update the FSF
10251 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10253 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10254 (arm_breakpoint_at): Recognize both breakpoints.
10255 (the_low_target): Use the correct breakpoint instruction.
10257 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10259 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10260 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10261 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10262 (the_low_target): Update.
10264 2005-10-25 Andreas Schwab <schwab@suse.de>
10266 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10268 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10269 (ia64_num_regs): Reduce to 462.
10271 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10273 * acinclude.m4: Correct quoting.
10274 * aclocal.m4: Regenerated.
10276 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10277 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10278 (thread_db_init): Call thread_db_err_str.
10279 * configure.ac: Check for TD_VERSION.
10280 * config.in, configure: Regenerated.
10282 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10284 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10286 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10288 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10289 is not available. Define HAVE_PTRACE_GETREGS if it is.
10290 * config.in, configure: Regenerated.
10291 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10292 * linux-i386-low.c, linux-m68k-low.c: Update to use
10293 HAVE_PTRACE_GETREGS.
10294 * linux-low.c (regsets_fetch_inferior_registers)
10295 (regsets_store_inferior_registers): Only return 0 if we processed
10297 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10298 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10300 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10302 * inferiors.c (struct thread_info): Add gdb_id.
10303 (add_thread): Add gdb_id argument.
10304 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10305 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10306 calls to add_thread.
10307 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10308 * server.c (handle_query): Use thread_to_gdb_id.
10309 (handle_v_cont, main): Use gdb_id_to_thread_id.
10310 * server.h (add_thread): Update prototype.
10311 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10314 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10316 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10317 left-padded registers.
10318 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10319 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10321 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10323 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10324 * configure: Regenerate.
10325 * config.in: Regenerate.
10326 * server.h (NEED_DECLARATION_STRERROR):
10327 Replace with !HAVE_DECL_STRERROR.
10329 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10331 * linux-low.c (linux_wait, linux_send_signal): Don't test
10332 an unsigned long variable for > 0 if it could be MAX_ULONG.
10333 * server.c (myresume): Likewise.
10334 * target.c (set_desired_inferior): Likewise.
10336 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10338 * configure.ac: Simplify and improve check for socklen_t.
10339 * configure, config.in: Regenerate.
10341 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10343 * acconfig.h: Remove.
10344 * configure.ac: Add a test for socklen_t. Use three-argument
10345 AC_DEFINE throughout.
10346 * config.in: Regenerated using autoheader 2.59.
10347 * configure: Regenerated.
10349 * gdbreplay.c (socklen_t): Provide a default.
10350 (remote_open): Use socklen_t.
10351 * remote-utils.c (socklen_t): Provide a default.
10352 (remote_open): Use socklen_t.
10353 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10356 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10358 * linux-low.c (linux_read_memory, linux_write_memory)
10359 (linux_read_auxv): Likewise.
10360 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10361 (check_mem_write): Likewise.
10362 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10364 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10365 (registers_from_string, register_data): Likewise.
10366 * server.c (handle_query, main): Likewise.
10367 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10368 (decode_M_packet): Likewise.
10369 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10370 * target.h (struct target_ops): Update read_memory, write_memory,
10372 (read_inferior_memory, write_inferior_memory): Update.
10373 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10374 to unsigned char *.
10375 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10376 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10377 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10378 linux-s390-low.c, linux-sh-low.c: Update for changes in
10379 read_inferior_memory and the_low_target->breakpoint.
10381 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10383 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10384 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10385 * configure.srv: Add powerpc64-*-linux*.
10386 * linux-ppc64-low.c: New file.
10388 2005-05-23 Orjan Friberg <orjanf@axis.com>
10390 * linux-cris-low.c: New file with support for CRIS.
10391 * linux-crisv32-low.c: Ditto for CRISv32.
10392 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10393 (clean): Add reg-cris.c and reg-crisv32.c.
10394 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10395 reg-crisv32.o, and reg-crisv32.c to make rules.
10396 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10397 recognized targets.
10399 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10401 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10402 of sizeof (PTRACE_XFER_TYPE).
10403 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10405 2005-05-12 Orjan Friberg <orjanf@axis.com>
10407 * target.h (struct target_ops): Add insert_watchpoint,
10408 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10409 pointers for hardware watchpoint support.
10410 * linux-low.h (struct linux_target_ops): Ditto.
10411 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10412 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10413 to linux_target_ops.
10414 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10416 * server.c (main): Recognize 'Z' and 'z' packets.
10418 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10420 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10421 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10422 (the_low_target): Add new members.
10424 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10426 * proc-service.c (ps_lgetregs): Search all_processes instead of
10429 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10431 * server.c (start_inferior): Change return type to int.
10432 (attach_inferior): Change sigptr to int *.
10433 (handle_v_cont, handle_v_requests): Change signal to int *.
10434 (main): Change signal to int.
10436 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10438 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10439 * configure.srv: Add m32r*-*-linux*.
10440 * linux-m32r-low.c: New file.
10442 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10444 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10446 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10448 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10449 Take unsigned long arguments for PIDs.
10450 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10451 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10452 (wait_for_sigstop, linux_resume_one_process)
10453 (regsets_fetch_inferior_registers, linux_send_signal)
10454 (linux_read_auxv): Likewise. Update the types of variables holding
10455 PIDs. Update format string specifiers.
10456 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10457 * remote-utils.c (prepare_resume_reply): Likewise.
10458 * server.c (cont_thread, general_thread, step_thread)
10459 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10461 (handle_query): Update format specifiers.
10462 (handle_v_cont, main): Use strtoul for thread IDs.
10463 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10464 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10465 (general_thread, step_thread, thread_from_wait)
10466 (old_thread_from_wait): Update.
10467 * target.h (struct thread_resume): Use unsigned long for THREAD.
10468 (struct target_ops): Use unsigned long for arguments to attach and
10471 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10473 * acinclude.m4: Include bfd/bfd.m4 directly.
10474 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10475 <agriffis@toolchain.org>.
10476 * aclocal.m4, configure: Regenerated.
10478 2005-01-07 Andrew Cagney <cagney@gnu.org>
10480 * configure.ac: Rename configure.in, require autoconf 2.59.
10481 * configure: Re-generate.
10483 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10485 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10486 LIBS when finished.
10487 * aclocal.m4: Regenerated.
10488 * configure: Regenerated.
10490 2004-11-21 Andreas Schwab <schwab@suse.de>
10492 * linux-m68k-low.c (m68k_num_gregs): Define.
10493 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10494 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10495 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10496 (m68k_breakpoint_at): New. Add to the_low_target.
10498 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10499 srv_linux_thread_db to yes.
10501 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10503 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10504 (ARCH_SET_FS): Likewise.
10505 (ARCH_GET_FS): Likewise.
10506 (ARCH_GET_GS): Likewise.
10508 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10510 * linux-i386-low.c (ps_get_thread_area): New.
10511 * linux-x86-64-low.c (ps_get_thread_area): New.
10512 * linux-low.c: Include <sys/syscall.h>.
10513 (linux_kill_one_process): Don't kill the first thread here.
10514 (linux_kill): Kill the first thread here.
10515 (kill_lwp): New function.
10516 (send_sigstop, linux_send_signal): Use it.
10517 * proc-service.c: Clean up #ifdefs.
10518 (fpregset_info): Delete.
10519 (ps_lgetregs): Update and enable implementation.
10520 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10522 * remote-utils.c (struct sym_cache, symbol_cache): New.
10523 (input_interrupt): Print a clearer message.
10524 (async_io_enabled): New variable.
10525 (enable_async_io, disable_async_io): Use it. Update comments.
10526 (look_up_one_symbol): Use the symbol cache.
10527 * thread-db.c (thread_db_look_up_symbols): New function.
10528 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10530 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10532 * configure.in: Test for -rdynamic.
10533 * configure: Regenerated.
10534 * Makefile (INTERNAL_LDFLAGS): New.
10535 (gdbserver, gdbreplay): Use it.
10537 2004-09-02 Andrew Cagney <cagney@gnu.org>
10539 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10541 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10543 * linux-low.c (linux_wait): Clear all_processes list also.
10545 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10547 * linux-low.c: Include <errno.h>. Remove extern declaration of
10550 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10552 * gdbreplay.c, server.h, utils.c: Update copyright years.
10554 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10556 * server.c (main): Print child status or termination signal from
10557 variable 'signal', not 'sig'.
10559 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10561 * linux-low.c (linux_read_memory): Change return type to
10562 int. Check for and return error from ptrace().
10563 * target.c (read_inferior_memory): Change return type to int. Pass
10564 back return status from the_target->read_memory().
10565 * target.h (struct target_ops): Adapt *read_memory() prototype.
10567 (read_inferior_memory): Adapt prototype.
10568 * server.c (main): Return an error packet if
10569 read_inferior_memory() returns an error.
10571 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10573 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10574 Unify with other clean targets.
10576 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10578 * server.c (handle_v_cont): Call set_desired_inferior.
10580 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10582 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10584 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10586 * linux-low.c (linux_wait): Unblock async I/O.
10587 (linux_resume): Block and enable async I/O.
10588 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10589 * server.h (block_async_io, unblock_async_io): Add prototypes.
10591 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10593 * remote-utils.c (remote_open): Print a status notice after
10594 opening a TCP port.
10595 * server.c (attach_inferior): Print a status notice after
10598 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10600 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10602 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10604 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10606 * server.c, target.h: Update copyright years.
10608 2004-02-25 Roland McGrath <roland@redhat.com>
10610 * target.h (struct target_ops): New member `read_auxv'.
10611 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10612 * linux-low.c (linux_read_auxv): New function.
10613 (linux_target_ops): Initialize `read_auxv' member to that.
10615 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10617 Committed by Jim Blandy <jimb@redhat.com>.
10619 * linux-s390-low.c (s390_num_regs): Update.
10620 (s390_regmap): Remove control registers. Use __s390x__ predefine
10621 instead of GPR_SIZE to distiguish s390 and s390x targets.
10623 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10625 * linux-low.c: Update copyright year.
10626 (check_removed_breakpoint): Clear pending_is_breakpoint.
10627 (linux_set_resume_request, linux_queue_one_thread)
10628 (resume_status_pending_p): New functions.
10629 (linux_continue_one_thread): Use process->resume.
10630 (linux_resume): Only resume threads if there are no pending events.
10631 * linux-low.h (struct process_info): Add resume request
10634 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10636 * regcache.c (new_register_cache): Clear the allocated register
10637 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10639 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10641 * linux-low.c (linux_resume): Take a struct thread_resume *
10643 (linux_wait): Update call.
10644 (resume_ptr): New static variable.
10645 (linux_continue_one_thread): Renamed from
10646 linux_continue_one_process. Use resume_ptr.
10647 (linux_resume): Use linux_continue_one_thread.
10648 * server.c (handle_v_cont, handle_v_requests): New functions.
10649 (myresume): New function.
10650 (main): Handle 'v' case.
10651 * target.h (struct thread_resume): New type.
10652 (struct target_ops): Change argument of "resume" to struct
10654 (myresume): Delete macro.
10656 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10658 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10659 (uninstall): Support DESTDIR.
10661 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10663 * configure.srv: Add xscale*linux copy of arm*linux entry.
10665 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10667 * linux-arm-low.c (arm_reinsert_addr): New function.
10668 (the_low_target): Add arm_reinsert_addr.
10670 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10672 * mem-break.c: Remove whitespace at end of file.
10674 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10676 * configure.in: Check whether we need to prototype strerror.
10677 * server.h: Optionally prototype strerror.
10678 * gdbreplay.c (perror_with_name): Use strerror.
10679 * linux-low.c (linux_attach_lwp): Use strerror.
10680 * utils.c (perror_with_name): Use strerror.
10681 * config.in, configure: Regenerated.
10683 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10685 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10686 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10688 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10690 * Makefile.in (SFILES): Update.
10691 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10692 low-sun3.c: Remove files.
10694 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10696 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10697 (linux_detach_one_process, linux_detach): New functions.
10698 (linux_target_ops): Add linux_detach.
10699 * server.c (main): Handle 'D' packet.
10700 * target.h (struct target_ops): Add "detach" member.
10701 (detach_inferior): Define.
10703 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10705 From Kelley Cook <kelleycook@wideopenwest.com>:
10706 * configure.srv: Accept i[34567]86 variants.
10708 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10710 * linux-low.c (linux_wait_for_event): Correct comment typos.
10711 (linux_resume_one_process): Call check_removed_breakpoint.
10712 (linux_send_signal): New function.
10713 (linux_target_ops): Add linux_send_signal.
10714 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10716 * target.h (struct target_ops): Add send_signal.
10718 2003-05-29 Jim Blandy <jimb@redhat.com>
10720 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10721 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10722 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10723 away part of the register's value.
10725 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10727 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10728 (linux_wait_for_event, linux_init_signals): Likewise.
10730 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10732 * configure.in: Check for stdlib.h.
10733 * configure: Regenerated.
10734 * config.in: Regenerated.
10736 2003-01-04 Andreas Schwab <schwab@suse.de>
10738 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10740 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10742 * Makefile.in: Remove obsolete code.
10744 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10746 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10747 defined(PT_FPR0_HI).
10749 2002-11-17 Stuart Hughes <seh@zee2.com>
10751 * linux-arm-low.c (arm_num_regs): Increase.
10752 (arm_regmap): Include status register.
10754 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10756 * linux-low.c (register_addr): Remove incorrect -1 check.
10758 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10760 * linux-low.c (linux_create_inferior): Call setpgid. Return
10762 (unstopped_p, linux_signal_pid): Remove.
10763 (linux_target_ops): Remove linux_signal_pid.
10764 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10765 global instead of target method.
10766 * target.h (struct target_ops): Remove signal_pid. Update comment
10767 for create_inferior.
10768 * server.c (signal_pid): New variable.
10769 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10770 gdbserver. Set the child to be the foreground process group.
10771 (attach_inferior): Set signal_pid.
10773 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10775 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10777 2002-08-20 Jim Blandy <jimb@redhat.com>
10779 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10782 2002-08-01 Andrew Cagney <cagney@redhat.com>
10784 * Makefile.in: Make chill references obsolete.
10786 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10788 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10789 * configure: Regenerate.
10790 * config.in: Regenerate.
10792 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10794 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10795 (perror_with_name, remote_close, remote_open, expect, play): Static.
10797 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10799 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10800 byte offsets instead of an array of indexes.
10801 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10803 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10805 * regcache.c: Add comment.
10807 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10809 * thread-db.c: New file.
10810 * proc-service.c: New file.
10811 * acinclude.m4: New file.
10812 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10813 proc-service.o, and thread-db.o.
10814 (linux-low.o): Add USE_THREAD_DB.
10815 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10816 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10817 * aclocal.m4: Regenerated.
10818 * config.in: Regenerated.
10819 * configure: Regenerated.
10820 * configure.in: Check for proc_service.h, sys/procfs.h,
10821 thread_db.h, and linux/elf.h headrs.
10822 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10823 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10824 Check for -lthread_db and thread support.
10825 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10826 PowerPC, and SuperH.
10827 * i387-fp.c: Constify arguments.
10828 * i387-fp.h: Likewise.
10829 * inferiors.c: (struct thread_info): Renamed from
10830 `struct inferior_info'. Remove PID member. Use generic inferior
10831 list header. All uses updated.
10832 (inferiors, signal_pid): Removed.
10833 (all_threads): New variable.
10834 (get_thread): Define.
10835 (add_inferior_to_list): New function.
10836 (for_each_inferior): New function.
10837 (change_inferior_id): New function.
10838 (add_inferior): Removed.
10839 (remove_inferior): New function.
10840 (add_thread): New function.
10841 (free_one_thread): New function.
10842 (remove_thread): New function.
10843 (clear_inferiors): Use for_each_inferior and free_one_thread.
10844 (find_inferior): New function.
10845 (find_inferior_id): New function.
10846 (inferior_target_data): Update argument type.
10847 (set_inferior_target_data): Likewise.
10848 (inferior_regcache_data): Likewise.
10849 (set_inferior_regcache_data): Likewise.
10850 * linux-low.c (linux_bp_reinsert): Remove.
10851 (all_processes, stopping_threads, using_thrads)
10852 (struct pending_signals, debug_threads, pid_of): New.
10853 (inferior_pid): Replace with macro.
10854 (struct inferior_linux_data): Remove.
10855 (get_stop_pc, add_process): New functions.
10856 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10857 Use add_process and add_thread.
10858 (linux_attach_lwp): New function, based on old linux_attach. Use
10859 add_process and add_thread. Set stop_expected for new threads.
10860 (linux_attach): New function.
10861 (linux_kill_one_process): New function.
10862 (linux_kill): Kill all LWPs.
10863 (linux_thread_alive): Use find_inferior_id.
10864 (check_removed_breakpoints, status_pending_p): New functions.
10865 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10866 Update. Use WNOHANG. Wait for cloned processes also. Update process
10867 struct for the found process.
10868 (linux_wait_for_event): New function.
10869 (linux_wait): Use it. Support LWPs.
10870 (send_sigstop, wait_for_sigstop, stop_all_processes)
10871 (linux_resume_one_process, linux_continue_one_process): New functions.
10872 (linux_resume): Support LWPs.
10873 (REGISTER_RAW_SIZE): Remove.
10874 (fetch_register): Use register_size instead. Call supply_register.
10875 (usr_store_inferior_registers): Likewise. Call collect_register.
10876 Fix recursive case.
10877 (regsets_fetch_inferior_registers): Improve error message.
10878 (regsets_store_inferior_registers): Add debugging.
10879 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10880 (unstopped_p, linux_signal_pid): New functions.
10881 (linux_target_ops): Add linux_signal_pid.
10882 (linux_init_signals): New function.
10883 (initialize_low): Call it. Initialize using_threads.
10884 * regcache.c (inferior_regcache_data): Add valid
10886 (get_regcache): Fetch registers lazily. Add fetch argument
10887 and update all callers.
10888 (regcache_invalidate_one, regcache_invalidate): New
10890 (new_register_cache): Renamed from create_register_cache.
10891 Return the new regcache.
10892 (free_register_cache): Change argument to a void *.
10893 (registers_to_string, registers_from_string): Call get_regcache
10894 with fetch flag set.
10895 (register_data): Make static. Pass fetch flag to get_regcache.
10896 (supply_register): Call get_regcache with fetch flag clear.
10897 (collect_register): Call get_regcache with fetch flag set.
10898 (collect_register_as_string): New function.
10899 * regcache.h: Update.
10900 * remote-utils.c (putpkt): Flush after debug output and use
10902 Handle input interrupts while waiting for an ACK.
10903 (input_interrupt): Use signal_pid method.
10904 (getpkt): Flush after debug output and use stderr.
10905 (outreg): Use collect_register_as_string.
10906 (new_thread_notify, dead_thread_notify): New functions.
10907 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10908 and general_thread.
10909 (look_up_one_symbol): Flush after debug output.
10910 * server.c (step_thread, server_waiting): New variables.
10911 (start_inferior): Don't use signal_pid. Update call to mywait.
10912 (attach_inferior): Update call to mywait.
10913 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10914 (main): Don't fetch/store registers explicitly. Use
10915 set_desired_inferior. Support proposed ``Hs'' packet. Update
10917 * server.h: Update.
10918 (struct inferior_list, struct_inferior_list_entry): New.
10919 * target.c (set_desired_inferior): New.
10920 (write_inferior_memory): Constify.
10921 (mywait): New function.
10922 * target.h: Update.
10923 (struct target_ops): New signal_pid method.
10924 (mywait): Removed macro, added prototype.
10926 * linux-low.h (regset_func): Removed.
10927 (regset_fill_func, regset_store_func): New.
10928 (enum regset_type): New.
10929 (struct regset_info): Add type field. Use new operation types.
10930 (struct linux_target_ops): stop_pc renamed to get_pc.
10931 Add decr_pc_after_break and breakpoint_at.
10932 (get_process, get_thread_proess, get_process_thread)
10933 (strut process_info, all_processes, linux_attach_lwp)
10934 (thread_db_init): New.
10936 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10937 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10938 (the_low_target): Add new members.
10939 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10940 (i386_store_fpxregset): Constify.
10941 (target_regsets): Add new kind identifier.
10942 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10943 (i386_set_pc): Add debugging.
10944 (i386_breakpoint_at): New function.
10945 (the_low_target): Add new members.
10946 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10947 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10948 (mips_breakpoint_at): New.
10949 (the_low_target): Add new members.
10950 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10951 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10952 (the_low_target): Add new members.
10953 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10954 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10955 (the_low_target): Add new members.
10956 * linux-x86-64-low.c (target_regsets): Add new kind
10959 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10961 From Martin Pool <mbp@samba.org>:
10962 * server.c (gdbserver_usage): New function.
10965 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10967 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10968 stop_at -> stop_pc.
10970 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10972 * Makefile.in: Remove obsolete code.
10974 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10976 * linux-low.c (regsets_fetch_inferior_registers),
10977 (regsets_store_inferior_registers): Removed cast to int from
10979 * regcache.h: Added declaration of struct inferior_info.
10981 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10983 * inferiors.c (struct inferior_info): Add regcache_data.
10984 (add_inferior): Call create_register_cache.
10985 (clear_inferiors): Call free_register_cache.
10986 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10987 * regcache.c (struct inferior_regcache_data): New.
10988 (registers): Remove.
10989 (get_regcache): New function.
10990 (create_register_cache, free_register_cache): New functions.
10991 (set_register_cache): Don't initialize the register cache here.
10992 (registers_to_string, registers_from_string, register_data): Call
10994 * regcache.h: Add prototypes.
10995 * server.h: Likewise.
10997 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10999 * mem-break.c: New file.
11000 * mem-break.h: New file.
11001 * Makefile.in: Add mem-break.o rule; update server.h
11003 * inferiors.c (struct inferior_info): Add target_data
11005 (clear_inferiors): Free target_data member if set.
11006 (inferior_target_data, set_inferior_target_data): New functions.
11007 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11008 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11009 * linux-low.c (linux_bp_reinsert): New variable.
11010 (struct inferior_linux_data): New.
11011 (linux_create_inferior): Use set_inferior_target_data.
11012 (linux_attach): Likewise. Call add_inferior.
11013 (linux_wait_for_one_inferior): New function.
11014 (linux_wait): Call it.
11015 (linux_write_memory): Add const.
11016 (initialize_low): Call set_breakpoint_data.
11017 * linux-low.h (struct linux_target_ops): Add breakpoint
11019 * server.c (attach_inferior): Remove extra add_inferior
11021 * server.h: Include mem-break.h. Update inferior.c
11023 * target.c (read_inferior_memory)
11024 (write_inferior_memory): New functions.
11025 * target.h (read_inferior_memory)
11026 (write_inferior_memory): Change macros to prototypes.
11027 (struct target_ops): Update comments. Add const to write_memory
11030 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11032 * linux-low.c (usr_store_inferior_registers): Support
11033 registers which are allowed to fail to store.
11034 * linux-low.h (linux_target_ops): Likewise.
11035 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11036 (ppc_cannot_store_register): FPSCR may not be storable.
11038 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11040 * server.h: Include <string.h> if HAVE_STRING_H.
11041 * ChangeLog: Correct paths in last ChangeLog entry.
11043 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11045 * linux-low.h: Remove obsolete prototypes.
11046 (struct linux_target_ops): New.
11047 (extern the_low_target): New.
11048 * linux-low.c (num_regs, regmap): Remove declarations.
11049 (register_addr): Use the_low_target explicitly.
11050 (fetch_register): Likewise.
11051 (usr_fetch_inferior_registers): Likewise.
11052 (usr_store_inferior_registers): Likewise.
11053 * linux-arm-low.c (num_regs): Remove.
11054 (arm_num_regs): Define.
11055 (arm_regmap): Renamed from regmap, made static.
11056 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11058 (arm_cannot_store_register): Renamed from cannot_store_register,
11060 (the_low_target): New.
11061 * linux-i386-low.c (num_regs): Remove.
11062 (i386_num_regs): Define.
11063 (i386_regmap): Renamed from regmap, made static.
11064 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11066 (i386_cannot_store_register): Renamed from cannot_store_register,
11068 (the_low_target): New.
11069 * linux-ia64-low.c (num_regs): Remove.
11070 (ia64_num_regs): Define.
11071 (ia64_regmap): Renamed from regmap, made static.
11072 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11074 (ia64_cannot_store_register): Renamed from cannot_store_register,
11076 (the_low_target): New.
11077 * linux-m68k-low.c (num_regs): Remove.
11078 (m68k_num_regs): Define.
11079 (m68k_regmap): Renamed from regmap, made static.
11080 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11082 (m68k_cannot_store_register): Renamed from cannot_store_register,
11084 (the_low_target): New.
11085 * linux-mips-low.c (num_regs): Remove.
11086 (mips_num_regs): Define.
11087 (mips_regmap): Renamed from regmap, made static.
11088 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11090 (mips_cannot_store_register): Renamed from cannot_store_register,
11092 (the_low_target): New.
11093 * linux-ppc-low.c (num_regs): Remove.
11094 (ppc_num_regs): Define.
11095 (ppc_regmap): Renamed from regmap, made static.
11096 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11098 (ppc_cannot_store_register): Renamed from cannot_store_register,
11100 (the_low_target): New.
11101 * linux-s390-low.c (num_regs): Remove.
11102 (s390_num_regs): Define.
11103 (s390_regmap): Renamed from regmap, made static.
11104 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11106 (s390_cannot_store_register): Renamed from cannot_store_register,
11108 (the_low_target): New.
11109 * linux-sh-low.c (num_regs): Remove.
11110 (sh_num_regs): Define.
11111 (sh_regmap): Renamed from regmap, made static.
11112 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11114 (sh_cannot_store_register): Renamed from cannot_store_register,
11116 (the_low_target): New.
11117 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11118 (the_low_target): New.
11120 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11122 * Makefile.in: Add stamp-h target.
11123 * configure.in: Create stamp-h.
11124 * configure: Regenerated.
11126 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11128 * inferiors.c: New file.
11129 * target.c: New file.
11130 * target.h: New file.
11131 * Makefile.in: Add target.o and inferiors.o. Update
11133 * linux-low.c (inferior_pid): New static variable,
11134 moved from server.c.
11135 (linux_create_inferior): Renamed from create_inferior.
11136 Call add_inferior. Return 0 on success instead of a PID.
11137 (linux_attach): Renamed from myattach.
11138 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11139 (linux_thread_alive): Renamed from mythread_alive.
11140 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11142 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11143 (regsets_store_inferior_registers): Correct error message.
11144 Add missing ``return 0''.
11145 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11146 (linux_store_registers): Renamed from store_inferior_registers.
11147 (linux_read_memory): Renamed from read_inferior_memory.
11148 (linux_write_memory): Renamed from write_inferior_memory.
11149 (linux_target_ops): New structure.
11150 (initialize_low): Call set_target_ops ().
11151 * remote-utils.c (unhexify): New function.
11152 (hexify): New function.
11153 (input_interrupt): Send signals to ``signal_pid''.
11154 * server.c (inferior_pid): Remove.
11155 (start_inferior): Update create_inferior call.
11156 (attach_inferior): Call add_inferior.
11157 (handle_query): New function.
11158 (main): Call handle_query for `q' packets.
11159 * server.h: Include "target.h". Remove obsolete prototypes.
11160 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11162 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11164 * Makefile.in: Add WARN_CFLAGS. Update configury
11166 * configure.in: Check for <string.h>
11167 * configure: Regenerate.
11168 * config.in: Regenerate.
11169 * gdbreplay.c: Include needed system headers.
11170 (remote_open): Remove strchr prototype.
11171 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11172 * regcache.c (supply_register): Change buf argument to const void *.
11173 (supply_register_by_name): Likewise.
11174 (collect_register): Change buf argument to void *.
11175 (collect_register_by_name): Likewise.
11176 * regcache.h: Add missing prototypes.
11177 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11178 * server.c (handle_query): New function.
11179 (attached): New static variable, moved out of main.
11180 (main): Quiet longjmp clobber warnings.
11181 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11182 * utils.c (error): Remove NORETURN.