Rename gdbserver's low-level Linux x86 debug register accessors
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d33472ad
GB
12015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4 (x86_linux_dr_set_addr): ...this.
5 (x86_dr_low_get_addr): Rename to...
6 (x86_linux_dr_get_addr): ...this.
7 (x86_dr_low_set_control): Rename to...
8 (x86_linux_dr_set_control): ...this.
9 (x86_dr_low_get_control): Rename to...
10 (x86_linux_dr_get_control): ...this.
11 (x86_dr_low_get_status): Rename to...
12 (x86_linux_dr_get_status): ...this.
13 (x86_dr_low): Update with new function names.
14
4b134ca1
GB
152015-03-24 Gary Benson <gbenson@redhat.com>
16
17 * Makefile.in (x86-linux.o): New rule.
18 * configure.srv: Add x86-linux.o to relevant targets.
19 * linux-low.c (lwp_set_arch_private_info): New function.
20 (lwp_arch_private_info): Likewise.
21 * linux-x86-low.c: Include nat/x86-linux.h.
22 (arch_lwp_info): Removed structure.
23 (update_debug_registers_callback):
24 Use lwp_set_debug_registers_changed.
25 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
26 and lwp_set_debug_registers_changed.
27 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
28
34c703da
GB
292015-03-24 Gary Benson <gbenson@redhat.com>
30
31 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
32 * linux-arm-low.c (arm_new_thread): Likewise.
33 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
34 * linux-mips-low.c (mips_linux_new_thread): Likewise.
35 * linux-x86-low.c (x86_linux_new_thread): Likewise.
36 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
37
cff068da
GB
382015-03-24 Gary Benson <gbenson@redhat.com>
39
40 * linux-low.c (ptid_of_lwp): New function.
41 (lwp_is_stopped): Likewise.
42 (lwp_stop_reason): Likewise.
43 * linux-x86-low.c (update_debug_registers_callback):
44 Use lwp_is_stopped.
45 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
46 lwp_stop_reason.
47
b2f7c7e8
GB
482015-03-24 Gary Benson <gbenson@redhat.com>
49
50 * linux-low.h (linux_stop_lwp): Remove declaration.
51
6d4ee8c6
GB
522015-03-24 Gary Benson <gbenson@redhat.com>
53
54 * linux-low.h: Include nat/linux-nat.h.
55 * linux-low.c (iterate_over_lwps_args): New structure.
56 (iterate_over_lwps_filter): New function.
57 (iterate_over_lwps): Likewise.
58 * linux-x86-low.c (update_debug_registers_callback):
59 Update signature to what iterate_over_lwps expects.
60 Remove PID check that iterate_over_lwps now performs.
61 (x86_dr_low_set_addr): Use iterate_over_lwps.
62 (x86_dr_low_set_control): Likewise.
63
70a0bb6b
GB
642015-03-24 Gary Benson <gbenson@redhat.com>
65
66 * linux-x86-low.c (x86_debug_reg_state): New function.
67 (x86_linux_prepare_to_resume): Use the above.
68
7b669087
GB
692015-03-24 Gary Benson <gbenson@redhat.com>
70
71 * linux-low.c (current_lwp_ptid): New function.
72 * linux-x86-low.c: Include nat/linux-nat.h.
73 (x86_dr_low_get_addr): Use current_lwp_ptid.
74 (x86_dr_low_get_control): Likewise.
75 (x86_dr_low_get_status): Likewise.
76
eef49a3d
PA
772015-03-20 Pedro Alves <palves@redhat.com>
78
79 * tracepoint.c (cmd_qtstatus): Make "str" const.
80
b2333d22
PA
812015-03-20 Pedro Alves <palves@redhat.com>
82
83 * server.c (handle_general_set): Make "req_str" const.
84
23f238d3
PA
852015-03-19 Pedro Alves <palves@redhat.com>
86
87 * linux-low.c (linux_resume_one_lwp): Rename to ...
88 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
89 instead call perror_with_name.
90 (check_ptrace_stopped_lwp_gone): New function.
91 (linux_resume_one_lwp): Reimplement as wrapper around
92 linux_resume_one_lwp_throw that swallows errors if the LWP is
93 gone.
94
91baf43f
PA
952015-03-19 Pedro Alves <palves@redhat.com>
96
97 * linux-low.c (count_events_callback, select_event_lwp_callback):
98 No longer check whether the thread has resume_stop as last resume
99 kind.
100
8bf3b159
PA
1012015-03-19 Pedro Alves <palves@redhat.com>
102
103 * linux-low.c (count_events_callback, select_event_lwp_callback):
104 Use the lwp's status_pending_p field, not the thread's.
105
b90fc188
PA
1062015-03-19 Pedro Alves <palves@redhat.com>
107
108 * linux-low.c (select_event_lwp_callback): Update comments to
109 no longer mention SIGTRAP.
110
464b0089
GB
1112015-03-18 Gary Benson <gbenson@redhat.com>
112
113 * server.c (handle_query): Do not report vFile:fstat as supported.
114
aa9e327f
GB
1152015-03-11 Gary Benson <gbenson@redhat.com>
116
117 * hostio.c (sys/types.h): New include.
118 (sys/stat.h): Likewise.
119 (common-remote-fileio.h): Likewise.
120 (handle_fstat): New function.
121 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 122
791c0056
GB
1232015-03-11 Gary Benson <gbenson@redhat.com>
124
125 * configure.ac (AC_CHECK_MEMBERS): Add checks for
126 struct stat.st_blocks and struct stat.st_blksize.
127 * configure: Regenerate.
128 * config.in: Likewise.
129 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
130 (OBS): Add common-remote-fileio.o.
131 (common-remote-fileio.o): New rule.
132
9a9df970
PA
1332015-03-09 Pedro Alves <palves@redhat.com>
134
135 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
136 'struct sockaddr' pointer in 'accept' call.
137
9eb1356e
PA
1382015-03-09 Pedro Alves <palves@redhat.com>
139
140 Revert:
141 2015-03-07 Pedro Alves <palves@redhat.com>
142 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
143 or <winsock2.h> here. Instead include "gdb_socket.h".
144 (remote_open): Use union gdb_sockaddr_u.
145 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
146 or <winsock2.h> here. Instead include "gdb_socket.h".
147 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
148 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
149 or <sys/un.h>.
150 (init_named_socket, gdb_agent_helper_thread): Use union
151 gdb_sockaddr_u.
152
aac331e4
PA
1532015-03-07 Pedro Alves <palves@redhat.com>
154
155 * configure.ac (build_warnings): Move
156 -Wdeclaration-after-statement to the C-specific set.
157 * configure: Regenerate.
158
366c75fc
PA
1592015-03-07 Pedro Alves <palves@redhat.com>
160
161 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
162 or <winsock2.h> here. Instead include "gdb_socket.h".
163 (remote_open): Use union gdb_sockaddr_u.
164 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
165 or <winsock2.h> here. Instead include "gdb_socket.h".
166 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
167 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
168 or <sys/un.h>.
169 (init_named_socket, gdb_agent_helper_thread): Use union
170 gdb_sockaddr_u.
171
492d29ea
PA
1722015-03-07 Pedro Alves <palves@redhat.com>
173
174 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
175 instead.
176
60a191ed
YQ
1772015-03-06 Yao Qi <yao.qi@linaro.org>
178
179 * linux-aarch64-low.c (aarch64_insert_point): Use
180 show_debug_regs as a boolean.
181 (aarch64_remove_point): Likewise.
182
f5771b1d
PA
1832015-03-05 Pedro Alves <palves@redhat.com>
184
185 * lynx-low.c (lynx_target_ops): Install NULL hooks for
186 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
187 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
188 * nto-low.c (nto_target_ops): Likewise.
189 * spu-low.c (spu_target_ops): Likewise.
190 * win32-low.c (win32_target_ops): Likewise.
191
3e572f71
PA
1922015-03-04 Pedro Alves <palves@redhat.com>
193
194 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
195 Decide whether a breakpoint triggered based on the SIGTRAP's
196 siginfo.si_code.
197 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
198 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
199 (linux_low_filter_event): Check for breakpoints before checking
200 watchpoints.
201 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
202 siginfo.si_code.
203 (linux_stopped_by_sw_breakpoint)
204 (linux_supports_stopped_by_sw_breakpoint)
205 (linux_stopped_by_hw_breakpoint)
206 (linux_supports_stopped_by_hw_breakpoint): New functions.
207 (linux_target_ops): Install new target methods.
208
1ec68e26
PA
2092015-03-04 Pedro Alves <palves@redhat.com>
210
211 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
212 * server.c (swbreak_feature, hwbreak_feature): New globals.
213 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
214 (captured_main): Clear swbreak_feature and hwbreak_feature.
215 * server.h (swbreak_feature, hwbreak_feature): Declare.
216 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
217 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
218 supports_stopped_by_hw_breakpoint>: New fields.
219 (target_supports_stopped_by_sw_breakpoint)
220 (target_stopped_by_sw_breakpoint)
221 (target_supports_stopped_by_hw_breakpoint)
222 (target_stopped_by_hw_breakpoint): Declare.
223
15c66dd6
PA
2242015-03-04 Pedro Alves <palves@redhat.com>
225
226 enum lwp_stop_reason -> enum target_stop_reason
227 * linux-low.c (check_stopped_by_breakpoint): Adjust.
228 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
229 (linux_wait_1, stuck_in_jump_pad_callback)
230 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
231 (linux_stopped_by_watchpoint):
232 * linux-low.h (enum lwp_stop_reason): Delete.
233 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
234 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
235
98fc70d6
YQ
2362015-03-04 Yao Qi <yao.qi@linaro.org>
237
238 * Makefile.in (SFILES): Add linux-aarch64-low.c.
239
dd2ac174
GB
2402015-03-03 Gary Benson <gbenson@redhat.com>
241
242 * hostio.c (handle_vFile): Fix prefix lengths.
243
d68e53f4
MM
2442015-03-03 Markus Metzger <markus.t.metzger@intel.com>
245
246 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
247 ptr_bits.
248
bf2d68ab
AA
2492015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
250
251 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
252 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
253 (clean): Add "rm -f" for above C files.
254 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
255 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
256 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
257 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
258 * linux-s390-low.c (HWCAP_S390_VX): New macro.
259 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
260 (init_registers_s390x_vx_linux64)
261 (init_registers_s390x_tevx_linux64)
262 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
263 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
264 declarations.
265 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
266 (s390_store_vxrs_high): New functions.
267 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
268 NT_S390_VXRS_HIGH.
269 (s390_arch_setup): Add logic for selecting one of the new target
270 descriptions. Activate the new vector regsets if applicable.
271 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
272 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
273 and init_registers_s390x_tevx_linux64.
274
c966a859
PA
2752015-03-01 Pedro Alves <palves@redhat.com>
276
277 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
278 parameter.
279
4180215b
PA
2802015-02-27 Pedro Alves <palves@redhat.com>
281
282 * linux-x86-low.c (u_debugreg_offset): New function.
283 (x86_linux_dr_get, x86_linux_dr_set): Use it.
284
749bab01
PA
2852015-02-27 Pedro Alves <palves@redhat.com>
286
287 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
288 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
289 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
290 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
291 (ps_lsetfpregs, ps_getpid)
292 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
293 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
294 (ps_lsetxregs, ps_plog): Declare.
295
3c14e5a3
PA
2962015-02-27 Pedro Alves <palves@redhat.com>
297
298 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
299 IP_AGENT_EXPORT_FUNC.
300 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
301 IP_AGENT_EXPORT_FUNC.
302 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
303 (IP_AGENT_EXPORT): Delete.
304 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
305 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
306 (gdb_trampoline_buffer_error, collecting, gdb_collect)
307 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
308 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
309 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
310 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
311 (traceframe_read_count, traceframe_write_count)
312 (traceframes_created, trace_state_variables, get_raw_reg)
313 (get_trace_state_variable_value, set_trace_state_variable_value)
314 (ust_loaded, helper_thread_id, cmd_buf): Use
315 IPA_SYM_EXPORTED_NAME.
316 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
317 (tracepoints) Use IP_AGENT_EXPORT_VAR.
318 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
319 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
320 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
321 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
322 EXTERN_C_PUSH/EXTERN_C_POP.
323 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
324 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
325 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
326 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
327 (traceframe_write_count, traceframe_read_count)
328 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
329 (about_to_request_buffer_space, get_trace_state_variable_value)
330 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
331 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
332 EXTERN_C_PUSH/EXTERN_C_POP.
333 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
334 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
335 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
336 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
337 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
338 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
339 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
340 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
341 Define.
342 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
343 (IP_AGENT_EXPORT_VAR_DECL): Define.
344 (tracing): Declare.
345 (gdb_agent_get_raw_reg): Declare.
346
fe978cb0
PA
3472015-02-27 Tom Tromey <tromey@redhat.com>
348 Pedro Alves <palves@redhat.com>
349
350 Rename symbols whose names are reserved C++ keywords throughout.
351
3bc3d82a
PA
3522015-02-27 Pedro Alves <palves@redhat.com>
353
354 * Makefile.in (COMPILER): New, get it from autoconf.
355 (CXX): Get from autoconf instead.
356 (COMPILE.pre): Use COMPILER.
357 (CC-LD): Rename to ...
358 (CC_LD): ... this. Use COMPILER.
359 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
360 (CXX_FOR_TARGET): Default to g++ instead of gcc.
361 * acinclude.m4: Include build-with-cxx.m4.
362 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
363 Disable -Werror by default if building in C++ mode.
364 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
365 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
366 the C++ compiler. Save/restore CXXFLAGS too.
367 * configure: Regenerate.
368
07697489
PA
3692015-02-27 Pedro Alves <palves@redhat.com>
370
371 * acinclude.m4: Include libiberty.m4.
372 * configure.ac: Call libiberty_INIT.
373 * config.in, configure: Regenerate.
374
9beb7c4e
PA
3752015-02-26 Pedro Alves <palves@redhat.com>
376
377 * linux-low.c (linux_wait_1): When incrementing the PC past a
378 program breakpoint always use the_low_target.breakpoint_len as
379 increment, rather than the maximum between that and
380 the_low_target.decr_pc_after_break.
381
8090aef2
PA
3822015-02-23 Pedro Alves <palves@redhat.com>
383
384 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
385 thread was doing a step-over; always adjust the PC if
386 we stepped over a permanent breakpoint.
387 (linux_wait_1): If we stepped over breakpoint that was on top of a
388 permanent breakpoint, manually advance the PC past it.
389
bc9540e8
PA
3902015-02-23 Pedro Alves <palves@redhat.com>
391
392 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
393 modes.
394 (x86_fill_gregset, x86_store_gregset): Use it when handling
395 $orig_eax.
396
2db9a427
PA
3972015-02-20 Pedro Alves <palves@redhat.com>
398
399 * thread-db.c: Include "nat/linux-procfs.h".
400 (thread_db_init): Skip listing new threads if the kernel supports
401 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
402
afa8d396
PA
4032015-02-20 Pedro Alves <palves@redhat.com>
404
405 * linux-low.c (status_pending_p_callback): Use ptid_match.
406
c9587f88
AT
4072015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
408
409 PR breakpoints/16812
410 * linux-low.c (wstatus_maybe_breakpoint): Remove.
411 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
412 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
413
b05ec7a5
AT
4142015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
415
416 PR breakpoints/15956
417 * tracepoint.c (cmd_qtinit): Add check for current_thread.
418
d33501a5
MM
4192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
420
421 * linux-low.c (linux_low_btrace_conf): Print size.
422 * server.c (handle_btrace_conf_general_set): New.
423 (hanle_general_set): Call handle_btrace_conf_general_set.
424 (handle_query): Report Qbtrace-conf:bts:size as supported.
425
f4abbc16
MM
4262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
427
428 * linux-low.c (linux_low_enable_btrace): Update parameters.
429 (linux_low_btrace_conf): New.
430 (linux_target_ops)<to_btrace_conf>: Initialize.
431 * server.c (current_btrace_conf): New.
432 (handle_btrace_enable): Rename to ...
433 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
434 to target_enable_btrace. Update comment. Update users.
435 (handle_qxfer_btrace_conf): New.
436 (qxfer_packets): Add btrace-conf entry.
437 (handle_query): Report qXfer:btrace-conf:read as supported packet.
438 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
439 (target_ops)<read_btrace_conf>: New.
440 (target_enable_btrace): Update parameters.
441 (target_read_btrace_conf): New.
442
043c3577
MM
4432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
444
445 * server.c (handle_btrace_general_set): Remove call to
446 target_supports_btrace.
447 (supported_btrace_packets): New.
448 (handle_query): Call supported_btrace_packets.
449 * target.h: include btrace-common.h.
450 (btrace_target_info): Removed.
451 (supports_btrace, target_supports_btrace): Update parameters.
452
734b0e4b
MM
4532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
454
455 * Makefile.in (SFILES): Add common/btrace-common.c.
456 (OBS): Add common/btrace-common.o.
457 (btrace-common.o): Add build rules.
458 * linux-low: Include btrace-common.h.
459 (linux_low_read_btrace): Use struct btrace_data. Call
460 btrace_data_init and btrace_data_fini.
461
d6c146e9
PA
4622015-02-06 Pedro Alves <palves@redhat.com>
463
464 * thread-db.c (find_new_threads_callback): Add debug output.
465
20ba1ce6
PA
4662015-02-04 Pedro Alves <palves@redhat.com>
467
468 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
469 (resume_stopped_resumed_lwps): New function.
470 (linux_wait_for_event_filtered): Use it.
471
8cc73a39
SDJ
4722015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
473
474 * Makefile.in (SFILES): Add linux-personality.c.
475 (linux-personality.o): New rule.
476 * configure.srv (srv_linux_obj): Add linux-personality.o to the
477 list of objects to be built.
478 * linux-low.c: Include nat/linux-personality.h.
479 (linux_create_inferior): Remove code to disable address space
480 randomization (moved to ../nat/linux-personality.c). Create
481 cleanup to disable address space randomization.
482
fb23d554
SDJ
4832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
484
485 * Makefile.in (posix-strerror.o): New rule.
486 (mingw-strerror.o): Likewise.
487 * configure: Regenerated.
488 * configure.ac: Source file ../common/common.host. Initialize new
489 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
490
cdf43629
YQ
4912015-01-14 Yao Qi <yao@codesourcery.com>
492
493 * Makefile.in (SFILES): Add nat/ppc-linux.c.
494 (ppc-linux.o): New rule.
495 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
496 * configure.ac: AC_CHECK_FUNCS(getauxval).
497 * config.in: Re-generated.
498 * configure: Re-generated.
499 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
500 ppc64_64bit_inferior_p
501
514c5338
YQ
5022015-01-14 Yao Qi <yao@codesourcery.com>
503
504 * linux-ppc-low.c: Include "nat/ppc-linux.h".
505 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
506 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
507 (PT_ORIG_R3, PT_TRAP): Likewise.
508 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
509 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
510 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
511
3368c1e5
JB
5122015-01-10 Joel Brobecker <brobecker@adacore.com>
513
514 * i387-fp.c (i387_cache_to_xsave): In look over
515 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
516 zmmh_low_space field by use of zmmh_high_space.
517
582511be
PA
5182015-01-09 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (step_over_bkpt): Move higher up in the file.
521 (handle_extended_wait): Don't store the stop_pc here.
522 (get_stop_pc): Adjust comments and rename to ...
523 (check_stopped_by_breakpoint): ... this. Record whether the LWP
524 stopped for a software breakpoint or hardware breakpoint.
525 (thread_still_has_status_pending_p): New function.
526 (status_pending_p_callback): Use
527 thread_still_has_status_pending_p. If the event is no longer
528 interesting, resume the LWP.
529 (handle_tracepoints): Add assert.
530 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
531 (wstatus_maybe_breakpoint): New function.
532 (cancel_breakpoint): Delete function.
533 (check_stopped_by_watchpoint): New function, factored out from
534 linux_low_filter_event.
535 (lp_status_maybe_breakpoint): Delete function.
536 (linux_low_filter_event): Remove filter_ptid argument.
537 Leave thread group exits pending here. Store the LWP's stop PC.
538 Always leave events pending.
539 (linux_wait_for_event_filtered): Pull all events out of the
540 kernel, and leave them all pending.
541 (count_events_callback, select_event_lwp_callback): Consider all
542 events.
543 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
544 (select_event_lwp): Only give preference to the stepping LWP in
545 all-stop mode. Adjust comments.
546 (ignore_event): New function.
547 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
548 references to cancel_breakpoints. Adjust to renames. Also give
549 equal priority to all LWPs that have had events in non-stop mode.
550 If reporting a software breakpoint event, unadjust the LWP's PC.
551 (linux_wait): If linux_wait_1 returned an ignored event, retry.
552 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
553 Adjust.
554 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
555 (resume_status_pending_p): Use thread_still_has_status_pending_p.
556 (linux_stopped_by_watchpoint): Adjust.
557 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
558 * linux-low.h (enum lwp_stop_reason): New.
559 (struct lwp_info) <stop_pc>: Adjust comment.
560 <stopped_by_watchpoint>: Delete field.
561 <stop_reason>: New field.
562 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
563 * mem-break.c (software_breakpoint_inserted_here)
564 (hardware_breakpoint_inserted_here): New function.
565 * mem-break.h (software_breakpoint_inserted_here)
566 (hardware_breakpoint_inserted_here): Declare.
567 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
568 (cancel_breakpoints): Delete.
569 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
570 (upload_fast_traceframes): Remove references to
571 cancel_breakpoints.
572
a33e3959
PA
5732015-01-09 Pedro Alves <palves@redhat.com>
574
575 * thread-db.c (find_new_threads_callback): Ignore thread if the
576 kernel thread ID is -1.
577
8784d563
PA
5782015-01-09 Pedro Alves <palves@redhat.com>
579
580 * linux-low.c (linux_attach_fail_reason_string): Move to
581 nat/linux-ptrace.c, and rename.
582 (linux_attach_lwp): Update comment.
583 (attach_proc_task_lwp_callback): New function.
584 (linux_attach): Adjust to rename and use
585 linux_proc_attach_tgid_threads.
586 (linux_attach_fail_reason_string): Delete declaration.
587
76f2b779
JB
5882015-01-01 Joel Brobecker <brobecker@adacore.com>
589
590 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
591 * server.c (gdbserver_version): Likewise.
592
fafcc06a
SDJ
5932014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
594
595 * remote-utils.c: Include ctype.h.
596 (input_interrupt): Explicitly handle the case when the char
597 received is the NUL byte. Improve the printing of non-ASCII
598 characters.
599
beed38b8
JB
6002014-12-16 Joel Brobecker <brobecker@adacore.com>
601
602 * linux-low.c (linux_low_filter_event): Update call to
603 linux_enable_event_reporting following the addition of
604 a new parameter to that function.
605
bf330350
CU
6062014-12-16 Catalin Udma <catalin.udma@freescale.com>
607
608 PR server/17457
609 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
610 (AARCH64_FPCR_REGNO): Likewise.
611 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
612 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
613 (aarch64_store_fpregset): Likewise.
614
5227d625
JB
6152014-12-15 Joel Brobecker <brobecker@adacore.com>
616
617 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
618 Remove FIXME comment about assumption about N.
619
f93b65a0
JB
6202014-12-13 Joel Brobecker <brobecker@adacore.com>
621
622 * configure.ac: If large-file support is disabled in GDBserver,
623 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
624 * configure: Regenerate.
625
e5a9158d
AA
6262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
627
628 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
629 warning upon ENODATA from ptrace.
630 * linux-s390-low.c (s390_store_tdb): New.
631 (s390_regsets): Add regset for NT_S390_TDB.
632
feea5f36
AA
6332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
634
635 * linux-low.c (regsets_store_inferior_registers): Skip regsets
636 without a fill_function.
637 * linux-s390-low.c (s390_fill_last_break): Remove.
638 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
639 (s390_arch_setup): Use regset's size instead of fill_function for
640 loop end condition.
641
098dbe61
AA
6422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
643
644 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
645 the regset's store function when ptrace returned an error.
646 * regcache.c (get_thread_regcache): Invalidate register cache
647 before fetching inferior's registers.
648
28eef672
AA
6492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
650
651 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
652 while-loop as for-loop.
653 (regsets_store_inferior_registers): Likewise.
654
bdca27a2
YQ
6552014-11-28 Yao Qi <yao@codesourcery.com>
656
657 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
658 * config.in, configure: Re-generate.
659 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
660 is defined.
661
9c232dda
YQ
6622014-11-21 Yao Qi <yao@codesourcery.com>
663
664 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
665 (AC_CHECK_HEADERS): Remove malloc.h.
666 * configure: Re-generated.
667 * config.in: Re-generated.
668 * server.h: Don't include alloca.h and malloc.h.
669 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
670 Don't include malloc.h.
671
43968415
JB
6722014-11-17 Joel Brobecker <brobecker@adacore.com>
673
674 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
675 corresponding ERRNO check in same block.
676
40e91bc7
PA
6772014-11-12 Pedro Alves <palves@redhat.com>
678
679 * server.c (cont_thread): Update comment.
680 (start_inferior, attach_inferior): No longer clear cont_thread.
681 (handle_v_cont): No longer set cont_thread.
682 (captured_main): Clear cont_thread each time a GDB connects.
683
c2c118cf
PA
6842014-11-12 Pedro Alves <palves@redhat.com>
685
686 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
687 thread, and don't resume all threads if the Hc thread has exited.
688
78708b7c
PA
6892014-11-12 Pedro Alves <palves@redhat.com>
690
691 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
692 the process group instead of to a specific LWP.
693
a2abc7de
PA
6942014-10-15 Pedro Alves <palves@redhat.com>
695
696 PR server/17487
697 * win32-arm-low.c (arm_set_thread_context): Remove current_event
698 parameter.
699 (arm_set_thread_context): Delete.
700 (the_low_target): Adjust.
701 * win32-i386-low.c (debug_registers_changed)
702 (debug_registers_used): Delete.
703 (update_debug_registers_callback): New function.
704 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
705 needing to update their debug registers.
706 (win32_get_current_dr): New function.
707 (x86_dr_low_get_addr, x86_dr_low_get_control)
708 (x86_dr_low_get_status): Fetch the debug register from the thread
709 record's context.
710 (i386_initial_stuff): Adjust.
711 (i386_get_thread_context): Remove current_event parameter. Don't
712 clear debug_registers_changed nor copy DR values to
713 debug_reg_state.
714 (i386_set_thread_context): Delete.
715 (i386_prepare_to_resume): New function.
716 (i386_thread_added): Mark the thread as needing to update irs
717 debug registers.
718 (the_low_target): Remove i386_set_thread_context and install
719 i386_prepare_to_resume.
720 * win32-low.c (win32_get_thread_context): Adjust.
721 (win32_set_thread_context): Use SetThreadContext
722 directly.
723 (win32_prepare_to_resume): New function.
724 (win32_require_context): New function, factored out from ...
725 (thread_rec): ... this.
726 (continue_one_thread): Call win32_prepare_to_resume on each thread
727 we're about to continue.
728 (win32_resume): Call win32_prepare_to_resume on the event thread.
729 * win32-low.h (struct win32_thread_info)
730 <debug_registers_changed>: New field.
731 (struct win32_target_ops): Change prototype of set_thread_context,
732 delete set_thread_context and add prepare_to_resume.
733 (win32_require_context): New declaration.
734
a442d071
GB
7352014-10-08 Gary Benson <gbenson@redhat.com>
736
737 * server.h: Do not include common-exceptions.h.
738
6f1947e8
GB
7392014-10-08 Gary Benson <gbenson@redhat.com>
740
741 * server.h: Do not include cleanups.h.
742
63b434a4
JH
7432014-09-30 James Hogan <james.hogan@imgtec.com>
744
745 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
746 mips64-dsp-linux.c.
747
c4d9ceb6
YQ
7482014-09-23 Yao Qi <yao@codesourcery.com>
749
750 * linux-low.c (lp_status_maybe_breakpoint): New function.
751 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
752 (count_events_callback): Likewise.
753 (select_event_lwp_callback): Likewise.
754 (cancel_breakpoints_callback): Likewise.
755
89a5711c
DB
7562014-09-19 Don Breazeal <donb@codesourcery.com>
757
758 * linux-low.c (handle_extended_wait): Call
759 linux_ptrace_get_extended_event.
760 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
761 linux_is_extended_waitstatus.
762
bffc0964
JB
7632014-09-16 Joel Brobecker <brobecker@adacore.com>
764
765 * Makefile.in (CPPFLAGS): Define.
766 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
767 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
768
0bfdf32f
GB
7692014-09-16 Gary Benson <gbenson@redhat.com>
770
771 * inferiors.h (current_inferior): Renamed as...
772 (current_thread): New variable. All uses updated.
773 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
774 (maybe_move_out_of_jump_pad): Likewise.
775 (cancel_breakpoint): Likewise.
776 (linux_low_filter_event): Likewise.
777 (wait_for_sigstop): Likewise.
778 (linux_resume_one_lwp): Likewise.
779 (need_step_over_p): Likewise.
780 (start_step_over): Likewise.
781 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
782 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
783 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
784 and save_inferior as saved_thread.
785 * regcache.c (get_thread_regcache): Renamed saved_inferior as
786 saved_thread.
787 (regcache_invalidate_thread): Likewise.
788 * remote-utils.c (prepare_resume_reply): Likewise.
789 * thread-db.c (thread_db_get_tls_address): Likewise.
790 (disable_thread_event_reporting): Likewise.
791 (remove_thread_event_breakpoints): Likewise.
792 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
793 as saved_thread.
794 * target.h (set_desired_inferior): Renamed as...
795 (set_desired_thread): New declaration. All uses updated.
796 * server.c (myresume): Updated comment to reference thread instead
797 of inferior.
798 (handle_serial_event): Likewise.
799 (handle_target_event): Likewise.
800
361c8ade
GB
8012014-09-12 Tom Tromey <tromey@redhat.com>
802 Gary Benson <gbenson@redhat.com>
803
804 * regcache.h: Include common-regcache.h.
805 (regcache_read_pc): Don't declare.
806 * regcache.c (get_thread_regcache_for_ptid): New function.
807
bd9269f7
GB
8082014-09-11 Tom Tromey <tromey@redhat.com>
809 Gary Benson <gbenson@redhat.com>
810
811 * symbol.c: New file.
812 * Makefile.in (SFILES): Add symbol.c.
813 (OBS): Add symbol.o.
814
f8c1d06b
GB
8152014-09-11 Gary Benson <gbenson@redhat.com>
816
817 * target.c (target_stop_ptid, target_continue_ptid): New
818 functions.
819
721ec300
GB
8202014-09-11 Tom Tromey <tromey@redhat.com>
821 Gary Benson <gbenson@redhat.com>
822
823 * target.h: Include target/target.h.
824 * target.c (target_read_memory, target_read_uint32)
825 (target_write_memory): New functions.
826
c5e92cca
GB
8272014-09-11 Gary Benson <gbenson@redhat.com>
828
829 * server.h (debug_hw_points): Don't declare.
830 * server.c (debug_hw_points): Don't define. Replace all uses
831 with show_debug_regs.
832 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
833 all uses with show_debug_regs.
834
2e4bb98a
EBM
8352014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
836
837 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
838 endianness into account.
839 (ppc_supply_ptrace_register): Likewise.
840
ac740bc7
JH
8412014-09-03 James Hogan <james.hogan@imgtec.com>
842
843 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
844 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
845
97ea6506
GB
8462014-09-03 Gary Benson <gbenson@redhat.com>
847
848 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
849 ALL_DEBUG_ADDRESS_REGISTERS.
850
df7e5265
GB
8512014-09-02 Gary Benson <gbenson@redhat.com>
852
853 * i386-low.h: Renamed as...
854 * x86-low.h: New file. All type, function and variable name
855 prefixes changed from "i386_" to "x86_". All references updated.
856 * i386-low.c: Renamed as...
857 * x86-low.c: New file. All type, function and variable name
858 prefixes changed from "i386_" to "x86_". All references updated.
859
ed859da7
GB
8602014-09-02 Gary Benson <gbenson@redhat.com>
861
862 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
863 (x86_linux_new_thread): Likewise.
864
860789c7
GB
8652014-08-29 Gary Benson <gbenson@redhat.com>
866
867 * server.h (setjmp.h): Do not include.
868 (toplevel): Do not declare.
869 (common-exceptions.h): Include.
870 (cleanups.h): Likewise.
871 * server.c (toplevel): Do not define.
872 (exit_code): New static global.
873 (detach_or_kill_for_exit_cleanup): New function.
874 (main): New function. Original main renamed to...
875 (captured_main): New function.
876 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
877
ff55e1b5
GB
8782014-08-29 Gary Benson <gbenson@redhat.com>
879
880 * Makefile.in (SFILES): Add common/common-exceptions.c.
881 (OBS): Add common-exceptions.o.
882 (common-exceptions.o): New rule.
883 * utils.c (prepare_to_throw_exception): New function.
884
e9bcb658
GB
8852014-08-29 Gary Benson <gbenson@redhat.com>
886
887 * config.in: Regenerate.
888 * configure: Likewise.
889
e3180625
GB
8902014-08-29 Gary Benson <gbenson@redhat.com>
891
892 * Makefile.in (SFILES): Add common/cleanups.c.
893 (OBS): cleanups.o.
894 (cleanups.o): New rule.
895
e3d6ba5d
GB
8962014-08-29 Gary Benson <gbenson@redhat.com>
897
898 * utils.c (internal_vwarning): New function.
899
7096e886
GB
9002014-08-28 Gary Benson <gbenson@redhat.com>
901
902 * utils.h (fatal): Remove declaration.
903 * utils.c (fatal): Remove function.
904
14ce3192
GB
9052014-08-28 Gary Benson <gbenson@redhat.com>
906
907 * tracepoint.c (gdb_agent_init): Replace fatal with
908 perror_with_name.
909 (initialize_tracepoint): Likewise.
910
50278d59
GB
9112014-08-28 Gary Benson <gbenson@redhat.com>
912
913 * remote-utils.c (remote_prepare): Replace fatal with error.
914
aa96c426
GB
9152014-08-28 Gary Benson <gbenson@redhat.com>
916
917 * linux-low.c (linux_async): Replace fatal with warning.
918 Tidy up and return.
919 (linux_start_non_stop): Return -1 if linux_async failed.
920
f7160e97
GB
9212014-08-28 Gary Benson <gbenson@redhat.com>
922
923 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
924 gdb_assert.
925 (i386_dr_low_get_addr): Remove vague comment.
926 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
927 gdb_assert.
928
38e08fca
GB
9292014-08-28 Gary Benson <gbenson@redhat.com>
930
931 * inferiors.c (get_thread_process): Replace check with gdb_assert.
932 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
933 internal_error.
934 (linux_resume_one_lwp): Likewise.
935 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
936 gdb_assert.
937 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
938 with internal_error.
939 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
940 (init_register_cache): Replace fatal with gdb_assert_not_reached.
941 (find_register_by_name): Replace fatal with internal_error.
942 (find_regno): Likewise.
943 * tdesc.c (init_target_desc): Replace check with gdb_assert.
944 * thread-db.c (thread_db_create_event): Likewise.
945 (thread_db_load_search): Likewise.
946 (try_thread_db_load_1): Likewise.
947 * tracepoint.c (get_jump_space_head): Replace fatal with
948 internal_error.
949 (claim_trampoline_space): Likewise.
950 (have_fast_tracepoint_trampoline_buffer): Likewise.
951 (cmd_qtstart): Likewise.
952 (stop_tracing): Likewise.
953 (fast_tracepoint_collecting): Likewise.
954 (target_malloc): Likewise.
955 (download_tracepoint): Likewise.
956 (download_trace_state_variables): Replace check with gdb_assert.
957 (upload_fast_traceframes): Replace fatal with internal_error.
958
34abf635
GB
9592014-08-19 Tom Tromey <tromey@redhat.com>
960 Gary Benson <gbenson@redhat.com>
961
962 * Makefile.in (SFILES): Add common/common-debug.c.
963 (OBS): Add common-debug.o.
964 (common-debug.o): New rule.
965 * debug.h (debug_printf): Don't declare.
966 * debug.c (debug_printf): Renamed and rewritten as...
967 (debug_vprintf): New function.
968
f6e94d78
GB
9692014-08-19 Gary Benson <gbenson@redhat.com>
970
971 * utils.h: Do not include print-utils.h.
972
9239eeab
GB
9732014-08-19 Tom Tromey <tromey@redhat.com>
974 Gary Benson <gbenson@redhat.com>
975
976 * server.h: Add static assertion.
977 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
978
ef87c8bb
GB
9792014-08-19 Tom Tromey <tromey@redhat.com>
980 Gary Benson <gbenson@redhat.com>
981
982 * Makefile.in (SFILES): Add common/errors.c.
983 (OBS): Add errors.o.
984 (IPA_OBS): Add errors-ipa.o.
985 (errors.o): New rule.
986 (errors-ipa.o): Likewise.
987 * utils.h (perror_with_name, error, warning): Don't declare.
988 * utils.c (warning): Renamed and rewritten as...
989 (vwarning): New function.
990 (error): Renamed and rewritten as...
991 (verror): New function.
992 (internal_error): Renamed and rewritten as...
993 (internal_verror): New function.
994
bb974a24
GB
9952014-08-07 Gary Benson <gbenson@redhat.com>
996
997 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
998 * configure: Regenerate.
999 * config.in: Likewise.
1000 * server.h: Do not include errno.h.
1001 * event-loop.c: Likewise.
1002 * hostio-errno.c: Likewise.
1003 * linux-low.c: Likewise.
1004 * remote-utils.c: Likewise.
1005 * spu-low.c: Likewise.
1006 * utils.c: Likewise.
1007 * gdbreplay.c: Unconditionally include errno.h.
1008
6d3d12eb
GB
10092014-08-07 Gary Benson <gbenson@redhat.com>
1010
1011 * server.h: Do not include string.h.
1012 * event-loop.c: Likewise.
1013 * linux-low.c: Likewise.
1014 * regcache.c: Likewise.
1015 * remote-utils.c: Likewise.
1016 * spu-low.c: Likewise.
1017 * utils.c: Likewise.
1018
dccbb609
GB
10192014-08-07 Gary Benson <gbenson@redhat.com>
1020
1021 * server.h: Do not include gdb_assert.h.
1022
e76df0d0
GB
10232014-08-07 Gary Benson <gbenson@redhat.com>
1024
1025 * server.h: Do not include common-utils.h.
1026
4cb9c816
GB
10272014-08-07 Gary Benson <gbenson@redhat.com>
1028
1029 * server.h: Do not include ptid.h.
1030 * notif.h: Likewise.
1031
3995eeee
GB
10322014-08-07 Gary Benson <gbenson@redhat.com>
1033
1034 * server.h: Do not include gdb_locale.h.
1035
cb9f1a9b
GB
10362014-08-07 Gary Benson <gbenson@redhat.com>
1037
1038 * server.h: Do not include gdb/signals.h.
1039 * win32-low.c: Likewise.
1040
a5fceff8
GB
10412014-08-07 Gary Benson <gbenson@redhat.com>
1042
1043 * server.h: Do not include pathmax.h.
1044
b9391142
GB
10452014-08-07 Gary Benson <gbenson@redhat.com>
1046
1047 * server.h: Do not include libiberty.h.
1048 * linux-bfin-low.c: Likewise.
1049
0e443c87
GB
10502014-08-07 Gary Benson <gbenson@redhat.com>
1051
1052 * server.h: Do not include ansidecl.h.
1053
8ebb3f56
GB
10542014-08-07 Gary Benson <gbenson@redhat.com>
1055
1056 * linux-x86-low.c: Do not include stddef.h.
1057 * lynx-ppc-low.c: Likewise.
1058 * tracepoint.c: Likewise.
1059
8980bdf6
GB
10602014-08-07 Gary Benson <gbenson@redhat.com>
1061
1062 * server.h: Do not include stdarg.h.
1063 * nto-low.c: Likewise.
1064
d7096f71
GB
10652014-08-07 Gary Benson <gbenson@redhat.com>
1066
1067 * server.h: Do not include stdlib.h.
1068 * inferiors.c: Likewise.
1069 * linux-low.c: Likewise.
1070 * regcache.c: Likewise.
1071 * spu-low.c: Likewise.
1072 * tracepoint.c: Likewise.
1073 * utils.c: Likewise.
1074
d02f550d
GB
10752014-08-07 Gary Benson <gbenson@redhat.com>
1076
1077 * server.h: Do not include stdio.h.
1078 * linux-low.c: Likewise.
1079 * remote-utils.c: Likewise.
1080 * spu-low.c: Likewise.
1081 * utils.c: Likewise.
1082 * wincecompat.c: Likewise.
1083
87f6c4e3
GB
10842014-08-06 Gary Benson <gbenson@redhat.com>
1085
1086 * regcache.c (init_register_cache): Move conditionals inside if.
1087
7089dca4
GB
10882014-08-06 Gary Benson <gbenson@redhat.com>
1089
1090 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1091
462f517e
GB
10922014-07-31 Gary Benson <gbenson@redhat.com>
1093
1094 * ax.h: Do not include server.h.
1095 * gdbthread.h: Likewise.
1096 * lynx-low.h: Likewise.
1097 * notif.h: Likewise.
1098
976411d6
GB
10992014-07-30 Gary Benson <gbenson@redhat.com>
1100
1101 * server.h: Include common-defs.h.
1102 Do not include config.h or build-gnulib-gdbserver/config.h.
1103
d41f6d8e
GB
11042014-07-30 Gary Benson <gbenson@redhat.com>
1105
1106 * hostio-errno.c: Move server.h to top of includes list.
1107 * inferiors.c: Likewise.
1108 * linux-x86-low.c: Likewise.
1109 * notif.c: Include server.h.
1110
314c6a35
TT
11112014-07-24 Tom Tromey <tromey@redhat.com>
1112 Gary Benson <gbenson@redhat.com>
1113
1114 * server.h (CORE_ADDR): Now unsigned.
1115
69ff6be5
PA
11162014-07-16 Pedro Alves <palves@redhat.com>
1117
1118 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1119
ce9e3fe7
PA
11202014-07-15 Pedro Alves <palves@redhat.com>
1121
1122 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1123 copy.
1124
e76126e8
PA
11252014-07-11 Pedro Alves <palves@redhat.com>
1126
1127 * linux-low.c (kill_wait_lwp): New function, based on
1128 kill_one_lwp_callback, but use my_waitpid directly.
1129 (kill_one_lwp_callback, linux_kill): Use it.
1130
8e9db26e
PA
11312014-06-23 Pedro Alves <palves@redhat.com>
1132
1133 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1134 before setting DR0..DR3.
1135
698b3e08
GB
11362014-06-20 Gary Benson <gbenson@redhat.com>
1137
1138 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1139 * configure: Regenerated.
1140 * config.in: Likewise.
1141
125f8a3d
GB
11422014-06-20 Gary Benson <gbenson@redhat.com>
1143
1144 * Makefile.in (SFILES): Update locations for files moved
1145 from common to nat.
1146 (object file files): Reordered.
1147
42995dbd
GB
11482014-06-20 Gary Benson <gbenson@redhat.com>
1149
1150 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1151 (i386_dr_low_set_addr): Likewise.
1152 (i386_dr_low_get_addr): Likewise.
1153 (i386_dr_low_can_set_control): Likewise.
1154 (i386_dr_low_set_control): Likewise.
1155 (i386_dr_low_get_control): Likewise.
1156 (i386_dr_low_get_status): Likewise.
1157 (i386_get_debug_register_length): Likewise.
1158 * linux-x86-low.c (i386_dr_low_set_addr):
1159 Changed signature. Made static.
1160 (i386_dr_low_get_addr): Likewise.
1161 (i386_dr_low_set_control): Likewise.
1162 (i386_dr_low_get_control): Likewise.
1163 (i386_dr_low_get_status): Likewise.
1164 (i386_dr_low): New global variable.
1165 * win32-i386-low.c (i386_dr_low_set_addr):
1166 Changed signature. Made static.
1167 (i386_dr_low_get_addr): Likewise.
1168 (i386_dr_low_set_control): Likewise.
1169 (i386_dr_low_get_control): Likewise.
1170 (i386_dr_low_get_status): Likewise.
1171 (i386_dr_low): New global variable.
1172
e1d2394b
MS
11732014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1174
1175 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1176 * Makefile.in (AR, AR_FLAGS): Define.
1177 * configure: Regenerate.
1178
3a8ee006
GB
11792014-06-19 Gary Benson <gbenson@redhat.com>
1180
1181 * Makefile.in (i386-dregs.o): New rule.
1182 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1183 * i386-low.c (target.h): Remove include.
1184 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1185 (DR_CONTROL_SHIFT): Likewise.
1186 (DR_CONTROL_SIZE): Likewise.
1187 (DR_RW_EXECUTE): Likewise.
1188 (DR_RW_WRITE): Likewise.
1189 (DR_RW_READ): Likewise.
1190 (DR_RW_IORW): Likewise.
1191 (DR_LEN_1): Likewise.
1192 (DR_LEN_2): Likewise.
1193 (DR_LEN_4): Likewise.
1194 (DR_LEN_8): Likewise.
1195 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1196 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1197 (DR_ENABLE_SIZE): Likewise.
1198 (DR_LOCAL_SLOWDOWN): Likewise.
1199 (DR_GLOBAL_SLOWDOWN): Likewise.
1200 (DR_CONTROL_RESERVED): Likewise.
1201 (I386_DR_CONTROL_MASK): Likewise.
1202 (I386_DR_VACANT): Likewise.
1203 (I386_DR_LOCAL_ENABLE): Likewise.
1204 (I386_DR_GLOBAL_ENABLE): Likewise.
1205 (I386_DR_DISABLE): Likewise.
1206 (I386_DR_SET_RW_LEN): Likewise.
1207 (I386_DR_GET_RW_LEN): Likewise.
1208 (I386_DR_WATCH_HIT): Likewise.
1209 (i386_wp_op_t): Likewise.
1210 (i386_show_dr): Likewise.
1211 (i386_length_and_rw_bits): Likewise.
1212 (i386_insert_aligned_watchpoint): Likewise.
1213 (i386_remove_aligned_watchpoint): Likewise.
1214 (i386_handle_nonaligned_watchpoint): Likewise.
1215 i386_update_inferior_debug_regs(): Likewise.
1216 (i386_dr_insert_watchpoint): Likewise.
1217 (i386_dr_remove_watchpoint): Likewise.
1218 (i386_dr_region_ok_for_watchpoint): Likewise.
1219 (i386_dr_stopped_data_address): Likewise.
1220 (i386_dr_stopped_by_watchpoint): Likewise.
1221
8f26655c
GB
12222014-06-19 Gary Benson <gbenson@redhat.com>
1223
1224 * i386-low.c (i386_dr_show): Renamed to
1225 i386_show_dr and made static. All uses updated.
1226 (i386_dr_length_and_rw_bits): Renamed to
1227 i386_length_and_rw_bits and made static.
1228 All uses updated.
1229 (i386_dr_insert_aligned_watchpoint): Renamed to
1230 i386_insert_aligned_watchpoint and made static.
1231 All uses updated.
1232 (i386_dr_remove_aligned_watchpoint): Renamed to
1233 i386_remove_aligned_watchpoint and made static.
1234 All uses updated.
1235 (i386_dr_update_inferior_debug_regs): Renamed to
1236 i386_update_inferior_debug_regs and made static.
1237 All uses updated.
1238
b9228891
GB
12392014-06-18 Gary Benson <gbenson@redhat.com>
1240
5171def3
GB
1241 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1242 (i386_dr_low_can_set_control): Likewise.
1243 (i386_get_debug_register_length): Likewise.
1244 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1245 (i386_dr_low_can_set_control): Likewise.
1246 (i386_get_debug_register_length): Likewise.
1247
12482014-06-17 Gary Benson <gbenson@redhat.com>
1249
b9228891
GB
1250 * i386-low.h (i386-dregs.h): New include.
1251 (DR_FIRSTADDR): Now in i386-dregs.h.
1252 (DR_LASTADDR): Likewise.
1253 (DR_NADDR): Likewise.
1254 (DR_STATUS): Likewise.
1255 (DR_CONTROL): Likewise.
1256 (i386_debug_reg_state): Likewise.
1257 (i386_dr_insert_watchpoint): Likewise.
1258 (i386_dr_remove_watchpoint): Likewise.
1259 (i386_dr_region_ok_for_watchpoint): Likewise.
1260 (i386_dr_stopped_data_address): Likewise.
1261 (i386_dr_stopped_by_watchpoint): Likewise.
1262 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1263
4be83cc2
GB
12642014-06-18 Gary Benson <gbenson@redhat.com>
1265
1266 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1267 i386_dr_insert_watchpoint.
1268 (i386_low_remove_watchpoint): Renamed to
1269 i386_dr_remove_watchpoint.
1270 (i386_low_region_ok_for_watchpoint): Renamed to
1271 i386_dr_region_ok_for_watchpoint.
1272 (i386_low_stopped_data_address): Renamed to
1273 i386_dr_stopped_data_address.
1274 (i386_low_stopped_by_watchpoint): Renamed to
1275 i386_dr_stopped_by_watchpoint.
1276 * i386-low.c (i386_show_dr): Renamed to
1277 i386_dr_show and made nonstatic. All uses updated.
1278 (i386_length_and_rw_bits): Renamed to
1279 i386_dr_length_and_rw_bits and made nonstatic.
1280 All uses updated.
1281 (i386_insert_aligned_watchpoint): Renamed to
1282 i386_dr_insert_aligned_watchpoint and made nonstatic.
1283 All uses updated.
1284 (i386_remove_aligned_watchpoint): Renamed to
1285 i386_dr_remove_aligned_watchpoint and made nonstatic.
1286 All uses updated.
1287 (i386_update_inferior_debug_regs): Renamed to
1288 i386_dr_update_inferior_debug_regs and made nonstatic.
1289 All uses updated.
1290 (i386_low_insert_watchpoint): Renamed to
1291 i386_dr_insert_watchpoint. All uses updated.
1292 (i386_low_remove_watchpoint): Renamed to
1293 i386_dr_remove_watchpoint. All uses updated.
1294 (i386_low_region_ok_for_watchpoint): Renamed to
1295 i386_dr_region_ok_for_watchpoint. All uses updated.
1296 (i386_low_stopped_data_address): Renamed to
1297 i386_dr_stopped_data_address. All uses updated.
1298 (i386_low_stopped_by_watchpoint): Renamed to
1299 i386_dr_stopped_by_watchpoint. All uses updated.
1300
131aa0d4
GB
13012014-06-18 Gary Benson <gbenson@redhat.com>
1302
1303 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1304 (i386_dr_low_can_set_control): Likewise.
1305 (i386_insert_aligned_watchpoint): New check.
1306
d9305f7f
GB
13072014-06-18 Gary Benson <gbenson@redhat.com>
1308
1309 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1310 Renamed to state.
1311
e927c9fc
GB
13122014-06-18 Gary Benson <gbenson@redhat.com>
1313
1314 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1315 instead of fatal and error.
1316 (i386_handle_nonaligned_watchpoint): Likewise.
1317
1b6d4134
GB
13182014-06-18 Gary Benson <gbenson@redhat.com>
1319
1320 * i386-low.c (i386_get_debug_register_length): New macro.
1321 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1322 (i386_show_dr): Use debug_printf instead of fprintf. Use
1323 phex to format values.
1324
6e62758f
GB
13252014-06-18 Gary Benson <gbenson@redhat.com>
1326
1327 * i386-low.h: Comment changes.
1328 * i386-low.c: Likewise.
1329
fc6e2f03
GB
13302014-06-18 Gary Benson <gbenson@redhat.com>
1331
1332 * i386-low.c: Whitespace changes.
1333
f9d1eeed
TT
13342014-06-12 Tom Tromey <tromey@redhat.com>
1335
1336 * utils.c (freeargv): Remove.
1337
0b04e523
TT
13382014-06-12 Tom Tromey <tromey@redhat.com>
1339
1340 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1341 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1342 (parse_debug_format_options): Likewise.
1343 (gdbserver_usage): Likewise.
1344 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1345 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1346 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1347 against libiberty.
1348 ($(LIBGNU)): Depend on libiberty.
1349 (all-lib): Recurse into all subdirs.
1350 (install-only): Invoke "install" target in subdirs.
1351 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1352 targets.
1353 * configure: Rebuild.
1354 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1355 for vasprintf, vsnprintf, or gettimeofday.
1356 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1357 srv_tgtobj.
1358
270c9937
JB
13592014-06-05 Joel Brobecker <brobecker@adacore.com>
1360
1361 * development.sh: Delete.
1362 * Makefile.in (config.status): Adjust dependency on development.sh.
1363 * configure.ac: Adjust development.sh source call.
1364 * configure: Regenerate.
1365
0a261ed8
PA
13662014-06-02 Pedro Alves <palves@redhat.com>
1367
1368 * ax.c (gdb_free_agent_expr): New function.
1369 * ax.h (gdb_free_agent_expr): New declaration.
1370 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1371 list.
1372 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1373 static.
1374 (clear_breakpoint_conditions_and_commands): New function.
1375 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1376 (clear_breakpoint_conditions_and_commands): New declaration.
1377
e9dae05e
RR
13782014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1379
1380 * linux-aarch64-low.c (asm/ptrace.h): Include.
1381
5876f503
JK
13822014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1383
1384 Fix TLS access for -static -pthread.
1385 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1386 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1387 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1388
802e8e6d
PA
13892014-05-20 Pedro Alves <palves@redhat.com>
1390
1391 * linux-aarch64-low.c (aarch64_insert_point)
1392 (aarch64_remove_point): No longer check whether the type is
1393 supported here. Adjust to new interface.
1394 (the_low_target): Install aarch64_supports_z_point_type as
1395 supports_z_point_type method.
1396 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1397 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1398 instead of a Z packet char. Adjust.
1399 (arm_supports_z_point_type): New function.
1400 (arm_insert_point, arm_remove_point): Adjust to new interface.
1401 (the_low_target): Install arm_supports_z_point_type.
1402 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1403 (cris_insert_point, cris_remove_point): Adjust to new interface.
1404 Don't check whether the type is supported here.
1405 (the_low_target): Install cris_supports_z_point_type.
1406 * linux-low.c (linux_supports_z_point_type): New function.
1407 (linux_insert_point, linux_remove_point): Adjust to new interface.
1408 * linux-low.h (struct linux_target_ops) <insert_point,
1409 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1410 raw_breakpoint pointer parameter.
1411 <supports_z_point_type>: New method.
1412 * linux-mips-low.c (mips_supports_z_point_type): New function.
1413 (mips_insert_point, mips_remove_point): Adjust to new interface.
1414 Use mips_supports_z_point_type.
1415 (the_low_target): Install mips_supports_z_point_type.
1416 * linux-ppc-low.c (the_low_target): Install NULL as
1417 supports_z_point_type method.
1418 * linux-s390-low.c (the_low_target): Install NULL as
1419 supports_z_point_type method.
1420 * linux-sparc-low.c (the_low_target): Install NULL as
1421 supports_z_point_type method.
1422 * linux-x86-low.c (x86_supports_z_point_type): New function.
1423 (x86_insert_point): Adjust to new insert_point interface. Use
1424 insert_memory_breakpoint. Adjust to new
1425 i386_low_insert_watchpoint interface.
1426 (x86_remove_point): Adjust to remove_point interface. Use
1427 remove_memory_breakpoint. Adjust to new
1428 i386_low_remove_watchpoint interface.
1429 (the_low_target): Install x86_supports_z_point_type.
1430 * lynx-low.c (lynx_target_ops): Install NULL as
1431 supports_z_point_type callback.
1432 * nto-low.c (nto_supports_z_point_type): New.
1433 (nto_insert_point, nto_remove_point): Adjust to new interface.
1434 (nto_target_ops): Install nto_supports_z_point_type.
1435 * mem-break.c: Adjust intro comment.
1436 (struct raw_breakpoint) <raw_type, size>: New fields.
1437 <inserted>: Update comment.
1438 <shlib_disabled>: Delete field.
1439 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1440 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1441 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1442 (raw_bkpt_type_to_target_hw_bp_type): New function.
1443 (find_enabled_raw_code_breakpoint_at): New function.
1444 (find_raw_breakpoint_at): New type and size parameters. Use them.
1445 (insert_memory_breakpoint): New function, based off
1446 set_raw_breakpoint_at.
1447 (remove_memory_breakpoint): New function.
1448 (set_raw_breakpoint_at): Reimplement.
1449 (set_breakpoint): New, based on set_breakpoint_at.
1450 (set_breakpoint_at): Reimplement.
1451 (delete_raw_breakpoint): Go through the_target->remove_point
1452 instead of assuming memory breakpoints.
1453 (find_gdb_breakpoint_at): Delete.
1454 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1455 (find_gdb_breakpoint): New function.
1456 (set_gdb_breakpoint_at): Delete.
1457 (z_type_supported): New function.
1458 (set_gdb_breakpoint_1): New function, loosely based off
1459 set_gdb_breakpoint_at.
1460 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1461 (delete_gdb_breakpoint_at): Delete.
1462 (delete_gdb_breakpoint_1): New function, loosely based off
1463 delete_gdb_breakpoint_at.
1464 (delete_gdb_breakpoint): New function.
1465 (clear_gdb_breakpoint_conditions): Rename to ...
1466 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1467 breakpoint.
1468 (add_condition_to_breakpoint): Make static.
1469 (add_breakpoint_condition): Take a struct breakpoint pointer
1470 instead of an address. Adjust.
1471 (gdb_condition_true_at_breakpoint): Rename to ...
1472 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1473 z_type parameter.
1474 (gdb_condition_true_at_breakpoint): Reimplement.
1475 (add_breakpoint_commands): Take a struct breakpoint pointer
1476 instead of an address. Adjust.
1477 (gdb_no_commands_at_breakpoint): Rename to ...
1478 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1479 parameter. Return true if no breakpoint was found. Change debug
1480 output.
1481 (gdb_no_commands_at_breakpoint): Reimplement.
1482 (run_breakpoint_commands): Rename to ...
1483 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1484 and change return type to boolean.
1485 (run_breakpoint_commands): New function.
1486 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1487 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1488 breakpoint. Go through the_target->remove_point instead of
1489 assuming memory breakpoint.
1490 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1491 software and hardware breakpoints.
1492 (reinsert_raw_breakpoint): Go through the_target->insert_point
1493 instead of assuming memory breakpoint.
1494 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1495 software and hardware breakpoints.
1496 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1497 Check both software and hardware breakpoints.
1498 (validate_inserted_breakpoint): Assert the breakpoint is a
1499 software breakpoint. Set the inserted flag to -1 instead of
1500 setting shlib_disabled.
1501 (delete_disabled_breakpoints): Adjust.
1502 (validate_breakpoints): Only validate software breakpoints.
1503 Adjust to inserted flag change.
1504 (check_mem_read, check_mem_write): Skip breakpoint types other
1505 than software breakpoints. Adjust to inserted flag change.
1506 * mem-break.h (enum raw_bkpt_type): New enum.
1507 (raw_breakpoint, struct process_info): Forward declare.
1508 (Z_packet_to_target_hw_bp_type): Delete declaration.
1509 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1510 (set_gdb_breakpoint, delete_gdb_breakpoint)
1511 (clear_breakpoint_conditions): New declarations.
1512 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1513 (breakpoint_inserted_here): Update comment.
1514 (add_breakpoint_condition, add_breakpoint_commands): Replace
1515 address parameter with a breakpoint pointer parameter.
1516 (gdb_breakpoint_here): Update comment.
1517 (delete_gdb_breakpoint_at): Delete.
1518 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1519 * server.c (process_point_options): Take a struct breakpoint
1520 pointer instead of an address. Adjust.
1521 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1522 delete_gdb_breakpoint.
1523 * spu-low.c (spu_target_ops): Install NULL as
1524 supports_z_point_type method.
1525 * target.h: Include mem-break.h.
1526 (struct target_ops) <prepare_to_access_memory>: Update comment.
1527 <supports_z_point_type>: New field.
1528 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1529 instead of a char. Also take a raw breakpoint pointer.
1530 * win32-arm-low.c (the_low_target): Install NULL as
1531 supports_z_point_type.
1532 * win32-i386-low.c (i386_supports_z_point_type): New function.
1533 (i386_insert_point, i386_remove_point): Adjust to new interface.
1534 (the_low_target): Install i386_supports_z_point_type.
1535 * win32-low.c (win32_supports_z_point_type): New function.
1536 (win32_insert_point, win32_remove_point): Adjust to new interface.
1537 (win32_target_ops): Install win32_supports_z_point_type.
1538 * win32-low.h (struct win32_target_ops):
1539 <supports_z_point_type>: New method.
1540 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1541 instead of a char. Also take a raw breakpoint pointer.
1542
932539e3
PA
15432014-05-20 Pedro Alves <palves@redhat.com>
1544
1545 * mem-break.h: Include break-common.h.
1546 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1547 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1548 (Z_packet_to_target_hw_bp_type): New declaration.
1549 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1550 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1551 (Z_PACKET_ACCESS_WP): Delete macros.
1552 (Z_packet_to_hw_type): Delete function.
1553 * i386-low.h: Don't include break-common.h here.
1554 (Z_packet_to_hw_type): Delete declaration.
1555 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1556 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1557 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1558 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1559 * linux-aarch64-low.c: Don't include break-common.h here.
1560 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1561 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1562 (Z_packet_to_target_hw_bp_type): Delete function.
1563 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1564 function.
1565 (mips_insert_point, mips_remove_point): Use
1566 Z_packet_to_target_hw_bp_type.
1567
4ff0d3d8
PA
15682014-05-20 Pedro Alves <palves@redhat.com>
1569
1570 * linux-aarch64-low.c: Include break-common.h.
1571 (enum target_point_type): Delete.
1572 (Z_packet_to_point_type): Rename to ...
1573 (Z_packet_to_target_hw_bp_type): ... this, and return a
1574 target_hw_bp_type instead.
1575 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1576 instead of an enum target_point_type.
1577 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1578 breakpoint type.
1579 (aarch64_dr_state_insert_one_point)
1580 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1581 (aarch64_handle_aligned_watchpoint)
1582 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1583 Take an enum target_hw_bp_type instead of an enum
1584 target_point_type.
1585 (aarch64_supports_z_point_type): New function.
1586 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1587 use Z_packet_to_target_hw_bp_type.
1588
786dc519
JB
15892014-05-20 Joel Brobecker <brobecker@adacore.com>
1590
1591 * configure.ac: Only use -Werror by default when DEVELOPMENT
1592 is true.
1593 * configure: Regenerate.
1594
9e0aa64f
JK
15952014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1596
1597 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1598 * linux-x86-low.c (X86_64_USER_REGS): New.
1599 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1600
2b577b92
YQ
16012014-04-28 Yao Qi <yao@codesourcery.com>
1602
1603 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1604 name.
1605
94611da2
PA
16062014-04-25 Pedro Alves <palves@redhat.com>
1607
1608 PR server/16255
1609 * linux-low.c (linux_attach_fail_reason_string): New function.
1610 (linux_attach_lwp): Delete.
1611 (linux_attach_lwp_1): Rename to ...
1612 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1613 argument. Remove "initial" parameter. Return int instead of
1614 void. Don't error or warn here.
1615 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1616 failure to attach to the tgid. Call warning when failing to
1617 attach to an lwp.
1618 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1619 argument. Remove "initial" parameter. Return int instead of
1620 void. Don't error or warn here.
1621 (linux_attach_fail_reason_string): New declaration.
1622 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1623 interface change. Use linux_attach_fail_reason_string.
1624
01f9f808
MS
16252014-04-24 Michael Sturm <michael.sturm@mintel.com>
1626 Walfred Tedeschi <walfred.tedeschi@intel.com>
1627
1628 * Makefile.in: Added rules to handle new files
1629 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1630 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1631 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1632 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1633 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1634 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1635 x32-avx512-linux.o.
1636 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1637 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1638 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1639 i386/x32-avx512.xml.
1640 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1641 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1642 i386/x32-avx512-linux.xml.
1643 * i387-fp.c (num_avx512_k_registers): New constant for number
1644 of K registers.
1645 (num_avx512_zmmh_low_registers): New constant for number of
1646 lower ZMM registers (0-15).
1647 (num_avx512_zmmh_high_registers): New constant for number of
1648 higher ZMM registers (16-31).
1649 (num_avx512_ymmh_registers): New contant for number of higher
1650 YMM registers (ymm16-31 added by avx521 on x86_64).
1651 (num_avx512_xmm_registers): New constant for number of higher
1652 XMM registers (xmm16-31 added by AVX512 on x86_64).
1653 (struct i387_xsave): Add space for AVX512 registers.
1654 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1655 Add code to handle AVX512 registers.
1656 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1657 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1658 prototypei from generated file.
1659 (tdesc_amd64_avx512_linux): Likewise.
1660 (init_registers_x32_avx512_linux): Likewise.
1661 (tdesc_x32_avx512_linux): Likewise.
1662 (init_registers_i386_avx512_linux): Likewise.
1663 (tdesc_i386_avx512_linux): Likewise.
1664 (x86_64_regmap): Add AVX512 registers.
1665 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1666 mask.
1667 (initialize_low_arch): Add code to initialize AVX512 registers.
1668
51aa91f9
PA
16692014-04-23 Pedro Alves <palves@redhat.com>
1670
1671 * mem-break.c (find_gdb_breakpoint_at): Make static.
1672 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1673
a4165e94
PA
16742014-04-23 Pedro Alves <palves@redhat.com>
1675
1676 * i386-low.c: Don't include break-common.h here.
1677 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1678 prototype to take target_hw_bp_type as argument instead of a Z
1679 packet char.
1680 * i386-low.h: Include break-common.h here.
1681 (Z_packet_to_hw_type): Declare.
1682 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1683 prototypes.
1684 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1685 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1686 (x86_remove_point): Convert the packet number to a
1687 target_hw_bp_type before calling i386_low_remove_watchpoint.
1688 * win32-i386-low.c (i386_insert_point): Convert the packet number
1689 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1690 (i386_remove_point): Convert the packet number to a
1691 target_hw_bp_type before calling i386_low_remove_watchpoint.
1692
b8acf843
PA
16932014-04-23 Pedro Alves <palves@redhat.com>
1694
1695 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1696
d708bcd1
PA
16972014-04-10 Pedro Alves <palves@redhat.com>
1698
1699 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1700 Check if the condition or command is NULL before checking if the
1701 breakpoint is known. On success, return true.
1702 * mem-break.h (add_breakpoint_condition): Document return.
1703 (add_breakpoint_commands): Add describing comment.
1704 * server.c (skip_to_semicolon): New function.
1705 (process_point_options): Use it.
1706
2eec7d5b
PA
17072014-04-09 Pedro Alves <palves@redhat.com>
1708
1709 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1710 to lwpid_of.
1711
fa96cb38
PA
17122014-02-27 Pedro Alves <palves@redhat.com>
1713
1714 PR 12702
1715 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1716 macros.
1717 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1718 output.
1719 (last_thread_of_process_p): Take a PID argument instead of a
1720 thread pointer.
1721 (linux_wait_for_lwp): Delete.
1722 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1723 functions.
1724 (linux_low_filter_event): New function, party factored out from
1725 linux_wait_for_event.
1726 (linux_wait_for_event): Rename to ...
1727 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1728 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1729 sigsuspend. Check for zombie leaders.
1730 (linux_wait_for_event): Reimplement as wrapper around
1731 linux_wait_for_event_filtered.
1732 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1733 a normal or signal exit is seen, it's the whole process exiting.
1734 (wait_for_sigstop): No longer a for_each_inferior callback.
1735 Rewrite on top of linux_wait_for_event_filtered.
1736 (stop_all_lwps): Call wait_for_sigstop directly.
1737 * server.c (resume, handle_target_event): Handle
1738 TARGET_WAITKIND_NO_RESUMED.
1739
d763de10
JB
17402014-02-26 Joel Brobecker <brobecker@adacore.com>
1741
1742 * win32-low.c (psapi_get_dll_name,
1743 * win32_CreateToolhelp32Snapshot): Delete.
1744 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1745 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1746 Delete.
1747 (handle_load_dll): Add function description.
1748 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1749
850a0f76
JB
17502014-02-26 Joel Brobecker <brobecker@adacore.com>
1751
1752 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1753 Add comment.
1754 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1755 base address when calling win32_add_one_solib.
1756 (handle_load_dll): Delete local variable load_addr.
1757 Remove 0x1000 offset applied to DLL base address when calling
1758 win32_add_one_solib.
1759 (handle_unload_dll): Add comment.
1760
f25b3fc3
JB
17612014-02-26 Joel Brobecker <brobecker@adacore.com>
1762
1763 * win32-low.c (win32_add_all_dlls): Renames
1764 win32_ensure_ntdll_loaded. Rewrite function documentation.
1765 Adjust implementation to always load all DLLs.
1766 Add 0x1000 offset to DLL base address when calling
1767 win32_add_one_solib.
1768 (child_initialization_done): New static global.
1769 (do_initial_child_stuff): Set child_initialization_done to
1770 zero during child initialization, and 1 after. Replace call
1771 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1772 Add comment.
1773 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1774 (handle_unload_dll): Add function documentation.
1775 (get_child_debug_event): Ignore load and unload DLL events
1776 during child initialization.
1777
d86d4aaf
DE
17782014-02-20 Doug Evans <dje@google.com>
1779
3bc32da3 1780 Remove global all_lwps.
d86d4aaf
DE
1781 * inferiors.h (ptid_of): Move here from linux-low.h.
1782 (pid_of, lwpid_of): Ditto.
1783 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1784 parameter is a struct thread_info * now.
1785 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1786 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1787 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1788 directly.
1789 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1790 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1791 * linux-arm-low.c (update_registers_callback): Update, "entry"
1792 parameter is a struct thread_info * now.
1793 Fetch lwpid from current_inferior directly.
1794 (arm_insert_point): Pass &all_threads to find_inferior instead of
1795 &all_lwps.
1796 (arm_remove_point): Ditto.
1797 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1798 (arm_prepare_to_resume): Fetch pid from thread.
1799 (arm_read_description): Fetch lwpid from current_inferior directly.
1800 * linux-low.c (all_lwps): Delete.
1801 (delete_lwp): Delete call to remove_inferior.
1802 (handle_extended_wait): Fetch lwpid from thread.
1803 (add_lwp): Don't set lwp->entry.id. Remove call to
1804 add_inferior_to_list.
1805 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1806 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1807 (kill_one_lwp_callback): Ditto.
1808 (linux_kill): Don't dereference NULL pointer.
1809 Fetch ptid,lwpid from thread.
1810 (get_detach_signal): Fetch ptid from thread.
1811 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1812 Simplify call to regcache_invalidate_thread.
1813 (delete_lwp_callback): Update, "entry" parameter is a
1814 struct thread_info * now. Fetch pid from thread.
1815 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1816 (status_pending_p_callback): Update, "entry" parameter is a
1817 struct thread_info * now. Fetch ptid from thread.
1818 (find_lwp_pid): Update, "entry" parameter is a
1819 struct thread_info * now.
1820 (linux_wait_for_lwp): Fetch pid from thread.
1821 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1822 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1823 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1824 (dequeue_one_deferred_signal): Ditto.
1825 (cancel_breakpoint): Fetch ptid from current_inferior.
1826 (linux_wait_for_event): Pass &all_threads to find_inferior,
1827 not &all_lwps. Fetch ptid, lwpid from thread.
1828 (count_events_callback): Update, "entry" parameter is a
1829 struct thread_info * now.
1830 (select_singlestep_lwp_callback): Ditto.
1831 (select_event_lwp_callback): Ditto.
1832 (cancel_breakpoints_callback): Ditto.
1833 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1834 not &all_lwps.
1835 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1836 (unsuspend_one_lwp): Update, "entry" parameter is a
1837 struct thread_info * now.
1838 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1839 not &all_lwps.
1840 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1841 Fetch lwpid from thread, not lwp.
1842 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1843 Pass &all_threads to find_inferior, not &all_lwps.
1844 (send_sigstop): Fetch lwpid from thread, not lwp.
1845 (send_sigstop_callback): Update, "entry" parameter is a
1846 struct thread_info * now.
1847 (suspend_and_send_sigstop_callback): Ditto.
1848 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1849 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1850 struct thread_info * now.
1851 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1852 from thread, lwp.
1853 (lwp_running): Update, "entry" parameter is a
1854 struct thread_info * now.
1855 (stop_all_lwps): Fetch ptid from thread.
1856 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1857 (linux_resume_one_lwp): Fetch lwpid from thread.
1858 (linux_set_resume_request): Update, "entry" parameter is a
1859 struct thread_info * now. Fetch pid, lwpid from thread.
1860 (resume_status_pending_p): Update, "entry" parameter is a
1861 struct thread_info * now.
1862 (need_step_over_p): Ditto. Fetch lwpid from thread.
1863 (start_step_over): Fetch lwpid from thread.
1864 (linux_resume_one_thread): Update, "entry" parameter is a
1865 struct thread_info * now. Fetch lwpid from thread.
1866 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1867 (proceed_one_lwp): Update, "entry" parameter is a
1868 struct thread_info * now. Fetch lwpid from thread.
1869 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1870 struct thread_info * now.
1871 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1872 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1873 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1874 directly.
1875 (regsets_store_inferior_registers): Ditto.
1876 (fetch_register, store_register): Ditto.
1877 (linux_read_memory, linux_write_memory): Ditto.
1878 (linux_request_interrupt): Ditto.
1879 (linux_read_auxv): Ditto.
1880 (linux_xfer_siginfo): Ditto.
1881 (linux_qxfer_spu): Ditto.
1882 (linux_qxfer_libraries_svr4): Ditto.
1883 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1884 moved to inferiors.h.
1885 (get_lwp): Delete.
1886 (get_thread_lwp): Update.
1887 (struct lwp_info): Delete member "entry". Simplify comment for
1888 member "thread".
1889 (all_lwps): Delete.
1890 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1891 current_inferior directly.
1892 (update_watch_registers_callback): Update, "entry" parameter is a
1893 struct thread_info * now. Fetch pid from thread.
1894 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1895 (mips_insert_point): Fetch lwpid from current_inferior.
1896 Pass &all_threads to find_inferior, not &all_lwps.
1897 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1898 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1899 directly.
1900 (mips_stopped_data_address): Ditto.
1901 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1902 directly.
1903 * linux-tile-low.c (tile_arch_setup): Ditto.
1904 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1905 (update_debug_registers_callback): Update, "entry" parameter is a
1906 struct thread_info * now. Fetch pid from thread.
1907 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1908 Pass &all_threads to find_inferior, not &all_lwps.
1909 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1910 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1911 Pass &all_threads to find_inferior, not &all_lwps.
1912 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1913 (i386_dr_low_get_status): Ditto.
1914 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1915 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1916 (x86_linux_read_description): Ditto.
1917 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1918
3b8361aa
DE
19192014-02-20 Doug Evans <dje@google.com>
1920
1921 * inferiors.c (get_first_inferior): Fix buglet.
1922
f7667f0d
DE
19232014-02-19 Doug Evans <dje@google.com>
1924
1925 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1926 * inferiors.c (add_thread): Change result type to struct thread_info *.
1927 All callers updated.
1928 (add_lwp): Call add_thread here instead of in callers.
1929 All callers updated.
1930 * linux-low.h (get_lwp_thread): Rewrite.
1931 (struct lwp_info): New member "thread".
1932
b3312d80
DE
19332014-02-19 Doug Evans <dje@google.com>
1934
1935 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1936 All callers updated.
1937
ecc6f45c
DE
19382014-02-19 Doug Evans <dje@google.com>
1939
1940 * inferiors.c (add_thread): Fix whitespace.
1941
649ebbca
DE
19422014-02-19 Doug Evans <dje@google.com>
1943
1944 * dll.c (clear_dlls): Replace accessing list implemention details
1945 with API function.
1946 * gdbthread.h (get_first_thread): Declare.
1947 * inferiors.c (for_each_inferior_with_data): New function.
1948 (get_first_thread): New function.
1949 (find_thread_ptid): Simplify.
1950 (get_first_inferior): New function.
1951 (clear_list): Delete.
1952 (one_inferior_p): New function.
1953 (clear_inferior_list): New function.
1954 (clear_inferiors): Update.
1955 * inferiors.h (for_each_inferior_with_data): Declare.
1956 (clear_inferior_list): Declare.
1957 (one_inferior_p): Declare.
1958 (get_first_inferior): Declare.
1959 * linux-low.c (linux_wait_for_event): Replace accessing list
1960 implemention details with API function.
1961 * server.c (target_running): Ditto.
1962 (accumulate_file_name_length): New function.
1963 (emit_dll_description): New function.
1964 (handle_qxfer_libraries): Replace accessing list implemention
1965 details with API function.
1966 (handle_qxfer_threads_worker): New function.
1967 (handle_qxfer_threads_proper): Replace accessing list implemention
1968 details with API function.
1969 (handle_query): Ditto.
1970 (visit_actioned_threads_callback_ftype): New typedef.
1971 (visit_actioned_threads_data): New struct.
1972 (visit_actioned_threads): Rewrite to be find_inferior callback.
1973 (resume): Call find_inferior.
1974 (handle_status): Replace accessing list implemention
1975 details with API function.
1976 (process_serial_event): Replace accessing list implemention details
1977 with API function.
1978 * target.c (set_desired_inferior): Replace accessing list implemention
1979 details with API function.
1980 * tracepoint.c (same_process_p): New function.
1981 (gdb_agent_about_to_close): Replace accessing list implemention
1982 details with API function.
1983 * win32-low.c (child_delete_thread): Replace accessing list
1984 implemention details with API function.
1985 (match_dll_by_basename): New function.
1986 (dll_is_loaded_by_basename): New function.
1987 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1988 details call to dll_is_loaded_by_basename.
1989
80894984
DE
19902014-02-19 Doug Evans <dje@google.com>
1991
1992 * dll.h (struct dll_info): Add comment.
1993 * gdbthread.h (struct thread_info): Add comment.
1994 (current_ptid): Simplify.
1995 * inferiors.c (add_process): Update.
1996 (remove_process): Update.
1997 * inferiors.h (struct process_info): Rename member "head" to "entry".
1998 * linux-low.c (delete_lwp): Update.
1999 (add_lwp): Update.
2000 (last_thread_of_process_p): Update.
2001 (kill_one_lwp_callback, linux_kill): Update.
2002 (status_pending_p_callback): Update.
2003 (wait_for_sigstop): Update. Simplify read of ptid.
2004 (start_step_over): Update.
2005 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2006 (get_lwp_thread): Update.
2007 (struct lwp_info): Rename member "head" to "entry".
2008 * regcache.h (inferior_list_entry): Delete.
2009 * server.c (kill_inferior_callback): Update.
2010 (detach_or_kill_inferior_callback): Update.
2011 (print_started_pid): Update.
2012 (print_attached_pid): Update.
2013 (process_serial_event): Simplify read of ptid.
2014 * thread-db.c (thread_db_create_event): Update.
2015 (thread_db_get_tls_address): Update.
2016 * win32-low.c (current_inferior_ptid): Simplify.
2017
46917d26
TT
20182014-02-19 Tom Tromey <tromey@redhat.com>
2019
2020 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2021 argument.
2022 (target_supports_btrace): Update.
2023
0759a81e
YQ
20242014-02-14 Yao Qi <yao@codesourcery.com>
2025
2026 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2027 (rsp-low-ipa.o): New target.
2028
a7191e8b
TT
20292014-02-12 Tom Tromey <tromey@redhat.com>
2030
2031 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2032 convert_ascii_to_int.
2033 * regcache.c (registers_to_string): Likewise.
2034 * remote-utils.c (decode_M_packet): Likewise.
2035 * server.c (process_serial_event): Likewise.
2036
ff0e980e
TT
20372014-02-12 Tom Tromey <tromey@redhat.com>
2038
2039 * server.c (handle_query, handle_v_run): Use hex2bin, not
2040 unhexify.
2041 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2042
e9371aff
TT
20432014-02-12 Tom Tromey <tromey@redhat.com>
2044
2045 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2046 convert_int_to_ascii.
2047 * regcache.c (registers_to_string, collect_register_as_string):
2048 Likewise.
2049 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2050 Likewise.
2051 * server.c (process_serial_event): Likewise.
2052 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2053 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2054
971dc0b8
TT
20552014-02-12 Tom Tromey <tromey@redhat.com>
2056
2057 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2058 bin2hex, not hexify.
2059 * tracepoint.c (cmd_qtstatus): Likewise.
2060
0a822afb
TT
20612014-02-12 Tom Tromey <tromey@redhat.com>
2062
2063 * remote-utils.c (monitor_output): Pass explicit length to
2064 hexify.
2065
9c3d6531
TT
20662014-02-12 Tom Tromey <tromey@redhat.com>
2067
2068 * tracepoint.c: Include rsp-low.h.
2069 * server.c: Include rsp-low.h.
2070 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2071 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2072 declare.
2073 * remote-utils.c: Include rsp-low.h.
2074 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2075 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2076 (convert_int_to_ascii, convert_ascii_to_int): Move to
2077 common/rsp-low.c.
2078 * regcache.c: Include rsp-low.h.
2079 * ax.c: Include rsp-low.h.
2080 * Makefile.in (SFILES): Add common/rsp-low.c.
2081 (OBS): Add rsp-low.o.
2082 (rsp-low.o): New target.
2083
01fd3ea5
TT
20842014-02-12 Tom Tromey <tromey@redhat.com>
2085
2086 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2087 Include print-utils.h.
2088 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2089 (plongest, thirty_two, phex_nz): Remove.
2090 * Makefile.in (SFILES): Add common/print-utils.c.
2091 (OBS): Add print-utils.o.
2092 (print-utils-ipa.o): New target.
2093 (print-utils.o): New target.
2094 (IPA_OBJS): Add print-utils-ipa.o.
2095
e99dc820
TT
20962014-02-06 Tom Tromey <tromey@redhat.com>
2097
2098 * Makefile.in (SFILES): Fix indentation.
2099
ee1e2d4f
DE
21002014-02-05 Doug Evans <dje@google.com>
2101
2102 * linux-low.c (linux_wait_for_event): Improve comment.
2103 (linux_wait_1): Keep current_inferior in sync with event_child.
2104
f5a02773
DE
21052014-01-22 Doug Evans <dje@google.com>
2106
2107 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2108
87ce2a04
DE
21092014-01-22 Doug Evans <dje@google.com>
2110
2111 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2112 * configure: Regenerate.
2113 * config.in: Regenerate.
2114 * Makefile.in (SFILES): Add debug.c.
2115 (OBS): Add debug.o.
2116 * debug.c: New file.
2117 * debug.h: New file.
2118 * linux-aarch64-low.c (*): Update all debugging printfs to use
2119 debug_printf instead of fprintf.
2120 * linux-arm-low.c (*): Ditto.
2121 * linux-cris-low.c (*): Ditto.
2122 * linux-crisv32-low.c (*): Ditto.
2123 * linux-m32r-low.c (*): Ditto.
2124 * linux-sparc-low.c (*): Ditto.
2125 * linux-x86.c (*): Ditto.
2126 * linux-low.c (*): Ditto.
2127 (linux_wait_1): Add calls to debug_enter, debug_exit.
2128 (linux_wait): Remove redundant debugging printf.
2129 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2130 (linux_resume, unstop_all_lwps): Ditto.
2131 * mem-break.c (*): Update all debugging printfs to use
2132 debug_printf instead of fprintf.
2133 * remote-utils.c (*): Ditto.
2134 * thread-db.c (*): Ditto.
2135 * server.c #include <ctype.h>, "gdb_vecs.h".
2136 (debug_threads): Moved to debug.c.
2137 (*): Update all debugging printfs to use debug_printf instead of
2138 fprintf.
2139 (start_inferior): Replace call to fflush with call to debug_flush.
2140 (monitor_show_help): Mention set debug-format.
2141 (parse_debug_format_options): New function.
2142 (handle_monitor_command): Handle "monitor set debug-format".
2143 (gdbserver_usage): Mention --debug-format.
2144 (main): Parse --debug-format.
2145 * server.h (debug_threads): Declaration moved to debug.h.
2146 #include "debug.h".
2147 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2148 trace_debug_1 that uses debug_printf.
2149 (tracepoint_look_up_symbols): Update all debugging printfs to use
2150 debug_printf instead of fprintf.
2151
e671835b
BS
21522014-01-20 Baruch Siach <baruch@tkos.co.il>
2153
2154 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2155 sys/ptrace.h.
2156
b5737fa9
PA
21572014-01-17 Pedro Alves <palves@redhat.com>
2158
ea38d2a9 2159 PR build/16445
c7faa97a
PA
2160 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2161 defined after including gdb_proc_service.h.
b5737fa9 2162
40ed484e
DE
21632014-01-16 Doug Evans <dje@google.com>
2164
2165 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2166 (match_dll): Use it.
2167
969c39fb
MM
21682014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2169
2170 * target.h (target_ops) <read_btrace>: Change parameters and
2171 return type to allow error reporting.
2172 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2173 trace reading errors on.
2174 * linux-low.c (linux_low_read_btrace): Pass trace reading
2175 errors on.
2176 (linux_low_disable_btrace): New.
2177
ab7f45ba
DE
21782014-01-15 Doug Evans <dje@google.com>
2179
2180 * inferiors.c (thread_id_to_gdb_id): Delete.
2181 * inferiors.h (thread_id_to_gdb_id): Delete.
2182
66af0f44
EZ
21832014-01-13 Eli Zaretskii <eliz@gnu.org>
2184
2185 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2186 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2187 versions.
2188
9939e131
PA
21892014-01-08 Pedro Alves <palves@redhat.com>
2190
2191 * server.c (handle_status): Don't discard previous queued stop
2192 replies or thread's pending status here.
2193 (main) <disconnection>: Do it here instead.
2194
b7ea362b
PA
21952014-01-08 Pedro Alves <palves@redhat.com>
2196
2197 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2198 * server.c (visit_actioned_threads, handle_pending_status): New
2199 function.
2200 (handle_v_cont): Factor out parts to ...
2201 (resume): ... this new function. If in all-stop, and a thread
2202 being resumed has a pending status, report it without actually
2203 resuming.
2204 (myresume): Adjust to use the new 'resume' function.
2205 (clear_pending_status_callback, set_pending_status_callback)
2206 (find_status_pending_thread_callback): New functions.
2207 (handle_status): Handle the case of multiple threads having
2208 interesting statuses to report. Report threads' real last signal
2209 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2210 with an interesting thread to report the status for, instead of
2211 always reporting the status of the first thread.
2212
28498c42
JB
22132014-01-01 Joel Brobecker <brobecker@adacore.com>
2214
2215 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2216 * gdbreplay.c (gdbreplay_version): Likewise.
2217
f45c82da
YZ
22182013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2219
2220 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2221 iov.iov_len with the real length in use.
2222
379a5e2d
JB
22232013-12-13 Joel Brobecker <brobecker@adacore.com>
2224
2225 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2226 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2227 for all targets that use win32-low.c.
2228 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2229 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2230
4210d83e
PA
22312013-12-13 Pedro Alves <palves@redhat.com>
2232
2233 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2234 if equal to TARGET_WAITKIND_LOADED.
2235 * win32-low.c (cached_status): New static global.
2236 (win32_wait): Add declaration.
2237 (do_initial_child_stuff): Flush all initial pending debug events
2238 up to the initial breakpoint.
2239 (win32_wait): If CACHED_STATUS was set, return that instead
2240 of doing a real wait. Remove the code resuming the execution
2241 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2242 during the initial phase. Also remove the code changing
2243 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2244 TARGET_WAITKIND_STOPPED.
2245
e7f0d979
YQ
22462013-12-11 Yao Qi <yao@codesourcery.com>
2247
2248 * notif.c (handle_notif_ack): Return 0 if no notification
2249 matches.
2250
ebcf782c
DE
22512013-11-20 Doug Evans <dje@google.com>
2252
2253 * linux-low.c (linux_set_resume_request): Fix comment.
2254
20ad9378
DE
22552013-11-20 Doug Evans <dje@google.com>
2256
2257 * linux-low.c (resume_status_pending_p): Tweak comment.
2258
a196ebeb
WT
22592013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2260
2261 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2262 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2263 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2264 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2265 (srv_amd64_regobj): Add amd64-mpx.o.
2266 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2267 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2268 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2269 * i387-fp.c (num_pl_bnd_register) Added constant.
2270 (num_pl_bnd_cfg_registers) Added constant.
2271 (struct i387_xsave) Added reserved area and MPX fields.
2272 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2273 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2274 function.
2275 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2276 (init_registers_amd64_mpx_linux): Declare new function.
2277 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2278 (x86_64_regmap): Add MPX registers.
2279 (x86_linux_read_description): Add MPX case.
2280 (initialize_low_arch): Initialize MPX targets.
2281
0080a2f6
TT
22822013-11-18 Tom Tromey <tromey@redhat.com>
2283
2284 * configure: Rebuild.
2285 * configure.ac: Don't check for stdlib.h.
2286 * gdbreplay.c: Unconditionally include stdlib.h.
2287
2978b111
TT
22882013-11-18 Tom Tromey <tromey@redhat.com>
2289
2290 * config.in: Rebuild.
2291 * configure: Rebuild.
2292 * configure.ac: Don't use AC_HEADER_DIRENT.
2293
a3d08894
TT
22942013-11-18 Tom Tromey <tromey@redhat.com>
2295
2296 * server.h: Don't check HAVE_STRING_H.
2297 * gdbreplay.c: Don't check HAVE_STRING_H.
2298 * configure: Rebuild.
2299
0a5dd17d
TT
23002013-11-18 Tom Tromey <tromey@redhat.com>
2301
2302 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2303 LIBGNU.
2304
1bd2f0ba
TT
23052013-11-08 Tom Tromey <tromey@redhat.com>
2306
2307 * configure, config.in: Rebuild.
2308 * configure.ac: Remove unused configury.
2309
3266f10b
TT
23102013-11-08 Tom Tromey <tromey@redhat.com>
2311
2312 * acinclude.m4: Include common.m4, codeset.m4.
2313 * configure, config.in: Rebuild.
2314 * configure.ac: Use GDB_AC_COMMON.
2315
6682d959
AA
23162013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2317
2318 * linux-s390-low.c (HWCAP_S390_TE): New define.
2319 (s390_arch_setup): Consider the TE field in the HWCAP for
2320 determining 'have_regset_tdb'.
2321
fd0a4d76
SDJ
23222013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2323
2324 PR gdb/16014
2325 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2326 call to sizeof.
2327
1a3d890b
PA
23282013-10-02 Pedro Alves <palves@redhat.com>
2329
2330 * server.c (process_serial_event): Don't output "GDBserver
2331 exiting" if GDB is connected through stdio.
2332 * target.c (mywait): Likewise, be silent if GDB is connected
2333 through stdio.
2334
97ad4581
JB
23352013-10-01 Joel Brobecker <brobecker@adacore.com>
2336
2337 * lynx-low.c (lynx_add_threads_after_attach): New function.
2338 (lynx_attach): Remove call to add_thread. Add call to
2339 lynx_add_threads_after_attach instead.
2340
5b4e221c
MF
23412013-09-28 Mike Frysinger <vapier@gentoo.org>
2342
2343 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2344 * config.in, configure: Regenerated.
2345
ee47b2f8
YQ
23462013-09-18 Yao Qi <yao@codesourcery.com>
2347
2348 PR server/15959
2349 * server.c (start_inferior): Clear 'resume_info'.
2350
d6707650 23512013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2352
d6707650
JW
2353 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2354 for each register.
2355
9243dd0e 23562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2357
9243dd0e
JW
2358 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2359 linux-tile-low.o to srv_tgtobj.
2360
c623a6ef
WN
23612013-09-16 Will Newton <will.newton@linaro.org>
2362
2363 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2364 out regs.
2365
fb71d39e
PA
23662013-09-06 Pedro Alves <palves@redhat.com>
2367
2368 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2369 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2370 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2371 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2372 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2373 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2374
8e7e9910
PA
23752013-09-06 Pedro Alves <palves@redhat.com>
2376
2377 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2378 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2379
7c3a12ca
PA
23802013-09-06 Pedro Alves <palves@redhat.com>
2381
2382 * linux-amd64-ipa.c: Include tracepoint.h.
2383 * linux-i386-ipa.c: Include tracepoint.h.
2384
8eb3d7b6
RW
23852013-09-06 Ricard Wanderlof <ricardw@axis.com>
2386
2387 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2388 (ps_get_thread_area): New function.
2389
eddddb9d
RW
23902013-09-06 Ricard Wanderlof <ricardw@axis.com>
2391
2392 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2393 (initialize_low_arch): Call init_registers_crisv32 rather than
2394 init_register_crisv32.
2395
533b0600
PA
23962013-09-05 Pedro Alves <palves@redhat.com>
2397
2398 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2399 to ...
2400 * hostio.h: ... this new file.
2401 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2402 win32-low.c: Include hostio.h.
2403
0ce3d3b5
PA
24042013-09-05 Pedro Alves <palves@redhat.com>
2405
2406 * server.h (gdb_client_data, handler_func, callback_handler_func)
2407 (delete_file_handler, add_file_handler, append_callback_event)
2408 (delete_callback_event, start_event_loop, initialize_event_loop):
2409 Move to event-loop.h and include it.
2410 * event-loop.h: New file.
2411
799cdc37
PA
24122013-09-05 Pedro Alves <palves@redhat.com>
2413
2414 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2415 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2416 (loaded_dll, unloaded_dll): Move to ...
2417 * dll.h: ... this new file.
2418 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2419
6a6bbd9d
PA
24202013-09-05 Pedro Alves <palves@redhat.com>
2421
2422 * server.h (current_process, get_thread_process, all_processes)
2423 (add_inferior_to_list, for_each_inferior, current_inferior)
2424 (remove_inferior, add_process, remove_process, find_process_pid)
2425 (have_started_inferiors_p, have_attached_inferiors_p)
2426 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2427 (clear_inferiors, find_inferior, find_inferior_id)
2428 (inferior_target_data, set_inferior_target_data)
2429 (inferior_regcache_data, set_inferior_regcache_data): Move to
2430 inferiors.h, and include it.
2431 * inferiors.h: New file.
2432
f699aaba
PA
24332013-09-05 Pedro Alves <palves@redhat.com>
2434
2435 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2436 Move ...
2437 * ax.h: ... here.
2438
c144c7a0
PA
24392013-09-05 Pedro Alves <palves@redhat.com>
2440
2441 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2442 tracepoint.h.
2443 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2444 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2445 (handle_tracepoint_general_set, handle_tracepoint_query)
2446 (tracepoint_finished_step, tracepoint_was_hit)
2447 (release_while_stepping_state_list, current_traceframe)
2448 (in_readonly_region, traceframe_read_mem)
2449 (fetch_traceframe_registers, traceframe_read_sdata)
2450 (traceframe_read_info, struct fast_tpoint_collect_status)
2451 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2452 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2453 (supply_fast_tracepoint_registers)
2454 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2455 (ipa_tdesc, claim_trampoline_space)
2456 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2457 (agent_mem_read, agent_get_trace_state_variable_value)
2458 (agent_set_trace_state_variable_value, agent_tsv_read)
2459 (agent_mem_read_string, get_raw_reg_func_addr)
2460 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2461 * tracepoint.h: ... this new file.
2462
ff42e6ab
PA
24632013-09-05 Pedro Alves <palves@redhat.com>
2464
2465 * server.h (perror_with_name, error, fatal, warning, paddress)
2466 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2467 include it.
2468 * utils.h: New file.
2469
541af0f4
PA
24702013-09-05 Pedro Alves <palves@redhat.com>
2471
2472 * server.h (remote_debug, noack_mode, transport_is_reliable)
2473 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2474 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2475 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2476 (write_enn, initialize_async_io, enable_async_io)
2477 (disable_async_io, check_remote_input_interrupt_request)
2478 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2479 (dead_thread_notify, prepare_resume_reply)
2480 (decode_address_to_semicolon, decode_address, decode_m_packet)
2481 (decode_M_packet, decode_X_packet, decode_xfer_write)
2482 (decode_search_memory_packet, unhexify, hexify)
2483 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2484 (look_up_one_symbol, relocate_instruction)
2485 (monitor_output): Move to remote-utils.h, and include it.
2486 * remote-utils.h: New file.
2487
eebdf26b
PA
24882013-09-05 Pedro Alves <palves@redhat.com>
2489
2490 * server.h (_): Delete.
2491
3aafd2ff
PA
24922013-09-02 Pedro Alves <palves@redhat.com>
2493
2494 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2495 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2496 allocated.
2497 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2498
cee83bcb
PM
24992013-09-02 Pierre Muller <muller@sourceware.org>
2500
2501 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2502 or WriteProcessMemory complete successfully and handle
2503 ERROR_PARTIAL_COPY error.
2504
9a13b2fa
PA
25052013-09-02 Pedro Alves <palves@redhat.com>
2506
2507 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2508 error instead of EIO.
2509
602e3198
JK
25102013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2511
2512 PR server/15604
2513 * linux-low.c: Include filestuff.h.
2514 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2515 * lynx-low.c: Include filestuff.h.
2516 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2517 * server.c: Include filestuff.h.
2518 (main): Call notice_open_fds.
2519 * spu-low.c: Include filestuff.h.
2520 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2521
96d7229d
LM
25222013-08-22 Luis Machado <lgustavo@codesourcery.com>
2523
2524 * Makefile.in: Explain why ../target and ../nat are not
2525 listed as include file search paths.
2526 (linux-waitpid.o): New object file rule.
2527 * configure.srv (srv_native_linux_obj): New variable.
2528 Replace all occurrences of linux native object files with
2529 $srv_native_linux_obj.
2530 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2531 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2532 (linux_enable_event_reporting): Remove declaration.
2533 (my_waitpid): Moved to common/linux-waitpid.c.
2534 (linux_wait_for_event): Pass ptid when calling
2535 linux_enable_event_reporting.
2536 (linux_supports_tracefork_flag): Remove.
2537 (linux_enable_event_reporting): Likewise.
2538 (linux_tracefork_grandchild): Remove.
2539 (STACK_SIZE): Moved to common/linux-ptrace.c.
2540 (linux_tracefork_child): Remove.
2541 (linux_test_for_tracefork): Remove.
2542 (linux_look_up_symbols): Call linux_supports_traceclone.
2543 (initialize_low): Remove call to linux_test_for_tracefork.
2544 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2545 common/linux-ptrace.h.
2546 (PTRACE_TYPE_ARG4): Likewise.
2547 Include linux-ptrace.h.
2548
32940073
PA
25492013-08-21 Pedro Alves <palves@redhat.com>
2550
2551 * config.in: Renegerate.
2552
33b60d58 25532013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2554
33b60d58
LM
2555 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2556 (SFILES): Remove $(srcdir)/common/target-common.c and
2557 add $(srcdir)/target/waitstatus.c.
2558 (OBS): Remove target-common.o and add waitstatus.o.
2559 (server_h): Remove $(srcdir)/../common/target-common.h and
2560 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2561 and $(srcdir)/../target/waitstatus.h.
2562 (target-common.o): Remove.
2563 (waitstatus.o): New target object file.
2564 * target.h: Do not include target-common.h and
2565 include target/resume.h, target/wait.h and
2566 target/waitstatus.h.
2567
b8e1b30e
LM
25682013-08-13 Luis Machado <lgustavo@codesourcery.com>
2569
2570 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2571 to PTRACE_TYPE_ARG3.
2572 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2573 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2574 PTRACE_TYPE_ARG4.
2575 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2576 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2577
7a60ad40
YQ
25782013-07-27 Jie Zhang <jie@codesourcery.com>
2579 Daniel Jacobowitz <dan@codesourcery.com>
2580 Yao Qi <yao@codesourcery.com>
2581
2582 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2583 (mips-linux-watch.o): New rule.
2584 (mips_linux_watch_h): New variable.
2585 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2586 srv_tgtobj.
2587 * linux-mips-low.c: Include mips-linux-watch.h.
2588 (struct arch_process_info, struct arch_lwp_info): New.
2589 (update_watch_registers_callback): New function.
2590 (mips_linux_new_process, mips_linux_new_thread) New functions.
2591 (mips_linux_prepare_to_resume, mips_insert_point): New
2592 functions.
2593 (mips_remove_point, mips_stopped_by_watchpoint): New
2594 functions.
2595 (rsp_bp_type_to_target_hw_bp_type): New function.
2596 (mips_stopped_data_address): New function.
2597 (the_low_target): Add watchpoint support functions.
2598
de6f69ad
YQ
25992013-07-27 Yao Qi <yao@codesourcery.com>
2600
2601 * i386-low.c: Include break-common.h.
2602 (enum target_hw_bp_type): Remove.
2603
3360c0bf
LM
26042013-07-24 Luis Machado <lgustavo@codesourcery.com>
2605
2606 * Makefile.in (SFILES): /common/target-common.c.
2607 (OBS): Add target-common.o.
2608 (server_h): Add $(srcdir)/../common/target-common.h.
2609 (target-common.o): New target.
2610 * server.c (queue_stop_reply_callback): Free
2611 status string after use.
2612 * target.c (target_waitstatus_to_string): Remove.
2613 * target.h: Include target-common.h.
2614 (resume_kind): Likewise.
2615 (target_waitkind): Likewise.
2616 (target_waitstatus): Likewise.
2617 (TARGET_WNOHANG): Likewise.
2618
bd885420
YQ
26192013-07-04 Yao Qi <yao@codesourcery.com>
2620
2621 * Makefile.in (host_alias): Use @host_noncanonical@.
2622 (target_alias): Use @target_noncanonical@.
2623 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2624 ACX_NONCANONICAL_HOST.
2625 * configure: Regenerated.
2626
2627 Revert:
2628 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2629
2630 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2631 * configure: Rebuild.
2632 * Makefile.in (version_host, version_target): Get from configure.
2633 (version.c): Use $(version_host) and $(version_target).
2634
17ef446e
PA
26352013-07-03 Pedro Alves <palves@redhat.com>
2636
2637 * Makefile.in (config.status): Depend on development.sh.
2638 * acinclude.m4: Include libmcheck.m4.
2639 * configure: Regenerate.
2640
7a9a7487
MG
26412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2642
2643 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2644 attribute inside the parentheses.
2645 (winapi_DebugSetProcessKillOnExit): Ditto.
2646 (winapi_DebugBreakProcess): Ditto.
2647 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2648
49b64de6
MG
26492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2650
2651 * notif.h (notif_event): Add a dummy member to avoid compiler
2652 errors.
2653
d5749ee7
PA
26542013-07-01 Pedro Alves <palves@redhat.com>
2655
2656 * hostio.c (HOSTIO_PATH_MAX): Define.
2657 (require_filename, handle_open, handle_unlink, handle_readlink):
2658 Use it.
2659
d8d2a3ee
PA
26602013-07-01 Pedro Alves <palves@redhat.com>
2661
2662 * server.h: Include "pathmax.h".
2663 * linux-low.c: Don't include sys/param.h.
2664 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2665 MAXPATHLEN.
2666 * win32-low.c: Don't include sys/param.h.
2667 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2668
bc7dea8d
PA
26692013-07-01 Pedro Alves <palves@redhat.com>
2670
2671 * event-loop.c: Don't check HAVE_UNISTD_H before including
2672 <unistd.h>.
2673 * gdbreplay.c: Likewise.
2674 * remote-utils.c: Likewise.
2675 * server.c: Likewise.
2676 * configure.ac: Don't check for unistd.h.
2677 * configure: Regenerate.
2678
d6c2da54
TT
26792013-06-28 Tom Tromey <tromey@redhat.com>
2680
2681 * Makefile.in (version.c): Use version.in, not
2682 common/version.in.
2683
257b6bec
MG
26842013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2685
2686 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2687 * configure: Rebuild.
2688 * Makefile.in (version_host, version_target): Get from configure.
2689 (version.c): Use $(version_host) and $(version_target).
2690
86ebe149
DK
26912013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2692
2693 Fix trace-status to output user name without trailing colon.
2694 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2695
f30aa5af
DK
26962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2697
2698 Fix trace-status to output proper start-time and stop-time.
2699 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2700 output start time and stop time in hex as gdb expects.
2701
28a93511
YQ
27022013-06-26 Pedro Alves <pedro@codesourcery.com>
2703
2704 * tracepoint.c (build_traceframe_info_xml): Output trace state
2705 variables present in the trace buffer.
2706
01208463
TT
27072013-06-24 Tom Tromey <tromey@redhat.com>
2708
2709 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2710 create-version.sh.
2711 (version.o): Remove.
2712 * gdbreplay.c: Include version.h.
2713 (version, host_name): Don't declare.
2714 * server.h: Include version.h.
2715 (version, host_name): Don't declare.
2716
760256f9
PA
27172013-06-12 Pedro Alves <palves@redhat.com>
2718
2719 * linux-x86-low.c (linux_is_elf64): Delete global.
2720 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2721 with local linux_pid_exe_is_elf_64_file use.
2722
030031ee
PA
27232013-06-11 Pedro Alves <palves@redhat.com>
2724
2725 * linux-low.c (regset_disabled, disable_regset): New functions.
2726 (regsets_fetch_inferior_registers)
2727 (regsets_store_inferior_registers): Use them.
2728 (initialize_regsets_info); Don't allocate the disabled_regsets
2729 array here.
2730 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2731 comment.
2732
5da6eb0a
PA
27332013-06-11 Pedro Alves <palves@redhat.com>
2734
2735 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2736 xmalloc.
2737
7e5aaa09
PA
27382013-06-11 Pedro Alves <palves@redhat.com>
2739
2740 * linux-x86-low.c (initialize_low_arch): Call
2741 init_registers_x32_avx_linux.
2742
d878444c
JK
27432013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2744
2745 Fix compatibility with Android Bionic.
2746 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2747 it is not empty.
2748
3aee8918
PA
27492013-06-07 Pedro Alves <palves@redhat.com>
2750
5f2b57b5 2751 PR server/14823
3aee8918
PA
2752 * Makefile.in (OBS): Add tdesc.o.
2753 (IPA_OBJS): Add tdesc-ipa.o.
2754 (tdesc-ipa.o): New rule.
2755 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2756 interface.
2757 * linux-low.c (new_inferior): Delete.
2758 (disabled_regsets, num_regsets): Delete.
2759 (linux_add_process): Adjust to set the new per-process
2760 new_inferior flag.
2761 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2762 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2763 was a stop. When calling arch_setup, switch the current inferior
2764 to the thread that got an event.
2765 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2766 (regsets_fetch_inferior_registers)
2767 (regsets_store_inferior_registers): New regsets_info parameter.
2768 Adjust to use it.
2769 (linux_register_in_regsets): New regs_info parameter. Adjust to
2770 use it.
2771 (register_addr, fetch_register, store_register): New usrregs_info
2772 parameter. Adjust to use it.
2773 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2774 parameter regs_info. Adjust to use it.
2775 (linux_fetch_registers): Get the current inferior's regs_info, and
2776 adjust to use it.
2777 (linux_store_registers): Ditto.
2778 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2779 (initialize_low): Don't initialize the target_regsets here. Call
2780 initialize_low_arch.
2781 * linux-low.h (target_regsets): Delete declaration.
2782 (struct regsets_info): New.
2783 (struct usrregs_info): New.
2784 (struct regs_info): New.
2785 (struct process_info_private) <new_inferior>: New field.
2786 (struct linux_target_ops): Delete the num_regs, regmap, and
2787 regset_bitmap fields. New field regs_info.
2788 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2789 * i387-fp.c (num_xmm_registers): Delete.
2790 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2791 calls to new interface.
2792 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2793 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2794 Infer the number of xmm registers from the regcache's target
2795 description.
2796 * i387-fp.h (num_xmm_registers): Delete.
2797 * inferiors.c (add_thread): Don't install the thread's regcache
2798 here.
2799 * proc-service.c (gregset_info): Fetch the current inferior's
2800 regs_info. Adjust to use it.
2801 * regcache.c: Include tdesc.h.
2802 (register_bytes, reg_defs, num_registers)
2803 (gdbserver_expedite_regs): Delete.
2804 (get_thread_regcache): If the thread doesn't have a regcache yet,
2805 create one, instead of aborting gdbserver.
2806 (regcache_invalidate_one): Rename to ...
2807 (regcache_invalidate_thread): ... this.
2808 (regcache_invalidate_one): New.
2809 (regcache_invalidate): Only invalidate registers of the current
2810 process.
2811 (init_register_cache): Add target_desc parameter, and use it.
2812 (new_register_cache): Ditto. Assert the target description has a
2813 non zero registers_size.
2814 (regcache_cpy): Add assertions. Adjust.
2815 (realloc_register_cache, set_register_cache): Delete.
2816 (registers_to_string, registers_from_string): Adjust.
2817 (find_register_by_name, find_regno, find_register_by_number)
2818 (register_cache_size): Add target_desc parameter, and use it.
2819 (free_register_cache_thread, free_register_cache_thread_one)
2820 (regcache_release, register_cache_size): New.
2821 (register_size): Add target_desc parameter, and use it.
2822 (register_data, supply_register, supply_register_zeroed)
2823 (supply_regblock, supply_register_by_name, collect_register)
2824 (collect_register_as_string, collect_register_by_name): Adjust.
2825 * regcache.h (struct target_desc): Forward declare.
2826 (struct regcache) <tdesc>: New field.
2827 (init_register_cache, new_register_cache): Add target_desc
2828 parameter.
2829 (regcache_invalidate_thread): Declare.
2830 (regcache_invalidate_one): Delete declaration.
2831 (regcache_release): Declare.
2832 (find_register_by_number, register_cache_size, register_size)
2833 (find_regno): Add target_desc parameter.
2834 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2835 declarations.
2836 * remote-utils.c: Include tdesc.h.
2837 (outreg, prepare_resume_reply): Adjust.
2838 * server.c: Include tdesc.h.
2839 (gdbserver_xmltarget): Delete declaration.
2840 (get_features_xml, process_serial_event): Adjust.
2841 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2842 declare.
2843 (struct process_info) <tdesc>: New field.
2844 (ipa_tdesc): Declare.
2845 * tdesc.c: New file.
2846 * tdesc.h: New file.
2847 * tracepoint.c: Include tdesc.h.
2848 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2849 (get_context_regcache): Adjust to pass ipa_tdesc down.
2850 (do_action_at_tracepoint): Adjust to get the register cache size
2851 from the context regcache's description.
2852 (traceframe_walk_blocks): Adjust to get the register cache size
2853 from the current trace frame's description.
2854 (traceframe_get_pc): Adjust to get current trace frame's
2855 description and pass it down.
2856 (gdb_collect): Adjust to get the register cache size from the
2857 IPA's description.
2858 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2859 (gdbserver_xmltarget): Delete.
2860 (initialize_low_tracepoint): Set the ipa's target description.
2861 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2862 (initialize_low_tracepoint): Set the ipa's target description.
2863 * linux-x86-low.c: Include tdesc.h.
2864 [__x86_64__] (is_64bit_tdesc): New.
2865 (ps_get_thread_area, x86_get_thread_area): Use it.
2866 (i386_cannot_store_register): Rename to ...
2867 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2868 (i386_cannot_fetch_register): Rename to ...
2869 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2870 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2871 to new interface.
2872 (target_regsets): Rename to ...
2873 (x86_regsets): ... this.
2874 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2875 interface.
2876 (x86_siginfo_fixup): Use is_64bit_tdesc.
2877 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2878 (tdesc_x32_avx_linux, tdesc_x32_linux)
2879 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2880 Declare.
2881 (x86_linux_update_xmltarget): Delete.
2882 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2883 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2884 (AMD64_LINUX_USER64_CS): New.
2885 (x86_linux_read_description): New, based on
2886 x86_linux_update_xmltarget.
2887 (same_process_callback): New.
2888 (x86_arch_setup_process_callback): New.
2889 (x86_linux_update_xmltarget): New.
2890 (x86_regsets_info): New.
2891 (amd64_linux_regs_info): New.
2892 (i386_linux_usrregs_info): New.
2893 (i386_linux_regs_info): New.
2894 (x86_linux_regs_info): New.
2895 (x86_arch_setup): Reimplement.
2896 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2897 (x86_emit_ops): Ditto.
2898 (the_low_target): Adjust. Install x86_linux_regs_info,
2899 x86_cannot_fetch_register, and x86_cannot_store_register.
2900 (initialize_low_arch): New.
2901 * linux-ia64-low.c (tdesc_ia64): Declare.
2902 (ia64_fetch_register): Adjust.
2903 (ia64_usrregs_info, regs_info): New globals.
2904 (ia64_regs_info): New function.
2905 (the_low_target): Adjust.
2906 (initialize_low_arch): New function.
2907 * linux-sparc-low.c (tdesc_sparc64): Declare.
2908 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2909 Adjust.
2910 (sparc_arch_setup): New function.
2911 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2912 (the_low_target): Adjust.
2913 (initialize_low_arch): New function.
2914 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2915 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2916 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2917 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2918 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2919 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2920 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2921 (tdesc_powerpc_isa205_vsx64l): Declare.
2922 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2923 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2924 (ppc_set_pc, ppc_get_hwcap): Adjust.
2925 (ppc_usrregs_info): Forward declare.
2926 (!__powerpc64__) ppc_regmap_adjusted: New global.
2927 (ppc_arch_setup): Adjust to the current process'es target
2928 description.
2929 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2930 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2931 (ppc_store_evrregset): Adjust.
2932 (target_regsets): Rename to ...
2933 (ppc_regsets): ... this, and make static.
2934 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2935 (ppc_regs_info): New function.
2936 (the_low_target): Adjust.
2937 (initialize_low_arch): New function.
2938 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2939 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2940 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2941 (tdesc_s390x_linux64v2): Declare.
2942 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2943 (s390_fill_gregset, s390_store_last_break): Adjust.
2944 (target_regsets): Rename to ...
2945 (s390_regsets): ... this, and make static.
2946 (s390_get_pc, s390_set_pc): Adjust.
2947 (s390_get_hwcap): New target_desc parameter, and use it.
2948 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2949 (s390_arch_setup): Adjust to set the current process'es target
2950 description. Don't adjust the regmap.
2951 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2952 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2953 (regs_info_3264): New globals.
2954 (s390_regs_info): New function.
2955 (the_low_target): Adjust.
2956 (initialize_low_arch): New function.
2957 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2958 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2959 [__mips64] (init_registers_mips_linux)
2960 (init_registers_mips_dsp_linux): Delete defines.
2961 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2962 (have_dsp): New global.
2963 (mips_read_description): New, based on mips_arch_setup.
2964 (mips_arch_setup): Reimplement.
2965 (get_usrregs_info): New function.
2966 (mips_cannot_fetch_register, mips_cannot_store_register)
2967 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2968 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2969 (target_regsets): Rename to ...
2970 (mips_regsets): ... this, and make static.
2971 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2972 (dsp_regs_info, regs_info): New globals.
2973 (mips_regs_info): New function.
2974 (the_low_target): Adjust.
2975 (initialize_low_arch): New function.
2976 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2977 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2978 Declare.
2979 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2980 (arm_read_description): New, with bits factored from
2981 arm_arch_setup.
2982 (arm_arch_setup): Reimplement.
2983 (target_regsets): Rename to ...
2984 (arm_regsets): ... this, and make static.
2985 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2986 (arm_regs_info): New function.
2987 (the_low_target): Adjust.
2988 (initialize_low_arch): New function.
2989 * linux-m68k-low.c (tdesc_m68k): Declare.
2990 (target_regsets): Rename to ...
2991 (m68k_regsets): ... this, and make static.
2992 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2993 (m68k_regs_info): New function.
2994 (m68k_arch_setup): New function.
2995 (the_low_target): Adjust.
2996 (initialize_low_arch): New function.
2997 * linux-sh-low.c (tdesc_sharch): Declare.
2998 (target_regsets): Rename to ...
2999 (sh_regsets): ... this, and make static.
3000 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3001 (sh_regs_info, sh_arch_setup): New functions.
3002 (the_low_target): Adjust.
3003 (initialize_low_arch): New function.
3004 * linux-bfin-low.c (tdesc_bfin): Declare.
3005 (bfin_arch_setup): New function.
3006 (bfin_usrregs_info, regs_info): New globals.
3007 (bfin_regs_info): New function.
3008 (the_low_target): Adjust.
3009 (initialize_low_arch): New function.
3010 * linux-cris-low.c (tdesc_cris): Declare.
3011 (cris_arch_setup): New function.
3012 (cris_usrregs_info, regs_info): New globals.
3013 (cris_regs_info): New function.
3014 (the_low_target): Adjust.
3015 (initialize_low_arch): New function.
3016 * linux-cris-low.c (tdesc_crisv32): Declare.
3017 (cris_arch_setup): New function.
3018 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3019 (cris_regs_info): New function.
3020 (the_low_target): Adjust.
3021 (initialize_low_arch): New function.
3022 * linux-m32r-low.c (tdesc_m32r): Declare.
3023 (m32r_arch_setup): New function.
3024 (m32r_usrregs_info, regs_info): New globals.
3025 (m32r_regs_info): Adjust.
3026 (initialize_low_arch): New function.
3027 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3028 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3029 (tic6x_usrregs_info): Forward declare.
3030 (tic6x_read_description): New function, based on ...
3031 (tic6x_arch_setup): ... this. Reimplement.
3032 (target_regsets): Rename to ...
3033 (tic6x_regsets): ... this, and make static.
3034 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3035 (tic6x_regs_info): New function.
3036 (the_low_target): Adjust.
3037 (initialize_low_arch): New function.
3038 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3039 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3040 (target_regsets): Rename to ...
3041 (xtensa_regsets): ... this, and make static.
3042 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3043 globals.
3044 (xtensa_arch_setup, xtensa_regs_info): New functions.
3045 (the_low_target): Adjust.
3046 (initialize_low_arch): New function.
3047 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3048 (nios2_arch_setup): Set the current process'es tdesc.
3049 (target_regsets): Rename to ...
3050 (nios2_regsets): ... this.
3051 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3052 (nios2_regs_info): New function.
3053 (the_low_target): Adjust.
3054 (initialize_low_arch): New function.
a261b8f5
PA
3055 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3056 (aarch64_arch_setup): Set the current process'es tdesc.
3057 (target_regsets): Rename to ...
3058 (aarch64_regsets): ... this.
3059 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3060 (aarch64_regs_info): New function.
3061 (the_low_target): Adjust.
3062 (initialize_low_arch): New function.
3aee8918
PA
3063 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3064 globals.
3065 (target_regsets): Rename to ...
3066 (tile_regsets): ... this.
3067 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3068 (tile_regs_info): New function.
3069 (tile_arch_setup): Set the current process'es tdesc.
3070 (the_low_target): Adjust.
3071 (initialize_low_arch): New function.
3072 * spu-low.c (tdesc_spu): Declare.
3073 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3074 * win32-arm-low.c (tdesc_arm): Declare.
3075 (arm_arch_setup): New function.
3076 (the_low_target): Install arm_arch_setup instead of
3077 init_registers_arm.
3078 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3079 (init_windows_x86): Rename to ...
3080 (i386_arch_setup): ... this. Set `win32_tdesc'.
3081 (the_low_target): Adjust.
3082 * win32-low.c (win32_tdesc): New global.
3083 (child_add_thread): Don't create the thread cache here.
3084 (do_initial_child_stuff): Set the new process'es tdesc.
3085 * win32-low.h (struct target_desc): Forward declare.
3086 (win32_tdesc): Declare.
3087 * lynx-i386-low.c (tdesc_i386): Declare global.
3088 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3089 * lynx-low.c (lynx_tdesc): New global.
3090 (lynx_add_process): Set the new process'es tdesc.
3091 * lynx-low.h (struct target_desc): Forward declare.
3092 (lynx_tdesc): Declare global.
3093 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3094 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3095 * nto-low.c (nto_tdesc): New global.
3096 (do_attach): Set the new process'es tdesc.
3097 * nto-low.h (struct target_desc): Forward declare.
3098 (nto_tdesc): Declare.
3099 * nto-x86-low.c (tdesc_i386): Declare.
3100 (nto_x86_arch_setup): Set `nto_tdesc'.
3101
b1fbec62
GB
31022013-06-04 Gary Benson <gbenson@redhat.com>
3103
3104 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3105 to qSupported response when appropriate.
3106 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3107 with nonzero-length annex.
3108 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3109 arguments supplied in annex.
3110
d1ec4ce7
DE
31112013-05-31 Doug Evans <dje@google.com>
3112
ac44adcb 3113 PR server/15594
d1ec4ce7
DE
3114 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3115 64 bits in 64-cross-32 environment.
3116
9b25f2d3
PA
31172013-05-28 Pedro Alves <palves@redhat.com>
3118
3119 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3120 (aarch64-without-fpu.c): Delete rule.
3121 * configure.srv (aarch64*-*-linux*): Remove references to
3122 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3123 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3124 declaration.
3125
6740dc9c
PA
31262013-05-24 Pedro Alves <palves@redhat.com>
3127
3128 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3129 instead of strchr/decode_address. Error if the range isn't split
3130 with a ','. Don't assume there's be a ':' in the action.
3131
c2d6af84
PA
31322013-05-23 Yao Qi <yao@codesourcery.com>
3133 Pedro Alves <palves@redhat.com>
3134
3135 * linux-low.c (lwp_in_step_range): New function.
3136 (linux_wait_1): If the thread was range stepping and stopped
3137 outside the stepping range, report the stop to GDB. Otherwise,
3138 continue stepping. Add range stepping debug output.
3139 (linux_set_resume_request): Copy the step range from the resume
3140 request to the lwp.
3141 (linux_supports_range_stepping): New.
3142 (linux_target_ops) <supports_range_stepping>: Set to
3143 linux_supports_range_stepping.
3144 * linux-low.h (struct linux_target_ops)
3145 <supports_range_stepping>: New field.
3146 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3147 * linux-x86-low.c (x86_supports_range_stepping): New.
3148 (the_low_target) <supports_range_stepping>: Set to
3149 x86_supports_range_stepping.
3150 * server.c (handle_v_cont): Handle 'r' action.
3151 (handle_v_requests): Append ";r" if the target supports range
3152 stepping.
3153 * target.h (struct thread_resume) <step_range_start,
3154 step_range_end>: New fields.
3155 (struct target_ops) <supports_range_stepping>:
3156 New field.
3157 (target_supports_range_stepping): New macro.
3158
58794e1a
JB
31592013-05-17 Joel Brobecker <brobecker@adacore.com>
3160
3161 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3162 confusion in comment.
3163
d631c5a7
JB
31642013-05-17 Joel Brobecker <brobecker@adacore.com>
3165
3166 * lynx-low.c (struct process_info_private): New type.
3167 (lynx_add_process): New function.
3168 (lynx_create_inferior, lynx_attach): Replace calls to
3169 add_process by calls to lynx_add_process.
3170 (lynx_resume): If PTID is null, then try using
3171 current_process()->private->last_wait_event_ptid.
3172 Add comments.
3173 (lynx_clear_inferiors): Delete. The contents of that function
3174 has been inlined in lynx_mourn;
3175 (lynx_wait_1): Save the ptid in the process's private data.
3176 (lynx_mourn): Free the process' private data. Replace call
3177 to lynx_clear_inferiors by call to clear_inferiors.
3178
96f7a20f
YQ
31792013-05-17 Yao Qi <yao@codesourcery.com>
3180
3181 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3182 the right place.
3183
db0dfaa0
LM
31842013-05-16 Luis Machado <lgustavo@codesourcery.com>
3185
3186 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3187 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3188 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3189 PT_TEXT_END_ADDR guards. Update comments.
3190 (linux_target_op) <read_offsets>: Conditionally define to
3191 linux_read_offsets if the target is UCLIBC and if it defines
3192 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3193
68f5f838
SL
31942013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3195 Andrew Jenner <andrew@codesourcery.com>
3196
3197 * Makefile.in (SFILES): Add linux-nios2-low.c.
3198 (clean): Add action to delete nios2-linux.c.
3199 (nios2-linux.c): New rule.
3200 * configure.srv: Add nios2*-*-linux*.
3201 * linux-nios2-low.c: New.
3202
1ebff1fd
HAQ
32032013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3204
3205 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3206
f6150862
HZ
32072013-04-25 Hui Zhu <hui@codesourcery.com>
3208
3209 PR gdb/15186
f6150862
HZ
3210 * ax.c (ax_printf): Add fflush.
3211
614c279d
TT
32122013-04-22 Tom Tromey <tromey@redhat.com>
3213
3214 * Makefile.in (SFILES): Add filestuff.c.
3215 (OBS): Add filestuff.o.
3216 (filestuff.o): New target.
3217 * config.in, configure: Rebuild.
3218 * configure.ac: Check for fdwalk, pipe2.
3219
7d4e5717
PA
32202013-04-17 Pedro Alves <palves@redhat.com>
3221
3222 * configure.ac (USE_THREAD_DB): Delete variable.
3223 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3224 Don't AC_SUBST USE_THREAD_DB.
3225 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3226 * config.in, configure: Regenerate.
3227
d5c93e41
PA
32282013-04-16 Pedro Alves <palves@redhat.com>
3229
3230 * linux-low.h (struct lwp_info) <thread_known>: Move under
3231 the USE_THREAD_DB #ifdef.
3232
04f5fe89
PA
32332013-04-16 Pedro Alves <palves@redhat.com>
3234
3235 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3236 (linux-low.o): Delete rule.
3237 * linux-low.h: Always include "gdb_thread_db.h" instead of
3238 conditionally including thread_db.h.
3239 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3240 HAVE_THREAD_DB_H.
3241
480b27bf
JK
32422013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3243
3244 * Makefile.in (install-only): Fix make install regression.
3245
43662968
JK
32462013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3247
3248 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3249 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3250 installation.
3251 * gdbserver.1: Remove.
3252
3e74e146
PA
32532013-03-22 Pedro Alves <palves@redhat.com>
3254
3255 * linux-low.c (handle_extended_wait): Don't call
3256 linux_enable_event_reporting.
3257
a8347a2a
TT
32582013-03-15 Tony Theodore <tonyt@logyst.com>
3259
3260 PR build/9098:
3261 * Makefile.in (SHELL): Use @SHELL@.
3262
eeb56fa7
SDJ
32632013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3264
3265 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3266 compiler warning.
3267
4fa7e2ff
JB
32682013-03-13 Joel Brobecker <brobecker@adacore.com>
3269
3270 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3271 Remove extraneous NULL element.
3272
8ddb1965
YQ
32732013-03-13 Yao Qi <yao@codesourcery.com>
3274
3275 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3276 'V' block in trace frame.
3277
9accd112
MM
32782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3279
3280 * target.h (struct target_ops): Add btrace ops.
3281 (target_supports_btrace): New macro.
3282 (target_enable_btrace): New macro.
3283 (target_disable_btrace): New macro.
3284 (target_read_btrace): New macro.
3285 * gdbthread.h (struct thread_info): Add btrace field.
3286 * server.c: Include btrace-common.h.
3287 (handle_btrace_general_set): New function.
3288 (handle_btrace_enable): New function.
3289 (handle_btrace_disable): New function.
3290 (handle_general_set): Call handle_btrace_general_set.
3291 (handle_qxfer_btrace): New function.
3292 (struct qxfer qxfer_packets[]): Add btrace entry.
3293 * inferiors.c (remove_thread): Disable btrace.
3294 * linux-low: Include linux-btrace.h.
3295 (linux_low_enable_btrace): New function.
3296 (linux_low_read_btrace): New function.
3297 (linux_target_ops): Add btrace ops.
3298 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3299 Add srv_linux_btrace=yes.
3300 (x86_64-*-linux*): Add linux-btrace.o.
3301 Add srv_linux_btrace=yes.
3302 * configure.ac: Define HAVE_LINUX_BTRACE.
3303 * config.in: Regenerated.
3304 * configure: Regenerated.
3305
5cc22e4c
MM
33062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3307
3308 * server.c (handle_qxfer): Preserve error message if -3 is
3309 returned.
3310 (qxfer): Document the -3 return value.
3311
7c97f91e
MM
33122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3313
3314 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3315 (linux_btrace_h): New variable.
3316 (linux-btrace.o): New rule.
3317
be9a119c 33182013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3319 Hafiz Abid Qadeer <abidh@codesourcery.com>
3320
3321 * tracepoint.c (trace_buffer_size): New global.
3322 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3323 (init_trace_buffer): Change to one-argument function. Allocate
3324 trace buffer memory.
3325 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3326 handle QTBuffer:size packet.
3327 (cmd_bigqtbuffer_size): New function.
3328 (initialize_tracepoint): Call init_trace_buffer with
3329 DEFAULT_TRACE_BUFFER_SIZE.
3330 * server.c (handle_query): Add QTBuffer:size in the
3331 supported packets.
3332
e64f7499
YQ
33332013-03-07 Yao Qi <yao@codesourcery.com>
3334
3335 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3336 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3337 of -1.
3338 (cmd_qtsp): Adjust condition. Do post increment.
3339 Set cur_action and cur_step_action back to 0.
3340
f0ae6fc3
PA
33412013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3342
3343 PR server/15236
3344 * linux-low.c (linux_write_memory): Return early success if LEN is
3345 zero.
3346
b5b0b0af
CV
33472013-03-05 Corinna Vinschen <vinschen@redhat.de>
3348
334ad4a8 3349 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3350
589bc927
TT
33512013-02-28 Tom Tromey <tromey@redhat.com>
3352
3353 * configure.ac: Invoke AC_SYS_LARGEFILE.
3354 * configure, config.in: Rebuild.
3355
dfe07582
CV
33562013-02-28 Corinna Vinschen <vinschen@redhat.com>
3357
3358 * win32-low.c: Throughout, fix format strings and casts of
3359 printf-like functions to avoid type related warnings on all
3360 platforms.
3361 (get_child_debug_event): Print dwDebugEventCode as hex since
3362 that's how it's usually documented.
3363
736cd585
YQ
33642013-02-28 Yao Qi <yao@codesourcery.com>
3365
3366 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3367 pulongest.
3368
e1f58301
JW
33692013-02-27 Jiong Wang <jiwang@tilera.com>
3370
3371 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3372 (reg-tilegx32.c): New rule.
3373 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3374 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3375 different register info initializer according to elf class.
3376 (init_registers_tilgx32): New function. The tilegx32 register info
3377 initializer.
3378 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3379 (tile_store_gregset): Likewise.
3380
d171ca78
YQ
33812013-02-27 Yao Qi <yao@codesourcery.com>
3382
3383 * server.c (process_point_options): Print debug message when
3384 debug_threads is true.
3385
282bbdf3
YQ
33862013-02-26 Yao Qi <yao@codesourcery.com>
3387
3388 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3389
aca22551
PA
33902013-02-19 Pedro Alves <palves@redhat.com>
3391 Kai Tietz <ktietz@redhat.com>
3392
3393 PR gdb/15161
3394
3395 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3396 instead of strtoul to extract address from packet.
3397 (process_serial_event) <'z'>: Likewise.
3398
4f3cee1c
YQ
33992013-02-18 Yao Qi <yao@codesourcery.com>
3400
3401 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3402
8e1d55a3
PA
34032013-02-14 Pedro Alves <palves@redhat.com>
3404
3405 Plug memory leak.
3406
3407 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3408 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3409
458820da
PA
34102013-02-14 Pedro Alves <palves@redhat.com>
3411
3412 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3413
baea0dae
PA
34142013-02-14 Pedro Alves <palves@redhat.com>
3415
3416 * tracepoint.c (save_string): Delete.
3417 (add_tracepoint_action): Use savestring instead of save_string.
3418
0b1afbb3
PA
34192013-02-12 Pedro Alves <palves@redhat.com>
3420
3421 * linux-xtensa-low.c: Ditto.
3422 * xtensa-xtregs.c: Ditto.
3423
8a4ac37e
PA
34242013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3425
3426 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3427 thread_db.
3428
148de6bb
MS
34292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3430
3431 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3432 aarch64_num_wp_regs and aarch64_num_bp_regs to
3433 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3434
55fac6e0
MS
34352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3436
3437 * linux-aarch64-low.c (ps_get_thread_area): Replace
3438 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3439
176eb98c
MS
34402013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3441 Marcus Shawcroft <marcus.shawcroft@arm.com>
3442 Nigel Stephens <nigel.stephens@arm.com>
3443 Yufeng Zhang <yufeng.zhang@arm.com>
3444
3445 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3446 (aarch64.c, aarch64-without-fpu.c): New targets.
3447 * configure.srv (aarch64*-*-linux*): New.
3448 * linux-aarch64-low.c: New file.
3449
56f7af9c
MS
34502013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3451
43aaf8b6 3452 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3453 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3454 (dequeue_one_deferred_signal, linux_resume_one_thread)
3455 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3456 (linux_tracefork_grandchild, linux_test_for_tracefork)
3457 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3458 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3459 where the argument is 0.
3460
60f662b0
YQ
34612013-01-25 Yao Qi <yao@codesourcery.com>
3462
3463 * event-loop.c: Include "queue.h".
3464 (gdb_event_p): New typedef.
3465 (struct gdb_event) <next_event>: Remove.
3466 (event_queue): Change to QUEUE(gdb_event_p).
3467 (async_queue_event): Remove.
3468 (gdb_event_xfree): New.
3469 (initialize_event_loop): New.
3470 (process_event): Use API from QUEUE.
3471 (wait_for_event): Likewise.
3472 * server.c (main): Call initialize_event_loop.
3473 * server.h (initialize_event_loop): Declare.
3474
5ae4861a
YQ
34752013-01-18 Yao Qi <yao@codesourcery.com>
3476
3477 * ax.h (struct eval_agent_expr_context): New.
3478 (gdb_eval_agent_expr): Update declaration.
3479 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3480 TFRAME. Add new argument CTX.
3481 * server.h (struct eval_agent_expr_context): Declare.
3482 (agent_mem_read, agent_tsv_read): Update declaration.
3483 (agent_mem_read_string): Likewise.
3484 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3485 (add_traceframe_block): Add new argument TPOINT.
3486 Increase TPOINT->traceframe_usage.
3487 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3488 eval_tracepoint_agent_expr.
3489 (condition_true_at_tracepoint): Likewise.
3490 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3491 (agent_mem_read_string, agent_tsv_read): Likewise.
3492
85e00e85
YQ
34932013-01-16 Yao Qi <yao@codesourcery.com>
3494
3495 * linux-low.c (linux_resume_one_lwp): Don't check
3496 'lwp->bp_reinsert != 0'.
3497
4039cf45
JB
34982013-01-07 Joel Brobecker <brobecker@adacore.com>
3499 Pedro Alves <palves@redhat.com>
3500
3501 * lynx-low.c (ptrace_request_to_str): Define a temporary
3502 macro and use it to simplify this function's implementation.
3503
9044dee2
JB
35042013-01-07 Joel Brobecker <brobecker@adacore.com>
3505
3506 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3507 sets errno.
3508
e6352c8f
JB
35092013-01-07 Joel Brobecker <brobecker@adacore.com>
3510
3511 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3512
50681a27
JB
35132013-01-07 Joel Brobecker <brobecker@adacore.com>
3514
3515 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3516
3f6e77ef
JB
35172013-01-07 Joel Brobecker <brobecker@adacore.com>
3518
3519 * lynx-low.c (lynx_resume): Use the resume_info parameter
3520 to determine the ptid for the lynx_ptrace call, unless
3521 it is equal to minus_one_ptid, in which case we use the
3522 ptid of the current_inferior.
3523 (lynx_wait_1): After having received a thread create/exit
3524 event, resume the inferior's execution using the signaling
3525 thread's ptid, rather than the old ptid.
3526
7fda33ae
JB
35272013-01-07 Joel Brobecker <brobecker@adacore.com>
3528
3529 * lynx-low.c (lynx_resume): Delete variable ret.
3530
b9786c74
JB
35312013-01-01 Joel Brobecker <brobecker@adacore.com>
3532
3533 * gdbreplay.c (gdbreplay_version): Update copyright year.
3534 * server.c (gdbserver_version): Likewise.
3535
8b93d60f
JB
35362012-12-17 Joel Brobecker <brobecker@adacore.com>
3537
3538 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3539 new thread.
3540
037335a7
JB
35412012-12-17 Joel Brobecker <brobecker@adacore.com>
3542
3543 * lynx-low.c (ptrace_request_to_str): Add handling for
3544 PTRACE_GETTRACESIG.
3545
52d4cbd8
JB
35462012-12-17 Joel Brobecker <brobecker@adacore.com>
3547
3548 * lynx-low.c (lynx_attach): Delete variable new_process.
3549
ab8f6ca9
JB
35502012-12-17 Joel Brobecker <brobecker@adacore.com>
3551
3552 * lynx-low.c (lynx_create_inferior): Delete variable
3553 new_process.
3554
78cbc024
JB
35552012-12-17 Joel Brobecker <brobecker@adacore.com>
3556
3557 * lynx-low.c (ptrace_request_to_str): Do not handle
3558 PTRACE_GETTHREADLIST if this macro does not exist.
3559
14a00470
YQ
35602012-12-15 Yao Qi <yao@codesourcery.com>
3561
3562 * Makefile.in (OBS): Add notif.o.
3563 * notif.c, notif.h: New.
3564 * server.c: Include "notif.h".
3565 (struct vstop_notif) <next>: Remove.
3566 <base>: New field.
3567 (queue_stop_reply): Update.
3568 (push_event, send_next_stop_reply): Remove.
3569 (discard_queued_stop_replies): Update.
3570 (notif_stop): New variable.
3571 (handle_v_stopped): Remove.
3572 (handle_v_requests): Don't call handle_v_stopped. Call
3573 handle_ack_notif instead.
3574 (queue_stop_reply_callback): Call notif_event_enque instead
3575 of queue_stop_reply.
3576 (handle_status): Don't call send_next_stop_reply, call
3577 notif_write_event instead.
3578 (kill_inferior_callback): Likewise.
3579 (detach_or_kill_inferior_callback): Likewise.
3580 (main): Call initialize_notif.
3581 (process_serial_event): Call QUEUE_is_empty.
3582 (handle_target_event): Call notif_push instead of push event.
3583 * server.h (push_event): Remove declaration.
3584
61c125b9
TT
35852012-12-10 Tom Tromey <tromey@redhat.com>
3586
3587 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3588 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3589 macros.
3590 (.c.o): Rewrite.
3591 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3592 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3593 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3594 (amd64-linux-ipa.o, ax.o): Rewrite.
3595 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3596 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3597 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3598 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3599 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3600 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3601 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3602 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3603 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3604 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3605 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3606 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3607 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3608 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3609 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3610 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3611 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3612 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3613 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3614 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3615 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3616 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3617 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3618 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3619 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3620 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3621 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3622 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3623 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3624 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3625 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3626 (reg-tilegx.o): Remove.
3627 (all_object_files): New macro.
3628 Include .deps files.
3629 * aclocal.m4, configure: Rebuild.
3630 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3631 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3632 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3633
e90e9ad9
TT
36342012-12-05 Tom Tromey <tromey@redhat.com>
3635
3636 PR gdb/14917:
3637 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3638
02d403bf 36392012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3640
3641 * configure.ac: Check for linux/perf_event.h.
3642 * config.in: Regenerated.
3643 * configure: Regenerated.
3644
0270a750
PA
36452012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3646
3647 * hostio.c (handle_readlink): Decrease buffer size
3648 parameter passed to readlink by one byte.
3649
8c29b58e
YQ
36502012-11-26 Yao Qi <yao@codesourcery.com>
3651
3652 * configure.ac (build_warnings): Append '-Wempty-body'.
3653 * configure: Regenerated.
3654 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3655 body.
3656
8bdce1ff
PM
36572012-11-15 Pierre Muller <muller@sourceware.org>
3658
3659 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3660 * config.in: Regenerate.
3661 * configure: Regenerate.
3662 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3663 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3664 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3665 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3666 header.
3667 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3668 instead of <sys/wait.h> header.
3669 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3670
02d403bf 36712012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3672
3673 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3674 (various make rules): Remove -DGDBSERVER
3675
fbd5db48
YQ
36762012-11-09 Yao Qi <yao@codesourcery.com>
3677
3678 * spu-low.c (current_ptid): Move it to ..
3679 * gdbthread.h: ... here. New.
3680 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3681 * server.c (myresume, process_serial_event): Likewise.
3682 * thread-db.c (thread_db_find_new_threads): Likewise.
3683 * tracepoint.c (run_inferior_command): Likewise.
3684
b3dc46ff
AB
36852012-10-01 Andrew Burgess <aburgess@broadcom.com>
3686
3687 * server.c (handle_search_memory_1): Include access length in
3688 warning message.
3689
07c04788
HPN
36902012-09-05 Michael Brandt <michael.brandt@axis.com>
3691
3692 * linux-crisv32-low.c: Fix compile errors.
3693
918d227b
YQ
36942012-09-04 Yao Qi <yao@codesourcery.com>
3695
3696 * tracepoint.c (cmd_qtsv): Adjust debug message.
3697 Don't check CUR_TPOINT.
3698
18c1b81a
YQ
36992012-08-28 Yao Qi <yao@codesourcery.com>
3700
3701 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3702 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3703 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3704 Remove declarations of xmalloc, xreallloc, xstrdup and
3705 freeargv.
3706 * Makefile.in (libiberty_h): New.
3707 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3708 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3709
dc82f37b
YQ
37102012-08-23 Yao Qi <yao@codesourcery.com>
3711
3712 * server.h: Remove declaration of 'xsnprintf'.
3713
406b1477
KS
37142012-08-22 Keith Seitz <keiths@redhat.com>
3715
3716 * server.h: Include build-gnulib-gbserver/config.h.
3717 * gdbreplay.c: Likewise.
3718
e6712ff1
DE
37192012-08-08 Doug Evans <dje@google.com>
3720
3721 * Makefile.in (SFILES): Add gdb_vecs.c.
3722 (OBS): Add gdb_vecs.o.
3723 (gdb_vecs_h, host_defs_h): New variables.
3724 (thread-db.o): Add $(gdb_vecs_h) dependency.
3725 (gdb_vecs.o): New rule.
3726 * thread-db.c: #include "gdb_vecs.h".
3727 (thread_db_load_search): Use a vector to iterate over path elements.
3728 Handle text appearing after "$pdir".
3729
3730 * configure.ac: Add check for strstr.
3731 * config.in: Regenerate.
3732 * configure: Regenerate.
3733
7c3270ae
UW
37342012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3735
3736 * hostio.c (handle_pread): If pread fails, fall back to attempting
3737 lseek/read.
3738 (handle_pwrite): Likewise for pwrite.
3739
b62e2b27
UW
37402012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3741
3742 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3743 between unsupported TYPE and unimplementable ADDR/LEN combination.
3744 (arm_insert_point): Act on new return value.
3745
78a99e91
PA
37462012-07-31 Pedro Alves <palves@redhat.com>
3747
3748 * server.c (process_point_options): Only skip tokens if we find
3749 one that is unrecognized. Don't treat 'X' specially while
3750 skipping unrecognized tokens.
3751
fcf303ab
UW
37522012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3753
3754 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3755 to 4-byte-align HW breakpoint addresses for Thumb.
3756
7255706c
YQ
37572012-07-27 Yao Qi <yao@codesourcery.com>
3758
3759 PR remote/14161.
3760
3761 * server.h: Declare gdb_agent_about_to_close.
3762 * target.c (kill_inferior): Include "agent.h".
3763 New. Send command 'kill'.
3764 * target.h (kill_inferior): Removed macro.
3765 * tracepoint.c (gdb_agent_about_to_close): New.
3766 (gdb_agent_helper_thread): Handle command 'close'.
3767 Wait endlessly until the inferior stops.
3768 Install gdb_agent_remove_socket to atexit hook.
3769 (agent_socket_name): New static variable.
3770 (gdb_agent_socket_init): Replace local variable 'name' with
3771 'agent_socket_name'.
3772 (gdb_agent_remove_socket): New.
3773
5a3f286f
YQ
37742012-07-27 Yao Qi <yao@codesourcery.com>
3775
3776 * server.c (process_point_options): Stop at 'X' when parsing.
3777
961bd387
ME
37782012-07-19 Michael Eager <eager@eagercon.com>
3779
a261b8f5 3780 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3781 to hw_execute.
3782 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3783 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3784 hardware breakpoint.
3785
aa7c7447
JK
37862012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3787
3788 * gdbserver/linux-low.c (initialize_low): Call
3789 linux_ptrace_init_warnings.
3790
7f216e7c
DE
37912012-07-02 Doug Evans <dje@google.com>
3792
3793 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3794 pointer to int.
3795
d3ce09f5
SS
37962012-07-02 Stan Shebs <stan@codesourcery.com>
3797
3798 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3799 (ax.o): Add it to build rule.
3800 (ax-ipa.o): Ditto.
3801 (OBS): Add format.o.
3802 (IPA_OBS): Add format.o.
3803 * server.c (handle_query): Claim support for breakpoint commands.
3804 (process_point_options): Add command case.
3805 (process_serial_event): Leave running if there are printfs in
3806 effect.
3807 * mem-break.h (any_persistent_commands): Declare.
3808 (add_breakpoint_commands): Declare.
3809 (gdb_no_commands_at_breakpoint): Declare.
3810 (run_breakpoint_commands): Declare.
3811 * mem-break.c (struct point_command_list): New struct.
3812 (struct breakpoint): New field command_list.
3813 (any_persistent_commands): New function.
3814 (add_commands_to_breakpoint): New function.
3815 (add_breakpoint_commands): New function.
3816 (gdb_no_commands_at_breakpoint): New function.
3817 (run_breakpoint_commands): New function.
3818 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3819 locally.
3820 * ax.c: Include format.h.
3821 (ax_printf): New function.
3822 (gdb_eval_agent_expr): Add printf opcode.
3823
2f8f6aed
YQ
38242012-06-13 Yao Qi <yao@codesourcery.com>
3825
3826 * server.c (start_inferior): Remove duplicated writes to fields
3827 'last_resume_kind' and 'last_status' of 'current_inferior'.
3828
0c9070b3
YQ
38292012-06-12 Yao Qi <yao@codesourcery.com>
3830 Pedro Alves <palves@redhat.com>
3831
3832 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3833 comment.
3834 * server.c (handle_v_cont): Extend comment.
3835
c52daf70
YQ
38362012-06-11 Yao Qi <yao@codesourcery.com>
3837
3838 * linux-low.c (linux_attach): Add 'static'.
3839
d38bbb0a
YQ
38402012-06-06 Yao Qi <yao@codesourcery.com>
3841
3842 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3843
89dc0afd
JK
38442012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3845
3846 Fix gcc -flto compilation warning.
3847 * server.c (main): Make variable multi_mode and attach volatile.
3848
75f62ce7
TJB
38492012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3850
3851 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3852 if the platform doesn't know about it.
3853
65f479b6
PA
38542012-05-30 Jeff Kenton <jkenton@tilera.com>
3855
3856 * Makefile.in (SFILES): Add linux-tile-low.c.
3857 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3858 * configure.srv: Handle tilegx-*-linux*.
3859 * linux-tile-low.c: New file.
3860
0c5bf5a9
JK
38612012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3862
3863 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3864
a493e3e2
PA
38652012-05-24 Pedro Alves <palves@redhat.com>
3866
3867 PR gdb/7205
3868
43aaf8b6 3869 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3870
2ea28649
PA
38712012-05-24 Pedro Alves <palves@redhat.com>
3872
3873 PR gdb/7205
3874
3875 Replace target_signal with gdb_signal throughout.
3876
8d409d16
MR
38772012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3878
3879 * linux-low.c (linux_store_registers): Avoid the copying sequence
3880 when no data has been retrieved by ptrace.
3881
23512c01
MGD
38822012-05-22 Will Deacon <will.deacon@arm.com>
3883
3884 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3885 Include asm/ptrace.h.
3886 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3887 already defined.
3888
4934b29e
MR
38892012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3890
3891 * linux-low.c (linux_store_registers): Don't re-retrieve data
3892 with ptrace that has already been obtained from /proc. Always
3893 copy any data retrieved with ptrace to the buffer supplied.
3894
bde24c0a
PA
38952012-05-11 Yao Qi <yao@codesourcery.com>
3896 Pedro Alves <palves@redhat.com>
3897
3898 * linux-low.c (enum stopping_threads_kind): New.
3899 (stopping_threads): Change type to `enum stopping_threads_kind'.
3900 (handle_extended_wait): If stopping and suspending threads, leave
3901 the new_lwp suspended too.
3902 (linux_wait_for_event): Adjust.
3903 (stop_all_lwps): Set `stopping_threads' to
3904 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3905 whether we're suspending threads or just stopping them. Assert no
3906 recursion happens.
3907
623b6bdf
YQ
39082012-04-29 Yao Qi <yao@codesourcery.com>
3909
3910 * server.h: Move some code to ...
3911 * gdbthread.h: ... here. New.
3912 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3913 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3914 (nto-low.o, win32-low.o): Likewise.
3915 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3916 * regcache.c, remote-utils.c, server.c: Likewise.
3917 * target.c, tracepoint.c, win32-low.c: Likewise.
3918
f15f9948
TJB
39192012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3920
3921 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3922 (PTRACE_ARG4_TYPE): Likewise.
3923 (PTRACE_XFER_TYPE): Likewise.
3924 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3925 ptrace to PTRACE_ARG3_TYPE.
3926 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3927 (PTRACE_ARG4_TYPE): Likewise.
3928 (PTRACE_XFER_TYPE): Likewise.
3929 (linux_detach_one_lwp): Cast fourth argument of
3930 ptrace to long then PTRACE_ARG4_TYPE.
3931 (regsets_fetch_inferior_registers): Cast third argument of
3932 ptrace to long then PTRACE_ARG3_TYPE.
3933 (regsets_store_inferior_registers): Likewise.
3934
38ea300a
PA
39352012-04-20 Pedro Alves <palves@redhat.com>
3936
3937 * configure: Regenerate.
3938
c971b7fa
PA
39392012-04-19 Pedro Alves <palves@redhat.com>
3940
43aaf8b6 3941 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3942 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3943 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3944 (all, install-only, uninstall, clean-info, all-lib, clean): No
3945 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3946 (maintainer-clean realclean distclean): Use subdir_do.
3947 (subdir_do): New.
3948 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3949 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3950 * acinclude.m4: Include acx_configure_dir.m4.
3951 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3952 calls. Call AC_PROG_RANLIB. Configure gnulib using
3953 ACX_CONFIGURE_DIR.
3954 (GNULIB): New.
3955 (GNULIB_STDINT_H): Adjust.
3956 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3957 * gdbreplay.c: Include build-gnulib/config.h.
3958 * server.h: Likewise.
3959 * aclocal.m4: Regenerate.
3960 * config.in: Regenerate.
3961 * configure: Regenerate.
c971b7fa 3962
809277f8
PA
39632012-04-19 Pedro Alves <palves@redhat.com>
3964
3965 * Makefile.in (LIBGNU, INCGNU): Adjust.
3966 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3967 (all, install-only, uninstall, clean-info, all-lib, clean)
3968 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3969 * configure.ac: Adjust AC_OUTPUT output.
3970 * aclocal.m4: Regenerate.
3971 * configure: Regenerate.
3972
fd9bb8b8
PA
39732012-04-19 Pedro Alves <palves@redhat.com>
3974
3975 * Makefile.in (generated_files): New.
3976 (server_h): Remove the explicit dependency on config.h, and depend
3977 on $generated_files.
3978
1c298c66
PA
39792012-04-19 Pedro Alves <palves@redhat.com>
3980
3981 * Makefile.in (INCGNU): Add -Ignulib.
3982
57c4b50b
PA
39832012-04-19 Pedro Alves <palves@redhat.com>
3984
3985 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3986 (INCGNU): ... this, and spell out -I here.
3987 (GNULIB_LIB): Rename to ...
3988 (LIBGNU): ... this.
3989 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3990
1030e047
PA
39912012-04-19 Pedro Alves <palves@redhat.com>
3992
3993 * config.in: Regenerate.
3994
447d4319
PA
39952012-04-19 Pedro Alves <palves@redhat.com>
3996
3997 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3998 * server.h (memmem): Remove declaration.
3999 * config.in: Regenerate.
4000 * configure: Regenerate.
4001
aad9eab9
YQ
40022012-04-19 Yao Qi <yao@codesourcery.com>
4003
4004 * Makefile.in (SFILES): Add common/vec.c.
4005 (OBS): Add vec.o.
4006 (vec.o): New rule.
4007
3e10640f
YQ
40082012-04-19 Yao Qi <yao@codesourcery.com>
4009
4010 * remote-utils.c (prepare_resume_reply): Replace with macro
4011 target_core_of_thread.
4012 * server.c (handle_qxfer_threads_proper): Likewise.
4013 * target.h (traget_core_of_thread): New macro.
4014
71622373
PA
40152012-04-18 Pedro Alves <palves@redhat.com>
4016
4017 * aclocal.m4: Regenerate.
4018 * configure: Regenerate.
4019
80d26939
YQ
40202012-04-16 Yao Qi <yao@codesourcery.com>
4021
4022 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4023 duplicated on address.
4024
42476b70
YQ
40252012-04-16 Yao Qi <yao@codesourcery.com>
4026
4027 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4028 (struct tracepoint_action_ops) <send>: New field.
4029 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4030 (agent_expr_send, x_tracepoint_action_send): New.
4031 (l_tracepoint_action_send): New.
4032 (cmd_qtdp): Download and install tracepoint
4033 according to `use_agent'.
4034 (run_inferior_command): Add one more parameter `len'.
4035 Update callers.
4036 (tracepoint_send_agent): New.
4037 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4038
7bc83639
YQ
40392012-04-16 Yao Qi <yao@codesourcery.com>
4040
4041 * tracepoint.c (download_tracepoints): Moved to ...
4042 (cmd_qtstart): ... here.
4043
5f18041e
YQ
40442012-04-14 Yao Qi <yao@codesourcery.com>
4045
4046 * tracepoint.c: Include inttypes.h.
4047 (struct collect_memory_action): Use sized types.
4048 (struct tracepoint): Likewise.
4049 (cmd_qtdp, stop_tracing): Update print specifiers.
4050 (cmd_qtp, response_tracepoint): Likewise.
4051 (collect_data_at_tracepoint): Likewise.
4052 (collect_data_at_step): Likewise.
4053
55a8c076
YQ
40542012-04-14 Yao Qi <yao@codesourcery.com>
4055
4056 Import gnulib module inttypes.
4057 * aclocal.m4, config.in, configure: Regenerated.
4058
dc750257
YQ
40592012-04-14 Yao Qi <yao@codesourcery.com>
4060
4061 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4062 Makefile and config.status at last.
4063
0ab5faf9
YQ
40642012-04-13 Yao Qi <yao@codesourcery.com>
4065
4066 * tracepoint.c: Include stdint.h unconditionally.
4067
18f5fd81
TJB
40682012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4069
4070 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4071 on BFD_HAVE_SYS_PROCFS_TYPE.
4072 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4073 * configure: Regenerate.
4074 * config.in: Likewise.
4075
4d47af5c
L
40762012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4077
4078 * Makefile.in (clean): Also remove x32.c x32-linux.c
4079 x32-avx.c x32-avx-linux.c.
4080 (x32.o): New target.
4081 (x32.c): Likewise.
4082 (x32-linux.o): Likewise.
4083 (x32-linux.c): Likewise.
4084 (x32-avx.o): Likewise.
4085 (x32-avx.c): Likewise.
4086 (x32-avx-linux.o): Likewise.
4087 (x32-avx-linux.c): Likewise.
4088
4089 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4090 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4091 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4092 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4093 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4094 i386/x32-avx-linux.xml.
4095
4096 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4097 (init_registers_x32_avx_linux): Likwise.
4098 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4099 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4100
ecedbe58
PA
41012012-04-13 Pedro Alves <palves@redhat.com>
4102
4103 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4104 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4105 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4106 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4107 the sub-make.
4108
c92b5177
L
41092012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4110
4111 * linux-x86-low.c (compat_x32_clock_t): New.
4112 (compat_x32_siginfo_t): Likewise.
4113 (compat_x32_siginfo_from_siginfo): Likewise.
4114 (siginfo_from_compat_x32_siginfo): Likewise.
4115 (linux_is_elf64): Likewise.
4116 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4117 and siginfo_from_compat_x32_siginfo for x32.
4118 (x86_arch_setup): Set linux_is_elf64.
4119
214d508e
L
41202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4121
4122 PR gdb/13969
4123 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4124 e_machine field.
4125 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4126 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4127 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4128 compatible with process.
4129
c9a1864a
YQ
41302012-04-12 Yao Qi <yao@codesourcery.com>
4131
4132 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4133 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4134 (install-only, install-info, clean): Handle sub dir gnulib.
4135 (all-lib, am--refresh): New targets.
4136 (memmem.o): Remove target.
4137 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4138 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4139 (AC_REPLACE_FUNCS): Remove memmem.
4140 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4141 (AC_OUTPUT): Generate Makefile in gnulib/.
4142 * aclocal.m4, config.in, configure: Regenerated.
4143
367ba2c2
MR
41442012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4145
4146 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4147
9d236627
PA
41482012-04-05 Pedro Alves <palves@redhat.com>
4149
4150 -Werror=strict-aliasing
4151
4152 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4153 pointer.
4154
111217b3
PA
41552012-04-04 Pedro Alves <palves@redhat.com>
4156
4157 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4158 (sparc_store_gregset_from_stack, sparc_store_gregset)
4159 (sparc_breakpoint_at): Fix formatting.
4160
8365dcf5
TJB
41612012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4162
4163 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4164 are available.
4165 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4166 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4167 * config.in: Regenerate.
4168 * configure: Likewise.
4169
689cc2ae
PA
41702012-03-29 Pedro Alves <palves@redhat.com>
4171
4172 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4173 Correct ptrace arguments.
4174
c14dfd32
PA
41752012-03-28 Pedro Alves <palves@redhat.com>
4176
4177 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4178 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4179 (IA64_FR1_REGNUM): New defines.
4180 (ia64_fetch_register): New.
4181 (the_low_target): Install it.
4182 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4183 field.
4184 * linux-low.c (linux_fetch_registers): Try the
4185 the_low_target.fetch_register hook first.
4186
4187 * linux-arm-low.c (the_low_target): Adjust.
4188 * linux-bfin-low.c (the_low_target): Adjust.
4189 * linux-cris-low.c (the_low_target): Adjust.
4190 * linux-crisv32-low.c (the_low_target): Adjust.
4191 * linux-m32r-low.c (the_low_target): Adjust.
4192 * linux-m68k-low.c (the_low_target): Adjust.
4193 * linux-mips-low.c (the_low_target): Adjust.
4194 * linux-ppc-low.c (the_low_target): Adjust.
4195 * linux-s390-low.c (the_low_target): Adjust.
4196 * linux-sh-low.c (the_low_target): Adjust.
4197 * linux-sparc-low.c (the_low_target): Adjust.
4198 * linux-tic6x-low.c (the_low_target): Adjust.
4199 * linux-x86-low.c (the_low_target): Adjust.
4200 * linux-xtensa-low.c (the_low_target): Adjust.
4201
63c88e13
PA
42022012-03-26 Pedro Alves <palves@redhat.com>
4203
4204 * server.c (handle_qxfer_libraries): Don't bail early if
4205 the_target->qxfer_libraries_svr4 is not NULL.
4206
fb723180
PA
42072012-03-26 Pedro Alves <palves@redhat.com>
4208
4209 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4210
0afae3cf
PA
42112012-03-23 Pedro Alves <palves@redhat.com>
4212
4213 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4214 "library-list-svr4" element's start tag when the the DSO list is
4215 empty.
4216
485f1ee4
PA
42172012-03-23 Pedro Alves <palves@redhat.com>
4218
4219 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4220 a variable whose type size is the same as the inferior's pointer
4221 size.
4222
a5362b9a
TS
42232012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4224
4225 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4226 struct siginfo.
4227 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4228 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4229 * linux-low.h: Include <signal.h>.
4230 (struct siginfo): Remove forward declaration.
4231 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4232 struct siginfo.
4233
d226c142
MF
42342012-03-21 Mike Frysinger <vapier@gentoo.org>
4235
4236 * .gitignore: Ignore more files.
4237
122f36ef
PA
42382012-03-19 Pedro Alves <palves@redhat.com>
4239 Jan Kratochvil <jan.kratochvil@redhat.com>
4240
4241 * server.c (cont_thread, general_thread): Add describing comments.
4242 (start_inferior): Clear `cont_thread'.
4243 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4244 of a process.
4245
fc3e5175
YQ
42462012-03-15 Yao Qi <yao@codesourcery.com>
4247
4248 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4249 handling to ...
4250 (cmd_qtdp): ... here.
4251
8d0d92cd
YQ
42522012-03-15 Yao Qi <yao@codesourcery.com>
4253
4254 * tracepoint.c (struct tracepoint_action_ops): New.
4255 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4256 (m_tracepoint_action_download): New.
4257 (r_tracepoint_action_download): New.
4258 (x_tracepoint_action_download): New.
4259 (l_tracepoint_action_download): New.
4260 (add_tracepoint_action): Install `action->ops' according type.
4261 (download_tracepoint_1): Move code `download' function pointer
4262 of various tracepoint_action_ops.
4263
87b0bb13
JK
42642012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4265
4266 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4267 linux_ptrace_attach_warnings.
4268
5f572dec
JK
42692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4270
4271 * Makefile.in (linux-ptrace.o): New.
4272 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4273 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4274 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4275 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4276 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4277 of these targets.
4278 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4279
f4647387
YQ
42802012-03-08 Yao Qi <yao@codesourcery.com>
4281 Pedro Alves <palves@redhat.com>
4282
4283 Fix PR server/13392.
4284 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4285 offset of JMP insn.
4286 * tracepoint.c (remove_tracepoint): New.
4287 (cmd_qtdp): Call remove_tracepoint when failed to install.
4288
9b224c5e
PA
42892012-03-07 Pedro Alves <palves@redhat.com>
4290
4291 * linux-low.c (get_detach_signal): New.
4292 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4293 Pass on pending signals to PTRACE_DETACH. Check the result of the
4294 ptrace call.
4295 * server.c (program_signals, program_signals_p): New.
4296 (handle_general_set): Handle QProgramSignals.
4297 * server.h (program_signals, program_signals_p): Declare.
4298
e237a7e2
JK
42992012-03-05 Pedro Alves <palves@redhat.com>
4300 Jan Kratochvil <jan.kratochvil@redhat.com>
4301
4302 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4303 New comment why.
4304
5808517f
YQ
43052012-03-03 Yao Qi <yao@codesourcery.com>
4306
4307 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4308 agent_look_up_symbols.
4309
58b4daa5
YQ
43102012-03-03 Yao Qi <yao@codesourcery.com>
4311
4312 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4313 (linux-x86-low.o): Likewise.
4314 * server.h: Remove in_process_agent_loaded.
4315 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4316 common/agent.c.
4317 Update callers.
4318
8ffcbaaf
YQ
43192012-03-03 Yao Qi <yao@codesourcery.com>
4320
4321 * tracepoint.c (gdb_agent_capability): New global.
4322 (in_process_agent_loaded_ust): Renamed to
4323 `in_process_agent_supports_ust'.
4324 Update callers.
4325 (in_process_agent_supports_ust): Call agent_capability_check.
4326 (clear_installed_tracepoints): Assert that agent supports
4327 agent.
4328
d1feda86
YQ
43292012-03-03 Yao Qi <yao@codesourcery.com>
4330
4331 * linux-low.c (linux_supports_agent): New.
4332 (linux_target_ops): Initialize field `supports_agent' with
4333 linux_supports_agent.
4334 * target.h (struct target_ops) <supports_agent>: New.
4335 (target_supports_agent): New macro.
4336 * server.c (handle_general_set): Handle packet 'QAgent'.
4337 (handle_query): Send `QAgent+'.
4338 * Makefile.in (server.o): Depends on agent.h.
4339
2fa291ac
YQ
43402012-03-03 Yao Qi <yao@codesourcery.com>
4341
4342 * Makefile.in (OBS): Add agent.o.
4343 Add new rule for agent.o.
4344 Track dependence of tracepoint.c on agent.h.
4345 * tracepoint.c (run_inferior_command_1):
4346 (run_inferior_command): Call agent_run_command.
4347 (gdb_ust_connect_sync_socket): Deleted. Move it to
4348 common/agent.c.
4349 (resume_thread, stop_thread): Likewise.
4350 (gdb_ust_socket_init): Renamed to ...
4351 (gdb_agent_socket_init): ... New.
4352 (gdb_ust_thread): Renamed to ...
4353 (gdb_agent_helper_thread): ... New.
4354 (gdb_ust_init): Move some code to ...
4355 (gdb_agent_init): ... here. New.
4356 [HAVE_UST]: Call gdb_ust_init.
4357 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4358 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4359 * config.in, configure: Regenerated.
4360
05044653
PA
43612012-03-02 Pedro Alves <palves@redhat.com>
4362
4363 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4364 * linux-low.c (struct simple_pid_list): New.
4365 (stopped_pids): New a struct simple_pid_list pointer.
4366 (add_to_pid_list, pull_pid_from_list): New.
4367 (handle_extended_wait): Don't assume the first signal new children
4368 report is SIGSTOP. Adjust call to pull_pid_from_list.
4369 (linux_wait_for_lwp): Adjust.
4370
8d00225b
YQ
43712012-03-02 Yao Qi <yao@codesourcery.com>
4372
4373 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4374 debug log.
4375
19560ba5
YQ
43762012-03-02 Yao Qi <yao@codesourcery.com>
4377
4378 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4379 `stop_pc' and `tpoint'. Update caller.
4380
1faeff08
MR
43812012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4382
4383 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4384 * linux-low.c (use_linux_regsets): New macro.
4385 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4386 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4387 (linux_register_in_regsets): New function.
4388 (usr_fetch_inferior_registers): Skip registers covered by
4389 regsets.
4390 (usr_store_inferior_registers): Likewise.
4391 (usr_fetch_inferior_registers): New macro.
4392 (usr_store_inferior_registers): Likewise.
4393 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4394 (linux_store_registers): Likewise.
4395 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4396 prototype.
4397 (init_registers_mips64_dsp_linux): Likewise.
4398 (init_registers_mips_linux): New macro.
4399 (init_registers_mips_dsp_linux): Likewise.
4400 (mips_dsp_num_regs): Likewise.
4401 (DSP_BASE, DSP_CONTROL): New fallback macros.
4402 (mips_base_regs): New macro.
4403 (mips_regmap): Use it. Fix the size.
4404 (mips_dsp_regmap): New variable.
4405 (mips_dsp_regset_bitmap): Likewise.
4406 (mips_arch_setup): New function.
4407 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4408 than mips_regmap.
4409 (mips_cannot_store_register): Likewise.
4410 (the_low_target): Update .arch_setup, .num_regs and .regmap
4411 initializers. Add .regset_bitmap initializer.
4412 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4413 initializer.
4414 * linux-bfin-low.c (the_low_target): Likewise.
4415 * linux-cris-low.c (the_low_target): Likewise.
4416 * linux-crisv32-low.c (the_low_target): Likewise.
4417 * linux-ia64-low.c (the_low_target): Likewise.
4418 * linux-m32r-low.c (the_low_target): Likewise.
4419 * linux-m68k-low.c (the_low_target): Likewise.
4420 * linux-ppc-low.c (the_low_target): Likewise.
4421 * linux-s390-low.c (the_low_target): Likewise.
4422 * linux-sh-low.c (the_low_target): Likewise.
4423 * linux-sparc-low.c (the_low_target): Likewise.
4424 * linux-tic6x-low.c (the_low_target): Likewise.
4425 * linux-x86-low.c (the_low_target): Likewise.
4426 * linux-xtensa-low.c (the_low_target): Likewise.
4427 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4428 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4429 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4430 srv_xmlfiles.
4431 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4432 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4433
c03e6ccc
YQ
44342012-02-29 Yao Qi <yao@codesourcery.com>
4435 Pedro Alves <palves@redhat.com>
4436
4437 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4438 `step_over_finished' is true.
4439
644cebc9
PA
44402012-02-27 Pedro Alves <palves@redhat.com>
4441
4442 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4443 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4444
c14d7ab2
PA
44452012-02-27 Pedro Alves <palves@redhat.com>
4446
4447 PR server/9684
4448 * linux-low.c (pid_is_stopped): New.
4449 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4450
412c89dd
LM
44512012-02-25 Luis Machado <lgustavo@codesourcery.com>
4452
4453 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4454 of conditions.
4455
b745defe
MR
44562012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4457
4458 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4459
9f3a5c85
LM
44602012-02-24 Luis Machado <lgustavo@codesourcery>
4461
4462 * server.c (handle_query): Advertise support for target-side
4463 breakpoint condition evaluation.
4464 (process_point_options): New function.
4465 (process_serial_event): When inserting a breakpoint, check for
4466 a target-side condition that should be evaluated.
4467
4468 * mem-break.c: Include regcache.h and ax.h.
4469 (point_cond_list_t): New data structure.
4470 (breakpoint) <cond_list>: New field.
4471 (find_gdb_breakpoint_at): Make non-static.
4472 (delete_gdb_breakpoint_at): Clear any target-side
4473 conditions.
4474 (clear_gdb_breakpoint_conditions): New function.
4475 (add_condition_to_breakpoint): Likewise.
4476 (add_breakpoint_condition): Likewise.
4477 (gdb_condition_true_at_breakpoint): Likewise.
4478 (gdb_breakpoint_here): Return result directly instead
4479 of going through a local variable.
4480
4481 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4482 (clear_gdb_breakpoint_conditions): Likewise.
4483 (add_breakpoint_condition): Likewise.
4484 (gdb_condition_true_at_breakpoint): Likewise.
4485
4486 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4487 (need_step_over_p): Take target-side breakpoint condition into
4488 consideration.
4489
5e1dc496
LM
44902012-02-24 Luis Machado <lgustavo@codesourcery>
4491
4492 * server.h: Include tracepoint.h.
4493 (agent_mem_read, agent_get_trace_state_variable_value,
4494 agent_set_trace_state_variable_value,
4495 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4496 get_set_tsv_func_addr): New prototypes.
4497
4498 * ax.h: New include file.
4499 * ax.c: New source file.
4500
4501 * tracepoint.c: Include ax.h.
4502 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4503 agent_expr, eval_result_type): Move to ax.h.
4504 (parse_agent_expr): Rename to ...
4505 (gdb_parse_agent_expr): ... this, make it non-static and move
4506 to ax.h.
4507 (unparse_agent_expr) Rename to ...
4508 (gdb_unparse_agent_expr): ... this, make it non-static and move
4509 to ax.h.
4510 (eval_agent_expr): Rename to ...
4511 (eval_tracepoint_agent_expr): ... this.
4512 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4513 forward declarations.
4514 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4515 (agent_get_trace_state_variable_value): New function.
4516 (agent_set_trace_state_variable_value): New function.
4517 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4518 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4519 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4520 (condition_true_at_tracepoint): Likewise.
4521 (parse_agent_expr): Rename to ...
4522 (gdb_parse_agent_expr): ... this and move to ax.c.
4523 (unparse_agent_expr): Rename to ...
4524 (gdb_unparse_agent_expr): ... this and move to ax.c.
4525 (gdb_agent_op_name): Move to ax.c.
4526 (eval_agent_expr): Rename to ...
4527 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4528 and move to ax.c.
4529 (eval_tracepoint_agent_expr): New function.
4530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4531 non-static.
5e1dc496
LM
4532 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4533 ax.c.
4534 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4535 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4536 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4537 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4538 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4539 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4540 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4541 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4542 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4543 (compile_bytecodes): Remove forward declaration.
4544 (is_goto_target): Move to ax.c.
4545 (compile_bytecodes): Move to ax.c and call
4546 agent_get_trace_state_variable_value (...) and
4547 agent_set_trace_state_variable_value (...).
4548
4549 * Makefile.in: Update ax.c and IPA dependencies.
4550
277e4e52
PA
45512012-02-24 Pedro Alves <palves@redhat.com>
4552
4553 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4554 (cmd_bigqtbuffer_circular): ... this. Only handle
4555 'QTBuffer:circular:'.
4556 (handle_tracepoint_general_set): Adjust.
4557
bf4c19f7
YQ
45582012-02-16 Yao Qi <yao@codesourcery.com>
4559
4560 * inferiors.c: Move code to ...
4561 * dll.c: .... here. New.
4562 * server.h: Declare clear_dlls.
4563 * Makefile.in (SFILES): Add dll.c.
4564 (OBS): Add dll.o
4565 (dll.o): New rule.
4566
d73f2619
YQ
45672012-02-11 Yao Qi <yao@codesourcery.com>
4568
4569 * server.c: (handle_monitor_command): Add a new parameter
4570 `own_buf'.
4571 (handle_query): Update caller.
4572
f8255c2a
JB
45732012-02-09 Joel Brobecker <brobecker@adacore.com>
4574
4575 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4576 * configure, config.in: Regenerate.
4577 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4578 is not defined.
4579
da84f473
PA
45802012-02-02 Pedro Alves <palves@redhat.com>
4581
4582 Try SIGKILL first, then PTRACE_KILL.
4583 * linux-low.c (linux_kill_one_lwp): New.
4584 (linux_kill_one_lwp): Rename to ...
4585 (kill_one_lwp_callback): ... this. Use the new
4586 linux_kill_one_lwp.
4587
e886a173
PA
45882012-02-02 Pedro Alves <palves@redhat.com>
4589
4590 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4591 inferior.
4592
be07f1a2
PA
45932012-01-27 Pedro Alves <palves@redhat.com>
4594
4595 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4596 (elf_64_file_p): Make static.
4597 (linux_pid_exe_is_elf_64_file): New.
4598 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4599 Delete declarations.
4600 (linux_pid_exe_is_elf_64_file): Declare.
4601 * linux-x86-low.c (x86_arch_setup): Use
4602 linux_pid_exe_is_elf_64_file.
4603
d8301ad1
JK
46042012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4605
4606 * linux-low.c (linux_wait_for_event_1): Rename to ...
4607 (linux_wait_for_event): ... here and merge it with former
4608 linux_wait_for_event - new variable wait_ptid, use it.
4609 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4610
01b17894
PA
46112012-01-23 Pedro Alves <palves@redhat.com>
4612
4613 * server.c (main): Avoid yet another case of infinite loop while
4614 detaching/killing after a longjmp.
4615
e825046f
JK
46162012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4617
4618 Code cleanup.
4619 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4620
b9e7b9c3
UW
46212012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4622
4623 * hostio.c (handle_readlink): New function.
4624 (handle_vFile): Call it to handle "vFile:readlink" packets.
4625
901f9912
UW
46262012-01-20 Pedro Alves <palves@redhat.com>
4627 Ulrich Weigand <ulrich.weigand@linaro.org>
4628
4629 * server.c (handle_v_requests): Only support vAttach and vRun to
4630 start multiple processes when in extended protocol mode.
4631
fc1ab1a0
PA
46322012-01-17 Pedro Alves <palves@redhat.com>
4633
4634 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4635 memalign plus mprotect to allocate the scratch buffer.
4636
7d5d4e98
PA
46372012-01-13 Pedro Alves <palves@redhat.com>
4638
4639 * server.c (attach_inferior): Clear `cont_thread'.
4640
f128d5e9
PA
46412012-01-13 Pedro Alves <palves@redhat.com>
4642
4643 * server.c (main): Avoid infinite loop while detaching/killing
4644 after a longjmp.
4645
06db92f0
DE
46462012-01-09 Doug Evans <dje@google.com>
4647
4648 * server.c (start_inferior): Set last_ptid in --wrapper case.
4649
32d92999
YQ
46502012-01-06 Yao Qi <yao@codesourcery.com>
4651
4652 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4653 defined.
4654 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4655
5e0a92a9
YQ
46562012-01-04 Yao Qi <yao@codesourcery.com>
4657
4658 * tracepoint.c (cmd_qtdp): Print debug message
4659 for static tracepoint.
4660
ae639e8c
YQ
46612012-01-04 Yao Qi <yao@codesourcery.com>
4662
4663 * tracepoint.c (trace_vdebug): Differentiate debug message
4664 between gdbserver and IPA.
4665
f72429c5
YQ
46662012-01-03 Yao Qi <yao@codesourcery.com>
4667
4668 * tracepoint.c (tracepoint_was_hit): Don't collect for
4669 static tracepoint.
4670
12c3e59c
JB
46712012-01-02 Joel Brobecker <brobecker@adacore.com>
4672
4673 * terminal.h: Reformat copyright header.
4674
67827812
JB
46752012-01-02 Joel Brobecker <brobecker@adacore.com>
4676
4677 * server.c (gdbserver_version): Update copyright year.
4678 * gdbreplay.c (gdbreplay_version): Likewise.
4679
3e52c33d
JK
46802011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4681
4682 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4683
4684 Revert:
4685 2011-12-18 Hui Zhu <teawater@gmail.com>
4686 * linux-low.c (linux_create_inferior): Save return value to ret.
4687
66f1260e
HZ
46882011-12-18 Hui Zhu <teawater@gmail.com>
4689
4690 * linux-low.c (linux_create_inferior): Save return value to ret.
4691
e77616d7
DE
46922011-12-16 Doug Evans <dje@google.com>
4693
e7b06c57
DE
4694 * linux-low.c (linux_create_inferior): If stdio connection,
4695 redirect stdin from /dev/null, stdout to stderr.
4696 * remote-utils.c (remote_is_stdio): New static global.
4697 (remote_connection_is_stdio): New function.
4698 (remote_prepare): Handle stdio connection.
4699 (remote_open): Ditto.
4700 (remote_close): Don't close stdin for stdio connections.
4701 (read_prim,write_prim): New functions. Replace all calls to
4702 read/write to these.
4703 * server.c (main): Watch for "-" argument. Move call to
4704 remote_prepare before start_inferior.
4705 * server.h (STDIO_CONNECTION_NAME): New macro.
4706 (remote_connection_is_stdio): Declare.
4707
e77616d7
DE
4708 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4709 in debugging output.
4710
82067193
YQ
47112011-12-15 Yao Qi <yao@codesourcery.com>
4712
4713 * tracepoint.c: Include sys/syscall.h.
4714 (gdb_ust_thread): Remove preprocessor conditional.
4715
82bfbe7e
PA
47162011-12-14 Pedro Alves <pedro@codesourcery.com>
4717
4718 * linux-low.c (linux_detach_one_lwp): Call
4719 the_low_target.prepare_to_resume before detaching.
4720
712c6575
YQ
47212011-12-14 Yao Qi <yao@codesourcery.com>
4722
4723 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4724 of write.
4725
d54d1edf
YQ
47262011-12-14 Yao Qi <yao@codesourcery.com>
4727
4728 * i386-low.c (i386_low_stopped_data_address): Initialize local
4729 variable `control'.
4730
6210a125
PA
47312011-12-13 Pedro Alves <pedro@codesourcery.com>
4732
4733 PR remote/13492
4734
4735 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4736 DR_CONTROL unless necessary. Extend comments.
4737 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4738 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4739
2ece8244
YQ
47402011-12-13 Yao Qi <yao@codesourcery.com>
4741
4742 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4743 macros.
4744 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4745
784867a5
JK
47462011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4747
4748 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4749 Print new debug message for such case.
4750
6bf36717
JK
47512011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4752
4753 Fix overlapping memcpy.
4754 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4755 the read_inferior_memory transfer.
4756 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4757 write_inferior_memory transfer.
4758 (set_fast_tracepoint_jump): New variable buf. Use it for the
4759 read_inferior_memory and write_inferior_memory transfers.
4760 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4761 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4762 Use it for the write_inferior_memory transfer.
4763 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4764 buffers.
4765
50275556
MR
47662011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4767
4768 * linux-low.c (fetch_register, store_register): Make code
4769 consistent, fix formatting.
4770
7325beb4
MR
47712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4772
4773 * linux-low.c (usr_store_inferior_registers): Factor out code
4774 to handle individual registers into...
4775 (store_register): ... this new function.
4776
c642a434
UW
47772011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4778
4779 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4780 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4781 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4782 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4783 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4784 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4785 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4786 (srv_xmlfiles): Add new XML files.
4787
4788 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4789 and <sys/uio.h>.
4790 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4791 (init_registers_s390_linux32v1): Add prototype.
4792 (init_registers_s390_linux32v2): Likewise.
4793 (init_registers_s390_linux64v1): Likewise.
4794 (init_registers_s390_linux64v2): Likewise.
4795 (init_registers_s390x_linux64v1): Likewise.
4796 (init_registers_s390x_linux64v2): Likewise.
4797 (s390_num_regs): Increment to 52.
4798 (s390_regmap): Add orig_r2 register.
4799 (s390_num_regs_3264): Increment to 68.
4800 (s390_regmap_3264): Add orig_r2 register.
4801 (s390_collect_ptrace_register): Handle orig_r2 register.
4802 (s390_supply_ptrace_register): Likewise.
4803 (s390_fill_last_break): New function.
4804 (s390_store_last_break): Likewise.
4805 (s390_fill_system_call): New function.
4806 (s390_store_system_call): Likewise.
4807 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4808 register sets.
4809 (s390_check_regset): New function.
4810 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4811 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4812 Update target_regsets for available register sets.
4813
2268b414
JK
48142011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4815 Jan Kratochvil <jan.kratochvil@redhat.com>
4816
4817 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4818 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4819 New.
4820 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4821 * linux-low.h (struct process_info_private): New member r_debug.
4822 * server.c (handle_qxfer_libraries): Call
4823 the_target->qxfer_libraries_svr4.
4824 (handle_qxfer_libraries_svr4): New function.
4825 (qxfer_packets): New entry "libraries-svr4".
4826 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4827 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4828 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4829 PACKET_qXfer_libraries_svr4.
4830
d6db1fab
UW
48312011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4832
4833 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4834 PSW address/mask between 8-byte and 16-byte formats.
4835 (s390_supply_ptrace_register): Likewise.
4836 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4837 basic addressing mode bit.
4838
242f5f1c
SS
48392011-11-24 Stan Shebs <stan@codesourcery.com>
4840
4841 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4842
f196051f
SS
48432011-11-17 Stan Shebs <stan@codesourcery.com>
4844
4845 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4846 (tracing_start_time): New global.
4847 (tracing_stop_time): New global.
4848 (tracing_user_name): New global.
4849 (tracing_notes): New global.
4850 (tracing_stop_note): New global.
4851 (cmd_qtstart): Set traceframe_usage, start_time.
4852 (stop_tracing): Set stop_time.
4853 (cmd_qtstatus): Report additional status.
4854 (cmd_qtp): New function.
4855 (handle_tracepoint_query): Call it.
4856 (cmd_qtnotes): New function.
4857 (handle_tracepoint_general_set): Call it.
4858 (get_timestamp): Rename from tsv_get_timestamp.
4859
405f8e94
SS
48602011-11-14 Stan Shebs <stan@codesourcery.com>
4861 Kwok Cheung Yeung <kcy@codesourcery.com>
4862
4863 * linux-x86-low.c (small_jump_insn): New.
4864 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4865 trampoline and error message, build a trampoline and issue a small
4866 jump instruction to it.
4867 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4868 trampoline and error message.
4869 (x86_get_min_fast_tracepoint_insn_len): New.
4870 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4871 * linux-low.h (struct linux_target_ops): Add arguments to
4872 install_fast_tracepoint_jump_pad operation, add new operation.
4873 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4874 arguments.
4875 (linux_get_min_fast_tracepoint_insn_len): New function.
4876 (linux_target_op): Add new operation.
4877 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4878 (gdb_trampoline_buffer_end): Ditto.
4879 (gdb_trampoline_buffer_error): Ditto.
4880 (struct ipa_sym_addresses): Add fields for new IPA variables.
4881 (symbol_list): Add entries for new IPA variables.
4882 (struct tracepoint): Add fields to hold the address range of the
4883 trampoline used by the tracepoint.
4884 (trampoline_buffer_head): New static variable.
4885 (trampoline_buffer_tail): Ditto.
4886 (claim_trampoline_space): New function.
4887 (have_fast_tracepoint_trampoline_buffer): New function.
4888 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4889 structure.
4890 (install_fast_tracepoint): Ditto, also add error buffer argument.
4891 (cmd_qtminftpilen): New function.
4892 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4893 (fast_tracepoint_from_trampoline_address): New function.
4894 (fast_tracepoint_collecting): Handle trampoline as part of jump
4895 pad space.
4896 (set_trampoline_buffer_space): New function.
4897 (initialize_tracepoint): Initialize new IPA variables.
4898 * target.h (struct target_ops): Add arguments to
4899 install_fast_tracepoint_jump_pad operation, add new
4900 get_min_fast_tracepoint_insn_len operation.
4901 (target_get_min_fast_tracepoint_insn_len): New.
4902 (install_fast_tracepoint_jump_pad): Add arguments.
4903 * server.h (IPA_BUFSIZ): Define.
4904 * linux-i386-ipa.c: Include extra header files.
4905 (initialize_fast_tracepoint_trampoline_buffer): New function.
4906 (initialize_low_tracepoint): Call it.
4907 * server.h (set_trampoline_buffer_space): Declare.
4908 (claim_trampoline_space): Ditto.
4909 (have_fast_tracepoint_trampoline_buffer): Ditto.
4910
1e4d1764
YQ
49112011-11-14 Yao Qi <yao@codesourcery.com>
4912
4913 * server.c (handle_query): Handle InstallInTrace for qSupported.
4914 * tracepoint.c (add_tracepoint): Sort list.
4915 (install_tracepoint, download_tracepoint): New.
4916 (cmd_qtdp): Call them to install and download tracepoints.
4917 (sort_tracepoints): Removed.
4918 (cmd_qtstart): Update.
4919
5c73ff4e
YQ
49202011-11-14 Yao Qi <yao@codesourcery.com>
4921
4922 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4923 * mem-break.h: Declare.
4924 * tracepoint.c (cmd_qtstart): Move some code to ...
4925 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4926 New.
4927 (download_tracepoints): Move some code to ...
4928 (download_tracepoint_1): ... here. New.
4929
86a30030
YQ
49302011-11-08 Yao Qi <yao@codesourcery.com>
4931
4932 * remote-utils.c (relocate_instruction): A comment fix.
4933
8d26e50c
JB
49342011-11-07 Joel Brobecker <brobecker@adacore.com>
4935
4936 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4937 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4938 dr_status_mirror and dr_control_mirror from debug_reg_state.
4939 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4940 (i386_initial_stuff): Remove use of deleted globals.
4941 (i386_get_thread_context, i386_set_thread_context,
4942 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4943 from debug_reg_state.
4944
a59306a3
YQ
49452011-11-05 Yao Qi <yao@codesourcery.com>
4946
4947 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4948 address as TPOINT's.
4949
3065dfb6
SS
49502011-11-02 Stan Shebs <stan@codesourcery.com>
4951
4952 * tracepoint.c (agent_mem_read_string): New function.
4953 (eval_agent_expr): Call it for tracenz.
4954 * server.c (handle_query): Report support for tracenz.
4955
fd0d8c7c
YQ
49562011-11-02 Yao Qi <yao@codesourcery.com>
4957
4958 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4959
609086b1
YQ
49602011-11-02 Yao Qi <yao@codesourcery.com>
4961
4962 * target.h: Fix a typo in comment.
4963
b9fd1791
PA
49642011-10-31 Pedro Alves <pedro@codesourcery.com>
4965
4966 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4967 clobber the breakpoints' shadows with fast tracepoint jumps.
4968 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4969 * target.c (write_inferior_memory): Also pass MYADDR down to
4970 check_mem_write.
4971
03583c20
UW
49722011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4973
4974 * configure.ac: Check support for personality routine.
4975 * configure: Regenerate.
4976 * config.in: Likewise.
4977 * linux-low.c: Include <sys/personality.h>.
4978 Define ADDR_NO_RANDOMIZE if necessary.
4979 (linux_create_inferior): Disable address space randomization when
4980 forking inferior, if requested.
4981 (linux_supports_disable_randomization): New function.
4982 (linux_target_ops): Install it.
4983 * server.h (disable_randomization): Declare.
4984 * server.c (disable_randomization): New global variable.
4985 (handle_general_set): Handle QDisableRandomization.
4986 (handle_query): Likewise for qSupported.
4987 (main): Support --disable-randomization and --no-disable-randomization
4988 command line arguments.
4989 * target.h (struct target_ops): Add supports_disable_randomization.
4990 (target_supports_disable_randomization): New macro.
4991
723b724b
MF
49922011-09-29 Mike Frysinger <vapier@gentoo.org>
4993
4994 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4995 ifdef check.
4996 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4997 [!PT_GETDSBT] (target_loadmap): New definition.
4998 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4999 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5000 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5001 and PT_GETDSBT to LINUX_LOADMAP.
5002 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5003 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5004
55329a5c 50052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5006
5007 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5008 (arm_linux_hwbp_cap): New static variable.
5009 (arm_linux_get_hwbp_cap): Replace by ...
5010 (arm_linux_init_hwbp_cap): ... this new function.
5011 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5012 (arm_linux_get_hw_watchpoint_count): Likewise.
5013 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5014 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5015 (arm_prepare_to_resume): Use perror_with_name instead of error.
5016
55329a5c 50172011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5018
5019 * linux-arm-low.c: Include <signal.h>.
5020 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5021 (struct arm_linux_hwbp_cap): New data type.
5022 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5023 (struct arm_linux_hw_breakpoint): New data type.
5024 (MAX_BPTS, MAX_WPTS): Define.
5025 (struct arch_process_info, struct arch_lwp_info): New data types.
5026 (arm_linux_get_hwbp_cap): New function.
5027 (arm_linux_get_hw_breakpoint_count): Likewise.
5028 (arm_linux_get_hw_watchpoint_count): Likewise.
5029 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5030 (arm_hwbp_control_initialize): Likewise.
5031 (arm_hwbp_control_is_enabled): Likewise.
5032 (arm_hwbp_control_is_initialized): Likewise.
5033 (arm_hwbp_control_disable): Likewise.
5034 (arm_linux_hw_breakpoint_equal): Likewise.
5035 (arm_linux_hw_point_initialize): Likewise.
5036 (struct update_registers_data): New data structure.
5037 (update_registers_callback: New function.
5038 (arm_insert_point): Likewise.
5039 (arm_remove_point): Likewise.
5040 (arm_stopped_by_watchpoint): Likewise.
5041 (arm_stopped_data_address): Likewise.
5042 (arm_new_process): Likewise.
5043 (arm_new_thread): Likewise.
5044 (arm_prepare_to_resume): Likewise.
5045 (the_low_target): Register arm_insert_point, arm_remove_point,
5046 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5047 arm_new_thread, and arm_prepare_to_resume.
5048
6b9801d4
SS
50492011-09-15 Stan Shebs <stan@codesourcery.com>
5050
5051 * server.h (struct emit_ops): Add compare-goto fields.
5052 * tracepoint.c (gdb_agent_op_sizes): New table.
5053 (emit_eq_goto): New function.
5054 (emit_ne_goto): New function.
5055 (emit_lt_goto): New function.
5056 (emit_le_goto): New function.
5057 (emit_gt_goto): New function.
5058 (emit_ge_goto): New function.
5059 (is_goto_target): New function.
5060 (compile_bytecodes): Recognize special cases of compare-goto
5061 combinations and call specialized emitters for them.
5062 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5063 (amd64_emit_ne_goto): New function.
5064 (amd64_emit_lt_goto): New function.
5065 (amd64_emit_le_goto): New function.
5066 (amd64_emit_gt_goto): New function.
5067 (amd64_emit_ge_goto): New function.
5068 (amd64_emit_ops): Add the new functions.
5069 (i386_emit_eq_goto): New function.
5070 (i386_emit_ne_goto): New function.
5071 (i386_emit_lt_goto): New function.
5072 (i386_emit_le_goto): New function.
5073 (i386_emit_gt_goto): New function.
5074 (i386_emit_ge_goto): New function.
5075 (i386_emit_ops): Add the new functions.
5076
bf15cbda
SS
50772011-09-08 Stan Shebs <stan@codesourcery.com>
5078
5079 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5080 (i386_emit_epilogue): Restore %ebx.
5081
943ca1dd
JZ
50822011-08-31 Jie Zhang <jzhang918@gmail.com>
5083
5084 * server.c (step_thread): Remove definition.
5085 (process_serial_event): Don't handle Hs.
5086 * server.h (step_thread): Remove declaration.
5087 * target.c (set_desired_inferior): Remove use of step_thread.
5088
e3deef73
LM
50892011-08-24 Luis Machado <lgustavo@codesourcery.com>
5090
5091 * linux-low.c: Include linux-procfs.h.
5092 (linux_attach_lwp_1): Update comments.
5093 (linux_attach): Scan for existing threads when attaching to a
5094 process that is the tgid.
5095 * Makefile.in: Update dependencies.
5096
13da1c97
LM
50972011-08-24 Luis Machado <lgustavo@codesourcery.com>
5098
5099 * configure.srv: Add linux-procfs.o dependencies.
5100
881127c9
YQ
51012011-08-14 Yao Qi <yao@codesourcery.com>
5102
5103 * target.h (struct target_ops): Fix indent.
5104 * win32-low.c (win32_target_ops): Fix comment.
5105
58dbd541
YQ
51062011-08-14 Andrew Jenner <andrew@codesourcery.com>
5107 Yao Qi <yao@codesourcery.com>
5108
5109 * Makefile.in (clean): Remove tic6x-*.c files.
5110 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5111 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5112 (tic6x-c64xp-linux.c): Likewise.
5113 * configure.srv: Add support for tic6x-*-uclinux.
5114 * linux-tic6x-low.c: New.
5115 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5116
78d85199
YQ
51172011-08-14 Andrew Stubbs <ams@codesourcery.com>
5118 Yao Qi <yao@codesourcery.com>
5119
5120 * target.h (struct target_ops): Add read_loadmap.
5121 * linux-low.c (struct target_loadseg): New type.
5122 (struct target_loadmap): New type.
5123 (linux_read_loadmap): New function.
5124 (linux_target_ops): Add linux_read_loadmap.
5125 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5126 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5127 to NULL.
78d85199 5128
a959a88d
EZ
51292011-08-05 Eli Zaretskii <eliz@gnu.org>
5130
5131 * win32-low.c: Include <stdint.h>.
5132
1ced966e
PA
51332011-07-22 Pedro Alves <pedro@codesourcery.com>
5134
5135 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5136 to the inferior here.
5137 (i386_remove_aligned_watchpoint): Ditto.
5138 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5139 fit part of the watchpoint in the debug registers.
5140 (i386_update_inferior_debug_regs): New.
5141 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5142 registers, and only update the inferior on success.
5143 (i386_low_remove_watchpoint): Ditto.
5144
d26e3629
KY
51452011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5146
5147 * linux-low.c (compare_ints, unique, list_threads, show_process,
5148 linux_core_of_thread): Delete.
5149 (linux_target_ops): Change linux_core_of_thread to
5150 linux_common_core_of_thread.
5151 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5152 * utils.c (malloc_failure): Change type of argument.
5153 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5154 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5155 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5156 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5157 (IPA_OBJS): Add common-utils-ipa.o.
5158 (ptid_h, linux_osdata_h): New macros.
5159 (server_h): Add common/common-utils.h, common/xml-utils.h,
5160 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5161 common/ptid.h.
5162 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5163 ptid.o, buffer.o): New rules.
5164 (linux-low.o): Add common/linux-osdata.h as a dependency.
5165 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5166 * configure.ac: Add AC_HEADER_DIRENT check.
5167 * config.in: Regenerate.
5168 * configure: Regenerate.
5169 * remote-utils.c (xml_escape_text): Delete.
5170 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5171 buffer_xml_printf): Move to common/buffer.c.
5172 * server.c (main): Remove call to initialize_inferiors.
5173 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5174 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5175 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5176 internal_error, gdb_assert, gdb_assert_fail): Delete.
5177 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5178 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5179 common/buffer.h.
5180 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5181 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5182 initialize_inferiors): Delete.
5183
2275a1a7
PA
51842011-07-20 Pedro Alves <pedro@codesourcery.com>
5185
5186 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5187 symbol error.
5188
0a5b1e09
PA
51892011-05-31 Pedro Alves <pedro@codesourcery.com>
5190
5191 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5192 assertion.
5193 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5194
6938fd34
YQ
51952011-05-26 Yao Qi <yao@codesourcery.com>
5196
5197 * Makefile.in (thread-db.o): Track dependence to
5198 common/gdb_thread_db.h.
5199 * thread-db.c: include gdb_thread_db.h from right place.
5200
b481f9e0
TT
52012011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5202
5203 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5204 __FILE__ and __LINE__ to internal_error.
5205
98a5dd13
DE
52062011-05-13 Doug Evans <dje@google.com>
5207
5208 * thread-db.c (try_thread_db_load_from_sdir): New function.
5209 (try_thread_db_load_from_dir): New function.
5210 (thread_db_load_search): Handle $sdir, ignore $pdir.
5211 Remove trying of system directories if search of
5212 libthread-db-search-path fails, that is now done via $sdir.
5213
d248b706
KY
52142011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5215
5216 * server.c (handle_query): Add EnableDisableTracepoints to the list
5217 of supported features.
43aaf8b6 5218 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5219 tracepoints.
43aaf8b6
PA
5220 (cmd_qtenable_disable): New.
5221 (cmd_qtstart): Install tracepoints even if disabled.
5222 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5223 receiving a QTEnable or QTDisable packet.
5224 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5225 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5226 tracepoints.
5227 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5228
84e578fb
DE
52292011-05-10 Doug Evans <dje@google.com>
5230
5231 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5232
71f55dd8
DE
52332011-05-04 Doug Evans <dje@google.com>
5234
5235 * linux-low.c (linux_join): Skip process lookup.
5236 * spu-low.c (spu_join): Ditto.
5237 * server.c (join_inferiors_callback): Delete.
5238 (process_serial_event): For 'D' packet (detach) call join_inferior
5239 directly.
5240
4d393d60
JM
52412011-05-04 Joseph Myers <joseph@codesourcery.com>
5242
5243 * README: Don't mention xscale*-*-linux*.
5244 * configure.srv (xscale*-*-linux*): Don't handle target.
5245
b00ad6ff
NF
52462011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5247
5248 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5249 casting pointers.
5250 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5251 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5252 (i386_emit_void_call_2): Likewise.
5253
af96c192
YQ
52542011-04-26 Yao Qi <yao@codesourcery.com>
5255
43aaf8b6
PA
5256 * linux-low.c: Move common macros to linux-ptrace.h.
5257 Include linux-ptrace.h.
af96c192
YQ
5258 * Makefile.in (linux_ptrace_h): New.
5259 (linux-low.o): Depends on linux-ptrace.h.
5260
03f2bd59
JK
52612011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5262
5263 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5264 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5265 (remote_prepare): New function with most of the TCP code from ...
5266 (remote_open): ... here. Detect PORT here unconditionally. Move also
5267 setting transport_is_reliable.
5268 * server.c (run_once): New variable.
5269 (gdbserver_usage): Document it.
5270 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5271 the first run if RUN_ONCE.
5272 * server.h (run_once, remote_prepare): New declarations.
5273
7a9dd1b2
TT
52742011-04-19 Tom Tromey <tromey@redhat.com>
5275
5276 * win32-low.c (handle_load_dll): Remove duplicate "the".
5277
81239425
PM
52782011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5279
5280 Remove support for old Cygwin 1.5 versions.
5281 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5282 function to avoid warning.
5283 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5284 warning.
5285
9e0627f1
PM
52862011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5287
5288 * gdbserver/server.h (Macro _): Define it if not available.
5289
588eebee
MS
52902011-03-14 Michael Snyder <msnyder@vmware.com>
5291
348af9f7 5292 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5293
43f70d4c
JB
52942011-03-10 Joel Brobecker <brobecker@adacore.com>
5295
5296 * Makefile.in (maintainer-clean realclean distclean): Remove
5297 "make ... subdir_do" command.
5298
348af9f7
MS
52992011-03-10 Michael Snyder <msnyder@vmware.com>
5300
5301 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5302
5303 * server.c (handle_v_run): Free alloced buffer on early return.
5304
e637a4f5
YQ
53052011-03-09 Yao Qi <yao@codesourcery.com>
5306
5307 Revert:
5308 2011-03-04 Yao Qi <yao@codesourcery.com>
5309
5310 * Makefile.in: Remove GNU make feature --directory.
5311
5312 2011-03-05 Yao Qi <yao@codesourcery.com>
5313
5314 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5315 (subdir_do): New make target. Copied from gdb/Makefile.
5316 (maintainer-clean, realclean, distclean, clean): Call corresponding
5317 make targets in common/Makefile.
5318
5319 2011-02-11 Yao Qi <yao@codesourcery.com>
5320
5321 * configure.ac: Call AC_PROG_RANLIB.
5322 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5323 * configure: Regenerate.
5324
e6edda56
JK
53252011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5326
5327 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5328
e5141119
JB
53292011-03-06 Yao Qi <yao@codesourcery.com>
5330
5331 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5332
64794aa4
JB
53332011-03-05 Yao Qi <yao@codesourcery.com>
5334
5335 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5336 (subdir_do): New make target. Copied from gdb/Makefile.
5337 (maintainer-clean, realclean, distclean, clean): Call corresponding
5338 make targets in common/Makefile.
5339
7a762829
YQ
53402011-03-04 Yao Qi <yao@codesourcery.com>
5341
5342 * Makefile.in: Remove GNU make feature --directory.
5343
348af9f7
MS
53442011-03-04 Michael Snyder <msnyder@vmware.com>
5345
5346 * server.c (queue_stop_reply): Call xmalloc not malloc.
5347
53482011-03-02 Michael Snyder <msnyder@vmware.com>
5349
5350 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5351
9f72fee2
MS
53522011-02-28 Michael Snyder <msnyder@vmware.com>
5353
588eebee
MS
5354 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5355 (cmd_qtframe): Ditto.
5356 (cmd_qtbuffer): Ditto.
5357 (cmd_bigqtbuffer): Ditto.
5358
9f72fee2
MS
5359 * utils.c (decimal2str): Initialize 'width' to nine, then
5360 don't mess with it.
5361
8040bd49
UW
53622011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5363
5364 * hostio.c (require_data): Free *data, not data.
5365
7e52cbd0
JK
53662011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5367
5368 * hostio.c (require_data): Use free, not xfree.
5369
9130f83e
MS
53702011-02-27 Michael Snyder <msnyder@vmware.com>
5371
4b812f4e
MS
5372 * server.c (handle_query): Discard unused value.
5373
9130f83e
MS
5374 * hostio.c (require_data): Free malloc memory before returning
5375 error.
5376
69d37113
MS
53772011-02-26 Michael Snyder <msnyder@vmware.com>
5378
5379 * linux-low.c (list_threads): Call closedir for dirent.
5380
35f5825a
MS
53812011-02-27 Michael Snyder <msnyder@vmware.com>
5382
2a589cef
MS
5383 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5384 a case statement falls through.
5385
0adea5f7
MS
5386 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5387
35f5825a
MS
5388 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5389 in comparison.
5390
238f1c74
MS
53912011-02-26 Michael Snyder <msnyder@vmware.com>
5392
5393 * utils.c (decimal2str): Eliminate dead code and dead param.
5394 (pulongest): Drop dead param from call to decimal2str.
5395 (plongest): Ditto.
5396
633ff500
JB
53972011-02-24 Joel Brobecker <brobecker@adacore.com>
5398
5399 Revert the following patch (not approved yet):
5400 2011-02-21 Hui Zhu <teawater@gmail.com>
5401 * tracepoint.c (tp_printf): New function.
5402 (eval_agent_expr): Handle gdb_agent_op_printf.
5403
f9c6ff72
HZ
54042011-02-21 Hui Zhu <teawater@gmail.com>
5405
5406 * tracepoint.c (tp_printf): New function.
5407 (eval_agent_expr): Handle gdb_agent_op_printf.
5408
94d5e490
TT
54092011-02-18 Tom Tromey <tromey@redhat.com>
5410
5411 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5412 (tracepoint.o): Likewise.
5413 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5414 (gdb_agent_op_names): Likewise.
5415
c7f96d2b
TT
54162011-02-18 Tom Tromey <tromey@redhat.com>
5417
5418 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5419 gdb_agent_op_rot>: New constants.
5420 (gdb_agent_op_names): Add pick and roll.
5421 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5422 cases.
5423
0feedb2c
JK
54242011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5425
5426 * aclocal.m4: Regenerated with aclocal-1.11.1.
5427
b3b9301e
PA
54282011-02-14 Pedro Alves <pedro@codesourcery.com>
5429
5430 * server.c (handle_qxfer_traceframe_info): New.
5431 (qxfer_packets): Register "traceframe-info".
5432 (handle_query): Report support for qXfer:traceframe-info:read+.
5433 * tracepoint.c (match_blocktype): New.
5434 (traceframe_find_block_type): Rename to ...
5435 (traceframe_walk_blocks): ... this. Add callback filter argument,
5436 and use it.
5437 (traceframe_find_block_type): New, reimplemented on top of
5438 traceframe_walk_blocks.
5439 (build_traceframe_info_xml): New.
5440 (traceframe_read_info): New.
5441 * server.h (traceframe_read_info): Declare.
5442
4f3e6fb7
YQ
54432011-02-11 Yao Qi <yao@codesourcery.com>
5444
5445 * configure.ac: Call AC_PROG_RANLIB.
5446 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5447 * configure: Regenerate.
5448
764880b7
PA
54492011-02-07 Pedro Alves <pedro@codesourcery.com>
5450
5451 * server.c (gdb_read_memory): Change return semantics to allow
5452 partial transfers.
5453 (handle_search_memory_1): Adjust.
5454 (process_serial_event) <'m' packet>: Handle partial transfers.
5455 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5456
1c79eb8a
PA
54572011-01-28 Pedro Alves <pedro@codesourcery.com>
5458
5459 * regcache.c (init_register_cache): Initialize
5460 regcache->register_status.
5461 (free_register_cache): Release regcache->register_status.
5462 (regcache_cpy): Copy register_status.
5463 (registers_to_string): Print 'x's for unavailable registers.
5464 (supply_register): Mark the register's status valid or
5465 unavailable, depending on whether a buffer was passed in or not.
5466 (supply_register_zeroed): New.
5467 (supply_regblock): Mark the registers' status valid or
5468 unavailable, depending on whether a buffer was passed in or not.
5469 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5470 (struct regcache): New `register_status' field.
5471 (supply_register_zeroed): Declare.
5472 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5473 supply_register_zeroed, rather than passing a NULL buffer to
5474 supply_register.
5475 * tracepoint.c (fetch_traceframe_registers): Update comment.
5476
85724a0e
PA
54772011-01-28 Pedro Alves <pedro@codesourcery.com>
5478
5479 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5480 buffer explicit.
5481
d08aafef
PA
54822011-01-25 Pedro Alves <pedro@codesourcery.com>
5483
5484 * server.h (decode_xfer_write): Change prototype.
5485 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5486 and don't extract the annex here.
5487 * server.c (decode_xfer_read): Remove `annex' parameter,
5488 and don't extract the annex here.
5489 (decode_xfer): New.
5490 (struct qxfer): New.
5491 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5492 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5493 (handle_qxfer_statictrace): New functions, abstracted out from
5494 handle_query, and made to use the struct qxfer interface.
5495 (handle_threads_qxfer_proper): Rename to ...
5496 (handle_qxfer_threads_proper): ... this.
5497 (handle_threads_qxfer): Rename to ...
5498 (handle_qxfer_threads): ... this. Adjust.
5499 (qxfer_packets): New array.
5500 (handle_qxfer): New function.
5501 (handle_query): Use handle_qxfer.
5502
493e2a69
MS
55032011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5504
5505 * gdbreplay.c: Shorten lines of >= 80 columns.
5506 * linux-low.c: Ditto.
5507 * linux-ppc-low.c: Ditto.
5508 * linux-s390-low.c: Ditto.
5509 * linux-sparc-low.c: Ditto.
5510 * linux-x86-low.c: Ditto.
5511 * linux-xtensa-low.c: Ditto.
5512 * mem-break.c: Ditto.
5513 * nto-low.c: Ditto.
5514 * regcache.h: Ditto.
5515 * remote-utils.c: Ditto.
5516 * server.c: Ditto.
5517 * server.h: Ditto.
5518 * thread-db.c: Ditto.
5519 * tracepoint.c: Ditto.
5520 * utils.c: Ditto.
5521 * win32-low.h: Ditto.
5522
44944448
JB
55232011-01-05 Joel Brobecker <brobecker@adacore.com>
5524
5525 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5526 update.
5527
71ce852c
JB
55282011-01-01 Joel Brobecker <brobecker@adacore.com>
5529
5530 * server.c (gdbserver_version): Update copyright year in version
5531 output.
5532 * gdbreplay.c (gdbreplay_version): Ditto.
5533
eb826dc6
MF
55342010-12-29 Jie Zhang <jie.zhang@analog.com>
5535
5536 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5537 * linux-bfin-low.c: New file.
5538 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5539 PT_DATA_ADDR for BFIN targets.
5540 * Makefile.in (SFILES): Add linux-bfin-low.c.
5541 (clean): Remove reg-bfin.c.
5542 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5543 * README: Mention supported Blackfin targets.
5544
39ab222a
MF
55452010-12-23 Mike Frysinger <vapier@gentoo.org>
5546
5547 * .gitignore: New file.
5548
a1f2ce7d
MF
55492010-11-16 Mike Frysinger <vapier@gentoo.org>
5550
5551 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5552
f474844c
JZ
55532010-10-22 Jie Zhang <jie@codesourcery.com>
5554
5555 * Makefile.in: Add FLAGS_TO_PASS variable.
5556 (install): Remove dependency of install-only and recursively
5557 invoke make for install-only.
5558
f1048712
DE
55592010-10-04 Doug Evans <dje@google.com>
5560
5561 * Makefile.in (uninstall): Use $(DESTDIR).
5562
b53a1623
PA
55632010-09-24 Pedro Alves <pedro@codesourcery.com>
5564
e6ee044d
PA
5565 PR gdb/11842
5566
b53a1623
PA
5567 * linux-x86-low.c (compat_siginfo_from_siginfo)
5568 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5569 si_code is < 0. Check for si_code == SI_TIMER before checking for
5570 si_code < 0.
5571
fa1bd1e4
JB
55722010-09-13 Joel Brobecker <brobecker@adacore.com>
5573
5574 * lynx-i386-low.c: New file.
5575 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5576
47fac8f8
JB
55772010-09-13 Joel Brobecker <brobecker@adacore.com>
5578
5579 * lynx-low.c (ptrace_request_to_str): Remove handling for
5580 request values that have been removed in LynxOS 5.x.
5581
1adfc54d
JB
55822010-09-13 Joel Brobecker <brobecker@adacore.com>
5583
5584 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5585 <ptrace.h>
5586
c2a66c29
NS
55872010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5588
5589 * configure.ac: Add --enable-inprocess-agent option.
5590 * configure: Rebuilt.
5591
32fcada3
YQ
55922010-09-06 Yao Qi <yao@codesourcery.com>
5593
5594 * linux-low.c (linux_kill): Remove unused variable.
5595 (linux_stabilize_threads): Likewise.
5596 * server.c (start_inferior): Likewise.
5597 (queue_stop_reply_callback): Likewise.
5598 * tracepoint.c (do_action_at_tracepoint): Likewise.
5599
0cccb683
YQ
56002010-09-06 Yao Qi <yao@codesourcery.com>
5601
5602 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5603 on return.
5604
423ec54c
JK
56052010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5606
5607 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5608
12ac6819
PA
56092010-09-06 Pedro Alves <pedro@codesourcery.com>
5610
5611 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5612 "$(IPA_DEPFILES)".
5613
8ed54b31
JB
56142010-09-01 Joel Brobecker <brobecker@adacore.com>
5615
5616 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5617 gdbserver/lynx-ppc-low.c: New files.
5618 * Makefile.in (lynx_low_h): New variable.
5619 (lynx-low.o, lynx-ppc-low.o): New rules.
5620 * configure.ac: On LynxOS, link with -lnetinet.
5621 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5622 * configure: regenerate.
5623
bb0116a4
JB
56242010-09-01 Joel Brobecker <brobecker@adacore.com>
5625
5626 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5627 * configure.ac: Add check for vasprintf and vsnprintf.
5628 * configure, config.in: Regenerate.
5629 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5630
a778ab81 56312010-09-01 Joel Brobecker <brobecker@adacore.com>
5632
5633 * gdbreplay.c: Move include of alloca.h up, next to include of
5634 malloc.h.
5635 * server.h: Add include of malloc.h.
5636 * mem-break.c: Remove include of malloc.h.
5637 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5638
8b034a19 56392010-09-01 Joel Brobecker <brobecker@adacore.com>
5640
5641 * Makefile.in (memmem.o): Build with -Wno-error.
5642
56432010-09-01 Joel Brobecker <brobecker@adacore.com>
5644
5645 * utils.c (xsnprintf): Make non-static.
5646 * server.h: Add xsnprintf declaration.
5647 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5648 replace calls to snprintf by calls to xsnprintf throughout.
5649
56502010-09-01 Joel Brobecker <brobecker@adacore.com>
5651
5652 * configure.ac: Add configure check for alloca.
5653 * configure, config.in: Regenerate.
5654 * server.h: Include alloca.h if it exists.
5655 * gdbreplay.c: Include alloca.h if it exists.
5656
1a981360
PA
56572010-08-28 Pedro Alves <pedro@codesourcery.com>
5658
5659 * linux-low.c (__SIGRTMIN): Define if not already defined.
5660 (linux_create_inferior): Check for __ANDROID__ rather than
5661 __SIGRTMIN.
5662 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5663 are already deferred.
5664 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5665 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5666 stopped and already has a pending signal to report.
5667 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5668 a pending signal to report or is moving out of a jump pad.
5669 (linux_init_signals): Check for __ANDROID__ rather than
5670 __SIGRTMIN.
5671
b4d51a55
PA
56722010-08-28 Pedro Alves <pedro@codesourcery.com>
5673
5674 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5675 debug_threads check. Avoid a linear search when not doing debug
5676 output.
5677
ec48365d
PA
56782010-08-27 Pedro Alves <pedro@codesourcery.com>
5679
5680 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5681 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5682 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5683 (process_event): Change local fd's type to gdb_fildes_t.
5684 (create_file_handler): Adjust prototype.
5685 (delete_file_handler): Adjust prototype.
5686 (handle_file_event): Adjust prototype. Use pfildes.
5687 (create_file_event): Adjsut prototype.
5688 * remote-utils.c (remote_desc, listen_desc): Change type to
5689 gdb_fildes_t.
5690 * server.h: New gdb_fildes_t typedef.
5691 [USE_WIN32API]: Include winsock2.h.
5692 (delete_file_handler, add_file_handler): Adjust prototypes.
5693 (pfildes): Declare.
5694 * utils.c (pfildes): New.
5695
854d88f0
PA
56962010-08-27 Pedro Alves <pedro@codesourcery.com>
5697
5698 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5699 * configure: Regenerate.
5700
0146f85b
PA
57012010-08-27 Pedro Alves <pedro@codesourcery.com>
5702
5703 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5704 (linux_done_accessing_memory): ... this.
5705 (linux_target_ops): Adjust.
5706 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5707 * nto-low.c (nto_target_ops): Adjust comment.
5708 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5709 * spu-low.c (spu_target_ops): Adjust comment.
5710 * target.h (target_ops): Rename unprepare_to_access_memory field
5711 to done_accessing_memory.
5712 (unprepare_to_access_memory): Rename to ...
5713 (done_accessing_memory): ... this.
5714
90d74c30
PA
57152010-08-26 Pedro Alves <pedro@codesourcery.com>
5716
5717 * linux-low.c (linux_prepare_to_access_memory): New.
5718 (linux_unprepare_to_access_memory): New.
5719 (linux_target_ops): Install them.
5720 * server.c (read_memory): Rename to ...
5721 (gdb_read_memory): ... this. Use
5722 prepare_to_access_memory/prepare_to_access_memory.
5723 (write_memory): Rename to ...
5724 (gdb_write_memory): ... this. Use
5725 prepare_to_access_memory/prepare_to_access_memory.
5726 (handle_search_memory_1): Adjust.
5727 (process_serial_event): Adjust.
5728 * target.h (struct target_ops): New fields
5729 prepare_to_access_memory and unprepare_to_access_memory.
5730 (prepare_to_access_memory, unprepare_to_access_memory): New.
5731 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5732 prepare_to_access_memory/prepare_to_access_memory.
5733 * nto-low.c (nto_target_ops): Adjust.
5734 * spu-low.c (spu_target_ops): Adjust.
5735 * win32-low.c (win32_target_ops): Adjust.
5736
fd467969
PA
57372010-08-26 Pedro Alves <pedro@codesourcery.com>
5738
5739 * Makefile.in (WARN_CFLAGS): Get it from configure.
5740 (WERROR_CFLAGS): New.
5741 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5742 * configure.ac: Introduce --enable-werror, which adds -Werror to
5743 the compiler command line. Enabled by default. Disable with
5744 --disable-werror. Add -Wdeclaration-after-statement
5745 Wpointer-arith and -Wformat-nonliteral to warning flags.
5746 * configure: Regenerate.
5747
331e2f5f
PA
57482010-08-26 Pedro Alves <pedro@codesourcery.com>
5749
5750 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5751
e581f2b4
PA
57522010-08-26 Pedro Alves <pedro@codesourcery.com>
5753
5754 * gdbreplay.c (remote_error): New.
5755 (gdbchar): New.
5756 (expect): Use gdbchar. Check for error reading from GDB.
5757 Clarify sync error output.
5758 (play): Check for errors writing to GDB.
5759 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5760 * remote-utils.c (getpkt): Check for errors writing to the remote
5761 descriptor.
5762
3c11dd79
PA
57632010-08-25 Pedro Alves <pedro@codesourcery.com>
5764
5765 * linux-low.c (linux_wait_1): Move non-debugging code out of
5766 `debug_threads' control.
5767
d20a8ad9
PA
57682010-08-25 Pedro Alves <pedro@codesourcery.com>
5769
5770 * linux-low.c (linux_wait_1): Don't set last_status here.
5771 * server.c (push_event, queue_stop_reply_callback): Assert we're
5772 not pushing a TARGET_WAITKIND_IGNORE event.
5773 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5774 (myresume, handle_target_event): Set the thread's last_resume_kind
5775 and last_status from the target returned status.
5776
964e4306
PA
57772010-08-25 Pedro Alves <pedro@codesourcery.com>
5778
5779 PR threads/10729
5780
5781 * linux-x86-low.c (update_debug_registers_callback): New.
5782 (i386_dr_low_set_addr): Use it.
5783 (i386_dr_low_get_addr): New.
5784 (i386_dr_low_set_control): Use update_debug_registers_callback.
5785 (i386_dr_low_get_control): New.
5786 (i386_dr_low_get_status): Adjust.
5787 * linux-low.c (linux_stop_lwp): New.
5788 * linux-low.h (linux_stop_lwp): Declare.
5789
5790 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5791 argument instead of a i386_debug_reg_state.
5792 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5793 a i386_debug_reg_state.
5794 (i386_insert_aligned_watchpoint): Adjust.
5795 (i386_remove_aligned_watchpoint): Adjust.
5796 (i386_low_stopped_data_address): Read the debug registers from the
5797 inferior instead of from the mirrors.
5798 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5799 (i386_dr_low_get_addr): Declare.
5800 (i386_dr_low_get_control): Declare.
5801 (i386_dr_low_get_status): Change prototype.
5802
5803 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5804 (i386_dr_low_get_addr): New.
5805 (i386_dr_low_get_control): New.
5806 (i386_dr_low_get_status): Adjust prototype. Return
5807 dr_status_mirror.
5808 (i386_initial_stuff): Clear dr_status_mirror and
5809 dr_control_mirror.
5810 (i386_get_thread_context): Adjust.
5811 (i386_set_thread_context): Adjust.
5812 (i386_thread_added): Adjust.
5813
5f21a75b
PA
58142010-08-24 Pedro Alves <pedro@codesourcery.com>
5815
5816 * linux-low.h (linux_thread_area): Delete declaration.
5817
3e4c1235
TS
58182010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5819
5820 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5821 after its termination.
5822
1971b033
PA
58232010-08-09 Pedro Alves <pedro@codesourcery.com>
5824
5825 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5826 (gdb_wants_all_stopped): Delete.
5827 (linux_wait_1): Don't call them.
5828 * server.c (handle_v_cont): Tag all threads as want-stopped.
5829 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5830 stopped as "client-wants-stopped".
5831
310444ac
PA
58322010-07-31 Pedro Alves <pedro@codesourcery.com>
5833
5834 * Makefile.in (signals_h): New.
5835 (server_h): Depend on it.
5836 (server.o): Don't depend on $(signals_def).
5837 (signals.o): Depend on $(signals_def).
5838
a19cae16
JK
58392010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5840
5841 * Makefile.in (signals_def): New.
5842 (server_h): Append include/gdb/signals.h and signals_def.
5843 (server.o): Append signals_def.
5844
30d50328
JK
58452010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5846
5847 * server.c (handle_target_event): Use target_signal_to_host for
5848 resume_info.sig initialization.
5849 * target.h (struct thread_resume) <sig>: New comment.
5850
5c3216e2
OS
58512010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5852
c6f46ca0
OS
5853 * server.c (handle_query): strcpy() the returned string from paddress()
5854 instead of sprintf().
5c3216e2
OS
5855 * utils.c (paddress): Return phex_nz().
5856
6bd31874
JB
58572010-07-07 Joel Brobecker <brobecker@adacore.com>
5858
5859 * server.c (handle_v_cont): Call mourn_inferior if process
5860 just exited.
5861 (myresume): Likewise.
5862
0fb4aa4b
PA
58632010-07-01 Pedro Alves <pedro@codesourcery.com>
5864
5865 Static tracepoints, and integration with UST.
5866
5867 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5868 * mem-break.c (uninsert_all_breakpoints)
5869 (reinsert_all_breakpoints): New.
5870 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5871 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5872 (gdb_agent_ust_loaded, helper_thread_id)
5873 (gdb_agent_helper_thread_id): New macros.
5874 (struct ipa_sym_addresses): Add addr_ust_loaded,
5875 addr_helper_thread_id, addr_cmd_buf.
5876 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5877 (in_process_agent_loaded_ust): New.
5878 (write_e_ust_not_loaded): New.
5879 (maybe_write_ipa_ust_not_loaded): New.
5880 (struct collect_static_trace_data_action): New.
5881 (enum tracepoint_type) <static_tracepoint>: New.
5882 (struct tracepoint) <handle>: Mention static tracepoints.
5883 (struct static_tracepoint_ctx): New.
5884 (CMD_BUF_SIZE): New.
5885 (add_tracepoint_action): Handle static tracepoint actions.
5886 (unprobe_marker_at): New.
5887 (clear_installed_tracepoints): Handle static tracepoints.
5888 (cmd_qtdp): Handle static tracepoints.
5889 (probe_marker_at): New.
5890 (cmd_qtstart): Handle static tracepoints.
5891 (response_tracepoint): Handle static tracepoints.
5892 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5893 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5894 (get_context_regcache): Handle static tracepoints.
5895 (do_action_at_tracepoint): Handle static tracepoint actions.
5896 (traceframe_find_block_type): Handle static trace data blocks.
5897 (traceframe_read_sdata): New.
5898 (download_tracepoints): Download static tracepoint actions.
5899 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5900 (GDB_PROBE_NAME): New.
5901 (ust_ops): New.
5902 (GET_UST_SYM): New.
5903 (USTF): New.
5904 (dlsym_ust): New.
5905 (ust_marker_to_static_tracepoint): New.
5906 (gdb_probe): New.
5907 (collect_ust_data_at_tracepoint): New.
5908 (gdb_ust_probe): New.
5909 (UNIX_PATH_MAX, SOCK_DIR): New.
5910 (gdb_ust_connect_sync_socket): New.
5911 (resume_thread, stop_thread): New.
5912 (run_inferior_command): New.
5913 (init_named_socket): New.
5914 (gdb_ust_socket_init): New.
5915 (cstr_to_hexstr): New.
5916 (next_st): New.
5917 (first_marker, next_marker): New.
5918 (response_ust_marker): New.
5919 (cmd_qtfstm, cmd_qtsstm): New.
5920 (unprobe_marker_at, probe_marker_at): New.
5921 (cmd_qtstmat, gdb_ust_thread): New.
5922 (gdb_ust_init): New.
5923 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5924 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5925 (ST_REGENTRY): New.
5926 (x86_64_st_collect_regmap): New.
5927 (X86_64_NUM_ST_COLLECT_GREGS): New.
5928 (AMD64_RIP_REGNUM): New.
5929 (supply_static_tracepoint_registers): New.
5930 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5931 (ST_REGENTRY): New.
5932 (i386_st_collect_regmap): New.
5933 (i386_NUM_ST_COLLECT_GREGS): New.
5934 (supply_static_tracepoint_registers): New.
5935 * server.c (handle_query): Handle qXfer:statictrace:read.
5936 <qSupported>: Report support for StaticTracepoints, and
5937 qXfer:statictrace:read features.
5938 * server.h (traceframe_read_sdata)
5939 (supply_static_tracepoint_registers): Declare.
5940 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5941 (unpack_varlen_hex): Include in IPA build.
5942 * Makefile.in (ustlibs, ustinc): New.
5943 (IPA_OBJS): Add remote-utils-ipa.o.
5944 ($(IPA_LIB)): Link -ldl and -lpthread.
5945 (UST_CFLAGS): New.
5946 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5947 * config.in, configure: Regenerate.
5948
9e4344e5
PA
59492010-06-20 Ian Lance Taylor <iant@google.com>
5950 Pedro Alves <pedro@codesourcery.com>
5951
5952 * linux-x86-low.c (always_true): Delete.
5953 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5954 trying to fool the compiler with always_true.
5955
c6beb2cb
PA
59562010-06-20 Pedro Alves <pedro@codesourcery.com>
5957
5958 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5959 conditions in gdbserver.
5960
d2ed6730
UW
59612010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5962
5963 * spu-low.c (spu_read_memory): Wrap around local store limit.
5964 (spu_write_memory): Likewise.
5965
4e29fb54
PA
59662010-06-15 Pedro Alves <pedro@codesourcery.com>
5967
5968 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5969 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5970 LONGEST uses.
5971 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5972 uses.
5973 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5974 uses with LONGEST uses.
5975
6a271cae
PA
59762010-06-14 Stan Shebs <stan@codesourcery.com>
5977 Pedro Alves <pedro@codesourcery.com>
5978
5979 Bytecode compiler.
5980
5981 * linux-x86-low.c: Include limits.h.
5982 (add_insns): New.
5983 (always_true): New.
5984 (EMIT_ASM): New.
5985 (EMIT_ASM32): New.
5986 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5987 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5988 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5989 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5990 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5991 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5992 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5993 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5994 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5995 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5996 (amd64_emit_void_call_2): New.
5997 (amd64_emit_ops): New.
5998 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5999 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6000 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6001 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6002 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6003 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6004 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6005 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6006 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6007 (i386_emit_stack_adjust, i386_emit_int_call_1)
6008 (i386_emit_void_call_2): New.
6009 (i386_emit_ops): New.
6010 (x86_emit_ops): New.
6011 (the_low_target): Install x86_emit_ops.
6012 * server.h (struct emit_ops): New.
6013 (get_raw_reg_func_addr): Declare.
6014 (current_insn_ptr, emit_error): Declare.
6015 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6016 (set_trace_state_variable_value): New defines.
6017 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6018 addr_get_trace_state_variable_value and
6019 addr_set_trace_state_variable_value.
6020 (symbol_list): New fields for get_raw_reg,
6021 get_trace_state_variable_value and set_trace_state_variable_value.
6022 (condfn): New typedef.
6023 (struct tracepoint): New field `compiled_cond'.
6024 (do_action_at_tracepoint): Clear compiled_cond.
6025 (get_trace_state_variable_value, set_trace_state_variable_value):
6026 Export in the IPA.
6027 (condition_true_at_tracepoint): If there's a compiled condition,
6028 run that.
6029 (current_insn_ptr, emit_error): New globals.
6030 (struct bytecode_address): New.
6031 (get_raw_reg_func_addr): New.
6032 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6033 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6034 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6035 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6036 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6037 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6038 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6039 (compile_tracepoint_condition, compile_bytecodes): New.
6040 * target.h (emit_ops): Forward declare.
6041 (struct target_ops): New field emit_ops.
6042 (target_emit_ops): New.
6043 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6044 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6045 * linux-low.c (linux_emit_ops): New.
6046 (linux_target_ops): Install it.
6047 * linux-low.h (struct linux_target_ops): New field emit_ops.
6048
92b72907
UW
60492010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6050
6051 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6052 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6053
fa593d66
PA
60542010-06-01 Pedro Alves <pedro@codesourcery.com>
6055 Stan Shebs <stan@codesourcery.com>
6056
6057 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6058 (all): Depend on $(extra_libraries).
6059 (install-only): Install the IPA.
6060 (IPA_OBJS, IPA_LIB): New.
6061 (clean): Remove the IPA lib.
6062 (IPAGENT_CFLAGS): New.
6063 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6064 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6065 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6066 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6067 * configure.ac: Check for atomic builtins support in the compiler.
6068 (IPA_DEPFILES, extra_libraries): Define.
6069 * configure.srv (ipa_obj): Add description.
6070 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6071 (i[34567]86-*-linux*): Set ipa_obj.
6072 (x86_64-*-linux*): Set ipa_obj.
6073 * linux-low.c (stabilizing_threads): New.
6074 (supports_fast_tracepoints): New.
6075 (linux_detach): Stabilize threads before detaching.
6076 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6077 the lwp is either not stabilizing, or is moving out of a jump pad.
6078 (linux_fast_tracepoint_collecting): New.
6079 (maybe_move_out_of_jump_pad): New.
6080 (enqueue_one_deferred_signal): New.
6081 (dequeue_one_deferred_signal): New.
6082 (linux_wait_for_event_1): If moving out of a jump pad, defer
6083 pending signals to later.
6084 (linux_stabilize_threads): New.
6085 (linux_wait_1): Check if threads need moving out of jump pads, and
6086 do it if so.
6087 (stuck_in_jump_pad_callback): New.
6088 (move_out_of_jump_pad_callback): New.
6089 (lwp_running): New.
6090 (linux_resume_one_lwp): Handle moving out of jump pads.
6091 (linux_set_resume_request): Dequeue deferred signals.
6092 (need_step_over_p): Also step over fast tracepoint jumps.
6093 (start_step_over): Also uninsert fast tracepoint jumps.
6094 (finish_step_over): Also reinsert fast tracepoint jumps.
6095 (linux_install_fast_tracepoint_jump): New.
6096 (linux_target_ops): Install linux_stabilize_threads and
6097 linux_install_fast_tracepoint_jump_pad.
6098 * linux-low.h (linux_target_ops) <get_thread_area,
6099 install_fast_tracepoint_jump_pad>: New fields.
6100 (struct lwp_info) <collecting_fast_tracepoint,
6101 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6102 (linux_get_thread_area): Declare.
6103 * linux-x86-low.c (jump_insn): New.
6104 (x86_get_thread_area): New.
6105 (append_insns): New.
6106 (push_opcode): New.
6107 (amd64_install_fast_tracepoint_jump_pad): New.
6108 (i386_install_fast_tracepoint_jump_pad): New.
6109 (x86_install_fast_tracepoint_jump_pad): New.
6110 (the_low_target): Install x86_get_thread_area and
6111 x86_install_fast_tracepoint_jump_pad.
6112 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6113 (struct fast_tracepoint_jump): New.
6114 (fast_tracepoint_jump_insn): New.
6115 (fast_tracepoint_jump_shadow): New.
6116 (find_fast_tracepoint_jump_at): New.
6117 (fast_tracepoint_jump_here): New.
6118 (delete_fast_tracepoint_jump): New.
6119 (set_fast_tracepoint_jump): New.
6120 (uninsert_fast_tracepoint_jumps_at): New.
6121 (reinsert_fast_tracepoint_jumps_at): New.
6122 (set_breakpoint_at): Use write_inferior_memory.
6123 (uninsert_raw_breakpoint): Use write_inferior_memory.
6124 (check_mem_read): Mask out fast tracepoint jumps.
6125 (check_mem_write): Mask out fast tracepoint jumps.
6126 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6127 (set_fast_tracepoint_jump): Declare.
6128 (delete_fast_tracepoint_jump)
6129 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6130 (reinsert_fast_tracepoint_jumps_at): Declare.
6131 * regcache.c: Don't compile many functions when building the
6132 in-process agent library.
6133 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6134 the register buffer in the heap.
6135 (free_register_cache): If the register buffer isn't owned by the
6136 regcache, don't free it.
6137 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6138 pre-existing register caches.
6139 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6140 type.
6141 (convert_ascii_to_int): : Constify `from' parameter type.
6142 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6143 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6144 the needed buffer in-place.
6145 (relocate_instruction): New.
6146 * server.c (handle_query) <qSymbols>: If the target supports
6147 tracepoints, give it a chance of looking up symbols. Report
6148 support for fast tracepoints.
6149 (handle_status): Stabilize threads.
6150 (process_serial_event): Adjust.
6151 * server.h (struct fast_tracepoint_jump): Forward declare.
6152 (struct process_info) <fast_tracepoint_jumps>: New field.
6153 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6154 (decode_X_packet, decode_M_packet): Adjust.
6155 (relocate_instruction): Declare.
6156 (in_process_agent_loaded): Declare.
6157 (tracepoint_look_up_symbols): Declare.
6158 (struct fast_tpoint_collect_status): Declare.
6159 (fast_tracepoint_collecting): Declare.
6160 (force_unlock_trace_buffer): Declare.
6161 (handle_tracepoint_bkpts): Declare.
6162 (initialize_low_tracepoint)
6163 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6164 * target.h (struct target_ops) <stabilize_threads,
6165 install_fast_tracepoint_jump_pad>: New fields.
6166 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6167 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6168 [HAVE_STDINT_H]: Include stdint.h.
6169 (trace_debug_1): Rename to ...
6170 (trace_vdebug): ... this.
6171 (trace_debug): Rename to ...
6172 (trace_debug_1): ... this. Add `level' parameter.
6173 (trace_debug): New.
6174 (ATTR_USED, ATTR_NOINLINE): New.
6175 (IP_AGENT_EXPORT): New.
6176 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6177 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6178 (about_to_request_buffer_space, trace_buffer_is_full)
6179 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6180 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6181 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6182 (traceframe_write_count, traceframes_created)
6183 (trace_state_variables)
6184 New renaming defines.
6185 (struct ipa_sym_addresses): New.
6186 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6187 (symbol_list): New.
6188 (ipa_sym_addrs): New.
6189 (all_tracepoint_symbols_looked_up): New.
6190 (in_process_agent_loaded): New.
6191 (write_e_ipa_not_loaded): New.
6192 (maybe_write_ipa_not_loaded): New.
6193 (tracepoint_look_up_symbols): New.
6194 (debug_threads) [IN_PROCESS_AGENT]: New.
6195 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6196 (UNKNOWN_SIDE_EFFECTS): New.
6197 (stop_tracing): New.
6198 (flush_trace_buffer): New.
6199 (stop_tracing_bkpt): New.
6200 (flush_trace_buffer_bkpt): New.
6201 (read_inferior_integer): New.
6202 (read_inferior_uinteger): New.
6203 (read_inferior_data_pointer): New.
6204 (write_inferior_data_pointer): New.
6205 (write_inferior_integer): New.
6206 (write_inferior_uinteger): New.
6207 (struct collect_static_trace_data_action): Delete.
6208 (enum tracepoint_type): New.
6209 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6210 <actions_str, step_actions, step_actions_str>: Only include in
6211 GDBserver.
fa593d66
PA
6212 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6213 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6214 (tracepoints): Use IP_AGENT_EXPORT.
6215 (last_tracepoint): Don't include in the IPA.
6216 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6217 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6218 (alloced_trace_state_variables): New.
6219 (trace_state_variables): Use IP_AGENT_EXPORT.
6220 (traceframe_t): Delete unused variable.
6221 (circular_trace_buffer): Don't include in the IPA.
6222 (trace_buffer_start): Delete.
6223 (struct trace_buffer_control): New.
6224 (trace_buffer_free): Delete.
6225 (struct ipa_trace_buffer_control): New.
6226 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6227 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6228 New.
6229 (trace_buffer_ctrl): New.
6230 (TRACE_BUFFER_CTRL_CURR): New.
6231 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6232 Reimplement as macros.
6233 (trace_buffer_wrap): Delete.
6234 (traceframe_write_count, traceframe_read_count)
6235 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6236 (struct tracepoint_hit_ctx) <type>: New field.
6237 (struct fast_tracepoint_ctx): New.
6238 (memory_barrier): New.
6239 (cmpxchg): New.
6240 (record_tracepoint_error): Update atomically in the IPA.
6241 (clear_inferior_trace_buffer): New.
6242 (about_to_request_buffer_space): New.
6243 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6244 updating the same buffer.
6245 (add_tracepoint): Default the tracepoint's type to trap
6246 tracepoint, and orig_size to -1.
6247 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6248 internal variables.
6249 (create_trace_state_variable): New parameter `gdb'. Handle it.
6250 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6251 (cmd_qtdp): Handle fast tracepoints.
6252 (cmd_qtdv): Adjust.
6253 (max_jump_pad_size): New.
6254 (gdb_jump_pad_head): New.
6255 (get_jump_space_head): New.
6256 (claim_jump_space): New.
6257 (sort_tracepoints): New.
6258 (MAX_JUMP_SIZE): New.
6259 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6260 IPA.
6261 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6262 support. Upload fast traceframes, and delete internal IPA
6263 breakpoints.
6264 (stop_tracing_handler): New.
6265 (flush_trace_buffer_handler): New.
6266 (cmd_qtstop): Upload fast tracepoints.
6267 (response_tracepoint): Handle fast tracepoints.
6268 (tracepoint_finished_step): Upload fast traceframes. Set the
6269 tracepoint hit context's tracepoint type.
6270 (handle_tracepoint_bkpts): New.
6271 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6272 type. Add comment about fast tracepoints.
6273 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6274 non-existing action_str field.
6275 (get_context_regcache): Handle fast tracepoints.
6276 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6277 to the regcache.
6278 (fast_tracepoint_from_jump_pad_address): New.
6279 (fast_tracepoint_from_ipa_tpoint_address): New.
6280 (collecting_t): New.
6281 (force_unlock_trace_buffer): New.
6282 (fast_tracepoint_collecting): New.
6283 (collecting): New.
6284 (gdb_collect): New.
6285 (write_inferior_data_ptr): New.
6286 (target_tp_heap): New.
6287 (target_malloc): New.
6288 (download_agent_expr): New.
6289 (UALIGN): New.
6290 (download_tracepoints): New.
6291 (download_trace_state_variables): New.
6292 (upload_fast_traceframes): New.
6293 (IPA_FIRST_TRACEFRAME): New.
6294 (IPA_NEXT_TRACEFRAME_1): New.
6295 (IPA_NEXT_TRACEFRAME): New.
6296 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6297 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6298 (gdb_jump_pad_buffer_end): New.
6299 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6300 (initialize_tracepoint): Adjust.
6301 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6302 buffer. Initialize the low module.
6303 * utils.c (PREFIX, TOOLNAME): New.
6304 (malloc_failure): Use PREFIX.
6305 (error): In the IPA, an error causes an exit.
6306 (fatal, warning): Use PREFIX.
6307 (internal_error): Use TOOLNAME.
6308 (NUMCELLS): Increase to 10.
6309 * configure, config.in: Regenerate.
6310
d149dd1d
PA
63112010-06-01 Pedro Alves <pedro@codesourcery.com>
6312
6313 * server.c (handle_query) <qSupported>: Do two passes over the
6314 qSupported string to avoid nesting strtok.
6315
f6528abd
JK
63162010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6317
6318 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6319 (CDEPS): New.
6320 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6321 -Wl,--dynamic-list.
6322 * configure: Regenerate.
6323 * proc-service.list: New.
6324
ca2a87a0
JK
63252010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6326
6327 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6328 New comment.
6329
363a6e9f
OS
63302010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6331
6332 * gdbreplay.c (remote_open): Check error return from socket() call by
6333 its equality to -1 not by it being negative.
6334 * remote-utils.c (remote_open): Likewise.
6335
d23b6cb1
PA
63362010-05-23 Pedro Alves <pedro@codesourcery.com>
6337
6338 * config.h: Regenerate.
6339
28d3cf85
MK
63402010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6341
6342 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6343 doesn't provide PTRACE_GET_THREAD_AREA.
6344
fea36a59
MK
63452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6346
6347 * linux-m68k-low.c: Include <asm/ptrace.h>
6348 (ps_get_thread_area): Implement.
6349
24b066ba
DE
63502010-05-03 Doug Evans <dje@google.com>
6351
6352 * event-loop.c (struct callback_event): New struct.
6353 (callback_list): New global.
6354 (append_callback_event, delete_callback_event): New functions.
6355 (process_callback): New function.
6356 (start_event_loop): Call it.
6357 * remote-utils.c (NOT_SCHEDULED): Define.
6358 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6359 moved out of readchar.
6360 (readchar): Rewrite. Call reschedule before returning.
6361 (reset_readchar): New function.
6362 (remote_close): Call it.
6363 (process_remaining, reschedule): New functions.
6364 * server.h (callback_handler_func): New typedef.
6365 (append_callback_event, delete_callback_event): Declare.
6366
9836d6ea
PA
63672010-05-03 Pedro Alves <pedro@codesourcery.com>
6368
6369 * proc-service.c (ps_pglobal_lookup): Use
6370 thread_db_look_up_one_symbol.
6371 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6372 parameter. Use it instead of all_symbols_looked_up.
6373 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6374 field.
6375 (all_symbols_looked_up): Don't declare.
6376 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6377 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6378 field.
6379 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6380 Set all_symbols_looked_up here.
6381 (thread_db_look_up_one_symbol): New.
6382 (thread_db_get_tls_address): Adjust.
6383 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6384 thread_db object on the heap, and tentatively set it in the
6385 process structure.
6386 (thread_db_init): Don't set all_symbols_looked_up here.
6387 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6388
7984d532
PA
63892010-05-03 Pedro Alves <pedro@codesourcery.com>
6390
6391 * linux-low.c (linux_kill, linux_detach): Adjust.
6392 (status_pending_p_callback): Remove redundant statement. Check
6393 for !TARGET_WAITIKIND_IGNORE, instead of
6394 TARGET_WAITKIND_STOPPED.
6395 (handle_tracepoints): Make sure LWP is locked. Adjust.
6396 (linux_wait_for_event_1): Adjust.
6397 (linux_cancel_breakpoints): New.
6398 (unsuspend_one_lwp): New.
6399 (unsuspend_all_lwps): New.
6400 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6401 (send_sigstop_callback): Change return type to int, add new
6402 `except' parameter and handle it.
6403 (suspend_and_send_sigstop_callback): New.
6404 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6405 pass them down. If SUSPEND, also increment the lwp's suspend
6406 count.
6407 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6408 (need_step_over_p): Don't consider suspended LWPs.
6409 (start_step_over): Adjust.
6410 (proceed_one_lwp): Change return type to int, add new `except'
6411 parameter and handle it.
6412 (unsuspend_and_proceed_one_lwp): New.
6413 (proceed_all_lwps): Use find_inferior instead of
6414 for_each_inferior.
6415 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6416 also decrement the suspend count of LWPs. Pass `except' down,
6417 instead of hacking its suspend count.
6418 (linux_pause_all): Add `freeze' parameter. Adjust.
6419 (linux_unpause_all): New.
6420 (linux_target_ops): Install linux_unpause_all.
6421 * server.c (handle_status): Adjust.
6422 * target.h (struct target_ops): New fields `unpause_all' and
6423 `cancel_breakpoints'. Add new parameter to `pause_all'.
6424 (pause_all): Add new `freeze' parameter.
6425 (unpause_all): New.
6426 (cancel_breakpoints): New.
6427 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6428 cancel breakpoints.
6429 (cmd_qtstart): Pause threads.
6430 (stop_tracing): Pause threads, and cancel breakpoints.
6431 * win32-low.c (win32_target_ops): Adjust.
6432
e471f25b
PA
64332010-05-03 Pedro Alves <pedro@codesourcery.com>
6434
6435 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6436 the inferior right away from here...
6437 (linux_wait_1): ... to here, and adjust to check the thread's
6438 last_resume_kind instead of the lwp's step or stop_expected flags.
6439
1915ef4f
PA
64402010-05-02 Pedro Alves <pedro@codesourcery.com>
6441
6442 * README: Use consistent `GDB' and `GDBserver' spellings.
6443
f9e39928
PA
64442010-05-02 Pedro Alves <pedro@codesourcery.com>
6445
6446 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6447 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6448 (linux_detach_one_lwp): Assume the lwp is stopped.
6449 (any_thread_of): Delete.
6450 (linux_detach): Stop all lwps here. Don't blindly delete all
6451 breakpoints.
6452 (delete_lwp_callback): New.
6453 (linux_mourn): Delete all lwps of the process that is gone.
6454 (linux_wait_1): Don't delete the last lwp of the process here.
6455 * mem-break.h (mark_breakpoints_out): Declare.
6456 * mem-break.c (mark_breakpoints_out): New.
6457 (free_all_breakpoints): Use it.
6458 * server.c (handle_target_event): If the process is gone, mark
6459 breakpoints out.
6460 * thread-db.c (struct thread_db) <create_bp>: New field.
6461 (thread_db_enable_reporting): Fix prototype. Store a thread event
6462 breakpoint reference in the thread_db struct.
6463 (thread_db_load_search): Clear the thread_db object.
6464 (try_thread_db_load_1): Ditto.
6465 (switch_to_process): New.
6466 (disable_thread_event_reporting): Use it.
6467 (remove_thread_event_breakpoints): New.
6468 (thread_db_detach, thread_db_mourn): Use it.
6469
1e7fc18c
PA
64702010-05-01 Pedro Alves <pedro@codesourcery.com>
6471
6472 * linux-low.c (linux_enable_event_reporting): New.
6473 (linux_wait_for_event_1, handle_extended_wait): Use it.
6474
02fc4de7
PA
64752010-04-30 Pedro Alves <pedro@codesourcery.com>
6476
6477 * linux-low.c (linux_kill_one_lwp, linux_kill)
6478 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6479 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6480 SIGSTOP even if the LWP is stopped.
6481 (send_sigstop_callback): New.
6482 (stop_all_lwps): Use send_sigstop_callback instead.
6483 (linux_resume_one_thread): Adjust.
6484 (proceed_one_lwp): Still proceed an LWP that the client has
6485 requested to stop, if we haven't reported it as stopped yet. Make
6486 sure that LWPs the client want stopped, have a pending SIGSTOP.
6487
bc3b5632
DE
64882010-04-26 Doug Evans <dje@google.com>
6489
ae1ada35
DE
6490 * server.c (handle_general_set): Make static.
6491
bc3b5632
DE
6492 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6493 Print received char after testing for error/eof instead of before.
6494 (input_interrupt): Tweak comment.
6495
65730243
DE
64962010-04-23 Doug Evans <dje@google.com>
6497
6498 * server.c (start_inferior): Print inferior argv if --debug.
6499
a8ae7dc0
AR
65002010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6501
6502 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6503 * nto-x86-low.c: Include server.h
6504
1c07cc19
PM
65052010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6506
6507 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6508 be consistent with other sources of this directory.
6509 (init_registers_amd64): Correct name of source file of this function
6510 in the comment.
6511
e0a61e09
PM
65122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6513
6514 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6515 64-bit executables.
6516
54709339
PM
65172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6518
6519 * win32-i386-low.c: Add 64-bit support.
6520 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6521 (init_registers_amd64): Declare.
6522 (mappings): Add 64-bit version of array.
6523 (init_windows_x86): New function.
6524 (the_low_target): Change init_arch field to init_windows_x86.
6525
e8f0053d
PM
65262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6527
6528 * win32-low.c: Adapt to support also 64-bit architecture.
6529 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6530 (get_image_name): Use SIZE_T type for local variable `done'.
6531 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6532 (toolhelp_get_dll_name): Idem.
6533 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6534 Use uintptr_t typecast to avoid warning.
6535 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6536 (handle_exception): Use phex_nz to avoid warning.
6537 (win32_wait): Remove unused local variable `process'.
6538
c481e77e
PM
65392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6540
6541 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6542 `amd64-avx.o'.
6543
12ea4b69
PM
65442010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6545
6546 * configure.ac: Use `ws2_32' library for srv_mingw.
6547 * configure: Regenerate.
6548 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6549 * remote-utils.c: Likewise.
6550
f6d1620c
L
65512010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6552
6553 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6554 if __x86_64__ is defined.
6555
8e642873
PM
65562010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6557
6558 * configure: Regenerate.
6559
711e434b
PM
65602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6561
6562 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6563 * target.h (target_ops): New get_tib_address field.
6564 * win32-low.h (win32_thread_info): Add thread_local_base field.
6565 * win32-low.c (child_add_thread): Add tlb argument.
6566 Set thread_local_base field to TLB.
6567 (get_child_debug_event): Adapt to child_add_thread change.
6568 (win32_get_tib_address): New function.
6569 (win32_target_ops): Set get_tib_address field to
6570 win32_get_tib_address.
6571 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6572
505106cd
PA
65732010-04-12 Pedro Alves <pedro@codesourcery.com>
6574
505106cd
PA
6575 * linux-low.c (linux_mourn): Also remove the process.
6576 * server.c (handle_target_event): Don't remove the process here.
6577 * nto-low.c (nto_mourn): New.
6578 (nto_target_ops): Install it.
6579 * spu-low.c (spu_mourn): New.
6580 (spu_target_ops): Install it.
6581 * win32-low.c (win32_mourn): New.
6582 (win32_target_ops): Install it.
6583
e8470a06
PA
65842010-04-12 Pedro Alves <pedro@codesourcery.com>
6585
6586 * server.h (buffer_xml_printf): Remove redundant `;'.
6587
45ba0d02
PA
65882010-04-12 Pedro Alves <pedro@codesourcery.com>
6589
6590 * regcache.c (set_register_cache): Invalidate regcaches before
6591 changing the register cache layout.
6592 (regcache_invalidate_one): Allow a NULL regcache.
6593 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6594 regcaches before changing the register cache layout or the target
6595 regsets.
6596
59e04013
L
65972010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6598
6599 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6600 variable warning on Linux/x86-64.
6601
8336d594
PA
66022010-04-11 Pedro Alves <pedro@codesourcery.com>
6603
6604 GDBserver disconnected tracing support.
6605
6606 * linux-low.c (linux_remove_process): Delete.
6607 (add_lwp): Don't set last_resume_kind here.
6608 (linux_kill): Use `mourn'.
6609 (linux_detach): Use `thread_db_detach', and `mourn'.
6610 (linux_mourn): New.
6611 (linux_attach_lwp_1): Adjust comment.
6612 (linux_attach): last_resume_kind moved the thread_info; adjust.
6613 (status_pending_p_callback): Adjust.
6614 (linux_wait_for_event_1): Adjust.
6615 (count_events_callback, select_singlestep_lwp_callback)
6616 (select_event_lwp_callback, cancel_breakpoints_callback)
6617 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6618 (proceed_one_lwp): Adjust.
6619 (linux_async): Add debug output.
6620 (linux_thread_stopped): New.
6621 (linux_pause_all): New.
6622 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6623 linux_pause_all.
6624 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6625 (thread_db_free): Delete declaration.
6626 (thread_db_detach, thread_db_mourn): Declare.
6627 * thread-db.c (thread_db_init): Use thread_db_mourn.
6628 (thread_db_free): Delete, split in two.
6629 (disable_thread_event_reporting): New.
6630 (thread_db_detach): New.
6631 (thread_db_mourn): New.
6632
6633 * server.h (struct thread_info) <last_resume_kind>: New field.
6634 <attached>: Add comment.
6635 <gdb_detached>: New field.
6636 (handler_func): Change return type to int.
6637 (handle_serial_event, handle_target_event): Ditto.
6638 (gdb_connected): Declare.
6639 (tracing): Delete.
6640 (disconnected_tracing): Declare.
6641 (stop_tracing): Declare.
6642
6643 * server.c (handle_query) <qSupported>: Report support for
6644 disconnected tracing.
6645 (queue_stop_reply_callback): Account for running threads.
6646 (gdb_wants_thread_stopped): New.
6647 (gdb_wants_all_threads_stopped): New.
6648 (gdb_reattached_process): New.
6649 (handle_status): Clear the `gdb_detached' flag of all processes.
6650 In all-stop, stop all threads.
6651 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6652 (process_serial_event): If the remote connection breaks, or if an
6653 exit was forced with "monitor exit", force an event loop exit.
6654 Handle disconnected tracing on detach.
6655 (handle_serial_event): Adjust.
6656 (handle_target_event): If GDB isn't connected, forward events back
6657 to the inferior, unless the last process exited, in which case,
6658 exit gdbserver. Adjust interface.
6659
6660 * remote-utils.c (remote_open): Don't block in accept. Instead
6661 register an event loop source on the listen socket file
6662 descriptor. Refactor bits into ...
6663 (listen_desc): ... this new global.
6664 (gdb_connected): ... this new function.
6665 (enable_async_notification): ... this new function.
6666 (handle_accept_event): ... this new function.
6667 (remote_close): Clear remote_desc.
6668
6669 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6670
6671 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6672 New fields.
6673 (mourn_inferior): Define.
6674 (target_process_qsupported): Avoid the dangling else problem.
6675 (thread_stopped): Define.
6676 (pause_all): Define.
6677 (target_waitstatus_to_string): Declare.
6678 * target.c (target_waitstatus_to_string): New.
6679
6680 * tracepoint.c (tracing): Make extern.
6681 (disconnected_tracing): New.
6682 (stop_tracing): Make extern. Handle tracing stops due to GDB
6683 disconnecting.
6684 (cmd_qtdisconnected): New.
6685 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6686 (handle_tracepoint_general_set): Handle QTDisconnected.
6687
6688 * event-loop.c (event_handler_func): Change return type to int.
6689 (process_event): Bail out if the event handler wants the event
6690 loop to stop.
6691 (handle_file_event): Ditto.
6692 (start_event_loop): Bail out if the event handler wants the event
6693 loop to stop.
6694
6695 * nto-low.c (nto_target_ops): Adjust.
6696 * spu-low.c (spu_wait): Don't remove the process here.
6697 (spu_target_ops): Adjust.
6698 * win32-low.c (win32_wait): Don't remove the process here.
6699 (win32_target_ops): Adjust.
6700
5d267c4c
PA
67012010-04-11 Pedro Alves <pedro@codesourcery.com>
6702
6703 * regcache.c (realloc_register_cache): Invalidate inferior's
6704 regcache before recreating it.
6705
623ccd72
PA
67062010-04-09 Pedro Alves <pedro@codesourcery.com>
6707
6708 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6709
219f2f23
PA
67102010-04-09 Stan Shebs <stan@codesourcery.com>
6711 Pedro Alves <pedro@codesourcery.com>
6712
6713 * server.h (LONGEST): New.
6714 (struct thread_info) <while_stepping>: New field.
6715 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6716 Declare.
6717 (initialize_tracepoint, handle_tracepoint_general_set)
6718 (handle_tracepoint_query, tracepoint_finished_step)
6719 (tracepoint_was_hit, release_while_stepping_state_list):
6720 (current_traceframe): Declare.
6721 * server.c (handle_general_set): Handle tracepoint packets.
6722 (read_memory): New.
6723 (write_memory): New.
6724 (handle_search_memory_1): Use read_memory.
6725 (handle_query): Report support for conditional tracepoints, trace
6726 state variables, and tracepoint sources. Handle tracepoint
6727 queries.
6728 (main): Initialize the tracepoints module.
6729 (process_serial_event): Handle traceframe reads/writes.
6730
6731 * linux-low.c (handle_tracepoints): New.
6732 (linux_wait_1): Call it.
6733 (linux_resume_one_lwp): Handle while-stepping.
6734 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6735 (linux_target_ops): Install them.
6736 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6737 New field.
6738 * linux-x86-low.c (x86_supports_tracepoints): New.
6739 (the_low_target). Install it.
6740
6741 * mem-break.h (delete_breakpoint): Declare.
6742 * mem-break.c (delete_breakpoint): Make external.
6743
6744 * target.h (struct target_ops): Add `supports_tracepoints',
6745 `read_pc', and `write_pc' fields.
6746 (target_supports_tracepoints): Define.
6747 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6748 (phex_nz): New.
6749
6750 * regcache.h (struct regcache) <registers_owned>: New field.
6751 (init_register_cache, regcache_cpy): Declare.
6752 (regcache_read_pc, regcache_write_pc): Declare.
6753 (register_cache_size): Declare.
6754 (supply_regblock): Declare.
6755 * regcache.c (init_register_cache): New.
6756 (new_register_cache): Use it.
6757 (regcache_cpy): New.
6758 (register_cache_size): New.
6759 (supply_regblock): New.
6760 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6761
219f2f23
PA
6762 * tracepoint.c: New.
6763
6764 * Makefile.in (OBS): Add tracepoint.o.
6765 (tracepoint.o): New rule.
6766
3a13a53b
L
67672010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6768
6769 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6770 (i386-mmx.o): New.
6771 (i386-mmx.c): Likewise.
6772 (i386-mmx-linux.o): Likewise.
6773 (i386-mmx-linux.c): Likewise.
6774
6775 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6776 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6777 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6778 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6779
6780 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6781 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6782 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6783
1570b33e
L
67842010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6785
6786 * Makefile.in (clean): Updated.
6787 (i386-avx.o): New.
6788 (i386-avx.c): Likewise.
6789 (i386-avx-linux.o): Likewise.
6790 (i386-avx-linux.c): Likewise.
6791 (amd64-avx.o): Likewise.
6792 (amd64-avx.c): Likewise.
6793 (amd64-avx-linux.o): Likewise.
6794 (amd64-avx-linux.c): Likewise.
6795
6796 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6797 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6798 (srv_amd64_regobj): Add amd64-avx.o.
6799 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6800 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6801 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6802 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6803 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6804 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6805 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6806
6807 * i387-fp.c: Include "i386-xstate.h".
6808 (i387_xsave): New.
6809 (i387_cache_to_xsave): Likewise.
6810 (i387_xsave_to_cache): Likewise.
6811 (x86_xcr0): Likewise.
6812
6813 * i387-fp.h (i387_cache_to_xsave): Likewise.
6814 (i387_xsave_to_cache): Likewise.
6815 (x86_xcr0): Likewise.
6816
6817 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6818 * linux-crisv32-low.c (target_regsets): Likewise.
6819 * linux-m68k-low.c (target_regsets): Likewise.
6820 * linux-mips-low.c (target_regsets): Likewise.
6821 * linux-ppc-low.c (target_regsets): Likewise.
6822 * linux-s390-low.c (target_regsets): Likewise.
6823 * linux-sh-low.c (target_regsets): Likewise.
6824 * linux-sparc-low.c (target_regsets): Likewise.
6825 * linux-xtensa-low.c (target_regsets): Likewise.
6826
6827 * linux-low.c: Include <sys/uio.h>.
6828 (regsets_fetch_inferior_registers): Support nt_type.
6829 (regsets_store_inferior_registers): Likewise.
6830 (linux_process_qsupported): New.
6831 (linux_target_ops): Add linux_process_qsupported.
6832
6833 * linux-low.h (regset_info): Add nt_type.
6834 (linux_target_ops): Add process_qsupported.
6835
6836 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6837 and <sys/uio.h>.
6838 (init_registers_i386_avx_linux): New.
6839 (init_registers_amd64_avx_linux): Likewise.
6840 (xmltarget_i386_linux_no_xml): Likewise.
6841 (xmltarget_amd64_linux_no_xml): Likewise.
6842 (PTRACE_GETREGSET): Likewise.
6843 (PTRACE_SETREGSET): Likewise.
6844 (x86_fill_xstateregset): Likewise.
6845 (x86_store_xstateregset): Likewise.
6846 (use_xml): Likewise.
6847 (x86_linux_update_xmltarget): Likewise.
6848 (x86_linux_process_qsupported): Likewise.
6849 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6850 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6851 init_registers_i386_linux here. Call
6852 x86_linux_update_xmltarget.
6853 (the_low_target): Add x86_linux_process_qsupported.
6854
6855 * server.c (handle_query): Call target_process_qsupported.
6856
6857 * target.h (target_ops): Add process_qsupported.
6858 (target_process_qsupported): New.
6859
fc7238bb
PA
68602010-04-03 Pedro Alves <pedro@codesourcery.com>
6861
6862 * inferiors.c (add_thread): Set last_status kind to
6863 TARGET_WAITKIND_IGNORE.
6864 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6865 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6866 (linux_wait_1): Move `thread' local definition to block that uses
6867 it. Don't NULL initialize `event_child'.
6868 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6869 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6870 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6871
bdabb078
PA
68722010-04-01 Pedro Alves <pedro@codesourcery.com>
6873
6874 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6875 an extended waitstatus, or by a watchpoint.
6876 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6877 thread was stepping or has been stopped by a watchpoint.
6878
d3bbe7a0
PA
68792010-04-01 Pedro Alves <pedro@codesourcery.com>
6880
6881 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6882 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6883 of another, then delete the previous, and validate all
6884 breakpoints.
6885 (validate_inserted_breakpoint): New.
6886 (delete_disabled_breakpoints): New.
6887 (validate_breakpoints): New.
6888 (check_mem_read): Validate breakpoints before trusting their
6889 shadow. Delete disabled breakpoints.
6890 (check_mem_write): Validate breakpoints before trusting they
6891 should be inserted. Delete disabled breakpoints.
6892 * mem-break.h (validate_breakpoints):
6893 * server.c (handle_query): Validate breakpoints when we see a
6894 qSymbol query.
6895
8b07ae33
PA
68962010-04-01 Pedro Alves <pedro@codesourcery.com>
6897
6898 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6899 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6900 if we could tell there's a GDB breakpoint at stop_pc.
6901 (need_step_over_p): Don't do a step over if we find a GDB
6902 breakpoint at the resume PC.
6903
6904 * mem-break.c (struct raw_breakpoint): New.
6905 (enum bkpt_type): New type `gdb_breakpoint'.
6906 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6907 fields. New field `raw'.
6908 (find_raw_breakpoint_at): New.
6909 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6910 breakpoint instead.
6911 (set_breakpoint_at): Adjust.
6912 (delete_raw_breakpoint): New.
6913 (release_breakpoint): New.
6914 (delete_breakpoint): Rename to...
6915 (delete_breakpoint_1): ... this. Add proc parameter. Use
6916 release_breakpoint. Return ENOENT.
6917 (delete_breakpoint): Reimplement.
6918 (find_breakpoint_at): Delete.
6919 (find_gdb_breakpoint_at): New.
6920 (delete_breakpoint_at): Delete.
6921 (set_gdb_breakpoint_at): New.
6922 (delete_gdb_breakpoint_at): New.
6923 (gdb_breakpoint_here): New.
6924 (set_reinsert_breakpoint): Use release_breakpoint.
6925 (uninsert_breakpoint): Rename to ...
6926 (uninsert_raw_breakpoint): ... this.
6927 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6928 (reinsert_raw_breakpoint): Change parameter type to
6929 raw_breakpoint.
6930 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6931 instead.
6932 (check_breakpoints): Adjust. Use release_breakpoint.
6933 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6934 (breakpoint_inserted_here): Ditto.
6935 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6936 Don't trust the breakpoint's shadow if it is not inserted.
6937 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6938 (delete_all_breakpoints): Adjust.
6939 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6940 use delete_breakpoint_1.
6941
6942 * mem-break.h (breakpoints_supported): Delete declaration.
6943 (set_gdb_breakpoint_at): Declare.
6944 (gdb_breakpoint_here): Declare.
6945 (delete_breakpoint_at): Delete.
6946 (delete_gdb_breakpoint_at): Declare.
6947
6948 * server.h (struct raw_breakpoint): Forward declare.
6949 (struct process_info): New field `raw_breakpoints'.
6950
6951 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6952 breakpoints.
6953
6bf5e0ba
PA
69542010-03-24 Pedro Alves <pedro@codesourcery.com>
6955
6956 * linux-low.c (status_pending_p_callback): Fix comment.
6957 (linux_wait_for_event_1): Move most of the internal breakpoint
6958 handling from here...
6959 (linux_wait_1): ... to here.
6960 (count_events_callback): New.
6961 (select_singlestep_lwp_callback): New.
6962 (select_event_lwp_callback): New.
6963 (cancel_breakpoints_callback): New.
6964 (select_event_lwp): New.
6965 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6966 priority to all LWPs that have had events that should be reported
6967 to the client. Cancel breakpoints when about to reporting the
6968 event to the client, not while stopping lwps. No longer cancel
6969 finished single-steps here.
6970 (cancel_finished_single_step): Delete.
6971 (cancel_finished_single_steps): Delete.
6972
414a389f
PA
69732010-03-24 Pedro Alves <pedro@codesourcery.com>
6974
6975 * mem-break.c (enum bkpt_type): New.
6976 (struct breakpoint): New field `type'.
6977 (set_breakpoint_at): Change return type to struct breakpoint
6978 pointer. Set type to `other_breakpoint' by default.
6979 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6980 in the breakpoint list.
6981 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6982 (reinsert_breakpoint): Rename to ...
6983 (reinsert_raw_breakpoint): ... this.
6984 (reinsert_breakpoints_at): Adjust.
6985 * mem-break.h (struct breakpoint): Declare.
6986 (set_breakpoint_at): Change return type to struct breakpoint
6987 pointer.
6988
2280c721
PA
69892010-03-24 Pedro Alves <pedro@codesourcery.com>
6990
6991 * server.c (handle_query): Assign, not compare.
6992
d50171e4
PA
69932010-03-24 Pedro Alves <pedro@codesourcery.com>
6994
6995 Teach linux gdbserver to step-over-breakpoints.
6996
6997 * linux-low.c (can_hardware_single_step): New.
6998 (supports_breakpoints): New.
6999 (handle_extended_wait): If stopping threads, read the stop pc of
7000 the new cloned LWP.
7001 (get_pc): New.
7002 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7003 low target doesn't support retrieving the PC.
7004 (add_lwp): Set last_resume_kind to resume_continue.
7005 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7006 (linux_attach): Don't clear stop_expected. Set the lwp's
7007 last_resume_kind to resume_stop.
7008 (linux_detach_one_lwp): Don't check for removed breakpoints.
7009 (check_removed_breakpoint): Delete.
7010 (status_pending_p): Rename to ...
7011 (status_pending_p_callback): ... this. Don't check for removed
7012 breakpoints. Don't consider threads that are stopped from GDB's
7013 perspective.
7014 (linux_wait_for_lwp): Always read the stop_pc here.
7015 (cancel_breakpoint): New.
7016 (step_over_bkpt): New global.
7017 (linux_wait_for_event_1): Implement stepping over breakpoints.
7018 (gdb_wants_lwp_stopped): New.
7019 (gdb_wants_all_stopped): New.
7020 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7021 single-step traps here. Store the thread's last reported target
7022 wait status.
7023 (send_sigstop): Don't clear stop_expected. Always set it,
7024 instead.
7025 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7026 (cancel_finished_single_step): New.
7027 (cancel_finished_single_steps): New.
7028 (wait_for_sigstop): Don't cancel finished single-step traps here.
7029 (linux_resume_one_lwp): Don't check for removed breakpoints.
7030 Don't set `step' on non-hardware step archs.
7031 (linux_set_resume_request): Ignore resume_stop requests if already
7032 stopping or stopped. Set the lwp's last_resume_kind.
7033 (resume_status_pending_p): Don't check for removed breakpoints.
7034 (need_step_over_p): New.
7035 (start_step_over): New.
7036 (finish_step_over): New.
7037 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7038 requests. Clear the thread's last reported target waitstatus.
7039 Don't use the `suspended' flag. Don't consider pending breakpoints.
7040 (linux_resume): Start a step-over if necessary.
7041 (proceed_one_lwp): New.
7042 (proceed_all_lwps): New.
7043 (unstop_all_lwps): New.
7044 * linux-low.h (struct lwp_info): Rewrite comment for the
7045 `suspended' flag. Add the `stop_pc' field. Delete the
7046 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7047 Add `'last_resume_kind' and `need_step_over' fields.
7048 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7049 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7050 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7051 (set_raw_breakpoint_at): New.
7052 (set_breakpoint_at): Rewrite to use it.
7053 (reinsert_breakpoint_handler): Delete.
7054 (set_reinsert_breakpoint): New.
7055 (reinsert_breakpoint_by_bp): Delete.
7056 (delete_reinsert_breakpoints): New.
7057 (uninsert_breakpoint): Rewrite.
7058 (uninsert_breakpoints_at): New.
7059 (reinsert_breakpoint): Rewrite.
7060 (reinsert_breakpoints_at): New.
7061 (check_breakpoints): Rewrite.
7062 (breakpoint_here): New.
7063 (breakpoint_inserted_here): New.
7064 (check_mem_read): Adjust.
7065 * mem-break.h (breakpoints_supported, breakpoint_here)
7066 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7067 (reinsert_breakpoint_by_bp): Delete declaration.
7068 (delete_reinsert_breakpoints): Declare.
7069 (reinsert_breakpoint): Delete declaration.
7070 (reinsert_breakpoints_at): Declare.
7071 (uninsert_breakpoint): Delete declaration.
7072 (uninsert_breakpoints_at): Declare.
7073 (check_breakpoints): Adjust prototype.
7074 * server.h: Adjust include order.
7075 (struct thread_info): Declare here. Add a `last_status' field.
7076
30ba68cb
MS
70772010-03-23 Michael Snyder <msnyder@vmware.com>
7078
7079 * server.c (crc32): New function.
7080 (handle_query): Add handling for 'qCRC:' request.
7081
b9a881c2
PA
70822010-03-23 Pedro Alves <pedro@codesourcery.com>
7083
7084 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7085 lwp had been stopped by a watchpoint.
7086
e92d13d5
PA
70872010-03-16 Pedro Alves <pedro@codesourcery.com>
7088
7089 * server.h (internal_error): Declare.
7090 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7091 * utils.c (internal_error): New function.
7092
64daa791
AS
70932010-03-15 Andreas Schwab <schwab@redhat.com>
7094
7095 * configure.srv: Fix typo setting srv_regobj.
7096
f52cd8cd
PA
70972010-03-15 Pedro Alves <pedro@codesourcery.com>
7098
7099 * linux-low.c (fetch_register): Avoid passing a non string literal
7100 format to `error'.
7101 (usr_store_inferior_registers): Ditto.
7102
93ae6fdc
PA
71032010-03-14 Pedro Alves <pedro@codesourcery.com>
7104
7105 * linux-low.c (linux_write_memory): Bail out early if peeking
7106 memory failed.
7107
c3adc08c
PA
71082010-03-14 Pedro Alves <pedro@codesourcery.com>
7109
7110 * linux-low.h (struct lwp_info): New fields
7111 `stopped_by_watchpoint' and `stopped_data_address'.
7112 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7113 here, and cache them in the lwp object.
7114 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7115 directly.
7116 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7117 field.
7118 (linux_stopped_by_watchpoint): Rewrite.
7119 (linux_stopped_data_address): Rewrite.
7120
bce522a2
PA
71212010-03-06 Simo Melenius <simo.melenius@iki.fi>
7122
7123 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7124 switching the current inferior, not before.
7125
90884b2b
L
71262010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7127
7128 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7129 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7130 i386-linux.c and amd64-linux.c.
7131 (reg-i386.o): Removed.
7132 (reg-i386.c): Likewise.
7133 (reg-i386-linux.o): Likewise.
7134 (reg-i386-linux.c): Likewise.
7135 (reg-x86-64.o): Likewise.
7136 (reg-x86-64.c): Likewise.
7137 (reg-x86-64-linux.o): Likewise.
7138 (reg-x86-64-linux.c): Likewise.
7139 (i386.o): New.
7140 (i386.c): Likewise.
7141 (i386-linux.o): Likewise.
7142 (i386-linux.c): Likewise.
7143 (amd64.o): Likewise.
7144 (amd64.c): Likewise.
7145 (amd64-linux.o): Likewise.
7146 (amd64-linux.c): Likewise.
7147
7148 * configure.srv (srv_i386_regobj): New.
7149 (srv_i386_linux_regobj): Likewise.
7150 (srv_amd64_regobj): Likewise.
7151 (srv_amd64_linux_regobj): Likewise.
7152 (srv_i386_32bit_xmlfiles): Likewise.
7153 (srv_i386_64bit_xmlfiles): Likewise.
7154 (srv_i386_xmlfiles): Likewise.
7155 (srv_amd64_xmlfiles): Likewise.
7156 (srv_i386_linux_xmlfiles): Likewise.
7157 (srv_amd64_linux_xmlfiles): Likewise.
7158 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7159 srv_xmlfiles to $srv_i386_xmlfiles.
7160 (i[34567]86-*-mingw32ce*): Likewise.
7161 (i[34567]86-*-mingw*): Likewise.
7162 (i[34567]86-*-nto*): Likewise.
7163 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7164 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7165 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7166 (x86_64-*-linux*): Likewise.
7167
7168 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7169 (init_registers_amd64_linux): New.
7170 (x86_arch_setup): Replace init_registers_x86_64_linux with
7171 init_registers_amd64_linux.
7172
193f13e6
MK
71732010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7174
7175 * configure.ac: Check for libdl. If it is not available link against
7176 static libthread_db.
7177 * configure: Regenerate.
7178
85d721b8
PA
71792010-02-22 Pedro Alves <pedro@codesourcery.com>
7180
7181 PR9605
7182
7183 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7184 handing a read watchpoint.
7185 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7186
6076632b
DE
71872010-02-12 Doug Evans <dje@google.com>
7188
7189 * linux-low.c (linux_supports_tracefork_flag): Document.
7190 (linux_look_up_symbols): Add comment.
7191
3327ccf7
L
71922010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7193
7194 * regcache.c (supply_register): Clear regcache if buf is NULL.
7195
0718675c 71962010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7197 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7198
7199 * inferiors.c (find_inferior): Add function documentation.
7200 (unloaded_dll): Handle the case where the unloaded dll has not
7201 been previously registered in the dll list.
7202
177321bd
DJ
72032010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7204
7205 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7206 (thumb2_breakpoint): New.
7207 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7208
2b009048
DJ
72092010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7210
7211 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7212 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7213 breakpoints.
7214
3be029c7
PA
72152010-01-21 Pedro Alves <pedro@codesourcery.com>
7216
7217 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7218
18f5de3b
JK
72192010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7220
7221 * linux-s390-low.c (s390_collect_ptrace_register)
7222 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7223
3743bb4f
DE
72242010-01-21 Doug Evans <dje@google.com>
7225
14ce3065
DE
7226 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7227 (PTRACE_ARG4_TYPE): New macro.
7228 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7229 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7230 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7231 (usr_store_inferior_registers): Ditto.
7232 (linux_read_memory, linux_write_memory): Ditto.
7233 (linux_test_for_tracefork): Ditto.
7234
3743bb4f
DE
7235 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7236 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7237
8b315be5
PA
72382010-01-21 Pedro Alves <pedro@codesourcery.com>
7239
7240 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7241 target.
7242
85492558
PA
72432010-01-21 Pedro Alves <pedro@codesourcery.com>
7244
7245 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7246 prototype to take a regcache. Adjust.
7247
442ea881
PA
72482010-01-20 Pedro Alves <pedro@codesourcery.com>
7249
7250 * regcache.h (struct thread_info): Forward declare.
7251 (struct regcache): New.
7252 (new_register_cache): Adjust prototype.
7253 (get_thread_regcache): Declare.
7254 (free_register_cache): Adjust prototype.
7255 (registers_to_string, registers_from_string): Ditto.
7256 (supply_register, supply_register_by_name, collect_register)
7257 (collect_register_as_string, collect_register_by_name): Ditto.
7258 * regcache.c (struct inferior_regcache_data): Delete.
7259 (get_regcache): Rename to ...
7260 (get_thread_regcache): ... this. Adjust. Switch inferior before
7261 fetching registers.
7262 (regcache_invalidate_one): Adjust.
7263 (regcache_invalidate): Fix prototype.
7264 (new_register_cache): Return the new register cache.
7265 (free_register_cache): Change prototype.
7266 (realloc_register_cache): Adjust.
7267 (registers_to_string): Change prototype to take a regcache. Adjust.
7268 (registers_from_string): Ditto.
7269 (register_data): Ditto.
7270 (supply_register): Ditto.
7271 (supply_register_by_name): Ditto.
7272 (collect_register): Ditto.
7273 (collect_register_as_string): Ditto.
7274 (collect_register_by_name): Ditto.
7275 * server.c (process_serial_event): Adjust.
7276 * linux-low.h (regset_fill_func, regset_store_func): Change
7277 prototype.
7278 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7279 Change prototype.
7280 * linux-low.c (get_stop_pc): Adjust.
7281 (check_removed_breakpoint): Adjust.
7282 (linux_wait_for_event): Adjust.
7283 (linux_resume_one_lwp): Adjust.
7284 (fetch_register): Add regcache parameter. Adjust.
7285 (usr_store_inferior_registers): Ditto.
7286 (regsets_fetch_inferior_registers): Ditto.
7287 (regsets_store_inferior_registers): Ditto.
7288 (linux_fetch_registers, linux_store_registers): Ditto.
7289 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7290 regcache. Adjust.
43aaf8b6
PA
7291 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7292 Ditto.
442ea881
PA
7293 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7294 prototype to take a regcache.
7295 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7296 * remote-utils.c (convert_ascii_to_int, outreg)
7297 (prepare_resume_reply): Change prototype to take a regcache.
7298 Adjust.
7299 * target.h (struct target_ops) <fetch_registers, store_registers>:
7300 Change prototype to take a regcache.
7301 (fetch_inferior_registers, store_inferior_registers): Change
7302 prototype to take a regcache. Adjust.
7303 * proc-service.c (ps_lgetregs): Adjust.
7304 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7305 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7306 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7307 take a regcache. Adjust.
7308 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7309 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7310 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7311 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7312 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7313 (cris_cannot_fetch_register):
7314 (cris_breakpoint_at): Change prototype to take a regcache.
7315 Adjust.
7316 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7317 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7318 to take a regcache. Adjust.
7319 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7320 Adjust.
7321 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7322 take a regcache. Adjust.
7323 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7324 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7325 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7326 * linux-mips-low.c (mips_get_pc):
7327 (mips_set_pc): Change prototype to take a regcache. Adjust.
7328 (mips_reinsert_addr): Adjust.
7329 (mips_collect_register): Change prototype to take a regcache.
7330 Adjust.
7331 (mips_supply_register):
7332 (mips_collect_register_32bit, mips_supply_register_32bit)
7333 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7334 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7335 * linux-ppc-low.c (ppc_supply_ptrace_register)
7336 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7337 (parse_spufs_run): Adjust.
7338 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7339 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7340 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7341 take a regcache. Adjust.
7342 * linux-s390-low.c (s390_collect_ptrace_register)
7343 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7344 (s390_set_pc): Change prototype to take a regcache. Adjust.
7345 (s390_arch_setup): Adjust.
7346 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7347 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7348 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7349 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7350 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7351 regcache. Adjust.
7352 (sparc_breakpoint_at): Adjust.
7353 * linux-xtensa-low.c (xtensa_fill_gregset):
7354 (xtensa_store_gregset):
7355 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7356 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7357 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7358 prototype to take a regcache. Adjust.
7359 * win32-arm-low.c (arm_fetch_inferior_register)
7360 (arm_store_inferior_register): Change prototype to take a
7361 regcache. Adjust.
7362 * win32-i386-low.c (i386_fetch_inferior_register)
7363 (i386_store_inferior_register): Change prototype to take a
7364 regcache. Adjust.
7365 * win32-low.c (child_fetch_inferior_registers)
7366 (child_store_inferior_registers): Change prototype to take a
7367 regcache. Adjust.
7368 (win32_wait): Adjust.
7369 (win32_fetch_inferior_registers): Change prototype to take a
7370 regcache. Adjust.
7371 (win32_store_inferior_registers): Adjust.
7372 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7373 store_inferior_register>: Change prototype to take a regcache.
7374
60c3d7b0
DE
73752010-01-20 Doug Evans <dje@google.com>
7376
7377 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7378 #ifdef.
7379 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7380 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7381
dc146f7c
VP
73822010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7383
7384 * linux-low.c (linux_core_of_thread): New.
7385 (compare_ints, show_process, list_threads): New.
7386 (linux_qxfer_osdata): Report threads and cores.
7387 (linux_target_op): Register linux_core_of_thread.
7388 * remote-utils.c (prepare_resume_reply): Report the core.
7389 (buffer_xml_printf): Support %d specifier.
7390 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7391 New.
7392 (handle_query): Handle qXfer:threads. Announce availability
7393 thereof.
7394 * target.h (struct target_ops): New field core_of_thread.
7395
7803799a
UW
73962010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7397
7398 * Makefile.in (clean): Remove new generated files.
7399 (reg-s390.o, reg-s390.c): Remove rules.
7400 (reg-s390x.o, reg-s390x.c): Likewise.
7401 (s390-linux32.o, s390-linux32.c): Add rules.
7402 (s390-linux64.o, s390-linux64.c): Likewise.
7403 (s390x-linux64.o, s390x-linux64.c): Likewise.
7404 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7405 * linux-s390-low.c: Include <elf.h>.
7406 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7407 (init_registers_s390): Remove prototype.
7408 (init_registers_s390x): Likewise.
7409 (init_registers_s390_linux32): Add prototype.
7410 (init_registers_s390_linux64): Likewise.
7411 (init_registers_s390x_linux64): Likewise.
7412 (s390_num_regs_3264): New define.
7413 (s390_regmap_3264): New global variable.
7414 (s390_cannot_fetch_register): Remove obsolete check.
7415 (s390_cannot_store_register): Likewise.
7416 (s390_collect_ptrace_register): Handle upper/lower register halves.
7417 (s390_supply_ptrace_register): Likewise.
7418 (s390_fill_gregset): Update to register number changes.
7419 (s390_get_hwcap): New routine.
7420 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7421 Install appropriate regmap and register set.
7422
6e7ffa39
JB
74232010-01-01 Joel Brobecker <brobecker@adacore.com>
7424
7425 * server.c (gdbserver_version): Update copyright year to 2010.
7426 * gdbreplay.c (gdbreplay_version): Likewise.
7427
957f3f49
DE
74282009-12-28 Doug Evans <dje@google.com>
7429
7430 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7431 elf/external.h. Include <elf.h> instead but only if necessary.
7432
ca5c370d
PA
74332009-12-28 Pedro Alves <pedro@codesourcery.com>
7434
7435 * linux-low.c (linux_remove_process): Remove `detaching'
7436 parameter. Don't release/detach from thread_db here.
7437 (linux_kill): Release/detach from thread_db here, ...
7438 (linux_detach): ... and here, before actually detaching.
7439 (linux_wait_1): ... and here, when a process exits.
7440 * thread-db.c (any_thread_of): New.
7441 (thread_db_free): Switch the current inferior to a thread of the
7442 passed in process.
7443
4ee62156
DE
74442009-12-21 Doug Evans <dje@google.com>
7445
d90e6a88
DE
7446 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7447
c5f62d5f
DE
7448 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7449 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7450 warning ifndef __NR_tkill. Move setting of errno there too.
7451 Delete unnecessary resetting of errno after syscall.
7452 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7453
10e86dd7
DE
7454 * configure.ac: Check for dladdr.
7455 * config.in: Regenerate.
7456 * configure: Regenerate.
7457 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7458 (try_thread_db_load): Update.
7459
4ee62156
DE
7460 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7461
00f515da
DE
74622009-12-18 Doug Evans <dje@google.com>
7463
e9464885
DE
7464 * event-loop.c: Include unistd.h if it exists.
7465
07d4f67e
DE
7466 * linux-low.c (my_waitpid): Move definition away from being in
7467 between linux_tracefork_child/linux_test_for_tracefork.
7468
00f515da
DE
7469 * gdb_proc_service.h (psaddr_t): Fix type.
7470 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7471 signature to match glibc.
7472
1de1badb
DE
74732009-12-16 Doug Evans <dje@google.com>
7474
7475 * linux-low.c (linux_read_memory): Fix argument to read.
7476
aeeb81d1
PA
74772009-11-26 Pedro Alves <pedro@codesourcery.com>
7478
7479 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7480 events, don't leave current_inferior pointing at null.
7481
10357975
PA
74822009-11-26 Pedro Alves <pedro@codesourcery.com>
7483
7484 * win32-low.c (LOG): Delete.
7485 (OUTMSG): Output to stderr.
7486 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7487 on compile time LOG macro.
7488 (win32_wait): Fix debug output.
7489
cf6e3471
PA
74902009-11-26 Pedro Alves <pedro@codesourcery.com>
7491
7492 * win32-low.c (win32_add_one_solib): If the dll name is
7493 "ntdll.dll", prepend the system directory to the dll path.
7494
0c85e18e
MK
74952009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7496
7497 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7498
9ac544ce 74992009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7500 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7501
7502 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7503 * configure.ac: Check for __mcoldfire__ and set
7504 gdb_cv_m68k_is_coldfire.
7505 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7506 reg-cf.o and reg-m68k.o.
7507 * configure: Regenerated.
7508
fd7dd3e6
PA
75092009-11-16 Pedro Alves <pedro@codesourcery.com>
7510
7511 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7512 Pass it to thread_db_free.
7513 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7514 proper `detaching' argument to linux_remove_process.
7515 * linux-low.h (thread_db_free): Add `detaching' parameter.
7516 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7517 to thread_db_free.
7518 (thread_db_free): Add `detaching' parameter. Only
7519 call td_ta_clear_event if detaching from process.
7520
75aa492e
MK
75212009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7522
7523 * thread-db.c (thread_db_free): Fix typo.
7524
21e1bee4
PP
75252009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7526
7527 PR gdb/10838
7528 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7529
8838b45e
NS
75302009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7531
7532 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7533 with an i686 compiler.
7534 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7535 needed.
7536 * configure: Rebuilt.
7537
8a35fb51
SL
75382009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7539
7540 PR gdb/10783
7541
7542 * server.c (handle_search_memory_1): Correct read_addr initialization
7543 in loop for searching subsequent chunks.
7544
96f15937
PP
75452009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7546
7547 * configure.ac: New --with-libthread-db option.
7548 * thread-db.c: Allow direct dependence on libthread_db.
7549 (thread_db_free): Adjust.
7550 * config.in: Regenerate.
7551 * configure: Likewise.
889bf7c5 7552
5f7d1694
PP
75532009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7554
7555 PR gdb/10757
7556 * thread-db.c (attach_thread): New function.
7557 (maybe_attach_thread): Return success/failure.
7558 (find_new_threads_callback): Adjust.
889bf7c5
PA
7559 (thread_db_find_new_threads): Loop until no new threads.
7560
88e3b899
PA
75612009-10-13 Pedro Alves <pedro@codesourcery.com>
7562
7563 * proc-service.c (ps_lgetregs): Formatting.
7564
cdbfd419
PP
75652009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7566
7567 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7568 * configure.ac: Adjust.
7569 * linux-low.h (struct process_info_private): Move members to struct
7570 thread_db.
7571 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7572 * linux-low.c (linux_remove_process): Adjust.
7573 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7574 * server.c (handle_query): Move code ...
7575 (handle_monitor_command): ... here. New function.
7576 * target.h (struct target_ops): New member.
7577 * thread-db.c (struct thread_db): New.
7578 (libthread_db_search_path): New variable.
7579 (thread_db_create_event, thread_db_enable_reporting)
7580 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7581 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7582 (try_thread_db_load_1, dladdr_to_soname): New functions.
7583 (try_thread_db_load, thread_db_load_search): New functions.
7584 (thread_db_init): Search for libthread_db.
7585 (thread_db_free): New function.
7586 (thread_db_handle_monitor_command): Likewise.
7587 * config.in: Regenerate.
7588 * configure: Regenerate.
889bf7c5 7589
4168d2d6
UW
75902009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7591
7592 * spu-low.c (spu_kill): Wait for inferior to terminate.
7593 Call clear_inferiors.
7594 (spu_detach): Call clear_inferiors.
7595
81ecdfbb
RW
75962009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7597
7598 * aclocal.m4: Regenerate.
7599 * config.in: Likewise.
7600 * configure: Likewise.
7601
0b9ff2c0
UW
76022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7603
7604 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7605 (parse_spufs_run): New function.
7606 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7607 (ppc_breakpoint_at): Handle SPU breakpoints.
7608
efcbbd14
UW
76092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7610
7611 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7612 (SPUFS_MAGIC): Define.
7613 (spu_enumerate_spu_ids): New function.
7614 (linux_qxfer_spu): New function.
7615 (linux_target_ops): Install linux_qxfer_spu.
7616
f4d9bade
UW
76172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7618
7619 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7620 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7621 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7622 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7623 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7624 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7625 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7626 (init_registers_powerpc_cell32l): Add prototype.
7627 (init_registers_powerpc_cell64l): Likewise.
7628 (ppc_arch_setup): Detect Cell/B.E. architecture.
7629
96e946ca
RW
76302009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7631
7632 * Makefile.in (datarootdir): New variable.
7633
58d6951d
DJ
76342009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7635
7636 * linux-low.c (linux_write_memory): Update debugging output.
7637 * Makefile.in (clean): Add new descriptions.
7638 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7639 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7640 * configure.srv: Add new files for arm*-*-linux*.
7641 * linux-arm-low.c: Add new declarations.
7642 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7643 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7644 (HWCAP_VFPv3D16): New.
7645 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7646 instead of __IWMMXT__.
7647 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7648 (arm_arch_setup): New.
7649 (target_regsets): Remove #ifdef. Add VFP regset.
7650 (the_low_target): Use arm_arch_setup.
7651
12b42a12
DJ
76522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7653
7654 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7655 the main thread again.
7656
ac8c974e
AR
76572009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7658
7659 Adding Neutrino gdbserver.
7660 * configure: Regenerated.
7661 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7662 * configure.srv (i[34567]86-*-nto*): New target.
7663 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7664 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7665 (nto_comctrl) [__QNX__]: New function.
7666 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7667
4424e0c3 76682009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7669
7670 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7671 srv_tgtobj.
7672
912cf4ba
PA
76732009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7674 Pedro Alves <pedro@codesourcery.com>
7675
7676 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7677 don't support CONTEXT_EXTENDED_REGISTERS.
7678 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7679 (the_low_target): Install them.
7680 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7681 failing with ERROR_PIPE_NOT_CONNECTED.
7682
aa5ca48f
DE
76832009-06-30 Doug Evans <dje@google.com>
7684 Pierre Muller <muller@ics.u-strasbg.fr>
7685
7686 Add h/w watchpoint support to x86-linux, win32-i386.
7687 * Makefile.in (SFILES): Add i386-low.c
7688 (i386_low_h): Define.
7689 (i386-low.o): Add dependencies.
7690 (linux-x86-low.o): Add i386-low.h dependency.
7691 (win32-i386-low.o): Ditto.
7692 * i386-low.c: New file.
7693 * i386-low.h: New file.
7694 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7695 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7696 * linux-low.c (linux_add_process): Initialize arch_private.
7697 (linux_remove_process): Free arch_private.
7698 (add_lwp): Initialize arch_private.
7699 (delete_lwp): Free arch_private.
7700 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7701 provided.
7702 * linux-low.h (process_info_private): New member arch_private.
7703 (lwp_info): New member arch_private.
7704 (linux_target_ops): New members new_process, new_thread,
7705 prepare_to_resume.
7706 (ptid_of): New macro.
7707 * linux-x86-low.c: Include stddef.h, i386-low.h.
7708 (arch_process_info): New struct.
7709 (arch_lwp_info): New struct.
7710 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7711 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7712 (i386_dr_low_get_status): New function.
7713 (x86_insert_point, x86_remove_point): New functions.
7714 (x86_stopped_by_watchpoint): New function.
7715 (x86_stopped_data_address): New function.
7716 (x86_linux_new_process, x86_linux_new_thread): New functions.
7717 (x86_linux_prepare_to_resume): New function.
7718 (the_low_target): Add entries for insert_point, remove_point,
7719 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7720 prepare_to_resume.
7721 * server.c (debug_hw_points): New global.
7722 (monitor_show_help): Document set debug-hw-points.
7723 (handle_query): Process "set debug-hw-points".
7724 * server.h (debug_hw_points): Declare.
7725 (paddress): Declare.
7726 * utils.c (NUMCELLS, CELLSIZE): New macros.
7727 (get_sell, xsnprintf, paddress): New functions.
7728 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7729 remove_point, stopped_by_watchpoint, stopped_data_address.
7730 * win32-i386-low.c: Include i386-low.h.
7731 (debug_reg_state): Replaces dr.
7732 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7733 (i386_dr_low_get_status): New function.
7734 (i386_insert_point, i386_remove_point): New functions.
7735 (i386_stopped_by_watchpoint): New function.
7736 (i386_stopped_data_address): New function.
7737 (i386_initial_stuff): Update.
7738 (get_thread_context,set_thread_context,i386_thread_added): Update.
7739 (the_low_target): Add entries for insert_point,
7740 remove_point, stopped_by_watchpoint, stopped_data_address.
7741 * win32-low.c (win32_insert_watchpoint): New function.
7742 (win32_remove_watchpoint): New function.
7743 (win32_stopped_by_watchpoint): New function.
7744 (win32_stopped_data_address): New function.
7745 (win32_target_ops): Add entries for insert_watchpoint,
7746 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7747 * win32-low.h (win32_target_ops): New members insert_point,
7748 remove_point, stopped_by_watchpoint, stopped_data_address.
7749
d993e290
PA
77502009-06-25 Pedro Alves <pedro@codesourcery.com>
7751
7752 * server.c (process_serial_event): Re-return unsupported, not
7753 error, if the type isn't recognized. Re-allow supporting only
7754 insert or remove packets. Also call require_running for
7755 breakpoints. Add missing break statement to default case. Tidy.
7756 * target.h (struct target_ops): Rename insert_watchpoint to
7757 insert_point, and remove_watchpoint to remove_point.
7758
7759 * linux-low.h (struct linux_target_ops): Likewise.
7760 * linux-low.c (linux_insert_watchpoint): Rename to ...
7761 (linux_insert_point): ... this. Adjust.
7762 (linux_remove_watchpoint): Rename to ...
7763 (linux_remove_point): ... this. Adjust.
7764 (linux_target_ops): Adjust.
7765 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7766 (cris_insert_point): ... this.
7767 (cris_remove_watchpoint): Rename to ...
7768 (cris_remove_point): ... this.
7769 (the_low_target): Adjust.
7770
0f54c268
PM
77712009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7772
7773 * server.c (handle_v_kill): Pass signal_pid to
7774 kill_inferior if multi_process is zero.
7775
c6314022
AR
77762009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7777
7778 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7779 * target.h (target_ops): Comment for *_watchpoint to make it clear
7780 the functions can get types '0' and '1'.
7781
4463ce24
AR
77822009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7783
7784 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7785 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7786 * regcache.c (get_regcache): Likewise.
7787 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7788 * win32-low.c (child_fetch_inferior_registers): Remove check for
7789 regno 0.
7790
cf8fd78b
PA
77912009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7792 Pedro Alves <pedro@codesourcery.com>
7793
7794 * target.h (struct target_ops) <supports_multi_process>: New
7795 callback.
7796 (target_supports_multi_process): New.
7797 * server.c (handle_query): Even if GDB reports support, only
7798 enable multi-process if the target also supports it. Report
7799 multi-process support only if the target backend supports it.
7800 * linux-low.c (linux_supports_multi_process): New function.
7801 (linux_target_ops): Install it as target_supports_multi_process
7802 callback.
7803
47c0c975
DE
78042009-05-24 Doug Evans <dje@google.com>
7805
e09875d4
DE
7806 Global renaming of find_thread_pid to find_thread_ptid.
7807 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7808 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7809 All callers updated.
7810
e27d73f6
DE
7811 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7812 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7813 directly.
7814
47c0c975
DE
7815 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7816 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7817 (linux_resume_one_lwp): Ditto.
7818
2acc282a
DE
78192009-05-23 Doug Evans <dje@google.com>
7820
7821 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7822 from struct inferior_list_entry * to struct lwp_info *.
7823 All callers updated.
7824
9f1036c1
DE
78252009-05-13 Doug Evans <dje@google.com>
7826
7827 * linux-x86-low.c: Don't include assert.h.
7828 (x86_siginfo_fixup): Use fatal, not assert.
7829 (x86_arch_setup): Fix comment.
7830
d0722149
DE
78312009-05-12 Doug Evans <dje@google.com>
7832
7833 Biarch support for i386/amd64 gdbserver.
7834 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7835 Add linux-x86-low.c.
7836 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7837 (linux-x86-low.o): Add.
7838 * linux-x86-64-low.c: Delete.
7839 * linux-i386-low.c: Delete.
7840 * linux-x86-low.c: New file.
7841 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7842 linux-x86-low.o.
7843 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7844 linux-x86-low.o.
7845 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7846 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7847 (linux_child_pid_to_exec_file): New function.
7848 (elf_64_header_p, elf_64_file_p): New functions.
7849 (siginfo_fixup): New function.
7850 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7851 give target a chance to convert layout.
7852 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7853 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7854
fdeb2a12
DE
78552009-05-07 Doug Evans <dje@google.com>
7856
7857 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7858 (regsets_store_inferior_registers): Ditto.
7859
a6dbe5df
PA
78602009-05-06 Pedro Alves <pedro@codesourcery.com>
7861
7862 PR server/10048
7863
7864 * linux-low.c (must_set_ptrace_flags): Delete.
7865 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7866 of the global.
7867 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7868 `lwp->must_set_ptrace_flags' instead.
ba42693b 7869 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7870 (linux_wait_1): ... not here.
7871
5091eb23
DE
78722009-04-30 Doug Evans <dje@google.com>
7873
9f767825
DE
7874 * inferiors.c (started_inferior_callback): New function.
7875 (attached_inferior_callback): New function.
7876 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7877 * server.c (print_started_pid, print_attached_pid): New functions.
7878 (detach_or_kill_for_exit): New function.
7879 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7880 * server.h (have_started_inferiors_p): Declare.
7881 (have_attached_inferiors_p): Declare.
7882
5091eb23
DE
7883 * inferiors.c (remove_process): Fix memory leak, free process.
7884 * linux-low.c (linux_remove_process): New function.
7885 (linux_kill): Call it instead of remove_process.
7886 (linux_detach, linux_wait_1): Ditto.
7887
155c8968
PA
78882009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7889
7890 * configure.srv: Add x86 Windows CE target.
7891
7fe519cb
UW
78922009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7893
7894 * inferiors.c (get_thread_process): Make global.
7895 * server.h (get_thread_process): Add prototype.
7896 * thread-db.c (find_one_thread): Use get_thread_process
7897 instead of current_process.
7898 (thread_db_get_tls_address): Do not crash if called when
7899 thread layer is not yet initialized.
7900
5472f405
UW
79012009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7902
7903 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7904 * spu-low.c (current_tid): Rename to ...
7905 (current_ptid): ... this.
7906 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7907 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7908 ptid_get_lwp (current_ptid) instead of current_tid.
7909 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7910 instead of current_tid. Use find_process_pid to verify pid
7911 argument is valid. Pass proper argument to remove_process.
7912 (spu_thread_alive): Compare current_ptid instead of current_tid.
7913 (spu_resume): Likewise.
7914
55ac2b99
PA
79152009-04-02 Pedro Alves <pedro@codesourcery.com>
7916
7917 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7918 variable.
7919
95954743
PA
79202009-04-01 Pedro Alves <pedro@codesourcery.com>
7921
7922 Implement the multiprocess extensions, and add linux multiprocess
7923 support.
7924
7925 * server.h (ULONGEST): Declare.
7926 (struct ptid, ptid_t): New.
7927 (minus_one_ptid, null_ptid): Declare.
7928 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7929 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7930 (struct inferior_list_entry): Change `id' type from unsigned from
7931 to ptid_t.
7932 (struct sym_cache, struct breakpoint, struct
7933 process_info_private): Forward declare.
7934 (struct process_info): Declare.
7935 (current_process): Declare.
7936 (all_processes): Declare.
7937 (initialize_inferiors): Declare.
7938 (add_thread): Adjust to use ptid_t.
7939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7940 (add_process, remove_process, find_thread_pid): Declare.
7941 (find_inferior_id): Adjust to use ptid_t.
7942 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7943 (multi_process): Declare.
7944 (push_event): Adjust to use ptid_t.
7945 (read_ptid, write_ptid): Declare.
7946 (prepare_resume_reply): Adjust to use ptid_t.
7947 (clear_symbol_cache): Declare.
7948 * inferiors.c (all_processes): New.
7949 (null_ptid, minus_one_ptid): New.
7950 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7951 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7952 (add_thread): Change unsigned long to ptid. Remove gdb_id
7953 parameter. Adjust.
7954 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7955 (gdb_id_to_thread): Rename to ...
7956 (find_thread_pid): ... this. Change unsigned long to ptid.
7957 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7958 (loaded_dll, pull_pid_from_list): Adjust.
7959 (add_process, remove_process, find_process_pid)
7960 (get_thread_process, current_process, initialize_inferiors): New.
7961 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7962 (struct target_waitstatus) <related_pid>: Ditto.
7963 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7964 return type to int.
7965 (struct target_ops) <join>: Add `pid' argument.
7966 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7967 (struct target_ops) <wait>: Add `ptid' field. Change return type
7968 to ptid.
7969 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7970 (mywait): Add `ptid' argument. Change return type to ptid_t.
7971 (target_pid_to_str): Declare.
7972 * target.c (set_desired_inferior): Adjust to use ptids.
7973 (mywait): Add new `ptid' argument. Adjust.
7974 (target_pid_to_str): New.
7975 * mem-break.h (free_all_breakpoints): Declare.
7976 * mem-break.c (breakpoints): Delelete.
7977 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7978 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7979 to use per-process breakpoint list.
7980 (free_all_breakpoints): New.
7981 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7982 (symbol_cache, all_symbols_looked_up): Delete.
7983 (hexchars): New.
7984 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7985 read_ptid): New.
7986 (prepare_resume_reply): Change ptid argument's type from unsigned
7987 long to ptid_t. Adjust. Implement W;process and X;process.
7988 (free_sym_cache, clear_symbol_cache): New.
7989 (look_up_one_symbol): Adjust to per-process symbol cache. *
7990 * server.c (cont_thread, general_thread, step_thread): Change type
7991 to ptid_t.
7992 (attached): Delete.
7993 (multi_process): New.
7994 (last_ptid): Change type to ptid_t.
7995 (struct vstop_notif) <ptid>: Change type to ptid_t.
7996 (queue_stop_reply, push_event): Change `ptid' argument's type to
7997 ptid_t.
7998 (discard_queued_stop_replies): Add `pid' argument.
7999 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8000 changes. Don't reference the `attached' global.
8001 (attach_inferior): Adjust to mywait interface changes.
8002 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8003 features. Handle and report "multiprocess+". Handle
8004 "qAttached:PID".
8005 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8006 changes.
8007 (handle_v_kill): New.
8008 (handle_v_stopped): Adjust to use target_pid_to_str.
8009 (handle_v_requests): Allow multiple attaches and runs when
8010 multiprocess extensions are in effect. Handle "vKill".
8011 (myresume): Adjust to use ptids.
8012 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8013 (handle_status): Adjust to discard_queued_stop_replies interface
8014 change.
8015 (first_thread_of, kill_inferior_callback)
8016 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8017 (main): Call initialize_inferiors. Adjust to use ptids, killing
8018 and detaching from all inferiors. Handle multiprocess packet
8019 variants.
8020 * linux-low.h: Include gdb_proc_service.h.
8021 (struct process_info_private): New.
8022 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8023 <lwpid_of>: Use ptid_get_lwp.
8024 (get_lwp_thread): Adjust.
8025 (struct lwp_info): Add `dead' member.
8026 (find_lwp_pid): Declare.
8027 * linux-low.c (thread_db_active): Delete.
8028 (new_inferior): Adjust comment.
8029 (inferior_pid): Delete.
8030 (linux_add_process): New.
8031 (handle_extended_wait): Adjust.
8032 (add_lwp): Change unsigned long to ptid.
8033 (linux_create_inferior): Add process to processes table. Adjust
8034 to use ptids. Don't set new_inferior here.
8035 (linux_attach_lwp): Rename to ...
8036 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8037 it. Adjust to use ptids.
8038 (linux_attach_lwp): New.
8039 (linux_attach): Add process to processes table. Don't set
8040 new_inferior here.
8041 (struct counter): New.
8042 (second_thread_of_pid_p, last_thread_of_process_p): New.
8043 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8044 multiple processes.
8045 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8046 processes. Remove process from process table.
8047 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8048 to multiple processes.
8049 (any_thread_of): New.
8050 (linux_detach): Add `pid' argument, and handle it. Remove process
8051 from processes table.
8052 (linux_join): Add `pid' argument. Handle it.
8053 (linux_thread_alive): Change unsighed long argument to ptid_t.
8054 Consider dead lwps as not being alive.
8055 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8056 threads we're not interested in.
8057 (same_lwp, find_lwp_pid): New.
8058 (linux_wait_for_lwp): Change `pid' argument's type from int to
8059 ptid_t. Adjust.
8060 (linux_wait_for_event): Rename to ...
8061 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8062 from int to ptid_t. Adjust.
8063 (linux_wait_for_event): New.
8064 (linux_wait_1): Add `ptid' argument. Change return type to
8065 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8066 that exit from the process table.
8067 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8068 Adjust.
8069 (mark_lwp_dead): New.
8070 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8071 stopping all threads, mark its main lwp as dead.
8072 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8073 ptids.
8074 (fetch_register, usr_store_inferior_registers)
8075 (regsets_fetch_inferior_registers)
8076 (regsets_store_inferior_registers, linux_read_memory)
8077 (linux_write_memory): Inline `inferior_pid'.
8078 (linux_look_up_symbols): Adjust to use per-process
8079 `thread_db_active'.
8080 (linux_request_interrupt): Adjust to use ptids.
8081 (linux_read_auxv): Inline `inferior_pid'.
8082 (initialize_low): Don't reference thread_db_active.
8083 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8084 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8085 (ps_getpid): Return the pid of the current inferior.
8086 * thread-db.c (proc_handle, thread_agent): Delete.
8087 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8088 per-process data.
8089 (find_one_thread): Change argument type to ptid_t. Adjust to
8090 per-process data.
8091 (maybe_attach_thread): Adjust to per-process data and ptids.
8092 (thread_db_find_new_threads): Ditto.
8093 (thread_db_init): Ditto.
8094 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8095 processes table. Adjust to use ptids.
8096 (spu_kill, spu_detach): Adjust interface. Remove process from
8097 processes table.
8098 (spu_join, spu_thread_alive): Adjust interface.
8099 (spu_wait): Adjust interface. Remove process from processes
8100 table. Adjust to use ptids.
8101 * win32-low.c (current_inferior_tid): Delete.
8102 (current_inferior_ptid): New.
8103 (debug_event_ptid): New.
8104 (thread_rec): Take a ptid. Adjust.
8105 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8106 (child_delete_thread): Ditto.
8107 (do_initial_child_stuff): Add `attached' argument. Add process to
8108 processes table.
8109 (child_fetch_inferior_registers, child_store_inferior_registers):
8110 Adjust.
8111 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8112 (win32_attach): Pass 1 to do_initial_child_stuff.
8113 (win32_kill): Adjust interface. Remove process from processes
8114 table.
8115 (win32_detach): Ditto.
8116 (win32_join): Adjust interface.
8117 (win32_thread_alive): Take a ptid.
8118 (win32_resume): Adjust to use ptids.
8119 (get_child_debug_event): Ditto.
8120 (win32_wait): Adjust interface. Remove exiting process from
8121 processes table.
8122
bd99dc85
PA
81232009-04-01 Pedro Alves <pedro@codesourcery.com>
8124
8125 Non-stop mode support.
8126
8127 * server.h (non_stop): Declare.
8128 (gdb_client_data, handler_func): Declare.
8129 (delete_file_handler, add_file_handler, start_event_loop):
8130 Declare.
8131 (handle_serial_event, handle_target_event, push_event)
8132 (putpkt_notif): Declare.
8133 * target.h (enum resume_kind): New.
8134 (struct thread_resume): Replace `step' field by `kind' field.
8135 (TARGET_WNOHANG): Define.
8136 (struct target_ops) <wait>: Add `options' argument.
8137 <supports_non_stop, async, start_non_stop>: New fields.
8138 (target_supports_non_stop, target_async): New.
8139 (start_non_stop): Declare.
8140 (mywait): Add `options' argument.
8141 * target.c (mywait): Add `options' argument. Print child exit
8142 notifications here.
8143 (start_non_stop): New.
8144 * server.c (non_stop, own_buf, mem_buf): New globals.
8145 (struct vstop_notif): New.
8146 (notif_queue): New global.
8147 (queue_stop_reply, push_event, discard_queued_stop_replies)
8148 (send_next_stop_reply): New.
8149 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8150 interface changes.
8151 (attach_inferior): In non-stop mode, don't wait for the target
8152 here.
8153 (handle_general_set): Handle QNonStop.
8154 (handle_query): When handling qC, return the current general
8155 thread, instead of the first thread of the list.
8156 (handle_query): If the backend supports non-stop mode, include
8157 QNonStop+ in the qSupported query response.
8158 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8159 and non-stop mode.
8160 (handle_v_attach, handle_v_run): Handle non-stop mode.
8161 (handle_v_stopped): New.
8162 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8163 (myresume): Adjust to use resume_kind. Handle non-stop.
8164 (queue_stop_reply_callback): New.
8165 (handle_status): Handle non-stop mode.
8166 (main): Clear non_stop flag on reconnection. Use the event-loop.
8167 Refactor serial protocol handling from here ...
8168 (process_serial_event): ... to this new function. When GDB
8169 selects any thread, select one here. In non-stop mode, wait until
8170 GDB acks all pending events before exiting.
8171 (handle_serial_event, handle_target_event): New.
8172 * remote-utils.c (remote_open): Install remote_desc in the event
8173 loop.
8174 (remote_close): Remove remote_desc from the event loop.
8175 (putpkt_binary): Rename to...
8176 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8177 (putpkt_binary): New as wrapper around putpkt_binary_1.
8178 (putpkt_notif): New.
8179 (prepare_resume_reply): In non-stop mode, don't change the
8180 general_thread.
8181 * event-loop.c: New.
8182 * Makefile.in (OBJ): Add event-loop.o.
8183 (event-loop.o): New rule.
8184
8185 * linux-low.h (pid_of): Moved here.
8186 (lwpid_of): New.
8187 (get_lwp_thread): Use lwpid_of.
8188 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8189 * linux-low.c (pid_of): Delete.
8190 (inferior_pid): Use lwpid_of.
8191 (linux_event_pipe): New.
8192 (target_is_async_p): New.
8193 (delete_lwp): New.
8194 (handle_extended_wait): Use lwpid_of.
8195 (add_lwp): Don't set lwpid field.
8196 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8197 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8198 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8199 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8200 first. Adjust to linux_wait_for_event interface changes. Use
8201 lwpid_of.
8202 (linux_detach): Don't delete the main lwp here.
8203 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8204 (status_pending_p): Don't consider explicitly suspended lwps.
8205 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8206 pointer. Add OPTIONS argument. Change return type to int. Use
8207 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8208 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8209 pointer. Add status pointer argument. Return a pid instead of a
8210 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8211 changes. In non-stop mode, don't switch to a random thread.
8212 (linux_wait): Rename to...
8213 (linux_wait_1): ... this. Add target_options argument, and handle
8214 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8215 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8216 clean exit and signal exit code. Don't stop all threads in
8217 non-stop mode. In all-stop mode, only stop all threads when
8218 reporting a stop to GDB. Handle explicit thread stop requests.
8219 (async_file_flush, async_file_mark): New.
8220 (linux_wait): New.
8221 (send_sigstop): Use lwpid_of.
8222 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8223 interface changes. In non-stop mode, don't switch to a random
8224 thread.
8225 (linux_resume_one_lwp): Use lwpid_of.
8226 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8227 (linux_resume_one_thread): ... this. Handle resume_stop. In
8228 non-stop mode, don't look for pending flag in all threads.
8229 (resume_status_pending_p): Don't consider explicitly suspended
8230 threads.
8231 (my_waitpid): Reimplement. Emulate __WALL.
8232 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8233 Use lwpid_of.
8234 (sigchld_handler, linux_supports_non_stop, linux_async)
8235 (linux_start_non_stop): New.
8236 (linux_target_ops): Register linux_supports_non_stop, linux_async
8237 and linux_start_non_stop.
8238 (initialize_low): Install SIGCHLD handler.
8239 * thread-db.c (thread_db_create_event, find_one_thread)
8240 (thread_db_get_tls_address): Use lwpid_of.
8241 * win32-low.c (win32_detach): Adjust to use resume_kind.
8242 (win32_wait): Add `options' argument.
8243 * spu-low.c (spu_resume): Adjust to use resume_kind.
8244 (spu_wait): Add `options' argument.
8245
5b1c542e
PA
82462009-04-01 Pedro Alves <pedro@codesourcery.com>
8247
8248 Decouple target code from remote protocol.
8249
8250 * target.h (enum target_waitkind): New.
8251 (struct target_waitstatus): New.
8252 (struct target_ops) <wait>: Return an unsigned long. Take a
8253 target_waitstatus pointer instead of a char pointer.
8254 (mywait): Likewise.
8255 * target.c (mywait): Change prototype to return an unsigned long.
8256 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8257 * server.h (thread_from_wait, old_thread_from_wait): Delete
8258 declarations.
8259 (prepare_resume_reply): Change prototype to take a
8260 target_waitstatus.
8261 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8262 (last_status, last_ptid): New.
8263 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8264 pid instead of a signal.
8265 (attach_inferior): Remove "status" and "signal" parameters.
8266 Adjust.
8267 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8268 not as an address.
8269 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8270 (handle_v_requests, myresume): Remove "status" and "signal"
8271 parameters. Adjust.
8272 (handle_status): New.
8273 (main): Delete local `status'. Adjust.
8274 * remote-utils.c: Include target.h.
8275 (prepare_resume_reply): Change prototype to take a
8276 target_waitstatus. Adjust.
8277
8278 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8279 interface.
8280 * spu-low.c (spu_wait): Adjust.
8281 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8282 Delete.
8283 (win32_wait): Adjust.
8284
2bd7c093
PA
82852009-04-01 Pedro Alves <pedro@codesourcery.com>
8286
8287 * target.h (struct thread_resume): Delete leave_stopped member.
8288 (struct target_ops): Add a `n' argument to the `resume' callback.
8289 * server.c (start_inferior): Adjust.
8290 (handle_v_cont, myresume): Adjust.
8291 * linux-low.c (check_removed_breakpoint): Adjust to resume
8292 interface change, and to removed leave_stopped field.
8293 (resume_ptr): Delete.
8294 (struct thread_resume_array): New.
8295 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8296 resume interface change.
8297 (linux_continue_one_thread, linux_queue_one_thread)
8298 (resume_status_pending_p): Check if the resume field is NULL
8299 instead of checking the leave_stopped member.
8300 (linux_resume): Adjust to the target resume interface change.
8301 * spu-low.c (spu_resume): Adjust to the target resume interface
8302 change.
8303 * win32-low.c (win32_detach, win32_resume): Ditto.
8304
c35fafde
PA
83052009-04-01 Pedro Alves <pedro@codesourcery.com>
8306
8307 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8308 flag.
8309 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8310 pending.
8311 (linux_continue_one_thread): Only preserve the stepping flag if
8312 there's a pending breakpoint.
8313
0a59d50b
PA
83142009-03-31 Pedro Alves <pedro@codesourcery.com>
8315
8316 * server.c (main): After the inferior having exited, call
8317 remote_close before exiting gdbserver.
8318
f04c6d38
TJB
83192009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8320
8321 Fix size of FPSCR in Power 7 processors.
8322 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8323 (PPC_FEATURE_HAS_DFP): New #define.
8324 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8325 size of the FPSCR.
8326
78e5cee6
PA
83272009-03-23 Pedro Alves <pedro@codesourcery.com>
8328
8329 * server.c (handle_query) Whitespace and formatting.
8330
1b3f6016
PA
83312009-03-22 Pedro Alves <pedro@codesourcery.com>
8332
8333 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8334 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8335 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8336 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8337 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8338 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8339 Makefile.in, configure.ac: Fix whitespace throughout.
8340 * configure: Regenerate.
8341
a07b2135
PA
83422009-03-22 Pedro Alves <pedro@codesourcery.com>
8343
8344 * inferiors.c (find_inferior): Make it safe for the callback
8345 function to delete the currently iterated inferior.
8346
67cc2626
PA
83472009-03-22 Pedro Alves <pedro@codesourcery.com>
8348
8349 * Makefile.in (linuw_low_h): Move higher.
8350 (thread-db.o): Depend on $(linux_low_h).
8351
54a0b537
PA
83522009-03-17 Pedro Alves <pedro@codesourcery.com>
8353
8354 Rename "process" to "lwp" throughout.
8355
8356 * linux-low.c (all_processes): Rename to...
8357 (all_lwps): ... this.
8358 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8359 (add_process): Rename to ...
8360 (add_lwp): ... this. Adjust.
8361 (linux_create_inferior): Adjust.
8362 (linux_attach_lwp): Adjust.
8363 (linux_attach): Adjust.
8364 (linux_kill_one_process): Rename to ...
8365 (linux_kill_one_lwp): ... this. Adjust.
8366 (linux_kill): Adjust.
8367 (linux_detach_one_process): Rename to ...
8368 (linux_detach_one_lwp): ... this. Adjust.
8369 (linux_detach): Adjust.
8370 (check_removed_breakpoint): Adjust.
8371 (status_pending_p): Adjust.
8372 (linux_wait_for_process): Rename to ...
8373 (linux_wait_for_lwp): ... this. Adjust.
8374 (linux_wait_for_event): Adjust.
8375 (send_sigstop): Adjust.
8376 (wait_for_sigstop): Adjust.
8377 (stop_all_processes): Rename to ...
8378 (stop_all_lwps): ... this.
8379 (linux_resume_one_process): Rename to ...
8380 (linux_resume_one_lwp): ... this. Adjust.
8381 (linux_set_resume_request, linux_continue_one_thread)
8382 (linux_queue_one_thread, resume_status_pending_p)
8383 (usr_store_inferior_registers, regsets_store_inferior_registers)
8384 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8385 Adjust.
8386 * linux-low.h (get_process): Rename to ...
8387 (get_lwp): ... this. Adjust.
8388 (get_thread_process): Rename to ...
8389 (get_thread_lwp): ... this. Adjust.
8390 (get_process_thread): Rename to ...
8391 (get_lwp_thread): ... this. Adjust.
8392 (struct process_info): Rename to ...
8393 (struct lwp_info): ... this.
8394 (all_processes): Rename to ...
8395 (all_lwps): ... this.
8396 * proc-service.c (ps_lgetregs): Adjust.
8397 * thread-db.c (thread_db_create_event, find_one_thread)
8398 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8399
0b16c5cf
PA
84002009-03-14 Pedro Alves <pedro@codesourcery.com>
8401
8402 * server.c (handle_query): Handle "qAttached".
8403
32de4b9d
NS
84042009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8405
8406 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8407 GPLv3, update license URL.
8408
2aecd87f
DE
84092009-03-01 Doug Evans <dje@google.com>
8410
93efd302 8411 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8412 (server_h): Add gdb_signals.h.
8413 (signals.o): Update.
8414 * server.h (target_signal_from_host,target_signal_to_host_p)
8415 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8416
86b1f9c5
PM
84172009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8418
8419 * remote-utils.c (getpkt): Also generate remote-debug
8420 information if noack_mode is set.
8421
4aa995e1
PA
84222009-02-06 Pedro Alves <pedro@codesourcery.com>
8423
8424 * server.c (handle_query): Report qXfer:siginfo:read and
8425 qXfer:siginfo:write as supported and handle them.
8426 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8427 * linux-low.c (linux_xfer_siginfo): New.
8428 (linux_target_ops): Set it.
8429
62709adf
PA
84302009-01-26 Pedro Alves <pedro@codesourcery.com>
8431
8432 * server.c (gdbserver_usage): Mention --remote-debug.
8433 (main): Accept '--remote-debug' switch.
8434
aef93bd7
DE
84352009-01-18 Doug Evans <dje@google.com>
8436
8437 * regcache.c (new_register_cache): No need to check result of xcalloc.
8438 * server.c (handle_search_memory): Back out calls to xmalloc,
8439 result is checked and error is returned to user upon failure.
8440 (handle_query): Ditto. Add more checks for result of malloc.
8441 (handle_v_cont): Check result of malloc, report error back to
8442 user upon failure.
8443 (handle_v_run): Ditto. Call freeargv.
8444 * server.h (freeargv): Declare.
8445 * utils.c (freeargv): New fn.
8446
54363045
DE
84472009-01-15 Doug Evans <dje@google.com>
8448
f626972c
DE
8449 * gdbreplay.c (perror_with_name): Make arg const char *.
8450 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8451 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8452 * utils.c (perror_with_name): Make arg const char *.
54363045 8453
18aae699
PA
84542009-01-14 Pedro Alves <pedro@codesourcery.com>
8455
8456 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8457 when handling a EXIT_PROCESS_DEBUG_EVENT.
8458
ff703abe
JB
84592009-01-06 Joel Brobecker <brobecker@adacore.com>
8460
8461 * gdbreplay.c (gdbreplay_version): Update copyright year.
8462 * server.c (gdbserver_version): Likewise.
8463
f21cc1a2 84642009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8465
8466 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8467 (handle_extended_wait): Improve comment.
0e21c1ec 8468
bca929d3
DE
84692008-12-13 Doug Evans <dje@google.com>
8470
8471 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8472 * server.h (ATTR_MALLOC): New macro.
8473 (xmalloc,xcalloc,xstrdup): Declare.
8474 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8475 * inferiors.c: Ditto.
8476 * linux-low.c: Ditto.
8477 * mem-break.c: Ditto.
8478 * regcache.c: Ditto.
8479 * remote-utils.c: Ditto.
8480 * server.c: Ditto.
8481 * target.c: Ditto.
8482 * win32-low.c: Ditto.
8483
97438e3f
DE
84842008-12-12 Doug Evans <dje@google.com>
8485
896c7fbb
DE
8486 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8487 in debugging printf.
8488
97438e3f
DE
8489 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8490
e3b886f8
DE
84912008-12-09 Doug Evans <dje@google.com>
8492
8493 * linux-low.h (struct process_info): Delete member tid, unused.
8494 * thread-db.c (find_one_thread): Update.
8495 (maybe_attach_thread): Update.
8496
07e059b5
VP
84972008-12-02 Pedro Alves <pedro@codesourcery.com>
8498
889bf7c5
PA
8499 * target.h (struct target_ops): Add qxfer_osdata member.
8500 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8501 and dirent.h.
8502 (linux_qxfer_osdata): New functions.
8503 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8504 callback.
8505 * server.c (handle_query): Handle "qXfer:osdata:read:".
8506 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8507 (buffer_xml_printf): New functions.
8508 * server.h (struct buffer): New.
8509 (buffer_grow_str, buffer_grow_str0): New macros.
8510 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8511 (buffer_xml_printf): Declare.
07e059b5 8512
4cab47ab
DE
85132008-11-24 Doug Evans <dje@google.com>
8514
8515 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8516
f142445f
DJ
85172008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8518
8519 * server.c (handle_v_run): Always use the supplied argument list.
8520
d0107bb6 85212008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8522
d0107bb6
BW
8523 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8524 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8525
2c4ad781
TJB
85262008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8527
8528 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8529 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8530 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8531 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8532 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8533 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8534 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8535 XML target descriptions.
8536 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8537 when inferior is running on an ISA 2.05 or later processor. Add
8538 special case to return offset for full 64-bit slot of FPSCR when
8539 in 32-bits.
8540
dfb64f85
DJ
85412008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8542
8543 * Makefile.in (SFILES, clean): Added sparc64 files.
8544 (reg-sparc64.o, reg-sparc64.c): New.
8545 * configure.srv (sparc*-*-linux*): New configuration.
8546 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8547 syscall arguments for SPARC.
8548 (regsets_store_inferior_registers): Likewise.
8549 * linux-sparc-low.c: New file.
8550
66b6e1dd
DE
85512008-10-21 Doug Evans <dje@google.com>
8552
8553 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8554 (READLINE_DIR,READLINE_DEP): Delete.
8555 (INTERNAL_CFLAGS): Update.
8556 (LINTFLAGS): Update.
8557
9b710a42
PA
85582008-10-10 Pedro Alves <pedro@codesourcery.com>
8559
8560 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8561 whole argv from the last run, not just argv[0].
8562
5822d809
PA
85632008-09-08 Pedro Alves <pedro@codesourcery.com>
8564
8565 * regcache.c (new_register_cache): Return NULL if the register
8566 cache size isn't known yet.
8567 (free_register_cache): Avoid dereferencing a NULL regcache.
8568
74aac56f
DJ
85692008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8570
8571 * configure.srv: Merge MIPS and MIPS64.
8572
400b20f5
MR
85732008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8574
8575 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8576
677c5bb1
LM
85772008-08-18 Luis Machado <luisgpm@br.ibm.com>
8578
8579 * Makefile.in: Add required vsx dependencies.
8580
8581 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8582 Declare init_registers_powerpc_vsx32l.
8583 Declare init_registers_powerpc_vsx64l.
8584 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8585 (ppc_arch_setup): Check for VSX in hwcap.
8586 (ppc_fill_vsxregset): New function.
8587 (ppc_store_vsxregset): New function.
8588 Add new VSX entry in regset_info target_regsets.
8589
8590 * configure.srv: Add new VSX dependencies.
8591
a6f3e723
SL
85922008-08-12 Pedro Alves <pedro@codesourcery.com>
8593
8594 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8595 (remote_open): Set or clear transport_is_reliable.
8596 (putpkt_binary): Don't expect acks in noack mode.
8597 (getpkt): Don't send ack/nac in noack mode.
8598 * server.c (handle_general_set): Handle QStartNoAckMode.
8599 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8600 qSupported.
8601 (main): Reset noack_mode on every connection.
8602 * server.h (noack_mode): Declare.
8603
a417dc56
RW
86042008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8605
8606 * Makefile.in (GDBREPLAY_OBS): New variable.
8607 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8608
3221518c
UW
86092008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8610 Daniel Jacobowitz <dan@codesourcery.com>
8611
8612 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8613 (usr_store_inferior_registers): Likewise.
8614 (regsets_store_inferior_registers): Likewise.
8615
ec56be1b
PA
86162008-07-31 Rolf Jansen <rj@surtec.com>
8617 Pedro Alves <pedro@codesourcery.com>
8618
8619 * configure.ac: Check for memmem declaration.
8620 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8621 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8622 (disable_packet_qfThreadInfo): Unconditionally compile.
8623 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8624 * configure, config.in: Regenerate.
8625
2fe5e3ff
DE
86262008-07-28 Doug Kwan <dougkwan@google.com>
8627
8628 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8629 (linux_write_memory): Remove declaration of errno.
8630
836acd6d
UW
86312008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8632
8633 * linux-low.c (handle_extended_wait): Do not use "status"
8634 variable uninitialized.
8635
aeba519e
PA
86362008-07-07 Pedro Alves <pedro@codesourcery.com>
8637
8638 * server.c (handle_v_attach): Inhibit reporting dll changes.
8639
db42f210
PA
86402008-06-27 Pedro Alves <pedro@codesourcery.com>
8641
8642 * remote-utils.c (prepare_resume_reply): If requested, don't
8643 output "thread:TID" in the T stop reply.
8644
8645 * server.c (disable_packet_vCont, disable_packet_Tthread)
8646 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8647 (handle_query): If requested, disable support for qC, qfThreadInfo
8648 and qsThreadInfo.
8649 (handle_v_requests): If requested, disable support for vCont.
8650 (gdbserver_show_disableable): New.
8651 (main): Handle --disable-packet and --disable-packet=LIST.
8652
8653 * server.h (disable_packet_vCont, disable_packet_Tthread)
8654 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8655
8e4c5421
CD
86562008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8657
8658 * server.c (gdbserver_usage): Mention --version.
8659
6e23a804
DJ
86602008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8661
8662 * Makefile.in (gdbreplay.o): New rule.
8663
90aa6a40
JM
86642008-06-06 Joseph Myers <joseph@codesourcery.com>
8665
8666 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8667 message, not gdbserver.
8668
c16158bc 86692008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8670 Nathan Sidwell <nathan@codesourcery.com>
8671 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8672
8673 * acinclude.m4: Include ../../config/acx.m4.
8674 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8675 * configure, config.in: Regenerate.
8676 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8677 * server.c (gdbserver_version): Print PKGVERSION.
8678 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8679 (main): Adjust gdbserver_usage calls.
8680 * gdbreplay.c (version, host_name): Add declarations.
8681 (gdbreplay_version, gdbreplay_usage): New.
8682 (main): Accept --version and --help options.
8683
aeb75bf5
DJ
86842008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8685
8686 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8687 (arm_breakpoint_at): Handle Thumb.
8688 (the_low_target): Add comment.
8689
76b233dd
UW
86902008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8691
8692 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8693
08388c79
DE
86942008-05-09 Doug Evans <dje@google.com>
8695
a3c83fae
DE
8696 * server.h (decode_search_memory_packet): Declare.
8697 * remote-utils.c (decode_search_memory_packet): New fn.
8698 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8699 (handle_search_memory): New fn.
8700 (handle_query): Process qSearch:memory packets.
8701
bb9c3d36
UW
87022008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8703
8704 * regcache.c (registers_length): Remove.
8705 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8706 full register packet.
8707 * regcache.h (registers_length): Remove prototype.
8708 * server.h (PBUFSIZ): Define to 16384.
8709
7284e1be
UW
87102008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8711
8712 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8713 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8714 powerpc-64l.o, and powerpc-altivec64l.o.
8715 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8716 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8717 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8718 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8719 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8720 to srv_xmlfiles.
8721
8722 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8723 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8724 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8725 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8726 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8727 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8728 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8729 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8730 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8731 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8732 (clean): Update.
8733
8734 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8735 (init_registers_powerpc_32l): ... this new prototype.
8736 (init_registers_powerpc_32): Remove, replace by ...
8737 (init_registers_powerpc_altivec32l): ... this new prototype.
8738 (init_registers_powerpc_e500): Remove, replace by ...
8739 (init_registers_powerpc_e500l): ... this new prototype.
8740 (init_registers_ppc64): Remove, replace by ...
8741 (init_registers_powerpc_64l): ... this new prototype.
8742 (init_registers_powerpc_64): Remove, replace by ...
8743 (init_registers_powerpc_altivec64l): ... this new prototype.
8744 (ppc_num_regs): Set to 73.
8745 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8746 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8747 (ppc_cannot_store_register): Handle orig_r3 and trap.
8748 (ppc_arch_setup): Update init_registers_... calls.
8749 (ppc_fill_gregset): Handle orig_r3 and trap.
8750
8751 * inferiors.c (clear_inferiors): Reset current_inferior.
8752
fdc59709
PB
87532008-04-23 Paolo Bonzini <bonzini@gnu.org>
8754
889bf7c5
PA
8755 * acinclude.m4: Add override.m4.
8756 * configure: Regenerate.
fdc59709 8757
c9b2f845
UW
87582008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8759
8760 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8761 initial call to init_register_ppc64.
8762
550512b8
UW
87632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8764
43aaf8b6
PA
8765 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8766 single powerpc*-*-linux* case.
550512b8
UW
8767 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8768
b6430ec3
UW
87692008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8770
8771 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8772 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8773 from reg_xmlfiles.
8774 * linux-ppc-low.c: Include <elf.h>.
8775 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8776 (ppc_hwcap): New global variable.
8777 (ppc_regmap): Remove __SPE__ #ifdef sections.
8778 (ppc_regmap_e500): New global variable.
8779 (ppc_cannot_store_register): Update __SPE__ special case.
8780 (ppc_get_hwcap): New function.
8781 (ppc_arch_setup): Use it to determine whether inferior supports
8782 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8783 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8784 Do not access registers if target does not support AltiVec.
8785 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8786 Do not access registers if target does not support SPE.
8787 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8788
52fa2412
UW
87892008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8790
8791 * linux-low.c (disabled_regsets, num_regsets): New.
8792 (use_regsets_p): Delete.
8793 (linux_wait_for_process): Clear disabled_regsets.
8794 (regsets_fetch_inferior_registers): Check and set it.
8795 (regsets_store_inferior_registers): Likewise.
8796 (linux_fetch_registers, linux_store_registers): Do not use
8797 use_regsets_p.
8798 (initialize_low): Allocate disabled_regsets.
8799
e28b3332
DJ
88002008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8801
8802 * Makefile.in (LIBOBJS): New.
8803 (OBS): Use LIBOBJS.
8804 (memmem.o): New rule.
8805 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8806 * configure: Regenerated.
8807
4536995d
UW
88082008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8809
8810 * server.c (handle_query): Never return "unsupported" for
8811 qXfer:features:read queries.
8812
221c031f
UW
88132008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8814
8815 * server.c (get_features_xml): Fix inverted condition.
8816 (handle_query): Always support qXfer:feature:read.
8817
ccd213ac
DJ
88182008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8819
8820 * server.c (wrapper_argv): New.
8821 (start_inferior): Handle wrapper_argv. If set, expect an extra
8822 trap.
8823 (gdbserver_usage): Document --wrapper.
8824 (main): Parse --wrapper.
8825
6fe305f7
UW
88262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8827
8828 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8829 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8830 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8831 (ppc_set_pc): Likewise.
8832 (ppc_arch_setup): New function.
8833 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8834 of collect_register.
889bf7c5 8835 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8836
5b0a002e
UW
88372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8838
8839 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8840 instead of linux-ppc64-low.o.
8841 * linux-ppc64-low.c: Remove file.
8842 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8843 (linux-ppc64-low.o): Remove rule.
8844
8845 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8846 (init_registers_powerpc_64): Likewise.
8847 (ppc_regmap): Conditionally define depending on __powerpc64__.
8848 (ppc_cannot_store_register): Do not special-case "fpscr" when
8849 compiled on __powerpc64__.
8850 (ppc_collect_ptrace_register): New function.
8851 (ppc_supply_ptrace_register): New function.
8852 (ppc_breakpoint): Change type to "unsigned int".
8853 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8854 (the_low_target): Conditionally provide initializers for the
889bf7c5 8855 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8856 collect_ptrace_register and supply_ptrace_register members.
8857
9b4b61c8
UW
88582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8859
8860 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8861 * server.c (gdbserver_xmltarget): Define.
8862 (get_features_xml): Use it to replace "target.xml" and arch_string.
8863
8864 * configure.srv: Remove srv_xmltarget. Add XML files that were
8865 mentioned there to srv_xmlfiles instead. Remove conditional tests
8866 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8867 srv_xmlfiles and srv_regobj to include all possible choices.
8868 * configure.ac (srv_xmltarget): Remove.
8869 (srv_xmlfiles): Do not add "target.xml".
8870 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8871 checks for supplementary target information.
8872 * configure: Regenerate.
8873 * Makefile.in (XML_TARGET): Remove.
8874 (target.xml): Remove rule.
8875 (clean): Do not clean up target.xml.
8876 (.PRECIOUS): Do not mention target.xml.
8877
8878 * target.h (struct target_ops): Remove arch_string member.
8879 * linux-low.c (linux_arch_string): Remove.
8880 (linux_target_ops): Remove arch_string initializer.
8881 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8882 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8883 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8884 * spu-low.c (spu_arch_string): Remove.
8885 (spu_target_ops): Remove arch_string initializer.
8886 * win32-low.c (win32_arch_string): Remove.
8887 (win32_target_ops): Remove arch_string initializer.
8888 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8889 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8890 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8891
ee1a7ae4
UW
88922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8893
8894 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8895 by collect_ptrace_register and supply_ptrace_register hooks.
8896 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8897 instead of checking for the_low_target.left_pad_xfer.
8898 (usr_store_inferior_registers): Use collect_ptrace_register callback
8899 instead of checking for the_low_target.left_pad_xfer.
8900
8901 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8902 (s390_supply_ptrace_register): Likewise.
8903 (s390_fill_gregset): Call s390_collect_ptrace_register.
8904 (the_low_target): Update.
8905
8906 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8907 (ppc_supply_ptrace_register): Likewise.
8908 (the_low_target): Update.
8909
8910 * linux-i386-low.c (the_low_target): Update.
8911 * linux-x86-64-low.c (the_low_target): Update.
8912
d61ddec4
UW
89132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8914
8915 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8916 reg-s390.o and reg-s390x.o.
8917
8918 * linux-low.c (new_inferior): New global variable.
8919 (linux_create_inferior, linux_attach): Set it.
8920 (linux_wait_for_process): Call the_low_target.arch_setup after the
8921 target has stopped for the first time.
8922 (initialize_low): Do not call the_low_target.arch_setup.
8923
8924 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8925 (s390_set_pc): Likewise.
8926 (s390_arch_setup): New function.
8927 (the_low_target): Use s390_arch_setup as arch_setup routine.
8928
8929 * regcache.c (realloc_register_cache): New function.
8930 (set_register_cache): Call it for each existing regcache.
8931
d05b4ac3
UW
89322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8933
8934 * server.h (init_registers): Remove prototype.
8935
8936 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8937 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8938 instead of init_registers ().
8939 * linux-arm-low.c (init_registers_arm): Add prototype.
8940 (init_registers_arm_with_iwmmxt): Likewise.
8941 (the_low_target): Add initializer for arch_setup field.
8942 * linux-cris-low.c (init_registers_cris): Add prototype.
8943 (the_low_target): Add initializer for arch_setup field.
8944 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8945 (the_low_target): Add initializer for arch_setup field.
8946 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8947 (the_low_target): Add initializer for arch_setup field.
8948 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8949 (the_low_target): Add initializer for arch_setup field.
8950 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8951 (the_low_target): Add initializer for arch_setup field.
8952 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8953 (the_low_target): Add initializer for arch_setup field.
8954 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8955 (init_registers_mips64_linux): Likewise.
8956 (the_low_target): Add initializer for arch_setup field.
8957 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8958 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8959 (the_low_target): Add initializer for arch_setup field.
8960 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8961 (init_registers_powerpc_64): Likewise.
8962 (the_low_target): Add initializer for arch_setup field.
8963 * linux-s390-low.c (init_registers_s390): Add prototype.
8964 (init_registers_s390x): Likewise.
8965 (the_low_target): Add initializer for arch_setup field.
8966 * linux-sh-low.c (init_registers_sh): Add prototype.
8967 (the_low_target): Add initializer for arch_setup field.
8968 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8969 (the_low_target): Add initializer for arch_setup field.
8970 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8971 (the_low_target): Add initializer for arch_setup field.
8972
8973 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8974 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8975 instead of init_registers ().
8976 * win32-arm-low.c (init_registers_arm): Add prototype.
8977 (the_low_target): Add initializer for arch_setup field.
8978 * win32-i386-low.c (init_registers_i386): Add prototype.
8979 (the_low_target): Add initializer for arch_setup field.
8980
8981 * spu-low.c (init_registers_spu): Add prototype.
8982 (initialize_low): Call initialie_registers_spu () instead of
8983 initialize_registers ().
8984
fd96d250
PA
89852008-02-19 Pedro Alves <pedro@codesourcery.com>
8986
8987 * server.c (handle_v_requests): When handling the vRun and vAttach
8988 packets, if already debugging a process, don't kill it. Return an
8989 error instead.
8990
d41b6bb4
DJ
89912008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8992
8993 * server.c (handle_query): Correct length check.
8994
5ac588cf
PA
89952008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8996
8997 * win32-low.c (do_initial_child_stuff): Add process handle
8998 parameter. Set current_process_handle and current_process_id from the
8999 parameters. Clear globals.
9000 (win32_create_inferior): Don't set current_process_handle and
9001 current_process_id here. Instead pass them on the call to
9002 do_initial_child_stuff.
9003 (win32_attach): Likewise.
9004 (win32_clear_inferiors): New.
9005 (win32_kill): Don't close the current process handle or the
9006 current thread handle here. Instead call win32_clear_inferiors.
9007 (win32_detach): Don't open a new handle to the process. Call
9008 win32_clear_inferiors.
9009 (win32_join): Don't rely on current_process_handle; open a new
9010 handle using the process id.
9011 (win32_wait): Call win32_clear_inferiors when the inferior process
9012 has exited.
9013
ecd7ecbc
DJ
90142008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9015
9016 * server.c (monitor_show_help): Add "exit".
9017
1525d545
MG
90182008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9019
ecd7ecbc 9020 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9021 (clean): Add reg-xtensa.c.
9022 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9023 * configure.srv (xtensa*-*-linux*) New target.
9024 * linux-xtensa-low.c: New.
9025 * xtensa-xtregs.c: New.
1525d545 9026
59a016f0
PA
90272008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9028
9029 * hostio.c: Don't include errno.h.
9030 (errno_to_fileio_errno): Move to hostio-errno.
9031 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9032 error number outputting to the target->hostio_last_error callback.
9033 (hostio_packet_error): Use FILEIO_EINVAL directly.
9034 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9035 calls to hostio_error.
9036 * hostio-errno.c: New.
9037 * server.h (hostio_last_error_from_errno): Declare.
9038 * target.h (target_ops): Add hostio_last_error member.
9039 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9040 as hostio_last_error handler.
889bf7c5 9041 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9042 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9043 (wince_hostio_last_error): New functions.
9044 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9045 as hostio_last_error handler.
9046 (win32_target_ops) [!_WIN32_WCE]: Register
9047 hostio_last_error_from_errno as hostio_last_error handler.
9048 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9049 (hostio-errno.o): New rule.
9050 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9051 * configure.srv (srv_hostio_err_objs): New variable. Default to
9052 hostio-errno.o.
9053 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9054 * configure: Regenerate.
9055
2d717e4f
DJ
90562008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9057
9058 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9059 (linux_kill, linux_detach): Clean up the process list.
9060 * remote-utils.c (remote_open): Improve port number parsing.
9061 (putpkt_binary, input_interrupt): Only send interrupts if the target
9062 is running.
9063 * server.c (extended_protocol): Make static.
9064 (attached): Define earlier.
9065 (exit_requested, response_needed, program_argv): New variables.
9066 (target_running): New.
9067 (start_inferior): Clear attached here.
9068 (attach_inferior): Set attached here.
9069 (require_running): Define.
9070 (handle_query): Use require_running and target_running. Implement
9071 "monitor exit".
9072 (handle_v_attach, handle_v_run): New.
9073 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9074 (gdbserver_usage): Update.
9075 (main): Redo argument parsing. Handle --debug and --multi. Handle
9076 --attach along with other options or after the port. Save
9077 program_argv. Support no initial program. Resynchronize
9078 communication with GDB after an error. Handle "monitor exit".
9079 Use require_running and target_running. Always allow the extended
9080 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9081 restart in extended mode.
9082 * README: Refer to the GDB manual. Update --attach usage.
9083
7407e2de
AS
90842007-12-20 Andreas Schwab <schwab@suse.de>
9085
9086 * linux-low.c (STACK_SIZE): Define.
9087 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9088 (linux_test_for_tracefork): Likewise.
9089
b65d95c5
DJ
90902007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9091
9092 * linux-low.c (linux_wait_for_event): Update messages. Do not
9093 reinsert auto-delete breakpoints.
9094 * mem-break.c (struct breakpoint): Change return type of handler to
9095 int.
9096 (set_breakpoint_at): Update handler type.
9097 (reinsert_breakpoint_handler): Return 1 instead of calling
9098 delete_breakpoint.
9099 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9100 setting a new one.
9101 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9102 * mem-break.h (set_breakpoint_at): Update handler type.
9103 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9104 * win32-low.c (auto_delete_breakpoint): New.
9105 (get_child_debug_event): Use it.
9106
4e799345
DJ
91072007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9108
9109 * configure.ac: Check for pread and pwrite.
9110 * hostio.c (handle_pread): Fall back to lseek and read.
9111 (handle_pwrite): Fall back to lseek and write.
9112 * config.in, configure: Regenerated.
9113
27524b67
DJ
91142007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9115
9116 * server.c (myresume): Add own_buf argument.
9117 (main): Update calls.
9118
a20d5e98
DJ
91192007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9120
9121 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9122 * remote-utils.c (remote_open): Do not call disable_async_io.
9123 (block_async_io): Delete.
9124 (unblock_async_io): Make static.
9125 (initialize_async_io): New.
9126 * server.c (handle_v_cont): Handle async I/O here.
9127 (myresume): Likewise. Move other common resume tasks here...
9128 (main): ... from here. Call initialize_async_io. Disable async
9129 I/O before the main loop.
9130 * server.h (initialize_async_io): Declare.
9131 (block_async_io, unblock_async_io): Delete prototypes.
9132 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9133
b79d787e
DJ
91342007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9135
9136 * remote-utils.c (readchar): Allow binary data in received messages.
9137
d97903b2
PA
91382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9139
9140 * win32-low.c (attaching): New global.
9141 (win32_create_inferior): Clear the `attaching' global.
9142 (win32_attach): Set the `attaching' global.
9143 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9144 attaching. Only set a breakpoint at the entry point if not
9145 attaching.
9146
311de423
PA
91472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9148
9149 * server.c (main): Don't report dll events on the initial
9150 connection on attaches.
9151
6c2d16d2
PA
91522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9153
9154 * server.c (main): Relax numerical bases supported for the pid of
9155 the --attach command line argument.
9156
5ca906e6
PA
91572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9158
9159 * win32-low.c (win32_attach): Call OpenProcess before
9160 DebugActiveProcess, not after. Add last error output to error
9161 call.
9162
9c6c8194
PA
91632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9164
9165 * win32-low.c (win32_get_thread_context)
9166 (win32_set_thread_context): New functions.
9167 (thread_rec): Use win32_get_thread_context.
9168 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9169 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9170 field.
9171
4d5d1aaa
PA
91722007-12-03 Leo Zayas
9173 Pedro Alves <pedro_alves@portugalmail.pt>
9174
9175 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9176 global variables.
9177 (child_add_thread): Minor cleanup.
9178 (child_continue): Resume artificially suspended threads before
9179 calling ContinueDebugEvent.
9180 (suspend_one_thread): New.
9181 (fake_breakpoint_event): New.
9182 (get_child_debug_event): Change return type to int. Check here if
9183 gdb sent an interrupt request. If a soft interrupt was requested,
9184 fake a breakpoint event. Return 0 if there is no event to handle,
9185 and 1 otherwise.
9186 (win32_wait): Don't check here if gdb sent an interrupt request.
9187 Ensure there is a valid event to handle.
9188 (win32_request_interrupt): Add soft interruption method as last
9189 resort.
9190
c436e841
PA
91912007-12-03 Leo Zayas
9192 Pedro Alves <pedro_alves@portugalmail.pt>
9193
9194 * win32-low.h (win32_thread_info): Add descriptions to the
9195 structure members. Replace `suspend_count' counter by a
9196 `suspended' flag.
9197 * win32-low.c (thread_rec): Update condition of when to get the
9198 context from the inferior. Rely on ContextFlags being set if it
9199 has already been retrieved. Only suspend the inferior thread if
9200 we haven't already. Warn if that fails.
9201 (continue_one_thread): s/suspend_count/suspended/. Only call
9202 ResumeThread once. Warn if that fails.
9203
e7b5fa67
PA
92042007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9205
9206 * win32-low.c (win32_wait): Don't read from the inferior when it
9207 has already exited.
9208
a385171d
PA
92092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9210
9211 * Makefile.in (win32_low_h): New variable.
9212 (win32-low.o): Add dependency on $(win32_low_h).
9213 (win32-arm-low.o, win32-i386-low.o): New rules.
9214
f80c84b3
DJ
92152007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * hostio.c: Correct copyright year.
9218
a6b151f1
DJ
92192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * Makefile.in (OBS): Add hostio.o.
9222 (hostio.o): New rule.
9223 * server.h (handle_vFile): Declare.
9224 * hostio.c: New file.
9225 * server.c (handle_v_requests): Take packet_len and new_packet_len
9226 for binary packets. Call handle_vFile.
9227 (main): Update call to handle_v_requests.
9228
f9387fc3
DJ
92292007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9230
9231 * linux-low.c: Include <sched.h>.
9232
51c2684e
DJ
92332007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9234
9235 * linux-low.c (linux_tracefork_grandchild): New.
9236 (linux_tracefork_child): Use clone.
9237 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9238
75f83163
JB
92392007-10-31 Joel Brobecker <brobecker@adacore.com>
9240
9241 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9242
da5898ce
DJ
92432007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9244
9245 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9246
24a09b5f
DJ
92472007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9248
9249 * inferiors.c (change_inferior_id): Delete.
9250 (add_pid_to_list, pull_pid_from_list): New.
9251 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9252 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9253 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9254 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9255 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9256 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9257 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9258 (using_threads): Always set to 1.
9259 (handle_extended_wait): New.
9260 (add_process): Do not set TID.
9261 (linux_create_inferior): Set must_set_ptrace_flags.
9262 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9263 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9264 (linux_thread_alive): Rename TID argument to LWPID.
9265 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9266 (linux_wait_for_event): Do not use TID or check using_threads. Update
9267 call to dead_thread_notify. Call handle_extended_wait.
9268 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9269 (send_sigstop): Delete sigstop_sent.
9270 (wait_for_sigstop): Avoid TID.
9271 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9272 (linux_test_for_tracefork): New.
9273 (linux_lookup_signals): Use thread_db_active and
9274 linux_supports_tracefork_flag.
9275 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9276 * linux-low.h (get_process_thread): Avoid TID.
9277 (struct process_ifo): Move thread_known and tid to the end. Remove
9278 sigstop_sent.
9279 (linux_attach_lwp, thread_db_init): Update prototypes.
9280 * server.h (change_inferior_id): Delete prototype.
9281 (add_pid_to_list, pull_pid_from_list): New prototypes.
9282 * thread-db.c (thread_db_use_events): New.
9283 (find_first_thread): Rename to...
9284 (find_one_thread): ...this. Update callers and messages. Do not
9285 call fatal. Check thread_db_use_events. Do not call
9286 change_inferior_id or new_thread_notify.
9287 (maybe_attach_thread): Update. Do not call new_thread_notify.
9288 (thread_db_init): Set thread_db_use_events. Check use_events.
9289 * utils.c (fatal, warning): Correct message prefix.
9290
30ed0a8f
DJ
92912007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9292
9293 * Makefile.in (clean): Remove new files.
9294 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9295 (powerpc-64.o, powerpc-64.c): New rules.
9296 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9297 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9298 with SPE.
9299 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9300 SPE targets.
9301 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9302 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9303 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9304 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9305 (target_regsets): Add AltiVec and SPE register sets.
9306 * configure.ac: Check for AltiVec and SPE.
9307 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9308 (ppc_fill_vrregset, ppc_store_vrregset): New.
9309 (target_regsets): Add AltiVec register set.
9310 * configure: Regenerated.
9311
fd462a61
DJ
93122007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9313
9314 * linux-low.c (O_LARGEFILE): Define.
9315 (linux_read_memory): Use /proc/PID/mem.
9316 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9317 * configure, config.in: Regenerated.
9318
69f223ed
DJ
93192007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9320
9321 * linux-low.c (linux_wait_for_event): Do not pass signals while
9322 single-stepping.
9323
aec18585
PA
93242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9325
9326 * win32-low.c (create_process): New.
9327 (win32_create_inferior): Use create_process instead of
9328 CreateProcess. If create_process failed retry appending an ".exe"
9329 suffix. Store the GetLastError result immediatelly after
9330 create_process calls and use it on the call to error.
9331
34d86ddd
PA
93322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9333
9334 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9335
5a0e3bd0
JB
93362007-08-23 Joel Brobecker <brobecker@adacore.com>
9337
9338 * configure.ac: Switch license to GPLv3.
9339
f88c79e6
MS
93402007-08-01 Michael Snyder <msnyder@access-company.com>
9341
9342 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9343
6b3d9b83
PA
93442007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9345
9346 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9347 typedef.
9348 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9349 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9350 CloseToolhelp32Snapshot.
9351 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9352 CloseToolhelp32Snapshot.
9353
c588c53c
MS
93542007-07-27 Michael Snyder <michael.snyder@access-company.com>
9355
9356 * server.c (main): Check for inferior exit before main loop.
9357
aa0403d9
PA
93582007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9359
9360 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9361 instead of on tmp_desc.
9362
255e7678
DJ
93632007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9364 Daniel Jacobowitz <dan@codesourcery.com>
9365
9366 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9367 (add_thread): Minor cleanups.
9368 (clear_inferiors): Move lower in the file. Clear the DLL
9369 list.
9370 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9371 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9372 (xml_escape_text): New.
9373 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9374 for qSupported.
9375 (handle_v_cont): Report errors.
9376 (gdbserver_version): Update.
9377 (main): Correct size of own_buf. Do not report initial DLL events.
9378 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9379 (unloaded_dll, xml_escape_text): New.
9380 * win32-low.c (enum target_waitkind): Update comments.
9381 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9382 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9383 (win32_EnumProcessModules, win32_GetModuleInformation)
9384 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9385 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9386 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9387 (win32_Module32First, win32_Module32Next, load_toolhelp)
9388 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9389 (get_child_debug_event): Handle DLL events.
9390 (win32_wait): Likewise.
9391
0d37add9
DJ
93922007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9393
9394 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9395 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9396
45e2715e
PA
93972007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9398
9399 * win32-low.c (handle_output_debug_string): Ignore event if not
9400 waiting.
9401
c5674cf1
PA
94022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9403
9404 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9405
2bbe3cc1
DJ
94062007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9407
9408 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9409
ae13219e
DJ
94102007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9411
9412 * inferiors.c (change_inferior_id): Add comment.
9413 * linux-low.c (check_removed_breakpoint): Add an early
9414 prototype. Improve debug output.
9415 (linux_attach): Doc update.
9416 (linux_detach_one_process, linux_detach): Clean up before releasing
9417 each process.
9418 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9419 * linux-low.h (struct process_info): Doc improvement.
9420 * mem-break.c (delete_all_breakpoints): New.
9421 * mem-break.h (delete_all_breakpoints): New prototype.
9422 * thread-db.c (find_first_thread): New.
9423 (thread_db_create_event): Call it instead of
9424 thread_db_find_new_threads. Clean up unused variables.
9425 (maybe_attach_thread): Remove first thread handling.
9426 (thread_db_find_new_threads): Use find_first_thread.
9427 (thread_db_get_tls_address): Likewise.
9428
4105de34
DJ
94292007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9430
9431 * thread-db.c (thread_db_find_new_threads): Add prototype.
9432 (thread_db_create_event): Check for the main thread before adding
9433 a new thread.
9434 (maybe_attach_thread): Only enable event reporting if TID == 0.
9435 (thread_db_get_tls_address): Check for new threads.
9436
2b876972
DJ
94372007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9438
9439 * linux-low.c (linux_create_inferior): Try execv before execvp.
9440 * spu-low.c (spu_create_inferior): Likewise.
9441
7a245884
DJ
94422007-06-13 Mike Frysinger <vapier@gentoo.org>
9443
9444 * linux-low.c (linux_create_inferior): Change execv to execvp.
9445 * spu-low.c (spu_create_inferior): Likewies.
9446
117ce543
DJ
94472007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9448
9449 * Makefile.in (clean): Clean new files instead of deleted ones.
9450 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9451 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9452 rules.
9453 * configure.srv: Specify XML files and new regformats for MIPS and
9454 MIPS64 GNU/Linux.
9455 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9456 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9457 an entry for the restart register.
9458 (mips_cannot_fetch_register, mips_cannot_store_register)
9459 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9460 register names to match the XML descriptions.
9461 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9462 restart register instead of $0.
9463
0e7f50da
UW
94642007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9465 Markus Deuling <deuling@de.ibm.com>
9466
9467 * remote-utils.c (decode_xfer_write): New function.
9468 * server.h (decode_xfer_write): Add prototype.
9469 * server.c (handle_query): Add PACKET_LEN argument. Support
9470 qXfer:spu:read and qXfer:spu:write packets.
9471 (main): Pass packet_len to handle_query.
9472 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9473 * target.h (target_ops): Add qxfer_spu.
9474
374c1d38
UW
94752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9476
9477 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9478 accessing non-seekable spufs files.
9479
bb63802a
UW
94802007-05-16 Markus Deuling <deuling@de.ibm.com>
9481
889bf7c5 9482 * server.c (handle_query): Add reply for qC packet.
bb63802a 9483
7390519e
PA
94842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9485 Leo Zayas <lerele@champenstudios@com>
9486
9487 * server.h (check_remote_input_interrupt_request): New function.
9488 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9489 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9490 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9491 (check_remote_input_interrupt_request): New function.
9492 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9493 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9494 winapi_GenerateConsoleCtrlEvent): New typedefs.
9495 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9496 to 250 ms.
9497 (win32_wait): Check for remote interrupt request
9498 with check_remote_input_interrupt_request.
9499 (win32_request_interrupt): New function.
9500 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9501
34b34921
PA
95022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9503
9504 * win32-low.c (debug_registers_changed,
9505 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9506 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9507 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9508 (thread_rec): Get context using the low target.
9509 (child_add_thread): Call thread_added on the low target,
9510 which does the same thing.
9511 (regptr): Delete.
9512 (do_initial_child_stuff): Remove debug registers references.
9513 Set context using the low target. Resume threads after
9514 setting the contexts.
9515 (child_continue): Remove dead variable. Remove debug
9516 registers references.
9517 (child_fetch_inferior_registers): Go through the low target.
9518 (do_child_store_inferior_registers): Remove.
9519 (child_store_inferior_registers): Go through the low target.
9520 (win32_resume): Remove debug registers references.
9521 Set context using the low target.
9522 (handle_exception): Change return type to void. Don't record
9523 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9524 first chance exception.
889bf7c5 9525 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9526 goto loop. Always return after waiting for debug event.
9527 (win32_wait): Convert to switch statement. Handle spurious
9528 events.
9529
9530 * win32-i386-low.c (debug_registers_changed,
9531 debug_registers_used): New.
9532 (initial_stuff): Rename to ...
9533 (i386_initial_stuff): ... this. Clear debug registers
9534 state variables.
9535 (store_debug_registers): Delete.
9536 (i386_get_thread_context): New.
9537 (load_debug_registers): Delete.
9538 (i386_set_thread_context): New.
9539 (i386_thread_added): New.
9540 (single_step): Rename to ...
9541 (i386_single_step): ... this.
9542 (do_fetch_inferior_registers): Rename to ...
9543 (i386_fetch_inferior_register): ... this.
9544 (i386_store_inferior_register): New.
9545 (the_low_target): Adapt to new interface.
9546
9547 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9548 (arm_get_thread_context): New.
9549 (arm_set_thread_context): New.
9550 (regptr): New.
9551 (do_fetch_inferior_registers): Rename to ...
9552 (arm_fetch_inferior_register): ... this.
9553 (arm_store_inferior_register): New.
9554 (arm_wince_breakpoint): Reimplement as unsigned long.
9555 (arm_wince_breakpoint_len): Define.
9556 (the_low_target): Adapt to new interface.
9557
9558 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9559 load_debug_registers. Add get_thread_context, set_thread_context,
9560 thread_added and store_inferior_register. Rename
9561 fetch_inferior_registers to fetch_inferior_register.
9562 (regptr): Remove declaration.
9563
dd6953e1
PA
95642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * linux-low.c (linux_detach): Change return type to int. Return 0.
9567 * spu-low.c (spu_detach): Likewise.
9568
444d6139
PA
95692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9570
9571 * target.h (target_ops): Change return type of detach to int.
9572 Add join.
9573 (join_inferior): New.
9574 * server.c (main): Don't skip detach support on mingw32.
9575 If the inferior doesn't support detaching return error.
9576 Call join_inferior instead of using waitpid.
9577 * linux-low.c (linux_join): New.
9578 (linux_target_op): Add linux_join.
9579 * spu-low.c (spu_join): New.
9580 (spu_target_ops): Add spu_join.
9581 * win32-low.c (win32_detach): Adapt to new interface.
9582 Reopen current_process_handle before detaching. Issue a child
9583 resume before detaching.
9584 (win32_join): New.
9585 (win32_target_op): Add win32_join.
9586
1d5315fe
PA
95872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9588
9589 * win32-low.c (win32-attach): Fix return value.
9590 * target.h (target_ops): Describe ATTACH return values.
9591
bf914831
PA
95922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9593
9594 * win32-low.c (GETPROCADDRESS): Define.
9595 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9596 (winapi_DebugSetProcessKillOnExit): Likewise.
9597 (win32_create_inferior): Force usage of ansi CreateProcessA.
9598 (win32_attach): Use GETPROCADDRESS.
9599 (win32_detach): Likewise.
9600
f72f3e60
PA
96012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9602
9603 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9604
ed50f18f
PA
96052007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9606
9607 * win32-low.c: Commit leftover changes from 2007-03-29.
9608
0c2ead7e
DJ
96092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9610
9611 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9612 fields short instead of int. Add explicit padding.
9613 (i387_cache_to_fsave): Remove unnecessary casts.
9614 (i387_fsave_to_cache): Doc fix.
9615 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9616
73725ff3
DJ
96172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9618
9619 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9620 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9621
d99f33d8
PA
96222007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9623
9624 * configure.srv (arm*-*-mingw32ce*): Move near the other
9625 arm targets.
9626
68070c10
PA
96272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9628
2482afc6 9629 * configure.ac: Add errno checking.
68070c10
PA
9630 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9631 sys/file.h and malloc.h.
9632 (AC_CHECK_DECLS): Add perror.
9633 (srv_mingwce): Handle.
2482afc6 9634 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9635 win32-i386-low.o to srv_tgtobj.
9636 (i[34567]86-*-mingw*): Likewise.
9637 (arm*-*-mingw32ce*): Add case.
9638 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9639 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9640 [__MINGW32CE__] (strerror): New function.
9641 [__MINGW32CE__] (errno): Define to GetLastError.
9642 [__MINGW32CE__] (COUNTOF): New macro.
9643 (remote_open): Remove extra close call.
9644 * mem-break.c (delete_breakpoint_at): New function.
9645 * mem-break.h (delete_breakpoint_at): Declare.
9646 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9647 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9648 [USE_WIN32API] (read, write): Add char* casts.
9649 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9650 * server.h: Include wincecompat.h on Windows CE.
9651 [HAVE_ERRNO_H]: Check.
9652 (perror): Declare if not declared.
9653 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9654 (perror_with_name): Remove errno declaration.
9655 * wincecompat.h: New.
9656 * wincecompat.c: New.
9657 * win32-low.h: New.
9658 * win32-arm-low.c: New.
9659 * win32-i386-low.c: New.
9660 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9661 (OUTMSG2): Make it safe.
9662 (_T): New macro.
9663 (COUNTOF): New macro.
9664 (NUM_REGS): Get it from the low target.
9665 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9666 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9667 (thread_rec): Let low target handle debug registers.
9668 (child_add_thread): Likewise.
9669 (child_init_thread_list): Likewise.
9670 (continue_one_thread): Likewise.
9671 (regptr): New.
9672 (do_child_fetch_inferior_registers): Move to ...
9673 * win32-i386-low.c: ... here, and rename to ...
9674 (do_fetch_inferior_registers): ... this.
889bf7c5 9675 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9676 Go through the low target.
9677 (do_child_store_inferior_registers): Use regptr.
9678 (strwinerror): New function.
9679 (win32_create_inferior): Handle Windows CE.
9680 Use strwinerror instead of strerror on Windows error
9681 codes. Add program to the error output.
9682 Don't close the main thread handle on Windows CE.
9683 (win32_attach): Use coredll.dll on Windows CE.
9684 (win32_kill): Close current process and current
9685 thread handles.
9686 (win32_detach): Use coredll.dll on Windows CE.
9687 (win32_resume): Let low target handle debug registers, and
9688 step request.
9689 (handle_exception): Add/Remove initial breakpoint. Avoid
9690 non-existant WSTOPSIG on Windows CE.
9691 (win32_read_inferior_memory): Cast to remove warning.
9692 (win32_arch_string): Go through the low target.
9693 (initialize_low): Call set_breakpoint_data with the low
9694 target's breakpoint.
9695 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9696 FOP_REGNUM, mappings): Move to ...
9697 * win32-i386-low.c: ... here.
9698 * win32-low.c (win32_thread_info): Move to ...
9699 * win32-low.h: ... here.
9700 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9701 win32-arm-low.c and wincecompat.c.
9702 (all:): Add $EXEEXT.
9703 (install-only:): Likewise.
9704 (gdbserver:): Likewise.
9705 (gdbreplay:): Likewise.
9706 * config.in: Regenerate.
9707 * configure: Regenerate.
9708
41093d81
PA
97092007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9710
9711 * win32-low.c: Rename typedef thread_info to
9712 win32_thread_info throughout.
9713
544afa54
PA
97142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9715
9716 * win32-i386-low.c: Rename to ...
9717 * win32-low.c: ... this.
9718 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9719 * Makefile.in: Likewise.
9720
bce7165d
PA
97212007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9722
9723 * remote-utils.c (monitor_output): Constify msg parameter.
9724 * server.h (monitor_output): Likewise.
9725 * win32-i386-low.c (handle_output_debug_string): New.
9726 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9727 handle_output_debug_string.
9728 (get_child_debug_event): Likewise.
9729
506c7aa0
DJ
97302007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9731
9732 * server.c (main): Correct strtoul check.
9733
42c81e2a
DJ
97342007-03-27 Jon Ringle <jon@ringle.org>
9735
9736 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9737
9453113a
DJ
97382007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9739
9740 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9741
64a69107
DJ
97422007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9743
9744 * terminal.h: Check HAVE_SGTTY_H.
9745
97462007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9747
9748 * remote-utils.c (remote_open): Print out the assigned port number.
9749
c74d0ad8
DJ
97502007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9751
9752 * remote-utils.c (monitor_output): New function.
9753 * server.c (debug_threads): Define here.
9754 (monitor_show_help): New function.
9755 (handle_query): Handle qRcmd.
9756 (main): Do not handle 'd' packet.
9757 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9758 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9759 of debug_threads.
9760
de7c3b4a
PA
97612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9762
9763 * Makefile.in (EXEEXT): New.
9764 (clean): Use $(EXEEXT).
9765
ef57601b
PA
97662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9767
9768 * target.h (target_ops): Rename send_signal to request_interrupt,
9769 and remove enum target_signal parameter.
9770 * linux-low.c (linux_request_interrupt): Rename from
9771 linux_send_signal, and always send SIGINT.
9772 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9773 and always send SIGINT.
9774 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9775 of send_signal.
9776 (input_interrupt): Likewise.
9777
820f2bda
PA
97782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9779
9780 * server.c (get_features_xml): Check if target implemented
9781 arch_string.
9782 * win32-i386-low.c (win32_arch_string): New.
9783 (win32_target_ops): Add win32_arch_string as arch_string member.
9784
ab39bf24
UW
97852007-02-22 Markus Deuling <deuling@de.ibm.com>
9786
9787 * spu-low.c (spu_arch_string): New.
9788 (spu_target_ops): Add spu_arch_string.
9789
61ff6e04
DJ
97902007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9791
9792 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9793 * configure.ac: Do not check for terminal.h.
9794 * configure, config.in: Regenerated.
9795
fb1e4ffc
DJ
97962007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * Makefile.in (OBS): Add $(XML_BUILTIN).
9799 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9800 (clean): Update.
9801 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9802 (arm-with-iwmmxt.c): New.
9803 * config.in, configure: Regenerate.
9804 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9805 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9806 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9807 (arm*-*-linux*): Add iWMMXt and regset support.
9808 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9809 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9810 (arm_store_wmmxregset, target_regsets): New.
9811 * server.c (get_features_xml): Take annex argument. Check builtin
9812 XML documents.
9813 (handle_query): Handle multiple annexes.
9814
0f48aa01
DJ
98152007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * remote-utils.c [USE_WIN32API] (read, write): Define.
9818 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9819 write.
9820
23181151
DJ
98212007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9822
9823 * linux-i386-low.c (the_low_target): Set arch_string.
9824 * linux-x86-64-low.c (the_low_target): Likewise.
9825 * linux-low.c (linux_arch_string): New.
9826 (linux_target_ops): Add it.
9827 * linux-low.h (struct linux_target_ops): Add arch_string.
9828 * server.c (write_qxfer_response): Use const void * for DATA.
9829 (get_features_xml): New.
9830 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9831 * target.h (struct target_ops): Add arch_string method.
9832
9d606399
DJ
98332007-01-03 Denis Pilat <denis.pilat@st.com>
9834 Daniel Jacobowitz <dan@codesourcery.com>
9835
9836 * linux-low.c (linux_kill): Handle being called with no threads.
9837 * win32-i386-low.c (win32_kill): Likewise.
9838 (get_child_debug_event): Clear current_process_handle.
9839
98402006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9841 Daniel Jacobowitz <dan@codesourcery.com>
9842
9843 * remote-utils.c (remote_open): Check the type of specified
9844 serial port devices before opening them.
9845 * server.c (main): Kill the inferior if an error occurs during
9846 the first remote_open.
9847
a5e13d24
DJ
98482006-12-05 Markus Deuling <deuling@de.ibm.com>
9849
9850 * README: Update supported targets.
9851
186947f7
DJ
98522006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9853
9854 * Makefile.in (clean): Remove reg-mips64.c.
9855 (reg-mips64.c, reg-mips64.o): New rules.
9856 * configure.srv: Handle mips64. Include regset support for mips.
9857 * linux-mips-low.c (union mips_register): New.
9858 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9859 (mips_breakpoint, mips_breakpoint_at): Use int.
9860 (mips_collect_register, mips_supply_register)
9861 (mips_collect_register_32bit, mips_supply_register_32bit)
9862 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9863 (mips_store_fpregset, target_regsets): New.
9864 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9865
a13e2c95
UW
98662006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9867
9868 * configure.srv: Add target "spu*-*-*".
9869 * Makefile.in (clean): Remove reg-spu.c.
9870 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9871 * spu-low.c: New file.
9872
cb7283db
DJ
98732006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9874
9875 * configure.ac: Correct td_thr_tls_get_addr test.
9876 * configure: Regenerated.
9877
89be2091
DJ
98782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9879
9880 * linux-low.c (linux_wait_for_event): Reformat. Use the
9881 pass_signals array.
9882 * remote-utils.c (decode_address_to_semicolon): New.
9883 * server.c (pass_signals, handle_general_set): New.
9884 (handle_query): Mention QPassSignals for qSupported.
9885 (main): Call handle_general_set.
9886 * server.h (pass_signals, decode_address_to_semicolon): New.
9887
000ef4f0
DJ
98882006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * server.c (handle_query): Correct error handling for read_auxv.
9891
b7149293
UW
98922005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9893
9894 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9895 and srv_linux_thread_db to yes.
9896 * linux-s390-low.c (s390_fill_gregset): New function.
9897 (target_regsets): Define data structure.
9898
dae5f5cf
DJ
98992006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9900
9901 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9902 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9903 * config.in, configure: Regenerated.
9904 * inferiors.c (gdb_id_to_thread): New function.
9905 (gdb_id_to_thread_id): Use it.
9906 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9907 * linux-low.h (struct process_info): Add th member.
9908 (thread_db_get_tls_address): New prototype.
9909 * remote-utils.c (decode_address): Make non-static.
9910 * server.c (handle_query): Handle qGetTLSAddr.
9911 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9912 * target.h (struct target_ops): Add get_tls_address.
9913 * thread-db.c (maybe_attach_thread): Save the thread handle.
9914 (thread_db_get_tls_address): New.
9915
32ca6d61
DJ
99162006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9917
9918 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9919 (linux_resume_one_process): Take a siginfo_t *. Update all
9920 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9921 (struct pending_signals): Add a siginfo_t.
9922 (linux_wait_for_process): Always set last_status.
9923 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9924 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9925 * linux-low.h (struct process_info): Add last_status.
9926
5ffff7c1
DJ
99272006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9928
9929 * remote-utils.c (try_rle): New function.
9930 (putpkt_binary): Use it.
9931
8695c747
DJ
99322006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9933
9934 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9935 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9936 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9937 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9938 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9939 point registers.
9940
290fadea
RS
99412006-08-08 Richard Sandiford <richard@codesourcery.com>
9942
9943 * server.c (terminal_fd): New variable.
9944 (old_foreground_pgrp): Likewise.
9945 (restore_old_foreground_pgrp): New function.
9946 (start_inferior): Record the terminal file descriptor in terminal_fd
9947 and its original foreground group in old_foreground_pgrp. Register
9948 restore_old_foreground_pgrp with atexit().
9949
9f2e1e63
DJ
99502006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9951
9952 * server.c (handle_query): Correct qPart to qXfer.
9953
b80864fb
DJ
99542006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9955
9956 * configure.ac: Check for more headers which are missing on
9957 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9958 * configure.srv: Add Cygwin and mingw32.
9959 * remote-utils.c: Don't include headers unconditionally which
9960 are missing on mingw32. Include <winsock.h> for mingw32.
9961 (remote_open): Adjust for mingw32 support. Flush
9962 standard error after writing to it.
9963 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9964 (unblock_async_io, enable_async_io, disable_async_io)
9965 (readchar, getpkt): Update for Winsock support.
9966 (prepare_resume_reply): Expect a protocol signal number.
9967 * server.c: Disable <sys/wait.h> on mingw32.
9968 (start_inferior): Adjust for mingw32 support. Flush
9969 standard error after writing to it.
9970 (attach_inferior): Likewise. Use protocol signal
9971 numbers.
9972 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9973 and names.
9974 * win32-i386-low.c: New file.
9975 * Makefile.in (XM_CLIBS): Set.
9976 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9977 (win32-i386-low.o): New dependency rule.
9978 * linux-low.c (linux_wait): Use target signal numbers.
9979 * target.h (struct target_ops): Doc fix.
9980 * server.h (target_signal_to_name): New prototype.
9981 * gdbreplay.c: Don't include headers unconditionally which
9982 are missing on mingw32. Include <winsock.h> for mingw32.
9983 (remote_close, remote_open): Adjust for Winsock support.
9984 * configure, config.in: Regenerated.
9985
0876f84a
DJ
99862006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9987
9988 * server.c (decode_xfer_read, write_qxfer_response): New.
9989 (handle_query): Take a packet length argument. Handle
9990 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9991 the qSupported response.
9992 (main): Update call to handle_query.
9993
01f9e8fa
DJ
99942006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9995
9996 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9997 (putpkt_binary): Renamed from putpkt and adjusted for binary
9998 data.
9999 (putpkt): New wrapper for putpkt_binary.
10000 (readchar): Don't mask off the high bit.
10001 (decode_X_packet): New function.
10002 * server.c (main): Call putpkt_binary if a handler sets the packet
10003 length. Save the length of the incoming packet. Handle 'X'.
10004 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10005
be2a5f71
DJ
100062006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10007
10008 * server.c (handle_query): Handle qSupported.
10009
ea025f5f
DJ
100102006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10011
10012 * remote-utils.c (all_symbols_looked_up): New variable.
10013 (look_up_one_symbol): Check it.
10014 * server.h (look_up_one_symbol): New declaration.
10015 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10016
9308fc88
DJ
100172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10020 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10021 (PTRACE_GET_THREAD_AREA): Define.
10022 (ps_get_thread_area): New function.
10023
52fb6437
NS
100242006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10025
10026 * configure.srv (m68k*-*-uclinux*): New target.
10027 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10028 (linux_resume_one_process): Remove extraneous cast.
10029 (linux_read_offsets): New.
10030 (linux_target_op): Add linux_read_offsets on mmuless systems.
10031 * server.c (handle_query): Add qOffsets logic.
10032 * target.h (struct target_ops): Add read_offsets.
10033
21b0f40c
DJ
100342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10035
10036 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10037 (PTRACE_GET_THREAD_AREA): Define.
10038 (ps_get_thread_area): New function.
10039 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10040 (linux-x86-64-low.o): Update.
10041
0050a760
DJ
100422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10043
10044 * configure.ac: Remove checks for prfpregset_t.
10045 * gdb_proc_service.h: New file.
10046 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10047 new "gdb_proc_service.h".
10048 * proc-service.c: Likewise.
10049 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10050 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10051 * Makefile.in (gdb_proc_service_h): Updated.
10052 * configure, config.in: Regenerated.
10053
b92a518e
DJ
100542006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10055
10056 * remote-utils.c (prepare_resume_reply): Move declaration
10057 of gdb_id_from_wait to the top of the block.
10058
545587ee
DJ
100592006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10060
10061 * linux-low.c (regsets_store_inferior_registers): Read the regset
10062 from the target before filling it.
10063
9db87ebd
DJ
100642006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10065
10066 * server.c (attach_inferior): Return SIGTRAP for a successful
10067 attach.
10068
dd24457d
DJ
100692006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10070
10071 * Makefile.in (OBS): Add version.o.
10072 (STAGESTUFF): Delete.
10073 (version.o): Add dependencies.
10074 (version.c): Replace rule.
10075 (clean): Remove version.c.
10076 * server.c (gdbserver_version): New.
10077 (gdbserver_usage): Use printf.
10078 (main): Handle --version and --help.
10079 * server.h (version, host_name): Add declarations.
10080
6f0f660e
EZ
100812005-12-23 Eli Zaretskii <eliz@gnu.org>
10082
889bf7c5
PA
10083 * linux-arm-low.c:
10084 * linux-arm-low.c:
10085 * inferiors.c:
10086 * i387-fp.h:
10087 * i387-fp.c:
10088 * gdbreplay.c:
10089 * regcache.c:
10090 * proc-service.c:
10091 * mem-break.h:
10092 * mem-break.c:
10093 * linux-x86-64-low.c:
10094 * linux-sh-low.c:
10095 * linux-s390-low.c:
10096 * linux-ppc64-low.c:
10097 * linux-ppc-low.c:
10098 * linux-mips-low.c:
10099 * linux-m68k-low.c:
10100 * linux-m32r-low.c:
10101 * linux-low.h:
10102 * linux-low.c:
10103 * linux-ia64-low.c:
10104 * linux-i386-low.c:
10105 * linux-crisv32-low.c:
10106 * thread-db.c:
10107 * terminal.h:
10108 * target.h:
10109 * target.c:
10110 * server.h:
10111 * server.c:
10112 * remote-utils.c:
10113 * regcache.h:
10114 * utils.c:
10115 * Makefile.in:
10116 * configure.ac:
6f0f660e
EZ
10117 * gdbserver.1: Add (C) after Copyright. Update the FSF
10118 address.
10119
9d1fb177
DJ
101202005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10123 (arm_breakpoint_at): Recognize both breakpoints.
10124 (the_low_target): Use the correct breakpoint instruction.
10125
011a70c2
DJ
101262005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10129 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10130 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10131 (the_low_target): Update.
10132
7fb85e41
AS
101332005-10-25 Andreas Schwab <schwab@suse.de>
10134
10135 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10136
10137 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10138 (ia64_num_regs): Reduce to 462.
10139
3db0444b
DJ
101402005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * acinclude.m4: Correct quoting.
10143 * aclocal.m4: Regenerated.
10144
10145 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10146 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10147 (thread_db_init): Call thread_db_err_str.
10148 * configure.ac: Check for TD_VERSION.
10149 * config.in, configure: Regenerated.
10150
bee0189a
DJ
101512005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10152
10153 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10154
e9d25b98
DJ
101552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10158 is not available. Define HAVE_PTRACE_GETREGS if it is.
10159 * config.in, configure: Regenerated.
10160 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10161 * linux-i386-low.c, linux-m68k-low.c: Update to use
10162 HAVE_PTRACE_GETREGS.
10163 * linux-low.c (regsets_fetch_inferior_registers)
10164 (regsets_store_inferior_registers): Only return 0 if we processed
10165 GENERAL_REGS.
10166 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10167 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10168
a06660f7
DJ
101692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10170
10171 * inferiors.c (struct thread_info): Add gdb_id.
10172 (add_thread): Add gdb_id argument.
10173 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10174 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10175 calls to add_thread.
10176 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10177 * server.c (handle_query): Use thread_to_gdb_id.
10178 (handle_v_cont, main): Use gdb_id_to_thread_id.
10179 * server.h (add_thread): Update prototype.
10180 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10181 prototypes.
10182
5a1f5858
DJ
101832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10186 left-padded registers.
10187 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10188 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10189
e122f1f5
SE
101902005-07-01 Steve Ellcey <sje@cup.hp.com>
10191
10192 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10193 * configure: Regenerate.
10194 * config.in: Regenerate.
10195 * server.h (NEED_DECLARATION_STRERROR):
10196 Replace with !HAVE_DECL_STRERROR.
10197
d592fa2f
DJ
101982005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10199
10200 * linux-low.c (linux_wait, linux_send_signal): Don't test
10201 an unsigned long variable for > 0 if it could be MAX_ULONG.
10202 * server.c (myresume): Likewise.
10203 * target.c (set_desired_inferior): Likewise.
10204
ccbd4912
MK
102052005-06-13 Mark Kettenis <kettenis@gnu.org>
10206
10207 * configure.ac: Simplify and improve check for socklen_t.
10208 * configure, config.in: Regenerate.
10209
f450004a
DJ
102102005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10211
10212 * acconfig.h: Remove.
10213 * configure.ac: Add a test for socklen_t. Use three-argument
10214 AC_DEFINE throughout.
10215 * config.in: Regenerated using autoheader 2.59.
10216 * configure: Regenerated.
10217
10218 * gdbreplay.c (socklen_t): Provide a default.
10219 (remote_open): Use socklen_t.
10220 * remote-utils.c (socklen_t): Provide a default.
10221 (remote_open): Use socklen_t.
10222 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10223 unsigned char.
10224
10225 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10226 char for buffers.
10227 * linux-low.c (linux_read_memory, linux_write_memory)
10228 (linux_read_auxv): Likewise.
10229 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10230 (check_mem_write): Likewise.
10231 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10232 Likewise.
10233 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10234 (registers_from_string, register_data): Likewise.
10235 * server.c (handle_query, main): Likewise.
10236 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10237 (decode_M_packet): Likewise.
10238 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10239 * target.h (struct target_ops): Update read_memory, write_memory,
10240 and read_auxv.
10241 (read_inferior_memory, write_inferior_memory): Update.
10242 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10243 to unsigned char *.
10244 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10245 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10246 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10247 linux-s390-low.c, linux-sh-low.c: Update for changes in
10248 read_inferior_memory and the_low_target->breakpoint.
10249
eee84df1
DJ
102502005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10251
10252 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10253 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10254 * configure.srv: Add powerpc64-*-linux*.
10255 * linux-ppc64-low.c: New file.
10256
45b134e5
OF
102572005-05-23 Orjan Friberg <orjanf@axis.com>
10258
10259 * linux-cris-low.c: New file with support for CRIS.
10260 * linux-crisv32-low.c: Ditto for CRISv32.
10261 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10262 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10263 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10264 reg-crisv32.o, and reg-crisv32.c to make rules.
10265 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10266 recognized targets.
10267
48d93c75
UW
102682005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10269
10270 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10271 of sizeof (PTRACE_XFER_TYPE).
10272 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10273
e013ee27
OF
102742005-05-12 Orjan Friberg <orjanf@axis.com>
10275
889bf7c5 10276 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10277 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10278 pointers for hardware watchpoint support.
10279 * linux-low.h (struct linux_target_ops): Ditto.
10280 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10281 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10282 to linux_target_ops.
10283 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10284 reply packet.
10285 * server.c (main): Recognize 'Z' and 'z' packets.
10286
b0ded00b
UW
102872005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10288
10289 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10290 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10291 (the_low_target): Add new members.
10292
8643e2ad
DJ
102932005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10294
10295 * proc-service.c (ps_lgetregs): Search all_processes instead of
10296 all_threads.
10297
fc620387
DJ
102982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * server.c (start_inferior): Change return type to int.
10301 (attach_inferior): Change sigptr to int *.
10302 (handle_v_cont, handle_v_requests): Change signal to int *.
10303 (main): Change signal to int.
10304
103052005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10306
10307 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10308 * configure.srv: Add m32r*-*-linux*.
10309 * linux-m32r-low.c: New file.
10310
e0e76420
DJ
103112005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10312
10313 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10314
a1928bad
DJ
103152005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10316
10317 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10318 Take unsigned long arguments for PIDs.
10319 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10320 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10321 (wait_for_sigstop, linux_resume_one_process)
10322 (regsets_fetch_inferior_registers, linux_send_signal)
10323 (linux_read_auxv): Likewise. Update the types of variables holding
10324 PIDs. Update format string specifiers.
10325 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10326 * remote-utils.c (prepare_resume_reply): Likewise.
10327 * server.c (cont_thread, general_thread, step_thread)
10328 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10329 unsigned long.
10330 (handle_query): Update format specifiers.
10331 (handle_v_cont, main): Use strtoul for thread IDs.
10332 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10333 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10334 (general_thread, step_thread, thread_from_wait)
10335 (old_thread_from_wait): Update.
10336 * target.h (struct thread_resume): Use unsigned long for THREAD.
10337 (struct target_ops): Use unsigned long for arguments to attach and
10338 thread_alive.
10339
dcdb98d2
DJ
103402005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10341
10342 * acinclude.m4: Include bfd/bfd.m4 directly.
10343 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10344 <agriffis@toolchain.org>.
10345 * aclocal.m4, configure: Regenerated.
10346
bec39cab
AC
103472005-01-07 Andrew Cagney <cagney@gnu.org>
10348
10349 * configure.ac: Rename configure.in, require autoconf 2.59.
10350 * configure: Re-generate.
10351
434c4c77
DJ
103522004-12-08 Daniel Jacobowitz <dan@debian.org>
10353
10354 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10355 LIBS when finished.
10356 * aclocal.m4: Regenerated.
10357 * configure: Regenerated.
10358
db1d3e1b
AS
103592004-11-21 Andreas Schwab <schwab@suse.de>
10360
10361 * linux-m68k-low.c (m68k_num_gregs): Define.
10362 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10363 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10364 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10365 (m68k_breakpoint_at): New. Add to the_low_target.
10366
10367 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10368 srv_linux_thread_db to yes.
10369
43360365
JB
103702004-10-20 Joel Brobecker <brobecker@gnat.com>
10371
10372 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10373 (ARCH_SET_FS): Likewise.
10374 (ARCH_GET_FS): Likewise.
10375 (ARCH_GET_GS): Likewise.
10376
fd500816
DJ
103772004-10-16 Daniel Jacobowitz <dan@debian.org>
10378
10379 * linux-i386-low.c (ps_get_thread_area): New.
10380 * linux-x86-64-low.c (ps_get_thread_area): New.
10381 * linux-low.c: Include <sys/syscall.h>.
10382 (linux_kill_one_process): Don't kill the first thread here.
10383 (linux_kill): Kill the first thread here.
10384 (kill_lwp): New function.
10385 (send_sigstop, linux_send_signal): Use it.
10386 * proc-service.c: Clean up #ifdefs.
10387 (fpregset_info): Delete.
10388 (ps_lgetregs): Update and enable implementation.
10389 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10390 implementations.
10391 * remote-utils.c (struct sym_cache, symbol_cache): New.
10392 (input_interrupt): Print a clearer message.
10393 (async_io_enabled): New variable.
10394 (enable_async_io, disable_async_io): Use it. Update comments.
10395 (look_up_one_symbol): Use the symbol cache.
10396 * thread-db.c (thread_db_look_up_symbols): New function.
10397 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10398
f6de3c42
DJ
103992004-10-16 Daniel Jacobowitz <dan@debian.org>
10400
10401 * configure.in: Test for -rdynamic.
10402 * configure: Regenerated.
10403 * Makefile (INTERNAL_LDFLAGS): New.
10404 (gdbserver, gdbreplay): Use it.
10405
2c0fc042
AC
104062004-09-02 Andrew Cagney <cagney@gnu.org>
10407
10408 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10409
075b3282
DJ
104102004-03-23 Daniel Jacobowitz <drow@mvista.com>
10411
10412 * linux-low.c (linux_wait): Clear all_processes list also.
10413
fa6a77dc
DJ
104142004-03-12 Daniel Jacobowitz <drow@mvista.com>
10415
10416 * linux-low.c: Include <errno.h>. Remove extern declaration of
10417 errno.
10418
6d782a97
DJ
104192004-03-12 Daniel Jacobowitz <drow@mvista.com>
10420
10421 * gdbreplay.c, server.h, utils.c: Update copyright years.
10422
3a7fb99b
DJ
104232004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10424
10425 * server.c (main): Print child status or termination signal from
10426 variable 'signal', not 'sig'.
10427
c3e735a6
DJ
104282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10429
10430 * linux-low.c (linux_read_memory): Change return type to
10431 int. Check for and return error from ptrace().
10432 * target.c (read_inferior_memory): Change return type to int. Pass
10433 back return status from the_target->read_memory().
10434 * target.h (struct target_ops): Adapt *read_memory() prototype.
10435 Update comment.
10436 (read_inferior_memory): Adapt prototype.
10437 * server.c (main): Return an error packet if
10438 read_inferior_memory() returns an error.
10439
a59d1c82
DJ
104402004-03-04 Daniel Jacobowitz <drow@mvista.com>
10441
10442 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10443 Unify with other clean targets.
10444
dc3f8883
DJ
104452004-02-29 Daniel Jacobowitz <drow@mvista.com>
10446
10447 * server.c (handle_v_cont): Call set_desired_inferior.
10448
89a208da
DJ
104492004-02-29 Daniel Jacobowitz <drow@mvista.com>
10450
10451 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10452
62ea82f5
DJ
104532004-02-29 Daniel Jacobowitz <drow@mvista.com>
10454
10455 * linux-low.c (linux_wait): Unblock async I/O.
10456 (linux_resume): Block and enable async I/O.
10457 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10458 * server.h (block_async_io, unblock_async_io): Add prototypes.
10459
6910d122
DJ
104602004-02-29 Daniel Jacobowitz <drow@mvista.com>
10461
10462 * remote-utils.c (remote_open): Print a status notice after
10463 opening a TCP port.
10464 * server.c (attach_inferior): Print a status notice after
10465 attaching.
10466
104672004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10468
10469 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10470
c89dc5d4
DJ
104712004-02-26 Daniel Jacobowitz <drow@mvista.com>
10472
10473 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10474 error packet.
10475 * server.c, target.h: Update copyright years.
10476
4b8dad4a
RM
104772004-02-25 Roland McGrath <roland@redhat.com>
10478
10479 * target.h (struct target_ops): New member `read_auxv'.
10480 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10481 * linux-low.c (linux_read_auxv): New function.
10482 (linux_target_ops): Initialize `read_auxv' member to that.
10483
d7446758
JB
104842004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10485
10486 Committed by Jim Blandy <jimb@redhat.com>.
10487
10488 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10489 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10490 instead of GPR_SIZE to distiguish s390 and s390x targets.
10491
5544ad89
DJ
104922004-01-31 Daniel Jacobowitz <drow@mvista.com>
10493
10494 * linux-low.c: Update copyright year.
10495 (check_removed_breakpoint): Clear pending_is_breakpoint.
10496 (linux_set_resume_request, linux_queue_one_thread)
10497 (resume_status_pending_p): New functions.
10498 (linux_continue_one_thread): Use process->resume.
10499 (linux_resume): Only resume threads if there are no pending events.
10500 * linux-low.h (struct process_info): Add resume request
10501 pointer.
10502
2a68b70e
DJ
105032004-01-30 Daniel Jacobowitz <drow@mvista.com>
10504
10505 * regcache.c (new_register_cache): Clear the allocated register
10506 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10507
64386c31
DJ
105082003-10-13 Daniel Jacobowitz <drow@mvista.com>
10509
10510 * linux-low.c (linux_resume): Take a struct thread_resume *
10511 argument.
10512 (linux_wait): Update call.
10513 (resume_ptr): New static variable.
10514 (linux_continue_one_thread): Renamed from
10515 linux_continue_one_process. Use resume_ptr.
10516 (linux_resume): Use linux_continue_one_thread.
10517 * server.c (handle_v_cont, handle_v_requests): New functions.
10518 (myresume): New function.
10519 (main): Handle 'v' case.
10520 * target.h (struct thread_resume): New type.
10521 (struct target_ops): Change argument of "resume" to struct
10522 thread_resume *.
10523 (myresume): Delete macro.
10524
c938e9b0
L
105252003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10526
10527 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10528 (uninstall): Support DESTDIR.
10529
7f313d07
BC
10530Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10531
10532 * configure.srv: Add xscale*linux copy of arm*linux entry.
10533
3b2fc2ea
DJ
105342003-07-24 Daniel Jacobowitz <drow@mvista.com>
10535
10536 * linux-arm-low.c (arm_reinsert_addr): New function.
10537 (the_low_target): Add arm_reinsert_addr.
10538
1c0a559e
MK
105392003-07-08 Mark Kettenis <kettenis@gnu.org>
10540
10541 * mem-break.c: Remove whitespace at end of file.
10542
43d5792c
DJ
105432003-06-28 Daniel Jacobowitz <drow@mvista.com>
10544
10545 * configure.in: Check whether we need to prototype strerror.
10546 * server.h: Optionally prototype strerror.
10547 * gdbreplay.c (perror_with_name): Use strerror.
10548 * linux-low.c (linux_attach_lwp): Use strerror.
10549 * utils.c (perror_with_name): Use strerror.
10550 * config.in, configure: Regenerated.
10551
c8a86edf
DJ
105522003-06-28 Daniel Jacobowitz <drow@mvista.com>
10553
10554 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10555 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10556
73d37363
DJ
105572003-06-20 Daniel Jacobowitz <drow@mvista.com>
10558
10559 * Makefile.in (SFILES): Update.
10560 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10561 low-sun3.c: Remove files.
10562
6ad8ae5c
DJ
105632003-06-17 Daniel Jacobowitz <drow@mvista.com>
10564
10565 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10566 (linux_detach_one_process, linux_detach): New functions.
10567 (linux_target_ops): Add linux_detach.
10568 * server.c (main): Handle 'D' packet.
10569 * target.h (struct target_ops): Add "detach" member.
10570 (detach_inferior): Define.
10571
1581182a
MK
105722003-06-13 Mark Kettenis <kettenis@gnu.org>
10573
10574 From Kelley Cook <kelleycook@wideopenwest.com>:
10575 * configure.srv: Accept i[34567]86 variants.
10576
e5379b03
DJ
105772003-06-05 Daniel Jacobowitz <drow@mvista.com>
10578
10579 * linux-low.c (linux_wait_for_event): Correct comment typos.
10580 (linux_resume_one_process): Call check_removed_breakpoint.
10581 (linux_send_signal): New function.
10582 (linux_target_ops): Add linux_send_signal.
10583 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10584 of kill.
10585 * target.h (struct target_ops): Add send_signal.
10586
2ff29de4
JB
105872003-05-29 Jim Blandy <jimb@redhat.com>
10588
10589 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10590 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10591 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10592 away part of the register's value.
10593
254787d4
DJ
105942003-03-26 Daniel Jacobowitz <drow@mvista.com>
10595
10596 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10597 (linux_wait_for_event, linux_init_signals): Likewise.
10598
94e10508
DJ
105992003-03-17 Daniel Jacobowitz <drow@mvista.com>
10600
10601 * configure.in: Check for stdlib.h.
10602 * configure: Regenerated.
10603 * config.in: Regenerated.
10604
4c0711e0
DJ
106052003-01-04 Andreas Schwab <schwab@suse.de>
10606
10607 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10608
ef66e766
AC
106092003-01-02 Andrew Cagney <ac131313@redhat.com>
10610
10611 * Makefile.in: Remove obsolete code.
10612
a1358604
DJ
106132002-11-20 Daniel Jacobowitz <drow@mvista.com>
10614
10615 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10616 defined(PT_FPR0_HI).
10617
23ce3b1c
DJ
106182002-11-17 Stuart Hughes <seh@zee2.com>
10619
10620 * linux-arm-low.c (arm_num_regs): Increase.
10621 (arm_regmap): Include status register.
10622
106232002-11-17 Daniel Jacobowitz <drow@mvista.com>
10624
10625 * linux-low.c (register_addr): Remove incorrect -1 check.
10626
a9fa9f7d
DJ
106272002-08-29 Daniel Jacobowitz <drow@mvista.com>
10628
10629 * linux-low.c (linux_create_inferior): Call setpgid. Return
10630 the new PID.
10631 (unstopped_p, linux_signal_pid): Remove.
10632 (linux_target_ops): Remove linux_signal_pid.
10633 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10634 global instead of target method.
10635 * target.h (struct target_ops): Remove signal_pid. Update comment
10636 for create_inferior.
10637 * server.c (signal_pid): New variable.
10638 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10639 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10640 (attach_inferior): Set signal_pid.
10641
17574093
DJ
106422002-08-23 Daniel Jacobowitz <drow@mvista.com>
10643
10644 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10645
106462002-08-20 Jim Blandy <jimb@redhat.com>
10647
10648 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10649 default for this.
10650
106512002-08-01 Andrew Cagney <cagney@redhat.com>
10652
10653 * Makefile.in: Make chill references obsolete.
10654
106552002-07-24 Kevin Buettner <kevinb@redhat.com>
10656
10657 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10658 * configure: Regenerate.
10659 * config.in: Regenerate.
10660
106612002-07-09 David O'Brien <obrien@FreeBSD.org>
10662
10663 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10664 (perror_with_name, remote_close, remote_open, expect, play): Static.
10665
106662002-07-04 Michal Ludvig <mludvig@suse.cz>
10667
4b8dad4a 10668 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10669 byte offsets instead of an array of indexes.
10670 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10671
106722002-06-13 Daniel Jacobowitz <drow@mvista.com>
10673
10674 * regcache.c: Add comment.
10675
106762002-06-11 Daniel Jacobowitz <drow@mvista.com>
10677
10678 * thread-db.c: New file.
10679 * proc-service.c: New file.
10680 * acinclude.m4: New file.
10681 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10682 proc-service.o, and thread-db.o.
10683 (linux-low.o): Add USE_THREAD_DB.
10684 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10685 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10686 * aclocal.m4: Regenerated.
10687 * config.in: Regenerated.
10688 * configure: Regenerated.
10689 * configure.in: Check for proc_service.h, sys/procfs.h,
10690 thread_db.h, and linux/elf.h headrs.
10691 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10692 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10693 Check for -lthread_db and thread support.
10694 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10695 PowerPC, and SuperH.
10696 * i387-fp.c: Constify arguments.
10697 * i387-fp.h: Likewise.
10698 * inferiors.c: (struct thread_info): Renamed from
10699 `struct inferior_info'. Remove PID member. Use generic inferior
10700 list header. All uses updated.
10701 (inferiors, signal_pid): Removed.
10702 (all_threads): New variable.
10703 (get_thread): Define.
10704 (add_inferior_to_list): New function.
10705 (for_each_inferior): New function.
10706 (change_inferior_id): New function.
10707 (add_inferior): Removed.
10708 (remove_inferior): New function.
10709 (add_thread): New function.
10710 (free_one_thread): New function.
10711 (remove_thread): New function.
10712 (clear_inferiors): Use for_each_inferior and free_one_thread.
10713 (find_inferior): New function.
10714 (find_inferior_id): New function.
10715 (inferior_target_data): Update argument type.
10716 (set_inferior_target_data): Likewise.
10717 (inferior_regcache_data): Likewise.
10718 (set_inferior_regcache_data): Likewise.
10719 * linux-low.c (linux_bp_reinsert): Remove.
10720 (all_processes, stopping_threads, using_thrads)
10721 (struct pending_signals, debug_threads, pid_of): New.
10722 (inferior_pid): Replace with macro.
10723 (struct inferior_linux_data): Remove.
10724 (get_stop_pc, add_process): New functions.
10725 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10726 Use add_process and add_thread.
10727 (linux_attach_lwp): New function, based on old linux_attach. Use
10728 add_process and add_thread. Set stop_expected for new threads.
10729 (linux_attach): New function.
10730 (linux_kill_one_process): New function.
10731 (linux_kill): Kill all LWPs.
10732 (linux_thread_alive): Use find_inferior_id.
10733 (check_removed_breakpoints, status_pending_p): New functions.
10734 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10735 Update. Use WNOHANG. Wait for cloned processes also. Update process
10736 struct for the found process.
10737 (linux_wait_for_event): New function.
10738 (linux_wait): Use it. Support LWPs.
10739 (send_sigstop, wait_for_sigstop, stop_all_processes)
10740 (linux_resume_one_process, linux_continue_one_process): New functions.
10741 (linux_resume): Support LWPs.
10742 (REGISTER_RAW_SIZE): Remove.
10743 (fetch_register): Use register_size instead. Call supply_register.
10744 (usr_store_inferior_registers): Likewise. Call collect_register.
10745 Fix recursive case.
10746 (regsets_fetch_inferior_registers): Improve error message.
10747 (regsets_store_inferior_registers): Add debugging.
10748 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10749 (unstopped_p, linux_signal_pid): New functions.
10750 (linux_target_ops): Add linux_signal_pid.
10751 (linux_init_signals): New function.
10752 (initialize_low): Call it. Initialize using_threads.
10753 * regcache.c (inferior_regcache_data): Add valid
10754 flag.
10755 (get_regcache): Fetch registers lazily. Add fetch argument
10756 and update all callers.
10757 (regcache_invalidate_one, regcache_invalidate): New
10758 functions.
10759 (new_register_cache): Renamed from create_register_cache.
10760 Return the new regcache.
10761 (free_register_cache): Change argument to a void *.
10762 (registers_to_string, registers_from_string): Call get_regcache
10763 with fetch flag set.
10764 (register_data): Make static. Pass fetch flag to get_regcache.
10765 (supply_register): Call get_regcache with fetch flag clear.
10766 (collect_register): Call get_regcache with fetch flag set.
10767 (collect_register_as_string): New function.
10768 * regcache.h: Update.
10769 * remote-utils.c (putpkt): Flush after debug output and use
10770 stderr.
10771 Handle input interrupts while waiting for an ACK.
10772 (input_interrupt): Use signal_pid method.
10773 (getpkt): Flush after debug output and use stderr.
10774 (outreg): Use collect_register_as_string.
10775 (new_thread_notify, dead_thread_notify): New functions.
10776 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10777 and general_thread.
10778 (look_up_one_symbol): Flush after debug output.
10779 * server.c (step_thread, server_waiting): New variables.
10780 (start_inferior): Don't use signal_pid. Update call to mywait.
10781 (attach_inferior): Update call to mywait.
10782 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10783 (main): Don't fetch/store registers explicitly. Use
10784 set_desired_inferior. Support proposed ``Hs'' packet. Update
10785 calls to mywait.
10786 * server.h: Update.
10787 (struct inferior_list, struct_inferior_list_entry): New.
10788 * target.c (set_desired_inferior): New.
10789 (write_inferior_memory): Constify.
10790 (mywait): New function.
10791 * target.h: Update.
10792 (struct target_ops): New signal_pid method.
10793 (mywait): Removed macro, added prototype.
10794
10795 * linux-low.h (regset_func): Removed.
10796 (regset_fill_func, regset_store_func): New.
10797 (enum regset_type): New.
10798 (struct regset_info): Add type field. Use new operation types.
10799 (struct linux_target_ops): stop_pc renamed to get_pc.
10800 Add decr_pc_after_break and breakpoint_at.
10801 (get_process, get_thread_proess, get_process_thread)
10802 (strut process_info, all_processes, linux_attach_lwp)
10803 (thread_db_init): New.
10804
10805 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10806 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10807 (the_low_target): Add new members.
10808 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10809 (i386_store_fpxregset): Constify.
10810 (target_regsets): Add new kind identifier.
10811 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10812 (i386_set_pc): Add debugging.
10813 (i386_breakpoint_at): New function.
10814 (the_low_target): Add new members.
10815 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10816 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10817 (mips_breakpoint_at): New.
10818 (the_low_target): Add new members.
10819 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10820 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10821 (the_low_target): Add new members.
10822 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10823 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10824 (the_low_target): Add new members.
10825 * linux-x86-64-low.c (target_regsets): Add new kind
10826 identifier.
10827
108282002-05-15 Daniel Jacobowitz <drow@mvista.com>
10829
10830 From Martin Pool <mbp@samba.org>:
10831 * server.c (gdbserver_usage): New function.
10832 (main): Call it.
10833
108342002-05-14 Daniel Jacobowitz <drow@mvista.com>
10835
10836 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10837 stop_at -> stop_pc.
10838
108392002-05-04 Andrew Cagney <ac131313@redhat.com>
10840
10841 * Makefile.in: Remove obsolete code.
10842
108432002-04-24 Michal Ludvig <mludvig@suse.cz>
10844
10845 * linux-low.c (regsets_fetch_inferior_registers),
10846 (regsets_store_inferior_registers): Removed cast to int from
10847 ptrace() calls.
10848 * regcache.h: Added declaration of struct inferior_info.
10849
108502002-04-20 Daniel Jacobowitz <drow@mvista.com>
10851
10852 * inferiors.c (struct inferior_info): Add regcache_data.
10853 (add_inferior): Call create_register_cache.
10854 (clear_inferiors): Call free_register_cache.
10855 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10856 * regcache.c (struct inferior_regcache_data): New.
10857 (registers): Remove.
10858 (get_regcache): New function.
10859 (create_register_cache, free_register_cache): New functions.
10860 (set_register_cache): Don't initialize the register cache here.
10861 (registers_to_string, registers_from_string, register_data): Call
10862 get_regcache.
10863 * regcache.h: Add prototypes.
10864 * server.h: Likewise.
10865
108662002-04-20 Daniel Jacobowitz <drow@mvista.com>
10867
10868 * mem-break.c: New file.
10869 * mem-break.h: New file.
10870 * Makefile.in: Add mem-break.o rule; update server.h
10871 dependencies.
10872 * inferiors.c (struct inferior_info): Add target_data
10873 member.
10874 (clear_inferiors): Free target_data member if set.
10875 (inferior_target_data, set_inferior_target_data): New functions.
10876 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10877 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10878 * linux-low.c (linux_bp_reinsert): New variable.
10879 (struct inferior_linux_data): New.
10880 (linux_create_inferior): Use set_inferior_target_data.
10881 (linux_attach): Likewise. Call add_inferior.
10882 (linux_wait_for_one_inferior): New function.
10883 (linux_wait): Call it.
10884 (linux_write_memory): Add const.
10885 (initialize_low): Call set_breakpoint_data.
10886 * linux-low.h (struct linux_target_ops): Add breakpoint
10887 handling members.
10888 * server.c (attach_inferior): Remove extra add_inferior
10889 call.
10890 * server.h: Include mem-break.h. Update inferior.c
10891 prototypes.
10892 * target.c (read_inferior_memory)
10893 (write_inferior_memory): New functions.
10894 * target.h (read_inferior_memory)
10895 (write_inferior_memory): Change macros to prototypes.
10896 (struct target_ops): Update comments. Add const to write_memory
10897 definition.
10898
108992002-04-11 Daniel Jacobowitz <drow@mvista.com>
10900
10901 * linux-low.c (usr_store_inferior_registers): Support
10902 registers which are allowed to fail to store.
10903 * linux-low.h (linux_target_ops): Likewise.
10904 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10905 (ppc_cannot_store_register): FPSCR may not be storable.
10906
109072002-04-09 Daniel Jacobowitz <drow@mvista.com>
10908
10909 * server.h: Include <string.h> if HAVE_STRING_H.
10910 * ChangeLog: Correct paths in last ChangeLog entry.
10911
109122002-04-09 Daniel Jacobowitz <drow@mvista.com>
10913
10914 * linux-low.h: Remove obsolete prototypes.
10915 (struct linux_target_ops): New.
10916 (extern the_low_target): New.
10917 * linux-low.c (num_regs, regmap): Remove declarations.
10918 (register_addr): Use the_low_target explicitly.
10919 (fetch_register): Likewise.
10920 (usr_fetch_inferior_registers): Likewise.
10921 (usr_store_inferior_registers): Likewise.
10922 * linux-arm-low.c (num_regs): Remove.
10923 (arm_num_regs): Define.
10924 (arm_regmap): Renamed from regmap, made static.
10925 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10926 made static.
10927 (arm_cannot_store_register): Renamed from cannot_store_register,
10928 made static.
10929 (the_low_target): New.
10930 * linux-i386-low.c (num_regs): Remove.
10931 (i386_num_regs): Define.
10932 (i386_regmap): Renamed from regmap, made static.
10933 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10934 made static.
10935 (i386_cannot_store_register): Renamed from cannot_store_register,
10936 made static.
10937 (the_low_target): New.
10938 * linux-ia64-low.c (num_regs): Remove.
10939 (ia64_num_regs): Define.
10940 (ia64_regmap): Renamed from regmap, made static.
10941 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10942 made static.
10943 (ia64_cannot_store_register): Renamed from cannot_store_register,
10944 made static.
10945 (the_low_target): New.
10946 * linux-m68k-low.c (num_regs): Remove.
10947 (m68k_num_regs): Define.
10948 (m68k_regmap): Renamed from regmap, made static.
10949 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10950 made static.
10951 (m68k_cannot_store_register): Renamed from cannot_store_register,
10952 made static.
10953 (the_low_target): New.
10954 * linux-mips-low.c (num_regs): Remove.
10955 (mips_num_regs): Define.
10956 (mips_regmap): Renamed from regmap, made static.
10957 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10958 made static.
10959 (mips_cannot_store_register): Renamed from cannot_store_register,
10960 made static.
10961 (the_low_target): New.
10962 * linux-ppc-low.c (num_regs): Remove.
10963 (ppc_num_regs): Define.
10964 (ppc_regmap): Renamed from regmap, made static.
10965 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10966 made static.
10967 (ppc_cannot_store_register): Renamed from cannot_store_register,
10968 made static.
10969 (the_low_target): New.
10970 * linux-s390-low.c (num_regs): Remove.
10971 (s390_num_regs): Define.
10972 (s390_regmap): Renamed from regmap, made static.
10973 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10974 made static.
10975 (s390_cannot_store_register): Renamed from cannot_store_register,
10976 made static.
10977 (the_low_target): New.
10978 * linux-sh-low.c (num_regs): Remove.
10979 (sh_num_regs): Define.
10980 (sh_regmap): Renamed from regmap, made static.
10981 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10982 made static.
10983 (sh_cannot_store_register): Renamed from cannot_store_register,
10984 made static.
10985 (the_low_target): New.
10986 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10987 (the_low_target): New.
10988
109892002-04-09 Daniel Jacobowitz <drow@mvista.com>
10990
10991 * Makefile.in: Add stamp-h target.
10992 * configure.in: Create stamp-h.
10993 * configure: Regenerated.
10994
109952002-04-09 Daniel Jacobowitz <drow@mvista.com>
10996
10997 * inferiors.c: New file.
10998 * target.c: New file.
10999 * target.h: New file.
11000 * Makefile.in: Add target.o and inferiors.o. Update
11001 dependencies.
11002 * linux-low.c (inferior_pid): New static variable,
11003 moved from server.c.
11004 (linux_create_inferior): Renamed from create_inferior.
11005 Call add_inferior. Return 0 on success instead of a PID.
11006 (linux_attach): Renamed from myattach.
11007 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11008 (linux_thread_alive): Renamed from mythread_alive.
11009 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11010 child dies.
11011 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11012 (regsets_store_inferior_registers): Correct error message.
11013 Add missing ``return 0''.
11014 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11015 (linux_store_registers): Renamed from store_inferior_registers.
11016 (linux_read_memory): Renamed from read_inferior_memory.
11017 (linux_write_memory): Renamed from write_inferior_memory.
11018 (linux_target_ops): New structure.
11019 (initialize_low): Call set_target_ops ().
11020 * remote-utils.c (unhexify): New function.
11021 (hexify): New function.
11022 (input_interrupt): Send signals to ``signal_pid''.
11023 * server.c (inferior_pid): Remove.
11024 (start_inferior): Update create_inferior call.
11025 (attach_inferior): Call add_inferior.
11026 (handle_query): New function.
11027 (main): Call handle_query for `q' packets.
11028 * server.h: Include "target.h". Remove obsolete prototypes.
11029 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11030
110312002-04-09 Daniel Jacobowitz <drow@mvista.com>
11032
11033 * Makefile.in: Add WARN_CFLAGS. Update configury
11034 dependencies.
11035 * configure.in: Check for <string.h>
11036 * configure: Regenerate.
11037 * config.in: Regenerate.
11038 * gdbreplay.c: Include needed system headers.
11039 (remote_open): Remove strchr prototype.
11040 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11041 * regcache.c (supply_register): Change buf argument to const void *.
11042 (supply_register_by_name): Likewise.
11043 (collect_register): Change buf argument to void *.
11044 (collect_register_by_name): Likewise.
11045 * regcache.h: Add missing prototypes.
11046 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11047 * server.c (handle_query): New function.
11048 (attached): New static variable, moved out of main.
11049 (main): Quiet longjmp clobber warnings.
11050 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11051 * utils.c (error): Remove NORETURN.
11052 (fatal): Likewise.
This page took 1.471345 seconds and 4 git commands to generate.