1 2015-05-12 Don Breazeal <donb@codesourcery.com>
3 * linux-low.c (linux_supports_fork_events): New function.
4 (linux_supports_vfork_events): New function.
5 (linux_target_ops): Initialize new structure members.
6 (initialize_low): Call linux_check_ptrace_features.
7 * lynx-low.c (lynx_target_ops): Initialize new structure
9 * server.c (report_fork_events, report_vfork_events):
11 (handle_query): Add new features to qSupported packet and
13 (captured_main): Initialize new global variables.
14 * target.h (struct target_ops) <supports_fork_events>:
16 <supports_vfork_events>: New member.
17 (target_supports_fork_events): New macro.
18 (target_supports_vfork_events): New macro.
19 * win32-low.c (win32_target_ops): Initialize new structure
22 2015-05-12 Gary Benson <gbenson@redhat.com>
24 * server.c (handle_qxfer_exec_file): Use current process
27 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
29 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
30 Remove HAVE_PTRACE_GETREGS conditionals.
31 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
32 instead of PTRACE_GETREGS and PTRACE_SETREGS.
34 2015-05-08 Yao Qi <yao.qi@linaro.org>
36 * linux-low.c (linux_supports_conditional_breakpoints): New
38 (linux_target_ops): Install new target method.
39 * lynx-low.c (lynx_target_ops): Install NULL hook for
40 supports_conditional_breakpoints.
41 * nto-low.c (nto_target_ops): Likewise.
42 * spu-low.c (spu_target_ops): Likewise.
43 * win32-low.c (win32_target_ops): Likewise.
44 * server.c (handle_query): Check
45 target_supports_conditional_breakpoints.
46 * target.h (struct target_ops) <supports_conditional_breakpoints>:
48 (target_supports_conditional_breakpoints): New macro.
50 2015-05-06 Pedro Alves <palves@redhat.com>
53 * server.c (start_inferior): If the process exits, mourn it.
55 2015-04-21 Gary Benson <gbenson@redhat.com>
57 * hostio.c (fileio_open_flags_to_host): Factored out to
58 fileio_to_host_openflags in common/fileio.c. Single use
61 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
63 * linux-xtensa-low.c (xtensa_fill_gregset)
64 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
67 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
69 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
70 (regs_info): Replace usrregs pointer with NULL.
72 2015-04-17 Gary Benson <gbenson@redhat.com>
74 * target.h (struct target_ops) <pid_to_exec_file>: New field.
75 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
76 * server.c (handle_qxfer_exec_file): New function.
77 (qxfer_packets): Add exec-file entry.
78 (handle_query): Report qXfer:exec-file:read as supported packet.
80 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
82 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
84 2015-04-09 Gary Benson <gbenson@redhat.com>
86 * hostio-errno.c (errno_to_fileio_error): Remove function.
87 Update caller to use remote_fileio_to_fio_error.
89 2015-04-09 Yao Qi <yao.qi@linaro.org>
91 * linux-low.c (linux_insert_point): Call
92 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
93 (linux_remove_point): Call remove_memory_breakpoint if type is
95 * linux-x86-low.c (x86_insert_point): Don't call
96 insert_memory_breakpoint.
97 (x86_remove_point): Don't call remove_memory_breakpoint.
99 2015-04-01 Pedro Alves <palves@redhat.com>
100 Cleber Rosa <crosa@redhat.com>
102 * server.c (gdbserver_usage): Reorganize and extend the usage
105 2015-03-24 Pedro Alves <palves@redhat.com>
107 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
108 output. Also dump TRAP_TRACE.
109 (linux_low_filter_event): In debug output, distinguish a
110 resume_stop SIGSTOP from a delayed SIGSTOP.
112 2015-03-24 Gary Benson <gbenson@redhat.com>
114 * linux-x86-low.c (x86_linux_new_thread): Moved to
116 (x86_linux_prepare_to_resume): Likewise.
118 2015-03-24 Gary Benson <gbenson@redhat.com>
120 * Makefile.in (x86-linux-dregs.o): New rule.
121 * configure.srv: Add x86-linux-dregs.o to relevant targets.
122 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
123 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
124 (x86_linux_dr_get): Likewise.
125 (x86_linux_dr_set): Likewise.
126 (update_debug_registers_callback): Likewise.
127 (x86_linux_dr_set_addr): Likewise.
128 (x86_linux_dr_get_addr): Likewise.
129 (x86_linux_dr_set_control): Likewise.
130 (x86_linux_dr_get_control): Likewise.
131 (x86_linux_dr_get_status): Likewise.
132 (x86_linux_update_debug_registers): Likewise.
134 2015-03-24 Gary Benson <gbenson@redhat.com>
136 * linux-x86-low.c (x86_linux_update_debug_registers):
137 New function, factored out from...
138 (x86_linux_prepare_to_resume): ...this.
140 2015-03-24 Gary Benson <gbenson@redhat.com>
142 * linux-x86-low.c (x86_linux_dr_get): Update comments.
143 (x86_linux_dr_set): Likewise.
144 (update_debug_registers_callback): Likewise.
145 (x86_linux_dr_set_addr): Likewise.
146 (x86_linux_dr_get_addr): Likewise.
147 (x86_linux_dr_set_control): Likewise.
148 (x86_linux_dr_get_control): Likewise.
149 (x86_linux_dr_get_status): Likewise.
150 (x86_linux_prepare_to_resume): Likewise.
152 2015-03-24 Gary Benson <gbenson@redhat.com>
154 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
155 Use perror_with_name. Pass string through gettext.
156 (x86_linux_dr_set): Likewise.
158 2015-03-24 Gary Benson <gbenson@redhat.com>
160 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
161 (x86_linux_dr_set_addr): ...this.
162 (x86_dr_low_get_addr): Rename to...
163 (x86_linux_dr_get_addr): ...this.
164 (x86_dr_low_set_control): Rename to...
165 (x86_linux_dr_set_control): ...this.
166 (x86_dr_low_get_control): Rename to...
167 (x86_linux_dr_get_control): ...this.
168 (x86_dr_low_get_status): Rename to...
169 (x86_linux_dr_get_status): ...this.
170 (x86_dr_low): Update with new function names.
172 2015-03-24 Gary Benson <gbenson@redhat.com>
174 * Makefile.in (x86-linux.o): New rule.
175 * configure.srv: Add x86-linux.o to relevant targets.
176 * linux-low.c (lwp_set_arch_private_info): New function.
177 (lwp_arch_private_info): Likewise.
178 * linux-x86-low.c: Include nat/x86-linux.h.
179 (arch_lwp_info): Removed structure.
180 (update_debug_registers_callback):
181 Use lwp_set_debug_registers_changed.
182 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
183 and lwp_set_debug_registers_changed.
184 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
186 2015-03-24 Gary Benson <gbenson@redhat.com>
188 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
189 * linux-arm-low.c (arm_new_thread): Likewise.
190 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
191 * linux-mips-low.c (mips_linux_new_thread): Likewise.
192 * linux-x86-low.c (x86_linux_new_thread): Likewise.
193 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
195 2015-03-24 Gary Benson <gbenson@redhat.com>
197 * linux-low.c (ptid_of_lwp): New function.
198 (lwp_is_stopped): Likewise.
199 (lwp_stop_reason): Likewise.
200 * linux-x86-low.c (update_debug_registers_callback):
202 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
205 2015-03-24 Gary Benson <gbenson@redhat.com>
207 * linux-low.h (linux_stop_lwp): Remove declaration.
209 2015-03-24 Gary Benson <gbenson@redhat.com>
211 * linux-low.h: Include nat/linux-nat.h.
212 * linux-low.c (iterate_over_lwps_args): New structure.
213 (iterate_over_lwps_filter): New function.
214 (iterate_over_lwps): Likewise.
215 * linux-x86-low.c (update_debug_registers_callback):
216 Update signature to what iterate_over_lwps expects.
217 Remove PID check that iterate_over_lwps now performs.
218 (x86_dr_low_set_addr): Use iterate_over_lwps.
219 (x86_dr_low_set_control): Likewise.
221 2015-03-24 Gary Benson <gbenson@redhat.com>
223 * linux-x86-low.c (x86_debug_reg_state): New function.
224 (x86_linux_prepare_to_resume): Use the above.
226 2015-03-24 Gary Benson <gbenson@redhat.com>
228 * linux-low.c (current_lwp_ptid): New function.
229 * linux-x86-low.c: Include nat/linux-nat.h.
230 (x86_dr_low_get_addr): Use current_lwp_ptid.
231 (x86_dr_low_get_control): Likewise.
232 (x86_dr_low_get_status): Likewise.
234 2015-03-20 Pedro Alves <palves@redhat.com>
236 * tracepoint.c (cmd_qtstatus): Make "str" const.
238 2015-03-20 Pedro Alves <palves@redhat.com>
240 * server.c (handle_general_set): Make "req_str" const.
242 2015-03-19 Pedro Alves <palves@redhat.com>
244 * linux-low.c (linux_resume_one_lwp): Rename to ...
245 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
246 instead call perror_with_name.
247 (check_ptrace_stopped_lwp_gone): New function.
248 (linux_resume_one_lwp): Reimplement as wrapper around
249 linux_resume_one_lwp_throw that swallows errors if the LWP is
252 2015-03-19 Pedro Alves <palves@redhat.com>
254 * linux-low.c (count_events_callback, select_event_lwp_callback):
255 No longer check whether the thread has resume_stop as last resume
258 2015-03-19 Pedro Alves <palves@redhat.com>
260 * linux-low.c (count_events_callback, select_event_lwp_callback):
261 Use the lwp's status_pending_p field, not the thread's.
263 2015-03-19 Pedro Alves <palves@redhat.com>
265 * linux-low.c (select_event_lwp_callback): Update comments to
266 no longer mention SIGTRAP.
268 2015-03-18 Gary Benson <gbenson@redhat.com>
270 * server.c (handle_query): Do not report vFile:fstat as supported.
272 2015-03-11 Gary Benson <gbenson@redhat.com>
274 * hostio.c (sys/types.h): New include.
275 (sys/stat.h): Likewise.
276 (common-remote-fileio.h): Likewise.
277 (handle_fstat): New function.
278 (handle_vFile): Handle vFile:fstat packets.
280 2015-03-11 Gary Benson <gbenson@redhat.com>
282 * configure.ac (AC_CHECK_MEMBERS): Add checks for
283 struct stat.st_blocks and struct stat.st_blksize.
284 * configure: Regenerate.
285 * config.in: Likewise.
286 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
287 (OBS): Add common-remote-fileio.o.
288 (common-remote-fileio.o): New rule.
290 2015-03-09 Pedro Alves <palves@redhat.com>
292 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
293 'struct sockaddr' pointer in 'accept' call.
295 2015-03-09 Pedro Alves <palves@redhat.com>
298 2015-03-07 Pedro Alves <palves@redhat.com>
299 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
300 or <winsock2.h> here. Instead include "gdb_socket.h".
301 (remote_open): Use union gdb_sockaddr_u.
302 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
303 or <winsock2.h> here. Instead include "gdb_socket.h".
304 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
305 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
307 (init_named_socket, gdb_agent_helper_thread): Use union
310 2015-03-07 Pedro Alves <palves@redhat.com>
312 * configure.ac (build_warnings): Move
313 -Wdeclaration-after-statement to the C-specific set.
314 * configure: Regenerate.
316 2015-03-07 Pedro Alves <palves@redhat.com>
318 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
319 or <winsock2.h> here. Instead include "gdb_socket.h".
320 (remote_open): Use union gdb_sockaddr_u.
321 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
322 or <winsock2.h> here. Instead include "gdb_socket.h".
323 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
324 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
326 (init_named_socket, gdb_agent_helper_thread): Use union
329 2015-03-07 Pedro Alves <palves@redhat.com>
331 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
334 2015-03-06 Yao Qi <yao.qi@linaro.org>
336 * linux-aarch64-low.c (aarch64_insert_point): Use
337 show_debug_regs as a boolean.
338 (aarch64_remove_point): Likewise.
340 2015-03-05 Pedro Alves <palves@redhat.com>
342 * lynx-low.c (lynx_target_ops): Install NULL hooks for
343 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
344 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
345 * nto-low.c (nto_target_ops): Likewise.
346 * spu-low.c (spu_target_ops): Likewise.
347 * win32-low.c (win32_target_ops): Likewise.
349 2015-03-04 Pedro Alves <palves@redhat.com>
351 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
352 Decide whether a breakpoint triggered based on the SIGTRAP's
354 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
355 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
356 (linux_low_filter_event): Check for breakpoints before checking
358 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
360 (linux_stopped_by_sw_breakpoint)
361 (linux_supports_stopped_by_sw_breakpoint)
362 (linux_stopped_by_hw_breakpoint)
363 (linux_supports_stopped_by_hw_breakpoint): New functions.
364 (linux_target_ops): Install new target methods.
366 2015-03-04 Pedro Alves <palves@redhat.com>
368 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
369 * server.c (swbreak_feature, hwbreak_feature): New globals.
370 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
371 (captured_main): Clear swbreak_feature and hwbreak_feature.
372 * server.h (swbreak_feature, hwbreak_feature): Declare.
373 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
374 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
375 supports_stopped_by_hw_breakpoint>: New fields.
376 (target_supports_stopped_by_sw_breakpoint)
377 (target_stopped_by_sw_breakpoint)
378 (target_supports_stopped_by_hw_breakpoint)
379 (target_stopped_by_hw_breakpoint): Declare.
381 2015-03-04 Pedro Alves <palves@redhat.com>
383 enum lwp_stop_reason -> enum target_stop_reason
384 * linux-low.c (check_stopped_by_breakpoint): Adjust.
385 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
386 (linux_wait_1, stuck_in_jump_pad_callback)
387 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
388 (linux_stopped_by_watchpoint):
389 * linux-low.h (enum lwp_stop_reason): Delete.
390 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
391 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
393 2015-03-04 Yao Qi <yao.qi@linaro.org>
395 * Makefile.in (SFILES): Add linux-aarch64-low.c.
397 2015-03-03 Gary Benson <gbenson@redhat.com>
399 * hostio.c (handle_vFile): Fix prefix lengths.
401 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
403 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
406 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
408 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
409 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
410 (clean): Add "rm -f" for above C files.
411 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
412 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
413 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
414 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
415 * linux-s390-low.c (HWCAP_S390_VX): New macro.
416 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
417 (init_registers_s390x_vx_linux64)
418 (init_registers_s390x_tevx_linux64)
419 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
420 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
422 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
423 (s390_store_vxrs_high): New functions.
424 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
426 (s390_arch_setup): Add logic for selecting one of the new target
427 descriptions. Activate the new vector regsets if applicable.
428 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
429 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
430 and init_registers_s390x_tevx_linux64.
432 2015-03-01 Pedro Alves <palves@redhat.com>
434 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
437 2015-02-27 Pedro Alves <palves@redhat.com>
439 * linux-x86-low.c (u_debugreg_offset): New function.
440 (x86_linux_dr_get, x86_linux_dr_set): Use it.
442 2015-02-27 Pedro Alves <palves@redhat.com>
444 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
445 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
446 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
447 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
448 (ps_lsetfpregs, ps_getpid)
449 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
450 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
451 (ps_lsetxregs, ps_plog): Declare.
453 2015-02-27 Pedro Alves <palves@redhat.com>
455 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
456 IP_AGENT_EXPORT_FUNC.
457 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
458 IP_AGENT_EXPORT_FUNC.
459 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
460 (IP_AGENT_EXPORT): Delete.
461 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
462 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
463 (gdb_trampoline_buffer_error, collecting, gdb_collect)
464 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
465 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
466 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
467 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
468 (traceframe_read_count, traceframe_write_count)
469 (traceframes_created, trace_state_variables, get_raw_reg)
470 (get_trace_state_variable_value, set_trace_state_variable_value)
471 (ust_loaded, helper_thread_id, cmd_buf): Use
472 IPA_SYM_EXPORTED_NAME.
473 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
474 (tracepoints) Use IP_AGENT_EXPORT_VAR.
475 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
476 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
477 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
478 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
479 EXTERN_C_PUSH/EXTERN_C_POP.
480 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
481 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
482 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
483 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
484 (traceframe_write_count, traceframe_read_count)
485 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
486 (about_to_request_buffer_space, get_trace_state_variable_value)
487 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
488 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
489 EXTERN_C_PUSH/EXTERN_C_POP.
490 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
491 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
492 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
493 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
494 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
495 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
496 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
497 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
499 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
500 (IP_AGENT_EXPORT_VAR_DECL): Define.
502 (gdb_agent_get_raw_reg): Declare.
504 2015-02-27 Tom Tromey <tromey@redhat.com>
505 Pedro Alves <palves@redhat.com>
507 Rename symbols whose names are reserved C++ keywords throughout.
509 2015-02-27 Pedro Alves <palves@redhat.com>
511 * Makefile.in (COMPILER): New, get it from autoconf.
512 (CXX): Get from autoconf instead.
513 (COMPILE.pre): Use COMPILER.
514 (CC-LD): Rename to ...
515 (CC_LD): ... this. Use COMPILER.
516 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
517 (CXX_FOR_TARGET): Default to g++ instead of gcc.
518 * acinclude.m4: Include build-with-cxx.m4.
519 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
520 Disable -Werror by default if building in C++ mode.
521 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
522 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
523 the C++ compiler. Save/restore CXXFLAGS too.
524 * configure: Regenerate.
526 2015-02-27 Pedro Alves <palves@redhat.com>
528 * acinclude.m4: Include libiberty.m4.
529 * configure.ac: Call libiberty_INIT.
530 * config.in, configure: Regenerate.
532 2015-02-26 Pedro Alves <palves@redhat.com>
534 * linux-low.c (linux_wait_1): When incrementing the PC past a
535 program breakpoint always use the_low_target.breakpoint_len as
536 increment, rather than the maximum between that and
537 the_low_target.decr_pc_after_break.
539 2015-02-23 Pedro Alves <palves@redhat.com>
541 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
542 thread was doing a step-over; always adjust the PC if
543 we stepped over a permanent breakpoint.
544 (linux_wait_1): If we stepped over breakpoint that was on top of a
545 permanent breakpoint, manually advance the PC past it.
547 2015-02-23 Pedro Alves <palves@redhat.com>
549 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
551 (x86_fill_gregset, x86_store_gregset): Use it when handling
554 2015-02-20 Pedro Alves <palves@redhat.com>
556 * thread-db.c: Include "nat/linux-procfs.h".
557 (thread_db_init): Skip listing new threads if the kernel supports
558 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
560 2015-02-20 Pedro Alves <palves@redhat.com>
562 * linux-low.c (status_pending_p_callback): Use ptid_match.
564 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
567 * linux-low.c (wstatus_maybe_breakpoint): Remove.
568 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
569 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
571 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
574 * tracepoint.c (cmd_qtinit): Add check for current_thread.
576 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
578 * linux-low.c (linux_low_btrace_conf): Print size.
579 * server.c (handle_btrace_conf_general_set): New.
580 (hanle_general_set): Call handle_btrace_conf_general_set.
581 (handle_query): Report Qbtrace-conf:bts:size as supported.
583 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
585 * linux-low.c (linux_low_enable_btrace): Update parameters.
586 (linux_low_btrace_conf): New.
587 (linux_target_ops)<to_btrace_conf>: Initialize.
588 * server.c (current_btrace_conf): New.
589 (handle_btrace_enable): Rename to ...
590 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
591 to target_enable_btrace. Update comment. Update users.
592 (handle_qxfer_btrace_conf): New.
593 (qxfer_packets): Add btrace-conf entry.
594 (handle_query): Report qXfer:btrace-conf:read as supported packet.
595 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
596 (target_ops)<read_btrace_conf>: New.
597 (target_enable_btrace): Update parameters.
598 (target_read_btrace_conf): New.
600 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
602 * server.c (handle_btrace_general_set): Remove call to
603 target_supports_btrace.
604 (supported_btrace_packets): New.
605 (handle_query): Call supported_btrace_packets.
606 * target.h: include btrace-common.h.
607 (btrace_target_info): Removed.
608 (supports_btrace, target_supports_btrace): Update parameters.
610 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
612 * Makefile.in (SFILES): Add common/btrace-common.c.
613 (OBS): Add common/btrace-common.o.
614 (btrace-common.o): Add build rules.
615 * linux-low: Include btrace-common.h.
616 (linux_low_read_btrace): Use struct btrace_data. Call
617 btrace_data_init and btrace_data_fini.
619 2015-02-06 Pedro Alves <palves@redhat.com>
621 * thread-db.c (find_new_threads_callback): Add debug output.
623 2015-02-04 Pedro Alves <palves@redhat.com>
625 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
626 (resume_stopped_resumed_lwps): New function.
627 (linux_wait_for_event_filtered): Use it.
629 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
631 * Makefile.in (SFILES): Add linux-personality.c.
632 (linux-personality.o): New rule.
633 * configure.srv (srv_linux_obj): Add linux-personality.o to the
634 list of objects to be built.
635 * linux-low.c: Include nat/linux-personality.h.
636 (linux_create_inferior): Remove code to disable address space
637 randomization (moved to ../nat/linux-personality.c). Create
638 cleanup to disable address space randomization.
640 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
642 * Makefile.in (posix-strerror.o): New rule.
643 (mingw-strerror.o): Likewise.
644 * configure: Regenerated.
645 * configure.ac: Source file ../common/common.host. Initialize new
646 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
648 2015-01-14 Yao Qi <yao@codesourcery.com>
650 * Makefile.in (SFILES): Add nat/ppc-linux.c.
651 (ppc-linux.o): New rule.
652 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
653 * configure.ac: AC_CHECK_FUNCS(getauxval).
654 * config.in: Re-generated.
655 * configure: Re-generated.
656 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
657 ppc64_64bit_inferior_p
659 2015-01-14 Yao Qi <yao@codesourcery.com>
661 * linux-ppc-low.c: Include "nat/ppc-linux.h".
662 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
663 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
664 (PT_ORIG_R3, PT_TRAP): Likewise.
665 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
666 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
667 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
669 2015-01-10 Joel Brobecker <brobecker@adacore.com>
671 * i387-fp.c (i387_cache_to_xsave): In look over
672 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
673 zmmh_low_space field by use of zmmh_high_space.
675 2015-01-09 Pedro Alves <palves@redhat.com>
677 * linux-low.c (step_over_bkpt): Move higher up in the file.
678 (handle_extended_wait): Don't store the stop_pc here.
679 (get_stop_pc): Adjust comments and rename to ...
680 (check_stopped_by_breakpoint): ... this. Record whether the LWP
681 stopped for a software breakpoint or hardware breakpoint.
682 (thread_still_has_status_pending_p): New function.
683 (status_pending_p_callback): Use
684 thread_still_has_status_pending_p. If the event is no longer
685 interesting, resume the LWP.
686 (handle_tracepoints): Add assert.
687 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
688 (wstatus_maybe_breakpoint): New function.
689 (cancel_breakpoint): Delete function.
690 (check_stopped_by_watchpoint): New function, factored out from
691 linux_low_filter_event.
692 (lp_status_maybe_breakpoint): Delete function.
693 (linux_low_filter_event): Remove filter_ptid argument.
694 Leave thread group exits pending here. Store the LWP's stop PC.
695 Always leave events pending.
696 (linux_wait_for_event_filtered): Pull all events out of the
697 kernel, and leave them all pending.
698 (count_events_callback, select_event_lwp_callback): Consider all
700 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
701 (select_event_lwp): Only give preference to the stepping LWP in
702 all-stop mode. Adjust comments.
703 (ignore_event): New function.
704 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
705 references to cancel_breakpoints. Adjust to renames. Also give
706 equal priority to all LWPs that have had events in non-stop mode.
707 If reporting a software breakpoint event, unadjust the LWP's PC.
708 (linux_wait): If linux_wait_1 returned an ignored event, retry.
709 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
711 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
712 (resume_status_pending_p): Use thread_still_has_status_pending_p.
713 (linux_stopped_by_watchpoint): Adjust.
714 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
715 * linux-low.h (enum lwp_stop_reason): New.
716 (struct lwp_info) <stop_pc>: Adjust comment.
717 <stopped_by_watchpoint>: Delete field.
718 <stop_reason>: New field.
719 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
720 * mem-break.c (software_breakpoint_inserted_here)
721 (hardware_breakpoint_inserted_here): New function.
722 * mem-break.h (software_breakpoint_inserted_here)
723 (hardware_breakpoint_inserted_here): Declare.
724 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
725 (cancel_breakpoints): Delete.
726 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
727 (upload_fast_traceframes): Remove references to
730 2015-01-09 Pedro Alves <palves@redhat.com>
732 * thread-db.c (find_new_threads_callback): Ignore thread if the
733 kernel thread ID is -1.
735 2015-01-09 Pedro Alves <palves@redhat.com>
737 * linux-low.c (linux_attach_fail_reason_string): Move to
738 nat/linux-ptrace.c, and rename.
739 (linux_attach_lwp): Update comment.
740 (attach_proc_task_lwp_callback): New function.
741 (linux_attach): Adjust to rename and use
742 linux_proc_attach_tgid_threads.
743 (linux_attach_fail_reason_string): Delete declaration.
745 2015-01-01 Joel Brobecker <brobecker@adacore.com>
747 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
748 * server.c (gdbserver_version): Likewise.
750 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
752 * remote-utils.c: Include ctype.h.
753 (input_interrupt): Explicitly handle the case when the char
754 received is the NUL byte. Improve the printing of non-ASCII
757 2014-12-16 Joel Brobecker <brobecker@adacore.com>
759 * linux-low.c (linux_low_filter_event): Update call to
760 linux_enable_event_reporting following the addition of
761 a new parameter to that function.
763 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
766 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
767 (AARCH64_FPCR_REGNO): Likewise.
768 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
769 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
770 (aarch64_store_fpregset): Likewise.
772 2014-12-15 Joel Brobecker <brobecker@adacore.com>
774 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
775 Remove FIXME comment about assumption about N.
777 2014-12-13 Joel Brobecker <brobecker@adacore.com>
779 * configure.ac: If large-file support is disabled in GDBserver,
780 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
781 * configure: Regenerate.
783 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
785 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
786 warning upon ENODATA from ptrace.
787 * linux-s390-low.c (s390_store_tdb): New.
788 (s390_regsets): Add regset for NT_S390_TDB.
790 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
792 * linux-low.c (regsets_store_inferior_registers): Skip regsets
793 without a fill_function.
794 * linux-s390-low.c (s390_fill_last_break): Remove.
795 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
796 (s390_arch_setup): Use regset's size instead of fill_function for
799 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
801 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
802 the regset's store function when ptrace returned an error.
803 * regcache.c (get_thread_regcache): Invalidate register cache
804 before fetching inferior's registers.
806 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
808 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
809 while-loop as for-loop.
810 (regsets_store_inferior_registers): Likewise.
812 2014-11-28 Yao Qi <yao@codesourcery.com>
814 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
815 * config.in, configure: Re-generate.
816 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
819 2014-11-21 Yao Qi <yao@codesourcery.com>
821 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
822 (AC_CHECK_HEADERS): Remove malloc.h.
823 * configure: Re-generated.
824 * config.in: Re-generated.
825 * server.h: Don't include alloca.h and malloc.h.
826 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
827 Don't include malloc.h.
829 2014-11-17 Joel Brobecker <brobecker@adacore.com>
831 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
832 corresponding ERRNO check in same block.
834 2014-11-12 Pedro Alves <palves@redhat.com>
836 * server.c (cont_thread): Update comment.
837 (start_inferior, attach_inferior): No longer clear cont_thread.
838 (handle_v_cont): No longer set cont_thread.
839 (captured_main): Clear cont_thread each time a GDB connects.
841 2014-11-12 Pedro Alves <palves@redhat.com>
843 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
844 thread, and don't resume all threads if the Hc thread has exited.
846 2014-11-12 Pedro Alves <palves@redhat.com>
848 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
849 the process group instead of to a specific LWP.
851 2014-10-15 Pedro Alves <palves@redhat.com>
854 * win32-arm-low.c (arm_set_thread_context): Remove current_event
856 (arm_set_thread_context): Delete.
857 (the_low_target): Adjust.
858 * win32-i386-low.c (debug_registers_changed)
859 (debug_registers_used): Delete.
860 (update_debug_registers_callback): New function.
861 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
862 needing to update their debug registers.
863 (win32_get_current_dr): New function.
864 (x86_dr_low_get_addr, x86_dr_low_get_control)
865 (x86_dr_low_get_status): Fetch the debug register from the thread
867 (i386_initial_stuff): Adjust.
868 (i386_get_thread_context): Remove current_event parameter. Don't
869 clear debug_registers_changed nor copy DR values to
871 (i386_set_thread_context): Delete.
872 (i386_prepare_to_resume): New function.
873 (i386_thread_added): Mark the thread as needing to update irs
875 (the_low_target): Remove i386_set_thread_context and install
876 i386_prepare_to_resume.
877 * win32-low.c (win32_get_thread_context): Adjust.
878 (win32_set_thread_context): Use SetThreadContext
880 (win32_prepare_to_resume): New function.
881 (win32_require_context): New function, factored out from ...
882 (thread_rec): ... this.
883 (continue_one_thread): Call win32_prepare_to_resume on each thread
884 we're about to continue.
885 (win32_resume): Call win32_prepare_to_resume on the event thread.
886 * win32-low.h (struct win32_thread_info)
887 <debug_registers_changed>: New field.
888 (struct win32_target_ops): Change prototype of set_thread_context,
889 delete set_thread_context and add prepare_to_resume.
890 (win32_require_context): New declaration.
892 2014-10-08 Gary Benson <gbenson@redhat.com>
894 * server.h: Do not include common-exceptions.h.
896 2014-10-08 Gary Benson <gbenson@redhat.com>
898 * server.h: Do not include cleanups.h.
900 2014-09-30 James Hogan <james.hogan@imgtec.com>
902 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
905 2014-09-23 Yao Qi <yao@codesourcery.com>
907 * linux-low.c (lp_status_maybe_breakpoint): New function.
908 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
909 (count_events_callback): Likewise.
910 (select_event_lwp_callback): Likewise.
911 (cancel_breakpoints_callback): Likewise.
913 2014-09-19 Don Breazeal <donb@codesourcery.com>
915 * linux-low.c (handle_extended_wait): Call
916 linux_ptrace_get_extended_event.
917 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
918 linux_is_extended_waitstatus.
920 2014-09-16 Joel Brobecker <brobecker@adacore.com>
922 * Makefile.in (CPPFLAGS): Define.
923 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
924 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
926 2014-09-16 Gary Benson <gbenson@redhat.com>
928 * inferiors.h (current_inferior): Renamed as...
929 (current_thread): New variable. All uses updated.
930 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
931 (maybe_move_out_of_jump_pad): Likewise.
932 (cancel_breakpoint): Likewise.
933 (linux_low_filter_event): Likewise.
934 (wait_for_sigstop): Likewise.
935 (linux_resume_one_lwp): Likewise.
936 (need_step_over_p): Likewise.
937 (start_step_over): Likewise.
938 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
939 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
940 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
941 and save_inferior as saved_thread.
942 * regcache.c (get_thread_regcache): Renamed saved_inferior as
944 (regcache_invalidate_thread): Likewise.
945 * remote-utils.c (prepare_resume_reply): Likewise.
946 * thread-db.c (thread_db_get_tls_address): Likewise.
947 (disable_thread_event_reporting): Likewise.
948 (remove_thread_event_breakpoints): Likewise.
949 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
951 * target.h (set_desired_inferior): Renamed as...
952 (set_desired_thread): New declaration. All uses updated.
953 * server.c (myresume): Updated comment to reference thread instead
955 (handle_serial_event): Likewise.
956 (handle_target_event): Likewise.
958 2014-09-12 Tom Tromey <tromey@redhat.com>
959 Gary Benson <gbenson@redhat.com>
961 * regcache.h: Include common-regcache.h.
962 (regcache_read_pc): Don't declare.
963 * regcache.c (get_thread_regcache_for_ptid): New function.
965 2014-09-11 Tom Tromey <tromey@redhat.com>
966 Gary Benson <gbenson@redhat.com>
968 * symbol.c: New file.
969 * Makefile.in (SFILES): Add symbol.c.
972 2014-09-11 Gary Benson <gbenson@redhat.com>
974 * target.c (target_stop_ptid, target_continue_ptid): New
977 2014-09-11 Tom Tromey <tromey@redhat.com>
978 Gary Benson <gbenson@redhat.com>
980 * target.h: Include target/target.h.
981 * target.c (target_read_memory, target_read_uint32)
982 (target_write_memory): New functions.
984 2014-09-11 Gary Benson <gbenson@redhat.com>
986 * server.h (debug_hw_points): Don't declare.
987 * server.c (debug_hw_points): Don't define. Replace all uses
988 with show_debug_regs.
989 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
990 all uses with show_debug_regs.
992 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
994 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
995 endianness into account.
996 (ppc_supply_ptrace_register): Likewise.
998 2014-09-03 James Hogan <james.hogan@imgtec.com>
1000 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1001 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1003 2014-09-03 Gary Benson <gbenson@redhat.com>
1005 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1006 ALL_DEBUG_ADDRESS_REGISTERS.
1008 2014-09-02 Gary Benson <gbenson@redhat.com>
1010 * i386-low.h: Renamed as...
1011 * x86-low.h: New file. All type, function and variable name
1012 prefixes changed from "i386_" to "x86_". All references updated.
1013 * i386-low.c: Renamed as...
1014 * x86-low.c: New file. All type, function and variable name
1015 prefixes changed from "i386_" to "x86_". All references updated.
1017 2014-09-02 Gary Benson <gbenson@redhat.com>
1019 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1020 (x86_linux_new_thread): Likewise.
1022 2014-08-29 Gary Benson <gbenson@redhat.com>
1024 * server.h (setjmp.h): Do not include.
1025 (toplevel): Do not declare.
1026 (common-exceptions.h): Include.
1027 (cleanups.h): Likewise.
1028 * server.c (toplevel): Do not define.
1029 (exit_code): New static global.
1030 (detach_or_kill_for_exit_cleanup): New function.
1031 (main): New function. Original main renamed to...
1032 (captured_main): New function.
1033 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1035 2014-08-29 Gary Benson <gbenson@redhat.com>
1037 * Makefile.in (SFILES): Add common/common-exceptions.c.
1038 (OBS): Add common-exceptions.o.
1039 (common-exceptions.o): New rule.
1040 * utils.c (prepare_to_throw_exception): New function.
1042 2014-08-29 Gary Benson <gbenson@redhat.com>
1044 * config.in: Regenerate.
1045 * configure: Likewise.
1047 2014-08-29 Gary Benson <gbenson@redhat.com>
1049 * Makefile.in (SFILES): Add common/cleanups.c.
1051 (cleanups.o): New rule.
1053 2014-08-29 Gary Benson <gbenson@redhat.com>
1055 * utils.c (internal_vwarning): New function.
1057 2014-08-28 Gary Benson <gbenson@redhat.com>
1059 * utils.h (fatal): Remove declaration.
1060 * utils.c (fatal): Remove function.
1062 2014-08-28 Gary Benson <gbenson@redhat.com>
1064 * tracepoint.c (gdb_agent_init): Replace fatal with
1066 (initialize_tracepoint): Likewise.
1068 2014-08-28 Gary Benson <gbenson@redhat.com>
1070 * remote-utils.c (remote_prepare): Replace fatal with error.
1072 2014-08-28 Gary Benson <gbenson@redhat.com>
1074 * linux-low.c (linux_async): Replace fatal with warning.
1076 (linux_start_non_stop): Return -1 if linux_async failed.
1078 2014-08-28 Gary Benson <gbenson@redhat.com>
1080 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1082 (i386_dr_low_get_addr): Remove vague comment.
1083 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1086 2014-08-28 Gary Benson <gbenson@redhat.com>
1088 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1089 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1091 (linux_resume_one_lwp): Likewise.
1092 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1094 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1095 with internal_error.
1096 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1097 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1098 (find_register_by_name): Replace fatal with internal_error.
1099 (find_regno): Likewise.
1100 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1101 * thread-db.c (thread_db_create_event): Likewise.
1102 (thread_db_load_search): Likewise.
1103 (try_thread_db_load_1): Likewise.
1104 * tracepoint.c (get_jump_space_head): Replace fatal with
1106 (claim_trampoline_space): Likewise.
1107 (have_fast_tracepoint_trampoline_buffer): Likewise.
1108 (cmd_qtstart): Likewise.
1109 (stop_tracing): Likewise.
1110 (fast_tracepoint_collecting): Likewise.
1111 (target_malloc): Likewise.
1112 (download_tracepoint): Likewise.
1113 (download_trace_state_variables): Replace check with gdb_assert.
1114 (upload_fast_traceframes): Replace fatal with internal_error.
1116 2014-08-19 Tom Tromey <tromey@redhat.com>
1117 Gary Benson <gbenson@redhat.com>
1119 * Makefile.in (SFILES): Add common/common-debug.c.
1120 (OBS): Add common-debug.o.
1121 (common-debug.o): New rule.
1122 * debug.h (debug_printf): Don't declare.
1123 * debug.c (debug_printf): Renamed and rewritten as...
1124 (debug_vprintf): New function.
1126 2014-08-19 Gary Benson <gbenson@redhat.com>
1128 * utils.h: Do not include print-utils.h.
1130 2014-08-19 Tom Tromey <tromey@redhat.com>
1131 Gary Benson <gbenson@redhat.com>
1133 * server.h: Add static assertion.
1134 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1136 2014-08-19 Tom Tromey <tromey@redhat.com>
1137 Gary Benson <gbenson@redhat.com>
1139 * Makefile.in (SFILES): Add common/errors.c.
1140 (OBS): Add errors.o.
1141 (IPA_OBS): Add errors-ipa.o.
1142 (errors.o): New rule.
1143 (errors-ipa.o): Likewise.
1144 * utils.h (perror_with_name, error, warning): Don't declare.
1145 * utils.c (warning): Renamed and rewritten as...
1146 (vwarning): New function.
1147 (error): Renamed and rewritten as...
1148 (verror): New function.
1149 (internal_error): Renamed and rewritten as...
1150 (internal_verror): New function.
1152 2014-08-07 Gary Benson <gbenson@redhat.com>
1154 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1155 * configure: Regenerate.
1156 * config.in: Likewise.
1157 * server.h: Do not include errno.h.
1158 * event-loop.c: Likewise.
1159 * hostio-errno.c: Likewise.
1160 * linux-low.c: Likewise.
1161 * remote-utils.c: Likewise.
1162 * spu-low.c: Likewise.
1163 * utils.c: Likewise.
1164 * gdbreplay.c: Unconditionally include errno.h.
1166 2014-08-07 Gary Benson <gbenson@redhat.com>
1168 * server.h: Do not include string.h.
1169 * event-loop.c: Likewise.
1170 * linux-low.c: Likewise.
1171 * regcache.c: Likewise.
1172 * remote-utils.c: Likewise.
1173 * spu-low.c: Likewise.
1174 * utils.c: Likewise.
1176 2014-08-07 Gary Benson <gbenson@redhat.com>
1178 * server.h: Do not include gdb_assert.h.
1180 2014-08-07 Gary Benson <gbenson@redhat.com>
1182 * server.h: Do not include common-utils.h.
1184 2014-08-07 Gary Benson <gbenson@redhat.com>
1186 * server.h: Do not include ptid.h.
1187 * notif.h: Likewise.
1189 2014-08-07 Gary Benson <gbenson@redhat.com>
1191 * server.h: Do not include gdb_locale.h.
1193 2014-08-07 Gary Benson <gbenson@redhat.com>
1195 * server.h: Do not include gdb/signals.h.
1196 * win32-low.c: Likewise.
1198 2014-08-07 Gary Benson <gbenson@redhat.com>
1200 * server.h: Do not include pathmax.h.
1202 2014-08-07 Gary Benson <gbenson@redhat.com>
1204 * server.h: Do not include libiberty.h.
1205 * linux-bfin-low.c: Likewise.
1207 2014-08-07 Gary Benson <gbenson@redhat.com>
1209 * server.h: Do not include ansidecl.h.
1211 2014-08-07 Gary Benson <gbenson@redhat.com>
1213 * linux-x86-low.c: Do not include stddef.h.
1214 * lynx-ppc-low.c: Likewise.
1215 * tracepoint.c: Likewise.
1217 2014-08-07 Gary Benson <gbenson@redhat.com>
1219 * server.h: Do not include stdarg.h.
1220 * nto-low.c: Likewise.
1222 2014-08-07 Gary Benson <gbenson@redhat.com>
1224 * server.h: Do not include stdlib.h.
1225 * inferiors.c: Likewise.
1226 * linux-low.c: Likewise.
1227 * regcache.c: Likewise.
1228 * spu-low.c: Likewise.
1229 * tracepoint.c: Likewise.
1230 * utils.c: Likewise.
1232 2014-08-07 Gary Benson <gbenson@redhat.com>
1234 * server.h: Do not include stdio.h.
1235 * linux-low.c: Likewise.
1236 * remote-utils.c: Likewise.
1237 * spu-low.c: Likewise.
1238 * utils.c: Likewise.
1239 * wincecompat.c: Likewise.
1241 2014-08-06 Gary Benson <gbenson@redhat.com>
1243 * regcache.c (init_register_cache): Move conditionals inside if.
1245 2014-08-06 Gary Benson <gbenson@redhat.com>
1247 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1249 2014-07-31 Gary Benson <gbenson@redhat.com>
1251 * ax.h: Do not include server.h.
1252 * gdbthread.h: Likewise.
1253 * lynx-low.h: Likewise.
1254 * notif.h: Likewise.
1256 2014-07-30 Gary Benson <gbenson@redhat.com>
1258 * server.h: Include common-defs.h.
1259 Do not include config.h or build-gnulib-gdbserver/config.h.
1261 2014-07-30 Gary Benson <gbenson@redhat.com>
1263 * hostio-errno.c: Move server.h to top of includes list.
1264 * inferiors.c: Likewise.
1265 * linux-x86-low.c: Likewise.
1266 * notif.c: Include server.h.
1268 2014-07-24 Tom Tromey <tromey@redhat.com>
1269 Gary Benson <gbenson@redhat.com>
1271 * server.h (CORE_ADDR): Now unsigned.
1273 2014-07-16 Pedro Alves <palves@redhat.com>
1275 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1277 2014-07-15 Pedro Alves <palves@redhat.com>
1279 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1282 2014-07-11 Pedro Alves <palves@redhat.com>
1284 * linux-low.c (kill_wait_lwp): New function, based on
1285 kill_one_lwp_callback, but use my_waitpid directly.
1286 (kill_one_lwp_callback, linux_kill): Use it.
1288 2014-06-23 Pedro Alves <palves@redhat.com>
1290 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1291 before setting DR0..DR3.
1293 2014-06-20 Gary Benson <gbenson@redhat.com>
1295 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1296 * configure: Regenerated.
1297 * config.in: Likewise.
1299 2014-06-20 Gary Benson <gbenson@redhat.com>
1301 * Makefile.in (SFILES): Update locations for files moved
1303 (object file files): Reordered.
1305 2014-06-20 Gary Benson <gbenson@redhat.com>
1307 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1308 (i386_dr_low_set_addr): Likewise.
1309 (i386_dr_low_get_addr): Likewise.
1310 (i386_dr_low_can_set_control): Likewise.
1311 (i386_dr_low_set_control): Likewise.
1312 (i386_dr_low_get_control): Likewise.
1313 (i386_dr_low_get_status): Likewise.
1314 (i386_get_debug_register_length): Likewise.
1315 * linux-x86-low.c (i386_dr_low_set_addr):
1316 Changed signature. Made static.
1317 (i386_dr_low_get_addr): Likewise.
1318 (i386_dr_low_set_control): Likewise.
1319 (i386_dr_low_get_control): Likewise.
1320 (i386_dr_low_get_status): Likewise.
1321 (i386_dr_low): New global variable.
1322 * win32-i386-low.c (i386_dr_low_set_addr):
1323 Changed signature. Made static.
1324 (i386_dr_low_get_addr): Likewise.
1325 (i386_dr_low_set_control): Likewise.
1326 (i386_dr_low_get_control): Likewise.
1327 (i386_dr_low_get_status): Likewise.
1328 (i386_dr_low): New global variable.
1330 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1332 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1333 * Makefile.in (AR, AR_FLAGS): Define.
1334 * configure: Regenerate.
1336 2014-06-19 Gary Benson <gbenson@redhat.com>
1338 * Makefile.in (i386-dregs.o): New rule.
1339 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1340 * i386-low.c (target.h): Remove include.
1341 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1342 (DR_CONTROL_SHIFT): Likewise.
1343 (DR_CONTROL_SIZE): Likewise.
1344 (DR_RW_EXECUTE): Likewise.
1345 (DR_RW_WRITE): Likewise.
1346 (DR_RW_READ): Likewise.
1347 (DR_RW_IORW): Likewise.
1348 (DR_LEN_1): Likewise.
1349 (DR_LEN_2): Likewise.
1350 (DR_LEN_4): Likewise.
1351 (DR_LEN_8): Likewise.
1352 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1353 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1354 (DR_ENABLE_SIZE): Likewise.
1355 (DR_LOCAL_SLOWDOWN): Likewise.
1356 (DR_GLOBAL_SLOWDOWN): Likewise.
1357 (DR_CONTROL_RESERVED): Likewise.
1358 (I386_DR_CONTROL_MASK): Likewise.
1359 (I386_DR_VACANT): Likewise.
1360 (I386_DR_LOCAL_ENABLE): Likewise.
1361 (I386_DR_GLOBAL_ENABLE): Likewise.
1362 (I386_DR_DISABLE): Likewise.
1363 (I386_DR_SET_RW_LEN): Likewise.
1364 (I386_DR_GET_RW_LEN): Likewise.
1365 (I386_DR_WATCH_HIT): Likewise.
1366 (i386_wp_op_t): Likewise.
1367 (i386_show_dr): Likewise.
1368 (i386_length_and_rw_bits): Likewise.
1369 (i386_insert_aligned_watchpoint): Likewise.
1370 (i386_remove_aligned_watchpoint): Likewise.
1371 (i386_handle_nonaligned_watchpoint): Likewise.
1372 i386_update_inferior_debug_regs(): Likewise.
1373 (i386_dr_insert_watchpoint): Likewise.
1374 (i386_dr_remove_watchpoint): Likewise.
1375 (i386_dr_region_ok_for_watchpoint): Likewise.
1376 (i386_dr_stopped_data_address): Likewise.
1377 (i386_dr_stopped_by_watchpoint): Likewise.
1379 2014-06-19 Gary Benson <gbenson@redhat.com>
1381 * i386-low.c (i386_dr_show): Renamed to
1382 i386_show_dr and made static. All uses updated.
1383 (i386_dr_length_and_rw_bits): Renamed to
1384 i386_length_and_rw_bits and made static.
1386 (i386_dr_insert_aligned_watchpoint): Renamed to
1387 i386_insert_aligned_watchpoint and made static.
1389 (i386_dr_remove_aligned_watchpoint): Renamed to
1390 i386_remove_aligned_watchpoint and made static.
1392 (i386_dr_update_inferior_debug_regs): Renamed to
1393 i386_update_inferior_debug_regs and made static.
1396 2014-06-18 Gary Benson <gbenson@redhat.com>
1398 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1399 (i386_dr_low_can_set_control): Likewise.
1400 (i386_get_debug_register_length): Likewise.
1401 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1402 (i386_dr_low_can_set_control): Likewise.
1403 (i386_get_debug_register_length): Likewise.
1405 2014-06-17 Gary Benson <gbenson@redhat.com>
1407 * i386-low.h (i386-dregs.h): New include.
1408 (DR_FIRSTADDR): Now in i386-dregs.h.
1409 (DR_LASTADDR): Likewise.
1410 (DR_NADDR): Likewise.
1411 (DR_STATUS): Likewise.
1412 (DR_CONTROL): Likewise.
1413 (i386_debug_reg_state): Likewise.
1414 (i386_dr_insert_watchpoint): Likewise.
1415 (i386_dr_remove_watchpoint): Likewise.
1416 (i386_dr_region_ok_for_watchpoint): Likewise.
1417 (i386_dr_stopped_data_address): Likewise.
1418 (i386_dr_stopped_by_watchpoint): Likewise.
1419 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1421 2014-06-18 Gary Benson <gbenson@redhat.com>
1423 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1424 i386_dr_insert_watchpoint.
1425 (i386_low_remove_watchpoint): Renamed to
1426 i386_dr_remove_watchpoint.
1427 (i386_low_region_ok_for_watchpoint): Renamed to
1428 i386_dr_region_ok_for_watchpoint.
1429 (i386_low_stopped_data_address): Renamed to
1430 i386_dr_stopped_data_address.
1431 (i386_low_stopped_by_watchpoint): Renamed to
1432 i386_dr_stopped_by_watchpoint.
1433 * i386-low.c (i386_show_dr): Renamed to
1434 i386_dr_show and made nonstatic. All uses updated.
1435 (i386_length_and_rw_bits): Renamed to
1436 i386_dr_length_and_rw_bits and made nonstatic.
1438 (i386_insert_aligned_watchpoint): Renamed to
1439 i386_dr_insert_aligned_watchpoint and made nonstatic.
1441 (i386_remove_aligned_watchpoint): Renamed to
1442 i386_dr_remove_aligned_watchpoint and made nonstatic.
1444 (i386_update_inferior_debug_regs): Renamed to
1445 i386_dr_update_inferior_debug_regs and made nonstatic.
1447 (i386_low_insert_watchpoint): Renamed to
1448 i386_dr_insert_watchpoint. All uses updated.
1449 (i386_low_remove_watchpoint): Renamed to
1450 i386_dr_remove_watchpoint. All uses updated.
1451 (i386_low_region_ok_for_watchpoint): Renamed to
1452 i386_dr_region_ok_for_watchpoint. All uses updated.
1453 (i386_low_stopped_data_address): Renamed to
1454 i386_dr_stopped_data_address. All uses updated.
1455 (i386_low_stopped_by_watchpoint): Renamed to
1456 i386_dr_stopped_by_watchpoint. All uses updated.
1458 2014-06-18 Gary Benson <gbenson@redhat.com>
1460 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1461 (i386_dr_low_can_set_control): Likewise.
1462 (i386_insert_aligned_watchpoint): New check.
1464 2014-06-18 Gary Benson <gbenson@redhat.com>
1466 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1469 2014-06-18 Gary Benson <gbenson@redhat.com>
1471 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1472 instead of fatal and error.
1473 (i386_handle_nonaligned_watchpoint): Likewise.
1475 2014-06-18 Gary Benson <gbenson@redhat.com>
1477 * i386-low.c (i386_get_debug_register_length): New macro.
1478 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1479 (i386_show_dr): Use debug_printf instead of fprintf. Use
1480 phex to format values.
1482 2014-06-18 Gary Benson <gbenson@redhat.com>
1484 * i386-low.h: Comment changes.
1485 * i386-low.c: Likewise.
1487 2014-06-18 Gary Benson <gbenson@redhat.com>
1489 * i386-low.c: Whitespace changes.
1491 2014-06-12 Tom Tromey <tromey@redhat.com>
1493 * utils.c (freeargv): Remove.
1495 2014-06-12 Tom Tromey <tromey@redhat.com>
1497 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1498 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1499 (parse_debug_format_options): Likewise.
1500 (gdbserver_usage): Likewise.
1501 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1502 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1503 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1505 ($(LIBGNU)): Depend on libiberty.
1506 (all-lib): Recurse into all subdirs.
1507 (install-only): Invoke "install" target in subdirs.
1508 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1510 * configure: Rebuild.
1511 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1512 for vasprintf, vsnprintf, or gettimeofday.
1513 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1516 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1518 * development.sh: Delete.
1519 * Makefile.in (config.status): Adjust dependency on development.sh.
1520 * configure.ac: Adjust development.sh source call.
1521 * configure: Regenerate.
1523 2014-06-02 Pedro Alves <palves@redhat.com>
1525 * ax.c (gdb_free_agent_expr): New function.
1526 * ax.h (gdb_free_agent_expr): New declaration.
1527 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1529 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1531 (clear_breakpoint_conditions_and_commands): New function.
1532 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1533 (clear_breakpoint_conditions_and_commands): New declaration.
1535 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1537 * linux-aarch64-low.c (asm/ptrace.h): Include.
1539 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1541 Fix TLS access for -static -pthread.
1542 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1543 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1544 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1546 2014-05-20 Pedro Alves <palves@redhat.com>
1548 * linux-aarch64-low.c (aarch64_insert_point)
1549 (aarch64_remove_point): No longer check whether the type is
1550 supported here. Adjust to new interface.
1551 (the_low_target): Install aarch64_supports_z_point_type as
1552 supports_z_point_type method.
1553 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1554 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1555 instead of a Z packet char. Adjust.
1556 (arm_supports_z_point_type): New function.
1557 (arm_insert_point, arm_remove_point): Adjust to new interface.
1558 (the_low_target): Install arm_supports_z_point_type.
1559 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1560 (cris_insert_point, cris_remove_point): Adjust to new interface.
1561 Don't check whether the type is supported here.
1562 (the_low_target): Install cris_supports_z_point_type.
1563 * linux-low.c (linux_supports_z_point_type): New function.
1564 (linux_insert_point, linux_remove_point): Adjust to new interface.
1565 * linux-low.h (struct linux_target_ops) <insert_point,
1566 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1567 raw_breakpoint pointer parameter.
1568 <supports_z_point_type>: New method.
1569 * linux-mips-low.c (mips_supports_z_point_type): New function.
1570 (mips_insert_point, mips_remove_point): Adjust to new interface.
1571 Use mips_supports_z_point_type.
1572 (the_low_target): Install mips_supports_z_point_type.
1573 * linux-ppc-low.c (the_low_target): Install NULL as
1574 supports_z_point_type method.
1575 * linux-s390-low.c (the_low_target): Install NULL as
1576 supports_z_point_type method.
1577 * linux-sparc-low.c (the_low_target): Install NULL as
1578 supports_z_point_type method.
1579 * linux-x86-low.c (x86_supports_z_point_type): New function.
1580 (x86_insert_point): Adjust to new insert_point interface. Use
1581 insert_memory_breakpoint. Adjust to new
1582 i386_low_insert_watchpoint interface.
1583 (x86_remove_point): Adjust to remove_point interface. Use
1584 remove_memory_breakpoint. Adjust to new
1585 i386_low_remove_watchpoint interface.
1586 (the_low_target): Install x86_supports_z_point_type.
1587 * lynx-low.c (lynx_target_ops): Install NULL as
1588 supports_z_point_type callback.
1589 * nto-low.c (nto_supports_z_point_type): New.
1590 (nto_insert_point, nto_remove_point): Adjust to new interface.
1591 (nto_target_ops): Install nto_supports_z_point_type.
1592 * mem-break.c: Adjust intro comment.
1593 (struct raw_breakpoint) <raw_type, size>: New fields.
1594 <inserted>: Update comment.
1595 <shlib_disabled>: Delete field.
1596 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1597 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1598 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1599 (raw_bkpt_type_to_target_hw_bp_type): New function.
1600 (find_enabled_raw_code_breakpoint_at): New function.
1601 (find_raw_breakpoint_at): New type and size parameters. Use them.
1602 (insert_memory_breakpoint): New function, based off
1603 set_raw_breakpoint_at.
1604 (remove_memory_breakpoint): New function.
1605 (set_raw_breakpoint_at): Reimplement.
1606 (set_breakpoint): New, based on set_breakpoint_at.
1607 (set_breakpoint_at): Reimplement.
1608 (delete_raw_breakpoint): Go through the_target->remove_point
1609 instead of assuming memory breakpoints.
1610 (find_gdb_breakpoint_at): Delete.
1611 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1612 (find_gdb_breakpoint): New function.
1613 (set_gdb_breakpoint_at): Delete.
1614 (z_type_supported): New function.
1615 (set_gdb_breakpoint_1): New function, loosely based off
1616 set_gdb_breakpoint_at.
1617 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1618 (delete_gdb_breakpoint_at): Delete.
1619 (delete_gdb_breakpoint_1): New function, loosely based off
1620 delete_gdb_breakpoint_at.
1621 (delete_gdb_breakpoint): New function.
1622 (clear_gdb_breakpoint_conditions): Rename to ...
1623 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1625 (add_condition_to_breakpoint): Make static.
1626 (add_breakpoint_condition): Take a struct breakpoint pointer
1627 instead of an address. Adjust.
1628 (gdb_condition_true_at_breakpoint): Rename to ...
1629 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1631 (gdb_condition_true_at_breakpoint): Reimplement.
1632 (add_breakpoint_commands): Take a struct breakpoint pointer
1633 instead of an address. Adjust.
1634 (gdb_no_commands_at_breakpoint): Rename to ...
1635 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1636 parameter. Return true if no breakpoint was found. Change debug
1638 (gdb_no_commands_at_breakpoint): Reimplement.
1639 (run_breakpoint_commands): Rename to ...
1640 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1641 and change return type to boolean.
1642 (run_breakpoint_commands): New function.
1643 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1644 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1645 breakpoint. Go through the_target->remove_point instead of
1646 assuming memory breakpoint.
1647 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1648 software and hardware breakpoints.
1649 (reinsert_raw_breakpoint): Go through the_target->insert_point
1650 instead of assuming memory breakpoint.
1651 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1652 software and hardware breakpoints.
1653 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1654 Check both software and hardware breakpoints.
1655 (validate_inserted_breakpoint): Assert the breakpoint is a
1656 software breakpoint. Set the inserted flag to -1 instead of
1657 setting shlib_disabled.
1658 (delete_disabled_breakpoints): Adjust.
1659 (validate_breakpoints): Only validate software breakpoints.
1660 Adjust to inserted flag change.
1661 (check_mem_read, check_mem_write): Skip breakpoint types other
1662 than software breakpoints. Adjust to inserted flag change.
1663 * mem-break.h (enum raw_bkpt_type): New enum.
1664 (raw_breakpoint, struct process_info): Forward declare.
1665 (Z_packet_to_target_hw_bp_type): Delete declaration.
1666 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1667 (set_gdb_breakpoint, delete_gdb_breakpoint)
1668 (clear_breakpoint_conditions): New declarations.
1669 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1670 (breakpoint_inserted_here): Update comment.
1671 (add_breakpoint_condition, add_breakpoint_commands): Replace
1672 address parameter with a breakpoint pointer parameter.
1673 (gdb_breakpoint_here): Update comment.
1674 (delete_gdb_breakpoint_at): Delete.
1675 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1676 * server.c (process_point_options): Take a struct breakpoint
1677 pointer instead of an address. Adjust.
1678 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1679 delete_gdb_breakpoint.
1680 * spu-low.c (spu_target_ops): Install NULL as
1681 supports_z_point_type method.
1682 * target.h: Include mem-break.h.
1683 (struct target_ops) <prepare_to_access_memory>: Update comment.
1684 <supports_z_point_type>: New field.
1685 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1686 instead of a char. Also take a raw breakpoint pointer.
1687 * win32-arm-low.c (the_low_target): Install NULL as
1688 supports_z_point_type.
1689 * win32-i386-low.c (i386_supports_z_point_type): New function.
1690 (i386_insert_point, i386_remove_point): Adjust to new interface.
1691 (the_low_target): Install i386_supports_z_point_type.
1692 * win32-low.c (win32_supports_z_point_type): New function.
1693 (win32_insert_point, win32_remove_point): Adjust to new interface.
1694 (win32_target_ops): Install win32_supports_z_point_type.
1695 * win32-low.h (struct win32_target_ops):
1696 <supports_z_point_type>: New method.
1697 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1698 instead of a char. Also take a raw breakpoint pointer.
1700 2014-05-20 Pedro Alves <palves@redhat.com>
1702 * mem-break.h: Include break-common.h.
1703 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1704 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1705 (Z_packet_to_target_hw_bp_type): New declaration.
1706 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1707 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1708 (Z_PACKET_ACCESS_WP): Delete macros.
1709 (Z_packet_to_hw_type): Delete function.
1710 * i386-low.h: Don't include break-common.h here.
1711 (Z_packet_to_hw_type): Delete declaration.
1712 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1713 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1714 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1715 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1716 * linux-aarch64-low.c: Don't include break-common.h here.
1717 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1718 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1719 (Z_packet_to_target_hw_bp_type): Delete function.
1720 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1722 (mips_insert_point, mips_remove_point): Use
1723 Z_packet_to_target_hw_bp_type.
1725 2014-05-20 Pedro Alves <palves@redhat.com>
1727 * linux-aarch64-low.c: Include break-common.h.
1728 (enum target_point_type): Delete.
1729 (Z_packet_to_point_type): Rename to ...
1730 (Z_packet_to_target_hw_bp_type): ... this, and return a
1731 target_hw_bp_type instead.
1732 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1733 instead of an enum target_point_type.
1734 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1736 (aarch64_dr_state_insert_one_point)
1737 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1738 (aarch64_handle_aligned_watchpoint)
1739 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1740 Take an enum target_hw_bp_type instead of an enum
1742 (aarch64_supports_z_point_type): New function.
1743 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1744 use Z_packet_to_target_hw_bp_type.
1746 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1748 * configure.ac: Only use -Werror by default when DEVELOPMENT
1750 * configure: Regenerate.
1752 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1754 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1755 * linux-x86-low.c (X86_64_USER_REGS): New.
1756 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1758 2014-04-28 Yao Qi <yao@codesourcery.com>
1760 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1763 2014-04-25 Pedro Alves <palves@redhat.com>
1766 * linux-low.c (linux_attach_fail_reason_string): New function.
1767 (linux_attach_lwp): Delete.
1768 (linux_attach_lwp_1): Rename to ...
1769 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1770 argument. Remove "initial" parameter. Return int instead of
1771 void. Don't error or warn here.
1772 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1773 failure to attach to the tgid. Call warning when failing to
1775 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1776 argument. Remove "initial" parameter. Return int instead of
1777 void. Don't error or warn here.
1778 (linux_attach_fail_reason_string): New declaration.
1779 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1780 interface change. Use linux_attach_fail_reason_string.
1782 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1783 Walfred Tedeschi <walfred.tedeschi@intel.com>
1785 * Makefile.in: Added rules to handle new files
1786 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1787 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1788 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1789 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1790 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1791 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1793 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1794 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1795 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1796 i386/x32-avx512.xml.
1797 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1798 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1799 i386/x32-avx512-linux.xml.
1800 * i387-fp.c (num_avx512_k_registers): New constant for number
1802 (num_avx512_zmmh_low_registers): New constant for number of
1803 lower ZMM registers (0-15).
1804 (num_avx512_zmmh_high_registers): New constant for number of
1805 higher ZMM registers (16-31).
1806 (num_avx512_ymmh_registers): New contant for number of higher
1807 YMM registers (ymm16-31 added by avx521 on x86_64).
1808 (num_avx512_xmm_registers): New constant for number of higher
1809 XMM registers (xmm16-31 added by AVX512 on x86_64).
1810 (struct i387_xsave): Add space for AVX512 registers.
1811 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1812 Add code to handle AVX512 registers.
1813 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1814 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1815 prototypei from generated file.
1816 (tdesc_amd64_avx512_linux): Likewise.
1817 (init_registers_x32_avx512_linux): Likewise.
1818 (tdesc_x32_avx512_linux): Likewise.
1819 (init_registers_i386_avx512_linux): Likewise.
1820 (tdesc_i386_avx512_linux): Likewise.
1821 (x86_64_regmap): Add AVX512 registers.
1822 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1824 (initialize_low_arch): Add code to initialize AVX512 registers.
1826 2014-04-23 Pedro Alves <palves@redhat.com>
1828 * mem-break.c (find_gdb_breakpoint_at): Make static.
1829 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1831 2014-04-23 Pedro Alves <palves@redhat.com>
1833 * i386-low.c: Don't include break-common.h here.
1834 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1835 prototype to take target_hw_bp_type as argument instead of a Z
1837 * i386-low.h: Include break-common.h here.
1838 (Z_packet_to_hw_type): Declare.
1839 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1841 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1842 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1843 (x86_remove_point): Convert the packet number to a
1844 target_hw_bp_type before calling i386_low_remove_watchpoint.
1845 * win32-i386-low.c (i386_insert_point): Convert the packet number
1846 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1847 (i386_remove_point): Convert the packet number to a
1848 target_hw_bp_type before calling i386_low_remove_watchpoint.
1850 2014-04-23 Pedro Alves <palves@redhat.com>
1852 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1854 2014-04-10 Pedro Alves <palves@redhat.com>
1856 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1857 Check if the condition or command is NULL before checking if the
1858 breakpoint is known. On success, return true.
1859 * mem-break.h (add_breakpoint_condition): Document return.
1860 (add_breakpoint_commands): Add describing comment.
1861 * server.c (skip_to_semicolon): New function.
1862 (process_point_options): Use it.
1864 2014-04-09 Pedro Alves <palves@redhat.com>
1866 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1869 2014-02-27 Pedro Alves <palves@redhat.com>
1872 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1874 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1876 (last_thread_of_process_p): Take a PID argument instead of a
1878 (linux_wait_for_lwp): Delete.
1879 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1881 (linux_low_filter_event): New function, party factored out from
1882 linux_wait_for_event.
1883 (linux_wait_for_event): Rename to ...
1884 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1885 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1886 sigsuspend. Check for zombie leaders.
1887 (linux_wait_for_event): Reimplement as wrapper around
1888 linux_wait_for_event_filtered.
1889 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1890 a normal or signal exit is seen, it's the whole process exiting.
1891 (wait_for_sigstop): No longer a for_each_inferior callback.
1892 Rewrite on top of linux_wait_for_event_filtered.
1893 (stop_all_lwps): Call wait_for_sigstop directly.
1894 * server.c (resume, handle_target_event): Handle
1895 TARGET_WAITKIND_NO_RESUMED.
1897 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1899 * win32-low.c (psapi_get_dll_name,
1900 * win32_CreateToolhelp32Snapshot): Delete.
1901 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1902 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1904 (handle_load_dll): Add function description.
1905 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1907 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1909 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1911 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1912 base address when calling win32_add_one_solib.
1913 (handle_load_dll): Delete local variable load_addr.
1914 Remove 0x1000 offset applied to DLL base address when calling
1915 win32_add_one_solib.
1916 (handle_unload_dll): Add comment.
1918 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1920 * win32-low.c (win32_add_all_dlls): Renames
1921 win32_ensure_ntdll_loaded. Rewrite function documentation.
1922 Adjust implementation to always load all DLLs.
1923 Add 0x1000 offset to DLL base address when calling
1924 win32_add_one_solib.
1925 (child_initialization_done): New static global.
1926 (do_initial_child_stuff): Set child_initialization_done to
1927 zero during child initialization, and 1 after. Replace call
1928 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1930 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1931 (handle_unload_dll): Add function documentation.
1932 (get_child_debug_event): Ignore load and unload DLL events
1933 during child initialization.
1935 2014-02-20 Doug Evans <dje@google.com>
1937 Remove global all_lwps.
1938 * inferiors.h (ptid_of): Move here from linux-low.h.
1939 (pid_of, lwpid_of): Ditto.
1940 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1941 parameter is a struct thread_info * now.
1942 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1943 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1944 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1946 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1947 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1948 * linux-arm-low.c (update_registers_callback): Update, "entry"
1949 parameter is a struct thread_info * now.
1950 Fetch lwpid from current_inferior directly.
1951 (arm_insert_point): Pass &all_threads to find_inferior instead of
1953 (arm_remove_point): Ditto.
1954 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1955 (arm_prepare_to_resume): Fetch pid from thread.
1956 (arm_read_description): Fetch lwpid from current_inferior directly.
1957 * linux-low.c (all_lwps): Delete.
1958 (delete_lwp): Delete call to remove_inferior.
1959 (handle_extended_wait): Fetch lwpid from thread.
1960 (add_lwp): Don't set lwp->entry.id. Remove call to
1961 add_inferior_to_list.
1962 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1963 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1964 (kill_one_lwp_callback): Ditto.
1965 (linux_kill): Don't dereference NULL pointer.
1966 Fetch ptid,lwpid from thread.
1967 (get_detach_signal): Fetch ptid from thread.
1968 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1969 Simplify call to regcache_invalidate_thread.
1970 (delete_lwp_callback): Update, "entry" parameter is a
1971 struct thread_info * now. Fetch pid from thread.
1972 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1973 (status_pending_p_callback): Update, "entry" parameter is a
1974 struct thread_info * now. Fetch ptid from thread.
1975 (find_lwp_pid): Update, "entry" parameter is a
1976 struct thread_info * now.
1977 (linux_wait_for_lwp): Fetch pid from thread.
1978 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1979 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1980 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1981 (dequeue_one_deferred_signal): Ditto.
1982 (cancel_breakpoint): Fetch ptid from current_inferior.
1983 (linux_wait_for_event): Pass &all_threads to find_inferior,
1984 not &all_lwps. Fetch ptid, lwpid from thread.
1985 (count_events_callback): Update, "entry" parameter is a
1986 struct thread_info * now.
1987 (select_singlestep_lwp_callback): Ditto.
1988 (select_event_lwp_callback): Ditto.
1989 (cancel_breakpoints_callback): Ditto.
1990 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1992 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1993 (unsuspend_one_lwp): Update, "entry" parameter is a
1994 struct thread_info * now.
1995 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1997 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1998 Fetch lwpid from thread, not lwp.
1999 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2000 Pass &all_threads to find_inferior, not &all_lwps.
2001 (send_sigstop): Fetch lwpid from thread, not lwp.
2002 (send_sigstop_callback): Update, "entry" parameter is a
2003 struct thread_info * now.
2004 (suspend_and_send_sigstop_callback): Ditto.
2005 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2006 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2007 struct thread_info * now.
2008 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2010 (lwp_running): Update, "entry" parameter is a
2011 struct thread_info * now.
2012 (stop_all_lwps): Fetch ptid from thread.
2013 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2014 (linux_resume_one_lwp): Fetch lwpid from thread.
2015 (linux_set_resume_request): Update, "entry" parameter is a
2016 struct thread_info * now. Fetch pid, lwpid from thread.
2017 (resume_status_pending_p): Update, "entry" parameter is a
2018 struct thread_info * now.
2019 (need_step_over_p): Ditto. Fetch lwpid from thread.
2020 (start_step_over): Fetch lwpid from thread.
2021 (linux_resume_one_thread): Update, "entry" parameter is a
2022 struct thread_info * now. Fetch lwpid from thread.
2023 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2024 (proceed_one_lwp): Update, "entry" parameter is a
2025 struct thread_info * now. Fetch lwpid from thread.
2026 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2027 struct thread_info * now.
2028 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2029 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2030 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2032 (regsets_store_inferior_registers): Ditto.
2033 (fetch_register, store_register): Ditto.
2034 (linux_read_memory, linux_write_memory): Ditto.
2035 (linux_request_interrupt): Ditto.
2036 (linux_read_auxv): Ditto.
2037 (linux_xfer_siginfo): Ditto.
2038 (linux_qxfer_spu): Ditto.
2039 (linux_qxfer_libraries_svr4): Ditto.
2040 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2041 moved to inferiors.h.
2043 (get_thread_lwp): Update.
2044 (struct lwp_info): Delete member "entry". Simplify comment for
2047 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2048 current_inferior directly.
2049 (update_watch_registers_callback): Update, "entry" parameter is a
2050 struct thread_info * now. Fetch pid from thread.
2051 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2052 (mips_insert_point): Fetch lwpid from current_inferior.
2053 Pass &all_threads to find_inferior, not &all_lwps.
2054 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2055 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2057 (mips_stopped_data_address): Ditto.
2058 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2060 * linux-tile-low.c (tile_arch_setup): Ditto.
2061 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2062 (update_debug_registers_callback): Update, "entry" parameter is a
2063 struct thread_info * now. Fetch pid from thread.
2064 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2065 Pass &all_threads to find_inferior, not &all_lwps.
2066 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2067 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2068 Pass &all_threads to find_inferior, not &all_lwps.
2069 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2070 (i386_dr_low_get_status): Ditto.
2071 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2072 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2073 (x86_linux_read_description): Ditto.
2074 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2076 2014-02-20 Doug Evans <dje@google.com>
2078 * inferiors.c (get_first_inferior): Fix buglet.
2080 2014-02-19 Doug Evans <dje@google.com>
2082 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2083 * inferiors.c (add_thread): Change result type to struct thread_info *.
2084 All callers updated.
2085 (add_lwp): Call add_thread here instead of in callers.
2086 All callers updated.
2087 * linux-low.h (get_lwp_thread): Rewrite.
2088 (struct lwp_info): New member "thread".
2090 2014-02-19 Doug Evans <dje@google.com>
2092 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2093 All callers updated.
2095 2014-02-19 Doug Evans <dje@google.com>
2097 * inferiors.c (add_thread): Fix whitespace.
2099 2014-02-19 Doug Evans <dje@google.com>
2101 * dll.c (clear_dlls): Replace accessing list implemention details
2103 * gdbthread.h (get_first_thread): Declare.
2104 * inferiors.c (for_each_inferior_with_data): New function.
2105 (get_first_thread): New function.
2106 (find_thread_ptid): Simplify.
2107 (get_first_inferior): New function.
2108 (clear_list): Delete.
2109 (one_inferior_p): New function.
2110 (clear_inferior_list): New function.
2111 (clear_inferiors): Update.
2112 * inferiors.h (for_each_inferior_with_data): Declare.
2113 (clear_inferior_list): Declare.
2114 (one_inferior_p): Declare.
2115 (get_first_inferior): Declare.
2116 * linux-low.c (linux_wait_for_event): Replace accessing list
2117 implemention details with API function.
2118 * server.c (target_running): Ditto.
2119 (accumulate_file_name_length): New function.
2120 (emit_dll_description): New function.
2121 (handle_qxfer_libraries): Replace accessing list implemention
2122 details with API function.
2123 (handle_qxfer_threads_worker): New function.
2124 (handle_qxfer_threads_proper): Replace accessing list implemention
2125 details with API function.
2126 (handle_query): Ditto.
2127 (visit_actioned_threads_callback_ftype): New typedef.
2128 (visit_actioned_threads_data): New struct.
2129 (visit_actioned_threads): Rewrite to be find_inferior callback.
2130 (resume): Call find_inferior.
2131 (handle_status): Replace accessing list implemention
2132 details with API function.
2133 (process_serial_event): Replace accessing list implemention details
2135 * target.c (set_desired_inferior): Replace accessing list implemention
2136 details with API function.
2137 * tracepoint.c (same_process_p): New function.
2138 (gdb_agent_about_to_close): Replace accessing list implemention
2139 details with API function.
2140 * win32-low.c (child_delete_thread): Replace accessing list
2141 implemention details with API function.
2142 (match_dll_by_basename): New function.
2143 (dll_is_loaded_by_basename): New function.
2144 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2145 details call to dll_is_loaded_by_basename.
2147 2014-02-19 Doug Evans <dje@google.com>
2149 * dll.h (struct dll_info): Add comment.
2150 * gdbthread.h (struct thread_info): Add comment.
2151 (current_ptid): Simplify.
2152 * inferiors.c (add_process): Update.
2153 (remove_process): Update.
2154 * inferiors.h (struct process_info): Rename member "head" to "entry".
2155 * linux-low.c (delete_lwp): Update.
2157 (last_thread_of_process_p): Update.
2158 (kill_one_lwp_callback, linux_kill): Update.
2159 (status_pending_p_callback): Update.
2160 (wait_for_sigstop): Update. Simplify read of ptid.
2161 (start_step_over): Update.
2162 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2163 (get_lwp_thread): Update.
2164 (struct lwp_info): Rename member "head" to "entry".
2165 * regcache.h (inferior_list_entry): Delete.
2166 * server.c (kill_inferior_callback): Update.
2167 (detach_or_kill_inferior_callback): Update.
2168 (print_started_pid): Update.
2169 (print_attached_pid): Update.
2170 (process_serial_event): Simplify read of ptid.
2171 * thread-db.c (thread_db_create_event): Update.
2172 (thread_db_get_tls_address): Update.
2173 * win32-low.c (current_inferior_ptid): Simplify.
2175 2014-02-19 Tom Tromey <tromey@redhat.com>
2177 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2179 (target_supports_btrace): Update.
2181 2014-02-14 Yao Qi <yao@codesourcery.com>
2183 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2184 (rsp-low-ipa.o): New target.
2186 2014-02-12 Tom Tromey <tromey@redhat.com>
2188 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2189 convert_ascii_to_int.
2190 * regcache.c (registers_to_string): Likewise.
2191 * remote-utils.c (decode_M_packet): Likewise.
2192 * server.c (process_serial_event): Likewise.
2194 2014-02-12 Tom Tromey <tromey@redhat.com>
2196 * server.c (handle_query, handle_v_run): Use hex2bin, not
2198 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2200 2014-02-12 Tom Tromey <tromey@redhat.com>
2202 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2203 convert_int_to_ascii.
2204 * regcache.c (registers_to_string, collect_register_as_string):
2206 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2208 * server.c (process_serial_event): Likewise.
2209 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2210 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2212 2014-02-12 Tom Tromey <tromey@redhat.com>
2214 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2215 bin2hex, not hexify.
2216 * tracepoint.c (cmd_qtstatus): Likewise.
2218 2014-02-12 Tom Tromey <tromey@redhat.com>
2220 * remote-utils.c (monitor_output): Pass explicit length to
2223 2014-02-12 Tom Tromey <tromey@redhat.com>
2225 * tracepoint.c: Include rsp-low.h.
2226 * server.c: Include rsp-low.h.
2227 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2228 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2230 * remote-utils.c: Include rsp-low.h.
2231 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2232 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2233 (convert_int_to_ascii, convert_ascii_to_int): Move to
2235 * regcache.c: Include rsp-low.h.
2236 * ax.c: Include rsp-low.h.
2237 * Makefile.in (SFILES): Add common/rsp-low.c.
2238 (OBS): Add rsp-low.o.
2239 (rsp-low.o): New target.
2241 2014-02-12 Tom Tromey <tromey@redhat.com>
2243 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2244 Include print-utils.h.
2245 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2246 (plongest, thirty_two, phex_nz): Remove.
2247 * Makefile.in (SFILES): Add common/print-utils.c.
2248 (OBS): Add print-utils.o.
2249 (print-utils-ipa.o): New target.
2250 (print-utils.o): New target.
2251 (IPA_OBJS): Add print-utils-ipa.o.
2253 2014-02-06 Tom Tromey <tromey@redhat.com>
2255 * Makefile.in (SFILES): Fix indentation.
2257 2014-02-05 Doug Evans <dje@google.com>
2259 * linux-low.c (linux_wait_for_event): Improve comment.
2260 (linux_wait_1): Keep current_inferior in sync with event_child.
2262 2014-01-22 Doug Evans <dje@google.com>
2264 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2266 2014-01-22 Doug Evans <dje@google.com>
2268 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2269 * configure: Regenerate.
2270 * config.in: Regenerate.
2271 * Makefile.in (SFILES): Add debug.c.
2273 * debug.c: New file.
2274 * debug.h: New file.
2275 * linux-aarch64-low.c (*): Update all debugging printfs to use
2276 debug_printf instead of fprintf.
2277 * linux-arm-low.c (*): Ditto.
2278 * linux-cris-low.c (*): Ditto.
2279 * linux-crisv32-low.c (*): Ditto.
2280 * linux-m32r-low.c (*): Ditto.
2281 * linux-sparc-low.c (*): Ditto.
2282 * linux-x86.c (*): Ditto.
2283 * linux-low.c (*): Ditto.
2284 (linux_wait_1): Add calls to debug_enter, debug_exit.
2285 (linux_wait): Remove redundant debugging printf.
2286 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2287 (linux_resume, unstop_all_lwps): Ditto.
2288 * mem-break.c (*): Update all debugging printfs to use
2289 debug_printf instead of fprintf.
2290 * remote-utils.c (*): Ditto.
2291 * thread-db.c (*): Ditto.
2292 * server.c #include <ctype.h>, "gdb_vecs.h".
2293 (debug_threads): Moved to debug.c.
2294 (*): Update all debugging printfs to use debug_printf instead of
2296 (start_inferior): Replace call to fflush with call to debug_flush.
2297 (monitor_show_help): Mention set debug-format.
2298 (parse_debug_format_options): New function.
2299 (handle_monitor_command): Handle "monitor set debug-format".
2300 (gdbserver_usage): Mention --debug-format.
2301 (main): Parse --debug-format.
2302 * server.h (debug_threads): Declaration moved to debug.h.
2304 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2305 trace_debug_1 that uses debug_printf.
2306 (tracepoint_look_up_symbols): Update all debugging printfs to use
2307 debug_printf instead of fprintf.
2309 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2311 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2314 2014-01-17 Pedro Alves <palves@redhat.com>
2317 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2318 defined after including gdb_proc_service.h.
2320 2014-01-16 Doug Evans <dje@google.com>
2322 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2323 (match_dll): Use it.
2325 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2327 * target.h (target_ops) <read_btrace>: Change parameters and
2328 return type to allow error reporting.
2329 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2330 trace reading errors on.
2331 * linux-low.c (linux_low_read_btrace): Pass trace reading
2333 (linux_low_disable_btrace): New.
2335 2014-01-15 Doug Evans <dje@google.com>
2337 * inferiors.c (thread_id_to_gdb_id): Delete.
2338 * inferiors.h (thread_id_to_gdb_id): Delete.
2340 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2342 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2343 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2346 2014-01-08 Pedro Alves <palves@redhat.com>
2348 * server.c (handle_status): Don't discard previous queued stop
2349 replies or thread's pending status here.
2350 (main) <disconnection>: Do it here instead.
2352 2014-01-08 Pedro Alves <palves@redhat.com>
2354 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2355 * server.c (visit_actioned_threads, handle_pending_status): New
2357 (handle_v_cont): Factor out parts to ...
2358 (resume): ... this new function. If in all-stop, and a thread
2359 being resumed has a pending status, report it without actually
2361 (myresume): Adjust to use the new 'resume' function.
2362 (clear_pending_status_callback, set_pending_status_callback)
2363 (find_status_pending_thread_callback): New functions.
2364 (handle_status): Handle the case of multiple threads having
2365 interesting statuses to report. Report threads' real last signal
2366 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2367 with an interesting thread to report the status for, instead of
2368 always reporting the status of the first thread.
2370 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2372 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2373 * gdbreplay.c (gdbreplay_version): Likewise.
2375 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2377 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2378 iov.iov_len with the real length in use.
2380 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2382 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2383 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2384 for all targets that use win32-low.c.
2385 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2386 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2388 2013-12-13 Pedro Alves <palves@redhat.com>
2390 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2391 if equal to TARGET_WAITKIND_LOADED.
2392 * win32-low.c (cached_status): New static global.
2393 (win32_wait): Add declaration.
2394 (do_initial_child_stuff): Flush all initial pending debug events
2395 up to the initial breakpoint.
2396 (win32_wait): If CACHED_STATUS was set, return that instead
2397 of doing a real wait. Remove the code resuming the execution
2398 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2399 during the initial phase. Also remove the code changing
2400 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2401 TARGET_WAITKIND_STOPPED.
2403 2013-12-11 Yao Qi <yao@codesourcery.com>
2405 * notif.c (handle_notif_ack): Return 0 if no notification
2408 2013-11-20 Doug Evans <dje@google.com>
2410 * linux-low.c (linux_set_resume_request): Fix comment.
2412 2013-11-20 Doug Evans <dje@google.com>
2414 * linux-low.c (resume_status_pending_p): Tweak comment.
2416 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2418 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2419 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2420 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2421 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2422 (srv_amd64_regobj): Add amd64-mpx.o.
2423 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2424 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2425 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2426 * i387-fp.c (num_pl_bnd_register) Added constant.
2427 (num_pl_bnd_cfg_registers) Added constant.
2428 (struct i387_xsave) Added reserved area and MPX fields.
2429 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2430 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2432 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2433 (init_registers_amd64_mpx_linux): Declare new function.
2434 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2435 (x86_64_regmap): Add MPX registers.
2436 (x86_linux_read_description): Add MPX case.
2437 (initialize_low_arch): Initialize MPX targets.
2439 2013-11-18 Tom Tromey <tromey@redhat.com>
2441 * configure: Rebuild.
2442 * configure.ac: Don't check for stdlib.h.
2443 * gdbreplay.c: Unconditionally include stdlib.h.
2445 2013-11-18 Tom Tromey <tromey@redhat.com>
2447 * config.in: Rebuild.
2448 * configure: Rebuild.
2449 * configure.ac: Don't use AC_HEADER_DIRENT.
2451 2013-11-18 Tom Tromey <tromey@redhat.com>
2453 * server.h: Don't check HAVE_STRING_H.
2454 * gdbreplay.c: Don't check HAVE_STRING_H.
2455 * configure: Rebuild.
2457 2013-11-18 Tom Tromey <tromey@redhat.com>
2459 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2462 2013-11-08 Tom Tromey <tromey@redhat.com>
2464 * configure, config.in: Rebuild.
2465 * configure.ac: Remove unused configury.
2467 2013-11-08 Tom Tromey <tromey@redhat.com>
2469 * acinclude.m4: Include common.m4, codeset.m4.
2470 * configure, config.in: Rebuild.
2471 * configure.ac: Use GDB_AC_COMMON.
2473 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2475 * linux-s390-low.c (HWCAP_S390_TE): New define.
2476 (s390_arch_setup): Consider the TE field in the HWCAP for
2477 determining 'have_regset_tdb'.
2479 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2482 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2485 2013-10-02 Pedro Alves <palves@redhat.com>
2487 * server.c (process_serial_event): Don't output "GDBserver
2488 exiting" if GDB is connected through stdio.
2489 * target.c (mywait): Likewise, be silent if GDB is connected
2492 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2494 * lynx-low.c (lynx_add_threads_after_attach): New function.
2495 (lynx_attach): Remove call to add_thread. Add call to
2496 lynx_add_threads_after_attach instead.
2498 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2500 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2501 * config.in, configure: Regenerated.
2503 2013-09-18 Yao Qi <yao@codesourcery.com>
2506 * server.c (start_inferior): Clear 'resume_info'.
2508 2013-09-16 Jiong Wang <jiwang@tilera.com>
2510 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2513 2013-09-16 Jiong Wang <jiwang@tilera.com>
2515 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2516 linux-tile-low.o to srv_tgtobj.
2518 2013-09-16 Will Newton <will.newton@linaro.org>
2520 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2523 2013-09-06 Pedro Alves <palves@redhat.com>
2525 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2526 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2527 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2528 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2529 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2530 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2532 2013-09-06 Pedro Alves <palves@redhat.com>
2534 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2535 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2537 2013-09-06 Pedro Alves <palves@redhat.com>
2539 * linux-amd64-ipa.c: Include tracepoint.h.
2540 * linux-i386-ipa.c: Include tracepoint.h.
2542 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2544 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2545 (ps_get_thread_area): New function.
2547 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2549 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2550 (initialize_low_arch): Call init_registers_crisv32 rather than
2551 init_register_crisv32.
2553 2013-09-05 Pedro Alves <palves@redhat.com>
2555 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2557 * hostio.h: ... this new file.
2558 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2559 win32-low.c: Include hostio.h.
2561 2013-09-05 Pedro Alves <palves@redhat.com>
2563 * server.h (gdb_client_data, handler_func, callback_handler_func)
2564 (delete_file_handler, add_file_handler, append_callback_event)
2565 (delete_callback_event, start_event_loop, initialize_event_loop):
2566 Move to event-loop.h and include it.
2567 * event-loop.h: New file.
2569 2013-09-05 Pedro Alves <palves@redhat.com>
2571 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2572 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2573 (loaded_dll, unloaded_dll): Move to ...
2574 * dll.h: ... this new file.
2575 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2577 2013-09-05 Pedro Alves <palves@redhat.com>
2579 * server.h (current_process, get_thread_process, all_processes)
2580 (add_inferior_to_list, for_each_inferior, current_inferior)
2581 (remove_inferior, add_process, remove_process, find_process_pid)
2582 (have_started_inferiors_p, have_attached_inferiors_p)
2583 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2584 (clear_inferiors, find_inferior, find_inferior_id)
2585 (inferior_target_data, set_inferior_target_data)
2586 (inferior_regcache_data, set_inferior_regcache_data): Move to
2587 inferiors.h, and include it.
2588 * inferiors.h: New file.
2590 2013-09-05 Pedro Alves <palves@redhat.com>
2592 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2596 2013-09-05 Pedro Alves <palves@redhat.com>
2598 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2600 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2601 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2602 (handle_tracepoint_general_set, handle_tracepoint_query)
2603 (tracepoint_finished_step, tracepoint_was_hit)
2604 (release_while_stepping_state_list, current_traceframe)
2605 (in_readonly_region, traceframe_read_mem)
2606 (fetch_traceframe_registers, traceframe_read_sdata)
2607 (traceframe_read_info, struct fast_tpoint_collect_status)
2608 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2609 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2610 (supply_fast_tracepoint_registers)
2611 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2612 (ipa_tdesc, claim_trampoline_space)
2613 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2614 (agent_mem_read, agent_get_trace_state_variable_value)
2615 (agent_set_trace_state_variable_value, agent_tsv_read)
2616 (agent_mem_read_string, get_raw_reg_func_addr)
2617 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2618 * tracepoint.h: ... this new file.
2620 2013-09-05 Pedro Alves <palves@redhat.com>
2622 * server.h (perror_with_name, error, fatal, warning, paddress)
2623 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2625 * utils.h: New file.
2627 2013-09-05 Pedro Alves <palves@redhat.com>
2629 * server.h (remote_debug, noack_mode, transport_is_reliable)
2630 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2631 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2632 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2633 (write_enn, initialize_async_io, enable_async_io)
2634 (disable_async_io, check_remote_input_interrupt_request)
2635 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2636 (dead_thread_notify, prepare_resume_reply)
2637 (decode_address_to_semicolon, decode_address, decode_m_packet)
2638 (decode_M_packet, decode_X_packet, decode_xfer_write)
2639 (decode_search_memory_packet, unhexify, hexify)
2640 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2641 (look_up_one_symbol, relocate_instruction)
2642 (monitor_output): Move to remote-utils.h, and include it.
2643 * remote-utils.h: New file.
2645 2013-09-05 Pedro Alves <palves@redhat.com>
2647 * server.h (_): Delete.
2649 2013-09-02 Pedro Alves <palves@redhat.com>
2651 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2652 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2654 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2656 2013-09-02 Pierre Muller <muller@sourceware.org>
2658 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2659 or WriteProcessMemory complete successfully and handle
2660 ERROR_PARTIAL_COPY error.
2662 2013-09-02 Pedro Alves <palves@redhat.com>
2664 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2665 error instead of EIO.
2667 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2670 * linux-low.c: Include filestuff.h.
2671 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2672 * lynx-low.c: Include filestuff.h.
2673 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2674 * server.c: Include filestuff.h.
2675 (main): Call notice_open_fds.
2676 * spu-low.c: Include filestuff.h.
2677 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2679 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2681 * Makefile.in: Explain why ../target and ../nat are not
2682 listed as include file search paths.
2683 (linux-waitpid.o): New object file rule.
2684 * configure.srv (srv_native_linux_obj): New variable.
2685 Replace all occurrences of linux native object files with
2686 $srv_native_linux_obj.
2687 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2688 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2689 (linux_enable_event_reporting): Remove declaration.
2690 (my_waitpid): Moved to common/linux-waitpid.c.
2691 (linux_wait_for_event): Pass ptid when calling
2692 linux_enable_event_reporting.
2693 (linux_supports_tracefork_flag): Remove.
2694 (linux_enable_event_reporting): Likewise.
2695 (linux_tracefork_grandchild): Remove.
2696 (STACK_SIZE): Moved to common/linux-ptrace.c.
2697 (linux_tracefork_child): Remove.
2698 (linux_test_for_tracefork): Remove.
2699 (linux_look_up_symbols): Call linux_supports_traceclone.
2700 (initialize_low): Remove call to linux_test_for_tracefork.
2701 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2702 common/linux-ptrace.h.
2703 (PTRACE_TYPE_ARG4): Likewise.
2704 Include linux-ptrace.h.
2706 2013-08-21 Pedro Alves <palves@redhat.com>
2708 * config.in: Renegerate.
2710 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2712 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2713 (SFILES): Remove $(srcdir)/common/target-common.c and
2714 add $(srcdir)/target/waitstatus.c.
2715 (OBS): Remove target-common.o and add waitstatus.o.
2716 (server_h): Remove $(srcdir)/../common/target-common.h and
2717 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2718 and $(srcdir)/../target/waitstatus.h.
2719 (target-common.o): Remove.
2720 (waitstatus.o): New target object file.
2721 * target.h: Do not include target-common.h and
2722 include target/resume.h, target/wait.h and
2723 target/waitstatus.h.
2725 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2727 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2728 to PTRACE_TYPE_ARG3.
2729 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2730 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2732 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2733 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2735 2013-07-27 Jie Zhang <jie@codesourcery.com>
2736 Daniel Jacobowitz <dan@codesourcery.com>
2737 Yao Qi <yao@codesourcery.com>
2739 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2740 (mips-linux-watch.o): New rule.
2741 (mips_linux_watch_h): New variable.
2742 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2744 * linux-mips-low.c: Include mips-linux-watch.h.
2745 (struct arch_process_info, struct arch_lwp_info): New.
2746 (update_watch_registers_callback): New function.
2747 (mips_linux_new_process, mips_linux_new_thread) New functions.
2748 (mips_linux_prepare_to_resume, mips_insert_point): New
2750 (mips_remove_point, mips_stopped_by_watchpoint): New
2752 (rsp_bp_type_to_target_hw_bp_type): New function.
2753 (mips_stopped_data_address): New function.
2754 (the_low_target): Add watchpoint support functions.
2756 2013-07-27 Yao Qi <yao@codesourcery.com>
2758 * i386-low.c: Include break-common.h.
2759 (enum target_hw_bp_type): Remove.
2761 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2763 * Makefile.in (SFILES): /common/target-common.c.
2764 (OBS): Add target-common.o.
2765 (server_h): Add $(srcdir)/../common/target-common.h.
2766 (target-common.o): New target.
2767 * server.c (queue_stop_reply_callback): Free
2768 status string after use.
2769 * target.c (target_waitstatus_to_string): Remove.
2770 * target.h: Include target-common.h.
2771 (resume_kind): Likewise.
2772 (target_waitkind): Likewise.
2773 (target_waitstatus): Likewise.
2774 (TARGET_WNOHANG): Likewise.
2776 2013-07-04 Yao Qi <yao@codesourcery.com>
2778 * Makefile.in (host_alias): Use @host_noncanonical@.
2779 (target_alias): Use @target_noncanonical@.
2780 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2781 ACX_NONCANONICAL_HOST.
2782 * configure: Regenerated.
2785 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2787 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2788 * configure: Rebuild.
2789 * Makefile.in (version_host, version_target): Get from configure.
2790 (version.c): Use $(version_host) and $(version_target).
2792 2013-07-03 Pedro Alves <palves@redhat.com>
2794 * Makefile.in (config.status): Depend on development.sh.
2795 * acinclude.m4: Include libmcheck.m4.
2796 * configure: Regenerate.
2798 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2800 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2801 attribute inside the parentheses.
2802 (winapi_DebugSetProcessKillOnExit): Ditto.
2803 (winapi_DebugBreakProcess): Ditto.
2804 (winapi_GenerateConsoleCtrlEvent): Ditto.
2806 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2808 * notif.h (notif_event): Add a dummy member to avoid compiler
2811 2013-07-01 Pedro Alves <palves@redhat.com>
2813 * hostio.c (HOSTIO_PATH_MAX): Define.
2814 (require_filename, handle_open, handle_unlink, handle_readlink):
2817 2013-07-01 Pedro Alves <palves@redhat.com>
2819 * server.h: Include "pathmax.h".
2820 * linux-low.c: Don't include sys/param.h.
2821 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2823 * win32-low.c: Don't include sys/param.h.
2824 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2826 2013-07-01 Pedro Alves <palves@redhat.com>
2828 * event-loop.c: Don't check HAVE_UNISTD_H before including
2830 * gdbreplay.c: Likewise.
2831 * remote-utils.c: Likewise.
2832 * server.c: Likewise.
2833 * configure.ac: Don't check for unistd.h.
2834 * configure: Regenerate.
2836 2013-06-28 Tom Tromey <tromey@redhat.com>
2838 * Makefile.in (version.c): Use version.in, not
2841 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2843 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2844 * configure: Rebuild.
2845 * Makefile.in (version_host, version_target): Get from configure.
2846 (version.c): Use $(version_host) and $(version_target).
2848 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2850 Fix trace-status to output user name without trailing colon.
2851 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2853 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2855 Fix trace-status to output proper start-time and stop-time.
2856 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2857 output start time and stop time in hex as gdb expects.
2859 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2861 * tracepoint.c (build_traceframe_info_xml): Output trace state
2862 variables present in the trace buffer.
2864 2013-06-24 Tom Tromey <tromey@redhat.com>
2866 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2868 (version.o): Remove.
2869 * gdbreplay.c: Include version.h.
2870 (version, host_name): Don't declare.
2871 * server.h: Include version.h.
2872 (version, host_name): Don't declare.
2874 2013-06-12 Pedro Alves <palves@redhat.com>
2876 * linux-x86-low.c (linux_is_elf64): Delete global.
2877 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2878 with local linux_pid_exe_is_elf_64_file use.
2880 2013-06-11 Pedro Alves <palves@redhat.com>
2882 * linux-low.c (regset_disabled, disable_regset): New functions.
2883 (regsets_fetch_inferior_registers)
2884 (regsets_store_inferior_registers): Use them.
2885 (initialize_regsets_info); Don't allocate the disabled_regsets
2887 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2890 2013-06-11 Pedro Alves <palves@redhat.com>
2892 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2895 2013-06-11 Pedro Alves <palves@redhat.com>
2897 * linux-x86-low.c (initialize_low_arch): Call
2898 init_registers_x32_avx_linux.
2900 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2902 Fix compatibility with Android Bionic.
2903 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2906 2013-06-07 Pedro Alves <palves@redhat.com>
2909 * Makefile.in (OBS): Add tdesc.o.
2910 (IPA_OBJS): Add tdesc-ipa.o.
2911 (tdesc-ipa.o): New rule.
2912 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2914 * linux-low.c (new_inferior): Delete.
2915 (disabled_regsets, num_regsets): Delete.
2916 (linux_add_process): Adjust to set the new per-process
2918 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2919 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2920 was a stop. When calling arch_setup, switch the current inferior
2921 to the thread that got an event.
2922 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2923 (regsets_fetch_inferior_registers)
2924 (regsets_store_inferior_registers): New regsets_info parameter.
2926 (linux_register_in_regsets): New regs_info parameter. Adjust to
2928 (register_addr, fetch_register, store_register): New usrregs_info
2929 parameter. Adjust to use it.
2930 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2931 parameter regs_info. Adjust to use it.
2932 (linux_fetch_registers): Get the current inferior's regs_info, and
2934 (linux_store_registers): Ditto.
2935 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2936 (initialize_low): Don't initialize the target_regsets here. Call
2937 initialize_low_arch.
2938 * linux-low.h (target_regsets): Delete declaration.
2939 (struct regsets_info): New.
2940 (struct usrregs_info): New.
2941 (struct regs_info): New.
2942 (struct process_info_private) <new_inferior>: New field.
2943 (struct linux_target_ops): Delete the num_regs, regmap, and
2944 regset_bitmap fields. New field regs_info.
2945 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2946 * i387-fp.c (num_xmm_registers): Delete.
2947 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2948 calls to new interface.
2949 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2950 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2951 Infer the number of xmm registers from the regcache's target
2953 * i387-fp.h (num_xmm_registers): Delete.
2954 * inferiors.c (add_thread): Don't install the thread's regcache
2956 * proc-service.c (gregset_info): Fetch the current inferior's
2957 regs_info. Adjust to use it.
2958 * regcache.c: Include tdesc.h.
2959 (register_bytes, reg_defs, num_registers)
2960 (gdbserver_expedite_regs): Delete.
2961 (get_thread_regcache): If the thread doesn't have a regcache yet,
2962 create one, instead of aborting gdbserver.
2963 (regcache_invalidate_one): Rename to ...
2964 (regcache_invalidate_thread): ... this.
2965 (regcache_invalidate_one): New.
2966 (regcache_invalidate): Only invalidate registers of the current
2968 (init_register_cache): Add target_desc parameter, and use it.
2969 (new_register_cache): Ditto. Assert the target description has a
2970 non zero registers_size.
2971 (regcache_cpy): Add assertions. Adjust.
2972 (realloc_register_cache, set_register_cache): Delete.
2973 (registers_to_string, registers_from_string): Adjust.
2974 (find_register_by_name, find_regno, find_register_by_number)
2975 (register_cache_size): Add target_desc parameter, and use it.
2976 (free_register_cache_thread, free_register_cache_thread_one)
2977 (regcache_release, register_cache_size): New.
2978 (register_size): Add target_desc parameter, and use it.
2979 (register_data, supply_register, supply_register_zeroed)
2980 (supply_regblock, supply_register_by_name, collect_register)
2981 (collect_register_as_string, collect_register_by_name): Adjust.
2982 * regcache.h (struct target_desc): Forward declare.
2983 (struct regcache) <tdesc>: New field.
2984 (init_register_cache, new_register_cache): Add target_desc
2986 (regcache_invalidate_thread): Declare.
2987 (regcache_invalidate_one): Delete declaration.
2988 (regcache_release): Declare.
2989 (find_register_by_number, register_cache_size, register_size)
2990 (find_regno): Add target_desc parameter.
2991 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2993 * remote-utils.c: Include tdesc.h.
2994 (outreg, prepare_resume_reply): Adjust.
2995 * server.c: Include tdesc.h.
2996 (gdbserver_xmltarget): Delete declaration.
2997 (get_features_xml, process_serial_event): Adjust.
2998 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3000 (struct process_info) <tdesc>: New field.
3001 (ipa_tdesc): Declare.
3002 * tdesc.c: New file.
3003 * tdesc.h: New file.
3004 * tracepoint.c: Include tdesc.h.
3005 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3006 (get_context_regcache): Adjust to pass ipa_tdesc down.
3007 (do_action_at_tracepoint): Adjust to get the register cache size
3008 from the context regcache's description.
3009 (traceframe_walk_blocks): Adjust to get the register cache size
3010 from the current trace frame's description.
3011 (traceframe_get_pc): Adjust to get current trace frame's
3012 description and pass it down.
3013 (gdb_collect): Adjust to get the register cache size from the
3015 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3016 (gdbserver_xmltarget): Delete.
3017 (initialize_low_tracepoint): Set the ipa's target description.
3018 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3019 (initialize_low_tracepoint): Set the ipa's target description.
3020 * linux-x86-low.c: Include tdesc.h.
3021 [__x86_64__] (is_64bit_tdesc): New.
3022 (ps_get_thread_area, x86_get_thread_area): Use it.
3023 (i386_cannot_store_register): Rename to ...
3024 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3025 (i386_cannot_fetch_register): Rename to ...
3026 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3027 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3029 (target_regsets): Rename to ...
3030 (x86_regsets): ... this.
3031 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3033 (x86_siginfo_fixup): Use is_64bit_tdesc.
3034 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3035 (tdesc_x32_avx_linux, tdesc_x32_linux)
3036 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3038 (x86_linux_update_xmltarget): Delete.
3039 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3040 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3041 (AMD64_LINUX_USER64_CS): New.
3042 (x86_linux_read_description): New, based on
3043 x86_linux_update_xmltarget.
3044 (same_process_callback): New.
3045 (x86_arch_setup_process_callback): New.
3046 (x86_linux_update_xmltarget): New.
3047 (x86_regsets_info): New.
3048 (amd64_linux_regs_info): New.
3049 (i386_linux_usrregs_info): New.
3050 (i386_linux_regs_info): New.
3051 (x86_linux_regs_info): New.
3052 (x86_arch_setup): Reimplement.
3053 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3054 (x86_emit_ops): Ditto.
3055 (the_low_target): Adjust. Install x86_linux_regs_info,
3056 x86_cannot_fetch_register, and x86_cannot_store_register.
3057 (initialize_low_arch): New.
3058 * linux-ia64-low.c (tdesc_ia64): Declare.
3059 (ia64_fetch_register): Adjust.
3060 (ia64_usrregs_info, regs_info): New globals.
3061 (ia64_regs_info): New function.
3062 (the_low_target): Adjust.
3063 (initialize_low_arch): New function.
3064 * linux-sparc-low.c (tdesc_sparc64): Declare.
3065 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3067 (sparc_arch_setup): New function.
3068 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3069 (the_low_target): Adjust.
3070 (initialize_low_arch): New function.
3071 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3072 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3073 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3074 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3075 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3076 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3077 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3078 (tdesc_powerpc_isa205_vsx64l): Declare.
3079 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3080 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3081 (ppc_set_pc, ppc_get_hwcap): Adjust.
3082 (ppc_usrregs_info): Forward declare.
3083 (!__powerpc64__) ppc_regmap_adjusted: New global.
3084 (ppc_arch_setup): Adjust to the current process'es target
3086 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3087 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3088 (ppc_store_evrregset): Adjust.
3089 (target_regsets): Rename to ...
3090 (ppc_regsets): ... this, and make static.
3091 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3092 (ppc_regs_info): New function.
3093 (the_low_target): Adjust.
3094 (initialize_low_arch): New function.
3095 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3096 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3097 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3098 (tdesc_s390x_linux64v2): Declare.
3099 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3100 (s390_fill_gregset, s390_store_last_break): Adjust.
3101 (target_regsets): Rename to ...
3102 (s390_regsets): ... this, and make static.
3103 (s390_get_pc, s390_set_pc): Adjust.
3104 (s390_get_hwcap): New target_desc parameter, and use it.
3105 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3106 (s390_arch_setup): Adjust to set the current process'es target
3107 description. Don't adjust the regmap.
3108 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3109 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3110 (regs_info_3264): New globals.
3111 (s390_regs_info): New function.
3112 (the_low_target): Adjust.
3113 (initialize_low_arch): New function.
3114 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3115 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3116 [__mips64] (init_registers_mips_linux)
3117 (init_registers_mips_dsp_linux): Delete defines.
3118 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3119 (have_dsp): New global.
3120 (mips_read_description): New, based on mips_arch_setup.
3121 (mips_arch_setup): Reimplement.
3122 (get_usrregs_info): New function.
3123 (mips_cannot_fetch_register, mips_cannot_store_register)
3124 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3125 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3126 (target_regsets): Rename to ...
3127 (mips_regsets): ... this, and make static.
3128 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3129 (dsp_regs_info, regs_info): New globals.
3130 (mips_regs_info): New function.
3131 (the_low_target): Adjust.
3132 (initialize_low_arch): New function.
3133 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3134 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3136 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3137 (arm_read_description): New, with bits factored from
3139 (arm_arch_setup): Reimplement.
3140 (target_regsets): Rename to ...
3141 (arm_regsets): ... this, and make static.
3142 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3143 (arm_regs_info): New function.
3144 (the_low_target): Adjust.
3145 (initialize_low_arch): New function.
3146 * linux-m68k-low.c (tdesc_m68k): Declare.
3147 (target_regsets): Rename to ...
3148 (m68k_regsets): ... this, and make static.
3149 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3150 (m68k_regs_info): New function.
3151 (m68k_arch_setup): New function.
3152 (the_low_target): Adjust.
3153 (initialize_low_arch): New function.
3154 * linux-sh-low.c (tdesc_sharch): Declare.
3155 (target_regsets): Rename to ...
3156 (sh_regsets): ... this, and make static.
3157 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3158 (sh_regs_info, sh_arch_setup): New functions.
3159 (the_low_target): Adjust.
3160 (initialize_low_arch): New function.
3161 * linux-bfin-low.c (tdesc_bfin): Declare.
3162 (bfin_arch_setup): New function.
3163 (bfin_usrregs_info, regs_info): New globals.
3164 (bfin_regs_info): New function.
3165 (the_low_target): Adjust.
3166 (initialize_low_arch): New function.
3167 * linux-cris-low.c (tdesc_cris): Declare.
3168 (cris_arch_setup): New function.
3169 (cris_usrregs_info, regs_info): New globals.
3170 (cris_regs_info): New function.
3171 (the_low_target): Adjust.
3172 (initialize_low_arch): New function.
3173 * linux-cris-low.c (tdesc_crisv32): Declare.
3174 (cris_arch_setup): New function.
3175 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3176 (cris_regs_info): New function.
3177 (the_low_target): Adjust.
3178 (initialize_low_arch): New function.
3179 * linux-m32r-low.c (tdesc_m32r): Declare.
3180 (m32r_arch_setup): New function.
3181 (m32r_usrregs_info, regs_info): New globals.
3182 (m32r_regs_info): Adjust.
3183 (initialize_low_arch): New function.
3184 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3185 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3186 (tic6x_usrregs_info): Forward declare.
3187 (tic6x_read_description): New function, based on ...
3188 (tic6x_arch_setup): ... this. Reimplement.
3189 (target_regsets): Rename to ...
3190 (tic6x_regsets): ... this, and make static.
3191 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3192 (tic6x_regs_info): New function.
3193 (the_low_target): Adjust.
3194 (initialize_low_arch): New function.
3195 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3196 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3197 (target_regsets): Rename to ...
3198 (xtensa_regsets): ... this, and make static.
3199 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3201 (xtensa_arch_setup, xtensa_regs_info): New functions.
3202 (the_low_target): Adjust.
3203 (initialize_low_arch): New function.
3204 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3205 (nios2_arch_setup): Set the current process'es tdesc.
3206 (target_regsets): Rename to ...
3207 (nios2_regsets): ... this.
3208 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3209 (nios2_regs_info): New function.
3210 (the_low_target): Adjust.
3211 (initialize_low_arch): New function.
3212 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3213 (aarch64_arch_setup): Set the current process'es tdesc.
3214 (target_regsets): Rename to ...
3215 (aarch64_regsets): ... this.
3216 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3217 (aarch64_regs_info): New function.
3218 (the_low_target): Adjust.
3219 (initialize_low_arch): New function.
3220 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3222 (target_regsets): Rename to ...
3223 (tile_regsets): ... this.
3224 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3225 (tile_regs_info): New function.
3226 (tile_arch_setup): Set the current process'es tdesc.
3227 (the_low_target): Adjust.
3228 (initialize_low_arch): New function.
3229 * spu-low.c (tdesc_spu): Declare.
3230 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3231 * win32-arm-low.c (tdesc_arm): Declare.
3232 (arm_arch_setup): New function.
3233 (the_low_target): Install arm_arch_setup instead of
3235 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3236 (init_windows_x86): Rename to ...
3237 (i386_arch_setup): ... this. Set `win32_tdesc'.
3238 (the_low_target): Adjust.
3239 * win32-low.c (win32_tdesc): New global.
3240 (child_add_thread): Don't create the thread cache here.
3241 (do_initial_child_stuff): Set the new process'es tdesc.
3242 * win32-low.h (struct target_desc): Forward declare.
3243 (win32_tdesc): Declare.
3244 * lynx-i386-low.c (tdesc_i386): Declare global.
3245 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3246 * lynx-low.c (lynx_tdesc): New global.
3247 (lynx_add_process): Set the new process'es tdesc.
3248 * lynx-low.h (struct target_desc): Forward declare.
3249 (lynx_tdesc): Declare global.
3250 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3251 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3252 * nto-low.c (nto_tdesc): New global.
3253 (do_attach): Set the new process'es tdesc.
3254 * nto-low.h (struct target_desc): Forward declare.
3255 (nto_tdesc): Declare.
3256 * nto-x86-low.c (tdesc_i386): Declare.
3257 (nto_x86_arch_setup): Set `nto_tdesc'.
3259 2013-06-04 Gary Benson <gbenson@redhat.com>
3261 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3262 to qSupported response when appropriate.
3263 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3264 with nonzero-length annex.
3265 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3266 arguments supplied in annex.
3268 2013-05-31 Doug Evans <dje@google.com>
3271 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3272 64 bits in 64-cross-32 environment.
3274 2013-05-28 Pedro Alves <palves@redhat.com>
3276 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3277 (aarch64-without-fpu.c): Delete rule.
3278 * configure.srv (aarch64*-*-linux*): Remove references to
3279 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3280 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3283 2013-05-24 Pedro Alves <palves@redhat.com>
3285 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3286 instead of strchr/decode_address. Error if the range isn't split
3287 with a ','. Don't assume there's be a ':' in the action.
3289 2013-05-23 Yao Qi <yao@codesourcery.com>
3290 Pedro Alves <palves@redhat.com>
3292 * linux-low.c (lwp_in_step_range): New function.
3293 (linux_wait_1): If the thread was range stepping and stopped
3294 outside the stepping range, report the stop to GDB. Otherwise,
3295 continue stepping. Add range stepping debug output.
3296 (linux_set_resume_request): Copy the step range from the resume
3298 (linux_supports_range_stepping): New.
3299 (linux_target_ops) <supports_range_stepping>: Set to
3300 linux_supports_range_stepping.
3301 * linux-low.h (struct linux_target_ops)
3302 <supports_range_stepping>: New field.
3303 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3304 * linux-x86-low.c (x86_supports_range_stepping): New.
3305 (the_low_target) <supports_range_stepping>: Set to
3306 x86_supports_range_stepping.
3307 * server.c (handle_v_cont): Handle 'r' action.
3308 (handle_v_requests): Append ";r" if the target supports range
3310 * target.h (struct thread_resume) <step_range_start,
3311 step_range_end>: New fields.
3312 (struct target_ops) <supports_range_stepping>:
3314 (target_supports_range_stepping): New macro.
3316 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3318 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3319 confusion in comment.
3321 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3323 * lynx-low.c (struct process_info_private): New type.
3324 (lynx_add_process): New function.
3325 (lynx_create_inferior, lynx_attach): Replace calls to
3326 add_process by calls to lynx_add_process.
3327 (lynx_resume): If PTID is null, then try using
3328 current_process()->private->last_wait_event_ptid.
3330 (lynx_clear_inferiors): Delete. The contents of that function
3331 has been inlined in lynx_mourn;
3332 (lynx_wait_1): Save the ptid in the process's private data.
3333 (lynx_mourn): Free the process' private data. Replace call
3334 to lynx_clear_inferiors by call to clear_inferiors.
3336 2013-05-17 Yao Qi <yao@codesourcery.com>
3338 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3341 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3343 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3344 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3345 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3346 PT_TEXT_END_ADDR guards. Update comments.
3347 (linux_target_op) <read_offsets>: Conditionally define to
3348 linux_read_offsets if the target is UCLIBC and if it defines
3349 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3351 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3352 Andrew Jenner <andrew@codesourcery.com>
3354 * Makefile.in (SFILES): Add linux-nios2-low.c.
3355 (clean): Add action to delete nios2-linux.c.
3356 (nios2-linux.c): New rule.
3357 * configure.srv: Add nios2*-*-linux*.
3358 * linux-nios2-low.c: New.
3360 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3362 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3364 2013-04-25 Hui Zhu <hui@codesourcery.com>
3367 * ax.c (ax_printf): Add fflush.
3369 2013-04-22 Tom Tromey <tromey@redhat.com>
3371 * Makefile.in (SFILES): Add filestuff.c.
3372 (OBS): Add filestuff.o.
3373 (filestuff.o): New target.
3374 * config.in, configure: Rebuild.
3375 * configure.ac: Check for fdwalk, pipe2.
3377 2013-04-17 Pedro Alves <palves@redhat.com>
3379 * configure.ac (USE_THREAD_DB): Delete variable.
3380 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3381 Don't AC_SUBST USE_THREAD_DB.
3382 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3383 * config.in, configure: Regenerate.
3385 2013-04-16 Pedro Alves <palves@redhat.com>
3387 * linux-low.h (struct lwp_info) <thread_known>: Move under
3388 the USE_THREAD_DB #ifdef.
3390 2013-04-16 Pedro Alves <palves@redhat.com>
3392 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3393 (linux-low.o): Delete rule.
3394 * linux-low.h: Always include "gdb_thread_db.h" instead of
3395 conditionally including thread_db.h.
3396 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3399 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3401 * Makefile.in (install-only): Fix make install regression.
3403 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3405 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3406 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3408 * gdbserver.1: Remove.
3410 2013-03-22 Pedro Alves <palves@redhat.com>
3412 * linux-low.c (handle_extended_wait): Don't call
3413 linux_enable_event_reporting.
3415 2013-03-15 Tony Theodore <tonyt@logyst.com>
3418 * Makefile.in (SHELL): Use @SHELL@.
3420 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3422 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3425 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3427 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3428 Remove extraneous NULL element.
3430 2013-03-13 Yao Qi <yao@codesourcery.com>
3432 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3433 'V' block in trace frame.
3435 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3437 * target.h (struct target_ops): Add btrace ops.
3438 (target_supports_btrace): New macro.
3439 (target_enable_btrace): New macro.
3440 (target_disable_btrace): New macro.
3441 (target_read_btrace): New macro.
3442 * gdbthread.h (struct thread_info): Add btrace field.
3443 * server.c: Include btrace-common.h.
3444 (handle_btrace_general_set): New function.
3445 (handle_btrace_enable): New function.
3446 (handle_btrace_disable): New function.
3447 (handle_general_set): Call handle_btrace_general_set.
3448 (handle_qxfer_btrace): New function.
3449 (struct qxfer qxfer_packets[]): Add btrace entry.
3450 * inferiors.c (remove_thread): Disable btrace.
3451 * linux-low: Include linux-btrace.h.
3452 (linux_low_enable_btrace): New function.
3453 (linux_low_read_btrace): New function.
3454 (linux_target_ops): Add btrace ops.
3455 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3456 Add srv_linux_btrace=yes.
3457 (x86_64-*-linux*): Add linux-btrace.o.
3458 Add srv_linux_btrace=yes.
3459 * configure.ac: Define HAVE_LINUX_BTRACE.
3460 * config.in: Regenerated.
3461 * configure: Regenerated.
3463 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3465 * server.c (handle_qxfer): Preserve error message if -3 is
3467 (qxfer): Document the -3 return value.
3469 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3471 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3472 (linux_btrace_h): New variable.
3473 (linux-btrace.o): New rule.
3475 2013-03-08 Stan Shebs <stan@codesourcery.com>
3476 Hafiz Abid Qadeer <abidh@codesourcery.com>
3478 * tracepoint.c (trace_buffer_size): New global.
3479 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3480 (init_trace_buffer): Change to one-argument function. Allocate
3481 trace buffer memory.
3482 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3483 handle QTBuffer:size packet.
3484 (cmd_bigqtbuffer_size): New function.
3485 (initialize_tracepoint): Call init_trace_buffer with
3486 DEFAULT_TRACE_BUFFER_SIZE.
3487 * server.c (handle_query): Add QTBuffer:size in the
3490 2013-03-07 Yao Qi <yao@codesourcery.com>
3492 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3493 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3495 (cmd_qtsp): Adjust condition. Do post increment.
3496 Set cur_action and cur_step_action back to 0.
3498 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3501 * linux-low.c (linux_write_memory): Return early success if LEN is
3504 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3506 * configure.srv: Add x86_64-*-cygwin* as target.
3508 2013-02-28 Tom Tromey <tromey@redhat.com>
3510 * configure.ac: Invoke AC_SYS_LARGEFILE.
3511 * configure, config.in: Rebuild.
3513 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3515 * win32-low.c: Throughout, fix format strings and casts of
3516 printf-like functions to avoid type related warnings on all
3518 (get_child_debug_event): Print dwDebugEventCode as hex since
3519 that's how it's usually documented.
3521 2013-02-28 Yao Qi <yao@codesourcery.com>
3523 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3526 2013-02-27 Jiong Wang <jiwang@tilera.com>
3528 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3529 (reg-tilegx32.c): New rule.
3530 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3531 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3532 different register info initializer according to elf class.
3533 (init_registers_tilgx32): New function. The tilegx32 register info
3535 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3536 (tile_store_gregset): Likewise.
3538 2013-02-27 Yao Qi <yao@codesourcery.com>
3540 * server.c (process_point_options): Print debug message when
3541 debug_threads is true.
3543 2013-02-26 Yao Qi <yao@codesourcery.com>
3545 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3547 2013-02-19 Pedro Alves <palves@redhat.com>
3548 Kai Tietz <ktietz@redhat.com>
3552 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3553 instead of strtoul to extract address from packet.
3554 (process_serial_event) <'z'>: Likewise.
3556 2013-02-18 Yao Qi <yao@codesourcery.com>
3558 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3560 2013-02-14 Pedro Alves <palves@redhat.com>
3564 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3565 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3567 2013-02-14 Pedro Alves <palves@redhat.com>
3569 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3571 2013-02-14 Pedro Alves <palves@redhat.com>
3573 * tracepoint.c (save_string): Delete.
3574 (add_tracepoint_action): Use savestring instead of save_string.
3576 2013-02-12 Pedro Alves <palves@redhat.com>
3578 * linux-xtensa-low.c: Ditto.
3579 * xtensa-xtregs.c: Ditto.
3581 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3583 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3586 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3588 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3589 aarch64_num_wp_regs and aarch64_num_bp_regs to
3590 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3592 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3594 * linux-aarch64-low.c (ps_get_thread_area): Replace
3595 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3597 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3598 Marcus Shawcroft <marcus.shawcroft@arm.com>
3599 Nigel Stephens <nigel.stephens@arm.com>
3600 Yufeng Zhang <yufeng.zhang@arm.com>
3602 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3603 (aarch64.c, aarch64-without-fpu.c): New targets.
3604 * configure.srv (aarch64*-*-linux*): New.
3605 * linux-aarch64-low.c: New file.
3607 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3609 * linux-low.c (handle_extended_wait, linux_create_inferior)
3610 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3611 (dequeue_one_deferred_signal, linux_resume_one_thread)
3612 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3613 (linux_tracefork_grandchild, linux_test_for_tracefork)
3614 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3615 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3616 where the argument is 0.
3618 2013-01-25 Yao Qi <yao@codesourcery.com>
3620 * event-loop.c: Include "queue.h".
3621 (gdb_event_p): New typedef.
3622 (struct gdb_event) <next_event>: Remove.
3623 (event_queue): Change to QUEUE(gdb_event_p).
3624 (async_queue_event): Remove.
3625 (gdb_event_xfree): New.
3626 (initialize_event_loop): New.
3627 (process_event): Use API from QUEUE.
3628 (wait_for_event): Likewise.
3629 * server.c (main): Call initialize_event_loop.
3630 * server.h (initialize_event_loop): Declare.
3632 2013-01-18 Yao Qi <yao@codesourcery.com>
3634 * ax.h (struct eval_agent_expr_context): New.
3635 (gdb_eval_agent_expr): Update declaration.
3636 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3637 TFRAME. Add new argument CTX.
3638 * server.h (struct eval_agent_expr_context): Declare.
3639 (agent_mem_read, agent_tsv_read): Update declaration.
3640 (agent_mem_read_string): Likewise.
3641 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3642 (add_traceframe_block): Add new argument TPOINT.
3643 Increase TPOINT->traceframe_usage.
3644 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3645 eval_tracepoint_agent_expr.
3646 (condition_true_at_tracepoint): Likewise.
3647 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3648 (agent_mem_read_string, agent_tsv_read): Likewise.
3650 2013-01-16 Yao Qi <yao@codesourcery.com>
3652 * linux-low.c (linux_resume_one_lwp): Don't check
3653 'lwp->bp_reinsert != 0'.
3655 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3656 Pedro Alves <palves@redhat.com>
3658 * lynx-low.c (ptrace_request_to_str): Define a temporary
3659 macro and use it to simplify this function's implementation.
3661 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3663 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3666 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3668 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3670 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3672 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3674 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3676 * lynx-low.c (lynx_resume): Use the resume_info parameter
3677 to determine the ptid for the lynx_ptrace call, unless
3678 it is equal to minus_one_ptid, in which case we use the
3679 ptid of the current_inferior.
3680 (lynx_wait_1): After having received a thread create/exit
3681 event, resume the inferior's execution using the signaling
3682 thread's ptid, rather than the old ptid.
3684 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3686 * lynx-low.c (lynx_resume): Delete variable ret.
3688 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3690 * gdbreplay.c (gdbreplay_version): Update copyright year.
3691 * server.c (gdbserver_version): Likewise.
3693 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3695 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3698 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3700 * lynx-low.c (ptrace_request_to_str): Add handling for
3703 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3705 * lynx-low.c (lynx_attach): Delete variable new_process.
3707 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3709 * lynx-low.c (lynx_create_inferior): Delete variable
3712 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3714 * lynx-low.c (ptrace_request_to_str): Do not handle
3715 PTRACE_GETTHREADLIST if this macro does not exist.
3717 2012-12-15 Yao Qi <yao@codesourcery.com>
3719 * Makefile.in (OBS): Add notif.o.
3720 * notif.c, notif.h: New.
3721 * server.c: Include "notif.h".
3722 (struct vstop_notif) <next>: Remove.
3724 (queue_stop_reply): Update.
3725 (push_event, send_next_stop_reply): Remove.
3726 (discard_queued_stop_replies): Update.
3727 (notif_stop): New variable.
3728 (handle_v_stopped): Remove.
3729 (handle_v_requests): Don't call handle_v_stopped. Call
3730 handle_ack_notif instead.
3731 (queue_stop_reply_callback): Call notif_event_enque instead
3732 of queue_stop_reply.
3733 (handle_status): Don't call send_next_stop_reply, call
3734 notif_write_event instead.
3735 (kill_inferior_callback): Likewise.
3736 (detach_or_kill_inferior_callback): Likewise.
3737 (main): Call initialize_notif.
3738 (process_serial_event): Call QUEUE_is_empty.
3739 (handle_target_event): Call notif_push instead of push event.
3740 * server.h (push_event): Remove declaration.
3742 2012-12-10 Tom Tromey <tromey@redhat.com>
3744 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3745 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3748 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3749 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3750 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3751 (amd64-linux-ipa.o, ax.o): Rewrite.
3752 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3753 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3754 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3755 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3756 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3757 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3758 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3759 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3760 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3761 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3762 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3763 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3764 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3765 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3766 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3767 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3768 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3769 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3770 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3771 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3772 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3773 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3774 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3775 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3776 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3777 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3778 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3779 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3780 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3781 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3782 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3783 (reg-tilegx.o): Remove.
3784 (all_object_files): New macro.
3785 Include .deps files.
3786 * aclocal.m4, configure: Rebuild.
3787 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3788 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3789 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3791 2012-12-05 Tom Tromey <tromey@redhat.com>
3794 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3796 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3798 * configure.ac: Check for linux/perf_event.h.
3799 * config.in: Regenerated.
3800 * configure: Regenerated.
3802 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3804 * hostio.c (handle_readlink): Decrease buffer size
3805 parameter passed to readlink by one byte.
3807 2012-11-26 Yao Qi <yao@codesourcery.com>
3809 * configure.ac (build_warnings): Append '-Wempty-body'.
3810 * configure: Regenerated.
3811 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3814 2012-11-15 Pierre Muller <muller@sourceware.org>
3816 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3817 * config.in: Regenerate.
3818 * configure: Regenerate.
3819 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3820 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3821 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3822 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3824 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3825 instead of <sys/wait.h> header.
3826 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3828 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3830 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3831 (various make rules): Remove -DGDBSERVER
3833 2012-11-09 Yao Qi <yao@codesourcery.com>
3835 * spu-low.c (current_ptid): Move it to ..
3836 * gdbthread.h: ... here. New.
3837 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3838 * server.c (myresume, process_serial_event): Likewise.
3839 * thread-db.c (thread_db_find_new_threads): Likewise.
3840 * tracepoint.c (run_inferior_command): Likewise.
3842 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3844 * server.c (handle_search_memory_1): Include access length in
3847 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3849 * linux-crisv32-low.c: Fix compile errors.
3851 2012-09-04 Yao Qi <yao@codesourcery.com>
3853 * tracepoint.c (cmd_qtsv): Adjust debug message.
3854 Don't check CUR_TPOINT.
3856 2012-08-28 Yao Qi <yao@codesourcery.com>
3858 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3859 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3860 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3861 Remove declarations of xmalloc, xreallloc, xstrdup and
3863 * Makefile.in (libiberty_h): New.
3864 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3865 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3867 2012-08-23 Yao Qi <yao@codesourcery.com>
3869 * server.h: Remove declaration of 'xsnprintf'.
3871 2012-08-22 Keith Seitz <keiths@redhat.com>
3873 * server.h: Include build-gnulib-gbserver/config.h.
3874 * gdbreplay.c: Likewise.
3876 2012-08-08 Doug Evans <dje@google.com>
3878 * Makefile.in (SFILES): Add gdb_vecs.c.
3879 (OBS): Add gdb_vecs.o.
3880 (gdb_vecs_h, host_defs_h): New variables.
3881 (thread-db.o): Add $(gdb_vecs_h) dependency.
3882 (gdb_vecs.o): New rule.
3883 * thread-db.c: #include "gdb_vecs.h".
3884 (thread_db_load_search): Use a vector to iterate over path elements.
3885 Handle text appearing after "$pdir".
3887 * configure.ac: Add check for strstr.
3888 * config.in: Regenerate.
3889 * configure: Regenerate.
3891 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3893 * hostio.c (handle_pread): If pread fails, fall back to attempting
3895 (handle_pwrite): Likewise for pwrite.
3897 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3899 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3900 between unsupported TYPE and unimplementable ADDR/LEN combination.
3901 (arm_insert_point): Act on new return value.
3903 2012-07-31 Pedro Alves <palves@redhat.com>
3905 * server.c (process_point_options): Only skip tokens if we find
3906 one that is unrecognized. Don't treat 'X' specially while
3907 skipping unrecognized tokens.
3909 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3911 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3912 to 4-byte-align HW breakpoint addresses for Thumb.
3914 2012-07-27 Yao Qi <yao@codesourcery.com>
3918 * server.h: Declare gdb_agent_about_to_close.
3919 * target.c (kill_inferior): Include "agent.h".
3920 New. Send command 'kill'.
3921 * target.h (kill_inferior): Removed macro.
3922 * tracepoint.c (gdb_agent_about_to_close): New.
3923 (gdb_agent_helper_thread): Handle command 'close'.
3924 Wait endlessly until the inferior stops.
3925 Install gdb_agent_remove_socket to atexit hook.
3926 (agent_socket_name): New static variable.
3927 (gdb_agent_socket_init): Replace local variable 'name' with
3928 'agent_socket_name'.
3929 (gdb_agent_remove_socket): New.
3931 2012-07-27 Yao Qi <yao@codesourcery.com>
3933 * server.c (process_point_options): Stop at 'X' when parsing.
3935 2012-07-19 Michael Eager <eager@eagercon.com>
3937 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3939 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3940 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3941 hardware breakpoint.
3943 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3945 * gdbserver/linux-low.c (initialize_low): Call
3946 linux_ptrace_init_warnings.
3948 2012-07-02 Doug Evans <dje@google.com>
3950 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3953 2012-07-02 Stan Shebs <stan@codesourcery.com>
3955 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3956 (ax.o): Add it to build rule.
3958 (OBS): Add format.o.
3959 (IPA_OBS): Add format.o.
3960 * server.c (handle_query): Claim support for breakpoint commands.
3961 (process_point_options): Add command case.
3962 (process_serial_event): Leave running if there are printfs in
3964 * mem-break.h (any_persistent_commands): Declare.
3965 (add_breakpoint_commands): Declare.
3966 (gdb_no_commands_at_breakpoint): Declare.
3967 (run_breakpoint_commands): Declare.
3968 * mem-break.c (struct point_command_list): New struct.
3969 (struct breakpoint): New field command_list.
3970 (any_persistent_commands): New function.
3971 (add_commands_to_breakpoint): New function.
3972 (add_breakpoint_commands): New function.
3973 (gdb_no_commands_at_breakpoint): New function.
3974 (run_breakpoint_commands): New function.
3975 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3977 * ax.c: Include format.h.
3978 (ax_printf): New function.
3979 (gdb_eval_agent_expr): Add printf opcode.
3981 2012-06-13 Yao Qi <yao@codesourcery.com>
3983 * server.c (start_inferior): Remove duplicated writes to fields
3984 'last_resume_kind' and 'last_status' of 'current_inferior'.
3986 2012-06-12 Yao Qi <yao@codesourcery.com>
3987 Pedro Alves <palves@redhat.com>
3989 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3991 * server.c (handle_v_cont): Extend comment.
3993 2012-06-11 Yao Qi <yao@codesourcery.com>
3995 * linux-low.c (linux_attach): Add 'static'.
3997 2012-06-06 Yao Qi <yao@codesourcery.com>
3999 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4001 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4003 Fix gcc -flto compilation warning.
4004 * server.c (main): Make variable multi_mode and attach volatile.
4006 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4008 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4009 if the platform doesn't know about it.
4011 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4013 * Makefile.in (SFILES): Add linux-tile-low.c.
4014 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4015 * configure.srv: Handle tilegx-*-linux*.
4016 * linux-tile-low.c: New file.
4018 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4020 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4022 2012-05-24 Pedro Alves <palves@redhat.com>
4026 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4028 2012-05-24 Pedro Alves <palves@redhat.com>
4032 Replace target_signal with gdb_signal throughout.
4034 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4036 * linux-low.c (linux_store_registers): Avoid the copying sequence
4037 when no data has been retrieved by ptrace.
4039 2012-05-22 Will Deacon <will.deacon@arm.com>
4041 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4042 Include asm/ptrace.h.
4043 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4046 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4048 * linux-low.c (linux_store_registers): Don't re-retrieve data
4049 with ptrace that has already been obtained from /proc. Always
4050 copy any data retrieved with ptrace to the buffer supplied.
4052 2012-05-11 Yao Qi <yao@codesourcery.com>
4053 Pedro Alves <palves@redhat.com>
4055 * linux-low.c (enum stopping_threads_kind): New.
4056 (stopping_threads): Change type to `enum stopping_threads_kind'.
4057 (handle_extended_wait): If stopping and suspending threads, leave
4058 the new_lwp suspended too.
4059 (linux_wait_for_event): Adjust.
4060 (stop_all_lwps): Set `stopping_threads' to
4061 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4062 whether we're suspending threads or just stopping them. Assert no
4065 2012-04-29 Yao Qi <yao@codesourcery.com>
4067 * server.h: Move some code to ...
4068 * gdbthread.h: ... here. New.
4069 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4070 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4071 (nto-low.o, win32-low.o): Likewise.
4072 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4073 * regcache.c, remote-utils.c, server.c: Likewise.
4074 * target.c, tracepoint.c, win32-low.c: Likewise.
4076 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4078 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4079 (PTRACE_ARG4_TYPE): Likewise.
4080 (PTRACE_XFER_TYPE): Likewise.
4081 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4082 ptrace to PTRACE_ARG3_TYPE.
4083 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4084 (PTRACE_ARG4_TYPE): Likewise.
4085 (PTRACE_XFER_TYPE): Likewise.
4086 (linux_detach_one_lwp): Cast fourth argument of
4087 ptrace to long then PTRACE_ARG4_TYPE.
4088 (regsets_fetch_inferior_registers): Cast third argument of
4089 ptrace to long then PTRACE_ARG3_TYPE.
4090 (regsets_store_inferior_registers): Likewise.
4092 2012-04-20 Pedro Alves <palves@redhat.com>
4094 * configure: Regenerate.
4096 2012-04-19 Pedro Alves <palves@redhat.com>
4098 * Makefile.in (GNULIB_BUILDDIR): New.
4099 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4100 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4101 (all, install-only, uninstall, clean-info, all-lib, clean): No
4102 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4103 (maintainer-clean realclean distclean): Use subdir_do.
4105 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4106 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4107 * acinclude.m4: Include acx_configure_dir.m4.
4108 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4109 calls. Call AC_PROG_RANLIB. Configure gnulib using
4112 (GNULIB_STDINT_H): Adjust.
4113 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4114 * gdbreplay.c: Include build-gnulib/config.h.
4115 * server.h: Likewise.
4116 * aclocal.m4: Regenerate.
4117 * config.in: Regenerate.
4118 * configure: Regenerate.
4120 2012-04-19 Pedro Alves <palves@redhat.com>
4122 * Makefile.in (LIBGNU, INCGNU): Adjust.
4123 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4124 (all, install-only, uninstall, clean-info, all-lib, clean)
4125 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4126 * configure.ac: Adjust AC_OUTPUT output.
4127 * aclocal.m4: Regenerate.
4128 * configure: Regenerate.
4130 2012-04-19 Pedro Alves <palves@redhat.com>
4132 * Makefile.in (generated_files): New.
4133 (server_h): Remove the explicit dependency on config.h, and depend
4134 on $generated_files.
4136 2012-04-19 Pedro Alves <palves@redhat.com>
4138 * Makefile.in (INCGNU): Add -Ignulib.
4140 2012-04-19 Pedro Alves <palves@redhat.com>
4142 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4143 (INCGNU): ... this, and spell out -I here.
4144 (GNULIB_LIB): Rename to ...
4146 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4148 2012-04-19 Pedro Alves <palves@redhat.com>
4150 * config.in: Regenerate.
4152 2012-04-19 Pedro Alves <palves@redhat.com>
4154 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4155 * server.h (memmem): Remove declaration.
4156 * config.in: Regenerate.
4157 * configure: Regenerate.
4159 2012-04-19 Yao Qi <yao@codesourcery.com>
4161 * Makefile.in (SFILES): Add common/vec.c.
4165 2012-04-19 Yao Qi <yao@codesourcery.com>
4167 * remote-utils.c (prepare_resume_reply): Replace with macro
4168 target_core_of_thread.
4169 * server.c (handle_qxfer_threads_proper): Likewise.
4170 * target.h (traget_core_of_thread): New macro.
4172 2012-04-18 Pedro Alves <palves@redhat.com>
4174 * aclocal.m4: Regenerate.
4175 * configure: Regenerate.
4177 2012-04-16 Yao Qi <yao@codesourcery.com>
4179 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4180 duplicated on address.
4182 2012-04-16 Yao Qi <yao@codesourcery.com>
4184 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4185 (struct tracepoint_action_ops) <send>: New field.
4186 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4187 (agent_expr_send, x_tracepoint_action_send): New.
4188 (l_tracepoint_action_send): New.
4189 (cmd_qtdp): Download and install tracepoint
4190 according to `use_agent'.
4191 (run_inferior_command): Add one more parameter `len'.
4193 (tracepoint_send_agent): New.
4194 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4196 2012-04-16 Yao Qi <yao@codesourcery.com>
4198 * tracepoint.c (download_tracepoints): Moved to ...
4199 (cmd_qtstart): ... here.
4201 2012-04-14 Yao Qi <yao@codesourcery.com>
4203 * tracepoint.c: Include inttypes.h.
4204 (struct collect_memory_action): Use sized types.
4205 (struct tracepoint): Likewise.
4206 (cmd_qtdp, stop_tracing): Update print specifiers.
4207 (cmd_qtp, response_tracepoint): Likewise.
4208 (collect_data_at_tracepoint): Likewise.
4209 (collect_data_at_step): Likewise.
4211 2012-04-14 Yao Qi <yao@codesourcery.com>
4213 Import gnulib module inttypes.
4214 * aclocal.m4, config.in, configure: Regenerated.
4216 2012-04-14 Yao Qi <yao@codesourcery.com>
4218 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4219 Makefile and config.status at last.
4221 2012-04-13 Yao Qi <yao@codesourcery.com>
4223 * tracepoint.c: Include stdint.h unconditionally.
4225 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4227 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4228 on BFD_HAVE_SYS_PROCFS_TYPE.
4229 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4230 * configure: Regenerate.
4231 * config.in: Likewise.
4233 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4235 * Makefile.in (clean): Also remove x32.c x32-linux.c
4236 x32-avx.c x32-avx-linux.c.
4237 (x32.o): New target.
4239 (x32-linux.o): Likewise.
4240 (x32-linux.c): Likewise.
4241 (x32-avx.o): Likewise.
4242 (x32-avx.c): Likewise.
4243 (x32-avx-linux.o): Likewise.
4244 (x32-avx-linux.c): Likewise.
4246 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4247 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4248 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4249 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4250 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4251 i386/x32-avx-linux.xml.
4253 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4254 (init_registers_x32_avx_linux): Likwise.
4255 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4256 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4258 2012-04-13 Pedro Alves <palves@redhat.com>
4260 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4261 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4262 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4263 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4266 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4268 * linux-x86-low.c (compat_x32_clock_t): New.
4269 (compat_x32_siginfo_t): Likewise.
4270 (compat_x32_siginfo_from_siginfo): Likewise.
4271 (siginfo_from_compat_x32_siginfo): Likewise.
4272 (linux_is_elf64): Likewise.
4273 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4274 and siginfo_from_compat_x32_siginfo for x32.
4275 (x86_arch_setup): Set linux_is_elf64.
4277 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4280 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4282 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4283 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4284 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4285 compatible with process.
4287 2012-04-12 Yao Qi <yao@codesourcery.com>
4289 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4290 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4291 (install-only, install-info, clean): Handle sub dir gnulib.
4292 (all-lib, am--refresh): New targets.
4293 (memmem.o): Remove target.
4294 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4295 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4296 (AC_REPLACE_FUNCS): Remove memmem.
4297 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4298 (AC_OUTPUT): Generate Makefile in gnulib/.
4299 * aclocal.m4, config.in, configure: Regenerated.
4301 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4303 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4305 2012-04-05 Pedro Alves <palves@redhat.com>
4307 -Werror=strict-aliasing
4309 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4312 2012-04-04 Pedro Alves <palves@redhat.com>
4314 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4315 (sparc_store_gregset_from_stack, sparc_store_gregset)
4316 (sparc_breakpoint_at): Fix formatting.
4318 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4320 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4322 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4323 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4324 * config.in: Regenerate.
4325 * configure: Likewise.
4327 2012-03-29 Pedro Alves <palves@redhat.com>
4329 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4330 Correct ptrace arguments.
4332 2012-03-28 Pedro Alves <palves@redhat.com>
4334 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4335 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4336 (IA64_FR1_REGNUM): New defines.
4337 (ia64_fetch_register): New.
4338 (the_low_target): Install it.
4339 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4341 * linux-low.c (linux_fetch_registers): Try the
4342 the_low_target.fetch_register hook first.
4344 * linux-arm-low.c (the_low_target): Adjust.
4345 * linux-bfin-low.c (the_low_target): Adjust.
4346 * linux-cris-low.c (the_low_target): Adjust.
4347 * linux-crisv32-low.c (the_low_target): Adjust.
4348 * linux-m32r-low.c (the_low_target): Adjust.
4349 * linux-m68k-low.c (the_low_target): Adjust.
4350 * linux-mips-low.c (the_low_target): Adjust.
4351 * linux-ppc-low.c (the_low_target): Adjust.
4352 * linux-s390-low.c (the_low_target): Adjust.
4353 * linux-sh-low.c (the_low_target): Adjust.
4354 * linux-sparc-low.c (the_low_target): Adjust.
4355 * linux-tic6x-low.c (the_low_target): Adjust.
4356 * linux-x86-low.c (the_low_target): Adjust.
4357 * linux-xtensa-low.c (the_low_target): Adjust.
4359 2012-03-26 Pedro Alves <palves@redhat.com>
4361 * server.c (handle_qxfer_libraries): Don't bail early if
4362 the_target->qxfer_libraries_svr4 is not NULL.
4364 2012-03-26 Pedro Alves <palves@redhat.com>
4366 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4368 2012-03-23 Pedro Alves <palves@redhat.com>
4370 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4371 "library-list-svr4" element's start tag when the the DSO list is
4374 2012-03-23 Pedro Alves <palves@redhat.com>
4376 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4377 a variable whose type size is the same as the inferior's pointer
4380 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4382 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4384 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4385 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4386 * linux-low.h: Include <signal.h>.
4387 (struct siginfo): Remove forward declaration.
4388 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4391 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4393 * .gitignore: Ignore more files.
4395 2012-03-19 Pedro Alves <palves@redhat.com>
4396 Jan Kratochvil <jan.kratochvil@redhat.com>
4398 * server.c (cont_thread, general_thread): Add describing comments.
4399 (start_inferior): Clear `cont_thread'.
4400 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4403 2012-03-15 Yao Qi <yao@codesourcery.com>
4405 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4407 (cmd_qtdp): ... here.
4409 2012-03-15 Yao Qi <yao@codesourcery.com>
4411 * tracepoint.c (struct tracepoint_action_ops): New.
4412 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4413 (m_tracepoint_action_download): New.
4414 (r_tracepoint_action_download): New.
4415 (x_tracepoint_action_download): New.
4416 (l_tracepoint_action_download): New.
4417 (add_tracepoint_action): Install `action->ops' according type.
4418 (download_tracepoint_1): Move code `download' function pointer
4419 of various tracepoint_action_ops.
4421 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4423 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4424 linux_ptrace_attach_warnings.
4426 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4428 * Makefile.in (linux-ptrace.o): New.
4429 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4430 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4431 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4432 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4433 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4435 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4437 2012-03-08 Yao Qi <yao@codesourcery.com>
4438 Pedro Alves <palves@redhat.com>
4440 Fix PR server/13392.
4441 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4443 * tracepoint.c (remove_tracepoint): New.
4444 (cmd_qtdp): Call remove_tracepoint when failed to install.
4446 2012-03-07 Pedro Alves <palves@redhat.com>
4448 * linux-low.c (get_detach_signal): New.
4449 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4450 Pass on pending signals to PTRACE_DETACH. Check the result of the
4452 * server.c (program_signals, program_signals_p): New.
4453 (handle_general_set): Handle QProgramSignals.
4454 * server.h (program_signals, program_signals_p): Declare.
4456 2012-03-05 Pedro Alves <palves@redhat.com>
4457 Jan Kratochvil <jan.kratochvil@redhat.com>
4459 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4462 2012-03-03 Yao Qi <yao@codesourcery.com>
4464 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4465 agent_look_up_symbols.
4467 2012-03-03 Yao Qi <yao@codesourcery.com>
4469 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4470 (linux-x86-low.o): Likewise.
4471 * server.h: Remove in_process_agent_loaded.
4472 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4476 2012-03-03 Yao Qi <yao@codesourcery.com>
4478 * tracepoint.c (gdb_agent_capability): New global.
4479 (in_process_agent_loaded_ust): Renamed to
4480 `in_process_agent_supports_ust'.
4482 (in_process_agent_supports_ust): Call agent_capability_check.
4483 (clear_installed_tracepoints): Assert that agent supports
4486 2012-03-03 Yao Qi <yao@codesourcery.com>
4488 * linux-low.c (linux_supports_agent): New.
4489 (linux_target_ops): Initialize field `supports_agent' with
4490 linux_supports_agent.
4491 * target.h (struct target_ops) <supports_agent>: New.
4492 (target_supports_agent): New macro.
4493 * server.c (handle_general_set): Handle packet 'QAgent'.
4494 (handle_query): Send `QAgent+'.
4495 * Makefile.in (server.o): Depends on agent.h.
4497 2012-03-03 Yao Qi <yao@codesourcery.com>
4499 * Makefile.in (OBS): Add agent.o.
4500 Add new rule for agent.o.
4501 Track dependence of tracepoint.c on agent.h.
4502 * tracepoint.c (run_inferior_command_1):
4503 (run_inferior_command): Call agent_run_command.
4504 (gdb_ust_connect_sync_socket): Deleted. Move it to
4506 (resume_thread, stop_thread): Likewise.
4507 (gdb_ust_socket_init): Renamed to ...
4508 (gdb_agent_socket_init): ... New.
4509 (gdb_ust_thread): Renamed to ...
4510 (gdb_agent_helper_thread): ... New.
4511 (gdb_ust_init): Move some code to ...
4512 (gdb_agent_init): ... here. New.
4513 [HAVE_UST]: Call gdb_ust_init.
4514 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4515 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4516 * config.in, configure: Regenerated.
4518 2012-03-02 Pedro Alves <palves@redhat.com>
4520 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4521 * linux-low.c (struct simple_pid_list): New.
4522 (stopped_pids): New a struct simple_pid_list pointer.
4523 (add_to_pid_list, pull_pid_from_list): New.
4524 (handle_extended_wait): Don't assume the first signal new children
4525 report is SIGSTOP. Adjust call to pull_pid_from_list.
4526 (linux_wait_for_lwp): Adjust.
4528 2012-03-02 Yao Qi <yao@codesourcery.com>
4530 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4533 2012-03-02 Yao Qi <yao@codesourcery.com>
4535 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4536 `stop_pc' and `tpoint'. Update caller.
4538 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4540 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4541 * linux-low.c (use_linux_regsets): New macro.
4542 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4543 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4544 (linux_register_in_regsets): New function.
4545 (usr_fetch_inferior_registers): Skip registers covered by
4547 (usr_store_inferior_registers): Likewise.
4548 (usr_fetch_inferior_registers): New macro.
4549 (usr_store_inferior_registers): Likewise.
4550 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4551 (linux_store_registers): Likewise.
4552 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4554 (init_registers_mips64_dsp_linux): Likewise.
4555 (init_registers_mips_linux): New macro.
4556 (init_registers_mips_dsp_linux): Likewise.
4557 (mips_dsp_num_regs): Likewise.
4558 (DSP_BASE, DSP_CONTROL): New fallback macros.
4559 (mips_base_regs): New macro.
4560 (mips_regmap): Use it. Fix the size.
4561 (mips_dsp_regmap): New variable.
4562 (mips_dsp_regset_bitmap): Likewise.
4563 (mips_arch_setup): New function.
4564 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4566 (mips_cannot_store_register): Likewise.
4567 (the_low_target): Update .arch_setup, .num_regs and .regmap
4568 initializers. Add .regset_bitmap initializer.
4569 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4571 * linux-bfin-low.c (the_low_target): Likewise.
4572 * linux-cris-low.c (the_low_target): Likewise.
4573 * linux-crisv32-low.c (the_low_target): Likewise.
4574 * linux-ia64-low.c (the_low_target): Likewise.
4575 * linux-m32r-low.c (the_low_target): Likewise.
4576 * linux-m68k-low.c (the_low_target): Likewise.
4577 * linux-ppc-low.c (the_low_target): Likewise.
4578 * linux-s390-low.c (the_low_target): Likewise.
4579 * linux-sh-low.c (the_low_target): Likewise.
4580 * linux-sparc-low.c (the_low_target): Likewise.
4581 * linux-tic6x-low.c (the_low_target): Likewise.
4582 * linux-x86-low.c (the_low_target): Likewise.
4583 * linux-xtensa-low.c (the_low_target): Likewise.
4584 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4585 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4586 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4588 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4589 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4591 2012-02-29 Yao Qi <yao@codesourcery.com>
4592 Pedro Alves <palves@redhat.com>
4594 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4595 `step_over_finished' is true.
4597 2012-02-27 Pedro Alves <palves@redhat.com>
4599 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4600 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4602 2012-02-27 Pedro Alves <palves@redhat.com>
4605 * linux-low.c (pid_is_stopped): New.
4606 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4608 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4610 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4613 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4615 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4617 2012-02-24 Luis Machado <lgustavo@codesourcery>
4619 * server.c (handle_query): Advertise support for target-side
4620 breakpoint condition evaluation.
4621 (process_point_options): New function.
4622 (process_serial_event): When inserting a breakpoint, check for
4623 a target-side condition that should be evaluated.
4625 * mem-break.c: Include regcache.h and ax.h.
4626 (point_cond_list_t): New data structure.
4627 (breakpoint) <cond_list>: New field.
4628 (find_gdb_breakpoint_at): Make non-static.
4629 (delete_gdb_breakpoint_at): Clear any target-side
4631 (clear_gdb_breakpoint_conditions): New function.
4632 (add_condition_to_breakpoint): Likewise.
4633 (add_breakpoint_condition): Likewise.
4634 (gdb_condition_true_at_breakpoint): Likewise.
4635 (gdb_breakpoint_here): Return result directly instead
4636 of going through a local variable.
4638 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4639 (clear_gdb_breakpoint_conditions): Likewise.
4640 (add_breakpoint_condition): Likewise.
4641 (gdb_condition_true_at_breakpoint): Likewise.
4643 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4644 (need_step_over_p): Take target-side breakpoint condition into
4647 2012-02-24 Luis Machado <lgustavo@codesourcery>
4649 * server.h: Include tracepoint.h.
4650 (agent_mem_read, agent_get_trace_state_variable_value,
4651 agent_set_trace_state_variable_value,
4652 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4653 get_set_tsv_func_addr): New prototypes.
4655 * ax.h: New include file.
4656 * ax.c: New source file.
4658 * tracepoint.c: Include ax.h.
4659 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4660 agent_expr, eval_result_type): Move to ax.h.
4661 (parse_agent_expr): Rename to ...
4662 (gdb_parse_agent_expr): ... this, make it non-static and move
4664 (unparse_agent_expr) Rename to ...
4665 (gdb_unparse_agent_expr): ... this, make it non-static and move
4667 (eval_agent_expr): Rename to ...
4668 (eval_tracepoint_agent_expr): ... this.
4669 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4670 forward declarations.
4671 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4672 (agent_get_trace_state_variable_value): New function.
4673 (agent_set_trace_state_variable_value): New function.
4674 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4675 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4676 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4677 (condition_true_at_tracepoint): Likewise.
4678 (parse_agent_expr): Rename to ...
4679 (gdb_parse_agent_expr): ... this and move to ax.c.
4680 (unparse_agent_expr): Rename to ...
4681 (gdb_unparse_agent_expr): ... this and move to ax.c.
4682 (gdb_agent_op_name): Move to ax.c.
4683 (eval_agent_expr): Rename to ...
4684 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4686 (eval_tracepoint_agent_expr): New function.
4687 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4689 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4691 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4692 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4693 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4694 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4695 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4696 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4697 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4698 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4699 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4700 (compile_bytecodes): Remove forward declaration.
4701 (is_goto_target): Move to ax.c.
4702 (compile_bytecodes): Move to ax.c and call
4703 agent_get_trace_state_variable_value (...) and
4704 agent_set_trace_state_variable_value (...).
4706 * Makefile.in: Update ax.c and IPA dependencies.
4708 2012-02-24 Pedro Alves <palves@redhat.com>
4710 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4711 (cmd_bigqtbuffer_circular): ... this. Only handle
4712 'QTBuffer:circular:'.
4713 (handle_tracepoint_general_set): Adjust.
4715 2012-02-16 Yao Qi <yao@codesourcery.com>
4717 * inferiors.c: Move code to ...
4718 * dll.c: .... here. New.
4719 * server.h: Declare clear_dlls.
4720 * Makefile.in (SFILES): Add dll.c.
4724 2012-02-11 Yao Qi <yao@codesourcery.com>
4726 * server.c: (handle_monitor_command): Add a new parameter
4728 (handle_query): Update caller.
4730 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4732 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4733 * configure, config.in: Regenerate.
4734 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4737 2012-02-02 Pedro Alves <palves@redhat.com>
4739 Try SIGKILL first, then PTRACE_KILL.
4740 * linux-low.c (linux_kill_one_lwp): New.
4741 (linux_kill_one_lwp): Rename to ...
4742 (kill_one_lwp_callback): ... this. Use the new
4745 2012-02-02 Pedro Alves <palves@redhat.com>
4747 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4750 2012-01-27 Pedro Alves <palves@redhat.com>
4752 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4753 (elf_64_file_p): Make static.
4754 (linux_pid_exe_is_elf_64_file): New.
4755 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4756 Delete declarations.
4757 (linux_pid_exe_is_elf_64_file): Declare.
4758 * linux-x86-low.c (x86_arch_setup): Use
4759 linux_pid_exe_is_elf_64_file.
4761 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4763 * linux-low.c (linux_wait_for_event_1): Rename to ...
4764 (linux_wait_for_event): ... here and merge it with former
4765 linux_wait_for_event - new variable wait_ptid, use it.
4766 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4768 2012-01-23 Pedro Alves <palves@redhat.com>
4770 * server.c (main): Avoid yet another case of infinite loop while
4771 detaching/killing after a longjmp.
4773 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4776 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4778 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4780 * hostio.c (handle_readlink): New function.
4781 (handle_vFile): Call it to handle "vFile:readlink" packets.
4783 2012-01-20 Pedro Alves <palves@redhat.com>
4784 Ulrich Weigand <ulrich.weigand@linaro.org>
4786 * server.c (handle_v_requests): Only support vAttach and vRun to
4787 start multiple processes when in extended protocol mode.
4789 2012-01-17 Pedro Alves <palves@redhat.com>
4791 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4792 memalign plus mprotect to allocate the scratch buffer.
4794 2012-01-13 Pedro Alves <palves@redhat.com>
4796 * server.c (attach_inferior): Clear `cont_thread'.
4798 2012-01-13 Pedro Alves <palves@redhat.com>
4800 * server.c (main): Avoid infinite loop while detaching/killing
4803 2012-01-09 Doug Evans <dje@google.com>
4805 * server.c (start_inferior): Set last_ptid in --wrapper case.
4807 2012-01-06 Yao Qi <yao@codesourcery.com>
4809 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4811 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4813 2012-01-04 Yao Qi <yao@codesourcery.com>
4815 * tracepoint.c (cmd_qtdp): Print debug message
4816 for static tracepoint.
4818 2012-01-04 Yao Qi <yao@codesourcery.com>
4820 * tracepoint.c (trace_vdebug): Differentiate debug message
4821 between gdbserver and IPA.
4823 2012-01-03 Yao Qi <yao@codesourcery.com>
4825 * tracepoint.c (tracepoint_was_hit): Don't collect for
4828 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4830 * terminal.h: Reformat copyright header.
4832 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4834 * server.c (gdbserver_version): Update copyright year.
4835 * gdbreplay.c (gdbreplay_version): Likewise.
4837 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4839 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4842 2011-12-18 Hui Zhu <teawater@gmail.com>
4843 * linux-low.c (linux_create_inferior): Save return value to ret.
4845 2011-12-18 Hui Zhu <teawater@gmail.com>
4847 * linux-low.c (linux_create_inferior): Save return value to ret.
4849 2011-12-16 Doug Evans <dje@google.com>
4851 * linux-low.c (linux_create_inferior): If stdio connection,
4852 redirect stdin from /dev/null, stdout to stderr.
4853 * remote-utils.c (remote_is_stdio): New static global.
4854 (remote_connection_is_stdio): New function.
4855 (remote_prepare): Handle stdio connection.
4856 (remote_open): Ditto.
4857 (remote_close): Don't close stdin for stdio connections.
4858 (read_prim,write_prim): New functions. Replace all calls to
4859 read/write to these.
4860 * server.c (main): Watch for "-" argument. Move call to
4861 remote_prepare before start_inferior.
4862 * server.h (STDIO_CONNECTION_NAME): New macro.
4863 (remote_connection_is_stdio): Declare.
4865 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4866 in debugging output.
4868 2011-12-15 Yao Qi <yao@codesourcery.com>
4870 * tracepoint.c: Include sys/syscall.h.
4871 (gdb_ust_thread): Remove preprocessor conditional.
4873 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4875 * linux-low.c (linux_detach_one_lwp): Call
4876 the_low_target.prepare_to_resume before detaching.
4878 2011-12-14 Yao Qi <yao@codesourcery.com>
4880 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4883 2011-12-14 Yao Qi <yao@codesourcery.com>
4885 * i386-low.c (i386_low_stopped_data_address): Initialize local
4888 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4892 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4893 DR_CONTROL unless necessary. Extend comments.
4894 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4895 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4897 2011-12-13 Yao Qi <yao@codesourcery.com>
4899 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4901 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4903 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4905 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4906 Print new debug message for such case.
4908 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4910 Fix overlapping memcpy.
4911 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4912 the read_inferior_memory transfer.
4913 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4914 write_inferior_memory transfer.
4915 (set_fast_tracepoint_jump): New variable buf. Use it for the
4916 read_inferior_memory and write_inferior_memory transfers.
4917 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4918 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4919 Use it for the write_inferior_memory transfer.
4920 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4923 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4925 * linux-low.c (fetch_register, store_register): Make code
4926 consistent, fix formatting.
4928 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4930 * linux-low.c (usr_store_inferior_registers): Factor out code
4931 to handle individual registers into...
4932 (store_register): ... this new function.
4934 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4936 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4937 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4938 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4939 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4940 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4941 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4942 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4943 (srv_xmlfiles): Add new XML files.
4945 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4947 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4948 (init_registers_s390_linux32v1): Add prototype.
4949 (init_registers_s390_linux32v2): Likewise.
4950 (init_registers_s390_linux64v1): Likewise.
4951 (init_registers_s390_linux64v2): Likewise.
4952 (init_registers_s390x_linux64v1): Likewise.
4953 (init_registers_s390x_linux64v2): Likewise.
4954 (s390_num_regs): Increment to 52.
4955 (s390_regmap): Add orig_r2 register.
4956 (s390_num_regs_3264): Increment to 68.
4957 (s390_regmap_3264): Add orig_r2 register.
4958 (s390_collect_ptrace_register): Handle orig_r2 register.
4959 (s390_supply_ptrace_register): Likewise.
4960 (s390_fill_last_break): New function.
4961 (s390_store_last_break): Likewise.
4962 (s390_fill_system_call): New function.
4963 (s390_store_system_call): Likewise.
4964 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4966 (s390_check_regset): New function.
4967 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4968 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4969 Update target_regsets for available register sets.
4971 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4972 Jan Kratochvil <jan.kratochvil@redhat.com>
4974 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4975 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4977 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4978 * linux-low.h (struct process_info_private): New member r_debug.
4979 * server.c (handle_qxfer_libraries): Call
4980 the_target->qxfer_libraries_svr4.
4981 (handle_qxfer_libraries_svr4): New function.
4982 (qxfer_packets): New entry "libraries-svr4".
4983 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4984 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4985 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4986 PACKET_qXfer_libraries_svr4.
4988 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4990 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4991 PSW address/mask between 8-byte and 16-byte formats.
4992 (s390_supply_ptrace_register): Likewise.
4993 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4994 basic addressing mode bit.
4996 2011-11-24 Stan Shebs <stan@codesourcery.com>
4998 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5000 2011-11-17 Stan Shebs <stan@codesourcery.com>
5002 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5003 (tracing_start_time): New global.
5004 (tracing_stop_time): New global.
5005 (tracing_user_name): New global.
5006 (tracing_notes): New global.
5007 (tracing_stop_note): New global.
5008 (cmd_qtstart): Set traceframe_usage, start_time.
5009 (stop_tracing): Set stop_time.
5010 (cmd_qtstatus): Report additional status.
5011 (cmd_qtp): New function.
5012 (handle_tracepoint_query): Call it.
5013 (cmd_qtnotes): New function.
5014 (handle_tracepoint_general_set): Call it.
5015 (get_timestamp): Rename from tsv_get_timestamp.
5017 2011-11-14 Stan Shebs <stan@codesourcery.com>
5018 Kwok Cheung Yeung <kcy@codesourcery.com>
5020 * linux-x86-low.c (small_jump_insn): New.
5021 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5022 trampoline and error message, build a trampoline and issue a small
5023 jump instruction to it.
5024 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5025 trampoline and error message.
5026 (x86_get_min_fast_tracepoint_insn_len): New.
5027 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5028 * linux-low.h (struct linux_target_ops): Add arguments to
5029 install_fast_tracepoint_jump_pad operation, add new operation.
5030 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5032 (linux_get_min_fast_tracepoint_insn_len): New function.
5033 (linux_target_op): Add new operation.
5034 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5035 (gdb_trampoline_buffer_end): Ditto.
5036 (gdb_trampoline_buffer_error): Ditto.
5037 (struct ipa_sym_addresses): Add fields for new IPA variables.
5038 (symbol_list): Add entries for new IPA variables.
5039 (struct tracepoint): Add fields to hold the address range of the
5040 trampoline used by the tracepoint.
5041 (trampoline_buffer_head): New static variable.
5042 (trampoline_buffer_tail): Ditto.
5043 (claim_trampoline_space): New function.
5044 (have_fast_tracepoint_trampoline_buffer): New function.
5045 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5047 (install_fast_tracepoint): Ditto, also add error buffer argument.
5048 (cmd_qtminftpilen): New function.
5049 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5050 (fast_tracepoint_from_trampoline_address): New function.
5051 (fast_tracepoint_collecting): Handle trampoline as part of jump
5053 (set_trampoline_buffer_space): New function.
5054 (initialize_tracepoint): Initialize new IPA variables.
5055 * target.h (struct target_ops): Add arguments to
5056 install_fast_tracepoint_jump_pad operation, add new
5057 get_min_fast_tracepoint_insn_len operation.
5058 (target_get_min_fast_tracepoint_insn_len): New.
5059 (install_fast_tracepoint_jump_pad): Add arguments.
5060 * server.h (IPA_BUFSIZ): Define.
5061 * linux-i386-ipa.c: Include extra header files.
5062 (initialize_fast_tracepoint_trampoline_buffer): New function.
5063 (initialize_low_tracepoint): Call it.
5064 * server.h (set_trampoline_buffer_space): Declare.
5065 (claim_trampoline_space): Ditto.
5066 (have_fast_tracepoint_trampoline_buffer): Ditto.
5068 2011-11-14 Yao Qi <yao@codesourcery.com>
5070 * server.c (handle_query): Handle InstallInTrace for qSupported.
5071 * tracepoint.c (add_tracepoint): Sort list.
5072 (install_tracepoint, download_tracepoint): New.
5073 (cmd_qtdp): Call them to install and download tracepoints.
5074 (sort_tracepoints): Removed.
5075 (cmd_qtstart): Update.
5077 2011-11-14 Yao Qi <yao@codesourcery.com>
5079 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5080 * mem-break.h: Declare.
5081 * tracepoint.c (cmd_qtstart): Move some code to ...
5082 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5084 (download_tracepoints): Move some code to ...
5085 (download_tracepoint_1): ... here. New.
5087 2011-11-08 Yao Qi <yao@codesourcery.com>
5089 * remote-utils.c (relocate_instruction): A comment fix.
5091 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5093 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5094 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5095 dr_status_mirror and dr_control_mirror from debug_reg_state.
5096 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5097 (i386_initial_stuff): Remove use of deleted globals.
5098 (i386_get_thread_context, i386_set_thread_context,
5099 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5100 from debug_reg_state.
5102 2011-11-05 Yao Qi <yao@codesourcery.com>
5104 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5105 address as TPOINT's.
5107 2011-11-02 Stan Shebs <stan@codesourcery.com>
5109 * tracepoint.c (agent_mem_read_string): New function.
5110 (eval_agent_expr): Call it for tracenz.
5111 * server.c (handle_query): Report support for tracenz.
5113 2011-11-02 Yao Qi <yao@codesourcery.com>
5115 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5117 2011-11-02 Yao Qi <yao@codesourcery.com>
5119 * target.h: Fix a typo in comment.
5121 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5123 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5124 clobber the breakpoints' shadows with fast tracepoint jumps.
5125 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5126 * target.c (write_inferior_memory): Also pass MYADDR down to
5129 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5131 * configure.ac: Check support for personality routine.
5132 * configure: Regenerate.
5133 * config.in: Likewise.
5134 * linux-low.c: Include <sys/personality.h>.
5135 Define ADDR_NO_RANDOMIZE if necessary.
5136 (linux_create_inferior): Disable address space randomization when
5137 forking inferior, if requested.
5138 (linux_supports_disable_randomization): New function.
5139 (linux_target_ops): Install it.
5140 * server.h (disable_randomization): Declare.
5141 * server.c (disable_randomization): New global variable.
5142 (handle_general_set): Handle QDisableRandomization.
5143 (handle_query): Likewise for qSupported.
5144 (main): Support --disable-randomization and --no-disable-randomization
5145 command line arguments.
5146 * target.h (struct target_ops): Add supports_disable_randomization.
5147 (target_supports_disable_randomization): New macro.
5149 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5151 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5153 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5154 [!PT_GETDSBT] (target_loadmap): New definition.
5155 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5156 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5157 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5158 and PT_GETDSBT to LINUX_LOADMAP.
5159 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5160 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5162 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5164 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5165 (arm_linux_hwbp_cap): New static variable.
5166 (arm_linux_get_hwbp_cap): Replace by ...
5167 (arm_linux_init_hwbp_cap): ... this new function.
5168 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5169 (arm_linux_get_hw_watchpoint_count): Likewise.
5170 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5171 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5172 (arm_prepare_to_resume): Use perror_with_name instead of error.
5174 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5176 * linux-arm-low.c: Include <signal.h>.
5177 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5178 (struct arm_linux_hwbp_cap): New data type.
5179 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5180 (struct arm_linux_hw_breakpoint): New data type.
5181 (MAX_BPTS, MAX_WPTS): Define.
5182 (struct arch_process_info, struct arch_lwp_info): New data types.
5183 (arm_linux_get_hwbp_cap): New function.
5184 (arm_linux_get_hw_breakpoint_count): Likewise.
5185 (arm_linux_get_hw_watchpoint_count): Likewise.
5186 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5187 (arm_hwbp_control_initialize): Likewise.
5188 (arm_hwbp_control_is_enabled): Likewise.
5189 (arm_hwbp_control_is_initialized): Likewise.
5190 (arm_hwbp_control_disable): Likewise.
5191 (arm_linux_hw_breakpoint_equal): Likewise.
5192 (arm_linux_hw_point_initialize): Likewise.
5193 (struct update_registers_data): New data structure.
5194 (update_registers_callback: New function.
5195 (arm_insert_point): Likewise.
5196 (arm_remove_point): Likewise.
5197 (arm_stopped_by_watchpoint): Likewise.
5198 (arm_stopped_data_address): Likewise.
5199 (arm_new_process): Likewise.
5200 (arm_new_thread): Likewise.
5201 (arm_prepare_to_resume): Likewise.
5202 (the_low_target): Register arm_insert_point, arm_remove_point,
5203 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5204 arm_new_thread, and arm_prepare_to_resume.
5206 2011-09-15 Stan Shebs <stan@codesourcery.com>
5208 * server.h (struct emit_ops): Add compare-goto fields.
5209 * tracepoint.c (gdb_agent_op_sizes): New table.
5210 (emit_eq_goto): New function.
5211 (emit_ne_goto): New function.
5212 (emit_lt_goto): New function.
5213 (emit_le_goto): New function.
5214 (emit_gt_goto): New function.
5215 (emit_ge_goto): New function.
5216 (is_goto_target): New function.
5217 (compile_bytecodes): Recognize special cases of compare-goto
5218 combinations and call specialized emitters for them.
5219 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5220 (amd64_emit_ne_goto): New function.
5221 (amd64_emit_lt_goto): New function.
5222 (amd64_emit_le_goto): New function.
5223 (amd64_emit_gt_goto): New function.
5224 (amd64_emit_ge_goto): New function.
5225 (amd64_emit_ops): Add the new functions.
5226 (i386_emit_eq_goto): New function.
5227 (i386_emit_ne_goto): New function.
5228 (i386_emit_lt_goto): New function.
5229 (i386_emit_le_goto): New function.
5230 (i386_emit_gt_goto): New function.
5231 (i386_emit_ge_goto): New function.
5232 (i386_emit_ops): Add the new functions.
5234 2011-09-08 Stan Shebs <stan@codesourcery.com>
5236 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5237 (i386_emit_epilogue): Restore %ebx.
5239 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5241 * server.c (step_thread): Remove definition.
5242 (process_serial_event): Don't handle Hs.
5243 * server.h (step_thread): Remove declaration.
5244 * target.c (set_desired_inferior): Remove use of step_thread.
5246 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5248 * linux-low.c: Include linux-procfs.h.
5249 (linux_attach_lwp_1): Update comments.
5250 (linux_attach): Scan for existing threads when attaching to a
5251 process that is the tgid.
5252 * Makefile.in: Update dependencies.
5254 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5256 * configure.srv: Add linux-procfs.o dependencies.
5258 2011-08-14 Yao Qi <yao@codesourcery.com>
5260 * target.h (struct target_ops): Fix indent.
5261 * win32-low.c (win32_target_ops): Fix comment.
5263 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5264 Yao Qi <yao@codesourcery.com>
5266 * Makefile.in (clean): Remove tic6x-*.c files.
5267 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5268 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5269 (tic6x-c64xp-linux.c): Likewise.
5270 * configure.srv: Add support for tic6x-*-uclinux.
5271 * linux-tic6x-low.c: New.
5272 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5274 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5275 Yao Qi <yao@codesourcery.com>
5277 * target.h (struct target_ops): Add read_loadmap.
5278 * linux-low.c (struct target_loadseg): New type.
5279 (struct target_loadmap): New type.
5280 (linux_read_loadmap): New function.
5281 (linux_target_ops): Add linux_read_loadmap.
5282 * server.c (handle_query): Support qXfer:fdpic:read packet.
5283 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5286 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5288 * win32-low.c: Include <stdint.h>.
5290 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5292 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5293 to the inferior here.
5294 (i386_remove_aligned_watchpoint): Ditto.
5295 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5296 fit part of the watchpoint in the debug registers.
5297 (i386_update_inferior_debug_regs): New.
5298 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5299 registers, and only update the inferior on success.
5300 (i386_low_remove_watchpoint): Ditto.
5302 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5304 * linux-low.c (compare_ints, unique, list_threads, show_process,
5305 linux_core_of_thread): Delete.
5306 (linux_target_ops): Change linux_core_of_thread to
5307 linux_common_core_of_thread.
5308 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5309 * utils.c (malloc_failure): Change type of argument.
5310 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5311 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5312 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5313 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5314 (IPA_OBJS): Add common-utils-ipa.o.
5315 (ptid_h, linux_osdata_h): New macros.
5316 (server_h): Add common/common-utils.h, common/xml-utils.h,
5317 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5319 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5320 ptid.o, buffer.o): New rules.
5321 (linux-low.o): Add common/linux-osdata.h as a dependency.
5322 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5323 * configure.ac: Add AC_HEADER_DIRENT check.
5324 * config.in: Regenerate.
5325 * configure: Regenerate.
5326 * remote-utils.c (xml_escape_text): Delete.
5327 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5328 buffer_xml_printf): Move to common/buffer.c.
5329 * server.c (main): Remove call to initialize_inferiors.
5330 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5331 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5332 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5333 internal_error, gdb_assert, gdb_assert_fail): Delete.
5334 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5335 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5337 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5338 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5339 initialize_inferiors): Delete.
5341 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5343 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5346 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5348 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5350 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5352 2011-05-26 Yao Qi <yao@codesourcery.com>
5354 * Makefile.in (thread-db.o): Track dependence to
5355 common/gdb_thread_db.h.
5356 * thread-db.c: include gdb_thread_db.h from right place.
5358 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5360 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5361 __FILE__ and __LINE__ to internal_error.
5363 2011-05-13 Doug Evans <dje@google.com>
5365 * thread-db.c (try_thread_db_load_from_sdir): New function.
5366 (try_thread_db_load_from_dir): New function.
5367 (thread_db_load_search): Handle $sdir, ignore $pdir.
5368 Remove trying of system directories if search of
5369 libthread-db-search-path fails, that is now done via $sdir.
5371 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5373 * server.c (handle_query): Add EnableDisableTracepoints to the list
5374 of supported features.
5375 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5377 (cmd_qtenable_disable): New.
5378 (cmd_qtstart): Install tracepoints even if disabled.
5379 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5380 receiving a QTEnable or QTDisable packet.
5381 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5382 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5384 (gdb_probe): Skip data collection if static tracepoint is disabled.
5386 2011-05-10 Doug Evans <dje@google.com>
5388 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5390 2011-05-04 Doug Evans <dje@google.com>
5392 * linux-low.c (linux_join): Skip process lookup.
5393 * spu-low.c (spu_join): Ditto.
5394 * server.c (join_inferiors_callback): Delete.
5395 (process_serial_event): For 'D' packet (detach) call join_inferior
5398 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5400 * README: Don't mention xscale*-*-linux*.
5401 * configure.srv (xscale*-*-linux*): Don't handle target.
5403 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5405 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5407 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5408 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5409 (i386_emit_void_call_2): Likewise.
5411 2011-04-26 Yao Qi <yao@codesourcery.com>
5413 * linux-low.c: Move common macros to linux-ptrace.h.
5414 Include linux-ptrace.h.
5415 * Makefile.in (linux_ptrace_h): New.
5416 (linux-low.o): Depends on linux-ptrace.h.
5418 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5420 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5421 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5422 (remote_prepare): New function with most of the TCP code from ...
5423 (remote_open): ... here. Detect PORT here unconditionally. Move also
5424 setting transport_is_reliable.
5425 * server.c (run_once): New variable.
5426 (gdbserver_usage): Document it.
5427 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5428 the first run if RUN_ONCE.
5429 * server.h (run_once, remote_prepare): New declarations.
5431 2011-04-19 Tom Tromey <tromey@redhat.com>
5433 * win32-low.c (handle_load_dll): Remove duplicate "the".
5435 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5437 Remove support for old Cygwin 1.5 versions.
5438 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5439 function to avoid warning.
5440 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5443 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5445 * gdbserver/server.h (Macro _): Define it if not available.
5447 2011-03-14 Michael Snyder <msnyder@vmware.com>
5449 * hostio.c (handle_close): Remove unnecessary null test.
5451 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5453 * Makefile.in (maintainer-clean realclean distclean): Remove
5454 "make ... subdir_do" command.
5456 2011-03-10 Michael Snyder <msnyder@vmware.com>
5458 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5460 * server.c (handle_v_run): Free alloced buffer on early return.
5462 2011-03-09 Yao Qi <yao@codesourcery.com>
5465 2011-03-04 Yao Qi <yao@codesourcery.com>
5467 * Makefile.in: Remove GNU make feature --directory.
5469 2011-03-05 Yao Qi <yao@codesourcery.com>
5471 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5472 (subdir_do): New make target. Copied from gdb/Makefile.
5473 (maintainer-clean, realclean, distclean, clean): Call corresponding
5474 make targets in common/Makefile.
5476 2011-02-11 Yao Qi <yao@codesourcery.com>
5478 * configure.ac: Call AC_PROG_RANLIB.
5479 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5480 * configure: Regenerate.
5482 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5484 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5486 2011-03-06 Yao Qi <yao@codesourcery.com>
5488 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5490 2011-03-05 Yao Qi <yao@codesourcery.com>
5492 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5493 (subdir_do): New make target. Copied from gdb/Makefile.
5494 (maintainer-clean, realclean, distclean, clean): Call corresponding
5495 make targets in common/Makefile.
5497 2011-03-04 Yao Qi <yao@codesourcery.com>
5499 * Makefile.in: Remove GNU make feature --directory.
5501 2011-03-04 Michael Snyder <msnyder@vmware.com>
5503 * server.c (queue_stop_reply): Call xmalloc not malloc.
5505 2011-03-02 Michael Snyder <msnyder@vmware.com>
5507 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5509 2011-02-28 Michael Snyder <msnyder@vmware.com>
5511 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5512 (cmd_qtframe): Ditto.
5513 (cmd_qtbuffer): Ditto.
5514 (cmd_bigqtbuffer): Ditto.
5516 * utils.c (decimal2str): Initialize 'width' to nine, then
5519 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5521 * hostio.c (require_data): Free *data, not data.
5523 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5525 * hostio.c (require_data): Use free, not xfree.
5527 2011-02-27 Michael Snyder <msnyder@vmware.com>
5529 * server.c (handle_query): Discard unused value.
5531 * hostio.c (require_data): Free malloc memory before returning
5534 2011-02-26 Michael Snyder <msnyder@vmware.com>
5536 * linux-low.c (list_threads): Call closedir for dirent.
5538 2011-02-27 Michael Snyder <msnyder@vmware.com>
5540 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5541 a case statement falls through.
5543 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5545 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5548 2011-02-26 Michael Snyder <msnyder@vmware.com>
5550 * utils.c (decimal2str): Eliminate dead code and dead param.
5551 (pulongest): Drop dead param from call to decimal2str.
5554 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5556 Revert the following patch (not approved yet):
5557 2011-02-21 Hui Zhu <teawater@gmail.com>
5558 * tracepoint.c (tp_printf): New function.
5559 (eval_agent_expr): Handle gdb_agent_op_printf.
5561 2011-02-21 Hui Zhu <teawater@gmail.com>
5563 * tracepoint.c (tp_printf): New function.
5564 (eval_agent_expr): Handle gdb_agent_op_printf.
5566 2011-02-18 Tom Tromey <tromey@redhat.com>
5568 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5569 (tracepoint.o): Likewise.
5570 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5571 (gdb_agent_op_names): Likewise.
5573 2011-02-18 Tom Tromey <tromey@redhat.com>
5575 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5576 gdb_agent_op_rot>: New constants.
5577 (gdb_agent_op_names): Add pick and roll.
5578 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5581 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5583 * aclocal.m4: Regenerated with aclocal-1.11.1.
5585 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5587 * server.c (handle_qxfer_traceframe_info): New.
5588 (qxfer_packets): Register "traceframe-info".
5589 (handle_query): Report support for qXfer:traceframe-info:read+.
5590 * tracepoint.c (match_blocktype): New.
5591 (traceframe_find_block_type): Rename to ...
5592 (traceframe_walk_blocks): ... this. Add callback filter argument,
5594 (traceframe_find_block_type): New, reimplemented on top of
5595 traceframe_walk_blocks.
5596 (build_traceframe_info_xml): New.
5597 (traceframe_read_info): New.
5598 * server.h (traceframe_read_info): Declare.
5600 2011-02-11 Yao Qi <yao@codesourcery.com>
5602 * configure.ac: Call AC_PROG_RANLIB.
5603 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5604 * configure: Regenerate.
5606 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5608 * server.c (gdb_read_memory): Change return semantics to allow
5610 (handle_search_memory_1): Adjust.
5611 (process_serial_event) <'m' packet>: Handle partial transfers.
5612 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5614 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5616 * regcache.c (init_register_cache): Initialize
5617 regcache->register_status.
5618 (free_register_cache): Release regcache->register_status.
5619 (regcache_cpy): Copy register_status.
5620 (registers_to_string): Print 'x's for unavailable registers.
5621 (supply_register): Mark the register's status valid or
5622 unavailable, depending on whether a buffer was passed in or not.
5623 (supply_register_zeroed): New.
5624 (supply_regblock): Mark the registers' status valid or
5625 unavailable, depending on whether a buffer was passed in or not.
5626 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5627 (struct regcache): New `register_status' field.
5628 (supply_register_zeroed): Declare.
5629 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5630 supply_register_zeroed, rather than passing a NULL buffer to
5632 * tracepoint.c (fetch_traceframe_registers): Update comment.
5634 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5636 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5639 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5641 * server.h (decode_xfer_write): Change prototype.
5642 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5643 and don't extract the annex here.
5644 * server.c (decode_xfer_read): Remove `annex' parameter,
5645 and don't extract the annex here.
5647 (struct qxfer): New.
5648 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5649 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5650 (handle_qxfer_statictrace): New functions, abstracted out from
5651 handle_query, and made to use the struct qxfer interface.
5652 (handle_threads_qxfer_proper): Rename to ...
5653 (handle_qxfer_threads_proper): ... this.
5654 (handle_threads_qxfer): Rename to ...
5655 (handle_qxfer_threads): ... this. Adjust.
5656 (qxfer_packets): New array.
5657 (handle_qxfer): New function.
5658 (handle_query): Use handle_qxfer.
5660 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5662 * gdbreplay.c: Shorten lines of >= 80 columns.
5663 * linux-low.c: Ditto.
5664 * linux-ppc-low.c: Ditto.
5665 * linux-s390-low.c: Ditto.
5666 * linux-sparc-low.c: Ditto.
5667 * linux-x86-low.c: Ditto.
5668 * linux-xtensa-low.c: Ditto.
5669 * mem-break.c: Ditto.
5671 * regcache.h: Ditto.
5672 * remote-utils.c: Ditto.
5675 * thread-db.c: Ditto.
5676 * tracepoint.c: Ditto.
5678 * win32-low.h: Ditto.
5680 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5682 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5685 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5687 * server.c (gdbserver_version): Update copyright year in version
5689 * gdbreplay.c (gdbreplay_version): Ditto.
5691 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5693 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5694 * linux-bfin-low.c: New file.
5695 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5696 PT_DATA_ADDR for BFIN targets.
5697 * Makefile.in (SFILES): Add linux-bfin-low.c.
5698 (clean): Remove reg-bfin.c.
5699 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5700 * README: Mention supported Blackfin targets.
5702 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5704 * .gitignore: New file.
5706 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5708 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5710 2010-10-22 Jie Zhang <jie@codesourcery.com>
5712 * Makefile.in: Add FLAGS_TO_PASS variable.
5713 (install): Remove dependency of install-only and recursively
5714 invoke make for install-only.
5716 2010-10-04 Doug Evans <dje@google.com>
5718 * Makefile.in (uninstall): Use $(DESTDIR).
5720 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5724 * linux-x86-low.c (compat_siginfo_from_siginfo)
5725 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5726 si_code is < 0. Check for si_code == SI_TIMER before checking for
5729 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5731 * lynx-i386-low.c: New file.
5732 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5734 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5736 * lynx-low.c (ptrace_request_to_str): Remove handling for
5737 request values that have been removed in LynxOS 5.x.
5739 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5741 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5744 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5746 * configure.ac: Add --enable-inprocess-agent option.
5747 * configure: Rebuilt.
5749 2010-09-06 Yao Qi <yao@codesourcery.com>
5751 * linux-low.c (linux_kill): Remove unused variable.
5752 (linux_stabilize_threads): Likewise.
5753 * server.c (start_inferior): Likewise.
5754 (queue_stop_reply_callback): Likewise.
5755 * tracepoint.c (do_action_at_tracepoint): Likewise.
5757 2010-09-06 Yao Qi <yao@codesourcery.com>
5759 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5762 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5764 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5766 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5768 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5771 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5773 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5774 gdbserver/lynx-ppc-low.c: New files.
5775 * Makefile.in (lynx_low_h): New variable.
5776 (lynx-low.o, lynx-ppc-low.o): New rules.
5777 * configure.ac: On LynxOS, link with -lnetinet.
5778 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5779 * configure: regenerate.
5781 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5783 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5784 * configure.ac: Add check for vasprintf and vsnprintf.
5785 * configure, config.in: Regenerate.
5786 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5788 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5790 * gdbreplay.c: Move include of alloca.h up, next to include of
5792 * server.h: Add include of malloc.h.
5793 * mem-break.c: Remove include of malloc.h.
5794 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5796 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5798 * Makefile.in (memmem.o): Build with -Wno-error.
5800 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5802 * utils.c (xsnprintf): Make non-static.
5803 * server.h: Add xsnprintf declaration.
5804 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5805 replace calls to snprintf by calls to xsnprintf throughout.
5807 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5809 * configure.ac: Add configure check for alloca.
5810 * configure, config.in: Regenerate.
5811 * server.h: Include alloca.h if it exists.
5812 * gdbreplay.c: Include alloca.h if it exists.
5814 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5816 * linux-low.c (__SIGRTMIN): Define if not already defined.
5817 (linux_create_inferior): Check for __ANDROID__ rather than
5819 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5820 are already deferred.
5821 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5822 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5823 stopped and already has a pending signal to report.
5824 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5825 a pending signal to report or is moving out of a jump pad.
5826 (linux_init_signals): Check for __ANDROID__ rather than
5829 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5831 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5832 debug_threads check. Avoid a linear search when not doing debug
5835 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5837 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5838 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5839 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5840 (process_event): Change local fd's type to gdb_fildes_t.
5841 (create_file_handler): Adjust prototype.
5842 (delete_file_handler): Adjust prototype.
5843 (handle_file_event): Adjust prototype. Use pfildes.
5844 (create_file_event): Adjsut prototype.
5845 * remote-utils.c (remote_desc, listen_desc): Change type to
5847 * server.h: New gdb_fildes_t typedef.
5848 [USE_WIN32API]: Include winsock2.h.
5849 (delete_file_handler, add_file_handler): Adjust prototypes.
5851 * utils.c (pfildes): New.
5853 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5855 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5856 * configure: Regenerate.
5858 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5860 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5861 (linux_done_accessing_memory): ... this.
5862 (linux_target_ops): Adjust.
5863 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5864 * nto-low.c (nto_target_ops): Adjust comment.
5865 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5866 * spu-low.c (spu_target_ops): Adjust comment.
5867 * target.h (target_ops): Rename unprepare_to_access_memory field
5868 to done_accessing_memory.
5869 (unprepare_to_access_memory): Rename to ...
5870 (done_accessing_memory): ... this.
5872 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5874 * linux-low.c (linux_prepare_to_access_memory): New.
5875 (linux_unprepare_to_access_memory): New.
5876 (linux_target_ops): Install them.
5877 * server.c (read_memory): Rename to ...
5878 (gdb_read_memory): ... this. Use
5879 prepare_to_access_memory/prepare_to_access_memory.
5880 (write_memory): Rename to ...
5881 (gdb_write_memory): ... this. Use
5882 prepare_to_access_memory/prepare_to_access_memory.
5883 (handle_search_memory_1): Adjust.
5884 (process_serial_event): Adjust.
5885 * target.h (struct target_ops): New fields
5886 prepare_to_access_memory and unprepare_to_access_memory.
5887 (prepare_to_access_memory, unprepare_to_access_memory): New.
5888 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5889 prepare_to_access_memory/prepare_to_access_memory.
5890 * nto-low.c (nto_target_ops): Adjust.
5891 * spu-low.c (spu_target_ops): Adjust.
5892 * win32-low.c (win32_target_ops): Adjust.
5894 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5896 * Makefile.in (WARN_CFLAGS): Get it from configure.
5897 (WERROR_CFLAGS): New.
5898 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5899 * configure.ac: Introduce --enable-werror, which adds -Werror to
5900 the compiler command line. Enabled by default. Disable with
5901 --disable-werror. Add -Wdeclaration-after-statement
5902 Wpointer-arith and -Wformat-nonliteral to warning flags.
5903 * configure: Regenerate.
5905 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5907 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5909 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5911 * gdbreplay.c (remote_error): New.
5913 (expect): Use gdbchar. Check for error reading from GDB.
5914 Clarify sync error output.
5915 (play): Check for errors writing to GDB.
5916 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5917 * remote-utils.c (getpkt): Check for errors writing to the remote
5920 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5922 * linux-low.c (linux_wait_1): Move non-debugging code out of
5923 `debug_threads' control.
5925 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5927 * linux-low.c (linux_wait_1): Don't set last_status here.
5928 * server.c (push_event, queue_stop_reply_callback): Assert we're
5929 not pushing a TARGET_WAITKIND_IGNORE event.
5930 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5931 (myresume, handle_target_event): Set the thread's last_resume_kind
5932 and last_status from the target returned status.
5934 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5938 * linux-x86-low.c (update_debug_registers_callback): New.
5939 (i386_dr_low_set_addr): Use it.
5940 (i386_dr_low_get_addr): New.
5941 (i386_dr_low_set_control): Use update_debug_registers_callback.
5942 (i386_dr_low_get_control): New.
5943 (i386_dr_low_get_status): Adjust.
5944 * linux-low.c (linux_stop_lwp): New.
5945 * linux-low.h (linux_stop_lwp): Declare.
5947 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5948 argument instead of a i386_debug_reg_state.
5949 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5950 a i386_debug_reg_state.
5951 (i386_insert_aligned_watchpoint): Adjust.
5952 (i386_remove_aligned_watchpoint): Adjust.
5953 (i386_low_stopped_data_address): Read the debug registers from the
5954 inferior instead of from the mirrors.
5955 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5956 (i386_dr_low_get_addr): Declare.
5957 (i386_dr_low_get_control): Declare.
5958 (i386_dr_low_get_status): Change prototype.
5960 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5961 (i386_dr_low_get_addr): New.
5962 (i386_dr_low_get_control): New.
5963 (i386_dr_low_get_status): Adjust prototype. Return
5965 (i386_initial_stuff): Clear dr_status_mirror and
5967 (i386_get_thread_context): Adjust.
5968 (i386_set_thread_context): Adjust.
5969 (i386_thread_added): Adjust.
5971 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5973 * linux-low.h (linux_thread_area): Delete declaration.
5975 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5977 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5978 after its termination.
5980 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5982 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5983 (gdb_wants_all_stopped): Delete.
5984 (linux_wait_1): Don't call them.
5985 * server.c (handle_v_cont): Tag all threads as want-stopped.
5986 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5987 stopped as "client-wants-stopped".
5989 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5991 * Makefile.in (signals_h): New.
5992 (server_h): Depend on it.
5993 (server.o): Don't depend on $(signals_def).
5994 (signals.o): Depend on $(signals_def).
5996 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5998 * Makefile.in (signals_def): New.
5999 (server_h): Append include/gdb/signals.h and signals_def.
6000 (server.o): Append signals_def.
6002 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6004 * server.c (handle_target_event): Use target_signal_to_host for
6005 resume_info.sig initialization.
6006 * target.h (struct thread_resume) <sig>: New comment.
6008 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6010 * server.c (handle_query): strcpy() the returned string from paddress()
6011 instead of sprintf().
6012 * utils.c (paddress): Return phex_nz().
6014 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6016 * server.c (handle_v_cont): Call mourn_inferior if process
6018 (myresume): Likewise.
6020 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6022 Static tracepoints, and integration with UST.
6024 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6025 * mem-break.c (uninsert_all_breakpoints)
6026 (reinsert_all_breakpoints): New.
6027 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6028 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6029 (gdb_agent_ust_loaded, helper_thread_id)
6030 (gdb_agent_helper_thread_id): New macros.
6031 (struct ipa_sym_addresses): Add addr_ust_loaded,
6032 addr_helper_thread_id, addr_cmd_buf.
6033 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6034 (in_process_agent_loaded_ust): New.
6035 (write_e_ust_not_loaded): New.
6036 (maybe_write_ipa_ust_not_loaded): New.
6037 (struct collect_static_trace_data_action): New.
6038 (enum tracepoint_type) <static_tracepoint>: New.
6039 (struct tracepoint) <handle>: Mention static tracepoints.
6040 (struct static_tracepoint_ctx): New.
6041 (CMD_BUF_SIZE): New.
6042 (add_tracepoint_action): Handle static tracepoint actions.
6043 (unprobe_marker_at): New.
6044 (clear_installed_tracepoints): Handle static tracepoints.
6045 (cmd_qtdp): Handle static tracepoints.
6046 (probe_marker_at): New.
6047 (cmd_qtstart): Handle static tracepoints.
6048 (response_tracepoint): Handle static tracepoints.
6049 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6050 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6051 (get_context_regcache): Handle static tracepoints.
6052 (do_action_at_tracepoint): Handle static tracepoint actions.
6053 (traceframe_find_block_type): Handle static trace data blocks.
6054 (traceframe_read_sdata): New.
6055 (download_tracepoints): Download static tracepoint actions.
6056 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6057 (GDB_PROBE_NAME): New.
6062 (ust_marker_to_static_tracepoint): New.
6064 (collect_ust_data_at_tracepoint): New.
6065 (gdb_ust_probe): New.
6066 (UNIX_PATH_MAX, SOCK_DIR): New.
6067 (gdb_ust_connect_sync_socket): New.
6068 (resume_thread, stop_thread): New.
6069 (run_inferior_command): New.
6070 (init_named_socket): New.
6071 (gdb_ust_socket_init): New.
6072 (cstr_to_hexstr): New.
6074 (first_marker, next_marker): New.
6075 (response_ust_marker): New.
6076 (cmd_qtfstm, cmd_qtsstm): New.
6077 (unprobe_marker_at, probe_marker_at): New.
6078 (cmd_qtstmat, gdb_ust_thread): New.
6079 (gdb_ust_init): New.
6080 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6081 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6083 (x86_64_st_collect_regmap): New.
6084 (X86_64_NUM_ST_COLLECT_GREGS): New.
6085 (AMD64_RIP_REGNUM): New.
6086 (supply_static_tracepoint_registers): New.
6087 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6089 (i386_st_collect_regmap): New.
6090 (i386_NUM_ST_COLLECT_GREGS): New.
6091 (supply_static_tracepoint_registers): New.
6092 * server.c (handle_query): Handle qXfer:statictrace:read.
6093 <qSupported>: Report support for StaticTracepoints, and
6094 qXfer:statictrace:read features.
6095 * server.h (traceframe_read_sdata)
6096 (supply_static_tracepoint_registers): Declare.
6097 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6098 (unpack_varlen_hex): Include in IPA build.
6099 * Makefile.in (ustlibs, ustinc): New.
6100 (IPA_OBJS): Add remote-utils-ipa.o.
6101 ($(IPA_LIB)): Link -ldl and -lpthread.
6103 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6104 * config.in, configure: Regenerate.
6106 2010-06-20 Ian Lance Taylor <iant@google.com>
6107 Pedro Alves <pedro@codesourcery.com>
6109 * linux-x86-low.c (always_true): Delete.
6110 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6111 trying to fool the compiler with always_true.
6113 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6115 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6116 conditions in gdbserver.
6118 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6120 * spu-low.c (spu_read_memory): Wrap around local store limit.
6121 (spu_write_memory): Likewise.
6123 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6125 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6126 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6128 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6130 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6131 uses with LONGEST uses.
6133 2010-06-14 Stan Shebs <stan@codesourcery.com>
6134 Pedro Alves <pedro@codesourcery.com>
6138 * linux-x86-low.c: Include limits.h.
6143 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6144 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6145 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6146 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6147 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6148 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6149 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6150 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6151 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6152 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6153 (amd64_emit_void_call_2): New.
6154 (amd64_emit_ops): New.
6155 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6156 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6157 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6158 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6159 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6160 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6161 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6162 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6163 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6164 (i386_emit_stack_adjust, i386_emit_int_call_1)
6165 (i386_emit_void_call_2): New.
6166 (i386_emit_ops): New.
6167 (x86_emit_ops): New.
6168 (the_low_target): Install x86_emit_ops.
6169 * server.h (struct emit_ops): New.
6170 (get_raw_reg_func_addr): Declare.
6171 (current_insn_ptr, emit_error): Declare.
6172 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6173 (set_trace_state_variable_value): New defines.
6174 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6175 addr_get_trace_state_variable_value and
6176 addr_set_trace_state_variable_value.
6177 (symbol_list): New fields for get_raw_reg,
6178 get_trace_state_variable_value and set_trace_state_variable_value.
6179 (condfn): New typedef.
6180 (struct tracepoint): New field `compiled_cond'.
6181 (do_action_at_tracepoint): Clear compiled_cond.
6182 (get_trace_state_variable_value, set_trace_state_variable_value):
6184 (condition_true_at_tracepoint): If there's a compiled condition,
6186 (current_insn_ptr, emit_error): New globals.
6187 (struct bytecode_address): New.
6188 (get_raw_reg_func_addr): New.
6189 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6190 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6191 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6192 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6193 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6194 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6195 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6196 (compile_tracepoint_condition, compile_bytecodes): New.
6197 * target.h (emit_ops): Forward declare.
6198 (struct target_ops): New field emit_ops.
6199 (target_emit_ops): New.
6200 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6201 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6202 * linux-low.c (linux_emit_ops): New.
6203 (linux_target_ops): Install it.
6204 * linux-low.h (struct linux_target_ops): New field emit_ops.
6206 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6208 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6209 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6211 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6212 Stan Shebs <stan@codesourcery.com>
6214 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6215 (all): Depend on $(extra_libraries).
6216 (install-only): Install the IPA.
6217 (IPA_OBJS, IPA_LIB): New.
6218 (clean): Remove the IPA lib.
6219 (IPAGENT_CFLAGS): New.
6220 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6221 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6222 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6223 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6224 * configure.ac: Check for atomic builtins support in the compiler.
6225 (IPA_DEPFILES, extra_libraries): Define.
6226 * configure.srv (ipa_obj): Add description.
6227 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6228 (i[34567]86-*-linux*): Set ipa_obj.
6229 (x86_64-*-linux*): Set ipa_obj.
6230 * linux-low.c (stabilizing_threads): New.
6231 (supports_fast_tracepoints): New.
6232 (linux_detach): Stabilize threads before detaching.
6233 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6234 the lwp is either not stabilizing, or is moving out of a jump pad.
6235 (linux_fast_tracepoint_collecting): New.
6236 (maybe_move_out_of_jump_pad): New.
6237 (enqueue_one_deferred_signal): New.
6238 (dequeue_one_deferred_signal): New.
6239 (linux_wait_for_event_1): If moving out of a jump pad, defer
6240 pending signals to later.
6241 (linux_stabilize_threads): New.
6242 (linux_wait_1): Check if threads need moving out of jump pads, and
6244 (stuck_in_jump_pad_callback): New.
6245 (move_out_of_jump_pad_callback): New.
6247 (linux_resume_one_lwp): Handle moving out of jump pads.
6248 (linux_set_resume_request): Dequeue deferred signals.
6249 (need_step_over_p): Also step over fast tracepoint jumps.
6250 (start_step_over): Also uninsert fast tracepoint jumps.
6251 (finish_step_over): Also reinsert fast tracepoint jumps.
6252 (linux_install_fast_tracepoint_jump): New.
6253 (linux_target_ops): Install linux_stabilize_threads and
6254 linux_install_fast_tracepoint_jump_pad.
6255 * linux-low.h (linux_target_ops) <get_thread_area,
6256 install_fast_tracepoint_jump_pad>: New fields.
6257 (struct lwp_info) <collecting_fast_tracepoint,
6258 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6259 (linux_get_thread_area): Declare.
6260 * linux-x86-low.c (jump_insn): New.
6261 (x86_get_thread_area): New.
6262 (append_insns): New.
6264 (amd64_install_fast_tracepoint_jump_pad): New.
6265 (i386_install_fast_tracepoint_jump_pad): New.
6266 (x86_install_fast_tracepoint_jump_pad): New.
6267 (the_low_target): Install x86_get_thread_area and
6268 x86_install_fast_tracepoint_jump_pad.
6269 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6270 (struct fast_tracepoint_jump): New.
6271 (fast_tracepoint_jump_insn): New.
6272 (fast_tracepoint_jump_shadow): New.
6273 (find_fast_tracepoint_jump_at): New.
6274 (fast_tracepoint_jump_here): New.
6275 (delete_fast_tracepoint_jump): New.
6276 (set_fast_tracepoint_jump): New.
6277 (uninsert_fast_tracepoint_jumps_at): New.
6278 (reinsert_fast_tracepoint_jumps_at): New.
6279 (set_breakpoint_at): Use write_inferior_memory.
6280 (uninsert_raw_breakpoint): Use write_inferior_memory.
6281 (check_mem_read): Mask out fast tracepoint jumps.
6282 (check_mem_write): Mask out fast tracepoint jumps.
6283 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6284 (set_fast_tracepoint_jump): Declare.
6285 (delete_fast_tracepoint_jump)
6286 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6287 (reinsert_fast_tracepoint_jumps_at): Declare.
6288 * regcache.c: Don't compile many functions when building the
6289 in-process agent library.
6290 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6291 the register buffer in the heap.
6292 (free_register_cache): If the register buffer isn't owned by the
6293 regcache, don't free it.
6294 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6295 pre-existing register caches.
6296 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6298 (convert_ascii_to_int): : Constify `from' parameter type.
6299 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6300 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6301 the needed buffer in-place.
6302 (relocate_instruction): New.
6303 * server.c (handle_query) <qSymbols>: If the target supports
6304 tracepoints, give it a chance of looking up symbols. Report
6305 support for fast tracepoints.
6306 (handle_status): Stabilize threads.
6307 (process_serial_event): Adjust.
6308 * server.h (struct fast_tracepoint_jump): Forward declare.
6309 (struct process_info) <fast_tracepoint_jumps>: New field.
6310 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6311 (decode_X_packet, decode_M_packet): Adjust.
6312 (relocate_instruction): Declare.
6313 (in_process_agent_loaded): Declare.
6314 (tracepoint_look_up_symbols): Declare.
6315 (struct fast_tpoint_collect_status): Declare.
6316 (fast_tracepoint_collecting): Declare.
6317 (force_unlock_trace_buffer): Declare.
6318 (handle_tracepoint_bkpts): Declare.
6319 (initialize_low_tracepoint)
6320 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6321 * target.h (struct target_ops) <stabilize_threads,
6322 install_fast_tracepoint_jump_pad>: New fields.
6323 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6324 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6325 [HAVE_STDINT_H]: Include stdint.h.
6326 (trace_debug_1): Rename to ...
6327 (trace_vdebug): ... this.
6328 (trace_debug): Rename to ...
6329 (trace_debug_1): ... this. Add `level' parameter.
6331 (ATTR_USED, ATTR_NOINLINE): New.
6332 (IP_AGENT_EXPORT): New.
6333 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6334 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6335 (about_to_request_buffer_space, trace_buffer_is_full)
6336 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6337 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6338 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6339 (traceframe_write_count, traceframes_created)
6340 (trace_state_variables)
6341 New renaming defines.
6342 (struct ipa_sym_addresses): New.
6343 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6345 (ipa_sym_addrs): New.
6346 (all_tracepoint_symbols_looked_up): New.
6347 (in_process_agent_loaded): New.
6348 (write_e_ipa_not_loaded): New.
6349 (maybe_write_ipa_not_loaded): New.
6350 (tracepoint_look_up_symbols): New.
6351 (debug_threads) [IN_PROCESS_AGENT]: New.
6352 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6353 (UNKNOWN_SIDE_EFFECTS): New.
6354 (stop_tracing): New.
6355 (flush_trace_buffer): New.
6356 (stop_tracing_bkpt): New.
6357 (flush_trace_buffer_bkpt): New.
6358 (read_inferior_integer): New.
6359 (read_inferior_uinteger): New.
6360 (read_inferior_data_pointer): New.
6361 (write_inferior_data_pointer): New.
6362 (write_inferior_integer): New.
6363 (write_inferior_uinteger): New.
6364 (struct collect_static_trace_data_action): Delete.
6365 (enum tracepoint_type): New.
6366 (struct tracepoint) <type>: New field `type'.
6367 <actions_str, step_actions, step_actions_str>: Only include in
6369 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6370 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6371 (tracepoints): Use IP_AGENT_EXPORT.
6372 (last_tracepoint): Don't include in the IPA.
6373 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6374 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6375 (alloced_trace_state_variables): New.
6376 (trace_state_variables): Use IP_AGENT_EXPORT.
6377 (traceframe_t): Delete unused variable.
6378 (circular_trace_buffer): Don't include in the IPA.
6379 (trace_buffer_start): Delete.
6380 (struct trace_buffer_control): New.
6381 (trace_buffer_free): Delete.
6382 (struct ipa_trace_buffer_control): New.
6383 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6384 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6386 (trace_buffer_ctrl): New.
6387 (TRACE_BUFFER_CTRL_CURR): New.
6388 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6389 Reimplement as macros.
6390 (trace_buffer_wrap): Delete.
6391 (traceframe_write_count, traceframe_read_count)
6392 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6393 (struct tracepoint_hit_ctx) <type>: New field.
6394 (struct fast_tracepoint_ctx): New.
6395 (memory_barrier): New.
6397 (record_tracepoint_error): Update atomically in the IPA.
6398 (clear_inferior_trace_buffer): New.
6399 (about_to_request_buffer_space): New.
6400 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6401 updating the same buffer.
6402 (add_tracepoint): Default the tracepoint's type to trap
6403 tracepoint, and orig_size to -1.
6404 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6406 (create_trace_state_variable): New parameter `gdb'. Handle it.
6407 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6408 (cmd_qtdp): Handle fast tracepoints.
6410 (max_jump_pad_size): New.
6411 (gdb_jump_pad_head): New.
6412 (get_jump_space_head): New.
6413 (claim_jump_space): New.
6414 (sort_tracepoints): New.
6415 (MAX_JUMP_SIZE): New.
6416 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6418 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6419 support. Upload fast traceframes, and delete internal IPA
6421 (stop_tracing_handler): New.
6422 (flush_trace_buffer_handler): New.
6423 (cmd_qtstop): Upload fast tracepoints.
6424 (response_tracepoint): Handle fast tracepoints.
6425 (tracepoint_finished_step): Upload fast traceframes. Set the
6426 tracepoint hit context's tracepoint type.
6427 (handle_tracepoint_bkpts): New.
6428 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6429 type. Add comment about fast tracepoints.
6430 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6431 non-existing action_str field.
6432 (get_context_regcache): Handle fast tracepoints.
6433 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6435 (fast_tracepoint_from_jump_pad_address): New.
6436 (fast_tracepoint_from_ipa_tpoint_address): New.
6437 (collecting_t): New.
6438 (force_unlock_trace_buffer): New.
6439 (fast_tracepoint_collecting): New.
6442 (write_inferior_data_ptr): New.
6443 (target_tp_heap): New.
6444 (target_malloc): New.
6445 (download_agent_expr): New.
6447 (download_tracepoints): New.
6448 (download_trace_state_variables): New.
6449 (upload_fast_traceframes): New.
6450 (IPA_FIRST_TRACEFRAME): New.
6451 (IPA_NEXT_TRACEFRAME_1): New.
6452 (IPA_NEXT_TRACEFRAME): New.
6453 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6454 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6455 (gdb_jump_pad_buffer_end): New.
6456 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6457 (initialize_tracepoint): Adjust.
6458 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6459 buffer. Initialize the low module.
6460 * utils.c (PREFIX, TOOLNAME): New.
6461 (malloc_failure): Use PREFIX.
6462 (error): In the IPA, an error causes an exit.
6463 (fatal, warning): Use PREFIX.
6464 (internal_error): Use TOOLNAME.
6465 (NUMCELLS): Increase to 10.
6466 * configure, config.in: Regenerate.
6468 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6470 * server.c (handle_query) <qSupported>: Do two passes over the
6471 qSupported string to avoid nesting strtok.
6473 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6475 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6477 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6479 * configure: Regenerate.
6480 * proc-service.list: New.
6482 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6484 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6487 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6489 * gdbreplay.c (remote_open): Check error return from socket() call by
6490 its equality to -1 not by it being negative.
6491 * remote-utils.c (remote_open): Likewise.
6493 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6495 * config.h: Regenerate.
6497 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6499 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6500 doesn't provide PTRACE_GET_THREAD_AREA.
6502 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6504 * linux-m68k-low.c: Include <asm/ptrace.h>
6505 (ps_get_thread_area): Implement.
6507 2010-05-03 Doug Evans <dje@google.com>
6509 * event-loop.c (struct callback_event): New struct.
6510 (callback_list): New global.
6511 (append_callback_event, delete_callback_event): New functions.
6512 (process_callback): New function.
6513 (start_event_loop): Call it.
6514 * remote-utils.c (NOT_SCHEDULED): Define.
6515 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6516 moved out of readchar.
6517 (readchar): Rewrite. Call reschedule before returning.
6518 (reset_readchar): New function.
6519 (remote_close): Call it.
6520 (process_remaining, reschedule): New functions.
6521 * server.h (callback_handler_func): New typedef.
6522 (append_callback_event, delete_callback_event): Declare.
6524 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6526 * proc-service.c (ps_pglobal_lookup): Use
6527 thread_db_look_up_one_symbol.
6528 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6529 parameter. Use it instead of all_symbols_looked_up.
6530 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6532 (all_symbols_looked_up): Don't declare.
6533 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6534 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6536 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6537 Set all_symbols_looked_up here.
6538 (thread_db_look_up_one_symbol): New.
6539 (thread_db_get_tls_address): Adjust.
6540 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6541 thread_db object on the heap, and tentatively set it in the
6543 (thread_db_init): Don't set all_symbols_looked_up here.
6544 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6546 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6548 * linux-low.c (linux_kill, linux_detach): Adjust.
6549 (status_pending_p_callback): Remove redundant statement. Check
6550 for !TARGET_WAITIKIND_IGNORE, instead of
6551 TARGET_WAITKIND_STOPPED.
6552 (handle_tracepoints): Make sure LWP is locked. Adjust.
6553 (linux_wait_for_event_1): Adjust.
6554 (linux_cancel_breakpoints): New.
6555 (unsuspend_one_lwp): New.
6556 (unsuspend_all_lwps): New.
6557 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6558 (send_sigstop_callback): Change return type to int, add new
6559 `except' parameter and handle it.
6560 (suspend_and_send_sigstop_callback): New.
6561 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6562 pass them down. If SUSPEND, also increment the lwp's suspend
6564 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6565 (need_step_over_p): Don't consider suspended LWPs.
6566 (start_step_over): Adjust.
6567 (proceed_one_lwp): Change return type to int, add new `except'
6568 parameter and handle it.
6569 (unsuspend_and_proceed_one_lwp): New.
6570 (proceed_all_lwps): Use find_inferior instead of
6572 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6573 also decrement the suspend count of LWPs. Pass `except' down,
6574 instead of hacking its suspend count.
6575 (linux_pause_all): Add `freeze' parameter. Adjust.
6576 (linux_unpause_all): New.
6577 (linux_target_ops): Install linux_unpause_all.
6578 * server.c (handle_status): Adjust.
6579 * target.h (struct target_ops): New fields `unpause_all' and
6580 `cancel_breakpoints'. Add new parameter to `pause_all'.
6581 (pause_all): Add new `freeze' parameter.
6583 (cancel_breakpoints): New.
6584 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6586 (cmd_qtstart): Pause threads.
6587 (stop_tracing): Pause threads, and cancel breakpoints.
6588 * win32-low.c (win32_target_ops): Adjust.
6590 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6592 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6593 the inferior right away from here...
6594 (linux_wait_1): ... to here, and adjust to check the thread's
6595 last_resume_kind instead of the lwp's step or stop_expected flags.
6597 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6599 * README: Use consistent `GDB' and `GDBserver' spellings.
6601 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6603 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6604 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6605 (linux_detach_one_lwp): Assume the lwp is stopped.
6606 (any_thread_of): Delete.
6607 (linux_detach): Stop all lwps here. Don't blindly delete all
6609 (delete_lwp_callback): New.
6610 (linux_mourn): Delete all lwps of the process that is gone.
6611 (linux_wait_1): Don't delete the last lwp of the process here.
6612 * mem-break.h (mark_breakpoints_out): Declare.
6613 * mem-break.c (mark_breakpoints_out): New.
6614 (free_all_breakpoints): Use it.
6615 * server.c (handle_target_event): If the process is gone, mark
6617 * thread-db.c (struct thread_db) <create_bp>: New field.
6618 (thread_db_enable_reporting): Fix prototype. Store a thread event
6619 breakpoint reference in the thread_db struct.
6620 (thread_db_load_search): Clear the thread_db object.
6621 (try_thread_db_load_1): Ditto.
6622 (switch_to_process): New.
6623 (disable_thread_event_reporting): Use it.
6624 (remove_thread_event_breakpoints): New.
6625 (thread_db_detach, thread_db_mourn): Use it.
6627 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6629 * linux-low.c (linux_enable_event_reporting): New.
6630 (linux_wait_for_event_1, handle_extended_wait): Use it.
6632 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6634 * linux-low.c (linux_kill_one_lwp, linux_kill)
6635 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6636 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6637 SIGSTOP even if the LWP is stopped.
6638 (send_sigstop_callback): New.
6639 (stop_all_lwps): Use send_sigstop_callback instead.
6640 (linux_resume_one_thread): Adjust.
6641 (proceed_one_lwp): Still proceed an LWP that the client has
6642 requested to stop, if we haven't reported it as stopped yet. Make
6643 sure that LWPs the client want stopped, have a pending SIGSTOP.
6645 2010-04-26 Doug Evans <dje@google.com>
6647 * server.c (handle_general_set): Make static.
6649 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6650 Print received char after testing for error/eof instead of before.
6651 (input_interrupt): Tweak comment.
6653 2010-04-23 Doug Evans <dje@google.com>
6655 * server.c (start_inferior): Print inferior argv if --debug.
6657 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6659 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6660 * nto-x86-low.c: Include server.h
6662 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6664 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6665 be consistent with other sources of this directory.
6666 (init_registers_amd64): Correct name of source file of this function
6669 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6671 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6674 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6676 * win32-i386-low.c: Add 64-bit support.
6677 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6678 (init_registers_amd64): Declare.
6679 (mappings): Add 64-bit version of array.
6680 (init_windows_x86): New function.
6681 (the_low_target): Change init_arch field to init_windows_x86.
6683 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6685 * win32-low.c: Adapt to support also 64-bit architecture.
6686 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6687 (get_image_name): Use SIZE_T type for local variable `done'.
6688 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6689 (toolhelp_get_dll_name): Idem.
6690 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6691 Use uintptr_t typecast to avoid warning.
6692 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6693 (handle_exception): Use phex_nz to avoid warning.
6694 (win32_wait): Remove unused local variable `process'.
6696 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6698 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6701 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6703 * configure.ac: Use `ws2_32' library for srv_mingw.
6704 * configure: Regenerate.
6705 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6706 * remote-utils.c: Likewise.
6708 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6710 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6711 if __x86_64__ is defined.
6713 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6715 * configure: Regenerate.
6717 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6719 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6720 * target.h (target_ops): New get_tib_address field.
6721 * win32-low.h (win32_thread_info): Add thread_local_base field.
6722 * win32-low.c (child_add_thread): Add tlb argument.
6723 Set thread_local_base field to TLB.
6724 (get_child_debug_event): Adapt to child_add_thread change.
6725 (win32_get_tib_address): New function.
6726 (win32_target_ops): Set get_tib_address field to
6727 win32_get_tib_address.
6728 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6730 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6732 * linux-low.c (linux_mourn): Also remove the process.
6733 * server.c (handle_target_event): Don't remove the process here.
6734 * nto-low.c (nto_mourn): New.
6735 (nto_target_ops): Install it.
6736 * spu-low.c (spu_mourn): New.
6737 (spu_target_ops): Install it.
6738 * win32-low.c (win32_mourn): New.
6739 (win32_target_ops): Install it.
6741 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6743 * server.h (buffer_xml_printf): Remove redundant `;'.
6745 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6747 * regcache.c (set_register_cache): Invalidate regcaches before
6748 changing the register cache layout.
6749 (regcache_invalidate_one): Allow a NULL regcache.
6750 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6751 regcaches before changing the register cache layout or the target
6754 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6756 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6757 variable warning on Linux/x86-64.
6759 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6761 GDBserver disconnected tracing support.
6763 * linux-low.c (linux_remove_process): Delete.
6764 (add_lwp): Don't set last_resume_kind here.
6765 (linux_kill): Use `mourn'.
6766 (linux_detach): Use `thread_db_detach', and `mourn'.
6768 (linux_attach_lwp_1): Adjust comment.
6769 (linux_attach): last_resume_kind moved the thread_info; adjust.
6770 (status_pending_p_callback): Adjust.
6771 (linux_wait_for_event_1): Adjust.
6772 (count_events_callback, select_singlestep_lwp_callback)
6773 (select_event_lwp_callback, cancel_breakpoints_callback)
6774 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6775 (proceed_one_lwp): Adjust.
6776 (linux_async): Add debug output.
6777 (linux_thread_stopped): New.
6778 (linux_pause_all): New.
6779 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6781 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6782 (thread_db_free): Delete declaration.
6783 (thread_db_detach, thread_db_mourn): Declare.
6784 * thread-db.c (thread_db_init): Use thread_db_mourn.
6785 (thread_db_free): Delete, split in two.
6786 (disable_thread_event_reporting): New.
6787 (thread_db_detach): New.
6788 (thread_db_mourn): New.
6790 * server.h (struct thread_info) <last_resume_kind>: New field.
6791 <attached>: Add comment.
6792 <gdb_detached>: New field.
6793 (handler_func): Change return type to int.
6794 (handle_serial_event, handle_target_event): Ditto.
6795 (gdb_connected): Declare.
6797 (disconnected_tracing): Declare.
6798 (stop_tracing): Declare.
6800 * server.c (handle_query) <qSupported>: Report support for
6801 disconnected tracing.
6802 (queue_stop_reply_callback): Account for running threads.
6803 (gdb_wants_thread_stopped): New.
6804 (gdb_wants_all_threads_stopped): New.
6805 (gdb_reattached_process): New.
6806 (handle_status): Clear the `gdb_detached' flag of all processes.
6807 In all-stop, stop all threads.
6808 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6809 (process_serial_event): If the remote connection breaks, or if an
6810 exit was forced with "monitor exit", force an event loop exit.
6811 Handle disconnected tracing on detach.
6812 (handle_serial_event): Adjust.
6813 (handle_target_event): If GDB isn't connected, forward events back
6814 to the inferior, unless the last process exited, in which case,
6815 exit gdbserver. Adjust interface.
6817 * remote-utils.c (remote_open): Don't block in accept. Instead
6818 register an event loop source on the listen socket file
6819 descriptor. Refactor bits into ...
6820 (listen_desc): ... this new global.
6821 (gdb_connected): ... this new function.
6822 (enable_async_notification): ... this new function.
6823 (handle_accept_event): ... this new function.
6824 (remote_close): Clear remote_desc.
6826 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6828 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6830 (mourn_inferior): Define.
6831 (target_process_qsupported): Avoid the dangling else problem.
6832 (thread_stopped): Define.
6833 (pause_all): Define.
6834 (target_waitstatus_to_string): Declare.
6835 * target.c (target_waitstatus_to_string): New.
6837 * tracepoint.c (tracing): Make extern.
6838 (disconnected_tracing): New.
6839 (stop_tracing): Make extern. Handle tracing stops due to GDB
6841 (cmd_qtdisconnected): New.
6842 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6843 (handle_tracepoint_general_set): Handle QTDisconnected.
6845 * event-loop.c (event_handler_func): Change return type to int.
6846 (process_event): Bail out if the event handler wants the event
6848 (handle_file_event): Ditto.
6849 (start_event_loop): Bail out if the event handler wants the event
6852 * nto-low.c (nto_target_ops): Adjust.
6853 * spu-low.c (spu_wait): Don't remove the process here.
6854 (spu_target_ops): Adjust.
6855 * win32-low.c (win32_wait): Don't remove the process here.
6856 (win32_target_ops): Adjust.
6858 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6860 * regcache.c (realloc_register_cache): Invalidate inferior's
6861 regcache before recreating it.
6863 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6865 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6867 2010-04-09 Stan Shebs <stan@codesourcery.com>
6868 Pedro Alves <pedro@codesourcery.com>
6870 * server.h (LONGEST): New.
6871 (struct thread_info) <while_stepping>: New field.
6872 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6874 (initialize_tracepoint, handle_tracepoint_general_set)
6875 (handle_tracepoint_query, tracepoint_finished_step)
6876 (tracepoint_was_hit, release_while_stepping_state_list):
6877 (current_traceframe): Declare.
6878 * server.c (handle_general_set): Handle tracepoint packets.
6880 (write_memory): New.
6881 (handle_search_memory_1): Use read_memory.
6882 (handle_query): Report support for conditional tracepoints, trace
6883 state variables, and tracepoint sources. Handle tracepoint
6885 (main): Initialize the tracepoints module.
6886 (process_serial_event): Handle traceframe reads/writes.
6888 * linux-low.c (handle_tracepoints): New.
6889 (linux_wait_1): Call it.
6890 (linux_resume_one_lwp): Handle while-stepping.
6891 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6892 (linux_target_ops): Install them.
6893 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6895 * linux-x86-low.c (x86_supports_tracepoints): New.
6896 (the_low_target). Install it.
6898 * mem-break.h (delete_breakpoint): Declare.
6899 * mem-break.c (delete_breakpoint): Make external.
6901 * target.h (struct target_ops): Add `supports_tracepoints',
6902 `read_pc', and `write_pc' fields.
6903 (target_supports_tracepoints): Define.
6904 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6907 * regcache.h (struct regcache) <registers_owned>: New field.
6908 (init_register_cache, regcache_cpy): Declare.
6909 (regcache_read_pc, regcache_write_pc): Declare.
6910 (register_cache_size): Declare.
6911 (supply_regblock): Declare.
6912 * regcache.c (init_register_cache): New.
6913 (new_register_cache): Use it.
6914 (regcache_cpy): New.
6915 (register_cache_size): New.
6916 (supply_regblock): New.
6917 (regcache_read_pc, regcache_write_pc): New.
6919 * tracepoint.c: New.
6921 * Makefile.in (OBS): Add tracepoint.o.
6922 (tracepoint.o): New rule.
6924 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6926 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6928 (i386-mmx.c): Likewise.
6929 (i386-mmx-linux.o): Likewise.
6930 (i386-mmx-linux.c): Likewise.
6932 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6933 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6934 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6935 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6937 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6938 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6939 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6941 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6943 * Makefile.in (clean): Updated.
6945 (i386-avx.c): Likewise.
6946 (i386-avx-linux.o): Likewise.
6947 (i386-avx-linux.c): Likewise.
6948 (amd64-avx.o): Likewise.
6949 (amd64-avx.c): Likewise.
6950 (amd64-avx-linux.o): Likewise.
6951 (amd64-avx-linux.c): Likewise.
6953 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6954 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6955 (srv_amd64_regobj): Add amd64-avx.o.
6956 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6957 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6958 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6959 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6960 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6961 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6962 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6964 * i387-fp.c: Include "i386-xstate.h".
6966 (i387_cache_to_xsave): Likewise.
6967 (i387_xsave_to_cache): Likewise.
6968 (x86_xcr0): Likewise.
6970 * i387-fp.h (i387_cache_to_xsave): Likewise.
6971 (i387_xsave_to_cache): Likewise.
6972 (x86_xcr0): Likewise.
6974 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6975 * linux-crisv32-low.c (target_regsets): Likewise.
6976 * linux-m68k-low.c (target_regsets): Likewise.
6977 * linux-mips-low.c (target_regsets): Likewise.
6978 * linux-ppc-low.c (target_regsets): Likewise.
6979 * linux-s390-low.c (target_regsets): Likewise.
6980 * linux-sh-low.c (target_regsets): Likewise.
6981 * linux-sparc-low.c (target_regsets): Likewise.
6982 * linux-xtensa-low.c (target_regsets): Likewise.
6984 * linux-low.c: Include <sys/uio.h>.
6985 (regsets_fetch_inferior_registers): Support nt_type.
6986 (regsets_store_inferior_registers): Likewise.
6987 (linux_process_qsupported): New.
6988 (linux_target_ops): Add linux_process_qsupported.
6990 * linux-low.h (regset_info): Add nt_type.
6991 (linux_target_ops): Add process_qsupported.
6993 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6995 (init_registers_i386_avx_linux): New.
6996 (init_registers_amd64_avx_linux): Likewise.
6997 (xmltarget_i386_linux_no_xml): Likewise.
6998 (xmltarget_amd64_linux_no_xml): Likewise.
6999 (PTRACE_GETREGSET): Likewise.
7000 (PTRACE_SETREGSET): Likewise.
7001 (x86_fill_xstateregset): Likewise.
7002 (x86_store_xstateregset): Likewise.
7003 (use_xml): Likewise.
7004 (x86_linux_update_xmltarget): Likewise.
7005 (x86_linux_process_qsupported): Likewise.
7006 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7007 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7008 init_registers_i386_linux here. Call
7009 x86_linux_update_xmltarget.
7010 (the_low_target): Add x86_linux_process_qsupported.
7012 * server.c (handle_query): Call target_process_qsupported.
7014 * target.h (target_ops): Add process_qsupported.
7015 (target_process_qsupported): New.
7017 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7019 * inferiors.c (add_thread): Set last_status kind to
7020 TARGET_WAITKIND_IGNORE.
7021 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7022 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7023 (linux_wait_1): Move `thread' local definition to block that uses
7024 it. Don't NULL initialize `event_child'.
7025 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7026 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7027 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7029 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7031 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7032 an extended waitstatus, or by a watchpoint.
7033 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7034 thread was stepping or has been stopped by a watchpoint.
7036 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7038 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7039 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7040 of another, then delete the previous, and validate all
7042 (validate_inserted_breakpoint): New.
7043 (delete_disabled_breakpoints): New.
7044 (validate_breakpoints): New.
7045 (check_mem_read): Validate breakpoints before trusting their
7046 shadow. Delete disabled breakpoints.
7047 (check_mem_write): Validate breakpoints before trusting they
7048 should be inserted. Delete disabled breakpoints.
7049 * mem-break.h (validate_breakpoints):
7050 * server.c (handle_query): Validate breakpoints when we see a
7053 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7055 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7056 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7057 if we could tell there's a GDB breakpoint at stop_pc.
7058 (need_step_over_p): Don't do a step over if we find a GDB
7059 breakpoint at the resume PC.
7061 * mem-break.c (struct raw_breakpoint): New.
7062 (enum bkpt_type): New type `gdb_breakpoint'.
7063 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7064 fields. New field `raw'.
7065 (find_raw_breakpoint_at): New.
7066 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7068 (set_breakpoint_at): Adjust.
7069 (delete_raw_breakpoint): New.
7070 (release_breakpoint): New.
7071 (delete_breakpoint): Rename to...
7072 (delete_breakpoint_1): ... this. Add proc parameter. Use
7073 release_breakpoint. Return ENOENT.
7074 (delete_breakpoint): Reimplement.
7075 (find_breakpoint_at): Delete.
7076 (find_gdb_breakpoint_at): New.
7077 (delete_breakpoint_at): Delete.
7078 (set_gdb_breakpoint_at): New.
7079 (delete_gdb_breakpoint_at): New.
7080 (gdb_breakpoint_here): New.
7081 (set_reinsert_breakpoint): Use release_breakpoint.
7082 (uninsert_breakpoint): Rename to ...
7083 (uninsert_raw_breakpoint): ... this.
7084 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7085 (reinsert_raw_breakpoint): Change parameter type to
7087 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7089 (check_breakpoints): Adjust. Use release_breakpoint.
7090 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7091 (breakpoint_inserted_here): Ditto.
7092 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7093 Don't trust the breakpoint's shadow if it is not inserted.
7094 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7095 (delete_all_breakpoints): Adjust.
7096 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7097 use delete_breakpoint_1.
7099 * mem-break.h (breakpoints_supported): Delete declaration.
7100 (set_gdb_breakpoint_at): Declare.
7101 (gdb_breakpoint_here): Declare.
7102 (delete_breakpoint_at): Delete.
7103 (delete_gdb_breakpoint_at): Declare.
7105 * server.h (struct raw_breakpoint): Forward declare.
7106 (struct process_info): New field `raw_breakpoints'.
7108 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7111 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7113 * linux-low.c (status_pending_p_callback): Fix comment.
7114 (linux_wait_for_event_1): Move most of the internal breakpoint
7115 handling from here...
7116 (linux_wait_1): ... to here.
7117 (count_events_callback): New.
7118 (select_singlestep_lwp_callback): New.
7119 (select_event_lwp_callback): New.
7120 (cancel_breakpoints_callback): New.
7121 (select_event_lwp): New.
7122 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7123 priority to all LWPs that have had events that should be reported
7124 to the client. Cancel breakpoints when about to reporting the
7125 event to the client, not while stopping lwps. No longer cancel
7126 finished single-steps here.
7127 (cancel_finished_single_step): Delete.
7128 (cancel_finished_single_steps): Delete.
7130 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7132 * mem-break.c (enum bkpt_type): New.
7133 (struct breakpoint): New field `type'.
7134 (set_breakpoint_at): Change return type to struct breakpoint
7135 pointer. Set type to `other_breakpoint' by default.
7136 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7137 in the breakpoint list.
7138 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7139 (reinsert_breakpoint): Rename to ...
7140 (reinsert_raw_breakpoint): ... this.
7141 (reinsert_breakpoints_at): Adjust.
7142 * mem-break.h (struct breakpoint): Declare.
7143 (set_breakpoint_at): Change return type to struct breakpoint
7146 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7148 * server.c (handle_query): Assign, not compare.
7150 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7152 Teach linux gdbserver to step-over-breakpoints.
7154 * linux-low.c (can_hardware_single_step): New.
7155 (supports_breakpoints): New.
7156 (handle_extended_wait): If stopping threads, read the stop pc of
7159 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7160 low target doesn't support retrieving the PC.
7161 (add_lwp): Set last_resume_kind to resume_continue.
7162 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7163 (linux_attach): Don't clear stop_expected. Set the lwp's
7164 last_resume_kind to resume_stop.
7165 (linux_detach_one_lwp): Don't check for removed breakpoints.
7166 (check_removed_breakpoint): Delete.
7167 (status_pending_p): Rename to ...
7168 (status_pending_p_callback): ... this. Don't check for removed
7169 breakpoints. Don't consider threads that are stopped from GDB's
7171 (linux_wait_for_lwp): Always read the stop_pc here.
7172 (cancel_breakpoint): New.
7173 (step_over_bkpt): New global.
7174 (linux_wait_for_event_1): Implement stepping over breakpoints.
7175 (gdb_wants_lwp_stopped): New.
7176 (gdb_wants_all_stopped): New.
7177 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7178 single-step traps here. Store the thread's last reported target
7180 (send_sigstop): Don't clear stop_expected. Always set it,
7182 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7183 (cancel_finished_single_step): New.
7184 (cancel_finished_single_steps): New.
7185 (wait_for_sigstop): Don't cancel finished single-step traps here.
7186 (linux_resume_one_lwp): Don't check for removed breakpoints.
7187 Don't set `step' on non-hardware step archs.
7188 (linux_set_resume_request): Ignore resume_stop requests if already
7189 stopping or stopped. Set the lwp's last_resume_kind.
7190 (resume_status_pending_p): Don't check for removed breakpoints.
7191 (need_step_over_p): New.
7192 (start_step_over): New.
7193 (finish_step_over): New.
7194 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7195 requests. Clear the thread's last reported target waitstatus.
7196 Don't use the `suspended' flag. Don't consider pending breakpoints.
7197 (linux_resume): Start a step-over if necessary.
7198 (proceed_one_lwp): New.
7199 (proceed_all_lwps): New.
7200 (unstop_all_lwps): New.
7201 * linux-low.h (struct lwp_info): Rewrite comment for the
7202 `suspended' flag. Add the `stop_pc' field. Delete the
7203 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7204 Add `'last_resume_kind' and `need_step_over' fields.
7205 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7206 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7207 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7208 (set_raw_breakpoint_at): New.
7209 (set_breakpoint_at): Rewrite to use it.
7210 (reinsert_breakpoint_handler): Delete.
7211 (set_reinsert_breakpoint): New.
7212 (reinsert_breakpoint_by_bp): Delete.
7213 (delete_reinsert_breakpoints): New.
7214 (uninsert_breakpoint): Rewrite.
7215 (uninsert_breakpoints_at): New.
7216 (reinsert_breakpoint): Rewrite.
7217 (reinsert_breakpoints_at): New.
7218 (check_breakpoints): Rewrite.
7219 (breakpoint_here): New.
7220 (breakpoint_inserted_here): New.
7221 (check_mem_read): Adjust.
7222 * mem-break.h (breakpoints_supported, breakpoint_here)
7223 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7224 (reinsert_breakpoint_by_bp): Delete declaration.
7225 (delete_reinsert_breakpoints): Declare.
7226 (reinsert_breakpoint): Delete declaration.
7227 (reinsert_breakpoints_at): Declare.
7228 (uninsert_breakpoint): Delete declaration.
7229 (uninsert_breakpoints_at): Declare.
7230 (check_breakpoints): Adjust prototype.
7231 * server.h: Adjust include order.
7232 (struct thread_info): Declare here. Add a `last_status' field.
7234 2010-03-23 Michael Snyder <msnyder@vmware.com>
7236 * server.c (crc32): New function.
7237 (handle_query): Add handling for 'qCRC:' request.
7239 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7241 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7242 lwp had been stopped by a watchpoint.
7244 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7246 * server.h (internal_error): Declare.
7247 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7248 * utils.c (internal_error): New function.
7250 2010-03-15 Andreas Schwab <schwab@redhat.com>
7252 * configure.srv: Fix typo setting srv_regobj.
7254 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7256 * linux-low.c (fetch_register): Avoid passing a non string literal
7258 (usr_store_inferior_registers): Ditto.
7260 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7262 * linux-low.c (linux_write_memory): Bail out early if peeking
7265 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7267 * linux-low.h (struct lwp_info): New fields
7268 `stopped_by_watchpoint' and `stopped_data_address'.
7269 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7270 here, and cache them in the lwp object.
7271 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7273 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7275 (linux_stopped_by_watchpoint): Rewrite.
7276 (linux_stopped_data_address): Rewrite.
7278 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7280 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7281 switching the current inferior, not before.
7283 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7285 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7286 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7287 i386-linux.c and amd64-linux.c.
7288 (reg-i386.o): Removed.
7289 (reg-i386.c): Likewise.
7290 (reg-i386-linux.o): Likewise.
7291 (reg-i386-linux.c): Likewise.
7292 (reg-x86-64.o): Likewise.
7293 (reg-x86-64.c): Likewise.
7294 (reg-x86-64-linux.o): Likewise.
7295 (reg-x86-64-linux.c): Likewise.
7298 (i386-linux.o): Likewise.
7299 (i386-linux.c): Likewise.
7300 (amd64.o): Likewise.
7301 (amd64.c): Likewise.
7302 (amd64-linux.o): Likewise.
7303 (amd64-linux.c): Likewise.
7305 * configure.srv (srv_i386_regobj): New.
7306 (srv_i386_linux_regobj): Likewise.
7307 (srv_amd64_regobj): Likewise.
7308 (srv_amd64_linux_regobj): Likewise.
7309 (srv_i386_32bit_xmlfiles): Likewise.
7310 (srv_i386_64bit_xmlfiles): Likewise.
7311 (srv_i386_xmlfiles): Likewise.
7312 (srv_amd64_xmlfiles): Likewise.
7313 (srv_i386_linux_xmlfiles): Likewise.
7314 (srv_amd64_linux_xmlfiles): Likewise.
7315 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7316 srv_xmlfiles to $srv_i386_xmlfiles.
7317 (i[34567]86-*-mingw32ce*): Likewise.
7318 (i[34567]86-*-mingw*): Likewise.
7319 (i[34567]86-*-nto*): Likewise.
7320 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7321 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7322 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7323 (x86_64-*-linux*): Likewise.
7325 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7326 (init_registers_amd64_linux): New.
7327 (x86_arch_setup): Replace init_registers_x86_64_linux with
7328 init_registers_amd64_linux.
7330 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7332 * configure.ac: Check for libdl. If it is not available link against
7333 static libthread_db.
7334 * configure: Regenerate.
7336 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7340 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7341 handing a read watchpoint.
7342 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7344 2010-02-12 Doug Evans <dje@google.com>
7346 * linux-low.c (linux_supports_tracefork_flag): Document.
7347 (linux_look_up_symbols): Add comment.
7349 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7351 * regcache.c (supply_register): Clear regcache if buf is NULL.
7353 2010-02-02 Nicolas Roche <roche@sourceware.org>
7354 Joel Brobecker <brobecker@adacore.com>
7356 * inferiors.c (find_inferior): Add function documentation.
7357 (unloaded_dll): Handle the case where the unloaded dll has not
7358 been previously registered in the dll list.
7360 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7362 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7363 (thumb2_breakpoint): New.
7364 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7366 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7368 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7369 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7372 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7374 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7376 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7378 * linux-s390-low.c (s390_collect_ptrace_register)
7379 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7381 2010-01-21 Doug Evans <dje@google.com>
7383 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7384 (PTRACE_ARG4_TYPE): New macro.
7385 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7386 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7387 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7388 (usr_store_inferior_registers): Ditto.
7389 (linux_read_memory, linux_write_memory): Ditto.
7390 (linux_test_for_tracefork): Ditto.
7392 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7393 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7395 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7397 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7400 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7402 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7403 prototype to take a regcache. Adjust.
7405 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7407 * regcache.h (struct thread_info): Forward declare.
7408 (struct regcache): New.
7409 (new_register_cache): Adjust prototype.
7410 (get_thread_regcache): Declare.
7411 (free_register_cache): Adjust prototype.
7412 (registers_to_string, registers_from_string): Ditto.
7413 (supply_register, supply_register_by_name, collect_register)
7414 (collect_register_as_string, collect_register_by_name): Ditto.
7415 * regcache.c (struct inferior_regcache_data): Delete.
7416 (get_regcache): Rename to ...
7417 (get_thread_regcache): ... this. Adjust. Switch inferior before
7419 (regcache_invalidate_one): Adjust.
7420 (regcache_invalidate): Fix prototype.
7421 (new_register_cache): Return the new register cache.
7422 (free_register_cache): Change prototype.
7423 (realloc_register_cache): Adjust.
7424 (registers_to_string): Change prototype to take a regcache. Adjust.
7425 (registers_from_string): Ditto.
7426 (register_data): Ditto.
7427 (supply_register): Ditto.
7428 (supply_register_by_name): Ditto.
7429 (collect_register): Ditto.
7430 (collect_register_as_string): Ditto.
7431 (collect_register_by_name): Ditto.
7432 * server.c (process_serial_event): Adjust.
7433 * linux-low.h (regset_fill_func, regset_store_func): Change
7435 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7437 * linux-low.c (get_stop_pc): Adjust.
7438 (check_removed_breakpoint): Adjust.
7439 (linux_wait_for_event): Adjust.
7440 (linux_resume_one_lwp): Adjust.
7441 (fetch_register): Add regcache parameter. Adjust.
7442 (usr_store_inferior_registers): Ditto.
7443 (regsets_fetch_inferior_registers): Ditto.
7444 (regsets_store_inferior_registers): Ditto.
7445 (linux_fetch_registers, linux_store_registers): Ditto.
7446 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7448 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7450 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7451 prototype to take a regcache.
7452 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7453 * remote-utils.c (convert_ascii_to_int, outreg)
7454 (prepare_resume_reply): Change prototype to take a regcache.
7456 * target.h (struct target_ops) <fetch_registers, store_registers>:
7457 Change prototype to take a regcache.
7458 (fetch_inferior_registers, store_inferior_registers): Change
7459 prototype to take a regcache. Adjust.
7460 * proc-service.c (ps_lgetregs): Adjust.
7461 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7462 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7463 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7464 take a regcache. Adjust.
7465 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7466 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7467 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7468 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7469 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7470 (cris_cannot_fetch_register):
7471 (cris_breakpoint_at): Change prototype to take a regcache.
7473 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7474 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7475 to take a regcache. Adjust.
7476 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7478 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7479 take a regcache. Adjust.
7480 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7481 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7482 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7483 * linux-mips-low.c (mips_get_pc):
7484 (mips_set_pc): Change prototype to take a regcache. Adjust.
7485 (mips_reinsert_addr): Adjust.
7486 (mips_collect_register): Change prototype to take a regcache.
7488 (mips_supply_register):
7489 (mips_collect_register_32bit, mips_supply_register_32bit)
7490 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7491 (mips_store_fpregset): Ditto.
7492 * linux-ppc-low.c (ppc_supply_ptrace_register)
7493 (ppc_supply_ptrace_register): Ditto.
7494 (parse_spufs_run): Adjust.
7495 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7496 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7497 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7498 take a regcache. Adjust.
7499 * linux-s390-low.c (s390_collect_ptrace_register)
7500 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7501 (s390_set_pc): Change prototype to take a regcache. Adjust.
7502 (s390_arch_setup): Adjust.
7503 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7504 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7505 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7506 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7507 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7509 (sparc_breakpoint_at): Adjust.
7510 * linux-xtensa-low.c (xtensa_fill_gregset):
7511 (xtensa_store_gregset):
7512 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7513 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7514 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7515 prototype to take a regcache. Adjust.
7516 * win32-arm-low.c (arm_fetch_inferior_register)
7517 (arm_store_inferior_register): Change prototype to take a
7519 * win32-i386-low.c (i386_fetch_inferior_register)
7520 (i386_store_inferior_register): Change prototype to take a
7522 * win32-low.c (child_fetch_inferior_registers)
7523 (child_store_inferior_registers): Change prototype to take a
7525 (win32_wait): Adjust.
7526 (win32_fetch_inferior_registers): Change prototype to take a
7528 (win32_store_inferior_registers): Adjust.
7529 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7530 store_inferior_register>: Change prototype to take a regcache.
7532 2010-01-20 Doug Evans <dje@google.com>
7534 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7536 (linux_wait_for_event1, linux_init_signals): Ditto.
7537 (W_STOPCODE): Provide definition if missing.
7539 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7541 * linux-low.c (linux_core_of_thread): New.
7542 (compare_ints, show_process, list_threads): New.
7543 (linux_qxfer_osdata): Report threads and cores.
7544 (linux_target_op): Register linux_core_of_thread.
7545 * remote-utils.c (prepare_resume_reply): Report the core.
7546 (buffer_xml_printf): Support %d specifier.
7547 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7549 (handle_query): Handle qXfer:threads. Announce availability
7551 * target.h (struct target_ops): New field core_of_thread.
7553 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7555 * Makefile.in (clean): Remove new generated files.
7556 (reg-s390.o, reg-s390.c): Remove rules.
7557 (reg-s390x.o, reg-s390x.c): Likewise.
7558 (s390-linux32.o, s390-linux32.c): Add rules.
7559 (s390-linux64.o, s390-linux64.c): Likewise.
7560 (s390x-linux64.o, s390x-linux64.c): Likewise.
7561 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7562 * linux-s390-low.c: Include <elf.h>.
7563 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7564 (init_registers_s390): Remove prototype.
7565 (init_registers_s390x): Likewise.
7566 (init_registers_s390_linux32): Add prototype.
7567 (init_registers_s390_linux64): Likewise.
7568 (init_registers_s390x_linux64): Likewise.
7569 (s390_num_regs_3264): New define.
7570 (s390_regmap_3264): New global variable.
7571 (s390_cannot_fetch_register): Remove obsolete check.
7572 (s390_cannot_store_register): Likewise.
7573 (s390_collect_ptrace_register): Handle upper/lower register halves.
7574 (s390_supply_ptrace_register): Likewise.
7575 (s390_fill_gregset): Update to register number changes.
7576 (s390_get_hwcap): New routine.
7577 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7578 Install appropriate regmap and register set.
7580 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7582 * server.c (gdbserver_version): Update copyright year to 2010.
7583 * gdbreplay.c (gdbreplay_version): Likewise.
7585 2009-12-28 Doug Evans <dje@google.com>
7587 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7588 elf/external.h. Include <elf.h> instead but only if necessary.
7590 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7592 * linux-low.c (linux_remove_process): Remove `detaching'
7593 parameter. Don't release/detach from thread_db here.
7594 (linux_kill): Release/detach from thread_db here, ...
7595 (linux_detach): ... and here, before actually detaching.
7596 (linux_wait_1): ... and here, when a process exits.
7597 * thread-db.c (any_thread_of): New.
7598 (thread_db_free): Switch the current inferior to a thread of the
7601 2009-12-21 Doug Evans <dje@google.com>
7603 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7605 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7606 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7607 warning ifndef __NR_tkill. Move setting of errno there too.
7608 Delete unnecessary resetting of errno after syscall.
7609 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7611 * configure.ac: Check for dladdr.
7612 * config.in: Regenerate.
7613 * configure: Regenerate.
7614 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7615 (try_thread_db_load): Update.
7617 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7619 2009-12-18 Doug Evans <dje@google.com>
7621 * event-loop.c: Include unistd.h if it exists.
7623 * linux-low.c (my_waitpid): Move definition away from being in
7624 between linux_tracefork_child/linux_test_for_tracefork.
7626 * gdb_proc_service.h (psaddr_t): Fix type.
7627 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7628 signature to match glibc.
7630 2009-12-16 Doug Evans <dje@google.com>
7632 * linux-low.c (linux_read_memory): Fix argument to read.
7634 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7636 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7637 events, don't leave current_inferior pointing at null.
7639 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7641 * win32-low.c (LOG): Delete.
7642 (OUTMSG): Output to stderr.
7643 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7644 on compile time LOG macro.
7645 (win32_wait): Fix debug output.
7647 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7649 * win32-low.c (win32_add_one_solib): If the dll name is
7650 "ntdll.dll", prepend the system directory to the dll path.
7652 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7654 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7656 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7657 Vladimir Prus <vladimir@codesourcery.com>
7659 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7660 * configure.ac: Check for __mcoldfire__ and set
7661 gdb_cv_m68k_is_coldfire.
7662 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7663 reg-cf.o and reg-m68k.o.
7664 * configure: Regenerated.
7666 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7668 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7669 Pass it to thread_db_free.
7670 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7671 proper `detaching' argument to linux_remove_process.
7672 * linux-low.h (thread_db_free): Add `detaching' parameter.
7673 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7675 (thread_db_free): Add `detaching' parameter. Only
7676 call td_ta_clear_event if detaching from process.
7678 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7680 * thread-db.c (thread_db_free): Fix typo.
7682 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7685 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7687 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7689 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7690 with an i686 compiler.
7691 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7693 * configure: Rebuilt.
7695 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7699 * server.c (handle_search_memory_1): Correct read_addr initialization
7700 in loop for searching subsequent chunks.
7702 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7704 * configure.ac: New --with-libthread-db option.
7705 * thread-db.c: Allow direct dependence on libthread_db.
7706 (thread_db_free): Adjust.
7707 * config.in: Regenerate.
7708 * configure: Likewise.
7710 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7713 * thread-db.c (attach_thread): New function.
7714 (maybe_attach_thread): Return success/failure.
7715 (find_new_threads_callback): Adjust.
7716 (thread_db_find_new_threads): Loop until no new threads.
7718 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7720 * proc-service.c (ps_lgetregs): Formatting.
7722 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7724 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7725 * configure.ac: Adjust.
7726 * linux-low.h (struct process_info_private): Move members to struct
7728 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7729 * linux-low.c (linux_remove_process): Adjust.
7730 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7731 * server.c (handle_query): Move code ...
7732 (handle_monitor_command): ... here. New function.
7733 * target.h (struct target_ops): New member.
7734 * thread-db.c (struct thread_db): New.
7735 (libthread_db_search_path): New variable.
7736 (thread_db_create_event, thread_db_enable_reporting)
7737 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7738 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7739 (try_thread_db_load_1, dladdr_to_soname): New functions.
7740 (try_thread_db_load, thread_db_load_search): New functions.
7741 (thread_db_init): Search for libthread_db.
7742 (thread_db_free): New function.
7743 (thread_db_handle_monitor_command): Likewise.
7744 * config.in: Regenerate.
7745 * configure: Regenerate.
7747 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7749 * spu-low.c (spu_kill): Wait for inferior to terminate.
7750 Call clear_inferiors.
7751 (spu_detach): Call clear_inferiors.
7753 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7755 * aclocal.m4: Regenerate.
7756 * config.in: Likewise.
7757 * configure: Likewise.
7759 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7761 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7762 (parse_spufs_run): New function.
7763 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7764 (ppc_breakpoint_at): Handle SPU breakpoints.
7766 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7768 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7769 (SPUFS_MAGIC): Define.
7770 (spu_enumerate_spu_ids): New function.
7771 (linux_qxfer_spu): New function.
7772 (linux_target_ops): Install linux_qxfer_spu.
7774 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7776 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7777 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7778 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7779 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7780 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7781 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7782 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7783 (init_registers_powerpc_cell32l): Add prototype.
7784 (init_registers_powerpc_cell64l): Likewise.
7785 (ppc_arch_setup): Detect Cell/B.E. architecture.
7787 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7789 * Makefile.in (datarootdir): New variable.
7791 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7793 * linux-low.c (linux_write_memory): Update debugging output.
7794 * Makefile.in (clean): Add new descriptions.
7795 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7796 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7797 * configure.srv: Add new files for arm*-*-linux*.
7798 * linux-arm-low.c: Add new declarations.
7799 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7800 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7801 (HWCAP_VFPv3D16): New.
7802 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7803 instead of __IWMMXT__.
7804 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7805 (arm_arch_setup): New.
7806 (target_regsets): Remove #ifdef. Add VFP regset.
7807 (the_low_target): Use arm_arch_setup.
7809 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7811 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7812 the main thread again.
7814 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7816 Adding Neutrino gdbserver.
7817 * configure: Regenerated.
7818 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7819 * configure.srv (i[34567]86-*-nto*): New target.
7820 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7821 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7822 (nto_comctrl) [__QNX__]: New function.
7823 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7825 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7827 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7830 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7831 Pedro Alves <pedro@codesourcery.com>
7833 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7834 don't support CONTEXT_EXTENDED_REGISTERS.
7835 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7836 (the_low_target): Install them.
7837 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7838 failing with ERROR_PIPE_NOT_CONNECTED.
7840 2009-06-30 Doug Evans <dje@google.com>
7841 Pierre Muller <muller@ics.u-strasbg.fr>
7843 Add h/w watchpoint support to x86-linux, win32-i386.
7844 * Makefile.in (SFILES): Add i386-low.c
7845 (i386_low_h): Define.
7846 (i386-low.o): Add dependencies.
7847 (linux-x86-low.o): Add i386-low.h dependency.
7848 (win32-i386-low.o): Ditto.
7849 * i386-low.c: New file.
7850 * i386-low.h: New file.
7851 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7852 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7853 * linux-low.c (linux_add_process): Initialize arch_private.
7854 (linux_remove_process): Free arch_private.
7855 (add_lwp): Initialize arch_private.
7856 (delete_lwp): Free arch_private.
7857 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7859 * linux-low.h (process_info_private): New member arch_private.
7860 (lwp_info): New member arch_private.
7861 (linux_target_ops): New members new_process, new_thread,
7863 (ptid_of): New macro.
7864 * linux-x86-low.c: Include stddef.h, i386-low.h.
7865 (arch_process_info): New struct.
7866 (arch_lwp_info): New struct.
7867 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7868 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7869 (i386_dr_low_get_status): New function.
7870 (x86_insert_point, x86_remove_point): New functions.
7871 (x86_stopped_by_watchpoint): New function.
7872 (x86_stopped_data_address): New function.
7873 (x86_linux_new_process, x86_linux_new_thread): New functions.
7874 (x86_linux_prepare_to_resume): New function.
7875 (the_low_target): Add entries for insert_point, remove_point,
7876 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7878 * server.c (debug_hw_points): New global.
7879 (monitor_show_help): Document set debug-hw-points.
7880 (handle_query): Process "set debug-hw-points".
7881 * server.h (debug_hw_points): Declare.
7882 (paddress): Declare.
7883 * utils.c (NUMCELLS, CELLSIZE): New macros.
7884 (get_sell, xsnprintf, paddress): New functions.
7885 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7886 remove_point, stopped_by_watchpoint, stopped_data_address.
7887 * win32-i386-low.c: Include i386-low.h.
7888 (debug_reg_state): Replaces dr.
7889 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7890 (i386_dr_low_get_status): New function.
7891 (i386_insert_point, i386_remove_point): New functions.
7892 (i386_stopped_by_watchpoint): New function.
7893 (i386_stopped_data_address): New function.
7894 (i386_initial_stuff): Update.
7895 (get_thread_context,set_thread_context,i386_thread_added): Update.
7896 (the_low_target): Add entries for insert_point,
7897 remove_point, stopped_by_watchpoint, stopped_data_address.
7898 * win32-low.c (win32_insert_watchpoint): New function.
7899 (win32_remove_watchpoint): New function.
7900 (win32_stopped_by_watchpoint): New function.
7901 (win32_stopped_data_address): New function.
7902 (win32_target_ops): Add entries for insert_watchpoint,
7903 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7904 * win32-low.h (win32_target_ops): New members insert_point,
7905 remove_point, stopped_by_watchpoint, stopped_data_address.
7907 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7909 * server.c (process_serial_event): Re-return unsupported, not
7910 error, if the type isn't recognized. Re-allow supporting only
7911 insert or remove packets. Also call require_running for
7912 breakpoints. Add missing break statement to default case. Tidy.
7913 * target.h (struct target_ops): Rename insert_watchpoint to
7914 insert_point, and remove_watchpoint to remove_point.
7916 * linux-low.h (struct linux_target_ops): Likewise.
7917 * linux-low.c (linux_insert_watchpoint): Rename to ...
7918 (linux_insert_point): ... this. Adjust.
7919 (linux_remove_watchpoint): Rename to ...
7920 (linux_remove_point): ... this. Adjust.
7921 (linux_target_ops): Adjust.
7922 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7923 (cris_insert_point): ... this.
7924 (cris_remove_watchpoint): Rename to ...
7925 (cris_remove_point): ... this.
7926 (the_low_target): Adjust.
7928 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7930 * server.c (handle_v_kill): Pass signal_pid to
7931 kill_inferior if multi_process is zero.
7933 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7935 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7936 * target.h (target_ops): Comment for *_watchpoint to make it clear
7937 the functions can get types '0' and '1'.
7939 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7941 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7942 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7943 * regcache.c (get_regcache): Likewise.
7944 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7945 * win32-low.c (child_fetch_inferior_registers): Remove check for
7948 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7949 Pedro Alves <pedro@codesourcery.com>
7951 * target.h (struct target_ops) <supports_multi_process>: New
7953 (target_supports_multi_process): New.
7954 * server.c (handle_query): Even if GDB reports support, only
7955 enable multi-process if the target also supports it. Report
7956 multi-process support only if the target backend supports it.
7957 * linux-low.c (linux_supports_multi_process): New function.
7958 (linux_target_ops): Install it as target_supports_multi_process
7961 2009-05-24 Doug Evans <dje@google.com>
7963 Global renaming of find_thread_pid to find_thread_ptid.
7964 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7965 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7966 All callers updated.
7968 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7969 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7972 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7973 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7974 (linux_resume_one_lwp): Ditto.
7976 2009-05-23 Doug Evans <dje@google.com>
7978 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7979 from struct inferior_list_entry * to struct lwp_info *.
7980 All callers updated.
7982 2009-05-13 Doug Evans <dje@google.com>
7984 * linux-x86-low.c: Don't include assert.h.
7985 (x86_siginfo_fixup): Use fatal, not assert.
7986 (x86_arch_setup): Fix comment.
7988 2009-05-12 Doug Evans <dje@google.com>
7990 Biarch support for i386/amd64 gdbserver.
7991 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7992 Add linux-x86-low.c.
7993 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7994 (linux-x86-low.o): Add.
7995 * linux-x86-64-low.c: Delete.
7996 * linux-i386-low.c: Delete.
7997 * linux-x86-low.c: New file.
7998 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8000 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8002 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8003 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8004 (linux_child_pid_to_exec_file): New function.
8005 (elf_64_header_p, elf_64_file_p): New functions.
8006 (siginfo_fixup): New function.
8007 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8008 give target a chance to convert layout.
8009 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8010 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8012 2009-05-07 Doug Evans <dje@google.com>
8014 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8015 (regsets_store_inferior_registers): Ditto.
8017 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8021 * linux-low.c (must_set_ptrace_flags): Delete.
8022 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8024 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8025 `lwp->must_set_ptrace_flags' instead.
8026 (linux_wait_for_event_1): Set ptrace options here.
8027 (linux_wait_1): ... not here.
8029 2009-04-30 Doug Evans <dje@google.com>
8031 * inferiors.c (started_inferior_callback): New function.
8032 (attached_inferior_callback): New function.
8033 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8034 * server.c (print_started_pid, print_attached_pid): New functions.
8035 (detach_or_kill_for_exit): New function.
8036 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8037 * server.h (have_started_inferiors_p): Declare.
8038 (have_attached_inferiors_p): Declare.
8040 * inferiors.c (remove_process): Fix memory leak, free process.
8041 * linux-low.c (linux_remove_process): New function.
8042 (linux_kill): Call it instead of remove_process.
8043 (linux_detach, linux_wait_1): Ditto.
8045 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8047 * configure.srv: Add x86 Windows CE target.
8049 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8051 * inferiors.c (get_thread_process): Make global.
8052 * server.h (get_thread_process): Add prototype.
8053 * thread-db.c (find_one_thread): Use get_thread_process
8054 instead of current_process.
8055 (thread_db_get_tls_address): Do not crash if called when
8056 thread layer is not yet initialized.
8058 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8060 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8061 * spu-low.c (current_tid): Rename to ...
8062 (current_ptid): ... this.
8063 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8064 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8065 ptid_get_lwp (current_ptid) instead of current_tid.
8066 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8067 instead of current_tid. Use find_process_pid to verify pid
8068 argument is valid. Pass proper argument to remove_process.
8069 (spu_thread_alive): Compare current_ptid instead of current_tid.
8070 (spu_resume): Likewise.
8072 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8074 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8077 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8079 Implement the multiprocess extensions, and add linux multiprocess
8082 * server.h (ULONGEST): Declare.
8083 (struct ptid, ptid_t): New.
8084 (minus_one_ptid, null_ptid): Declare.
8085 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8086 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8087 (struct inferior_list_entry): Change `id' type from unsigned from
8089 (struct sym_cache, struct breakpoint, struct
8090 process_info_private): Forward declare.
8091 (struct process_info): Declare.
8092 (current_process): Declare.
8093 (all_processes): Declare.
8094 (initialize_inferiors): Declare.
8095 (add_thread): Adjust to use ptid_t.
8096 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8097 (add_process, remove_process, find_thread_pid): Declare.
8098 (find_inferior_id): Adjust to use ptid_t.
8099 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8100 (multi_process): Declare.
8101 (push_event): Adjust to use ptid_t.
8102 (read_ptid, write_ptid): Declare.
8103 (prepare_resume_reply): Adjust to use ptid_t.
8104 (clear_symbol_cache): Declare.
8105 * inferiors.c (all_processes): New.
8106 (null_ptid, minus_one_ptid): New.
8107 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8108 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8109 (add_thread): Change unsigned long to ptid. Remove gdb_id
8111 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8112 (gdb_id_to_thread): Rename to ...
8113 (find_thread_pid): ... this. Change unsigned long to ptid.
8114 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8115 (loaded_dll, pull_pid_from_list): Adjust.
8116 (add_process, remove_process, find_process_pid)
8117 (get_thread_process, current_process, initialize_inferiors): New.
8118 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8119 (struct target_waitstatus) <related_pid>: Ditto.
8120 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8122 (struct target_ops) <join>: Add `pid' argument.
8123 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8124 (struct target_ops) <wait>: Add `ptid' field. Change return type
8126 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8127 (mywait): Add `ptid' argument. Change return type to ptid_t.
8128 (target_pid_to_str): Declare.
8129 * target.c (set_desired_inferior): Adjust to use ptids.
8130 (mywait): Add new `ptid' argument. Adjust.
8131 (target_pid_to_str): New.
8132 * mem-break.h (free_all_breakpoints): Declare.
8133 * mem-break.c (breakpoints): Delelete.
8134 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8135 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8136 to use per-process breakpoint list.
8137 (free_all_breakpoints): New.
8138 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8139 (symbol_cache, all_symbols_looked_up): Delete.
8141 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8143 (prepare_resume_reply): Change ptid argument's type from unsigned
8144 long to ptid_t. Adjust. Implement W;process and X;process.
8145 (free_sym_cache, clear_symbol_cache): New.
8146 (look_up_one_symbol): Adjust to per-process symbol cache. *
8147 * server.c (cont_thread, general_thread, step_thread): Change type
8150 (multi_process): New.
8151 (last_ptid): Change type to ptid_t.
8152 (struct vstop_notif) <ptid>: Change type to ptid_t.
8153 (queue_stop_reply, push_event): Change `ptid' argument's type to
8155 (discard_queued_stop_replies): Add `pid' argument.
8156 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8157 changes. Don't reference the `attached' global.
8158 (attach_inferior): Adjust to mywait interface changes.
8159 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8160 features. Handle and report "multiprocess+". Handle
8162 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8164 (handle_v_kill): New.
8165 (handle_v_stopped): Adjust to use target_pid_to_str.
8166 (handle_v_requests): Allow multiple attaches and runs when
8167 multiprocess extensions are in effect. Handle "vKill".
8168 (myresume): Adjust to use ptids.
8169 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8170 (handle_status): Adjust to discard_queued_stop_replies interface
8172 (first_thread_of, kill_inferior_callback)
8173 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8174 (main): Call initialize_inferiors. Adjust to use ptids, killing
8175 and detaching from all inferiors. Handle multiprocess packet
8177 * linux-low.h: Include gdb_proc_service.h.
8178 (struct process_info_private): New.
8179 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8180 <lwpid_of>: Use ptid_get_lwp.
8181 (get_lwp_thread): Adjust.
8182 (struct lwp_info): Add `dead' member.
8183 (find_lwp_pid): Declare.
8184 * linux-low.c (thread_db_active): Delete.
8185 (new_inferior): Adjust comment.
8186 (inferior_pid): Delete.
8187 (linux_add_process): New.
8188 (handle_extended_wait): Adjust.
8189 (add_lwp): Change unsigned long to ptid.
8190 (linux_create_inferior): Add process to processes table. Adjust
8191 to use ptids. Don't set new_inferior here.
8192 (linux_attach_lwp): Rename to ...
8193 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8194 it. Adjust to use ptids.
8195 (linux_attach_lwp): New.
8196 (linux_attach): Add process to processes table. Don't set
8198 (struct counter): New.
8199 (second_thread_of_pid_p, last_thread_of_process_p): New.
8200 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8202 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8203 processes. Remove process from process table.
8204 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8205 to multiple processes.
8206 (any_thread_of): New.
8207 (linux_detach): Add `pid' argument, and handle it. Remove process
8208 from processes table.
8209 (linux_join): Add `pid' argument. Handle it.
8210 (linux_thread_alive): Change unsighed long argument to ptid_t.
8211 Consider dead lwps as not being alive.
8212 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8213 threads we're not interested in.
8214 (same_lwp, find_lwp_pid): New.
8215 (linux_wait_for_lwp): Change `pid' argument's type from int to
8217 (linux_wait_for_event): Rename to ...
8218 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8219 from int to ptid_t. Adjust.
8220 (linux_wait_for_event): New.
8221 (linux_wait_1): Add `ptid' argument. Change return type to
8222 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8223 that exit from the process table.
8224 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8226 (mark_lwp_dead): New.
8227 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8228 stopping all threads, mark its main lwp as dead.
8229 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8231 (fetch_register, usr_store_inferior_registers)
8232 (regsets_fetch_inferior_registers)
8233 (regsets_store_inferior_registers, linux_read_memory)
8234 (linux_write_memory): Inline `inferior_pid'.
8235 (linux_look_up_symbols): Adjust to use per-process
8237 (linux_request_interrupt): Adjust to use ptids.
8238 (linux_read_auxv): Inline `inferior_pid'.
8239 (initialize_low): Don't reference thread_db_active.
8240 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8241 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8242 (ps_getpid): Return the pid of the current inferior.
8243 * thread-db.c (proc_handle, thread_agent): Delete.
8244 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8246 (find_one_thread): Change argument type to ptid_t. Adjust to
8248 (maybe_attach_thread): Adjust to per-process data and ptids.
8249 (thread_db_find_new_threads): Ditto.
8250 (thread_db_init): Ditto.
8251 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8252 processes table. Adjust to use ptids.
8253 (spu_kill, spu_detach): Adjust interface. Remove process from
8255 (spu_join, spu_thread_alive): Adjust interface.
8256 (spu_wait): Adjust interface. Remove process from processes
8257 table. Adjust to use ptids.
8258 * win32-low.c (current_inferior_tid): Delete.
8259 (current_inferior_ptid): New.
8260 (debug_event_ptid): New.
8261 (thread_rec): Take a ptid. Adjust.
8262 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8263 (child_delete_thread): Ditto.
8264 (do_initial_child_stuff): Add `attached' argument. Add process to
8266 (child_fetch_inferior_registers, child_store_inferior_registers):
8268 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8269 (win32_attach): Pass 1 to do_initial_child_stuff.
8270 (win32_kill): Adjust interface. Remove process from processes
8272 (win32_detach): Ditto.
8273 (win32_join): Adjust interface.
8274 (win32_thread_alive): Take a ptid.
8275 (win32_resume): Adjust to use ptids.
8276 (get_child_debug_event): Ditto.
8277 (win32_wait): Adjust interface. Remove exiting process from
8280 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8282 Non-stop mode support.
8284 * server.h (non_stop): Declare.
8285 (gdb_client_data, handler_func): Declare.
8286 (delete_file_handler, add_file_handler, start_event_loop):
8288 (handle_serial_event, handle_target_event, push_event)
8289 (putpkt_notif): Declare.
8290 * target.h (enum resume_kind): New.
8291 (struct thread_resume): Replace `step' field by `kind' field.
8292 (TARGET_WNOHANG): Define.
8293 (struct target_ops) <wait>: Add `options' argument.
8294 <supports_non_stop, async, start_non_stop>: New fields.
8295 (target_supports_non_stop, target_async): New.
8296 (start_non_stop): Declare.
8297 (mywait): Add `options' argument.
8298 * target.c (mywait): Add `options' argument. Print child exit
8300 (start_non_stop): New.
8301 * server.c (non_stop, own_buf, mem_buf): New globals.
8302 (struct vstop_notif): New.
8303 (notif_queue): New global.
8304 (queue_stop_reply, push_event, discard_queued_stop_replies)
8305 (send_next_stop_reply): New.
8306 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8308 (attach_inferior): In non-stop mode, don't wait for the target
8310 (handle_general_set): Handle QNonStop.
8311 (handle_query): When handling qC, return the current general
8312 thread, instead of the first thread of the list.
8313 (handle_query): If the backend supports non-stop mode, include
8314 QNonStop+ in the qSupported query response.
8315 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8317 (handle_v_attach, handle_v_run): Handle non-stop mode.
8318 (handle_v_stopped): New.
8319 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8320 (myresume): Adjust to use resume_kind. Handle non-stop.
8321 (queue_stop_reply_callback): New.
8322 (handle_status): Handle non-stop mode.
8323 (main): Clear non_stop flag on reconnection. Use the event-loop.
8324 Refactor serial protocol handling from here ...
8325 (process_serial_event): ... to this new function. When GDB
8326 selects any thread, select one here. In non-stop mode, wait until
8327 GDB acks all pending events before exiting.
8328 (handle_serial_event, handle_target_event): New.
8329 * remote-utils.c (remote_open): Install remote_desc in the event
8331 (remote_close): Remove remote_desc from the event loop.
8332 (putpkt_binary): Rename to...
8333 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8334 (putpkt_binary): New as wrapper around putpkt_binary_1.
8335 (putpkt_notif): New.
8336 (prepare_resume_reply): In non-stop mode, don't change the
8338 * event-loop.c: New.
8339 * Makefile.in (OBJ): Add event-loop.o.
8340 (event-loop.o): New rule.
8342 * linux-low.h (pid_of): Moved here.
8344 (get_lwp_thread): Use lwpid_of.
8345 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8346 * linux-low.c (pid_of): Delete.
8347 (inferior_pid): Use lwpid_of.
8348 (linux_event_pipe): New.
8349 (target_is_async_p): New.
8351 (handle_extended_wait): Use lwpid_of.
8352 (add_lwp): Don't set lwpid field.
8353 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8354 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8355 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8356 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8357 first. Adjust to linux_wait_for_event interface changes. Use
8359 (linux_detach): Don't delete the main lwp here.
8360 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8361 (status_pending_p): Don't consider explicitly suspended lwps.
8362 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8363 pointer. Add OPTIONS argument. Change return type to int. Use
8364 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8365 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8366 pointer. Add status pointer argument. Return a pid instead of a
8367 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8368 changes. In non-stop mode, don't switch to a random thread.
8369 (linux_wait): Rename to...
8370 (linux_wait_1): ... this. Add target_options argument, and handle
8371 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8372 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8373 clean exit and signal exit code. Don't stop all threads in
8374 non-stop mode. In all-stop mode, only stop all threads when
8375 reporting a stop to GDB. Handle explicit thread stop requests.
8376 (async_file_flush, async_file_mark): New.
8378 (send_sigstop): Use lwpid_of.
8379 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8380 interface changes. In non-stop mode, don't switch to a random
8382 (linux_resume_one_lwp): Use lwpid_of.
8383 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8384 (linux_resume_one_thread): ... this. Handle resume_stop. In
8385 non-stop mode, don't look for pending flag in all threads.
8386 (resume_status_pending_p): Don't consider explicitly suspended
8388 (my_waitpid): Reimplement. Emulate __WALL.
8389 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8391 (sigchld_handler, linux_supports_non_stop, linux_async)
8392 (linux_start_non_stop): New.
8393 (linux_target_ops): Register linux_supports_non_stop, linux_async
8394 and linux_start_non_stop.
8395 (initialize_low): Install SIGCHLD handler.
8396 * thread-db.c (thread_db_create_event, find_one_thread)
8397 (thread_db_get_tls_address): Use lwpid_of.
8398 * win32-low.c (win32_detach): Adjust to use resume_kind.
8399 (win32_wait): Add `options' argument.
8400 * spu-low.c (spu_resume): Adjust to use resume_kind.
8401 (spu_wait): Add `options' argument.
8403 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8405 Decouple target code from remote protocol.
8407 * target.h (enum target_waitkind): New.
8408 (struct target_waitstatus): New.
8409 (struct target_ops) <wait>: Return an unsigned long. Take a
8410 target_waitstatus pointer instead of a char pointer.
8412 * target.c (mywait): Change prototype to return an unsigned long.
8413 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8414 * server.h (thread_from_wait, old_thread_from_wait): Delete
8416 (prepare_resume_reply): Change prototype to take a
8418 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8419 (last_status, last_ptid): New.
8420 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8421 pid instead of a signal.
8422 (attach_inferior): Remove "status" and "signal" parameters.
8424 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8426 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8427 (handle_v_requests, myresume): Remove "status" and "signal"
8429 (handle_status): New.
8430 (main): Delete local `status'. Adjust.
8431 * remote-utils.c: Include target.h.
8432 (prepare_resume_reply): Change prototype to take a
8433 target_waitstatus. Adjust.
8435 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8437 * spu-low.c (spu_wait): Adjust.
8438 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8440 (win32_wait): Adjust.
8442 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8444 * target.h (struct thread_resume): Delete leave_stopped member.
8445 (struct target_ops): Add a `n' argument to the `resume' callback.
8446 * server.c (start_inferior): Adjust.
8447 (handle_v_cont, myresume): Adjust.
8448 * linux-low.c (check_removed_breakpoint): Adjust to resume
8449 interface change, and to removed leave_stopped field.
8450 (resume_ptr): Delete.
8451 (struct thread_resume_array): New.
8452 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8453 resume interface change.
8454 (linux_continue_one_thread, linux_queue_one_thread)
8455 (resume_status_pending_p): Check if the resume field is NULL
8456 instead of checking the leave_stopped member.
8457 (linux_resume): Adjust to the target resume interface change.
8458 * spu-low.c (spu_resume): Adjust to the target resume interface
8460 * win32-low.c (win32_detach, win32_resume): Ditto.
8462 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8464 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8466 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8468 (linux_continue_one_thread): Only preserve the stepping flag if
8469 there's a pending breakpoint.
8471 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8473 * server.c (main): After the inferior having exited, call
8474 remote_close before exiting gdbserver.
8476 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8478 Fix size of FPSCR in Power 7 processors.
8479 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8480 (PPC_FEATURE_HAS_DFP): New #define.
8481 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8484 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8486 * server.c (handle_query) Whitespace and formatting.
8488 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8490 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8491 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8492 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8493 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8494 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8495 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8496 Makefile.in, configure.ac: Fix whitespace throughout.
8497 * configure: Regenerate.
8499 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8501 * inferiors.c (find_inferior): Make it safe for the callback
8502 function to delete the currently iterated inferior.
8504 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8506 * Makefile.in (linuw_low_h): Move higher.
8507 (thread-db.o): Depend on $(linux_low_h).
8509 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8511 Rename "process" to "lwp" throughout.
8513 * linux-low.c (all_processes): Rename to...
8514 (all_lwps): ... this.
8515 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8516 (add_process): Rename to ...
8517 (add_lwp): ... this. Adjust.
8518 (linux_create_inferior): Adjust.
8519 (linux_attach_lwp): Adjust.
8520 (linux_attach): Adjust.
8521 (linux_kill_one_process): Rename to ...
8522 (linux_kill_one_lwp): ... this. Adjust.
8523 (linux_kill): Adjust.
8524 (linux_detach_one_process): Rename to ...
8525 (linux_detach_one_lwp): ... this. Adjust.
8526 (linux_detach): Adjust.
8527 (check_removed_breakpoint): Adjust.
8528 (status_pending_p): Adjust.
8529 (linux_wait_for_process): Rename to ...
8530 (linux_wait_for_lwp): ... this. Adjust.
8531 (linux_wait_for_event): Adjust.
8532 (send_sigstop): Adjust.
8533 (wait_for_sigstop): Adjust.
8534 (stop_all_processes): Rename to ...
8535 (stop_all_lwps): ... this.
8536 (linux_resume_one_process): Rename to ...
8537 (linux_resume_one_lwp): ... this. Adjust.
8538 (linux_set_resume_request, linux_continue_one_thread)
8539 (linux_queue_one_thread, resume_status_pending_p)
8540 (usr_store_inferior_registers, regsets_store_inferior_registers)
8541 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8543 * linux-low.h (get_process): Rename to ...
8544 (get_lwp): ... this. Adjust.
8545 (get_thread_process): Rename to ...
8546 (get_thread_lwp): ... this. Adjust.
8547 (get_process_thread): Rename to ...
8548 (get_lwp_thread): ... this. Adjust.
8549 (struct process_info): Rename to ...
8550 (struct lwp_info): ... this.
8551 (all_processes): Rename to ...
8552 (all_lwps): ... this.
8553 * proc-service.c (ps_lgetregs): Adjust.
8554 * thread-db.c (thread_db_create_event, find_one_thread)
8555 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8557 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8559 * server.c (handle_query): Handle "qAttached".
8561 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8563 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8564 GPLv3, update license URL.
8566 2009-03-01 Doug Evans <dje@google.com>
8568 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8569 (server_h): Add gdb_signals.h.
8570 (signals.o): Update.
8571 * server.h (target_signal_from_host,target_signal_to_host_p)
8572 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8574 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8576 * remote-utils.c (getpkt): Also generate remote-debug
8577 information if noack_mode is set.
8579 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8581 * server.c (handle_query): Report qXfer:siginfo:read and
8582 qXfer:siginfo:write as supported and handle them.
8583 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8584 * linux-low.c (linux_xfer_siginfo): New.
8585 (linux_target_ops): Set it.
8587 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8589 * server.c (gdbserver_usage): Mention --remote-debug.
8590 (main): Accept '--remote-debug' switch.
8592 2009-01-18 Doug Evans <dje@google.com>
8594 * regcache.c (new_register_cache): No need to check result of xcalloc.
8595 * server.c (handle_search_memory): Back out calls to xmalloc,
8596 result is checked and error is returned to user upon failure.
8597 (handle_query): Ditto. Add more checks for result of malloc.
8598 (handle_v_cont): Check result of malloc, report error back to
8600 (handle_v_run): Ditto. Call freeargv.
8601 * server.h (freeargv): Declare.
8602 * utils.c (freeargv): New fn.
8604 2009-01-15 Doug Evans <dje@google.com>
8606 * gdbreplay.c (perror_with_name): Make arg const char *.
8607 * server.h (target_signal_to_name): Make return type const char *.
8608 * thread-db.c (thread_db_err_str): Make return type const char *.
8609 * utils.c (perror_with_name): Make arg const char *.
8611 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8613 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8614 when handling a EXIT_PROCESS_DEBUG_EVENT.
8616 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8618 * gdbreplay.c (gdbreplay_version): Update copyright year.
8619 * server.c (gdbserver_version): Likewise.
8621 2009-01-05 Doug Evans <dje@google.com>
8623 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8624 (handle_extended_wait): Improve comment.
8626 2008-12-13 Doug Evans <dje@google.com>
8628 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8629 * server.h (ATTR_MALLOC): New macro.
8630 (xmalloc,xcalloc,xstrdup): Declare.
8631 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8632 * inferiors.c: Ditto.
8633 * linux-low.c: Ditto.
8634 * mem-break.c: Ditto.
8635 * regcache.c: Ditto.
8636 * remote-utils.c: Ditto.
8639 * win32-low.c: Ditto.
8641 2008-12-12 Doug Evans <dje@google.com>
8643 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8644 in debugging printf.
8646 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8648 2008-12-09 Doug Evans <dje@google.com>
8650 * linux-low.h (struct process_info): Delete member tid, unused.
8651 * thread-db.c (find_one_thread): Update.
8652 (maybe_attach_thread): Update.
8654 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8656 * target.h (struct target_ops): Add qxfer_osdata member.
8657 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8659 (linux_qxfer_osdata): New functions.
8660 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8662 * server.c (handle_query): Handle "qXfer:osdata:read:".
8663 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8664 (buffer_xml_printf): New functions.
8665 * server.h (struct buffer): New.
8666 (buffer_grow_str, buffer_grow_str0): New macros.
8667 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8668 (buffer_xml_printf): Declare.
8670 2008-11-24 Doug Evans <dje@google.com>
8672 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8674 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8676 * server.c (handle_v_run): Always use the supplied argument list.
8678 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8680 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8681 (xtensa_regmap_table): Add entry for scompare1.
8683 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8685 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8686 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8687 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8688 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8689 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8690 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8691 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8692 XML target descriptions.
8693 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8694 when inferior is running on an ISA 2.05 or later processor. Add
8695 special case to return offset for full 64-bit slot of FPSCR when
8698 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8700 * Makefile.in (SFILES, clean): Added sparc64 files.
8701 (reg-sparc64.o, reg-sparc64.c): New.
8702 * configure.srv (sparc*-*-linux*): New configuration.
8703 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8704 syscall arguments for SPARC.
8705 (regsets_store_inferior_registers): Likewise.
8706 * linux-sparc-low.c: New file.
8708 2008-10-21 Doug Evans <dje@google.com>
8710 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8711 (READLINE_DIR,READLINE_DEP): Delete.
8712 (INTERNAL_CFLAGS): Update.
8713 (LINTFLAGS): Update.
8715 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8717 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8718 whole argv from the last run, not just argv[0].
8720 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8722 * regcache.c (new_register_cache): Return NULL if the register
8723 cache size isn't known yet.
8724 (free_register_cache): Avoid dereferencing a NULL regcache.
8726 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8728 * configure.srv: Merge MIPS and MIPS64.
8730 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8732 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8734 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8736 * Makefile.in: Add required vsx dependencies.
8738 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8739 Declare init_registers_powerpc_vsx32l.
8740 Declare init_registers_powerpc_vsx64l.
8741 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8742 (ppc_arch_setup): Check for VSX in hwcap.
8743 (ppc_fill_vsxregset): New function.
8744 (ppc_store_vsxregset): New function.
8745 Add new VSX entry in regset_info target_regsets.
8747 * configure.srv: Add new VSX dependencies.
8749 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8751 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8752 (remote_open): Set or clear transport_is_reliable.
8753 (putpkt_binary): Don't expect acks in noack mode.
8754 (getpkt): Don't send ack/nac in noack mode.
8755 * server.c (handle_general_set): Handle QStartNoAckMode.
8756 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8758 (main): Reset noack_mode on every connection.
8759 * server.h (noack_mode): Declare.
8761 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8763 * Makefile.in (GDBREPLAY_OBS): New variable.
8764 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8766 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8767 Daniel Jacobowitz <dan@codesourcery.com>
8769 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8770 (usr_store_inferior_registers): Likewise.
8771 (regsets_store_inferior_registers): Likewise.
8773 2008-07-31 Rolf Jansen <rj@surtec.com>
8774 Pedro Alves <pedro@codesourcery.com>
8776 * configure.ac: Check for memmem declaration.
8777 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8778 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8779 (disable_packet_qfThreadInfo): Unconditionally compile.
8780 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8781 * configure, config.in: Regenerate.
8783 2008-07-28 Doug Kwan <dougkwan@google.com>
8785 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8786 (linux_write_memory): Remove declaration of errno.
8788 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8790 * linux-low.c (handle_extended_wait): Do not use "status"
8791 variable uninitialized.
8793 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8795 * server.c (handle_v_attach): Inhibit reporting dll changes.
8797 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8799 * remote-utils.c (prepare_resume_reply): If requested, don't
8800 output "thread:TID" in the T stop reply.
8802 * server.c (disable_packet_vCont, disable_packet_Tthread)
8803 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8804 (handle_query): If requested, disable support for qC, qfThreadInfo
8806 (handle_v_requests): If requested, disable support for vCont.
8807 (gdbserver_show_disableable): New.
8808 (main): Handle --disable-packet and --disable-packet=LIST.
8810 * server.h (disable_packet_vCont, disable_packet_Tthread)
8811 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8813 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8815 * server.c (gdbserver_usage): Mention --version.
8817 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8819 * Makefile.in (gdbreplay.o): New rule.
8821 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8823 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8824 message, not gdbserver.
8826 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8827 Nathan Sidwell <nathan@codesourcery.com>
8828 Joseph Myers <joseph@codesourcery.com>
8830 * acinclude.m4: Include ../../config/acx.m4.
8831 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8832 * configure, config.in: Regenerate.
8833 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8834 * server.c (gdbserver_version): Print PKGVERSION.
8835 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8836 (main): Adjust gdbserver_usage calls.
8837 * gdbreplay.c (version, host_name): Add declarations.
8838 (gdbreplay_version, gdbreplay_usage): New.
8839 (main): Accept --version and --help options.
8841 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8843 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8844 (arm_breakpoint_at): Handle Thumb.
8845 (the_low_target): Add comment.
8847 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8849 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8851 2008-05-09 Doug Evans <dje@google.com>
8853 * server.h (decode_search_memory_packet): Declare.
8854 * remote-utils.c (decode_search_memory_packet): New fn.
8855 * server.c (handle_search_memory_1): New fn.
8856 (handle_search_memory): New fn.
8857 (handle_query): Process qSearch:memory packets.
8859 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8861 * regcache.c (registers_length): Remove.
8862 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8863 full register packet.
8864 * regcache.h (registers_length): Remove prototype.
8865 * server.h (PBUFSIZ): Define to 16384.
8867 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8869 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8870 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8871 powerpc-64l.o, and powerpc-altivec64l.o.
8872 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8873 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8874 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8875 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8876 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8879 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8880 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8881 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8882 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8883 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8884 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8885 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8886 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8887 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8888 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8891 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8892 (init_registers_powerpc_32l): ... this new prototype.
8893 (init_registers_powerpc_32): Remove, replace by ...
8894 (init_registers_powerpc_altivec32l): ... this new prototype.
8895 (init_registers_powerpc_e500): Remove, replace by ...
8896 (init_registers_powerpc_e500l): ... this new prototype.
8897 (init_registers_ppc64): Remove, replace by ...
8898 (init_registers_powerpc_64l): ... this new prototype.
8899 (init_registers_powerpc_64): Remove, replace by ...
8900 (init_registers_powerpc_altivec64l): ... this new prototype.
8901 (ppc_num_regs): Set to 73.
8902 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8903 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8904 (ppc_cannot_store_register): Handle orig_r3 and trap.
8905 (ppc_arch_setup): Update init_registers_... calls.
8906 (ppc_fill_gregset): Handle orig_r3 and trap.
8908 * inferiors.c (clear_inferiors): Reset current_inferior.
8910 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8912 * acinclude.m4: Add override.m4.
8913 * configure: Regenerate.
8915 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8917 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8918 initial call to init_register_ppc64.
8920 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8922 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8923 single powerpc*-*-linux* case.
8924 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8926 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8928 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8929 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8931 * linux-ppc-low.c: Include <elf.h>.
8932 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8933 (ppc_hwcap): New global variable.
8934 (ppc_regmap): Remove __SPE__ #ifdef sections.
8935 (ppc_regmap_e500): New global variable.
8936 (ppc_cannot_store_register): Update __SPE__ special case.
8937 (ppc_get_hwcap): New function.
8938 (ppc_arch_setup): Use it to determine whether inferior supports
8939 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8940 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8941 Do not access registers if target does not support AltiVec.
8942 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8943 Do not access registers if target does not support SPE.
8944 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8946 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8948 * linux-low.c (disabled_regsets, num_regsets): New.
8949 (use_regsets_p): Delete.
8950 (linux_wait_for_process): Clear disabled_regsets.
8951 (regsets_fetch_inferior_registers): Check and set it.
8952 (regsets_store_inferior_registers): Likewise.
8953 (linux_fetch_registers, linux_store_registers): Do not use
8955 (initialize_low): Allocate disabled_regsets.
8957 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8959 * Makefile.in (LIBOBJS): New.
8961 (memmem.o): New rule.
8962 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8963 * configure: Regenerated.
8965 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8967 * server.c (handle_query): Never return "unsupported" for
8968 qXfer:features:read queries.
8970 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8972 * server.c (get_features_xml): Fix inverted condition.
8973 (handle_query): Always support qXfer:feature:read.
8975 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8977 * server.c (wrapper_argv): New.
8978 (start_inferior): Handle wrapper_argv. If set, expect an extra
8980 (gdbserver_usage): Document --wrapper.
8981 (main): Parse --wrapper.
8983 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8985 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8986 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8987 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8988 (ppc_set_pc): Likewise.
8989 (ppc_arch_setup): New function.
8990 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8991 of collect_register.
8992 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8994 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8996 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8997 instead of linux-ppc64-low.o.
8998 * linux-ppc64-low.c: Remove file.
8999 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9000 (linux-ppc64-low.o): Remove rule.
9002 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9003 (init_registers_powerpc_64): Likewise.
9004 (ppc_regmap): Conditionally define depending on __powerpc64__.
9005 (ppc_cannot_store_register): Do not special-case "fpscr" when
9006 compiled on __powerpc64__.
9007 (ppc_collect_ptrace_register): New function.
9008 (ppc_supply_ptrace_register): New function.
9009 (ppc_breakpoint): Change type to "unsigned int".
9010 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9011 (the_low_target): Conditionally provide initializers for the
9012 arch_setup member depending on __powerpc64__. Install
9013 collect_ptrace_register and supply_ptrace_register members.
9015 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9017 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9018 * server.c (gdbserver_xmltarget): Define.
9019 (get_features_xml): Use it to replace "target.xml" and arch_string.
9021 * configure.srv: Remove srv_xmltarget. Add XML files that were
9022 mentioned there to srv_xmlfiles instead. Remove conditional tests
9023 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9024 srv_xmlfiles and srv_regobj to include all possible choices.
9025 * configure.ac (srv_xmltarget): Remove.
9026 (srv_xmlfiles): Do not add "target.xml".
9027 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9028 checks for supplementary target information.
9029 * configure: Regenerate.
9030 * Makefile.in (XML_TARGET): Remove.
9031 (target.xml): Remove rule.
9032 (clean): Do not clean up target.xml.
9033 (.PRECIOUS): Do not mention target.xml.
9035 * target.h (struct target_ops): Remove arch_string member.
9036 * linux-low.c (linux_arch_string): Remove.
9037 (linux_target_ops): Remove arch_string initializer.
9038 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9039 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9040 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9041 * spu-low.c (spu_arch_string): Remove.
9042 (spu_target_ops): Remove arch_string initializer.
9043 * win32-low.c (win32_arch_string): Remove.
9044 (win32_target_ops): Remove arch_string initializer.
9045 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9046 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9047 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9049 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9051 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9052 by collect_ptrace_register and supply_ptrace_register hooks.
9053 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9054 instead of checking for the_low_target.left_pad_xfer.
9055 (usr_store_inferior_registers): Use collect_ptrace_register callback
9056 instead of checking for the_low_target.left_pad_xfer.
9058 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9059 (s390_supply_ptrace_register): Likewise.
9060 (s390_fill_gregset): Call s390_collect_ptrace_register.
9061 (the_low_target): Update.
9063 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9064 (ppc_supply_ptrace_register): Likewise.
9065 (the_low_target): Update.
9067 * linux-i386-low.c (the_low_target): Update.
9068 * linux-x86-64-low.c (the_low_target): Update.
9070 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9072 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9073 reg-s390.o and reg-s390x.o.
9075 * linux-low.c (new_inferior): New global variable.
9076 (linux_create_inferior, linux_attach): Set it.
9077 (linux_wait_for_process): Call the_low_target.arch_setup after the
9078 target has stopped for the first time.
9079 (initialize_low): Do not call the_low_target.arch_setup.
9081 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9082 (s390_set_pc): Likewise.
9083 (s390_arch_setup): New function.
9084 (the_low_target): Use s390_arch_setup as arch_setup routine.
9086 * regcache.c (realloc_register_cache): New function.
9087 (set_register_cache): Call it for each existing regcache.
9089 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9091 * server.h (init_registers): Remove prototype.
9093 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9094 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9095 instead of init_registers ().
9096 * linux-arm-low.c (init_registers_arm): Add prototype.
9097 (init_registers_arm_with_iwmmxt): Likewise.
9098 (the_low_target): Add initializer for arch_setup field.
9099 * linux-cris-low.c (init_registers_cris): Add prototype.
9100 (the_low_target): Add initializer for arch_setup field.
9101 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9102 (the_low_target): Add initializer for arch_setup field.
9103 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9104 (the_low_target): Add initializer for arch_setup field.
9105 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9106 (the_low_target): Add initializer for arch_setup field.
9107 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9108 (the_low_target): Add initializer for arch_setup field.
9109 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9110 (the_low_target): Add initializer for arch_setup field.
9111 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9112 (init_registers_mips64_linux): Likewise.
9113 (the_low_target): Add initializer for arch_setup field.
9114 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9115 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9116 (the_low_target): Add initializer for arch_setup field.
9117 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9118 (init_registers_powerpc_64): Likewise.
9119 (the_low_target): Add initializer for arch_setup field.
9120 * linux-s390-low.c (init_registers_s390): Add prototype.
9121 (init_registers_s390x): Likewise.
9122 (the_low_target): Add initializer for arch_setup field.
9123 * linux-sh-low.c (init_registers_sh): Add prototype.
9124 (the_low_target): Add initializer for arch_setup field.
9125 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9126 (the_low_target): Add initializer for arch_setup field.
9127 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9128 (the_low_target): Add initializer for arch_setup field.
9130 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9131 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9132 instead of init_registers ().
9133 * win32-arm-low.c (init_registers_arm): Add prototype.
9134 (the_low_target): Add initializer for arch_setup field.
9135 * win32-i386-low.c (init_registers_i386): Add prototype.
9136 (the_low_target): Add initializer for arch_setup field.
9138 * spu-low.c (init_registers_spu): Add prototype.
9139 (initialize_low): Call initialie_registers_spu () instead of
9140 initialize_registers ().
9142 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9144 * server.c (handle_v_requests): When handling the vRun and vAttach
9145 packets, if already debugging a process, don't kill it. Return an
9148 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9150 * server.c (handle_query): Correct length check.
9152 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9154 * win32-low.c (do_initial_child_stuff): Add process handle
9155 parameter. Set current_process_handle and current_process_id from the
9156 parameters. Clear globals.
9157 (win32_create_inferior): Don't set current_process_handle and
9158 current_process_id here. Instead pass them on the call to
9159 do_initial_child_stuff.
9160 (win32_attach): Likewise.
9161 (win32_clear_inferiors): New.
9162 (win32_kill): Don't close the current process handle or the
9163 current thread handle here. Instead call win32_clear_inferiors.
9164 (win32_detach): Don't open a new handle to the process. Call
9165 win32_clear_inferiors.
9166 (win32_join): Don't rely on current_process_handle; open a new
9167 handle using the process id.
9168 (win32_wait): Call win32_clear_inferiors when the inferior process
9171 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9173 * server.c (monitor_show_help): Add "exit".
9175 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9177 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9178 (clean): Add reg-xtensa.c.
9179 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9180 * configure.srv (xtensa*-*-linux*) New target.
9181 * linux-xtensa-low.c: New.
9182 * xtensa-xtregs.c: New.
9184 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9186 * hostio.c: Don't include errno.h.
9187 (errno_to_fileio_errno): Move to hostio-errno.
9188 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9189 error number outputting to the target->hostio_last_error callback.
9190 (hostio_packet_error): Use FILEIO_EINVAL directly.
9191 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9192 calls to hostio_error.
9193 * hostio-errno.c: New.
9194 * server.h (hostio_last_error_from_errno): Declare.
9195 * target.h (target_ops): Add hostio_last_error member.
9196 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9197 as hostio_last_error handler.
9198 * spu-low.c (spu_target_ops): Likewise.
9199 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9200 (wince_hostio_last_error): New functions.
9201 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9202 as hostio_last_error handler.
9203 (win32_target_ops) [!_WIN32_WCE]: Register
9204 hostio_last_error_from_errno as hostio_last_error handler.
9205 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9206 (hostio-errno.o): New rule.
9207 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9208 * configure.srv (srv_hostio_err_objs): New variable. Default to
9210 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9211 * configure: Regenerate.
9213 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9215 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9216 (linux_kill, linux_detach): Clean up the process list.
9217 * remote-utils.c (remote_open): Improve port number parsing.
9218 (putpkt_binary, input_interrupt): Only send interrupts if the target
9220 * server.c (extended_protocol): Make static.
9221 (attached): Define earlier.
9222 (exit_requested, response_needed, program_argv): New variables.
9223 (target_running): New.
9224 (start_inferior): Clear attached here.
9225 (attach_inferior): Set attached here.
9226 (require_running): Define.
9227 (handle_query): Use require_running and target_running. Implement
9229 (handle_v_attach, handle_v_run): New.
9230 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9231 (gdbserver_usage): Update.
9232 (main): Redo argument parsing. Handle --debug and --multi. Handle
9233 --attach along with other options or after the port. Save
9234 program_argv. Support no initial program. Resynchronize
9235 communication with GDB after an error. Handle "monitor exit".
9236 Use require_running and target_running. Always allow the extended
9237 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9238 restart in extended mode.
9239 * README: Refer to the GDB manual. Update --attach usage.
9241 2007-12-20 Andreas Schwab <schwab@suse.de>
9243 * linux-low.c (STACK_SIZE): Define.
9244 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9245 (linux_test_for_tracefork): Likewise.
9247 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9249 * linux-low.c (linux_wait_for_event): Update messages. Do not
9250 reinsert auto-delete breakpoints.
9251 * mem-break.c (struct breakpoint): Change return type of handler to
9253 (set_breakpoint_at): Update handler type.
9254 (reinsert_breakpoint_handler): Return 1 instead of calling
9256 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9258 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9259 * mem-break.h (set_breakpoint_at): Update handler type.
9260 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9261 * win32-low.c (auto_delete_breakpoint): New.
9262 (get_child_debug_event): Use it.
9264 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9266 * configure.ac: Check for pread and pwrite.
9267 * hostio.c (handle_pread): Fall back to lseek and read.
9268 (handle_pwrite): Fall back to lseek and write.
9269 * config.in, configure: Regenerated.
9271 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9273 * server.c (myresume): Add own_buf argument.
9274 (main): Update calls.
9276 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9278 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9279 * remote-utils.c (remote_open): Do not call disable_async_io.
9280 (block_async_io): Delete.
9281 (unblock_async_io): Make static.
9282 (initialize_async_io): New.
9283 * server.c (handle_v_cont): Handle async I/O here.
9284 (myresume): Likewise. Move other common resume tasks here...
9285 (main): ... from here. Call initialize_async_io. Disable async
9286 I/O before the main loop.
9287 * server.h (initialize_async_io): Declare.
9288 (block_async_io, unblock_async_io): Delete prototypes.
9289 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9291 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9293 * remote-utils.c (readchar): Allow binary data in received messages.
9295 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9297 * win32-low.c (attaching): New global.
9298 (win32_create_inferior): Clear the `attaching' global.
9299 (win32_attach): Set the `attaching' global.
9300 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9301 attaching. Only set a breakpoint at the entry point if not
9304 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9306 * server.c (main): Don't report dll events on the initial
9307 connection on attaches.
9309 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9311 * server.c (main): Relax numerical bases supported for the pid of
9312 the --attach command line argument.
9314 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9316 * win32-low.c (win32_attach): Call OpenProcess before
9317 DebugActiveProcess, not after. Add last error output to error
9320 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9322 * win32-low.c (win32_get_thread_context)
9323 (win32_set_thread_context): New functions.
9324 (thread_rec): Use win32_get_thread_context.
9325 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9326 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9329 2007-12-03 Leo Zayas
9330 Pedro Alves <pedro_alves@portugalmail.pt>
9332 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9334 (child_add_thread): Minor cleanup.
9335 (child_continue): Resume artificially suspended threads before
9336 calling ContinueDebugEvent.
9337 (suspend_one_thread): New.
9338 (fake_breakpoint_event): New.
9339 (get_child_debug_event): Change return type to int. Check here if
9340 gdb sent an interrupt request. If a soft interrupt was requested,
9341 fake a breakpoint event. Return 0 if there is no event to handle,
9343 (win32_wait): Don't check here if gdb sent an interrupt request.
9344 Ensure there is a valid event to handle.
9345 (win32_request_interrupt): Add soft interruption method as last
9348 2007-12-03 Leo Zayas
9349 Pedro Alves <pedro_alves@portugalmail.pt>
9351 * win32-low.h (win32_thread_info): Add descriptions to the
9352 structure members. Replace `suspend_count' counter by a
9354 * win32-low.c (thread_rec): Update condition of when to get the
9355 context from the inferior. Rely on ContextFlags being set if it
9356 has already been retrieved. Only suspend the inferior thread if
9357 we haven't already. Warn if that fails.
9358 (continue_one_thread): s/suspend_count/suspended/. Only call
9359 ResumeThread once. Warn if that fails.
9361 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9363 * win32-low.c (win32_wait): Don't read from the inferior when it
9366 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9368 * Makefile.in (win32_low_h): New variable.
9369 (win32-low.o): Add dependency on $(win32_low_h).
9370 (win32-arm-low.o, win32-i386-low.o): New rules.
9372 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9374 * hostio.c: Correct copyright year.
9376 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9378 * Makefile.in (OBS): Add hostio.o.
9379 (hostio.o): New rule.
9380 * server.h (handle_vFile): Declare.
9381 * hostio.c: New file.
9382 * server.c (handle_v_requests): Take packet_len and new_packet_len
9383 for binary packets. Call handle_vFile.
9384 (main): Update call to handle_v_requests.
9386 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9388 * linux-low.c: Include <sched.h>.
9390 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9392 * linux-low.c (linux_tracefork_grandchild): New.
9393 (linux_tracefork_child): Use clone.
9394 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9396 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9398 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9400 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9402 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9404 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9406 * inferiors.c (change_inferior_id): Delete.
9407 (add_pid_to_list, pull_pid_from_list): New.
9408 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9409 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9410 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9411 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9412 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9413 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9414 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9415 (using_threads): Always set to 1.
9416 (handle_extended_wait): New.
9417 (add_process): Do not set TID.
9418 (linux_create_inferior): Set must_set_ptrace_flags.
9419 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9420 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9421 (linux_thread_alive): Rename TID argument to LWPID.
9422 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9423 (linux_wait_for_event): Do not use TID or check using_threads. Update
9424 call to dead_thread_notify. Call handle_extended_wait.
9425 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9426 (send_sigstop): Delete sigstop_sent.
9427 (wait_for_sigstop): Avoid TID.
9428 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9429 (linux_test_for_tracefork): New.
9430 (linux_lookup_signals): Use thread_db_active and
9431 linux_supports_tracefork_flag.
9432 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9433 * linux-low.h (get_process_thread): Avoid TID.
9434 (struct process_ifo): Move thread_known and tid to the end. Remove
9436 (linux_attach_lwp, thread_db_init): Update prototypes.
9437 * server.h (change_inferior_id): Delete prototype.
9438 (add_pid_to_list, pull_pid_from_list): New prototypes.
9439 * thread-db.c (thread_db_use_events): New.
9440 (find_first_thread): Rename to...
9441 (find_one_thread): ...this. Update callers and messages. Do not
9442 call fatal. Check thread_db_use_events. Do not call
9443 change_inferior_id or new_thread_notify.
9444 (maybe_attach_thread): Update. Do not call new_thread_notify.
9445 (thread_db_init): Set thread_db_use_events. Check use_events.
9446 * utils.c (fatal, warning): Correct message prefix.
9448 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9450 * Makefile.in (clean): Remove new files.
9451 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9452 (powerpc-64.o, powerpc-64.c): New rules.
9453 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9454 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9456 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9458 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9459 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9460 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9461 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9462 (target_regsets): Add AltiVec and SPE register sets.
9463 * configure.ac: Check for AltiVec and SPE.
9464 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9465 (ppc_fill_vrregset, ppc_store_vrregset): New.
9466 (target_regsets): Add AltiVec register set.
9467 * configure: Regenerated.
9469 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9471 * linux-low.c (O_LARGEFILE): Define.
9472 (linux_read_memory): Use /proc/PID/mem.
9473 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9474 * configure, config.in: Regenerated.
9476 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9478 * linux-low.c (linux_wait_for_event): Do not pass signals while
9481 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9483 * win32-low.c (create_process): New.
9484 (win32_create_inferior): Use create_process instead of
9485 CreateProcess. If create_process failed retry appending an ".exe"
9486 suffix. Store the GetLastError result immediatelly after
9487 create_process calls and use it on the call to error.
9489 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9491 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9493 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9495 * configure.ac: Switch license to GPLv3.
9497 2007-08-01 Michael Snyder <msnyder@access-company.com>
9499 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9501 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9503 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9505 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9506 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9507 CloseToolhelp32Snapshot.
9508 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9509 CloseToolhelp32Snapshot.
9511 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9513 * server.c (main): Check for inferior exit before main loop.
9515 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9517 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9518 instead of on tmp_desc.
9520 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9521 Daniel Jacobowitz <dan@codesourcery.com>
9523 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9524 (add_thread): Minor cleanups.
9525 (clear_inferiors): Move lower in the file. Clear the DLL
9527 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9528 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9529 (xml_escape_text): New.
9530 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9532 (handle_v_cont): Report errors.
9533 (gdbserver_version): Update.
9534 (main): Correct size of own_buf. Do not report initial DLL events.
9535 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9536 (unloaded_dll, xml_escape_text): New.
9537 * win32-low.c (enum target_waitkind): Update comments.
9538 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9539 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9540 (win32_EnumProcessModules, win32_GetModuleInformation)
9541 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9542 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9543 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9544 (win32_Module32First, win32_Module32Next, load_toolhelp)
9545 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9546 (get_child_debug_event): Handle DLL events.
9547 (win32_wait): Likewise.
9549 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9551 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9552 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9554 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9556 * win32-low.c (handle_output_debug_string): Ignore event if not
9559 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9561 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9563 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9565 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9567 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9569 * inferiors.c (change_inferior_id): Add comment.
9570 * linux-low.c (check_removed_breakpoint): Add an early
9571 prototype. Improve debug output.
9572 (linux_attach): Doc update.
9573 (linux_detach_one_process, linux_detach): Clean up before releasing
9575 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9576 * linux-low.h (struct process_info): Doc improvement.
9577 * mem-break.c (delete_all_breakpoints): New.
9578 * mem-break.h (delete_all_breakpoints): New prototype.
9579 * thread-db.c (find_first_thread): New.
9580 (thread_db_create_event): Call it instead of
9581 thread_db_find_new_threads. Clean up unused variables.
9582 (maybe_attach_thread): Remove first thread handling.
9583 (thread_db_find_new_threads): Use find_first_thread.
9584 (thread_db_get_tls_address): Likewise.
9586 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9588 * thread-db.c (thread_db_find_new_threads): Add prototype.
9589 (thread_db_create_event): Check for the main thread before adding
9591 (maybe_attach_thread): Only enable event reporting if TID == 0.
9592 (thread_db_get_tls_address): Check for new threads.
9594 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9596 * linux-low.c (linux_create_inferior): Try execv before execvp.
9597 * spu-low.c (spu_create_inferior): Likewise.
9599 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9601 * linux-low.c (linux_create_inferior): Change execv to execvp.
9602 * spu-low.c (spu_create_inferior): Likewies.
9604 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9606 * Makefile.in (clean): Clean new files instead of deleted ones.
9607 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9608 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9610 * configure.srv: Specify XML files and new regformats for MIPS and
9612 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9613 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9614 an entry for the restart register.
9615 (mips_cannot_fetch_register, mips_cannot_store_register)
9616 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9617 register names to match the XML descriptions.
9618 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9619 restart register instead of $0.
9621 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9622 Markus Deuling <deuling@de.ibm.com>
9624 * remote-utils.c (decode_xfer_write): New function.
9625 * server.h (decode_xfer_write): Add prototype.
9626 * server.c (handle_query): Add PACKET_LEN argument. Support
9627 qXfer:spu:read and qXfer:spu:write packets.
9628 (main): Pass packet_len to handle_query.
9629 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9630 * target.h (target_ops): Add qxfer_spu.
9632 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9634 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9635 accessing non-seekable spufs files.
9637 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9639 * server.c (handle_query): Add reply for qC packet.
9641 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9642 Leo Zayas <lerele@champenstudios@com>
9644 * server.h (check_remote_input_interrupt_request): New function.
9645 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9646 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9647 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9648 (check_remote_input_interrupt_request): New function.
9649 * server.h (check_remote_input_interrupt_request): Declare.
9650 * win32-low.c (winapi_DebugBreakProcess,
9651 winapi_GenerateConsoleCtrlEvent): New typedefs.
9652 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9654 (win32_wait): Check for remote interrupt request
9655 with check_remote_input_interrupt_request.
9656 (win32_request_interrupt): New function.
9657 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9659 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9661 * win32-low.c (debug_registers_changed,
9662 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9663 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9664 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9665 (thread_rec): Get context using the low target.
9666 (child_add_thread): Call thread_added on the low target,
9667 which does the same thing.
9669 (do_initial_child_stuff): Remove debug registers references.
9670 Set context using the low target. Resume threads after
9671 setting the contexts.
9672 (child_continue): Remove dead variable. Remove debug
9673 registers references.
9674 (child_fetch_inferior_registers): Go through the low target.
9675 (do_child_store_inferior_registers): Remove.
9676 (child_store_inferior_registers): Go through the low target.
9677 (win32_resume): Remove debug registers references.
9678 Set context using the low target.
9679 (handle_exception): Change return type to void. Don't record
9680 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9681 first chance exception.
9682 (get_child_debug_event): Change return type to void. Remove
9683 goto loop. Always return after waiting for debug event.
9684 (win32_wait): Convert to switch statement. Handle spurious
9687 * win32-i386-low.c (debug_registers_changed,
9688 debug_registers_used): New.
9689 (initial_stuff): Rename to ...
9690 (i386_initial_stuff): ... this. Clear debug registers
9692 (store_debug_registers): Delete.
9693 (i386_get_thread_context): New.
9694 (load_debug_registers): Delete.
9695 (i386_set_thread_context): New.
9696 (i386_thread_added): New.
9697 (single_step): Rename to ...
9698 (i386_single_step): ... this.
9699 (do_fetch_inferior_registers): Rename to ...
9700 (i386_fetch_inferior_register): ... this.
9701 (i386_store_inferior_register): New.
9702 (the_low_target): Adapt to new interface.
9704 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9705 (arm_get_thread_context): New.
9706 (arm_set_thread_context): New.
9708 (do_fetch_inferior_registers): Rename to ...
9709 (arm_fetch_inferior_register): ... this.
9710 (arm_store_inferior_register): New.
9711 (arm_wince_breakpoint): Reimplement as unsigned long.
9712 (arm_wince_breakpoint_len): Define.
9713 (the_low_target): Adapt to new interface.
9715 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9716 load_debug_registers. Add get_thread_context, set_thread_context,
9717 thread_added and store_inferior_register. Rename
9718 fetch_inferior_registers to fetch_inferior_register.
9719 (regptr): Remove declaration.
9721 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9723 * linux-low.c (linux_detach): Change return type to int. Return 0.
9724 * spu-low.c (spu_detach): Likewise.
9726 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9728 * target.h (target_ops): Change return type of detach to int.
9730 (join_inferior): New.
9731 * server.c (main): Don't skip detach support on mingw32.
9732 If the inferior doesn't support detaching return error.
9733 Call join_inferior instead of using waitpid.
9734 * linux-low.c (linux_join): New.
9735 (linux_target_op): Add linux_join.
9736 * spu-low.c (spu_join): New.
9737 (spu_target_ops): Add spu_join.
9738 * win32-low.c (win32_detach): Adapt to new interface.
9739 Reopen current_process_handle before detaching. Issue a child
9740 resume before detaching.
9742 (win32_target_op): Add win32_join.
9744 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9746 * win32-low.c (win32-attach): Fix return value.
9747 * target.h (target_ops): Describe ATTACH return values.
9749 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9751 * win32-low.c (GETPROCADDRESS): Define.
9752 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9753 (winapi_DebugSetProcessKillOnExit): Likewise.
9754 (win32_create_inferior): Force usage of ansi CreateProcessA.
9755 (win32_attach): Use GETPROCADDRESS.
9756 (win32_detach): Likewise.
9758 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9760 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9762 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9764 * win32-low.c: Commit leftover changes from 2007-03-29.
9766 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9768 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9769 fields short instead of int. Add explicit padding.
9770 (i387_cache_to_fsave): Remove unnecessary casts.
9771 (i387_fsave_to_cache): Doc fix.
9772 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9774 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9776 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9777 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9779 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9781 * configure.srv (arm*-*-mingw32ce*): Move near the other
9784 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9786 * configure.ac: Add errno checking.
9787 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9788 sys/file.h and malloc.h.
9789 (AC_CHECK_DECLS): Add perror.
9790 (srv_mingwce): Handle.
9791 * configure.srv (i[34567]86-*-cygwin*): Add
9792 win32-i386-low.o to srv_tgtobj.
9793 (i[34567]86-*-mingw*): Likewise.
9794 (arm*-*-mingw32ce*): Add case.
9795 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9796 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9797 [__MINGW32CE__] (strerror): New function.
9798 [__MINGW32CE__] (errno): Define to GetLastError.
9799 [__MINGW32CE__] (COUNTOF): New macro.
9800 (remote_open): Remove extra close call.
9801 * mem-break.c (delete_breakpoint_at): New function.
9802 * mem-break.h (delete_breakpoint_at): Declare.
9803 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9804 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9805 [USE_WIN32API] (read, write): Add char* casts.
9806 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9807 * server.h: Include wincecompat.h on Windows CE.
9808 [HAVE_ERRNO_H]: Check.
9809 (perror): Declare if not declared.
9810 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9811 (perror_with_name): Remove errno declaration.
9812 * wincecompat.h: New.
9813 * wincecompat.c: New.
9815 * win32-arm-low.c: New.
9816 * win32-i386-low.c: New.
9817 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9818 (OUTMSG2): Make it safe.
9820 (COUNTOF): New macro.
9821 (NUM_REGS): Get it from the low target.
9822 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9823 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9824 (thread_rec): Let low target handle debug registers.
9825 (child_add_thread): Likewise.
9826 (child_init_thread_list): Likewise.
9827 (continue_one_thread): Likewise.
9829 (do_child_fetch_inferior_registers): Move to ...
9830 * win32-i386-low.c: ... here, and rename to ...
9831 (do_fetch_inferior_registers): ... this.
9832 * win32-low.c (child_fetch_inferior_registers):
9833 Go through the low target.
9834 (do_child_store_inferior_registers): Use regptr.
9835 (strwinerror): New function.
9836 (win32_create_inferior): Handle Windows CE.
9837 Use strwinerror instead of strerror on Windows error
9838 codes. Add program to the error output.
9839 Don't close the main thread handle on Windows CE.
9840 (win32_attach): Use coredll.dll on Windows CE.
9841 (win32_kill): Close current process and current
9843 (win32_detach): Use coredll.dll on Windows CE.
9844 (win32_resume): Let low target handle debug registers, and
9846 (handle_exception): Add/Remove initial breakpoint. Avoid
9847 non-existant WSTOPSIG on Windows CE.
9848 (win32_read_inferior_memory): Cast to remove warning.
9849 (win32_arch_string): Go through the low target.
9850 (initialize_low): Call set_breakpoint_data with the low
9851 target's breakpoint.
9852 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9853 FOP_REGNUM, mappings): Move to ...
9854 * win32-i386-low.c: ... here.
9855 * win32-low.c (win32_thread_info): Move to ...
9856 * win32-low.h: ... here.
9857 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9858 win32-arm-low.c and wincecompat.c.
9859 (all:): Add $EXEEXT.
9860 (install-only:): Likewise.
9861 (gdbserver:): Likewise.
9862 (gdbreplay:): Likewise.
9863 * config.in: Regenerate.
9864 * configure: Regenerate.
9866 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9868 * win32-low.c: Rename typedef thread_info to
9869 win32_thread_info throughout.
9871 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9873 * win32-i386-low.c: Rename to ...
9874 * win32-low.c: ... this.
9875 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9876 * Makefile.in: Likewise.
9878 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9880 * remote-utils.c (monitor_output): Constify msg parameter.
9881 * server.h (monitor_output): Likewise.
9882 * win32-i386-low.c (handle_output_debug_string): New.
9883 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9884 handle_output_debug_string.
9885 (get_child_debug_event): Likewise.
9887 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9889 * server.c (main): Correct strtoul check.
9891 2007-03-27 Jon Ringle <jon@ringle.org>
9893 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9895 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9897 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9899 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9901 * terminal.h: Check HAVE_SGTTY_H.
9903 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9905 * remote-utils.c (remote_open): Print out the assigned port number.
9907 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9909 * remote-utils.c (monitor_output): New function.
9910 * server.c (debug_threads): Define here.
9911 (monitor_show_help): New function.
9912 (handle_query): Handle qRcmd.
9913 (main): Do not handle 'd' packet.
9914 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9915 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9918 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9920 * Makefile.in (EXEEXT): New.
9921 (clean): Use $(EXEEXT).
9923 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9925 * target.h (target_ops): Rename send_signal to request_interrupt,
9926 and remove enum target_signal parameter.
9927 * linux-low.c (linux_request_interrupt): Rename from
9928 linux_send_signal, and always send SIGINT.
9929 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9930 and always send SIGINT.
9931 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9933 (input_interrupt): Likewise.
9935 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9937 * server.c (get_features_xml): Check if target implemented
9939 * win32-i386-low.c (win32_arch_string): New.
9940 (win32_target_ops): Add win32_arch_string as arch_string member.
9942 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9944 * spu-low.c (spu_arch_string): New.
9945 (spu_target_ops): Add spu_arch_string.
9947 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9949 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9950 * configure.ac: Do not check for terminal.h.
9951 * configure, config.in: Regenerated.
9953 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9955 * Makefile.in (OBS): Add $(XML_BUILTIN).
9956 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9958 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9959 (arm-with-iwmmxt.c): New.
9960 * config.in, configure: Regenerate.
9961 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9962 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9963 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9964 (arm*-*-linux*): Add iWMMXt and regset support.
9965 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9966 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9967 (arm_store_wmmxregset, target_regsets): New.
9968 * server.c (get_features_xml): Take annex argument. Check builtin
9970 (handle_query): Handle multiple annexes.
9972 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9974 * remote-utils.c [USE_WIN32API] (read, write): Define.
9975 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9978 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9980 * linux-i386-low.c (the_low_target): Set arch_string.
9981 * linux-x86-64-low.c (the_low_target): Likewise.
9982 * linux-low.c (linux_arch_string): New.
9983 (linux_target_ops): Add it.
9984 * linux-low.h (struct linux_target_ops): Add arch_string.
9985 * server.c (write_qxfer_response): Use const void * for DATA.
9986 (get_features_xml): New.
9987 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9988 * target.h (struct target_ops): Add arch_string method.
9990 2007-01-03 Denis Pilat <denis.pilat@st.com>
9991 Daniel Jacobowitz <dan@codesourcery.com>
9993 * linux-low.c (linux_kill): Handle being called with no threads.
9994 * win32-i386-low.c (win32_kill): Likewise.
9995 (get_child_debug_event): Clear current_process_handle.
9997 2006-12-30 Denis PILAT <denis.pilat@st.com>
9998 Daniel Jacobowitz <dan@codesourcery.com>
10000 * remote-utils.c (remote_open): Check the type of specified
10001 serial port devices before opening them.
10002 * server.c (main): Kill the inferior if an error occurs during
10003 the first remote_open.
10005 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10007 * README: Update supported targets.
10009 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10011 * Makefile.in (clean): Remove reg-mips64.c.
10012 (reg-mips64.c, reg-mips64.o): New rules.
10013 * configure.srv: Handle mips64. Include regset support for mips.
10014 * linux-mips-low.c (union mips_register): New.
10015 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10016 (mips_breakpoint, mips_breakpoint_at): Use int.
10017 (mips_collect_register, mips_supply_register)
10018 (mips_collect_register_32bit, mips_supply_register_32bit)
10019 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10020 (mips_store_fpregset, target_regsets): New.
10021 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10023 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10025 * configure.srv: Add target "spu*-*-*".
10026 * Makefile.in (clean): Remove reg-spu.c.
10027 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10028 * spu-low.c: New file.
10030 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10032 * configure.ac: Correct td_thr_tls_get_addr test.
10033 * configure: Regenerated.
10035 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10037 * linux-low.c (linux_wait_for_event): Reformat. Use the
10038 pass_signals array.
10039 * remote-utils.c (decode_address_to_semicolon): New.
10040 * server.c (pass_signals, handle_general_set): New.
10041 (handle_query): Mention QPassSignals for qSupported.
10042 (main): Call handle_general_set.
10043 * server.h (pass_signals, decode_address_to_semicolon): New.
10045 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10047 * server.c (handle_query): Correct error handling for read_auxv.
10049 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10051 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10052 and srv_linux_thread_db to yes.
10053 * linux-s390-low.c (s390_fill_gregset): New function.
10054 (target_regsets): Define data structure.
10056 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10058 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10059 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10060 * config.in, configure: Regenerated.
10061 * inferiors.c (gdb_id_to_thread): New function.
10062 (gdb_id_to_thread_id): Use it.
10063 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10064 * linux-low.h (struct process_info): Add th member.
10065 (thread_db_get_tls_address): New prototype.
10066 * remote-utils.c (decode_address): Make non-static.
10067 * server.c (handle_query): Handle qGetTLSAddr.
10068 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10069 * target.h (struct target_ops): Add get_tls_address.
10070 * thread-db.c (maybe_attach_thread): Save the thread handle.
10071 (thread_db_get_tls_address): New.
10073 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10075 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10076 (linux_resume_one_process): Take a siginfo_t *. Update all
10077 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10078 (struct pending_signals): Add a siginfo_t.
10079 (linux_wait_for_process): Always set last_status.
10080 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10081 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10082 * linux-low.h (struct process_info): Add last_status.
10084 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10086 * remote-utils.c (try_rle): New function.
10087 (putpkt_binary): Use it.
10089 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10091 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10092 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10093 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10094 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10095 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10098 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10100 * server.c (terminal_fd): New variable.
10101 (old_foreground_pgrp): Likewise.
10102 (restore_old_foreground_pgrp): New function.
10103 (start_inferior): Record the terminal file descriptor in terminal_fd
10104 and its original foreground group in old_foreground_pgrp. Register
10105 restore_old_foreground_pgrp with atexit().
10107 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10109 * server.c (handle_query): Correct qPart to qXfer.
10111 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10113 * configure.ac: Check for more headers which are missing on
10114 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10115 * configure.srv: Add Cygwin and mingw32.
10116 * remote-utils.c: Don't include headers unconditionally which
10117 are missing on mingw32. Include <winsock.h> for mingw32.
10118 (remote_open): Adjust for mingw32 support. Flush
10119 standard error after writing to it.
10120 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10121 (unblock_async_io, enable_async_io, disable_async_io)
10122 (readchar, getpkt): Update for Winsock support.
10123 (prepare_resume_reply): Expect a protocol signal number.
10124 * server.c: Disable <sys/wait.h> on mingw32.
10125 (start_inferior): Adjust for mingw32 support. Flush
10126 standard error after writing to it.
10127 (attach_inferior): Likewise. Use protocol signal
10129 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10131 * win32-i386-low.c: New file.
10132 * Makefile.in (XM_CLIBS): Set.
10133 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10134 (win32-i386-low.o): New dependency rule.
10135 * linux-low.c (linux_wait): Use target signal numbers.
10136 * target.h (struct target_ops): Doc fix.
10137 * server.h (target_signal_to_name): New prototype.
10138 * gdbreplay.c: Don't include headers unconditionally which
10139 are missing on mingw32. Include <winsock.h> for mingw32.
10140 (remote_close, remote_open): Adjust for Winsock support.
10141 * configure, config.in: Regenerated.
10143 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10145 * server.c (decode_xfer_read, write_qxfer_response): New.
10146 (handle_query): Take a packet length argument. Handle
10147 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10148 the qSupported response.
10149 (main): Update call to handle_query.
10151 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10153 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10154 (putpkt_binary): Renamed from putpkt and adjusted for binary
10156 (putpkt): New wrapper for putpkt_binary.
10157 (readchar): Don't mask off the high bit.
10158 (decode_X_packet): New function.
10159 * server.c (main): Call putpkt_binary if a handler sets the packet
10160 length. Save the length of the incoming packet. Handle 'X'.
10161 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10163 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10165 * server.c (handle_query): Handle qSupported.
10167 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10169 * remote-utils.c (all_symbols_looked_up): New variable.
10170 (look_up_one_symbol): Check it.
10171 * server.h (look_up_one_symbol): New declaration.
10172 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10174 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10176 * Makefile.in (linux-arm-low.o): Update dependencies.
10177 * linux-arm-low.c: Include "gdb_proc_service.h".
10178 (PTRACE_GET_THREAD_AREA): Define.
10179 (ps_get_thread_area): New function.
10181 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10183 * configure.srv (m68k*-*-uclinux*): New target.
10184 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10185 (linux_resume_one_process): Remove extraneous cast.
10186 (linux_read_offsets): New.
10187 (linux_target_op): Add linux_read_offsets on mmuless systems.
10188 * server.c (handle_query): Add qOffsets logic.
10189 * target.h (struct target_ops): Add read_offsets.
10191 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10193 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10194 (PTRACE_GET_THREAD_AREA): Define.
10195 (ps_get_thread_area): New function.
10196 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10197 (linux-x86-64-low.o): Update.
10199 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10201 * configure.ac: Remove checks for prfpregset_t.
10202 * gdb_proc_service.h: New file.
10203 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10204 new "gdb_proc_service.h".
10205 * proc-service.c: Likewise.
10206 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10207 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10208 * Makefile.in (gdb_proc_service_h): Updated.
10209 * configure, config.in: Regenerated.
10211 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10213 * remote-utils.c (prepare_resume_reply): Move declaration
10214 of gdb_id_from_wait to the top of the block.
10216 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10218 * linux-low.c (regsets_store_inferior_registers): Read the regset
10219 from the target before filling it.
10221 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10223 * server.c (attach_inferior): Return SIGTRAP for a successful
10226 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10228 * Makefile.in (OBS): Add version.o.
10229 (STAGESTUFF): Delete.
10230 (version.o): Add dependencies.
10231 (version.c): Replace rule.
10232 (clean): Remove version.c.
10233 * server.c (gdbserver_version): New.
10234 (gdbserver_usage): Use printf.
10235 (main): Handle --version and --help.
10236 * server.h (version, host_name): Add declarations.
10238 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10250 * linux-x86-64-low.c:
10252 * linux-s390-low.c:
10253 * linux-ppc64-low.c:
10255 * linux-mips-low.c:
10256 * linux-m68k-low.c:
10257 * linux-m32r-low.c:
10260 * linux-ia64-low.c:
10261 * linux-i386-low.c:
10262 * linux-crisv32-low.c:
10274 * gdbserver.1: Add (C) after Copyright. Update the FSF
10277 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10279 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10280 (arm_breakpoint_at): Recognize both breakpoints.
10281 (the_low_target): Use the correct breakpoint instruction.
10283 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10285 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10286 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10287 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10288 (the_low_target): Update.
10290 2005-10-25 Andreas Schwab <schwab@suse.de>
10292 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10294 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10295 (ia64_num_regs): Reduce to 462.
10297 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10299 * acinclude.m4: Correct quoting.
10300 * aclocal.m4: Regenerated.
10302 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10303 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10304 (thread_db_init): Call thread_db_err_str.
10305 * configure.ac: Check for TD_VERSION.
10306 * config.in, configure: Regenerated.
10308 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10310 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10312 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10314 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10315 is not available. Define HAVE_PTRACE_GETREGS if it is.
10316 * config.in, configure: Regenerated.
10317 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10318 * linux-i386-low.c, linux-m68k-low.c: Update to use
10319 HAVE_PTRACE_GETREGS.
10320 * linux-low.c (regsets_fetch_inferior_registers)
10321 (regsets_store_inferior_registers): Only return 0 if we processed
10323 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10324 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10326 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10328 * inferiors.c (struct thread_info): Add gdb_id.
10329 (add_thread): Add gdb_id argument.
10330 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10331 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10332 calls to add_thread.
10333 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10334 * server.c (handle_query): Use thread_to_gdb_id.
10335 (handle_v_cont, main): Use gdb_id_to_thread_id.
10336 * server.h (add_thread): Update prototype.
10337 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10340 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10342 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10343 left-padded registers.
10344 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10345 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10347 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10349 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10350 * configure: Regenerate.
10351 * config.in: Regenerate.
10352 * server.h (NEED_DECLARATION_STRERROR):
10353 Replace with !HAVE_DECL_STRERROR.
10355 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10357 * linux-low.c (linux_wait, linux_send_signal): Don't test
10358 an unsigned long variable for > 0 if it could be MAX_ULONG.
10359 * server.c (myresume): Likewise.
10360 * target.c (set_desired_inferior): Likewise.
10362 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10364 * configure.ac: Simplify and improve check for socklen_t.
10365 * configure, config.in: Regenerate.
10367 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10369 * acconfig.h: Remove.
10370 * configure.ac: Add a test for socklen_t. Use three-argument
10371 AC_DEFINE throughout.
10372 * config.in: Regenerated using autoheader 2.59.
10373 * configure: Regenerated.
10375 * gdbreplay.c (socklen_t): Provide a default.
10376 (remote_open): Use socklen_t.
10377 * remote-utils.c (socklen_t): Provide a default.
10378 (remote_open): Use socklen_t.
10379 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10382 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10384 * linux-low.c (linux_read_memory, linux_write_memory)
10385 (linux_read_auxv): Likewise.
10386 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10387 (check_mem_write): Likewise.
10388 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10390 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10391 (registers_from_string, register_data): Likewise.
10392 * server.c (handle_query, main): Likewise.
10393 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10394 (decode_M_packet): Likewise.
10395 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10396 * target.h (struct target_ops): Update read_memory, write_memory,
10398 (read_inferior_memory, write_inferior_memory): Update.
10399 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10400 to unsigned char *.
10401 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10402 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10403 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10404 linux-s390-low.c, linux-sh-low.c: Update for changes in
10405 read_inferior_memory and the_low_target->breakpoint.
10407 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10409 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10410 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10411 * configure.srv: Add powerpc64-*-linux*.
10412 * linux-ppc64-low.c: New file.
10414 2005-05-23 Orjan Friberg <orjanf@axis.com>
10416 * linux-cris-low.c: New file with support for CRIS.
10417 * linux-crisv32-low.c: Ditto for CRISv32.
10418 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10419 (clean): Add reg-cris.c and reg-crisv32.c.
10420 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10421 reg-crisv32.o, and reg-crisv32.c to make rules.
10422 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10423 recognized targets.
10425 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10427 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10428 of sizeof (PTRACE_XFER_TYPE).
10429 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10431 2005-05-12 Orjan Friberg <orjanf@axis.com>
10433 * target.h (struct target_ops): Add insert_watchpoint,
10434 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10435 pointers for hardware watchpoint support.
10436 * linux-low.h (struct linux_target_ops): Ditto.
10437 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10438 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10439 to linux_target_ops.
10440 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10442 * server.c (main): Recognize 'Z' and 'z' packets.
10444 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10446 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10447 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10448 (the_low_target): Add new members.
10450 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10452 * proc-service.c (ps_lgetregs): Search all_processes instead of
10455 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10457 * server.c (start_inferior): Change return type to int.
10458 (attach_inferior): Change sigptr to int *.
10459 (handle_v_cont, handle_v_requests): Change signal to int *.
10460 (main): Change signal to int.
10462 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10464 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10465 * configure.srv: Add m32r*-*-linux*.
10466 * linux-m32r-low.c: New file.
10468 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10470 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10472 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10474 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10475 Take unsigned long arguments for PIDs.
10476 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10477 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10478 (wait_for_sigstop, linux_resume_one_process)
10479 (regsets_fetch_inferior_registers, linux_send_signal)
10480 (linux_read_auxv): Likewise. Update the types of variables holding
10481 PIDs. Update format string specifiers.
10482 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10483 * remote-utils.c (prepare_resume_reply): Likewise.
10484 * server.c (cont_thread, general_thread, step_thread)
10485 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10487 (handle_query): Update format specifiers.
10488 (handle_v_cont, main): Use strtoul for thread IDs.
10489 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10490 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10491 (general_thread, step_thread, thread_from_wait)
10492 (old_thread_from_wait): Update.
10493 * target.h (struct thread_resume): Use unsigned long for THREAD.
10494 (struct target_ops): Use unsigned long for arguments to attach and
10497 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10499 * acinclude.m4: Include bfd/bfd.m4 directly.
10500 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10501 <agriffis@toolchain.org>.
10502 * aclocal.m4, configure: Regenerated.
10504 2005-01-07 Andrew Cagney <cagney@gnu.org>
10506 * configure.ac: Rename configure.in, require autoconf 2.59.
10507 * configure: Re-generate.
10509 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10511 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10512 LIBS when finished.
10513 * aclocal.m4: Regenerated.
10514 * configure: Regenerated.
10516 2004-11-21 Andreas Schwab <schwab@suse.de>
10518 * linux-m68k-low.c (m68k_num_gregs): Define.
10519 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10520 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10521 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10522 (m68k_breakpoint_at): New. Add to the_low_target.
10524 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10525 srv_linux_thread_db to yes.
10527 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10529 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10530 (ARCH_SET_FS): Likewise.
10531 (ARCH_GET_FS): Likewise.
10532 (ARCH_GET_GS): Likewise.
10534 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10536 * linux-i386-low.c (ps_get_thread_area): New.
10537 * linux-x86-64-low.c (ps_get_thread_area): New.
10538 * linux-low.c: Include <sys/syscall.h>.
10539 (linux_kill_one_process): Don't kill the first thread here.
10540 (linux_kill): Kill the first thread here.
10541 (kill_lwp): New function.
10542 (send_sigstop, linux_send_signal): Use it.
10543 * proc-service.c: Clean up #ifdefs.
10544 (fpregset_info): Delete.
10545 (ps_lgetregs): Update and enable implementation.
10546 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10548 * remote-utils.c (struct sym_cache, symbol_cache): New.
10549 (input_interrupt): Print a clearer message.
10550 (async_io_enabled): New variable.
10551 (enable_async_io, disable_async_io): Use it. Update comments.
10552 (look_up_one_symbol): Use the symbol cache.
10553 * thread-db.c (thread_db_look_up_symbols): New function.
10554 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10556 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10558 * configure.in: Test for -rdynamic.
10559 * configure: Regenerated.
10560 * Makefile (INTERNAL_LDFLAGS): New.
10561 (gdbserver, gdbreplay): Use it.
10563 2004-09-02 Andrew Cagney <cagney@gnu.org>
10565 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10567 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10569 * linux-low.c (linux_wait): Clear all_processes list also.
10571 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10573 * linux-low.c: Include <errno.h>. Remove extern declaration of
10576 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10578 * gdbreplay.c, server.h, utils.c: Update copyright years.
10580 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10582 * server.c (main): Print child status or termination signal from
10583 variable 'signal', not 'sig'.
10585 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10587 * linux-low.c (linux_read_memory): Change return type to
10588 int. Check for and return error from ptrace().
10589 * target.c (read_inferior_memory): Change return type to int. Pass
10590 back return status from the_target->read_memory().
10591 * target.h (struct target_ops): Adapt *read_memory() prototype.
10593 (read_inferior_memory): Adapt prototype.
10594 * server.c (main): Return an error packet if
10595 read_inferior_memory() returns an error.
10597 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10599 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10600 Unify with other clean targets.
10602 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10604 * server.c (handle_v_cont): Call set_desired_inferior.
10606 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10608 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10610 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10612 * linux-low.c (linux_wait): Unblock async I/O.
10613 (linux_resume): Block and enable async I/O.
10614 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10615 * server.h (block_async_io, unblock_async_io): Add prototypes.
10617 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10619 * remote-utils.c (remote_open): Print a status notice after
10620 opening a TCP port.
10621 * server.c (attach_inferior): Print a status notice after
10624 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10626 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10628 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10630 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10632 * server.c, target.h: Update copyright years.
10634 2004-02-25 Roland McGrath <roland@redhat.com>
10636 * target.h (struct target_ops): New member `read_auxv'.
10637 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10638 * linux-low.c (linux_read_auxv): New function.
10639 (linux_target_ops): Initialize `read_auxv' member to that.
10641 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10643 Committed by Jim Blandy <jimb@redhat.com>.
10645 * linux-s390-low.c (s390_num_regs): Update.
10646 (s390_regmap): Remove control registers. Use __s390x__ predefine
10647 instead of GPR_SIZE to distiguish s390 and s390x targets.
10649 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10651 * linux-low.c: Update copyright year.
10652 (check_removed_breakpoint): Clear pending_is_breakpoint.
10653 (linux_set_resume_request, linux_queue_one_thread)
10654 (resume_status_pending_p): New functions.
10655 (linux_continue_one_thread): Use process->resume.
10656 (linux_resume): Only resume threads if there are no pending events.
10657 * linux-low.h (struct process_info): Add resume request
10660 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10662 * regcache.c (new_register_cache): Clear the allocated register
10663 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10665 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10667 * linux-low.c (linux_resume): Take a struct thread_resume *
10669 (linux_wait): Update call.
10670 (resume_ptr): New static variable.
10671 (linux_continue_one_thread): Renamed from
10672 linux_continue_one_process. Use resume_ptr.
10673 (linux_resume): Use linux_continue_one_thread.
10674 * server.c (handle_v_cont, handle_v_requests): New functions.
10675 (myresume): New function.
10676 (main): Handle 'v' case.
10677 * target.h (struct thread_resume): New type.
10678 (struct target_ops): Change argument of "resume" to struct
10680 (myresume): Delete macro.
10682 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10684 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10685 (uninstall): Support DESTDIR.
10687 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10689 * configure.srv: Add xscale*linux copy of arm*linux entry.
10691 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10693 * linux-arm-low.c (arm_reinsert_addr): New function.
10694 (the_low_target): Add arm_reinsert_addr.
10696 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10698 * mem-break.c: Remove whitespace at end of file.
10700 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10702 * configure.in: Check whether we need to prototype strerror.
10703 * server.h: Optionally prototype strerror.
10704 * gdbreplay.c (perror_with_name): Use strerror.
10705 * linux-low.c (linux_attach_lwp): Use strerror.
10706 * utils.c (perror_with_name): Use strerror.
10707 * config.in, configure: Regenerated.
10709 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10711 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10712 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10714 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10716 * Makefile.in (SFILES): Update.
10717 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10718 low-sun3.c: Remove files.
10720 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10722 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10723 (linux_detach_one_process, linux_detach): New functions.
10724 (linux_target_ops): Add linux_detach.
10725 * server.c (main): Handle 'D' packet.
10726 * target.h (struct target_ops): Add "detach" member.
10727 (detach_inferior): Define.
10729 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10731 From Kelley Cook <kelleycook@wideopenwest.com>:
10732 * configure.srv: Accept i[34567]86 variants.
10734 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10736 * linux-low.c (linux_wait_for_event): Correct comment typos.
10737 (linux_resume_one_process): Call check_removed_breakpoint.
10738 (linux_send_signal): New function.
10739 (linux_target_ops): Add linux_send_signal.
10740 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10742 * target.h (struct target_ops): Add send_signal.
10744 2003-05-29 Jim Blandy <jimb@redhat.com>
10746 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10747 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10748 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10749 away part of the register's value.
10751 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10753 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10754 (linux_wait_for_event, linux_init_signals): Likewise.
10756 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10758 * configure.in: Check for stdlib.h.
10759 * configure: Regenerated.
10760 * config.in: Regenerated.
10762 2003-01-04 Andreas Schwab <schwab@suse.de>
10764 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10766 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10768 * Makefile.in: Remove obsolete code.
10770 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10772 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10773 defined(PT_FPR0_HI).
10775 2002-11-17 Stuart Hughes <seh@zee2.com>
10777 * linux-arm-low.c (arm_num_regs): Increase.
10778 (arm_regmap): Include status register.
10780 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10782 * linux-low.c (register_addr): Remove incorrect -1 check.
10784 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10786 * linux-low.c (linux_create_inferior): Call setpgid. Return
10788 (unstopped_p, linux_signal_pid): Remove.
10789 (linux_target_ops): Remove linux_signal_pid.
10790 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10791 global instead of target method.
10792 * target.h (struct target_ops): Remove signal_pid. Update comment
10793 for create_inferior.
10794 * server.c (signal_pid): New variable.
10795 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10796 gdbserver. Set the child to be the foreground process group.
10797 (attach_inferior): Set signal_pid.
10799 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10801 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10803 2002-08-20 Jim Blandy <jimb@redhat.com>
10805 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10808 2002-08-01 Andrew Cagney <cagney@redhat.com>
10810 * Makefile.in: Make chill references obsolete.
10812 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10814 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10815 * configure: Regenerate.
10816 * config.in: Regenerate.
10818 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10820 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10821 (perror_with_name, remote_close, remote_open, expect, play): Static.
10823 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10825 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10826 byte offsets instead of an array of indexes.
10827 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10829 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10831 * regcache.c: Add comment.
10833 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10835 * thread-db.c: New file.
10836 * proc-service.c: New file.
10837 * acinclude.m4: New file.
10838 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10839 proc-service.o, and thread-db.o.
10840 (linux-low.o): Add USE_THREAD_DB.
10841 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10842 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10843 * aclocal.m4: Regenerated.
10844 * config.in: Regenerated.
10845 * configure: Regenerated.
10846 * configure.in: Check for proc_service.h, sys/procfs.h,
10847 thread_db.h, and linux/elf.h headrs.
10848 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10849 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10850 Check for -lthread_db and thread support.
10851 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10852 PowerPC, and SuperH.
10853 * i387-fp.c: Constify arguments.
10854 * i387-fp.h: Likewise.
10855 * inferiors.c: (struct thread_info): Renamed from
10856 `struct inferior_info'. Remove PID member. Use generic inferior
10857 list header. All uses updated.
10858 (inferiors, signal_pid): Removed.
10859 (all_threads): New variable.
10860 (get_thread): Define.
10861 (add_inferior_to_list): New function.
10862 (for_each_inferior): New function.
10863 (change_inferior_id): New function.
10864 (add_inferior): Removed.
10865 (remove_inferior): New function.
10866 (add_thread): New function.
10867 (free_one_thread): New function.
10868 (remove_thread): New function.
10869 (clear_inferiors): Use for_each_inferior and free_one_thread.
10870 (find_inferior): New function.
10871 (find_inferior_id): New function.
10872 (inferior_target_data): Update argument type.
10873 (set_inferior_target_data): Likewise.
10874 (inferior_regcache_data): Likewise.
10875 (set_inferior_regcache_data): Likewise.
10876 * linux-low.c (linux_bp_reinsert): Remove.
10877 (all_processes, stopping_threads, using_thrads)
10878 (struct pending_signals, debug_threads, pid_of): New.
10879 (inferior_pid): Replace with macro.
10880 (struct inferior_linux_data): Remove.
10881 (get_stop_pc, add_process): New functions.
10882 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10883 Use add_process and add_thread.
10884 (linux_attach_lwp): New function, based on old linux_attach. Use
10885 add_process and add_thread. Set stop_expected for new threads.
10886 (linux_attach): New function.
10887 (linux_kill_one_process): New function.
10888 (linux_kill): Kill all LWPs.
10889 (linux_thread_alive): Use find_inferior_id.
10890 (check_removed_breakpoints, status_pending_p): New functions.
10891 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10892 Update. Use WNOHANG. Wait for cloned processes also. Update process
10893 struct for the found process.
10894 (linux_wait_for_event): New function.
10895 (linux_wait): Use it. Support LWPs.
10896 (send_sigstop, wait_for_sigstop, stop_all_processes)
10897 (linux_resume_one_process, linux_continue_one_process): New functions.
10898 (linux_resume): Support LWPs.
10899 (REGISTER_RAW_SIZE): Remove.
10900 (fetch_register): Use register_size instead. Call supply_register.
10901 (usr_store_inferior_registers): Likewise. Call collect_register.
10902 Fix recursive case.
10903 (regsets_fetch_inferior_registers): Improve error message.
10904 (regsets_store_inferior_registers): Add debugging.
10905 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10906 (unstopped_p, linux_signal_pid): New functions.
10907 (linux_target_ops): Add linux_signal_pid.
10908 (linux_init_signals): New function.
10909 (initialize_low): Call it. Initialize using_threads.
10910 * regcache.c (inferior_regcache_data): Add valid
10912 (get_regcache): Fetch registers lazily. Add fetch argument
10913 and update all callers.
10914 (regcache_invalidate_one, regcache_invalidate): New
10916 (new_register_cache): Renamed from create_register_cache.
10917 Return the new regcache.
10918 (free_register_cache): Change argument to a void *.
10919 (registers_to_string, registers_from_string): Call get_regcache
10920 with fetch flag set.
10921 (register_data): Make static. Pass fetch flag to get_regcache.
10922 (supply_register): Call get_regcache with fetch flag clear.
10923 (collect_register): Call get_regcache with fetch flag set.
10924 (collect_register_as_string): New function.
10925 * regcache.h: Update.
10926 * remote-utils.c (putpkt): Flush after debug output and use
10928 Handle input interrupts while waiting for an ACK.
10929 (input_interrupt): Use signal_pid method.
10930 (getpkt): Flush after debug output and use stderr.
10931 (outreg): Use collect_register_as_string.
10932 (new_thread_notify, dead_thread_notify): New functions.
10933 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10934 and general_thread.
10935 (look_up_one_symbol): Flush after debug output.
10936 * server.c (step_thread, server_waiting): New variables.
10937 (start_inferior): Don't use signal_pid. Update call to mywait.
10938 (attach_inferior): Update call to mywait.
10939 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10940 (main): Don't fetch/store registers explicitly. Use
10941 set_desired_inferior. Support proposed ``Hs'' packet. Update
10943 * server.h: Update.
10944 (struct inferior_list, struct_inferior_list_entry): New.
10945 * target.c (set_desired_inferior): New.
10946 (write_inferior_memory): Constify.
10947 (mywait): New function.
10948 * target.h: Update.
10949 (struct target_ops): New signal_pid method.
10950 (mywait): Removed macro, added prototype.
10952 * linux-low.h (regset_func): Removed.
10953 (regset_fill_func, regset_store_func): New.
10954 (enum regset_type): New.
10955 (struct regset_info): Add type field. Use new operation types.
10956 (struct linux_target_ops): stop_pc renamed to get_pc.
10957 Add decr_pc_after_break and breakpoint_at.
10958 (get_process, get_thread_proess, get_process_thread)
10959 (strut process_info, all_processes, linux_attach_lwp)
10960 (thread_db_init): New.
10962 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10963 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10964 (the_low_target): Add new members.
10965 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10966 (i386_store_fpxregset): Constify.
10967 (target_regsets): Add new kind identifier.
10968 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10969 (i386_set_pc): Add debugging.
10970 (i386_breakpoint_at): New function.
10971 (the_low_target): Add new members.
10972 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10973 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10974 (mips_breakpoint_at): New.
10975 (the_low_target): Add new members.
10976 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10977 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10978 (the_low_target): Add new members.
10979 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10980 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10981 (the_low_target): Add new members.
10982 * linux-x86-64-low.c (target_regsets): Add new kind
10985 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10987 From Martin Pool <mbp@samba.org>:
10988 * server.c (gdbserver_usage): New function.
10991 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10993 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10994 stop_at -> stop_pc.
10996 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10998 * Makefile.in: Remove obsolete code.
11000 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11002 * linux-low.c (regsets_fetch_inferior_registers),
11003 (regsets_store_inferior_registers): Removed cast to int from
11005 * regcache.h: Added declaration of struct inferior_info.
11007 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11009 * inferiors.c (struct inferior_info): Add regcache_data.
11010 (add_inferior): Call create_register_cache.
11011 (clear_inferiors): Call free_register_cache.
11012 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11013 * regcache.c (struct inferior_regcache_data): New.
11014 (registers): Remove.
11015 (get_regcache): New function.
11016 (create_register_cache, free_register_cache): New functions.
11017 (set_register_cache): Don't initialize the register cache here.
11018 (registers_to_string, registers_from_string, register_data): Call
11020 * regcache.h: Add prototypes.
11021 * server.h: Likewise.
11023 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11025 * mem-break.c: New file.
11026 * mem-break.h: New file.
11027 * Makefile.in: Add mem-break.o rule; update server.h
11029 * inferiors.c (struct inferior_info): Add target_data
11031 (clear_inferiors): Free target_data member if set.
11032 (inferior_target_data, set_inferior_target_data): New functions.
11033 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11034 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11035 * linux-low.c (linux_bp_reinsert): New variable.
11036 (struct inferior_linux_data): New.
11037 (linux_create_inferior): Use set_inferior_target_data.
11038 (linux_attach): Likewise. Call add_inferior.
11039 (linux_wait_for_one_inferior): New function.
11040 (linux_wait): Call it.
11041 (linux_write_memory): Add const.
11042 (initialize_low): Call set_breakpoint_data.
11043 * linux-low.h (struct linux_target_ops): Add breakpoint
11045 * server.c (attach_inferior): Remove extra add_inferior
11047 * server.h: Include mem-break.h. Update inferior.c
11049 * target.c (read_inferior_memory)
11050 (write_inferior_memory): New functions.
11051 * target.h (read_inferior_memory)
11052 (write_inferior_memory): Change macros to prototypes.
11053 (struct target_ops): Update comments. Add const to write_memory
11056 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11058 * linux-low.c (usr_store_inferior_registers): Support
11059 registers which are allowed to fail to store.
11060 * linux-low.h (linux_target_ops): Likewise.
11061 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11062 (ppc_cannot_store_register): FPSCR may not be storable.
11064 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11066 * server.h: Include <string.h> if HAVE_STRING_H.
11067 * ChangeLog: Correct paths in last ChangeLog entry.
11069 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11071 * linux-low.h: Remove obsolete prototypes.
11072 (struct linux_target_ops): New.
11073 (extern the_low_target): New.
11074 * linux-low.c (num_regs, regmap): Remove declarations.
11075 (register_addr): Use the_low_target explicitly.
11076 (fetch_register): Likewise.
11077 (usr_fetch_inferior_registers): Likewise.
11078 (usr_store_inferior_registers): Likewise.
11079 * linux-arm-low.c (num_regs): Remove.
11080 (arm_num_regs): Define.
11081 (arm_regmap): Renamed from regmap, made static.
11082 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11084 (arm_cannot_store_register): Renamed from cannot_store_register,
11086 (the_low_target): New.
11087 * linux-i386-low.c (num_regs): Remove.
11088 (i386_num_regs): Define.
11089 (i386_regmap): Renamed from regmap, made static.
11090 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11092 (i386_cannot_store_register): Renamed from cannot_store_register,
11094 (the_low_target): New.
11095 * linux-ia64-low.c (num_regs): Remove.
11096 (ia64_num_regs): Define.
11097 (ia64_regmap): Renamed from regmap, made static.
11098 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11100 (ia64_cannot_store_register): Renamed from cannot_store_register,
11102 (the_low_target): New.
11103 * linux-m68k-low.c (num_regs): Remove.
11104 (m68k_num_regs): Define.
11105 (m68k_regmap): Renamed from regmap, made static.
11106 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11108 (m68k_cannot_store_register): Renamed from cannot_store_register,
11110 (the_low_target): New.
11111 * linux-mips-low.c (num_regs): Remove.
11112 (mips_num_regs): Define.
11113 (mips_regmap): Renamed from regmap, made static.
11114 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11116 (mips_cannot_store_register): Renamed from cannot_store_register,
11118 (the_low_target): New.
11119 * linux-ppc-low.c (num_regs): Remove.
11120 (ppc_num_regs): Define.
11121 (ppc_regmap): Renamed from regmap, made static.
11122 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11124 (ppc_cannot_store_register): Renamed from cannot_store_register,
11126 (the_low_target): New.
11127 * linux-s390-low.c (num_regs): Remove.
11128 (s390_num_regs): Define.
11129 (s390_regmap): Renamed from regmap, made static.
11130 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11132 (s390_cannot_store_register): Renamed from cannot_store_register,
11134 (the_low_target): New.
11135 * linux-sh-low.c (num_regs): Remove.
11136 (sh_num_regs): Define.
11137 (sh_regmap): Renamed from regmap, made static.
11138 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11140 (sh_cannot_store_register): Renamed from cannot_store_register,
11142 (the_low_target): New.
11143 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11144 (the_low_target): New.
11146 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11148 * Makefile.in: Add stamp-h target.
11149 * configure.in: Create stamp-h.
11150 * configure: Regenerated.
11152 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11154 * inferiors.c: New file.
11155 * target.c: New file.
11156 * target.h: New file.
11157 * Makefile.in: Add target.o and inferiors.o. Update
11159 * linux-low.c (inferior_pid): New static variable,
11160 moved from server.c.
11161 (linux_create_inferior): Renamed from create_inferior.
11162 Call add_inferior. Return 0 on success instead of a PID.
11163 (linux_attach): Renamed from myattach.
11164 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11165 (linux_thread_alive): Renamed from mythread_alive.
11166 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11168 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11169 (regsets_store_inferior_registers): Correct error message.
11170 Add missing ``return 0''.
11171 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11172 (linux_store_registers): Renamed from store_inferior_registers.
11173 (linux_read_memory): Renamed from read_inferior_memory.
11174 (linux_write_memory): Renamed from write_inferior_memory.
11175 (linux_target_ops): New structure.
11176 (initialize_low): Call set_target_ops ().
11177 * remote-utils.c (unhexify): New function.
11178 (hexify): New function.
11179 (input_interrupt): Send signals to ``signal_pid''.
11180 * server.c (inferior_pid): Remove.
11181 (start_inferior): Update create_inferior call.
11182 (attach_inferior): Call add_inferior.
11183 (handle_query): New function.
11184 (main): Call handle_query for `q' packets.
11185 * server.h: Include "target.h". Remove obsolete prototypes.
11186 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11188 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11190 * Makefile.in: Add WARN_CFLAGS. Update configury
11192 * configure.in: Check for <string.h>
11193 * configure: Regenerate.
11194 * config.in: Regenerate.
11195 * gdbreplay.c: Include needed system headers.
11196 (remote_open): Remove strchr prototype.
11197 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11198 * regcache.c (supply_register): Change buf argument to const void *.
11199 (supply_register_by_name): Likewise.
11200 (collect_register): Change buf argument to void *.
11201 (collect_register_by_name): Likewise.
11202 * regcache.h: Add missing prototypes.
11203 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11204 * server.c (handle_query): New function.
11205 (attached): New static variable, moved out of main.
11206 (main): Quiet longjmp clobber warnings.
11207 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11208 * utils.c (error): Remove NORETURN.