Linux x86 low-level debug register comment synchronization
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
14b0bc68
GB
12015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4 (x86_linux_dr_set): Likewise.
5 (update_debug_registers_callback): Likewise.
6 (x86_linux_dr_set_addr): Likewise.
7 (x86_linux_dr_get_addr): Likewise.
8 (x86_linux_dr_set_control): Likewise.
9 (x86_linux_dr_get_control): Likewise.
10 (x86_linux_dr_get_status): Likewise.
11 (x86_linux_prepare_to_resume): Likewise.
12
5dfe6ca8
GB
132015-03-24 Gary Benson <gbenson@redhat.com>
14
15 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
16 Use perror_with_name. Pass string through gettext.
17 (x86_linux_dr_set): Likewise.
18
d33472ad
GB
192015-03-24 Gary Benson <gbenson@redhat.com>
20
21 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
22 (x86_linux_dr_set_addr): ...this.
23 (x86_dr_low_get_addr): Rename to...
24 (x86_linux_dr_get_addr): ...this.
25 (x86_dr_low_set_control): Rename to...
26 (x86_linux_dr_set_control): ...this.
27 (x86_dr_low_get_control): Rename to...
28 (x86_linux_dr_get_control): ...this.
29 (x86_dr_low_get_status): Rename to...
30 (x86_linux_dr_get_status): ...this.
31 (x86_dr_low): Update with new function names.
32
4b134ca1
GB
332015-03-24 Gary Benson <gbenson@redhat.com>
34
35 * Makefile.in (x86-linux.o): New rule.
36 * configure.srv: Add x86-linux.o to relevant targets.
37 * linux-low.c (lwp_set_arch_private_info): New function.
38 (lwp_arch_private_info): Likewise.
39 * linux-x86-low.c: Include nat/x86-linux.h.
40 (arch_lwp_info): Removed structure.
41 (update_debug_registers_callback):
42 Use lwp_set_debug_registers_changed.
43 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
44 and lwp_set_debug_registers_changed.
45 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
46
34c703da
GB
472015-03-24 Gary Benson <gbenson@redhat.com>
48
49 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
50 * linux-arm-low.c (arm_new_thread): Likewise.
51 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
52 * linux-mips-low.c (mips_linux_new_thread): Likewise.
53 * linux-x86-low.c (x86_linux_new_thread): Likewise.
54 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
55
cff068da
GB
562015-03-24 Gary Benson <gbenson@redhat.com>
57
58 * linux-low.c (ptid_of_lwp): New function.
59 (lwp_is_stopped): Likewise.
60 (lwp_stop_reason): Likewise.
61 * linux-x86-low.c (update_debug_registers_callback):
62 Use lwp_is_stopped.
63 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
64 lwp_stop_reason.
65
b2f7c7e8
GB
662015-03-24 Gary Benson <gbenson@redhat.com>
67
68 * linux-low.h (linux_stop_lwp): Remove declaration.
69
6d4ee8c6
GB
702015-03-24 Gary Benson <gbenson@redhat.com>
71
72 * linux-low.h: Include nat/linux-nat.h.
73 * linux-low.c (iterate_over_lwps_args): New structure.
74 (iterate_over_lwps_filter): New function.
75 (iterate_over_lwps): Likewise.
76 * linux-x86-low.c (update_debug_registers_callback):
77 Update signature to what iterate_over_lwps expects.
78 Remove PID check that iterate_over_lwps now performs.
79 (x86_dr_low_set_addr): Use iterate_over_lwps.
80 (x86_dr_low_set_control): Likewise.
81
70a0bb6b
GB
822015-03-24 Gary Benson <gbenson@redhat.com>
83
84 * linux-x86-low.c (x86_debug_reg_state): New function.
85 (x86_linux_prepare_to_resume): Use the above.
86
7b669087
GB
872015-03-24 Gary Benson <gbenson@redhat.com>
88
89 * linux-low.c (current_lwp_ptid): New function.
90 * linux-x86-low.c: Include nat/linux-nat.h.
91 (x86_dr_low_get_addr): Use current_lwp_ptid.
92 (x86_dr_low_get_control): Likewise.
93 (x86_dr_low_get_status): Likewise.
94
eef49a3d
PA
952015-03-20 Pedro Alves <palves@redhat.com>
96
97 * tracepoint.c (cmd_qtstatus): Make "str" const.
98
b2333d22
PA
992015-03-20 Pedro Alves <palves@redhat.com>
100
101 * server.c (handle_general_set): Make "req_str" const.
102
23f238d3
PA
1032015-03-19 Pedro Alves <palves@redhat.com>
104
105 * linux-low.c (linux_resume_one_lwp): Rename to ...
106 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
107 instead call perror_with_name.
108 (check_ptrace_stopped_lwp_gone): New function.
109 (linux_resume_one_lwp): Reimplement as wrapper around
110 linux_resume_one_lwp_throw that swallows errors if the LWP is
111 gone.
112
91baf43f
PA
1132015-03-19 Pedro Alves <palves@redhat.com>
114
115 * linux-low.c (count_events_callback, select_event_lwp_callback):
116 No longer check whether the thread has resume_stop as last resume
117 kind.
118
8bf3b159
PA
1192015-03-19 Pedro Alves <palves@redhat.com>
120
121 * linux-low.c (count_events_callback, select_event_lwp_callback):
122 Use the lwp's status_pending_p field, not the thread's.
123
b90fc188
PA
1242015-03-19 Pedro Alves <palves@redhat.com>
125
126 * linux-low.c (select_event_lwp_callback): Update comments to
127 no longer mention SIGTRAP.
128
464b0089
GB
1292015-03-18 Gary Benson <gbenson@redhat.com>
130
131 * server.c (handle_query): Do not report vFile:fstat as supported.
132
aa9e327f
GB
1332015-03-11 Gary Benson <gbenson@redhat.com>
134
135 * hostio.c (sys/types.h): New include.
136 (sys/stat.h): Likewise.
137 (common-remote-fileio.h): Likewise.
138 (handle_fstat): New function.
139 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 140
791c0056
GB
1412015-03-11 Gary Benson <gbenson@redhat.com>
142
143 * configure.ac (AC_CHECK_MEMBERS): Add checks for
144 struct stat.st_blocks and struct stat.st_blksize.
145 * configure: Regenerate.
146 * config.in: Likewise.
147 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
148 (OBS): Add common-remote-fileio.o.
149 (common-remote-fileio.o): New rule.
150
9a9df970
PA
1512015-03-09 Pedro Alves <palves@redhat.com>
152
153 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
154 'struct sockaddr' pointer in 'accept' call.
155
9eb1356e
PA
1562015-03-09 Pedro Alves <palves@redhat.com>
157
158 Revert:
159 2015-03-07 Pedro Alves <palves@redhat.com>
160 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
161 or <winsock2.h> here. Instead include "gdb_socket.h".
162 (remote_open): Use union gdb_sockaddr_u.
163 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
164 or <winsock2.h> here. Instead include "gdb_socket.h".
165 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
166 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
167 or <sys/un.h>.
168 (init_named_socket, gdb_agent_helper_thread): Use union
169 gdb_sockaddr_u.
170
aac331e4
PA
1712015-03-07 Pedro Alves <palves@redhat.com>
172
173 * configure.ac (build_warnings): Move
174 -Wdeclaration-after-statement to the C-specific set.
175 * configure: Regenerate.
176
366c75fc
PA
1772015-03-07 Pedro Alves <palves@redhat.com>
178
179 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
180 or <winsock2.h> here. Instead include "gdb_socket.h".
181 (remote_open): Use union gdb_sockaddr_u.
182 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
183 or <winsock2.h> here. Instead include "gdb_socket.h".
184 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
185 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
186 or <sys/un.h>.
187 (init_named_socket, gdb_agent_helper_thread): Use union
188 gdb_sockaddr_u.
189
492d29ea
PA
1902015-03-07 Pedro Alves <palves@redhat.com>
191
192 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
193 instead.
194
60a191ed
YQ
1952015-03-06 Yao Qi <yao.qi@linaro.org>
196
197 * linux-aarch64-low.c (aarch64_insert_point): Use
198 show_debug_regs as a boolean.
199 (aarch64_remove_point): Likewise.
200
f5771b1d
PA
2012015-03-05 Pedro Alves <palves@redhat.com>
202
203 * lynx-low.c (lynx_target_ops): Install NULL hooks for
204 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
205 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
206 * nto-low.c (nto_target_ops): Likewise.
207 * spu-low.c (spu_target_ops): Likewise.
208 * win32-low.c (win32_target_ops): Likewise.
209
3e572f71
PA
2102015-03-04 Pedro Alves <palves@redhat.com>
211
212 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
213 Decide whether a breakpoint triggered based on the SIGTRAP's
214 siginfo.si_code.
215 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
216 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
217 (linux_low_filter_event): Check for breakpoints before checking
218 watchpoints.
219 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
220 siginfo.si_code.
221 (linux_stopped_by_sw_breakpoint)
222 (linux_supports_stopped_by_sw_breakpoint)
223 (linux_stopped_by_hw_breakpoint)
224 (linux_supports_stopped_by_hw_breakpoint): New functions.
225 (linux_target_ops): Install new target methods.
226
1ec68e26
PA
2272015-03-04 Pedro Alves <palves@redhat.com>
228
229 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
230 * server.c (swbreak_feature, hwbreak_feature): New globals.
231 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
232 (captured_main): Clear swbreak_feature and hwbreak_feature.
233 * server.h (swbreak_feature, hwbreak_feature): Declare.
234 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
235 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
236 supports_stopped_by_hw_breakpoint>: New fields.
237 (target_supports_stopped_by_sw_breakpoint)
238 (target_stopped_by_sw_breakpoint)
239 (target_supports_stopped_by_hw_breakpoint)
240 (target_stopped_by_hw_breakpoint): Declare.
241
15c66dd6
PA
2422015-03-04 Pedro Alves <palves@redhat.com>
243
244 enum lwp_stop_reason -> enum target_stop_reason
245 * linux-low.c (check_stopped_by_breakpoint): Adjust.
246 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
247 (linux_wait_1, stuck_in_jump_pad_callback)
248 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
249 (linux_stopped_by_watchpoint):
250 * linux-low.h (enum lwp_stop_reason): Delete.
251 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
252 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
253
98fc70d6
YQ
2542015-03-04 Yao Qi <yao.qi@linaro.org>
255
256 * Makefile.in (SFILES): Add linux-aarch64-low.c.
257
dd2ac174
GB
2582015-03-03 Gary Benson <gbenson@redhat.com>
259
260 * hostio.c (handle_vFile): Fix prefix lengths.
261
d68e53f4
MM
2622015-03-03 Markus Metzger <markus.t.metzger@intel.com>
263
264 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
265 ptr_bits.
266
bf2d68ab
AA
2672015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
268
269 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
270 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
271 (clean): Add "rm -f" for above C files.
272 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
273 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
274 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
275 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
276 * linux-s390-low.c (HWCAP_S390_VX): New macro.
277 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
278 (init_registers_s390x_vx_linux64)
279 (init_registers_s390x_tevx_linux64)
280 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
281 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
282 declarations.
283 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
284 (s390_store_vxrs_high): New functions.
285 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
286 NT_S390_VXRS_HIGH.
287 (s390_arch_setup): Add logic for selecting one of the new target
288 descriptions. Activate the new vector regsets if applicable.
289 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
290 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
291 and init_registers_s390x_tevx_linux64.
292
c966a859
PA
2932015-03-01 Pedro Alves <palves@redhat.com>
294
295 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
296 parameter.
297
4180215b
PA
2982015-02-27 Pedro Alves <palves@redhat.com>
299
300 * linux-x86-low.c (u_debugreg_offset): New function.
301 (x86_linux_dr_get, x86_linux_dr_set): Use it.
302
749bab01
PA
3032015-02-27 Pedro Alves <palves@redhat.com>
304
305 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
306 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
307 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
308 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
309 (ps_lsetfpregs, ps_getpid)
310 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
311 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
312 (ps_lsetxregs, ps_plog): Declare.
313
3c14e5a3
PA
3142015-02-27 Pedro Alves <palves@redhat.com>
315
316 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
317 IP_AGENT_EXPORT_FUNC.
318 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
319 IP_AGENT_EXPORT_FUNC.
320 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
321 (IP_AGENT_EXPORT): Delete.
322 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
323 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
324 (gdb_trampoline_buffer_error, collecting, gdb_collect)
325 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
326 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
327 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
328 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
329 (traceframe_read_count, traceframe_write_count)
330 (traceframes_created, trace_state_variables, get_raw_reg)
331 (get_trace_state_variable_value, set_trace_state_variable_value)
332 (ust_loaded, helper_thread_id, cmd_buf): Use
333 IPA_SYM_EXPORTED_NAME.
334 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
335 (tracepoints) Use IP_AGENT_EXPORT_VAR.
336 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
337 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
338 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
339 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
340 EXTERN_C_PUSH/EXTERN_C_POP.
341 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
342 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
343 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
344 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
345 (traceframe_write_count, traceframe_read_count)
346 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
347 (about_to_request_buffer_space, get_trace_state_variable_value)
348 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
349 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
350 EXTERN_C_PUSH/EXTERN_C_POP.
351 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
352 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
353 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
354 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
355 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
356 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
357 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
358 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
359 Define.
360 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
361 (IP_AGENT_EXPORT_VAR_DECL): Define.
362 (tracing): Declare.
363 (gdb_agent_get_raw_reg): Declare.
364
fe978cb0
PA
3652015-02-27 Tom Tromey <tromey@redhat.com>
366 Pedro Alves <palves@redhat.com>
367
368 Rename symbols whose names are reserved C++ keywords throughout.
369
3bc3d82a
PA
3702015-02-27 Pedro Alves <palves@redhat.com>
371
372 * Makefile.in (COMPILER): New, get it from autoconf.
373 (CXX): Get from autoconf instead.
374 (COMPILE.pre): Use COMPILER.
375 (CC-LD): Rename to ...
376 (CC_LD): ... this. Use COMPILER.
377 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
378 (CXX_FOR_TARGET): Default to g++ instead of gcc.
379 * acinclude.m4: Include build-with-cxx.m4.
380 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
381 Disable -Werror by default if building in C++ mode.
382 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
383 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
384 the C++ compiler. Save/restore CXXFLAGS too.
385 * configure: Regenerate.
386
07697489
PA
3872015-02-27 Pedro Alves <palves@redhat.com>
388
389 * acinclude.m4: Include libiberty.m4.
390 * configure.ac: Call libiberty_INIT.
391 * config.in, configure: Regenerate.
392
9beb7c4e
PA
3932015-02-26 Pedro Alves <palves@redhat.com>
394
395 * linux-low.c (linux_wait_1): When incrementing the PC past a
396 program breakpoint always use the_low_target.breakpoint_len as
397 increment, rather than the maximum between that and
398 the_low_target.decr_pc_after_break.
399
8090aef2
PA
4002015-02-23 Pedro Alves <palves@redhat.com>
401
402 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
403 thread was doing a step-over; always adjust the PC if
404 we stepped over a permanent breakpoint.
405 (linux_wait_1): If we stepped over breakpoint that was on top of a
406 permanent breakpoint, manually advance the PC past it.
407
bc9540e8
PA
4082015-02-23 Pedro Alves <palves@redhat.com>
409
410 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
411 modes.
412 (x86_fill_gregset, x86_store_gregset): Use it when handling
413 $orig_eax.
414
2db9a427
PA
4152015-02-20 Pedro Alves <palves@redhat.com>
416
417 * thread-db.c: Include "nat/linux-procfs.h".
418 (thread_db_init): Skip listing new threads if the kernel supports
419 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
420
afa8d396
PA
4212015-02-20 Pedro Alves <palves@redhat.com>
422
423 * linux-low.c (status_pending_p_callback): Use ptid_match.
424
c9587f88
AT
4252015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
426
427 PR breakpoints/16812
428 * linux-low.c (wstatus_maybe_breakpoint): Remove.
429 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
430 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
431
b05ec7a5
AT
4322015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
433
434 PR breakpoints/15956
435 * tracepoint.c (cmd_qtinit): Add check for current_thread.
436
d33501a5
MM
4372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
438
439 * linux-low.c (linux_low_btrace_conf): Print size.
440 * server.c (handle_btrace_conf_general_set): New.
441 (hanle_general_set): Call handle_btrace_conf_general_set.
442 (handle_query): Report Qbtrace-conf:bts:size as supported.
443
f4abbc16
MM
4442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
445
446 * linux-low.c (linux_low_enable_btrace): Update parameters.
447 (linux_low_btrace_conf): New.
448 (linux_target_ops)<to_btrace_conf>: Initialize.
449 * server.c (current_btrace_conf): New.
450 (handle_btrace_enable): Rename to ...
451 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
452 to target_enable_btrace. Update comment. Update users.
453 (handle_qxfer_btrace_conf): New.
454 (qxfer_packets): Add btrace-conf entry.
455 (handle_query): Report qXfer:btrace-conf:read as supported packet.
456 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
457 (target_ops)<read_btrace_conf>: New.
458 (target_enable_btrace): Update parameters.
459 (target_read_btrace_conf): New.
460
043c3577
MM
4612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
462
463 * server.c (handle_btrace_general_set): Remove call to
464 target_supports_btrace.
465 (supported_btrace_packets): New.
466 (handle_query): Call supported_btrace_packets.
467 * target.h: include btrace-common.h.
468 (btrace_target_info): Removed.
469 (supports_btrace, target_supports_btrace): Update parameters.
470
734b0e4b
MM
4712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
472
473 * Makefile.in (SFILES): Add common/btrace-common.c.
474 (OBS): Add common/btrace-common.o.
475 (btrace-common.o): Add build rules.
476 * linux-low: Include btrace-common.h.
477 (linux_low_read_btrace): Use struct btrace_data. Call
478 btrace_data_init and btrace_data_fini.
479
d6c146e9
PA
4802015-02-06 Pedro Alves <palves@redhat.com>
481
482 * thread-db.c (find_new_threads_callback): Add debug output.
483
20ba1ce6
PA
4842015-02-04 Pedro Alves <palves@redhat.com>
485
486 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
487 (resume_stopped_resumed_lwps): New function.
488 (linux_wait_for_event_filtered): Use it.
489
8cc73a39
SDJ
4902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
491
492 * Makefile.in (SFILES): Add linux-personality.c.
493 (linux-personality.o): New rule.
494 * configure.srv (srv_linux_obj): Add linux-personality.o to the
495 list of objects to be built.
496 * linux-low.c: Include nat/linux-personality.h.
497 (linux_create_inferior): Remove code to disable address space
498 randomization (moved to ../nat/linux-personality.c). Create
499 cleanup to disable address space randomization.
500
fb23d554
SDJ
5012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
502
503 * Makefile.in (posix-strerror.o): New rule.
504 (mingw-strerror.o): Likewise.
505 * configure: Regenerated.
506 * configure.ac: Source file ../common/common.host. Initialize new
507 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
508
cdf43629
YQ
5092015-01-14 Yao Qi <yao@codesourcery.com>
510
511 * Makefile.in (SFILES): Add nat/ppc-linux.c.
512 (ppc-linux.o): New rule.
513 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
514 * configure.ac: AC_CHECK_FUNCS(getauxval).
515 * config.in: Re-generated.
516 * configure: Re-generated.
517 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
518 ppc64_64bit_inferior_p
519
514c5338
YQ
5202015-01-14 Yao Qi <yao@codesourcery.com>
521
522 * linux-ppc-low.c: Include "nat/ppc-linux.h".
523 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
524 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
525 (PT_ORIG_R3, PT_TRAP): Likewise.
526 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
527 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
528 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
529
3368c1e5
JB
5302015-01-10 Joel Brobecker <brobecker@adacore.com>
531
532 * i387-fp.c (i387_cache_to_xsave): In look over
533 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
534 zmmh_low_space field by use of zmmh_high_space.
535
582511be
PA
5362015-01-09 Pedro Alves <palves@redhat.com>
537
538 * linux-low.c (step_over_bkpt): Move higher up in the file.
539 (handle_extended_wait): Don't store the stop_pc here.
540 (get_stop_pc): Adjust comments and rename to ...
541 (check_stopped_by_breakpoint): ... this. Record whether the LWP
542 stopped for a software breakpoint or hardware breakpoint.
543 (thread_still_has_status_pending_p): New function.
544 (status_pending_p_callback): Use
545 thread_still_has_status_pending_p. If the event is no longer
546 interesting, resume the LWP.
547 (handle_tracepoints): Add assert.
548 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
549 (wstatus_maybe_breakpoint): New function.
550 (cancel_breakpoint): Delete function.
551 (check_stopped_by_watchpoint): New function, factored out from
552 linux_low_filter_event.
553 (lp_status_maybe_breakpoint): Delete function.
554 (linux_low_filter_event): Remove filter_ptid argument.
555 Leave thread group exits pending here. Store the LWP's stop PC.
556 Always leave events pending.
557 (linux_wait_for_event_filtered): Pull all events out of the
558 kernel, and leave them all pending.
559 (count_events_callback, select_event_lwp_callback): Consider all
560 events.
561 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
562 (select_event_lwp): Only give preference to the stepping LWP in
563 all-stop mode. Adjust comments.
564 (ignore_event): New function.
565 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
566 references to cancel_breakpoints. Adjust to renames. Also give
567 equal priority to all LWPs that have had events in non-stop mode.
568 If reporting a software breakpoint event, unadjust the LWP's PC.
569 (linux_wait): If linux_wait_1 returned an ignored event, retry.
570 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
571 Adjust.
572 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
573 (resume_status_pending_p): Use thread_still_has_status_pending_p.
574 (linux_stopped_by_watchpoint): Adjust.
575 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
576 * linux-low.h (enum lwp_stop_reason): New.
577 (struct lwp_info) <stop_pc>: Adjust comment.
578 <stopped_by_watchpoint>: Delete field.
579 <stop_reason>: New field.
580 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
581 * mem-break.c (software_breakpoint_inserted_here)
582 (hardware_breakpoint_inserted_here): New function.
583 * mem-break.h (software_breakpoint_inserted_here)
584 (hardware_breakpoint_inserted_here): Declare.
585 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
586 (cancel_breakpoints): Delete.
587 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
588 (upload_fast_traceframes): Remove references to
589 cancel_breakpoints.
590
a33e3959
PA
5912015-01-09 Pedro Alves <palves@redhat.com>
592
593 * thread-db.c (find_new_threads_callback): Ignore thread if the
594 kernel thread ID is -1.
595
8784d563
PA
5962015-01-09 Pedro Alves <palves@redhat.com>
597
598 * linux-low.c (linux_attach_fail_reason_string): Move to
599 nat/linux-ptrace.c, and rename.
600 (linux_attach_lwp): Update comment.
601 (attach_proc_task_lwp_callback): New function.
602 (linux_attach): Adjust to rename and use
603 linux_proc_attach_tgid_threads.
604 (linux_attach_fail_reason_string): Delete declaration.
605
76f2b779
JB
6062015-01-01 Joel Brobecker <brobecker@adacore.com>
607
608 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
609 * server.c (gdbserver_version): Likewise.
610
fafcc06a
SDJ
6112014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
612
613 * remote-utils.c: Include ctype.h.
614 (input_interrupt): Explicitly handle the case when the char
615 received is the NUL byte. Improve the printing of non-ASCII
616 characters.
617
beed38b8
JB
6182014-12-16 Joel Brobecker <brobecker@adacore.com>
619
620 * linux-low.c (linux_low_filter_event): Update call to
621 linux_enable_event_reporting following the addition of
622 a new parameter to that function.
623
bf330350
CU
6242014-12-16 Catalin Udma <catalin.udma@freescale.com>
625
626 PR server/17457
627 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
628 (AARCH64_FPCR_REGNO): Likewise.
629 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
630 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
631 (aarch64_store_fpregset): Likewise.
632
5227d625
JB
6332014-12-15 Joel Brobecker <brobecker@adacore.com>
634
635 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
636 Remove FIXME comment about assumption about N.
637
f93b65a0
JB
6382014-12-13 Joel Brobecker <brobecker@adacore.com>
639
640 * configure.ac: If large-file support is disabled in GDBserver,
641 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
642 * configure: Regenerate.
643
e5a9158d
AA
6442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
645
646 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
647 warning upon ENODATA from ptrace.
648 * linux-s390-low.c (s390_store_tdb): New.
649 (s390_regsets): Add regset for NT_S390_TDB.
650
feea5f36
AA
6512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
652
653 * linux-low.c (regsets_store_inferior_registers): Skip regsets
654 without a fill_function.
655 * linux-s390-low.c (s390_fill_last_break): Remove.
656 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
657 (s390_arch_setup): Use regset's size instead of fill_function for
658 loop end condition.
659
098dbe61
AA
6602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
661
662 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
663 the regset's store function when ptrace returned an error.
664 * regcache.c (get_thread_regcache): Invalidate register cache
665 before fetching inferior's registers.
666
28eef672
AA
6672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
668
669 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
670 while-loop as for-loop.
671 (regsets_store_inferior_registers): Likewise.
672
bdca27a2
YQ
6732014-11-28 Yao Qi <yao@codesourcery.com>
674
675 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
676 * config.in, configure: Re-generate.
677 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
678 is defined.
679
9c232dda
YQ
6802014-11-21 Yao Qi <yao@codesourcery.com>
681
682 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
683 (AC_CHECK_HEADERS): Remove malloc.h.
684 * configure: Re-generated.
685 * config.in: Re-generated.
686 * server.h: Don't include alloca.h and malloc.h.
687 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
688 Don't include malloc.h.
689
43968415
JB
6902014-11-17 Joel Brobecker <brobecker@adacore.com>
691
692 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
693 corresponding ERRNO check in same block.
694
40e91bc7
PA
6952014-11-12 Pedro Alves <palves@redhat.com>
696
697 * server.c (cont_thread): Update comment.
698 (start_inferior, attach_inferior): No longer clear cont_thread.
699 (handle_v_cont): No longer set cont_thread.
700 (captured_main): Clear cont_thread each time a GDB connects.
701
c2c118cf
PA
7022014-11-12 Pedro Alves <palves@redhat.com>
703
704 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
705 thread, and don't resume all threads if the Hc thread has exited.
706
78708b7c
PA
7072014-11-12 Pedro Alves <palves@redhat.com>
708
709 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
710 the process group instead of to a specific LWP.
711
a2abc7de
PA
7122014-10-15 Pedro Alves <palves@redhat.com>
713
714 PR server/17487
715 * win32-arm-low.c (arm_set_thread_context): Remove current_event
716 parameter.
717 (arm_set_thread_context): Delete.
718 (the_low_target): Adjust.
719 * win32-i386-low.c (debug_registers_changed)
720 (debug_registers_used): Delete.
721 (update_debug_registers_callback): New function.
722 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
723 needing to update their debug registers.
724 (win32_get_current_dr): New function.
725 (x86_dr_low_get_addr, x86_dr_low_get_control)
726 (x86_dr_low_get_status): Fetch the debug register from the thread
727 record's context.
728 (i386_initial_stuff): Adjust.
729 (i386_get_thread_context): Remove current_event parameter. Don't
730 clear debug_registers_changed nor copy DR values to
731 debug_reg_state.
732 (i386_set_thread_context): Delete.
733 (i386_prepare_to_resume): New function.
734 (i386_thread_added): Mark the thread as needing to update irs
735 debug registers.
736 (the_low_target): Remove i386_set_thread_context and install
737 i386_prepare_to_resume.
738 * win32-low.c (win32_get_thread_context): Adjust.
739 (win32_set_thread_context): Use SetThreadContext
740 directly.
741 (win32_prepare_to_resume): New function.
742 (win32_require_context): New function, factored out from ...
743 (thread_rec): ... this.
744 (continue_one_thread): Call win32_prepare_to_resume on each thread
745 we're about to continue.
746 (win32_resume): Call win32_prepare_to_resume on the event thread.
747 * win32-low.h (struct win32_thread_info)
748 <debug_registers_changed>: New field.
749 (struct win32_target_ops): Change prototype of set_thread_context,
750 delete set_thread_context and add prepare_to_resume.
751 (win32_require_context): New declaration.
752
a442d071
GB
7532014-10-08 Gary Benson <gbenson@redhat.com>
754
755 * server.h: Do not include common-exceptions.h.
756
6f1947e8
GB
7572014-10-08 Gary Benson <gbenson@redhat.com>
758
759 * server.h: Do not include cleanups.h.
760
63b434a4
JH
7612014-09-30 James Hogan <james.hogan@imgtec.com>
762
763 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
764 mips64-dsp-linux.c.
765
c4d9ceb6
YQ
7662014-09-23 Yao Qi <yao@codesourcery.com>
767
768 * linux-low.c (lp_status_maybe_breakpoint): New function.
769 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
770 (count_events_callback): Likewise.
771 (select_event_lwp_callback): Likewise.
772 (cancel_breakpoints_callback): Likewise.
773
89a5711c
DB
7742014-09-19 Don Breazeal <donb@codesourcery.com>
775
776 * linux-low.c (handle_extended_wait): Call
777 linux_ptrace_get_extended_event.
778 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
779 linux_is_extended_waitstatus.
780
bffc0964
JB
7812014-09-16 Joel Brobecker <brobecker@adacore.com>
782
783 * Makefile.in (CPPFLAGS): Define.
784 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
785 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
786
0bfdf32f
GB
7872014-09-16 Gary Benson <gbenson@redhat.com>
788
789 * inferiors.h (current_inferior): Renamed as...
790 (current_thread): New variable. All uses updated.
791 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
792 (maybe_move_out_of_jump_pad): Likewise.
793 (cancel_breakpoint): Likewise.
794 (linux_low_filter_event): Likewise.
795 (wait_for_sigstop): Likewise.
796 (linux_resume_one_lwp): Likewise.
797 (need_step_over_p): Likewise.
798 (start_step_over): Likewise.
799 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
800 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
801 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
802 and save_inferior as saved_thread.
803 * regcache.c (get_thread_regcache): Renamed saved_inferior as
804 saved_thread.
805 (regcache_invalidate_thread): Likewise.
806 * remote-utils.c (prepare_resume_reply): Likewise.
807 * thread-db.c (thread_db_get_tls_address): Likewise.
808 (disable_thread_event_reporting): Likewise.
809 (remove_thread_event_breakpoints): Likewise.
810 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
811 as saved_thread.
812 * target.h (set_desired_inferior): Renamed as...
813 (set_desired_thread): New declaration. All uses updated.
814 * server.c (myresume): Updated comment to reference thread instead
815 of inferior.
816 (handle_serial_event): Likewise.
817 (handle_target_event): Likewise.
818
361c8ade
GB
8192014-09-12 Tom Tromey <tromey@redhat.com>
820 Gary Benson <gbenson@redhat.com>
821
822 * regcache.h: Include common-regcache.h.
823 (regcache_read_pc): Don't declare.
824 * regcache.c (get_thread_regcache_for_ptid): New function.
825
bd9269f7
GB
8262014-09-11 Tom Tromey <tromey@redhat.com>
827 Gary Benson <gbenson@redhat.com>
828
829 * symbol.c: New file.
830 * Makefile.in (SFILES): Add symbol.c.
831 (OBS): Add symbol.o.
832
f8c1d06b
GB
8332014-09-11 Gary Benson <gbenson@redhat.com>
834
835 * target.c (target_stop_ptid, target_continue_ptid): New
836 functions.
837
721ec300
GB
8382014-09-11 Tom Tromey <tromey@redhat.com>
839 Gary Benson <gbenson@redhat.com>
840
841 * target.h: Include target/target.h.
842 * target.c (target_read_memory, target_read_uint32)
843 (target_write_memory): New functions.
844
c5e92cca
GB
8452014-09-11 Gary Benson <gbenson@redhat.com>
846
847 * server.h (debug_hw_points): Don't declare.
848 * server.c (debug_hw_points): Don't define. Replace all uses
849 with show_debug_regs.
850 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
851 all uses with show_debug_regs.
852
2e4bb98a
EBM
8532014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
854
855 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
856 endianness into account.
857 (ppc_supply_ptrace_register): Likewise.
858
ac740bc7
JH
8592014-09-03 James Hogan <james.hogan@imgtec.com>
860
861 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
862 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
863
97ea6506
GB
8642014-09-03 Gary Benson <gbenson@redhat.com>
865
866 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
867 ALL_DEBUG_ADDRESS_REGISTERS.
868
df7e5265
GB
8692014-09-02 Gary Benson <gbenson@redhat.com>
870
871 * i386-low.h: Renamed as...
872 * x86-low.h: New file. All type, function and variable name
873 prefixes changed from "i386_" to "x86_". All references updated.
874 * i386-low.c: Renamed as...
875 * x86-low.c: New file. All type, function and variable name
876 prefixes changed from "i386_" to "x86_". All references updated.
877
ed859da7
GB
8782014-09-02 Gary Benson <gbenson@redhat.com>
879
880 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
881 (x86_linux_new_thread): Likewise.
882
860789c7
GB
8832014-08-29 Gary Benson <gbenson@redhat.com>
884
885 * server.h (setjmp.h): Do not include.
886 (toplevel): Do not declare.
887 (common-exceptions.h): Include.
888 (cleanups.h): Likewise.
889 * server.c (toplevel): Do not define.
890 (exit_code): New static global.
891 (detach_or_kill_for_exit_cleanup): New function.
892 (main): New function. Original main renamed to...
893 (captured_main): New function.
894 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
895
ff55e1b5
GB
8962014-08-29 Gary Benson <gbenson@redhat.com>
897
898 * Makefile.in (SFILES): Add common/common-exceptions.c.
899 (OBS): Add common-exceptions.o.
900 (common-exceptions.o): New rule.
901 * utils.c (prepare_to_throw_exception): New function.
902
e9bcb658
GB
9032014-08-29 Gary Benson <gbenson@redhat.com>
904
905 * config.in: Regenerate.
906 * configure: Likewise.
907
e3180625
GB
9082014-08-29 Gary Benson <gbenson@redhat.com>
909
910 * Makefile.in (SFILES): Add common/cleanups.c.
911 (OBS): cleanups.o.
912 (cleanups.o): New rule.
913
e3d6ba5d
GB
9142014-08-29 Gary Benson <gbenson@redhat.com>
915
916 * utils.c (internal_vwarning): New function.
917
7096e886
GB
9182014-08-28 Gary Benson <gbenson@redhat.com>
919
920 * utils.h (fatal): Remove declaration.
921 * utils.c (fatal): Remove function.
922
14ce3192
GB
9232014-08-28 Gary Benson <gbenson@redhat.com>
924
925 * tracepoint.c (gdb_agent_init): Replace fatal with
926 perror_with_name.
927 (initialize_tracepoint): Likewise.
928
50278d59
GB
9292014-08-28 Gary Benson <gbenson@redhat.com>
930
931 * remote-utils.c (remote_prepare): Replace fatal with error.
932
aa96c426
GB
9332014-08-28 Gary Benson <gbenson@redhat.com>
934
935 * linux-low.c (linux_async): Replace fatal with warning.
936 Tidy up and return.
937 (linux_start_non_stop): Return -1 if linux_async failed.
938
f7160e97
GB
9392014-08-28 Gary Benson <gbenson@redhat.com>
940
941 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
942 gdb_assert.
943 (i386_dr_low_get_addr): Remove vague comment.
944 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
945 gdb_assert.
946
38e08fca
GB
9472014-08-28 Gary Benson <gbenson@redhat.com>
948
949 * inferiors.c (get_thread_process): Replace check with gdb_assert.
950 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
951 internal_error.
952 (linux_resume_one_lwp): Likewise.
953 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
954 gdb_assert.
955 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
956 with internal_error.
957 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
958 (init_register_cache): Replace fatal with gdb_assert_not_reached.
959 (find_register_by_name): Replace fatal with internal_error.
960 (find_regno): Likewise.
961 * tdesc.c (init_target_desc): Replace check with gdb_assert.
962 * thread-db.c (thread_db_create_event): Likewise.
963 (thread_db_load_search): Likewise.
964 (try_thread_db_load_1): Likewise.
965 * tracepoint.c (get_jump_space_head): Replace fatal with
966 internal_error.
967 (claim_trampoline_space): Likewise.
968 (have_fast_tracepoint_trampoline_buffer): Likewise.
969 (cmd_qtstart): Likewise.
970 (stop_tracing): Likewise.
971 (fast_tracepoint_collecting): Likewise.
972 (target_malloc): Likewise.
973 (download_tracepoint): Likewise.
974 (download_trace_state_variables): Replace check with gdb_assert.
975 (upload_fast_traceframes): Replace fatal with internal_error.
976
34abf635
GB
9772014-08-19 Tom Tromey <tromey@redhat.com>
978 Gary Benson <gbenson@redhat.com>
979
980 * Makefile.in (SFILES): Add common/common-debug.c.
981 (OBS): Add common-debug.o.
982 (common-debug.o): New rule.
983 * debug.h (debug_printf): Don't declare.
984 * debug.c (debug_printf): Renamed and rewritten as...
985 (debug_vprintf): New function.
986
f6e94d78
GB
9872014-08-19 Gary Benson <gbenson@redhat.com>
988
989 * utils.h: Do not include print-utils.h.
990
9239eeab
GB
9912014-08-19 Tom Tromey <tromey@redhat.com>
992 Gary Benson <gbenson@redhat.com>
993
994 * server.h: Add static assertion.
995 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
996
ef87c8bb
GB
9972014-08-19 Tom Tromey <tromey@redhat.com>
998 Gary Benson <gbenson@redhat.com>
999
1000 * Makefile.in (SFILES): Add common/errors.c.
1001 (OBS): Add errors.o.
1002 (IPA_OBS): Add errors-ipa.o.
1003 (errors.o): New rule.
1004 (errors-ipa.o): Likewise.
1005 * utils.h (perror_with_name, error, warning): Don't declare.
1006 * utils.c (warning): Renamed and rewritten as...
1007 (vwarning): New function.
1008 (error): Renamed and rewritten as...
1009 (verror): New function.
1010 (internal_error): Renamed and rewritten as...
1011 (internal_verror): New function.
1012
bb974a24
GB
10132014-08-07 Gary Benson <gbenson@redhat.com>
1014
1015 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1016 * configure: Regenerate.
1017 * config.in: Likewise.
1018 * server.h: Do not include errno.h.
1019 * event-loop.c: Likewise.
1020 * hostio-errno.c: Likewise.
1021 * linux-low.c: Likewise.
1022 * remote-utils.c: Likewise.
1023 * spu-low.c: Likewise.
1024 * utils.c: Likewise.
1025 * gdbreplay.c: Unconditionally include errno.h.
1026
6d3d12eb
GB
10272014-08-07 Gary Benson <gbenson@redhat.com>
1028
1029 * server.h: Do not include string.h.
1030 * event-loop.c: Likewise.
1031 * linux-low.c: Likewise.
1032 * regcache.c: Likewise.
1033 * remote-utils.c: Likewise.
1034 * spu-low.c: Likewise.
1035 * utils.c: Likewise.
1036
dccbb609
GB
10372014-08-07 Gary Benson <gbenson@redhat.com>
1038
1039 * server.h: Do not include gdb_assert.h.
1040
e76df0d0
GB
10412014-08-07 Gary Benson <gbenson@redhat.com>
1042
1043 * server.h: Do not include common-utils.h.
1044
4cb9c816
GB
10452014-08-07 Gary Benson <gbenson@redhat.com>
1046
1047 * server.h: Do not include ptid.h.
1048 * notif.h: Likewise.
1049
3995eeee
GB
10502014-08-07 Gary Benson <gbenson@redhat.com>
1051
1052 * server.h: Do not include gdb_locale.h.
1053
cb9f1a9b
GB
10542014-08-07 Gary Benson <gbenson@redhat.com>
1055
1056 * server.h: Do not include gdb/signals.h.
1057 * win32-low.c: Likewise.
1058
a5fceff8
GB
10592014-08-07 Gary Benson <gbenson@redhat.com>
1060
1061 * server.h: Do not include pathmax.h.
1062
b9391142
GB
10632014-08-07 Gary Benson <gbenson@redhat.com>
1064
1065 * server.h: Do not include libiberty.h.
1066 * linux-bfin-low.c: Likewise.
1067
0e443c87
GB
10682014-08-07 Gary Benson <gbenson@redhat.com>
1069
1070 * server.h: Do not include ansidecl.h.
1071
8ebb3f56
GB
10722014-08-07 Gary Benson <gbenson@redhat.com>
1073
1074 * linux-x86-low.c: Do not include stddef.h.
1075 * lynx-ppc-low.c: Likewise.
1076 * tracepoint.c: Likewise.
1077
8980bdf6
GB
10782014-08-07 Gary Benson <gbenson@redhat.com>
1079
1080 * server.h: Do not include stdarg.h.
1081 * nto-low.c: Likewise.
1082
d7096f71
GB
10832014-08-07 Gary Benson <gbenson@redhat.com>
1084
1085 * server.h: Do not include stdlib.h.
1086 * inferiors.c: Likewise.
1087 * linux-low.c: Likewise.
1088 * regcache.c: Likewise.
1089 * spu-low.c: Likewise.
1090 * tracepoint.c: Likewise.
1091 * utils.c: Likewise.
1092
d02f550d
GB
10932014-08-07 Gary Benson <gbenson@redhat.com>
1094
1095 * server.h: Do not include stdio.h.
1096 * linux-low.c: Likewise.
1097 * remote-utils.c: Likewise.
1098 * spu-low.c: Likewise.
1099 * utils.c: Likewise.
1100 * wincecompat.c: Likewise.
1101
87f6c4e3
GB
11022014-08-06 Gary Benson <gbenson@redhat.com>
1103
1104 * regcache.c (init_register_cache): Move conditionals inside if.
1105
7089dca4
GB
11062014-08-06 Gary Benson <gbenson@redhat.com>
1107
1108 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1109
462f517e
GB
11102014-07-31 Gary Benson <gbenson@redhat.com>
1111
1112 * ax.h: Do not include server.h.
1113 * gdbthread.h: Likewise.
1114 * lynx-low.h: Likewise.
1115 * notif.h: Likewise.
1116
976411d6
GB
11172014-07-30 Gary Benson <gbenson@redhat.com>
1118
1119 * server.h: Include common-defs.h.
1120 Do not include config.h or build-gnulib-gdbserver/config.h.
1121
d41f6d8e
GB
11222014-07-30 Gary Benson <gbenson@redhat.com>
1123
1124 * hostio-errno.c: Move server.h to top of includes list.
1125 * inferiors.c: Likewise.
1126 * linux-x86-low.c: Likewise.
1127 * notif.c: Include server.h.
1128
314c6a35
TT
11292014-07-24 Tom Tromey <tromey@redhat.com>
1130 Gary Benson <gbenson@redhat.com>
1131
1132 * server.h (CORE_ADDR): Now unsigned.
1133
69ff6be5
PA
11342014-07-16 Pedro Alves <palves@redhat.com>
1135
1136 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1137
ce9e3fe7
PA
11382014-07-15 Pedro Alves <palves@redhat.com>
1139
1140 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1141 copy.
1142
e76126e8
PA
11432014-07-11 Pedro Alves <palves@redhat.com>
1144
1145 * linux-low.c (kill_wait_lwp): New function, based on
1146 kill_one_lwp_callback, but use my_waitpid directly.
1147 (kill_one_lwp_callback, linux_kill): Use it.
1148
8e9db26e
PA
11492014-06-23 Pedro Alves <palves@redhat.com>
1150
1151 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1152 before setting DR0..DR3.
1153
698b3e08
GB
11542014-06-20 Gary Benson <gbenson@redhat.com>
1155
1156 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1157 * configure: Regenerated.
1158 * config.in: Likewise.
1159
125f8a3d
GB
11602014-06-20 Gary Benson <gbenson@redhat.com>
1161
1162 * Makefile.in (SFILES): Update locations for files moved
1163 from common to nat.
1164 (object file files): Reordered.
1165
42995dbd
GB
11662014-06-20 Gary Benson <gbenson@redhat.com>
1167
1168 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1169 (i386_dr_low_set_addr): Likewise.
1170 (i386_dr_low_get_addr): Likewise.
1171 (i386_dr_low_can_set_control): Likewise.
1172 (i386_dr_low_set_control): Likewise.
1173 (i386_dr_low_get_control): Likewise.
1174 (i386_dr_low_get_status): Likewise.
1175 (i386_get_debug_register_length): Likewise.
1176 * linux-x86-low.c (i386_dr_low_set_addr):
1177 Changed signature. Made static.
1178 (i386_dr_low_get_addr): Likewise.
1179 (i386_dr_low_set_control): Likewise.
1180 (i386_dr_low_get_control): Likewise.
1181 (i386_dr_low_get_status): Likewise.
1182 (i386_dr_low): New global variable.
1183 * win32-i386-low.c (i386_dr_low_set_addr):
1184 Changed signature. Made static.
1185 (i386_dr_low_get_addr): Likewise.
1186 (i386_dr_low_set_control): Likewise.
1187 (i386_dr_low_get_control): Likewise.
1188 (i386_dr_low_get_status): Likewise.
1189 (i386_dr_low): New global variable.
1190
e1d2394b
MS
11912014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1192
1193 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1194 * Makefile.in (AR, AR_FLAGS): Define.
1195 * configure: Regenerate.
1196
3a8ee006
GB
11972014-06-19 Gary Benson <gbenson@redhat.com>
1198
1199 * Makefile.in (i386-dregs.o): New rule.
1200 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1201 * i386-low.c (target.h): Remove include.
1202 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1203 (DR_CONTROL_SHIFT): Likewise.
1204 (DR_CONTROL_SIZE): Likewise.
1205 (DR_RW_EXECUTE): Likewise.
1206 (DR_RW_WRITE): Likewise.
1207 (DR_RW_READ): Likewise.
1208 (DR_RW_IORW): Likewise.
1209 (DR_LEN_1): Likewise.
1210 (DR_LEN_2): Likewise.
1211 (DR_LEN_4): Likewise.
1212 (DR_LEN_8): Likewise.
1213 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1214 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1215 (DR_ENABLE_SIZE): Likewise.
1216 (DR_LOCAL_SLOWDOWN): Likewise.
1217 (DR_GLOBAL_SLOWDOWN): Likewise.
1218 (DR_CONTROL_RESERVED): Likewise.
1219 (I386_DR_CONTROL_MASK): Likewise.
1220 (I386_DR_VACANT): Likewise.
1221 (I386_DR_LOCAL_ENABLE): Likewise.
1222 (I386_DR_GLOBAL_ENABLE): Likewise.
1223 (I386_DR_DISABLE): Likewise.
1224 (I386_DR_SET_RW_LEN): Likewise.
1225 (I386_DR_GET_RW_LEN): Likewise.
1226 (I386_DR_WATCH_HIT): Likewise.
1227 (i386_wp_op_t): Likewise.
1228 (i386_show_dr): Likewise.
1229 (i386_length_and_rw_bits): Likewise.
1230 (i386_insert_aligned_watchpoint): Likewise.
1231 (i386_remove_aligned_watchpoint): Likewise.
1232 (i386_handle_nonaligned_watchpoint): Likewise.
1233 i386_update_inferior_debug_regs(): Likewise.
1234 (i386_dr_insert_watchpoint): Likewise.
1235 (i386_dr_remove_watchpoint): Likewise.
1236 (i386_dr_region_ok_for_watchpoint): Likewise.
1237 (i386_dr_stopped_data_address): Likewise.
1238 (i386_dr_stopped_by_watchpoint): Likewise.
1239
8f26655c
GB
12402014-06-19 Gary Benson <gbenson@redhat.com>
1241
1242 * i386-low.c (i386_dr_show): Renamed to
1243 i386_show_dr and made static. All uses updated.
1244 (i386_dr_length_and_rw_bits): Renamed to
1245 i386_length_and_rw_bits and made static.
1246 All uses updated.
1247 (i386_dr_insert_aligned_watchpoint): Renamed to
1248 i386_insert_aligned_watchpoint and made static.
1249 All uses updated.
1250 (i386_dr_remove_aligned_watchpoint): Renamed to
1251 i386_remove_aligned_watchpoint and made static.
1252 All uses updated.
1253 (i386_dr_update_inferior_debug_regs): Renamed to
1254 i386_update_inferior_debug_regs and made static.
1255 All uses updated.
1256
b9228891
GB
12572014-06-18 Gary Benson <gbenson@redhat.com>
1258
5171def3
GB
1259 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1260 (i386_dr_low_can_set_control): Likewise.
1261 (i386_get_debug_register_length): Likewise.
1262 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1263 (i386_dr_low_can_set_control): Likewise.
1264 (i386_get_debug_register_length): Likewise.
1265
12662014-06-17 Gary Benson <gbenson@redhat.com>
1267
b9228891
GB
1268 * i386-low.h (i386-dregs.h): New include.
1269 (DR_FIRSTADDR): Now in i386-dregs.h.
1270 (DR_LASTADDR): Likewise.
1271 (DR_NADDR): Likewise.
1272 (DR_STATUS): Likewise.
1273 (DR_CONTROL): Likewise.
1274 (i386_debug_reg_state): Likewise.
1275 (i386_dr_insert_watchpoint): Likewise.
1276 (i386_dr_remove_watchpoint): Likewise.
1277 (i386_dr_region_ok_for_watchpoint): Likewise.
1278 (i386_dr_stopped_data_address): Likewise.
1279 (i386_dr_stopped_by_watchpoint): Likewise.
1280 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1281
4be83cc2
GB
12822014-06-18 Gary Benson <gbenson@redhat.com>
1283
1284 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1285 i386_dr_insert_watchpoint.
1286 (i386_low_remove_watchpoint): Renamed to
1287 i386_dr_remove_watchpoint.
1288 (i386_low_region_ok_for_watchpoint): Renamed to
1289 i386_dr_region_ok_for_watchpoint.
1290 (i386_low_stopped_data_address): Renamed to
1291 i386_dr_stopped_data_address.
1292 (i386_low_stopped_by_watchpoint): Renamed to
1293 i386_dr_stopped_by_watchpoint.
1294 * i386-low.c (i386_show_dr): Renamed to
1295 i386_dr_show and made nonstatic. All uses updated.
1296 (i386_length_and_rw_bits): Renamed to
1297 i386_dr_length_and_rw_bits and made nonstatic.
1298 All uses updated.
1299 (i386_insert_aligned_watchpoint): Renamed to
1300 i386_dr_insert_aligned_watchpoint and made nonstatic.
1301 All uses updated.
1302 (i386_remove_aligned_watchpoint): Renamed to
1303 i386_dr_remove_aligned_watchpoint and made nonstatic.
1304 All uses updated.
1305 (i386_update_inferior_debug_regs): Renamed to
1306 i386_dr_update_inferior_debug_regs and made nonstatic.
1307 All uses updated.
1308 (i386_low_insert_watchpoint): Renamed to
1309 i386_dr_insert_watchpoint. All uses updated.
1310 (i386_low_remove_watchpoint): Renamed to
1311 i386_dr_remove_watchpoint. All uses updated.
1312 (i386_low_region_ok_for_watchpoint): Renamed to
1313 i386_dr_region_ok_for_watchpoint. All uses updated.
1314 (i386_low_stopped_data_address): Renamed to
1315 i386_dr_stopped_data_address. All uses updated.
1316 (i386_low_stopped_by_watchpoint): Renamed to
1317 i386_dr_stopped_by_watchpoint. All uses updated.
1318
131aa0d4
GB
13192014-06-18 Gary Benson <gbenson@redhat.com>
1320
1321 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1322 (i386_dr_low_can_set_control): Likewise.
1323 (i386_insert_aligned_watchpoint): New check.
1324
d9305f7f
GB
13252014-06-18 Gary Benson <gbenson@redhat.com>
1326
1327 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1328 Renamed to state.
1329
e927c9fc
GB
13302014-06-18 Gary Benson <gbenson@redhat.com>
1331
1332 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1333 instead of fatal and error.
1334 (i386_handle_nonaligned_watchpoint): Likewise.
1335
1b6d4134
GB
13362014-06-18 Gary Benson <gbenson@redhat.com>
1337
1338 * i386-low.c (i386_get_debug_register_length): New macro.
1339 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1340 (i386_show_dr): Use debug_printf instead of fprintf. Use
1341 phex to format values.
1342
6e62758f
GB
13432014-06-18 Gary Benson <gbenson@redhat.com>
1344
1345 * i386-low.h: Comment changes.
1346 * i386-low.c: Likewise.
1347
fc6e2f03
GB
13482014-06-18 Gary Benson <gbenson@redhat.com>
1349
1350 * i386-low.c: Whitespace changes.
1351
f9d1eeed
TT
13522014-06-12 Tom Tromey <tromey@redhat.com>
1353
1354 * utils.c (freeargv): Remove.
1355
0b04e523
TT
13562014-06-12 Tom Tromey <tromey@redhat.com>
1357
1358 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1359 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1360 (parse_debug_format_options): Likewise.
1361 (gdbserver_usage): Likewise.
1362 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1363 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1364 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1365 against libiberty.
1366 ($(LIBGNU)): Depend on libiberty.
1367 (all-lib): Recurse into all subdirs.
1368 (install-only): Invoke "install" target in subdirs.
1369 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1370 targets.
1371 * configure: Rebuild.
1372 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1373 for vasprintf, vsnprintf, or gettimeofday.
1374 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1375 srv_tgtobj.
1376
270c9937
JB
13772014-06-05 Joel Brobecker <brobecker@adacore.com>
1378
1379 * development.sh: Delete.
1380 * Makefile.in (config.status): Adjust dependency on development.sh.
1381 * configure.ac: Adjust development.sh source call.
1382 * configure: Regenerate.
1383
0a261ed8
PA
13842014-06-02 Pedro Alves <palves@redhat.com>
1385
1386 * ax.c (gdb_free_agent_expr): New function.
1387 * ax.h (gdb_free_agent_expr): New declaration.
1388 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1389 list.
1390 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1391 static.
1392 (clear_breakpoint_conditions_and_commands): New function.
1393 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1394 (clear_breakpoint_conditions_and_commands): New declaration.
1395
e9dae05e
RR
13962014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1397
1398 * linux-aarch64-low.c (asm/ptrace.h): Include.
1399
5876f503
JK
14002014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1401
1402 Fix TLS access for -static -pthread.
1403 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1404 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1405 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1406
802e8e6d
PA
14072014-05-20 Pedro Alves <palves@redhat.com>
1408
1409 * linux-aarch64-low.c (aarch64_insert_point)
1410 (aarch64_remove_point): No longer check whether the type is
1411 supported here. Adjust to new interface.
1412 (the_low_target): Install aarch64_supports_z_point_type as
1413 supports_z_point_type method.
1414 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1415 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1416 instead of a Z packet char. Adjust.
1417 (arm_supports_z_point_type): New function.
1418 (arm_insert_point, arm_remove_point): Adjust to new interface.
1419 (the_low_target): Install arm_supports_z_point_type.
1420 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1421 (cris_insert_point, cris_remove_point): Adjust to new interface.
1422 Don't check whether the type is supported here.
1423 (the_low_target): Install cris_supports_z_point_type.
1424 * linux-low.c (linux_supports_z_point_type): New function.
1425 (linux_insert_point, linux_remove_point): Adjust to new interface.
1426 * linux-low.h (struct linux_target_ops) <insert_point,
1427 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1428 raw_breakpoint pointer parameter.
1429 <supports_z_point_type>: New method.
1430 * linux-mips-low.c (mips_supports_z_point_type): New function.
1431 (mips_insert_point, mips_remove_point): Adjust to new interface.
1432 Use mips_supports_z_point_type.
1433 (the_low_target): Install mips_supports_z_point_type.
1434 * linux-ppc-low.c (the_low_target): Install NULL as
1435 supports_z_point_type method.
1436 * linux-s390-low.c (the_low_target): Install NULL as
1437 supports_z_point_type method.
1438 * linux-sparc-low.c (the_low_target): Install NULL as
1439 supports_z_point_type method.
1440 * linux-x86-low.c (x86_supports_z_point_type): New function.
1441 (x86_insert_point): Adjust to new insert_point interface. Use
1442 insert_memory_breakpoint. Adjust to new
1443 i386_low_insert_watchpoint interface.
1444 (x86_remove_point): Adjust to remove_point interface. Use
1445 remove_memory_breakpoint. Adjust to new
1446 i386_low_remove_watchpoint interface.
1447 (the_low_target): Install x86_supports_z_point_type.
1448 * lynx-low.c (lynx_target_ops): Install NULL as
1449 supports_z_point_type callback.
1450 * nto-low.c (nto_supports_z_point_type): New.
1451 (nto_insert_point, nto_remove_point): Adjust to new interface.
1452 (nto_target_ops): Install nto_supports_z_point_type.
1453 * mem-break.c: Adjust intro comment.
1454 (struct raw_breakpoint) <raw_type, size>: New fields.
1455 <inserted>: Update comment.
1456 <shlib_disabled>: Delete field.
1457 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1458 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1459 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1460 (raw_bkpt_type_to_target_hw_bp_type): New function.
1461 (find_enabled_raw_code_breakpoint_at): New function.
1462 (find_raw_breakpoint_at): New type and size parameters. Use them.
1463 (insert_memory_breakpoint): New function, based off
1464 set_raw_breakpoint_at.
1465 (remove_memory_breakpoint): New function.
1466 (set_raw_breakpoint_at): Reimplement.
1467 (set_breakpoint): New, based on set_breakpoint_at.
1468 (set_breakpoint_at): Reimplement.
1469 (delete_raw_breakpoint): Go through the_target->remove_point
1470 instead of assuming memory breakpoints.
1471 (find_gdb_breakpoint_at): Delete.
1472 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1473 (find_gdb_breakpoint): New function.
1474 (set_gdb_breakpoint_at): Delete.
1475 (z_type_supported): New function.
1476 (set_gdb_breakpoint_1): New function, loosely based off
1477 set_gdb_breakpoint_at.
1478 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1479 (delete_gdb_breakpoint_at): Delete.
1480 (delete_gdb_breakpoint_1): New function, loosely based off
1481 delete_gdb_breakpoint_at.
1482 (delete_gdb_breakpoint): New function.
1483 (clear_gdb_breakpoint_conditions): Rename to ...
1484 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1485 breakpoint.
1486 (add_condition_to_breakpoint): Make static.
1487 (add_breakpoint_condition): Take a struct breakpoint pointer
1488 instead of an address. Adjust.
1489 (gdb_condition_true_at_breakpoint): Rename to ...
1490 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1491 z_type parameter.
1492 (gdb_condition_true_at_breakpoint): Reimplement.
1493 (add_breakpoint_commands): Take a struct breakpoint pointer
1494 instead of an address. Adjust.
1495 (gdb_no_commands_at_breakpoint): Rename to ...
1496 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1497 parameter. Return true if no breakpoint was found. Change debug
1498 output.
1499 (gdb_no_commands_at_breakpoint): Reimplement.
1500 (run_breakpoint_commands): Rename to ...
1501 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1502 and change return type to boolean.
1503 (run_breakpoint_commands): New function.
1504 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1505 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1506 breakpoint. Go through the_target->remove_point instead of
1507 assuming memory breakpoint.
1508 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1509 software and hardware breakpoints.
1510 (reinsert_raw_breakpoint): Go through the_target->insert_point
1511 instead of assuming memory breakpoint.
1512 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1513 software and hardware breakpoints.
1514 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1515 Check both software and hardware breakpoints.
1516 (validate_inserted_breakpoint): Assert the breakpoint is a
1517 software breakpoint. Set the inserted flag to -1 instead of
1518 setting shlib_disabled.
1519 (delete_disabled_breakpoints): Adjust.
1520 (validate_breakpoints): Only validate software breakpoints.
1521 Adjust to inserted flag change.
1522 (check_mem_read, check_mem_write): Skip breakpoint types other
1523 than software breakpoints. Adjust to inserted flag change.
1524 * mem-break.h (enum raw_bkpt_type): New enum.
1525 (raw_breakpoint, struct process_info): Forward declare.
1526 (Z_packet_to_target_hw_bp_type): Delete declaration.
1527 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1528 (set_gdb_breakpoint, delete_gdb_breakpoint)
1529 (clear_breakpoint_conditions): New declarations.
1530 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1531 (breakpoint_inserted_here): Update comment.
1532 (add_breakpoint_condition, add_breakpoint_commands): Replace
1533 address parameter with a breakpoint pointer parameter.
1534 (gdb_breakpoint_here): Update comment.
1535 (delete_gdb_breakpoint_at): Delete.
1536 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1537 * server.c (process_point_options): Take a struct breakpoint
1538 pointer instead of an address. Adjust.
1539 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1540 delete_gdb_breakpoint.
1541 * spu-low.c (spu_target_ops): Install NULL as
1542 supports_z_point_type method.
1543 * target.h: Include mem-break.h.
1544 (struct target_ops) <prepare_to_access_memory>: Update comment.
1545 <supports_z_point_type>: New field.
1546 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1547 instead of a char. Also take a raw breakpoint pointer.
1548 * win32-arm-low.c (the_low_target): Install NULL as
1549 supports_z_point_type.
1550 * win32-i386-low.c (i386_supports_z_point_type): New function.
1551 (i386_insert_point, i386_remove_point): Adjust to new interface.
1552 (the_low_target): Install i386_supports_z_point_type.
1553 * win32-low.c (win32_supports_z_point_type): New function.
1554 (win32_insert_point, win32_remove_point): Adjust to new interface.
1555 (win32_target_ops): Install win32_supports_z_point_type.
1556 * win32-low.h (struct win32_target_ops):
1557 <supports_z_point_type>: New method.
1558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1559 instead of a char. Also take a raw breakpoint pointer.
1560
932539e3
PA
15612014-05-20 Pedro Alves <palves@redhat.com>
1562
1563 * mem-break.h: Include break-common.h.
1564 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1565 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1566 (Z_packet_to_target_hw_bp_type): New declaration.
1567 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1568 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1569 (Z_PACKET_ACCESS_WP): Delete macros.
1570 (Z_packet_to_hw_type): Delete function.
1571 * i386-low.h: Don't include break-common.h here.
1572 (Z_packet_to_hw_type): Delete declaration.
1573 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1574 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1575 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1576 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1577 * linux-aarch64-low.c: Don't include break-common.h here.
1578 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1579 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1580 (Z_packet_to_target_hw_bp_type): Delete function.
1581 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1582 function.
1583 (mips_insert_point, mips_remove_point): Use
1584 Z_packet_to_target_hw_bp_type.
1585
4ff0d3d8
PA
15862014-05-20 Pedro Alves <palves@redhat.com>
1587
1588 * linux-aarch64-low.c: Include break-common.h.
1589 (enum target_point_type): Delete.
1590 (Z_packet_to_point_type): Rename to ...
1591 (Z_packet_to_target_hw_bp_type): ... this, and return a
1592 target_hw_bp_type instead.
1593 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1594 instead of an enum target_point_type.
1595 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1596 breakpoint type.
1597 (aarch64_dr_state_insert_one_point)
1598 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1599 (aarch64_handle_aligned_watchpoint)
1600 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1601 Take an enum target_hw_bp_type instead of an enum
1602 target_point_type.
1603 (aarch64_supports_z_point_type): New function.
1604 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1605 use Z_packet_to_target_hw_bp_type.
1606
786dc519
JB
16072014-05-20 Joel Brobecker <brobecker@adacore.com>
1608
1609 * configure.ac: Only use -Werror by default when DEVELOPMENT
1610 is true.
1611 * configure: Regenerate.
1612
9e0aa64f
JK
16132014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1614
1615 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1616 * linux-x86-low.c (X86_64_USER_REGS): New.
1617 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1618
2b577b92
YQ
16192014-04-28 Yao Qi <yao@codesourcery.com>
1620
1621 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1622 name.
1623
94611da2
PA
16242014-04-25 Pedro Alves <palves@redhat.com>
1625
1626 PR server/16255
1627 * linux-low.c (linux_attach_fail_reason_string): New function.
1628 (linux_attach_lwp): Delete.
1629 (linux_attach_lwp_1): Rename to ...
1630 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1631 argument. Remove "initial" parameter. Return int instead of
1632 void. Don't error or warn here.
1633 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1634 failure to attach to the tgid. Call warning when failing to
1635 attach to an lwp.
1636 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1637 argument. Remove "initial" parameter. Return int instead of
1638 void. Don't error or warn here.
1639 (linux_attach_fail_reason_string): New declaration.
1640 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1641 interface change. Use linux_attach_fail_reason_string.
1642
01f9f808
MS
16432014-04-24 Michael Sturm <michael.sturm@mintel.com>
1644 Walfred Tedeschi <walfred.tedeschi@intel.com>
1645
1646 * Makefile.in: Added rules to handle new files
1647 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1648 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1649 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1650 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1651 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1652 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1653 x32-avx512-linux.o.
1654 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1655 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1656 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1657 i386/x32-avx512.xml.
1658 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1659 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1660 i386/x32-avx512-linux.xml.
1661 * i387-fp.c (num_avx512_k_registers): New constant for number
1662 of K registers.
1663 (num_avx512_zmmh_low_registers): New constant for number of
1664 lower ZMM registers (0-15).
1665 (num_avx512_zmmh_high_registers): New constant for number of
1666 higher ZMM registers (16-31).
1667 (num_avx512_ymmh_registers): New contant for number of higher
1668 YMM registers (ymm16-31 added by avx521 on x86_64).
1669 (num_avx512_xmm_registers): New constant for number of higher
1670 XMM registers (xmm16-31 added by AVX512 on x86_64).
1671 (struct i387_xsave): Add space for AVX512 registers.
1672 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1673 Add code to handle AVX512 registers.
1674 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1675 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1676 prototypei from generated file.
1677 (tdesc_amd64_avx512_linux): Likewise.
1678 (init_registers_x32_avx512_linux): Likewise.
1679 (tdesc_x32_avx512_linux): Likewise.
1680 (init_registers_i386_avx512_linux): Likewise.
1681 (tdesc_i386_avx512_linux): Likewise.
1682 (x86_64_regmap): Add AVX512 registers.
1683 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1684 mask.
1685 (initialize_low_arch): Add code to initialize AVX512 registers.
1686
51aa91f9
PA
16872014-04-23 Pedro Alves <palves@redhat.com>
1688
1689 * mem-break.c (find_gdb_breakpoint_at): Make static.
1690 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1691
a4165e94
PA
16922014-04-23 Pedro Alves <palves@redhat.com>
1693
1694 * i386-low.c: Don't include break-common.h here.
1695 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1696 prototype to take target_hw_bp_type as argument instead of a Z
1697 packet char.
1698 * i386-low.h: Include break-common.h here.
1699 (Z_packet_to_hw_type): Declare.
1700 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1701 prototypes.
1702 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1703 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1704 (x86_remove_point): Convert the packet number to a
1705 target_hw_bp_type before calling i386_low_remove_watchpoint.
1706 * win32-i386-low.c (i386_insert_point): Convert the packet number
1707 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1708 (i386_remove_point): Convert the packet number to a
1709 target_hw_bp_type before calling i386_low_remove_watchpoint.
1710
b8acf843
PA
17112014-04-23 Pedro Alves <palves@redhat.com>
1712
1713 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1714
d708bcd1
PA
17152014-04-10 Pedro Alves <palves@redhat.com>
1716
1717 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1718 Check if the condition or command is NULL before checking if the
1719 breakpoint is known. On success, return true.
1720 * mem-break.h (add_breakpoint_condition): Document return.
1721 (add_breakpoint_commands): Add describing comment.
1722 * server.c (skip_to_semicolon): New function.
1723 (process_point_options): Use it.
1724
2eec7d5b
PA
17252014-04-09 Pedro Alves <palves@redhat.com>
1726
1727 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1728 to lwpid_of.
1729
fa96cb38
PA
17302014-02-27 Pedro Alves <palves@redhat.com>
1731
1732 PR 12702
1733 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1734 macros.
1735 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1736 output.
1737 (last_thread_of_process_p): Take a PID argument instead of a
1738 thread pointer.
1739 (linux_wait_for_lwp): Delete.
1740 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1741 functions.
1742 (linux_low_filter_event): New function, party factored out from
1743 linux_wait_for_event.
1744 (linux_wait_for_event): Rename to ...
1745 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1746 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1747 sigsuspend. Check for zombie leaders.
1748 (linux_wait_for_event): Reimplement as wrapper around
1749 linux_wait_for_event_filtered.
1750 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1751 a normal or signal exit is seen, it's the whole process exiting.
1752 (wait_for_sigstop): No longer a for_each_inferior callback.
1753 Rewrite on top of linux_wait_for_event_filtered.
1754 (stop_all_lwps): Call wait_for_sigstop directly.
1755 * server.c (resume, handle_target_event): Handle
1756 TARGET_WAITKIND_NO_RESUMED.
1757
d763de10
JB
17582014-02-26 Joel Brobecker <brobecker@adacore.com>
1759
1760 * win32-low.c (psapi_get_dll_name,
1761 * win32_CreateToolhelp32Snapshot): Delete.
1762 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1763 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1764 Delete.
1765 (handle_load_dll): Add function description.
1766 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1767
850a0f76
JB
17682014-02-26 Joel Brobecker <brobecker@adacore.com>
1769
1770 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1771 Add comment.
1772 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1773 base address when calling win32_add_one_solib.
1774 (handle_load_dll): Delete local variable load_addr.
1775 Remove 0x1000 offset applied to DLL base address when calling
1776 win32_add_one_solib.
1777 (handle_unload_dll): Add comment.
1778
f25b3fc3
JB
17792014-02-26 Joel Brobecker <brobecker@adacore.com>
1780
1781 * win32-low.c (win32_add_all_dlls): Renames
1782 win32_ensure_ntdll_loaded. Rewrite function documentation.
1783 Adjust implementation to always load all DLLs.
1784 Add 0x1000 offset to DLL base address when calling
1785 win32_add_one_solib.
1786 (child_initialization_done): New static global.
1787 (do_initial_child_stuff): Set child_initialization_done to
1788 zero during child initialization, and 1 after. Replace call
1789 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1790 Add comment.
1791 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1792 (handle_unload_dll): Add function documentation.
1793 (get_child_debug_event): Ignore load and unload DLL events
1794 during child initialization.
1795
d86d4aaf
DE
17962014-02-20 Doug Evans <dje@google.com>
1797
3bc32da3 1798 Remove global all_lwps.
d86d4aaf
DE
1799 * inferiors.h (ptid_of): Move here from linux-low.h.
1800 (pid_of, lwpid_of): Ditto.
1801 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1802 parameter is a struct thread_info * now.
1803 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1804 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1805 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1806 directly.
1807 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1808 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1809 * linux-arm-low.c (update_registers_callback): Update, "entry"
1810 parameter is a struct thread_info * now.
1811 Fetch lwpid from current_inferior directly.
1812 (arm_insert_point): Pass &all_threads to find_inferior instead of
1813 &all_lwps.
1814 (arm_remove_point): Ditto.
1815 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1816 (arm_prepare_to_resume): Fetch pid from thread.
1817 (arm_read_description): Fetch lwpid from current_inferior directly.
1818 * linux-low.c (all_lwps): Delete.
1819 (delete_lwp): Delete call to remove_inferior.
1820 (handle_extended_wait): Fetch lwpid from thread.
1821 (add_lwp): Don't set lwp->entry.id. Remove call to
1822 add_inferior_to_list.
1823 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1824 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1825 (kill_one_lwp_callback): Ditto.
1826 (linux_kill): Don't dereference NULL pointer.
1827 Fetch ptid,lwpid from thread.
1828 (get_detach_signal): Fetch ptid from thread.
1829 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1830 Simplify call to regcache_invalidate_thread.
1831 (delete_lwp_callback): Update, "entry" parameter is a
1832 struct thread_info * now. Fetch pid from thread.
1833 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1834 (status_pending_p_callback): Update, "entry" parameter is a
1835 struct thread_info * now. Fetch ptid from thread.
1836 (find_lwp_pid): Update, "entry" parameter is a
1837 struct thread_info * now.
1838 (linux_wait_for_lwp): Fetch pid from thread.
1839 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1840 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1841 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1842 (dequeue_one_deferred_signal): Ditto.
1843 (cancel_breakpoint): Fetch ptid from current_inferior.
1844 (linux_wait_for_event): Pass &all_threads to find_inferior,
1845 not &all_lwps. Fetch ptid, lwpid from thread.
1846 (count_events_callback): Update, "entry" parameter is a
1847 struct thread_info * now.
1848 (select_singlestep_lwp_callback): Ditto.
1849 (select_event_lwp_callback): Ditto.
1850 (cancel_breakpoints_callback): Ditto.
1851 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1852 not &all_lwps.
1853 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1854 (unsuspend_one_lwp): Update, "entry" parameter is a
1855 struct thread_info * now.
1856 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1857 not &all_lwps.
1858 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1859 Fetch lwpid from thread, not lwp.
1860 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1861 Pass &all_threads to find_inferior, not &all_lwps.
1862 (send_sigstop): Fetch lwpid from thread, not lwp.
1863 (send_sigstop_callback): Update, "entry" parameter is a
1864 struct thread_info * now.
1865 (suspend_and_send_sigstop_callback): Ditto.
1866 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1867 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1868 struct thread_info * now.
1869 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1870 from thread, lwp.
1871 (lwp_running): Update, "entry" parameter is a
1872 struct thread_info * now.
1873 (stop_all_lwps): Fetch ptid from thread.
1874 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1875 (linux_resume_one_lwp): Fetch lwpid from thread.
1876 (linux_set_resume_request): Update, "entry" parameter is a
1877 struct thread_info * now. Fetch pid, lwpid from thread.
1878 (resume_status_pending_p): Update, "entry" parameter is a
1879 struct thread_info * now.
1880 (need_step_over_p): Ditto. Fetch lwpid from thread.
1881 (start_step_over): Fetch lwpid from thread.
1882 (linux_resume_one_thread): Update, "entry" parameter is a
1883 struct thread_info * now. Fetch lwpid from thread.
1884 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1885 (proceed_one_lwp): Update, "entry" parameter is a
1886 struct thread_info * now. Fetch lwpid from thread.
1887 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1888 struct thread_info * now.
1889 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1890 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1891 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1892 directly.
1893 (regsets_store_inferior_registers): Ditto.
1894 (fetch_register, store_register): Ditto.
1895 (linux_read_memory, linux_write_memory): Ditto.
1896 (linux_request_interrupt): Ditto.
1897 (linux_read_auxv): Ditto.
1898 (linux_xfer_siginfo): Ditto.
1899 (linux_qxfer_spu): Ditto.
1900 (linux_qxfer_libraries_svr4): Ditto.
1901 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1902 moved to inferiors.h.
1903 (get_lwp): Delete.
1904 (get_thread_lwp): Update.
1905 (struct lwp_info): Delete member "entry". Simplify comment for
1906 member "thread".
1907 (all_lwps): Delete.
1908 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1909 current_inferior directly.
1910 (update_watch_registers_callback): Update, "entry" parameter is a
1911 struct thread_info * now. Fetch pid from thread.
1912 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1913 (mips_insert_point): Fetch lwpid from current_inferior.
1914 Pass &all_threads to find_inferior, not &all_lwps.
1915 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1916 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1917 directly.
1918 (mips_stopped_data_address): Ditto.
1919 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1920 directly.
1921 * linux-tile-low.c (tile_arch_setup): Ditto.
1922 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1923 (update_debug_registers_callback): Update, "entry" parameter is a
1924 struct thread_info * now. Fetch pid from thread.
1925 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1926 Pass &all_threads to find_inferior, not &all_lwps.
1927 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1928 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1929 Pass &all_threads to find_inferior, not &all_lwps.
1930 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1931 (i386_dr_low_get_status): Ditto.
1932 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1933 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1934 (x86_linux_read_description): Ditto.
1935 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1936
3b8361aa
DE
19372014-02-20 Doug Evans <dje@google.com>
1938
1939 * inferiors.c (get_first_inferior): Fix buglet.
1940
f7667f0d
DE
19412014-02-19 Doug Evans <dje@google.com>
1942
1943 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1944 * inferiors.c (add_thread): Change result type to struct thread_info *.
1945 All callers updated.
1946 (add_lwp): Call add_thread here instead of in callers.
1947 All callers updated.
1948 * linux-low.h (get_lwp_thread): Rewrite.
1949 (struct lwp_info): New member "thread".
1950
b3312d80
DE
19512014-02-19 Doug Evans <dje@google.com>
1952
1953 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1954 All callers updated.
1955
ecc6f45c
DE
19562014-02-19 Doug Evans <dje@google.com>
1957
1958 * inferiors.c (add_thread): Fix whitespace.
1959
649ebbca
DE
19602014-02-19 Doug Evans <dje@google.com>
1961
1962 * dll.c (clear_dlls): Replace accessing list implemention details
1963 with API function.
1964 * gdbthread.h (get_first_thread): Declare.
1965 * inferiors.c (for_each_inferior_with_data): New function.
1966 (get_first_thread): New function.
1967 (find_thread_ptid): Simplify.
1968 (get_first_inferior): New function.
1969 (clear_list): Delete.
1970 (one_inferior_p): New function.
1971 (clear_inferior_list): New function.
1972 (clear_inferiors): Update.
1973 * inferiors.h (for_each_inferior_with_data): Declare.
1974 (clear_inferior_list): Declare.
1975 (one_inferior_p): Declare.
1976 (get_first_inferior): Declare.
1977 * linux-low.c (linux_wait_for_event): Replace accessing list
1978 implemention details with API function.
1979 * server.c (target_running): Ditto.
1980 (accumulate_file_name_length): New function.
1981 (emit_dll_description): New function.
1982 (handle_qxfer_libraries): Replace accessing list implemention
1983 details with API function.
1984 (handle_qxfer_threads_worker): New function.
1985 (handle_qxfer_threads_proper): Replace accessing list implemention
1986 details with API function.
1987 (handle_query): Ditto.
1988 (visit_actioned_threads_callback_ftype): New typedef.
1989 (visit_actioned_threads_data): New struct.
1990 (visit_actioned_threads): Rewrite to be find_inferior callback.
1991 (resume): Call find_inferior.
1992 (handle_status): Replace accessing list implemention
1993 details with API function.
1994 (process_serial_event): Replace accessing list implemention details
1995 with API function.
1996 * target.c (set_desired_inferior): Replace accessing list implemention
1997 details with API function.
1998 * tracepoint.c (same_process_p): New function.
1999 (gdb_agent_about_to_close): Replace accessing list implemention
2000 details with API function.
2001 * win32-low.c (child_delete_thread): Replace accessing list
2002 implemention details with API function.
2003 (match_dll_by_basename): New function.
2004 (dll_is_loaded_by_basename): New function.
2005 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2006 details call to dll_is_loaded_by_basename.
2007
80894984
DE
20082014-02-19 Doug Evans <dje@google.com>
2009
2010 * dll.h (struct dll_info): Add comment.
2011 * gdbthread.h (struct thread_info): Add comment.
2012 (current_ptid): Simplify.
2013 * inferiors.c (add_process): Update.
2014 (remove_process): Update.
2015 * inferiors.h (struct process_info): Rename member "head" to "entry".
2016 * linux-low.c (delete_lwp): Update.
2017 (add_lwp): Update.
2018 (last_thread_of_process_p): Update.
2019 (kill_one_lwp_callback, linux_kill): Update.
2020 (status_pending_p_callback): Update.
2021 (wait_for_sigstop): Update. Simplify read of ptid.
2022 (start_step_over): Update.
2023 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2024 (get_lwp_thread): Update.
2025 (struct lwp_info): Rename member "head" to "entry".
2026 * regcache.h (inferior_list_entry): Delete.
2027 * server.c (kill_inferior_callback): Update.
2028 (detach_or_kill_inferior_callback): Update.
2029 (print_started_pid): Update.
2030 (print_attached_pid): Update.
2031 (process_serial_event): Simplify read of ptid.
2032 * thread-db.c (thread_db_create_event): Update.
2033 (thread_db_get_tls_address): Update.
2034 * win32-low.c (current_inferior_ptid): Simplify.
2035
46917d26
TT
20362014-02-19 Tom Tromey <tromey@redhat.com>
2037
2038 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2039 argument.
2040 (target_supports_btrace): Update.
2041
0759a81e
YQ
20422014-02-14 Yao Qi <yao@codesourcery.com>
2043
2044 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2045 (rsp-low-ipa.o): New target.
2046
a7191e8b
TT
20472014-02-12 Tom Tromey <tromey@redhat.com>
2048
2049 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2050 convert_ascii_to_int.
2051 * regcache.c (registers_to_string): Likewise.
2052 * remote-utils.c (decode_M_packet): Likewise.
2053 * server.c (process_serial_event): Likewise.
2054
ff0e980e
TT
20552014-02-12 Tom Tromey <tromey@redhat.com>
2056
2057 * server.c (handle_query, handle_v_run): Use hex2bin, not
2058 unhexify.
2059 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2060
e9371aff
TT
20612014-02-12 Tom Tromey <tromey@redhat.com>
2062
2063 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2064 convert_int_to_ascii.
2065 * regcache.c (registers_to_string, collect_register_as_string):
2066 Likewise.
2067 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2068 Likewise.
2069 * server.c (process_serial_event): Likewise.
2070 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2071 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2072
971dc0b8
TT
20732014-02-12 Tom Tromey <tromey@redhat.com>
2074
2075 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2076 bin2hex, not hexify.
2077 * tracepoint.c (cmd_qtstatus): Likewise.
2078
0a822afb
TT
20792014-02-12 Tom Tromey <tromey@redhat.com>
2080
2081 * remote-utils.c (monitor_output): Pass explicit length to
2082 hexify.
2083
9c3d6531
TT
20842014-02-12 Tom Tromey <tromey@redhat.com>
2085
2086 * tracepoint.c: Include rsp-low.h.
2087 * server.c: Include rsp-low.h.
2088 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2089 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2090 declare.
2091 * remote-utils.c: Include rsp-low.h.
2092 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2093 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2094 (convert_int_to_ascii, convert_ascii_to_int): Move to
2095 common/rsp-low.c.
2096 * regcache.c: Include rsp-low.h.
2097 * ax.c: Include rsp-low.h.
2098 * Makefile.in (SFILES): Add common/rsp-low.c.
2099 (OBS): Add rsp-low.o.
2100 (rsp-low.o): New target.
2101
01fd3ea5
TT
21022014-02-12 Tom Tromey <tromey@redhat.com>
2103
2104 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2105 Include print-utils.h.
2106 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2107 (plongest, thirty_two, phex_nz): Remove.
2108 * Makefile.in (SFILES): Add common/print-utils.c.
2109 (OBS): Add print-utils.o.
2110 (print-utils-ipa.o): New target.
2111 (print-utils.o): New target.
2112 (IPA_OBJS): Add print-utils-ipa.o.
2113
e99dc820
TT
21142014-02-06 Tom Tromey <tromey@redhat.com>
2115
2116 * Makefile.in (SFILES): Fix indentation.
2117
ee1e2d4f
DE
21182014-02-05 Doug Evans <dje@google.com>
2119
2120 * linux-low.c (linux_wait_for_event): Improve comment.
2121 (linux_wait_1): Keep current_inferior in sync with event_child.
2122
f5a02773
DE
21232014-01-22 Doug Evans <dje@google.com>
2124
2125 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2126
87ce2a04
DE
21272014-01-22 Doug Evans <dje@google.com>
2128
2129 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2130 * configure: Regenerate.
2131 * config.in: Regenerate.
2132 * Makefile.in (SFILES): Add debug.c.
2133 (OBS): Add debug.o.
2134 * debug.c: New file.
2135 * debug.h: New file.
2136 * linux-aarch64-low.c (*): Update all debugging printfs to use
2137 debug_printf instead of fprintf.
2138 * linux-arm-low.c (*): Ditto.
2139 * linux-cris-low.c (*): Ditto.
2140 * linux-crisv32-low.c (*): Ditto.
2141 * linux-m32r-low.c (*): Ditto.
2142 * linux-sparc-low.c (*): Ditto.
2143 * linux-x86.c (*): Ditto.
2144 * linux-low.c (*): Ditto.
2145 (linux_wait_1): Add calls to debug_enter, debug_exit.
2146 (linux_wait): Remove redundant debugging printf.
2147 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2148 (linux_resume, unstop_all_lwps): Ditto.
2149 * mem-break.c (*): Update all debugging printfs to use
2150 debug_printf instead of fprintf.
2151 * remote-utils.c (*): Ditto.
2152 * thread-db.c (*): Ditto.
2153 * server.c #include <ctype.h>, "gdb_vecs.h".
2154 (debug_threads): Moved to debug.c.
2155 (*): Update all debugging printfs to use debug_printf instead of
2156 fprintf.
2157 (start_inferior): Replace call to fflush with call to debug_flush.
2158 (monitor_show_help): Mention set debug-format.
2159 (parse_debug_format_options): New function.
2160 (handle_monitor_command): Handle "monitor set debug-format".
2161 (gdbserver_usage): Mention --debug-format.
2162 (main): Parse --debug-format.
2163 * server.h (debug_threads): Declaration moved to debug.h.
2164 #include "debug.h".
2165 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2166 trace_debug_1 that uses debug_printf.
2167 (tracepoint_look_up_symbols): Update all debugging printfs to use
2168 debug_printf instead of fprintf.
2169
e671835b
BS
21702014-01-20 Baruch Siach <baruch@tkos.co.il>
2171
2172 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2173 sys/ptrace.h.
2174
b5737fa9
PA
21752014-01-17 Pedro Alves <palves@redhat.com>
2176
ea38d2a9 2177 PR build/16445
c7faa97a
PA
2178 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2179 defined after including gdb_proc_service.h.
b5737fa9 2180
40ed484e
DE
21812014-01-16 Doug Evans <dje@google.com>
2182
2183 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2184 (match_dll): Use it.
2185
969c39fb
MM
21862014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2187
2188 * target.h (target_ops) <read_btrace>: Change parameters and
2189 return type to allow error reporting.
2190 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2191 trace reading errors on.
2192 * linux-low.c (linux_low_read_btrace): Pass trace reading
2193 errors on.
2194 (linux_low_disable_btrace): New.
2195
ab7f45ba
DE
21962014-01-15 Doug Evans <dje@google.com>
2197
2198 * inferiors.c (thread_id_to_gdb_id): Delete.
2199 * inferiors.h (thread_id_to_gdb_id): Delete.
2200
66af0f44
EZ
22012014-01-13 Eli Zaretskii <eliz@gnu.org>
2202
2203 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2204 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2205 versions.
2206
9939e131
PA
22072014-01-08 Pedro Alves <palves@redhat.com>
2208
2209 * server.c (handle_status): Don't discard previous queued stop
2210 replies or thread's pending status here.
2211 (main) <disconnection>: Do it here instead.
2212
b7ea362b
PA
22132014-01-08 Pedro Alves <palves@redhat.com>
2214
2215 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2216 * server.c (visit_actioned_threads, handle_pending_status): New
2217 function.
2218 (handle_v_cont): Factor out parts to ...
2219 (resume): ... this new function. If in all-stop, and a thread
2220 being resumed has a pending status, report it without actually
2221 resuming.
2222 (myresume): Adjust to use the new 'resume' function.
2223 (clear_pending_status_callback, set_pending_status_callback)
2224 (find_status_pending_thread_callback): New functions.
2225 (handle_status): Handle the case of multiple threads having
2226 interesting statuses to report. Report threads' real last signal
2227 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2228 with an interesting thread to report the status for, instead of
2229 always reporting the status of the first thread.
2230
28498c42
JB
22312014-01-01 Joel Brobecker <brobecker@adacore.com>
2232
2233 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2234 * gdbreplay.c (gdbreplay_version): Likewise.
2235
f45c82da
YZ
22362013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2237
2238 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2239 iov.iov_len with the real length in use.
2240
379a5e2d
JB
22412013-12-13 Joel Brobecker <brobecker@adacore.com>
2242
2243 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2244 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2245 for all targets that use win32-low.c.
2246 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2247 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2248
4210d83e
PA
22492013-12-13 Pedro Alves <palves@redhat.com>
2250
2251 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2252 if equal to TARGET_WAITKIND_LOADED.
2253 * win32-low.c (cached_status): New static global.
2254 (win32_wait): Add declaration.
2255 (do_initial_child_stuff): Flush all initial pending debug events
2256 up to the initial breakpoint.
2257 (win32_wait): If CACHED_STATUS was set, return that instead
2258 of doing a real wait. Remove the code resuming the execution
2259 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2260 during the initial phase. Also remove the code changing
2261 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2262 TARGET_WAITKIND_STOPPED.
2263
e7f0d979
YQ
22642013-12-11 Yao Qi <yao@codesourcery.com>
2265
2266 * notif.c (handle_notif_ack): Return 0 if no notification
2267 matches.
2268
ebcf782c
DE
22692013-11-20 Doug Evans <dje@google.com>
2270
2271 * linux-low.c (linux_set_resume_request): Fix comment.
2272
20ad9378
DE
22732013-11-20 Doug Evans <dje@google.com>
2274
2275 * linux-low.c (resume_status_pending_p): Tweak comment.
2276
a196ebeb
WT
22772013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2278
2279 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2280 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2281 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2282 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2283 (srv_amd64_regobj): Add amd64-mpx.o.
2284 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2285 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2286 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2287 * i387-fp.c (num_pl_bnd_register) Added constant.
2288 (num_pl_bnd_cfg_registers) Added constant.
2289 (struct i387_xsave) Added reserved area and MPX fields.
2290 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2291 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2292 function.
2293 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2294 (init_registers_amd64_mpx_linux): Declare new function.
2295 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2296 (x86_64_regmap): Add MPX registers.
2297 (x86_linux_read_description): Add MPX case.
2298 (initialize_low_arch): Initialize MPX targets.
2299
0080a2f6
TT
23002013-11-18 Tom Tromey <tromey@redhat.com>
2301
2302 * configure: Rebuild.
2303 * configure.ac: Don't check for stdlib.h.
2304 * gdbreplay.c: Unconditionally include stdlib.h.
2305
2978b111
TT
23062013-11-18 Tom Tromey <tromey@redhat.com>
2307
2308 * config.in: Rebuild.
2309 * configure: Rebuild.
2310 * configure.ac: Don't use AC_HEADER_DIRENT.
2311
a3d08894
TT
23122013-11-18 Tom Tromey <tromey@redhat.com>
2313
2314 * server.h: Don't check HAVE_STRING_H.
2315 * gdbreplay.c: Don't check HAVE_STRING_H.
2316 * configure: Rebuild.
2317
0a5dd17d
TT
23182013-11-18 Tom Tromey <tromey@redhat.com>
2319
2320 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2321 LIBGNU.
2322
1bd2f0ba
TT
23232013-11-08 Tom Tromey <tromey@redhat.com>
2324
2325 * configure, config.in: Rebuild.
2326 * configure.ac: Remove unused configury.
2327
3266f10b
TT
23282013-11-08 Tom Tromey <tromey@redhat.com>
2329
2330 * acinclude.m4: Include common.m4, codeset.m4.
2331 * configure, config.in: Rebuild.
2332 * configure.ac: Use GDB_AC_COMMON.
2333
6682d959
AA
23342013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2335
2336 * linux-s390-low.c (HWCAP_S390_TE): New define.
2337 (s390_arch_setup): Consider the TE field in the HWCAP for
2338 determining 'have_regset_tdb'.
2339
fd0a4d76
SDJ
23402013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2341
2342 PR gdb/16014
2343 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2344 call to sizeof.
2345
1a3d890b
PA
23462013-10-02 Pedro Alves <palves@redhat.com>
2347
2348 * server.c (process_serial_event): Don't output "GDBserver
2349 exiting" if GDB is connected through stdio.
2350 * target.c (mywait): Likewise, be silent if GDB is connected
2351 through stdio.
2352
97ad4581
JB
23532013-10-01 Joel Brobecker <brobecker@adacore.com>
2354
2355 * lynx-low.c (lynx_add_threads_after_attach): New function.
2356 (lynx_attach): Remove call to add_thread. Add call to
2357 lynx_add_threads_after_attach instead.
2358
5b4e221c
MF
23592013-09-28 Mike Frysinger <vapier@gentoo.org>
2360
2361 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2362 * config.in, configure: Regenerated.
2363
ee47b2f8
YQ
23642013-09-18 Yao Qi <yao@codesourcery.com>
2365
2366 PR server/15959
2367 * server.c (start_inferior): Clear 'resume_info'.
2368
d6707650 23692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2370
d6707650
JW
2371 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2372 for each register.
2373
9243dd0e 23742013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2375
9243dd0e
JW
2376 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2377 linux-tile-low.o to srv_tgtobj.
2378
c623a6ef
WN
23792013-09-16 Will Newton <will.newton@linaro.org>
2380
2381 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2382 out regs.
2383
fb71d39e
PA
23842013-09-06 Pedro Alves <palves@redhat.com>
2385
2386 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2387 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2388 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2389 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2390 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2391 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2392
8e7e9910
PA
23932013-09-06 Pedro Alves <palves@redhat.com>
2394
2395 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2396 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2397
7c3a12ca
PA
23982013-09-06 Pedro Alves <palves@redhat.com>
2399
2400 * linux-amd64-ipa.c: Include tracepoint.h.
2401 * linux-i386-ipa.c: Include tracepoint.h.
2402
8eb3d7b6
RW
24032013-09-06 Ricard Wanderlof <ricardw@axis.com>
2404
2405 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2406 (ps_get_thread_area): New function.
2407
eddddb9d
RW
24082013-09-06 Ricard Wanderlof <ricardw@axis.com>
2409
2410 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2411 (initialize_low_arch): Call init_registers_crisv32 rather than
2412 init_register_crisv32.
2413
533b0600
PA
24142013-09-05 Pedro Alves <palves@redhat.com>
2415
2416 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2417 to ...
2418 * hostio.h: ... this new file.
2419 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2420 win32-low.c: Include hostio.h.
2421
0ce3d3b5
PA
24222013-09-05 Pedro Alves <palves@redhat.com>
2423
2424 * server.h (gdb_client_data, handler_func, callback_handler_func)
2425 (delete_file_handler, add_file_handler, append_callback_event)
2426 (delete_callback_event, start_event_loop, initialize_event_loop):
2427 Move to event-loop.h and include it.
2428 * event-loop.h: New file.
2429
799cdc37
PA
24302013-09-05 Pedro Alves <palves@redhat.com>
2431
2432 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2433 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2434 (loaded_dll, unloaded_dll): Move to ...
2435 * dll.h: ... this new file.
2436 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2437
6a6bbd9d
PA
24382013-09-05 Pedro Alves <palves@redhat.com>
2439
2440 * server.h (current_process, get_thread_process, all_processes)
2441 (add_inferior_to_list, for_each_inferior, current_inferior)
2442 (remove_inferior, add_process, remove_process, find_process_pid)
2443 (have_started_inferiors_p, have_attached_inferiors_p)
2444 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2445 (clear_inferiors, find_inferior, find_inferior_id)
2446 (inferior_target_data, set_inferior_target_data)
2447 (inferior_regcache_data, set_inferior_regcache_data): Move to
2448 inferiors.h, and include it.
2449 * inferiors.h: New file.
2450
f699aaba
PA
24512013-09-05 Pedro Alves <palves@redhat.com>
2452
2453 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2454 Move ...
2455 * ax.h: ... here.
2456
c144c7a0
PA
24572013-09-05 Pedro Alves <palves@redhat.com>
2458
2459 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2460 tracepoint.h.
2461 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2462 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2463 (handle_tracepoint_general_set, handle_tracepoint_query)
2464 (tracepoint_finished_step, tracepoint_was_hit)
2465 (release_while_stepping_state_list, current_traceframe)
2466 (in_readonly_region, traceframe_read_mem)
2467 (fetch_traceframe_registers, traceframe_read_sdata)
2468 (traceframe_read_info, struct fast_tpoint_collect_status)
2469 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2470 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2471 (supply_fast_tracepoint_registers)
2472 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2473 (ipa_tdesc, claim_trampoline_space)
2474 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2475 (agent_mem_read, agent_get_trace_state_variable_value)
2476 (agent_set_trace_state_variable_value, agent_tsv_read)
2477 (agent_mem_read_string, get_raw_reg_func_addr)
2478 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2479 * tracepoint.h: ... this new file.
2480
ff42e6ab
PA
24812013-09-05 Pedro Alves <palves@redhat.com>
2482
2483 * server.h (perror_with_name, error, fatal, warning, paddress)
2484 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2485 include it.
2486 * utils.h: New file.
2487
541af0f4
PA
24882013-09-05 Pedro Alves <palves@redhat.com>
2489
2490 * server.h (remote_debug, noack_mode, transport_is_reliable)
2491 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2492 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2493 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2494 (write_enn, initialize_async_io, enable_async_io)
2495 (disable_async_io, check_remote_input_interrupt_request)
2496 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2497 (dead_thread_notify, prepare_resume_reply)
2498 (decode_address_to_semicolon, decode_address, decode_m_packet)
2499 (decode_M_packet, decode_X_packet, decode_xfer_write)
2500 (decode_search_memory_packet, unhexify, hexify)
2501 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2502 (look_up_one_symbol, relocate_instruction)
2503 (monitor_output): Move to remote-utils.h, and include it.
2504 * remote-utils.h: New file.
2505
eebdf26b
PA
25062013-09-05 Pedro Alves <palves@redhat.com>
2507
2508 * server.h (_): Delete.
2509
3aafd2ff
PA
25102013-09-02 Pedro Alves <palves@redhat.com>
2511
2512 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2513 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2514 allocated.
2515 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2516
cee83bcb
PM
25172013-09-02 Pierre Muller <muller@sourceware.org>
2518
2519 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2520 or WriteProcessMemory complete successfully and handle
2521 ERROR_PARTIAL_COPY error.
2522
9a13b2fa
PA
25232013-09-02 Pedro Alves <palves@redhat.com>
2524
2525 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2526 error instead of EIO.
2527
602e3198
JK
25282013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2529
2530 PR server/15604
2531 * linux-low.c: Include filestuff.h.
2532 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2533 * lynx-low.c: Include filestuff.h.
2534 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2535 * server.c: Include filestuff.h.
2536 (main): Call notice_open_fds.
2537 * spu-low.c: Include filestuff.h.
2538 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2539
96d7229d
LM
25402013-08-22 Luis Machado <lgustavo@codesourcery.com>
2541
2542 * Makefile.in: Explain why ../target and ../nat are not
2543 listed as include file search paths.
2544 (linux-waitpid.o): New object file rule.
2545 * configure.srv (srv_native_linux_obj): New variable.
2546 Replace all occurrences of linux native object files with
2547 $srv_native_linux_obj.
2548 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2549 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2550 (linux_enable_event_reporting): Remove declaration.
2551 (my_waitpid): Moved to common/linux-waitpid.c.
2552 (linux_wait_for_event): Pass ptid when calling
2553 linux_enable_event_reporting.
2554 (linux_supports_tracefork_flag): Remove.
2555 (linux_enable_event_reporting): Likewise.
2556 (linux_tracefork_grandchild): Remove.
2557 (STACK_SIZE): Moved to common/linux-ptrace.c.
2558 (linux_tracefork_child): Remove.
2559 (linux_test_for_tracefork): Remove.
2560 (linux_look_up_symbols): Call linux_supports_traceclone.
2561 (initialize_low): Remove call to linux_test_for_tracefork.
2562 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2563 common/linux-ptrace.h.
2564 (PTRACE_TYPE_ARG4): Likewise.
2565 Include linux-ptrace.h.
2566
32940073
PA
25672013-08-21 Pedro Alves <palves@redhat.com>
2568
2569 * config.in: Renegerate.
2570
33b60d58 25712013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2572
33b60d58
LM
2573 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2574 (SFILES): Remove $(srcdir)/common/target-common.c and
2575 add $(srcdir)/target/waitstatus.c.
2576 (OBS): Remove target-common.o and add waitstatus.o.
2577 (server_h): Remove $(srcdir)/../common/target-common.h and
2578 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2579 and $(srcdir)/../target/waitstatus.h.
2580 (target-common.o): Remove.
2581 (waitstatus.o): New target object file.
2582 * target.h: Do not include target-common.h and
2583 include target/resume.h, target/wait.h and
2584 target/waitstatus.h.
2585
b8e1b30e
LM
25862013-08-13 Luis Machado <lgustavo@codesourcery.com>
2587
2588 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2589 to PTRACE_TYPE_ARG3.
2590 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2591 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2592 PTRACE_TYPE_ARG4.
2593 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2594 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2595
7a60ad40
YQ
25962013-07-27 Jie Zhang <jie@codesourcery.com>
2597 Daniel Jacobowitz <dan@codesourcery.com>
2598 Yao Qi <yao@codesourcery.com>
2599
2600 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2601 (mips-linux-watch.o): New rule.
2602 (mips_linux_watch_h): New variable.
2603 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2604 srv_tgtobj.
2605 * linux-mips-low.c: Include mips-linux-watch.h.
2606 (struct arch_process_info, struct arch_lwp_info): New.
2607 (update_watch_registers_callback): New function.
2608 (mips_linux_new_process, mips_linux_new_thread) New functions.
2609 (mips_linux_prepare_to_resume, mips_insert_point): New
2610 functions.
2611 (mips_remove_point, mips_stopped_by_watchpoint): New
2612 functions.
2613 (rsp_bp_type_to_target_hw_bp_type): New function.
2614 (mips_stopped_data_address): New function.
2615 (the_low_target): Add watchpoint support functions.
2616
de6f69ad
YQ
26172013-07-27 Yao Qi <yao@codesourcery.com>
2618
2619 * i386-low.c: Include break-common.h.
2620 (enum target_hw_bp_type): Remove.
2621
3360c0bf
LM
26222013-07-24 Luis Machado <lgustavo@codesourcery.com>
2623
2624 * Makefile.in (SFILES): /common/target-common.c.
2625 (OBS): Add target-common.o.
2626 (server_h): Add $(srcdir)/../common/target-common.h.
2627 (target-common.o): New target.
2628 * server.c (queue_stop_reply_callback): Free
2629 status string after use.
2630 * target.c (target_waitstatus_to_string): Remove.
2631 * target.h: Include target-common.h.
2632 (resume_kind): Likewise.
2633 (target_waitkind): Likewise.
2634 (target_waitstatus): Likewise.
2635 (TARGET_WNOHANG): Likewise.
2636
bd885420
YQ
26372013-07-04 Yao Qi <yao@codesourcery.com>
2638
2639 * Makefile.in (host_alias): Use @host_noncanonical@.
2640 (target_alias): Use @target_noncanonical@.
2641 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2642 ACX_NONCANONICAL_HOST.
2643 * configure: Regenerated.
2644
2645 Revert:
2646 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2647
2648 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2649 * configure: Rebuild.
2650 * Makefile.in (version_host, version_target): Get from configure.
2651 (version.c): Use $(version_host) and $(version_target).
2652
17ef446e
PA
26532013-07-03 Pedro Alves <palves@redhat.com>
2654
2655 * Makefile.in (config.status): Depend on development.sh.
2656 * acinclude.m4: Include libmcheck.m4.
2657 * configure: Regenerate.
2658
7a9a7487
MG
26592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2660
2661 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2662 attribute inside the parentheses.
2663 (winapi_DebugSetProcessKillOnExit): Ditto.
2664 (winapi_DebugBreakProcess): Ditto.
2665 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2666
49b64de6
MG
26672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2668
2669 * notif.h (notif_event): Add a dummy member to avoid compiler
2670 errors.
2671
d5749ee7
PA
26722013-07-01 Pedro Alves <palves@redhat.com>
2673
2674 * hostio.c (HOSTIO_PATH_MAX): Define.
2675 (require_filename, handle_open, handle_unlink, handle_readlink):
2676 Use it.
2677
d8d2a3ee
PA
26782013-07-01 Pedro Alves <palves@redhat.com>
2679
2680 * server.h: Include "pathmax.h".
2681 * linux-low.c: Don't include sys/param.h.
2682 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2683 MAXPATHLEN.
2684 * win32-low.c: Don't include sys/param.h.
2685 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2686
bc7dea8d
PA
26872013-07-01 Pedro Alves <palves@redhat.com>
2688
2689 * event-loop.c: Don't check HAVE_UNISTD_H before including
2690 <unistd.h>.
2691 * gdbreplay.c: Likewise.
2692 * remote-utils.c: Likewise.
2693 * server.c: Likewise.
2694 * configure.ac: Don't check for unistd.h.
2695 * configure: Regenerate.
2696
d6c2da54
TT
26972013-06-28 Tom Tromey <tromey@redhat.com>
2698
2699 * Makefile.in (version.c): Use version.in, not
2700 common/version.in.
2701
257b6bec
MG
27022013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2703
2704 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2705 * configure: Rebuild.
2706 * Makefile.in (version_host, version_target): Get from configure.
2707 (version.c): Use $(version_host) and $(version_target).
2708
86ebe149
DK
27092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2710
2711 Fix trace-status to output user name without trailing colon.
2712 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2713
f30aa5af
DK
27142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2715
2716 Fix trace-status to output proper start-time and stop-time.
2717 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2718 output start time and stop time in hex as gdb expects.
2719
28a93511
YQ
27202013-06-26 Pedro Alves <pedro@codesourcery.com>
2721
2722 * tracepoint.c (build_traceframe_info_xml): Output trace state
2723 variables present in the trace buffer.
2724
01208463
TT
27252013-06-24 Tom Tromey <tromey@redhat.com>
2726
2727 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2728 create-version.sh.
2729 (version.o): Remove.
2730 * gdbreplay.c: Include version.h.
2731 (version, host_name): Don't declare.
2732 * server.h: Include version.h.
2733 (version, host_name): Don't declare.
2734
760256f9
PA
27352013-06-12 Pedro Alves <palves@redhat.com>
2736
2737 * linux-x86-low.c (linux_is_elf64): Delete global.
2738 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2739 with local linux_pid_exe_is_elf_64_file use.
2740
030031ee
PA
27412013-06-11 Pedro Alves <palves@redhat.com>
2742
2743 * linux-low.c (regset_disabled, disable_regset): New functions.
2744 (regsets_fetch_inferior_registers)
2745 (regsets_store_inferior_registers): Use them.
2746 (initialize_regsets_info); Don't allocate the disabled_regsets
2747 array here.
2748 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2749 comment.
2750
5da6eb0a
PA
27512013-06-11 Pedro Alves <palves@redhat.com>
2752
2753 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2754 xmalloc.
2755
7e5aaa09
PA
27562013-06-11 Pedro Alves <palves@redhat.com>
2757
2758 * linux-x86-low.c (initialize_low_arch): Call
2759 init_registers_x32_avx_linux.
2760
d878444c
JK
27612013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2762
2763 Fix compatibility with Android Bionic.
2764 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2765 it is not empty.
2766
3aee8918
PA
27672013-06-07 Pedro Alves <palves@redhat.com>
2768
5f2b57b5 2769 PR server/14823
3aee8918
PA
2770 * Makefile.in (OBS): Add tdesc.o.
2771 (IPA_OBJS): Add tdesc-ipa.o.
2772 (tdesc-ipa.o): New rule.
2773 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2774 interface.
2775 * linux-low.c (new_inferior): Delete.
2776 (disabled_regsets, num_regsets): Delete.
2777 (linux_add_process): Adjust to set the new per-process
2778 new_inferior flag.
2779 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2780 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2781 was a stop. When calling arch_setup, switch the current inferior
2782 to the thread that got an event.
2783 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2784 (regsets_fetch_inferior_registers)
2785 (regsets_store_inferior_registers): New regsets_info parameter.
2786 Adjust to use it.
2787 (linux_register_in_regsets): New regs_info parameter. Adjust to
2788 use it.
2789 (register_addr, fetch_register, store_register): New usrregs_info
2790 parameter. Adjust to use it.
2791 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2792 parameter regs_info. Adjust to use it.
2793 (linux_fetch_registers): Get the current inferior's regs_info, and
2794 adjust to use it.
2795 (linux_store_registers): Ditto.
2796 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2797 (initialize_low): Don't initialize the target_regsets here. Call
2798 initialize_low_arch.
2799 * linux-low.h (target_regsets): Delete declaration.
2800 (struct regsets_info): New.
2801 (struct usrregs_info): New.
2802 (struct regs_info): New.
2803 (struct process_info_private) <new_inferior>: New field.
2804 (struct linux_target_ops): Delete the num_regs, regmap, and
2805 regset_bitmap fields. New field regs_info.
2806 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2807 * i387-fp.c (num_xmm_registers): Delete.
2808 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2809 calls to new interface.
2810 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2811 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2812 Infer the number of xmm registers from the regcache's target
2813 description.
2814 * i387-fp.h (num_xmm_registers): Delete.
2815 * inferiors.c (add_thread): Don't install the thread's regcache
2816 here.
2817 * proc-service.c (gregset_info): Fetch the current inferior's
2818 regs_info. Adjust to use it.
2819 * regcache.c: Include tdesc.h.
2820 (register_bytes, reg_defs, num_registers)
2821 (gdbserver_expedite_regs): Delete.
2822 (get_thread_regcache): If the thread doesn't have a regcache yet,
2823 create one, instead of aborting gdbserver.
2824 (regcache_invalidate_one): Rename to ...
2825 (regcache_invalidate_thread): ... this.
2826 (regcache_invalidate_one): New.
2827 (regcache_invalidate): Only invalidate registers of the current
2828 process.
2829 (init_register_cache): Add target_desc parameter, and use it.
2830 (new_register_cache): Ditto. Assert the target description has a
2831 non zero registers_size.
2832 (regcache_cpy): Add assertions. Adjust.
2833 (realloc_register_cache, set_register_cache): Delete.
2834 (registers_to_string, registers_from_string): Adjust.
2835 (find_register_by_name, find_regno, find_register_by_number)
2836 (register_cache_size): Add target_desc parameter, and use it.
2837 (free_register_cache_thread, free_register_cache_thread_one)
2838 (regcache_release, register_cache_size): New.
2839 (register_size): Add target_desc parameter, and use it.
2840 (register_data, supply_register, supply_register_zeroed)
2841 (supply_regblock, supply_register_by_name, collect_register)
2842 (collect_register_as_string, collect_register_by_name): Adjust.
2843 * regcache.h (struct target_desc): Forward declare.
2844 (struct regcache) <tdesc>: New field.
2845 (init_register_cache, new_register_cache): Add target_desc
2846 parameter.
2847 (regcache_invalidate_thread): Declare.
2848 (regcache_invalidate_one): Delete declaration.
2849 (regcache_release): Declare.
2850 (find_register_by_number, register_cache_size, register_size)
2851 (find_regno): Add target_desc parameter.
2852 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2853 declarations.
2854 * remote-utils.c: Include tdesc.h.
2855 (outreg, prepare_resume_reply): Adjust.
2856 * server.c: Include tdesc.h.
2857 (gdbserver_xmltarget): Delete declaration.
2858 (get_features_xml, process_serial_event): Adjust.
2859 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2860 declare.
2861 (struct process_info) <tdesc>: New field.
2862 (ipa_tdesc): Declare.
2863 * tdesc.c: New file.
2864 * tdesc.h: New file.
2865 * tracepoint.c: Include tdesc.h.
2866 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2867 (get_context_regcache): Adjust to pass ipa_tdesc down.
2868 (do_action_at_tracepoint): Adjust to get the register cache size
2869 from the context regcache's description.
2870 (traceframe_walk_blocks): Adjust to get the register cache size
2871 from the current trace frame's description.
2872 (traceframe_get_pc): Adjust to get current trace frame's
2873 description and pass it down.
2874 (gdb_collect): Adjust to get the register cache size from the
2875 IPA's description.
2876 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2877 (gdbserver_xmltarget): Delete.
2878 (initialize_low_tracepoint): Set the ipa's target description.
2879 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2880 (initialize_low_tracepoint): Set the ipa's target description.
2881 * linux-x86-low.c: Include tdesc.h.
2882 [__x86_64__] (is_64bit_tdesc): New.
2883 (ps_get_thread_area, x86_get_thread_area): Use it.
2884 (i386_cannot_store_register): Rename to ...
2885 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2886 (i386_cannot_fetch_register): Rename to ...
2887 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2888 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2889 to new interface.
2890 (target_regsets): Rename to ...
2891 (x86_regsets): ... this.
2892 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2893 interface.
2894 (x86_siginfo_fixup): Use is_64bit_tdesc.
2895 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2896 (tdesc_x32_avx_linux, tdesc_x32_linux)
2897 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2898 Declare.
2899 (x86_linux_update_xmltarget): Delete.
2900 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2901 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2902 (AMD64_LINUX_USER64_CS): New.
2903 (x86_linux_read_description): New, based on
2904 x86_linux_update_xmltarget.
2905 (same_process_callback): New.
2906 (x86_arch_setup_process_callback): New.
2907 (x86_linux_update_xmltarget): New.
2908 (x86_regsets_info): New.
2909 (amd64_linux_regs_info): New.
2910 (i386_linux_usrregs_info): New.
2911 (i386_linux_regs_info): New.
2912 (x86_linux_regs_info): New.
2913 (x86_arch_setup): Reimplement.
2914 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2915 (x86_emit_ops): Ditto.
2916 (the_low_target): Adjust. Install x86_linux_regs_info,
2917 x86_cannot_fetch_register, and x86_cannot_store_register.
2918 (initialize_low_arch): New.
2919 * linux-ia64-low.c (tdesc_ia64): Declare.
2920 (ia64_fetch_register): Adjust.
2921 (ia64_usrregs_info, regs_info): New globals.
2922 (ia64_regs_info): New function.
2923 (the_low_target): Adjust.
2924 (initialize_low_arch): New function.
2925 * linux-sparc-low.c (tdesc_sparc64): Declare.
2926 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2927 Adjust.
2928 (sparc_arch_setup): New function.
2929 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2930 (the_low_target): Adjust.
2931 (initialize_low_arch): New function.
2932 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2933 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2934 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2935 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2936 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2937 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2938 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2939 (tdesc_powerpc_isa205_vsx64l): Declare.
2940 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2941 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2942 (ppc_set_pc, ppc_get_hwcap): Adjust.
2943 (ppc_usrregs_info): Forward declare.
2944 (!__powerpc64__) ppc_regmap_adjusted: New global.
2945 (ppc_arch_setup): Adjust to the current process'es target
2946 description.
2947 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2948 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2949 (ppc_store_evrregset): Adjust.
2950 (target_regsets): Rename to ...
2951 (ppc_regsets): ... this, and make static.
2952 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2953 (ppc_regs_info): New function.
2954 (the_low_target): Adjust.
2955 (initialize_low_arch): New function.
2956 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2957 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2958 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2959 (tdesc_s390x_linux64v2): Declare.
2960 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2961 (s390_fill_gregset, s390_store_last_break): Adjust.
2962 (target_regsets): Rename to ...
2963 (s390_regsets): ... this, and make static.
2964 (s390_get_pc, s390_set_pc): Adjust.
2965 (s390_get_hwcap): New target_desc parameter, and use it.
2966 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2967 (s390_arch_setup): Adjust to set the current process'es target
2968 description. Don't adjust the regmap.
2969 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2970 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2971 (regs_info_3264): New globals.
2972 (s390_regs_info): New function.
2973 (the_low_target): Adjust.
2974 (initialize_low_arch): New function.
2975 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2976 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2977 [__mips64] (init_registers_mips_linux)
2978 (init_registers_mips_dsp_linux): Delete defines.
2979 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2980 (have_dsp): New global.
2981 (mips_read_description): New, based on mips_arch_setup.
2982 (mips_arch_setup): Reimplement.
2983 (get_usrregs_info): New function.
2984 (mips_cannot_fetch_register, mips_cannot_store_register)
2985 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2986 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2987 (target_regsets): Rename to ...
2988 (mips_regsets): ... this, and make static.
2989 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2990 (dsp_regs_info, regs_info): New globals.
2991 (mips_regs_info): New function.
2992 (the_low_target): Adjust.
2993 (initialize_low_arch): New function.
2994 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2995 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2996 Declare.
2997 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2998 (arm_read_description): New, with bits factored from
2999 arm_arch_setup.
3000 (arm_arch_setup): Reimplement.
3001 (target_regsets): Rename to ...
3002 (arm_regsets): ... this, and make static.
3003 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3004 (arm_regs_info): New function.
3005 (the_low_target): Adjust.
3006 (initialize_low_arch): New function.
3007 * linux-m68k-low.c (tdesc_m68k): Declare.
3008 (target_regsets): Rename to ...
3009 (m68k_regsets): ... this, and make static.
3010 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3011 (m68k_regs_info): New function.
3012 (m68k_arch_setup): New function.
3013 (the_low_target): Adjust.
3014 (initialize_low_arch): New function.
3015 * linux-sh-low.c (tdesc_sharch): Declare.
3016 (target_regsets): Rename to ...
3017 (sh_regsets): ... this, and make static.
3018 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3019 (sh_regs_info, sh_arch_setup): New functions.
3020 (the_low_target): Adjust.
3021 (initialize_low_arch): New function.
3022 * linux-bfin-low.c (tdesc_bfin): Declare.
3023 (bfin_arch_setup): New function.
3024 (bfin_usrregs_info, regs_info): New globals.
3025 (bfin_regs_info): New function.
3026 (the_low_target): Adjust.
3027 (initialize_low_arch): New function.
3028 * linux-cris-low.c (tdesc_cris): Declare.
3029 (cris_arch_setup): New function.
3030 (cris_usrregs_info, regs_info): New globals.
3031 (cris_regs_info): New function.
3032 (the_low_target): Adjust.
3033 (initialize_low_arch): New function.
3034 * linux-cris-low.c (tdesc_crisv32): Declare.
3035 (cris_arch_setup): New function.
3036 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3037 (cris_regs_info): New function.
3038 (the_low_target): Adjust.
3039 (initialize_low_arch): New function.
3040 * linux-m32r-low.c (tdesc_m32r): Declare.
3041 (m32r_arch_setup): New function.
3042 (m32r_usrregs_info, regs_info): New globals.
3043 (m32r_regs_info): Adjust.
3044 (initialize_low_arch): New function.
3045 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3046 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3047 (tic6x_usrregs_info): Forward declare.
3048 (tic6x_read_description): New function, based on ...
3049 (tic6x_arch_setup): ... this. Reimplement.
3050 (target_regsets): Rename to ...
3051 (tic6x_regsets): ... this, and make static.
3052 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3053 (tic6x_regs_info): New function.
3054 (the_low_target): Adjust.
3055 (initialize_low_arch): New function.
3056 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3057 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3058 (target_regsets): Rename to ...
3059 (xtensa_regsets): ... this, and make static.
3060 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3061 globals.
3062 (xtensa_arch_setup, xtensa_regs_info): New functions.
3063 (the_low_target): Adjust.
3064 (initialize_low_arch): New function.
3065 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3066 (nios2_arch_setup): Set the current process'es tdesc.
3067 (target_regsets): Rename to ...
3068 (nios2_regsets): ... this.
3069 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3070 (nios2_regs_info): New function.
3071 (the_low_target): Adjust.
3072 (initialize_low_arch): New function.
a261b8f5
PA
3073 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3074 (aarch64_arch_setup): Set the current process'es tdesc.
3075 (target_regsets): Rename to ...
3076 (aarch64_regsets): ... this.
3077 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3078 (aarch64_regs_info): New function.
3079 (the_low_target): Adjust.
3080 (initialize_low_arch): New function.
3aee8918
PA
3081 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3082 globals.
3083 (target_regsets): Rename to ...
3084 (tile_regsets): ... this.
3085 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3086 (tile_regs_info): New function.
3087 (tile_arch_setup): Set the current process'es tdesc.
3088 (the_low_target): Adjust.
3089 (initialize_low_arch): New function.
3090 * spu-low.c (tdesc_spu): Declare.
3091 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3092 * win32-arm-low.c (tdesc_arm): Declare.
3093 (arm_arch_setup): New function.
3094 (the_low_target): Install arm_arch_setup instead of
3095 init_registers_arm.
3096 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3097 (init_windows_x86): Rename to ...
3098 (i386_arch_setup): ... this. Set `win32_tdesc'.
3099 (the_low_target): Adjust.
3100 * win32-low.c (win32_tdesc): New global.
3101 (child_add_thread): Don't create the thread cache here.
3102 (do_initial_child_stuff): Set the new process'es tdesc.
3103 * win32-low.h (struct target_desc): Forward declare.
3104 (win32_tdesc): Declare.
3105 * lynx-i386-low.c (tdesc_i386): Declare global.
3106 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3107 * lynx-low.c (lynx_tdesc): New global.
3108 (lynx_add_process): Set the new process'es tdesc.
3109 * lynx-low.h (struct target_desc): Forward declare.
3110 (lynx_tdesc): Declare global.
3111 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3112 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3113 * nto-low.c (nto_tdesc): New global.
3114 (do_attach): Set the new process'es tdesc.
3115 * nto-low.h (struct target_desc): Forward declare.
3116 (nto_tdesc): Declare.
3117 * nto-x86-low.c (tdesc_i386): Declare.
3118 (nto_x86_arch_setup): Set `nto_tdesc'.
3119
b1fbec62
GB
31202013-06-04 Gary Benson <gbenson@redhat.com>
3121
3122 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3123 to qSupported response when appropriate.
3124 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3125 with nonzero-length annex.
3126 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3127 arguments supplied in annex.
3128
d1ec4ce7
DE
31292013-05-31 Doug Evans <dje@google.com>
3130
ac44adcb 3131 PR server/15594
d1ec4ce7
DE
3132 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3133 64 bits in 64-cross-32 environment.
3134
9b25f2d3
PA
31352013-05-28 Pedro Alves <palves@redhat.com>
3136
3137 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3138 (aarch64-without-fpu.c): Delete rule.
3139 * configure.srv (aarch64*-*-linux*): Remove references to
3140 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3141 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3142 declaration.
3143
6740dc9c
PA
31442013-05-24 Pedro Alves <palves@redhat.com>
3145
3146 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3147 instead of strchr/decode_address. Error if the range isn't split
3148 with a ','. Don't assume there's be a ':' in the action.
3149
c2d6af84
PA
31502013-05-23 Yao Qi <yao@codesourcery.com>
3151 Pedro Alves <palves@redhat.com>
3152
3153 * linux-low.c (lwp_in_step_range): New function.
3154 (linux_wait_1): If the thread was range stepping and stopped
3155 outside the stepping range, report the stop to GDB. Otherwise,
3156 continue stepping. Add range stepping debug output.
3157 (linux_set_resume_request): Copy the step range from the resume
3158 request to the lwp.
3159 (linux_supports_range_stepping): New.
3160 (linux_target_ops) <supports_range_stepping>: Set to
3161 linux_supports_range_stepping.
3162 * linux-low.h (struct linux_target_ops)
3163 <supports_range_stepping>: New field.
3164 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3165 * linux-x86-low.c (x86_supports_range_stepping): New.
3166 (the_low_target) <supports_range_stepping>: Set to
3167 x86_supports_range_stepping.
3168 * server.c (handle_v_cont): Handle 'r' action.
3169 (handle_v_requests): Append ";r" if the target supports range
3170 stepping.
3171 * target.h (struct thread_resume) <step_range_start,
3172 step_range_end>: New fields.
3173 (struct target_ops) <supports_range_stepping>:
3174 New field.
3175 (target_supports_range_stepping): New macro.
3176
58794e1a
JB
31772013-05-17 Joel Brobecker <brobecker@adacore.com>
3178
3179 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3180 confusion in comment.
3181
d631c5a7
JB
31822013-05-17 Joel Brobecker <brobecker@adacore.com>
3183
3184 * lynx-low.c (struct process_info_private): New type.
3185 (lynx_add_process): New function.
3186 (lynx_create_inferior, lynx_attach): Replace calls to
3187 add_process by calls to lynx_add_process.
3188 (lynx_resume): If PTID is null, then try using
3189 current_process()->private->last_wait_event_ptid.
3190 Add comments.
3191 (lynx_clear_inferiors): Delete. The contents of that function
3192 has been inlined in lynx_mourn;
3193 (lynx_wait_1): Save the ptid in the process's private data.
3194 (lynx_mourn): Free the process' private data. Replace call
3195 to lynx_clear_inferiors by call to clear_inferiors.
3196
96f7a20f
YQ
31972013-05-17 Yao Qi <yao@codesourcery.com>
3198
3199 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3200 the right place.
3201
db0dfaa0
LM
32022013-05-16 Luis Machado <lgustavo@codesourcery.com>
3203
3204 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3205 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3206 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3207 PT_TEXT_END_ADDR guards. Update comments.
3208 (linux_target_op) <read_offsets>: Conditionally define to
3209 linux_read_offsets if the target is UCLIBC and if it defines
3210 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3211
68f5f838
SL
32122013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3213 Andrew Jenner <andrew@codesourcery.com>
3214
3215 * Makefile.in (SFILES): Add linux-nios2-low.c.
3216 (clean): Add action to delete nios2-linux.c.
3217 (nios2-linux.c): New rule.
3218 * configure.srv: Add nios2*-*-linux*.
3219 * linux-nios2-low.c: New.
3220
1ebff1fd
HAQ
32212013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3222
3223 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3224
f6150862
HZ
32252013-04-25 Hui Zhu <hui@codesourcery.com>
3226
3227 PR gdb/15186
f6150862
HZ
3228 * ax.c (ax_printf): Add fflush.
3229
614c279d
TT
32302013-04-22 Tom Tromey <tromey@redhat.com>
3231
3232 * Makefile.in (SFILES): Add filestuff.c.
3233 (OBS): Add filestuff.o.
3234 (filestuff.o): New target.
3235 * config.in, configure: Rebuild.
3236 * configure.ac: Check for fdwalk, pipe2.
3237
7d4e5717
PA
32382013-04-17 Pedro Alves <palves@redhat.com>
3239
3240 * configure.ac (USE_THREAD_DB): Delete variable.
3241 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3242 Don't AC_SUBST USE_THREAD_DB.
3243 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3244 * config.in, configure: Regenerate.
3245
d5c93e41
PA
32462013-04-16 Pedro Alves <palves@redhat.com>
3247
3248 * linux-low.h (struct lwp_info) <thread_known>: Move under
3249 the USE_THREAD_DB #ifdef.
3250
04f5fe89
PA
32512013-04-16 Pedro Alves <palves@redhat.com>
3252
3253 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3254 (linux-low.o): Delete rule.
3255 * linux-low.h: Always include "gdb_thread_db.h" instead of
3256 conditionally including thread_db.h.
3257 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3258 HAVE_THREAD_DB_H.
3259
480b27bf
JK
32602013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3261
3262 * Makefile.in (install-only): Fix make install regression.
3263
43662968
JK
32642013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3265
3266 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3267 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3268 installation.
3269 * gdbserver.1: Remove.
3270
3e74e146
PA
32712013-03-22 Pedro Alves <palves@redhat.com>
3272
3273 * linux-low.c (handle_extended_wait): Don't call
3274 linux_enable_event_reporting.
3275
a8347a2a
TT
32762013-03-15 Tony Theodore <tonyt@logyst.com>
3277
3278 PR build/9098:
3279 * Makefile.in (SHELL): Use @SHELL@.
3280
eeb56fa7
SDJ
32812013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3282
3283 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3284 compiler warning.
3285
4fa7e2ff
JB
32862013-03-13 Joel Brobecker <brobecker@adacore.com>
3287
3288 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3289 Remove extraneous NULL element.
3290
8ddb1965
YQ
32912013-03-13 Yao Qi <yao@codesourcery.com>
3292
3293 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3294 'V' block in trace frame.
3295
9accd112
MM
32962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3297
3298 * target.h (struct target_ops): Add btrace ops.
3299 (target_supports_btrace): New macro.
3300 (target_enable_btrace): New macro.
3301 (target_disable_btrace): New macro.
3302 (target_read_btrace): New macro.
3303 * gdbthread.h (struct thread_info): Add btrace field.
3304 * server.c: Include btrace-common.h.
3305 (handle_btrace_general_set): New function.
3306 (handle_btrace_enable): New function.
3307 (handle_btrace_disable): New function.
3308 (handle_general_set): Call handle_btrace_general_set.
3309 (handle_qxfer_btrace): New function.
3310 (struct qxfer qxfer_packets[]): Add btrace entry.
3311 * inferiors.c (remove_thread): Disable btrace.
3312 * linux-low: Include linux-btrace.h.
3313 (linux_low_enable_btrace): New function.
3314 (linux_low_read_btrace): New function.
3315 (linux_target_ops): Add btrace ops.
3316 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3317 Add srv_linux_btrace=yes.
3318 (x86_64-*-linux*): Add linux-btrace.o.
3319 Add srv_linux_btrace=yes.
3320 * configure.ac: Define HAVE_LINUX_BTRACE.
3321 * config.in: Regenerated.
3322 * configure: Regenerated.
3323
5cc22e4c
MM
33242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3325
3326 * server.c (handle_qxfer): Preserve error message if -3 is
3327 returned.
3328 (qxfer): Document the -3 return value.
3329
7c97f91e
MM
33302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3331
3332 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3333 (linux_btrace_h): New variable.
3334 (linux-btrace.o): New rule.
3335
be9a119c 33362013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3337 Hafiz Abid Qadeer <abidh@codesourcery.com>
3338
3339 * tracepoint.c (trace_buffer_size): New global.
3340 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3341 (init_trace_buffer): Change to one-argument function. Allocate
3342 trace buffer memory.
3343 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3344 handle QTBuffer:size packet.
3345 (cmd_bigqtbuffer_size): New function.
3346 (initialize_tracepoint): Call init_trace_buffer with
3347 DEFAULT_TRACE_BUFFER_SIZE.
3348 * server.c (handle_query): Add QTBuffer:size in the
3349 supported packets.
3350
e64f7499
YQ
33512013-03-07 Yao Qi <yao@codesourcery.com>
3352
3353 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3354 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3355 of -1.
3356 (cmd_qtsp): Adjust condition. Do post increment.
3357 Set cur_action and cur_step_action back to 0.
3358
f0ae6fc3
PA
33592013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3360
3361 PR server/15236
3362 * linux-low.c (linux_write_memory): Return early success if LEN is
3363 zero.
3364
b5b0b0af
CV
33652013-03-05 Corinna Vinschen <vinschen@redhat.de>
3366
334ad4a8 3367 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3368
589bc927
TT
33692013-02-28 Tom Tromey <tromey@redhat.com>
3370
3371 * configure.ac: Invoke AC_SYS_LARGEFILE.
3372 * configure, config.in: Rebuild.
3373
dfe07582
CV
33742013-02-28 Corinna Vinschen <vinschen@redhat.com>
3375
3376 * win32-low.c: Throughout, fix format strings and casts of
3377 printf-like functions to avoid type related warnings on all
3378 platforms.
3379 (get_child_debug_event): Print dwDebugEventCode as hex since
3380 that's how it's usually documented.
3381
736cd585
YQ
33822013-02-28 Yao Qi <yao@codesourcery.com>
3383
3384 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3385 pulongest.
3386
e1f58301
JW
33872013-02-27 Jiong Wang <jiwang@tilera.com>
3388
3389 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3390 (reg-tilegx32.c): New rule.
3391 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3392 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3393 different register info initializer according to elf class.
3394 (init_registers_tilgx32): New function. The tilegx32 register info
3395 initializer.
3396 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3397 (tile_store_gregset): Likewise.
3398
d171ca78
YQ
33992013-02-27 Yao Qi <yao@codesourcery.com>
3400
3401 * server.c (process_point_options): Print debug message when
3402 debug_threads is true.
3403
282bbdf3
YQ
34042013-02-26 Yao Qi <yao@codesourcery.com>
3405
3406 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3407
aca22551
PA
34082013-02-19 Pedro Alves <palves@redhat.com>
3409 Kai Tietz <ktietz@redhat.com>
3410
3411 PR gdb/15161
3412
3413 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3414 instead of strtoul to extract address from packet.
3415 (process_serial_event) <'z'>: Likewise.
3416
4f3cee1c
YQ
34172013-02-18 Yao Qi <yao@codesourcery.com>
3418
3419 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3420
8e1d55a3
PA
34212013-02-14 Pedro Alves <palves@redhat.com>
3422
3423 Plug memory leak.
3424
3425 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3426 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3427
458820da
PA
34282013-02-14 Pedro Alves <palves@redhat.com>
3429
3430 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3431
baea0dae
PA
34322013-02-14 Pedro Alves <palves@redhat.com>
3433
3434 * tracepoint.c (save_string): Delete.
3435 (add_tracepoint_action): Use savestring instead of save_string.
3436
0b1afbb3
PA
34372013-02-12 Pedro Alves <palves@redhat.com>
3438
3439 * linux-xtensa-low.c: Ditto.
3440 * xtensa-xtregs.c: Ditto.
3441
8a4ac37e
PA
34422013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3443
3444 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3445 thread_db.
3446
148de6bb
MS
34472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3448
3449 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3450 aarch64_num_wp_regs and aarch64_num_bp_regs to
3451 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3452
55fac6e0
MS
34532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3454
3455 * linux-aarch64-low.c (ps_get_thread_area): Replace
3456 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3457
176eb98c
MS
34582013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3459 Marcus Shawcroft <marcus.shawcroft@arm.com>
3460 Nigel Stephens <nigel.stephens@arm.com>
3461 Yufeng Zhang <yufeng.zhang@arm.com>
3462
3463 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3464 (aarch64.c, aarch64-without-fpu.c): New targets.
3465 * configure.srv (aarch64*-*-linux*): New.
3466 * linux-aarch64-low.c: New file.
3467
56f7af9c
MS
34682013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3469
43aaf8b6 3470 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3471 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3472 (dequeue_one_deferred_signal, linux_resume_one_thread)
3473 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3474 (linux_tracefork_grandchild, linux_test_for_tracefork)
3475 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3476 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3477 where the argument is 0.
3478
60f662b0
YQ
34792013-01-25 Yao Qi <yao@codesourcery.com>
3480
3481 * event-loop.c: Include "queue.h".
3482 (gdb_event_p): New typedef.
3483 (struct gdb_event) <next_event>: Remove.
3484 (event_queue): Change to QUEUE(gdb_event_p).
3485 (async_queue_event): Remove.
3486 (gdb_event_xfree): New.
3487 (initialize_event_loop): New.
3488 (process_event): Use API from QUEUE.
3489 (wait_for_event): Likewise.
3490 * server.c (main): Call initialize_event_loop.
3491 * server.h (initialize_event_loop): Declare.
3492
5ae4861a
YQ
34932013-01-18 Yao Qi <yao@codesourcery.com>
3494
3495 * ax.h (struct eval_agent_expr_context): New.
3496 (gdb_eval_agent_expr): Update declaration.
3497 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3498 TFRAME. Add new argument CTX.
3499 * server.h (struct eval_agent_expr_context): Declare.
3500 (agent_mem_read, agent_tsv_read): Update declaration.
3501 (agent_mem_read_string): Likewise.
3502 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3503 (add_traceframe_block): Add new argument TPOINT.
3504 Increase TPOINT->traceframe_usage.
3505 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3506 eval_tracepoint_agent_expr.
3507 (condition_true_at_tracepoint): Likewise.
3508 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3509 (agent_mem_read_string, agent_tsv_read): Likewise.
3510
85e00e85
YQ
35112013-01-16 Yao Qi <yao@codesourcery.com>
3512
3513 * linux-low.c (linux_resume_one_lwp): Don't check
3514 'lwp->bp_reinsert != 0'.
3515
4039cf45
JB
35162013-01-07 Joel Brobecker <brobecker@adacore.com>
3517 Pedro Alves <palves@redhat.com>
3518
3519 * lynx-low.c (ptrace_request_to_str): Define a temporary
3520 macro and use it to simplify this function's implementation.
3521
9044dee2
JB
35222013-01-07 Joel Brobecker <brobecker@adacore.com>
3523
3524 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3525 sets errno.
3526
e6352c8f
JB
35272013-01-07 Joel Brobecker <brobecker@adacore.com>
3528
3529 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3530
50681a27
JB
35312013-01-07 Joel Brobecker <brobecker@adacore.com>
3532
3533 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3534
3f6e77ef
JB
35352013-01-07 Joel Brobecker <brobecker@adacore.com>
3536
3537 * lynx-low.c (lynx_resume): Use the resume_info parameter
3538 to determine the ptid for the lynx_ptrace call, unless
3539 it is equal to minus_one_ptid, in which case we use the
3540 ptid of the current_inferior.
3541 (lynx_wait_1): After having received a thread create/exit
3542 event, resume the inferior's execution using the signaling
3543 thread's ptid, rather than the old ptid.
3544
7fda33ae
JB
35452013-01-07 Joel Brobecker <brobecker@adacore.com>
3546
3547 * lynx-low.c (lynx_resume): Delete variable ret.
3548
b9786c74
JB
35492013-01-01 Joel Brobecker <brobecker@adacore.com>
3550
3551 * gdbreplay.c (gdbreplay_version): Update copyright year.
3552 * server.c (gdbserver_version): Likewise.
3553
8b93d60f
JB
35542012-12-17 Joel Brobecker <brobecker@adacore.com>
3555
3556 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3557 new thread.
3558
037335a7
JB
35592012-12-17 Joel Brobecker <brobecker@adacore.com>
3560
3561 * lynx-low.c (ptrace_request_to_str): Add handling for
3562 PTRACE_GETTRACESIG.
3563
52d4cbd8
JB
35642012-12-17 Joel Brobecker <brobecker@adacore.com>
3565
3566 * lynx-low.c (lynx_attach): Delete variable new_process.
3567
ab8f6ca9
JB
35682012-12-17 Joel Brobecker <brobecker@adacore.com>
3569
3570 * lynx-low.c (lynx_create_inferior): Delete variable
3571 new_process.
3572
78cbc024
JB
35732012-12-17 Joel Brobecker <brobecker@adacore.com>
3574
3575 * lynx-low.c (ptrace_request_to_str): Do not handle
3576 PTRACE_GETTHREADLIST if this macro does not exist.
3577
14a00470
YQ
35782012-12-15 Yao Qi <yao@codesourcery.com>
3579
3580 * Makefile.in (OBS): Add notif.o.
3581 * notif.c, notif.h: New.
3582 * server.c: Include "notif.h".
3583 (struct vstop_notif) <next>: Remove.
3584 <base>: New field.
3585 (queue_stop_reply): Update.
3586 (push_event, send_next_stop_reply): Remove.
3587 (discard_queued_stop_replies): Update.
3588 (notif_stop): New variable.
3589 (handle_v_stopped): Remove.
3590 (handle_v_requests): Don't call handle_v_stopped. Call
3591 handle_ack_notif instead.
3592 (queue_stop_reply_callback): Call notif_event_enque instead
3593 of queue_stop_reply.
3594 (handle_status): Don't call send_next_stop_reply, call
3595 notif_write_event instead.
3596 (kill_inferior_callback): Likewise.
3597 (detach_or_kill_inferior_callback): Likewise.
3598 (main): Call initialize_notif.
3599 (process_serial_event): Call QUEUE_is_empty.
3600 (handle_target_event): Call notif_push instead of push event.
3601 * server.h (push_event): Remove declaration.
3602
61c125b9
TT
36032012-12-10 Tom Tromey <tromey@redhat.com>
3604
3605 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3606 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3607 macros.
3608 (.c.o): Rewrite.
3609 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3610 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3611 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3612 (amd64-linux-ipa.o, ax.o): Rewrite.
3613 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3614 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3615 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3616 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3617 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3618 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3619 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3620 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3621 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3622 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3623 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3624 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3625 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3626 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3627 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3628 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3629 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3630 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3631 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3632 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3633 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3634 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3635 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3636 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3637 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3638 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3639 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3640 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3641 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3642 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3643 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3644 (reg-tilegx.o): Remove.
3645 (all_object_files): New macro.
3646 Include .deps files.
3647 * aclocal.m4, configure: Rebuild.
3648 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3649 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3650 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3651
e90e9ad9
TT
36522012-12-05 Tom Tromey <tromey@redhat.com>
3653
3654 PR gdb/14917:
3655 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3656
02d403bf 36572012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3658
3659 * configure.ac: Check for linux/perf_event.h.
3660 * config.in: Regenerated.
3661 * configure: Regenerated.
3662
0270a750
PA
36632012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3664
3665 * hostio.c (handle_readlink): Decrease buffer size
3666 parameter passed to readlink by one byte.
3667
8c29b58e
YQ
36682012-11-26 Yao Qi <yao@codesourcery.com>
3669
3670 * configure.ac (build_warnings): Append '-Wempty-body'.
3671 * configure: Regenerated.
3672 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3673 body.
3674
8bdce1ff
PM
36752012-11-15 Pierre Muller <muller@sourceware.org>
3676
3677 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3678 * config.in: Regenerate.
3679 * configure: Regenerate.
3680 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3681 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3682 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3683 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3684 header.
3685 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3686 instead of <sys/wait.h> header.
3687 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3688
02d403bf 36892012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3690
3691 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3692 (various make rules): Remove -DGDBSERVER
3693
fbd5db48
YQ
36942012-11-09 Yao Qi <yao@codesourcery.com>
3695
3696 * spu-low.c (current_ptid): Move it to ..
3697 * gdbthread.h: ... here. New.
3698 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3699 * server.c (myresume, process_serial_event): Likewise.
3700 * thread-db.c (thread_db_find_new_threads): Likewise.
3701 * tracepoint.c (run_inferior_command): Likewise.
3702
b3dc46ff
AB
37032012-10-01 Andrew Burgess <aburgess@broadcom.com>
3704
3705 * server.c (handle_search_memory_1): Include access length in
3706 warning message.
3707
07c04788
HPN
37082012-09-05 Michael Brandt <michael.brandt@axis.com>
3709
3710 * linux-crisv32-low.c: Fix compile errors.
3711
918d227b
YQ
37122012-09-04 Yao Qi <yao@codesourcery.com>
3713
3714 * tracepoint.c (cmd_qtsv): Adjust debug message.
3715 Don't check CUR_TPOINT.
3716
18c1b81a
YQ
37172012-08-28 Yao Qi <yao@codesourcery.com>
3718
3719 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3720 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3721 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3722 Remove declarations of xmalloc, xreallloc, xstrdup and
3723 freeargv.
3724 * Makefile.in (libiberty_h): New.
3725 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3726 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3727
dc82f37b
YQ
37282012-08-23 Yao Qi <yao@codesourcery.com>
3729
3730 * server.h: Remove declaration of 'xsnprintf'.
3731
406b1477
KS
37322012-08-22 Keith Seitz <keiths@redhat.com>
3733
3734 * server.h: Include build-gnulib-gbserver/config.h.
3735 * gdbreplay.c: Likewise.
3736
e6712ff1
DE
37372012-08-08 Doug Evans <dje@google.com>
3738
3739 * Makefile.in (SFILES): Add gdb_vecs.c.
3740 (OBS): Add gdb_vecs.o.
3741 (gdb_vecs_h, host_defs_h): New variables.
3742 (thread-db.o): Add $(gdb_vecs_h) dependency.
3743 (gdb_vecs.o): New rule.
3744 * thread-db.c: #include "gdb_vecs.h".
3745 (thread_db_load_search): Use a vector to iterate over path elements.
3746 Handle text appearing after "$pdir".
3747
3748 * configure.ac: Add check for strstr.
3749 * config.in: Regenerate.
3750 * configure: Regenerate.
3751
7c3270ae
UW
37522012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3753
3754 * hostio.c (handle_pread): If pread fails, fall back to attempting
3755 lseek/read.
3756 (handle_pwrite): Likewise for pwrite.
3757
b62e2b27
UW
37582012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3759
3760 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3761 between unsupported TYPE and unimplementable ADDR/LEN combination.
3762 (arm_insert_point): Act on new return value.
3763
78a99e91
PA
37642012-07-31 Pedro Alves <palves@redhat.com>
3765
3766 * server.c (process_point_options): Only skip tokens if we find
3767 one that is unrecognized. Don't treat 'X' specially while
3768 skipping unrecognized tokens.
3769
fcf303ab
UW
37702012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3771
3772 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3773 to 4-byte-align HW breakpoint addresses for Thumb.
3774
7255706c
YQ
37752012-07-27 Yao Qi <yao@codesourcery.com>
3776
3777 PR remote/14161.
3778
3779 * server.h: Declare gdb_agent_about_to_close.
3780 * target.c (kill_inferior): Include "agent.h".
3781 New. Send command 'kill'.
3782 * target.h (kill_inferior): Removed macro.
3783 * tracepoint.c (gdb_agent_about_to_close): New.
3784 (gdb_agent_helper_thread): Handle command 'close'.
3785 Wait endlessly until the inferior stops.
3786 Install gdb_agent_remove_socket to atexit hook.
3787 (agent_socket_name): New static variable.
3788 (gdb_agent_socket_init): Replace local variable 'name' with
3789 'agent_socket_name'.
3790 (gdb_agent_remove_socket): New.
3791
5a3f286f
YQ
37922012-07-27 Yao Qi <yao@codesourcery.com>
3793
3794 * server.c (process_point_options): Stop at 'X' when parsing.
3795
961bd387
ME
37962012-07-19 Michael Eager <eager@eagercon.com>
3797
a261b8f5 3798 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3799 to hw_execute.
3800 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3801 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3802 hardware breakpoint.
3803
aa7c7447
JK
38042012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3805
3806 * gdbserver/linux-low.c (initialize_low): Call
3807 linux_ptrace_init_warnings.
3808
7f216e7c
DE
38092012-07-02 Doug Evans <dje@google.com>
3810
3811 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3812 pointer to int.
3813
d3ce09f5
SS
38142012-07-02 Stan Shebs <stan@codesourcery.com>
3815
3816 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3817 (ax.o): Add it to build rule.
3818 (ax-ipa.o): Ditto.
3819 (OBS): Add format.o.
3820 (IPA_OBS): Add format.o.
3821 * server.c (handle_query): Claim support for breakpoint commands.
3822 (process_point_options): Add command case.
3823 (process_serial_event): Leave running if there are printfs in
3824 effect.
3825 * mem-break.h (any_persistent_commands): Declare.
3826 (add_breakpoint_commands): Declare.
3827 (gdb_no_commands_at_breakpoint): Declare.
3828 (run_breakpoint_commands): Declare.
3829 * mem-break.c (struct point_command_list): New struct.
3830 (struct breakpoint): New field command_list.
3831 (any_persistent_commands): New function.
3832 (add_commands_to_breakpoint): New function.
3833 (add_breakpoint_commands): New function.
3834 (gdb_no_commands_at_breakpoint): New function.
3835 (run_breakpoint_commands): New function.
3836 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3837 locally.
3838 * ax.c: Include format.h.
3839 (ax_printf): New function.
3840 (gdb_eval_agent_expr): Add printf opcode.
3841
2f8f6aed
YQ
38422012-06-13 Yao Qi <yao@codesourcery.com>
3843
3844 * server.c (start_inferior): Remove duplicated writes to fields
3845 'last_resume_kind' and 'last_status' of 'current_inferior'.
3846
0c9070b3
YQ
38472012-06-12 Yao Qi <yao@codesourcery.com>
3848 Pedro Alves <palves@redhat.com>
3849
3850 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3851 comment.
3852 * server.c (handle_v_cont): Extend comment.
3853
c52daf70
YQ
38542012-06-11 Yao Qi <yao@codesourcery.com>
3855
3856 * linux-low.c (linux_attach): Add 'static'.
3857
d38bbb0a
YQ
38582012-06-06 Yao Qi <yao@codesourcery.com>
3859
3860 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3861
89dc0afd
JK
38622012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3863
3864 Fix gcc -flto compilation warning.
3865 * server.c (main): Make variable multi_mode and attach volatile.
3866
75f62ce7
TJB
38672012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3868
3869 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3870 if the platform doesn't know about it.
3871
65f479b6
PA
38722012-05-30 Jeff Kenton <jkenton@tilera.com>
3873
3874 * Makefile.in (SFILES): Add linux-tile-low.c.
3875 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3876 * configure.srv: Handle tilegx-*-linux*.
3877 * linux-tile-low.c: New file.
3878
0c5bf5a9
JK
38792012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3880
3881 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3882
a493e3e2
PA
38832012-05-24 Pedro Alves <palves@redhat.com>
3884
3885 PR gdb/7205
3886
43aaf8b6 3887 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3888
2ea28649
PA
38892012-05-24 Pedro Alves <palves@redhat.com>
3890
3891 PR gdb/7205
3892
3893 Replace target_signal with gdb_signal throughout.
3894
8d409d16
MR
38952012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3896
3897 * linux-low.c (linux_store_registers): Avoid the copying sequence
3898 when no data has been retrieved by ptrace.
3899
23512c01
MGD
39002012-05-22 Will Deacon <will.deacon@arm.com>
3901
3902 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3903 Include asm/ptrace.h.
3904 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3905 already defined.
3906
4934b29e
MR
39072012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3908
3909 * linux-low.c (linux_store_registers): Don't re-retrieve data
3910 with ptrace that has already been obtained from /proc. Always
3911 copy any data retrieved with ptrace to the buffer supplied.
3912
bde24c0a
PA
39132012-05-11 Yao Qi <yao@codesourcery.com>
3914 Pedro Alves <palves@redhat.com>
3915
3916 * linux-low.c (enum stopping_threads_kind): New.
3917 (stopping_threads): Change type to `enum stopping_threads_kind'.
3918 (handle_extended_wait): If stopping and suspending threads, leave
3919 the new_lwp suspended too.
3920 (linux_wait_for_event): Adjust.
3921 (stop_all_lwps): Set `stopping_threads' to
3922 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3923 whether we're suspending threads or just stopping them. Assert no
3924 recursion happens.
3925
623b6bdf
YQ
39262012-04-29 Yao Qi <yao@codesourcery.com>
3927
3928 * server.h: Move some code to ...
3929 * gdbthread.h: ... here. New.
3930 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3931 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3932 (nto-low.o, win32-low.o): Likewise.
3933 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3934 * regcache.c, remote-utils.c, server.c: Likewise.
3935 * target.c, tracepoint.c, win32-low.c: Likewise.
3936
f15f9948
TJB
39372012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3938
3939 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3940 (PTRACE_ARG4_TYPE): Likewise.
3941 (PTRACE_XFER_TYPE): Likewise.
3942 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3943 ptrace to PTRACE_ARG3_TYPE.
3944 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3945 (PTRACE_ARG4_TYPE): Likewise.
3946 (PTRACE_XFER_TYPE): Likewise.
3947 (linux_detach_one_lwp): Cast fourth argument of
3948 ptrace to long then PTRACE_ARG4_TYPE.
3949 (regsets_fetch_inferior_registers): Cast third argument of
3950 ptrace to long then PTRACE_ARG3_TYPE.
3951 (regsets_store_inferior_registers): Likewise.
3952
38ea300a
PA
39532012-04-20 Pedro Alves <palves@redhat.com>
3954
3955 * configure: Regenerate.
3956
c971b7fa
PA
39572012-04-19 Pedro Alves <palves@redhat.com>
3958
43aaf8b6 3959 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3960 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3961 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3962 (all, install-only, uninstall, clean-info, all-lib, clean): No
3963 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3964 (maintainer-clean realclean distclean): Use subdir_do.
3965 (subdir_do): New.
3966 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3967 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3968 * acinclude.m4: Include acx_configure_dir.m4.
3969 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3970 calls. Call AC_PROG_RANLIB. Configure gnulib using
3971 ACX_CONFIGURE_DIR.
3972 (GNULIB): New.
3973 (GNULIB_STDINT_H): Adjust.
3974 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3975 * gdbreplay.c: Include build-gnulib/config.h.
3976 * server.h: Likewise.
3977 * aclocal.m4: Regenerate.
3978 * config.in: Regenerate.
3979 * configure: Regenerate.
c971b7fa 3980
809277f8
PA
39812012-04-19 Pedro Alves <palves@redhat.com>
3982
3983 * Makefile.in (LIBGNU, INCGNU): Adjust.
3984 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3985 (all, install-only, uninstall, clean-info, all-lib, clean)
3986 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3987 * configure.ac: Adjust AC_OUTPUT output.
3988 * aclocal.m4: Regenerate.
3989 * configure: Regenerate.
3990
fd9bb8b8
PA
39912012-04-19 Pedro Alves <palves@redhat.com>
3992
3993 * Makefile.in (generated_files): New.
3994 (server_h): Remove the explicit dependency on config.h, and depend
3995 on $generated_files.
3996
1c298c66
PA
39972012-04-19 Pedro Alves <palves@redhat.com>
3998
3999 * Makefile.in (INCGNU): Add -Ignulib.
4000
57c4b50b
PA
40012012-04-19 Pedro Alves <palves@redhat.com>
4002
4003 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4004 (INCGNU): ... this, and spell out -I here.
4005 (GNULIB_LIB): Rename to ...
4006 (LIBGNU): ... this.
4007 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4008
1030e047
PA
40092012-04-19 Pedro Alves <palves@redhat.com>
4010
4011 * config.in: Regenerate.
4012
447d4319
PA
40132012-04-19 Pedro Alves <palves@redhat.com>
4014
4015 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4016 * server.h (memmem): Remove declaration.
4017 * config.in: Regenerate.
4018 * configure: Regenerate.
4019
aad9eab9
YQ
40202012-04-19 Yao Qi <yao@codesourcery.com>
4021
4022 * Makefile.in (SFILES): Add common/vec.c.
4023 (OBS): Add vec.o.
4024 (vec.o): New rule.
4025
3e10640f
YQ
40262012-04-19 Yao Qi <yao@codesourcery.com>
4027
4028 * remote-utils.c (prepare_resume_reply): Replace with macro
4029 target_core_of_thread.
4030 * server.c (handle_qxfer_threads_proper): Likewise.
4031 * target.h (traget_core_of_thread): New macro.
4032
71622373
PA
40332012-04-18 Pedro Alves <palves@redhat.com>
4034
4035 * aclocal.m4: Regenerate.
4036 * configure: Regenerate.
4037
80d26939
YQ
40382012-04-16 Yao Qi <yao@codesourcery.com>
4039
4040 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4041 duplicated on address.
4042
42476b70
YQ
40432012-04-16 Yao Qi <yao@codesourcery.com>
4044
4045 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4046 (struct tracepoint_action_ops) <send>: New field.
4047 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4048 (agent_expr_send, x_tracepoint_action_send): New.
4049 (l_tracepoint_action_send): New.
4050 (cmd_qtdp): Download and install tracepoint
4051 according to `use_agent'.
4052 (run_inferior_command): Add one more parameter `len'.
4053 Update callers.
4054 (tracepoint_send_agent): New.
4055 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4056
7bc83639
YQ
40572012-04-16 Yao Qi <yao@codesourcery.com>
4058
4059 * tracepoint.c (download_tracepoints): Moved to ...
4060 (cmd_qtstart): ... here.
4061
5f18041e
YQ
40622012-04-14 Yao Qi <yao@codesourcery.com>
4063
4064 * tracepoint.c: Include inttypes.h.
4065 (struct collect_memory_action): Use sized types.
4066 (struct tracepoint): Likewise.
4067 (cmd_qtdp, stop_tracing): Update print specifiers.
4068 (cmd_qtp, response_tracepoint): Likewise.
4069 (collect_data_at_tracepoint): Likewise.
4070 (collect_data_at_step): Likewise.
4071
55a8c076
YQ
40722012-04-14 Yao Qi <yao@codesourcery.com>
4073
4074 Import gnulib module inttypes.
4075 * aclocal.m4, config.in, configure: Regenerated.
4076
dc750257
YQ
40772012-04-14 Yao Qi <yao@codesourcery.com>
4078
4079 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4080 Makefile and config.status at last.
4081
0ab5faf9
YQ
40822012-04-13 Yao Qi <yao@codesourcery.com>
4083
4084 * tracepoint.c: Include stdint.h unconditionally.
4085
18f5fd81
TJB
40862012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4087
4088 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4089 on BFD_HAVE_SYS_PROCFS_TYPE.
4090 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4091 * configure: Regenerate.
4092 * config.in: Likewise.
4093
4d47af5c
L
40942012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4095
4096 * Makefile.in (clean): Also remove x32.c x32-linux.c
4097 x32-avx.c x32-avx-linux.c.
4098 (x32.o): New target.
4099 (x32.c): Likewise.
4100 (x32-linux.o): Likewise.
4101 (x32-linux.c): Likewise.
4102 (x32-avx.o): Likewise.
4103 (x32-avx.c): Likewise.
4104 (x32-avx-linux.o): Likewise.
4105 (x32-avx-linux.c): Likewise.
4106
4107 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4108 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4109 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4110 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4111 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4112 i386/x32-avx-linux.xml.
4113
4114 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4115 (init_registers_x32_avx_linux): Likwise.
4116 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4117 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4118
ecedbe58
PA
41192012-04-13 Pedro Alves <palves@redhat.com>
4120
4121 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4122 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4123 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4124 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4125 the sub-make.
4126
c92b5177
L
41272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4128
4129 * linux-x86-low.c (compat_x32_clock_t): New.
4130 (compat_x32_siginfo_t): Likewise.
4131 (compat_x32_siginfo_from_siginfo): Likewise.
4132 (siginfo_from_compat_x32_siginfo): Likewise.
4133 (linux_is_elf64): Likewise.
4134 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4135 and siginfo_from_compat_x32_siginfo for x32.
4136 (x86_arch_setup): Set linux_is_elf64.
4137
214d508e
L
41382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4139
4140 PR gdb/13969
4141 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4142 e_machine field.
4143 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4144 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4145 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4146 compatible with process.
4147
c9a1864a
YQ
41482012-04-12 Yao Qi <yao@codesourcery.com>
4149
4150 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4151 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4152 (install-only, install-info, clean): Handle sub dir gnulib.
4153 (all-lib, am--refresh): New targets.
4154 (memmem.o): Remove target.
4155 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4156 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4157 (AC_REPLACE_FUNCS): Remove memmem.
4158 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4159 (AC_OUTPUT): Generate Makefile in gnulib/.
4160 * aclocal.m4, config.in, configure: Regenerated.
4161
367ba2c2
MR
41622012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4163
4164 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4165
9d236627
PA
41662012-04-05 Pedro Alves <palves@redhat.com>
4167
4168 -Werror=strict-aliasing
4169
4170 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4171 pointer.
4172
111217b3
PA
41732012-04-04 Pedro Alves <palves@redhat.com>
4174
4175 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4176 (sparc_store_gregset_from_stack, sparc_store_gregset)
4177 (sparc_breakpoint_at): Fix formatting.
4178
8365dcf5
TJB
41792012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4180
4181 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4182 are available.
4183 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4184 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4185 * config.in: Regenerate.
4186 * configure: Likewise.
4187
689cc2ae
PA
41882012-03-29 Pedro Alves <palves@redhat.com>
4189
4190 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4191 Correct ptrace arguments.
4192
c14dfd32
PA
41932012-03-28 Pedro Alves <palves@redhat.com>
4194
4195 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4196 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4197 (IA64_FR1_REGNUM): New defines.
4198 (ia64_fetch_register): New.
4199 (the_low_target): Install it.
4200 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4201 field.
4202 * linux-low.c (linux_fetch_registers): Try the
4203 the_low_target.fetch_register hook first.
4204
4205 * linux-arm-low.c (the_low_target): Adjust.
4206 * linux-bfin-low.c (the_low_target): Adjust.
4207 * linux-cris-low.c (the_low_target): Adjust.
4208 * linux-crisv32-low.c (the_low_target): Adjust.
4209 * linux-m32r-low.c (the_low_target): Adjust.
4210 * linux-m68k-low.c (the_low_target): Adjust.
4211 * linux-mips-low.c (the_low_target): Adjust.
4212 * linux-ppc-low.c (the_low_target): Adjust.
4213 * linux-s390-low.c (the_low_target): Adjust.
4214 * linux-sh-low.c (the_low_target): Adjust.
4215 * linux-sparc-low.c (the_low_target): Adjust.
4216 * linux-tic6x-low.c (the_low_target): Adjust.
4217 * linux-x86-low.c (the_low_target): Adjust.
4218 * linux-xtensa-low.c (the_low_target): Adjust.
4219
63c88e13
PA
42202012-03-26 Pedro Alves <palves@redhat.com>
4221
4222 * server.c (handle_qxfer_libraries): Don't bail early if
4223 the_target->qxfer_libraries_svr4 is not NULL.
4224
fb723180
PA
42252012-03-26 Pedro Alves <palves@redhat.com>
4226
4227 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4228
0afae3cf
PA
42292012-03-23 Pedro Alves <palves@redhat.com>
4230
4231 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4232 "library-list-svr4" element's start tag when the the DSO list is
4233 empty.
4234
485f1ee4
PA
42352012-03-23 Pedro Alves <palves@redhat.com>
4236
4237 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4238 a variable whose type size is the same as the inferior's pointer
4239 size.
4240
a5362b9a
TS
42412012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4242
4243 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4244 struct siginfo.
4245 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4246 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4247 * linux-low.h: Include <signal.h>.
4248 (struct siginfo): Remove forward declaration.
4249 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4250 struct siginfo.
4251
d226c142
MF
42522012-03-21 Mike Frysinger <vapier@gentoo.org>
4253
4254 * .gitignore: Ignore more files.
4255
122f36ef
PA
42562012-03-19 Pedro Alves <palves@redhat.com>
4257 Jan Kratochvil <jan.kratochvil@redhat.com>
4258
4259 * server.c (cont_thread, general_thread): Add describing comments.
4260 (start_inferior): Clear `cont_thread'.
4261 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4262 of a process.
4263
fc3e5175
YQ
42642012-03-15 Yao Qi <yao@codesourcery.com>
4265
4266 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4267 handling to ...
4268 (cmd_qtdp): ... here.
4269
8d0d92cd
YQ
42702012-03-15 Yao Qi <yao@codesourcery.com>
4271
4272 * tracepoint.c (struct tracepoint_action_ops): New.
4273 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4274 (m_tracepoint_action_download): New.
4275 (r_tracepoint_action_download): New.
4276 (x_tracepoint_action_download): New.
4277 (l_tracepoint_action_download): New.
4278 (add_tracepoint_action): Install `action->ops' according type.
4279 (download_tracepoint_1): Move code `download' function pointer
4280 of various tracepoint_action_ops.
4281
87b0bb13
JK
42822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4283
4284 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4285 linux_ptrace_attach_warnings.
4286
5f572dec
JK
42872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4288
4289 * Makefile.in (linux-ptrace.o): New.
4290 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4291 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4292 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4293 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4294 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4295 of these targets.
4296 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4297
f4647387
YQ
42982012-03-08 Yao Qi <yao@codesourcery.com>
4299 Pedro Alves <palves@redhat.com>
4300
4301 Fix PR server/13392.
4302 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4303 offset of JMP insn.
4304 * tracepoint.c (remove_tracepoint): New.
4305 (cmd_qtdp): Call remove_tracepoint when failed to install.
4306
9b224c5e
PA
43072012-03-07 Pedro Alves <palves@redhat.com>
4308
4309 * linux-low.c (get_detach_signal): New.
4310 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4311 Pass on pending signals to PTRACE_DETACH. Check the result of the
4312 ptrace call.
4313 * server.c (program_signals, program_signals_p): New.
4314 (handle_general_set): Handle QProgramSignals.
4315 * server.h (program_signals, program_signals_p): Declare.
4316
e237a7e2
JK
43172012-03-05 Pedro Alves <palves@redhat.com>
4318 Jan Kratochvil <jan.kratochvil@redhat.com>
4319
4320 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4321 New comment why.
4322
5808517f
YQ
43232012-03-03 Yao Qi <yao@codesourcery.com>
4324
4325 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4326 agent_look_up_symbols.
4327
58b4daa5
YQ
43282012-03-03 Yao Qi <yao@codesourcery.com>
4329
4330 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4331 (linux-x86-low.o): Likewise.
4332 * server.h: Remove in_process_agent_loaded.
4333 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4334 common/agent.c.
4335 Update callers.
4336
8ffcbaaf
YQ
43372012-03-03 Yao Qi <yao@codesourcery.com>
4338
4339 * tracepoint.c (gdb_agent_capability): New global.
4340 (in_process_agent_loaded_ust): Renamed to
4341 `in_process_agent_supports_ust'.
4342 Update callers.
4343 (in_process_agent_supports_ust): Call agent_capability_check.
4344 (clear_installed_tracepoints): Assert that agent supports
4345 agent.
4346
d1feda86
YQ
43472012-03-03 Yao Qi <yao@codesourcery.com>
4348
4349 * linux-low.c (linux_supports_agent): New.
4350 (linux_target_ops): Initialize field `supports_agent' with
4351 linux_supports_agent.
4352 * target.h (struct target_ops) <supports_agent>: New.
4353 (target_supports_agent): New macro.
4354 * server.c (handle_general_set): Handle packet 'QAgent'.
4355 (handle_query): Send `QAgent+'.
4356 * Makefile.in (server.o): Depends on agent.h.
4357
2fa291ac
YQ
43582012-03-03 Yao Qi <yao@codesourcery.com>
4359
4360 * Makefile.in (OBS): Add agent.o.
4361 Add new rule for agent.o.
4362 Track dependence of tracepoint.c on agent.h.
4363 * tracepoint.c (run_inferior_command_1):
4364 (run_inferior_command): Call agent_run_command.
4365 (gdb_ust_connect_sync_socket): Deleted. Move it to
4366 common/agent.c.
4367 (resume_thread, stop_thread): Likewise.
4368 (gdb_ust_socket_init): Renamed to ...
4369 (gdb_agent_socket_init): ... New.
4370 (gdb_ust_thread): Renamed to ...
4371 (gdb_agent_helper_thread): ... New.
4372 (gdb_ust_init): Move some code to ...
4373 (gdb_agent_init): ... here. New.
4374 [HAVE_UST]: Call gdb_ust_init.
4375 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4376 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4377 * config.in, configure: Regenerated.
4378
05044653
PA
43792012-03-02 Pedro Alves <palves@redhat.com>
4380
4381 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4382 * linux-low.c (struct simple_pid_list): New.
4383 (stopped_pids): New a struct simple_pid_list pointer.
4384 (add_to_pid_list, pull_pid_from_list): New.
4385 (handle_extended_wait): Don't assume the first signal new children
4386 report is SIGSTOP. Adjust call to pull_pid_from_list.
4387 (linux_wait_for_lwp): Adjust.
4388
8d00225b
YQ
43892012-03-02 Yao Qi <yao@codesourcery.com>
4390
4391 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4392 debug log.
4393
19560ba5
YQ
43942012-03-02 Yao Qi <yao@codesourcery.com>
4395
4396 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4397 `stop_pc' and `tpoint'. Update caller.
4398
1faeff08
MR
43992012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4400
4401 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4402 * linux-low.c (use_linux_regsets): New macro.
4403 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4404 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4405 (linux_register_in_regsets): New function.
4406 (usr_fetch_inferior_registers): Skip registers covered by
4407 regsets.
4408 (usr_store_inferior_registers): Likewise.
4409 (usr_fetch_inferior_registers): New macro.
4410 (usr_store_inferior_registers): Likewise.
4411 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4412 (linux_store_registers): Likewise.
4413 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4414 prototype.
4415 (init_registers_mips64_dsp_linux): Likewise.
4416 (init_registers_mips_linux): New macro.
4417 (init_registers_mips_dsp_linux): Likewise.
4418 (mips_dsp_num_regs): Likewise.
4419 (DSP_BASE, DSP_CONTROL): New fallback macros.
4420 (mips_base_regs): New macro.
4421 (mips_regmap): Use it. Fix the size.
4422 (mips_dsp_regmap): New variable.
4423 (mips_dsp_regset_bitmap): Likewise.
4424 (mips_arch_setup): New function.
4425 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4426 than mips_regmap.
4427 (mips_cannot_store_register): Likewise.
4428 (the_low_target): Update .arch_setup, .num_regs and .regmap
4429 initializers. Add .regset_bitmap initializer.
4430 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4431 initializer.
4432 * linux-bfin-low.c (the_low_target): Likewise.
4433 * linux-cris-low.c (the_low_target): Likewise.
4434 * linux-crisv32-low.c (the_low_target): Likewise.
4435 * linux-ia64-low.c (the_low_target): Likewise.
4436 * linux-m32r-low.c (the_low_target): Likewise.
4437 * linux-m68k-low.c (the_low_target): Likewise.
4438 * linux-ppc-low.c (the_low_target): Likewise.
4439 * linux-s390-low.c (the_low_target): Likewise.
4440 * linux-sh-low.c (the_low_target): Likewise.
4441 * linux-sparc-low.c (the_low_target): Likewise.
4442 * linux-tic6x-low.c (the_low_target): Likewise.
4443 * linux-x86-low.c (the_low_target): Likewise.
4444 * linux-xtensa-low.c (the_low_target): Likewise.
4445 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4446 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4447 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4448 srv_xmlfiles.
4449 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4450 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4451
c03e6ccc
YQ
44522012-02-29 Yao Qi <yao@codesourcery.com>
4453 Pedro Alves <palves@redhat.com>
4454
4455 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4456 `step_over_finished' is true.
4457
644cebc9
PA
44582012-02-27 Pedro Alves <palves@redhat.com>
4459
4460 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4461 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4462
c14d7ab2
PA
44632012-02-27 Pedro Alves <palves@redhat.com>
4464
4465 PR server/9684
4466 * linux-low.c (pid_is_stopped): New.
4467 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4468
412c89dd
LM
44692012-02-25 Luis Machado <lgustavo@codesourcery.com>
4470
4471 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4472 of conditions.
4473
b745defe
MR
44742012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4475
4476 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4477
9f3a5c85
LM
44782012-02-24 Luis Machado <lgustavo@codesourcery>
4479
4480 * server.c (handle_query): Advertise support for target-side
4481 breakpoint condition evaluation.
4482 (process_point_options): New function.
4483 (process_serial_event): When inserting a breakpoint, check for
4484 a target-side condition that should be evaluated.
4485
4486 * mem-break.c: Include regcache.h and ax.h.
4487 (point_cond_list_t): New data structure.
4488 (breakpoint) <cond_list>: New field.
4489 (find_gdb_breakpoint_at): Make non-static.
4490 (delete_gdb_breakpoint_at): Clear any target-side
4491 conditions.
4492 (clear_gdb_breakpoint_conditions): New function.
4493 (add_condition_to_breakpoint): Likewise.
4494 (add_breakpoint_condition): Likewise.
4495 (gdb_condition_true_at_breakpoint): Likewise.
4496 (gdb_breakpoint_here): Return result directly instead
4497 of going through a local variable.
4498
4499 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4500 (clear_gdb_breakpoint_conditions): Likewise.
4501 (add_breakpoint_condition): Likewise.
4502 (gdb_condition_true_at_breakpoint): Likewise.
4503
4504 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4505 (need_step_over_p): Take target-side breakpoint condition into
4506 consideration.
4507
5e1dc496
LM
45082012-02-24 Luis Machado <lgustavo@codesourcery>
4509
4510 * server.h: Include tracepoint.h.
4511 (agent_mem_read, agent_get_trace_state_variable_value,
4512 agent_set_trace_state_variable_value,
4513 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4514 get_set_tsv_func_addr): New prototypes.
4515
4516 * ax.h: New include file.
4517 * ax.c: New source file.
4518
4519 * tracepoint.c: Include ax.h.
4520 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4521 agent_expr, eval_result_type): Move to ax.h.
4522 (parse_agent_expr): Rename to ...
4523 (gdb_parse_agent_expr): ... this, make it non-static and move
4524 to ax.h.
4525 (unparse_agent_expr) Rename to ...
4526 (gdb_unparse_agent_expr): ... this, make it non-static and move
4527 to ax.h.
4528 (eval_agent_expr): Rename to ...
4529 (eval_tracepoint_agent_expr): ... this.
4530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4531 forward declarations.
4532 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4533 (agent_get_trace_state_variable_value): New function.
4534 (agent_set_trace_state_variable_value): New function.
4535 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4536 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4537 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4538 (condition_true_at_tracepoint): Likewise.
4539 (parse_agent_expr): Rename to ...
4540 (gdb_parse_agent_expr): ... this and move to ax.c.
4541 (unparse_agent_expr): Rename to ...
4542 (gdb_unparse_agent_expr): ... this and move to ax.c.
4543 (gdb_agent_op_name): Move to ax.c.
4544 (eval_agent_expr): Rename to ...
4545 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4546 and move to ax.c.
4547 (eval_tracepoint_agent_expr): New function.
4548 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4549 non-static.
5e1dc496
LM
4550 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4551 ax.c.
4552 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4553 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4554 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4555 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4556 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4557 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4558 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4559 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4560 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4561 (compile_bytecodes): Remove forward declaration.
4562 (is_goto_target): Move to ax.c.
4563 (compile_bytecodes): Move to ax.c and call
4564 agent_get_trace_state_variable_value (...) and
4565 agent_set_trace_state_variable_value (...).
4566
4567 * Makefile.in: Update ax.c and IPA dependencies.
4568
277e4e52
PA
45692012-02-24 Pedro Alves <palves@redhat.com>
4570
4571 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4572 (cmd_bigqtbuffer_circular): ... this. Only handle
4573 'QTBuffer:circular:'.
4574 (handle_tracepoint_general_set): Adjust.
4575
bf4c19f7
YQ
45762012-02-16 Yao Qi <yao@codesourcery.com>
4577
4578 * inferiors.c: Move code to ...
4579 * dll.c: .... here. New.
4580 * server.h: Declare clear_dlls.
4581 * Makefile.in (SFILES): Add dll.c.
4582 (OBS): Add dll.o
4583 (dll.o): New rule.
4584
d73f2619
YQ
45852012-02-11 Yao Qi <yao@codesourcery.com>
4586
4587 * server.c: (handle_monitor_command): Add a new parameter
4588 `own_buf'.
4589 (handle_query): Update caller.
4590
f8255c2a
JB
45912012-02-09 Joel Brobecker <brobecker@adacore.com>
4592
4593 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4594 * configure, config.in: Regenerate.
4595 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4596 is not defined.
4597
da84f473
PA
45982012-02-02 Pedro Alves <palves@redhat.com>
4599
4600 Try SIGKILL first, then PTRACE_KILL.
4601 * linux-low.c (linux_kill_one_lwp): New.
4602 (linux_kill_one_lwp): Rename to ...
4603 (kill_one_lwp_callback): ... this. Use the new
4604 linux_kill_one_lwp.
4605
e886a173
PA
46062012-02-02 Pedro Alves <palves@redhat.com>
4607
4608 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4609 inferior.
4610
be07f1a2
PA
46112012-01-27 Pedro Alves <palves@redhat.com>
4612
4613 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4614 (elf_64_file_p): Make static.
4615 (linux_pid_exe_is_elf_64_file): New.
4616 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4617 Delete declarations.
4618 (linux_pid_exe_is_elf_64_file): Declare.
4619 * linux-x86-low.c (x86_arch_setup): Use
4620 linux_pid_exe_is_elf_64_file.
4621
d8301ad1
JK
46222012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4623
4624 * linux-low.c (linux_wait_for_event_1): Rename to ...
4625 (linux_wait_for_event): ... here and merge it with former
4626 linux_wait_for_event - new variable wait_ptid, use it.
4627 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4628
01b17894
PA
46292012-01-23 Pedro Alves <palves@redhat.com>
4630
4631 * server.c (main): Avoid yet another case of infinite loop while
4632 detaching/killing after a longjmp.
4633
e825046f
JK
46342012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4635
4636 Code cleanup.
4637 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4638
b9e7b9c3
UW
46392012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4640
4641 * hostio.c (handle_readlink): New function.
4642 (handle_vFile): Call it to handle "vFile:readlink" packets.
4643
901f9912
UW
46442012-01-20 Pedro Alves <palves@redhat.com>
4645 Ulrich Weigand <ulrich.weigand@linaro.org>
4646
4647 * server.c (handle_v_requests): Only support vAttach and vRun to
4648 start multiple processes when in extended protocol mode.
4649
fc1ab1a0
PA
46502012-01-17 Pedro Alves <palves@redhat.com>
4651
4652 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4653 memalign plus mprotect to allocate the scratch buffer.
4654
7d5d4e98
PA
46552012-01-13 Pedro Alves <palves@redhat.com>
4656
4657 * server.c (attach_inferior): Clear `cont_thread'.
4658
f128d5e9
PA
46592012-01-13 Pedro Alves <palves@redhat.com>
4660
4661 * server.c (main): Avoid infinite loop while detaching/killing
4662 after a longjmp.
4663
06db92f0
DE
46642012-01-09 Doug Evans <dje@google.com>
4665
4666 * server.c (start_inferior): Set last_ptid in --wrapper case.
4667
32d92999
YQ
46682012-01-06 Yao Qi <yao@codesourcery.com>
4669
4670 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4671 defined.
4672 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4673
5e0a92a9
YQ
46742012-01-04 Yao Qi <yao@codesourcery.com>
4675
4676 * tracepoint.c (cmd_qtdp): Print debug message
4677 for static tracepoint.
4678
ae639e8c
YQ
46792012-01-04 Yao Qi <yao@codesourcery.com>
4680
4681 * tracepoint.c (trace_vdebug): Differentiate debug message
4682 between gdbserver and IPA.
4683
f72429c5
YQ
46842012-01-03 Yao Qi <yao@codesourcery.com>
4685
4686 * tracepoint.c (tracepoint_was_hit): Don't collect for
4687 static tracepoint.
4688
12c3e59c
JB
46892012-01-02 Joel Brobecker <brobecker@adacore.com>
4690
4691 * terminal.h: Reformat copyright header.
4692
67827812
JB
46932012-01-02 Joel Brobecker <brobecker@adacore.com>
4694
4695 * server.c (gdbserver_version): Update copyright year.
4696 * gdbreplay.c (gdbreplay_version): Likewise.
4697
3e52c33d
JK
46982011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4699
4700 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4701
4702 Revert:
4703 2011-12-18 Hui Zhu <teawater@gmail.com>
4704 * linux-low.c (linux_create_inferior): Save return value to ret.
4705
66f1260e
HZ
47062011-12-18 Hui Zhu <teawater@gmail.com>
4707
4708 * linux-low.c (linux_create_inferior): Save return value to ret.
4709
e77616d7
DE
47102011-12-16 Doug Evans <dje@google.com>
4711
e7b06c57
DE
4712 * linux-low.c (linux_create_inferior): If stdio connection,
4713 redirect stdin from /dev/null, stdout to stderr.
4714 * remote-utils.c (remote_is_stdio): New static global.
4715 (remote_connection_is_stdio): New function.
4716 (remote_prepare): Handle stdio connection.
4717 (remote_open): Ditto.
4718 (remote_close): Don't close stdin for stdio connections.
4719 (read_prim,write_prim): New functions. Replace all calls to
4720 read/write to these.
4721 * server.c (main): Watch for "-" argument. Move call to
4722 remote_prepare before start_inferior.
4723 * server.h (STDIO_CONNECTION_NAME): New macro.
4724 (remote_connection_is_stdio): Declare.
4725
e77616d7
DE
4726 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4727 in debugging output.
4728
82067193
YQ
47292011-12-15 Yao Qi <yao@codesourcery.com>
4730
4731 * tracepoint.c: Include sys/syscall.h.
4732 (gdb_ust_thread): Remove preprocessor conditional.
4733
82bfbe7e
PA
47342011-12-14 Pedro Alves <pedro@codesourcery.com>
4735
4736 * linux-low.c (linux_detach_one_lwp): Call
4737 the_low_target.prepare_to_resume before detaching.
4738
712c6575
YQ
47392011-12-14 Yao Qi <yao@codesourcery.com>
4740
4741 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4742 of write.
4743
d54d1edf
YQ
47442011-12-14 Yao Qi <yao@codesourcery.com>
4745
4746 * i386-low.c (i386_low_stopped_data_address): Initialize local
4747 variable `control'.
4748
6210a125
PA
47492011-12-13 Pedro Alves <pedro@codesourcery.com>
4750
4751 PR remote/13492
4752
4753 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4754 DR_CONTROL unless necessary. Extend comments.
4755 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4756 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4757
2ece8244
YQ
47582011-12-13 Yao Qi <yao@codesourcery.com>
4759
4760 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4761 macros.
4762 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4763
784867a5
JK
47642011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4765
4766 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4767 Print new debug message for such case.
4768
6bf36717
JK
47692011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4770
4771 Fix overlapping memcpy.
4772 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4773 the read_inferior_memory transfer.
4774 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4775 write_inferior_memory transfer.
4776 (set_fast_tracepoint_jump): New variable buf. Use it for the
4777 read_inferior_memory and write_inferior_memory transfers.
4778 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4779 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4780 Use it for the write_inferior_memory transfer.
4781 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4782 buffers.
4783
50275556
MR
47842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4785
4786 * linux-low.c (fetch_register, store_register): Make code
4787 consistent, fix formatting.
4788
7325beb4
MR
47892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4790
4791 * linux-low.c (usr_store_inferior_registers): Factor out code
4792 to handle individual registers into...
4793 (store_register): ... this new function.
4794
c642a434
UW
47952011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4796
4797 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4798 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4799 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4800 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4801 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4802 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4803 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4804 (srv_xmlfiles): Add new XML files.
4805
4806 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4807 and <sys/uio.h>.
4808 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4809 (init_registers_s390_linux32v1): Add prototype.
4810 (init_registers_s390_linux32v2): Likewise.
4811 (init_registers_s390_linux64v1): Likewise.
4812 (init_registers_s390_linux64v2): Likewise.
4813 (init_registers_s390x_linux64v1): Likewise.
4814 (init_registers_s390x_linux64v2): Likewise.
4815 (s390_num_regs): Increment to 52.
4816 (s390_regmap): Add orig_r2 register.
4817 (s390_num_regs_3264): Increment to 68.
4818 (s390_regmap_3264): Add orig_r2 register.
4819 (s390_collect_ptrace_register): Handle orig_r2 register.
4820 (s390_supply_ptrace_register): Likewise.
4821 (s390_fill_last_break): New function.
4822 (s390_store_last_break): Likewise.
4823 (s390_fill_system_call): New function.
4824 (s390_store_system_call): Likewise.
4825 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4826 register sets.
4827 (s390_check_regset): New function.
4828 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4829 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4830 Update target_regsets for available register sets.
4831
2268b414
JK
48322011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4833 Jan Kratochvil <jan.kratochvil@redhat.com>
4834
4835 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4836 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4837 New.
4838 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4839 * linux-low.h (struct process_info_private): New member r_debug.
4840 * server.c (handle_qxfer_libraries): Call
4841 the_target->qxfer_libraries_svr4.
4842 (handle_qxfer_libraries_svr4): New function.
4843 (qxfer_packets): New entry "libraries-svr4".
4844 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4845 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4846 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4847 PACKET_qXfer_libraries_svr4.
4848
d6db1fab
UW
48492011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4850
4851 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4852 PSW address/mask between 8-byte and 16-byte formats.
4853 (s390_supply_ptrace_register): Likewise.
4854 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4855 basic addressing mode bit.
4856
242f5f1c
SS
48572011-11-24 Stan Shebs <stan@codesourcery.com>
4858
4859 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4860
f196051f
SS
48612011-11-17 Stan Shebs <stan@codesourcery.com>
4862
4863 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4864 (tracing_start_time): New global.
4865 (tracing_stop_time): New global.
4866 (tracing_user_name): New global.
4867 (tracing_notes): New global.
4868 (tracing_stop_note): New global.
4869 (cmd_qtstart): Set traceframe_usage, start_time.
4870 (stop_tracing): Set stop_time.
4871 (cmd_qtstatus): Report additional status.
4872 (cmd_qtp): New function.
4873 (handle_tracepoint_query): Call it.
4874 (cmd_qtnotes): New function.
4875 (handle_tracepoint_general_set): Call it.
4876 (get_timestamp): Rename from tsv_get_timestamp.
4877
405f8e94
SS
48782011-11-14 Stan Shebs <stan@codesourcery.com>
4879 Kwok Cheung Yeung <kcy@codesourcery.com>
4880
4881 * linux-x86-low.c (small_jump_insn): New.
4882 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4883 trampoline and error message, build a trampoline and issue a small
4884 jump instruction to it.
4885 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4886 trampoline and error message.
4887 (x86_get_min_fast_tracepoint_insn_len): New.
4888 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4889 * linux-low.h (struct linux_target_ops): Add arguments to
4890 install_fast_tracepoint_jump_pad operation, add new operation.
4891 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4892 arguments.
4893 (linux_get_min_fast_tracepoint_insn_len): New function.
4894 (linux_target_op): Add new operation.
4895 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4896 (gdb_trampoline_buffer_end): Ditto.
4897 (gdb_trampoline_buffer_error): Ditto.
4898 (struct ipa_sym_addresses): Add fields for new IPA variables.
4899 (symbol_list): Add entries for new IPA variables.
4900 (struct tracepoint): Add fields to hold the address range of the
4901 trampoline used by the tracepoint.
4902 (trampoline_buffer_head): New static variable.
4903 (trampoline_buffer_tail): Ditto.
4904 (claim_trampoline_space): New function.
4905 (have_fast_tracepoint_trampoline_buffer): New function.
4906 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4907 structure.
4908 (install_fast_tracepoint): Ditto, also add error buffer argument.
4909 (cmd_qtminftpilen): New function.
4910 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4911 (fast_tracepoint_from_trampoline_address): New function.
4912 (fast_tracepoint_collecting): Handle trampoline as part of jump
4913 pad space.
4914 (set_trampoline_buffer_space): New function.
4915 (initialize_tracepoint): Initialize new IPA variables.
4916 * target.h (struct target_ops): Add arguments to
4917 install_fast_tracepoint_jump_pad operation, add new
4918 get_min_fast_tracepoint_insn_len operation.
4919 (target_get_min_fast_tracepoint_insn_len): New.
4920 (install_fast_tracepoint_jump_pad): Add arguments.
4921 * server.h (IPA_BUFSIZ): Define.
4922 * linux-i386-ipa.c: Include extra header files.
4923 (initialize_fast_tracepoint_trampoline_buffer): New function.
4924 (initialize_low_tracepoint): Call it.
4925 * server.h (set_trampoline_buffer_space): Declare.
4926 (claim_trampoline_space): Ditto.
4927 (have_fast_tracepoint_trampoline_buffer): Ditto.
4928
1e4d1764
YQ
49292011-11-14 Yao Qi <yao@codesourcery.com>
4930
4931 * server.c (handle_query): Handle InstallInTrace for qSupported.
4932 * tracepoint.c (add_tracepoint): Sort list.
4933 (install_tracepoint, download_tracepoint): New.
4934 (cmd_qtdp): Call them to install and download tracepoints.
4935 (sort_tracepoints): Removed.
4936 (cmd_qtstart): Update.
4937
5c73ff4e
YQ
49382011-11-14 Yao Qi <yao@codesourcery.com>
4939
4940 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4941 * mem-break.h: Declare.
4942 * tracepoint.c (cmd_qtstart): Move some code to ...
4943 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4944 New.
4945 (download_tracepoints): Move some code to ...
4946 (download_tracepoint_1): ... here. New.
4947
86a30030
YQ
49482011-11-08 Yao Qi <yao@codesourcery.com>
4949
4950 * remote-utils.c (relocate_instruction): A comment fix.
4951
8d26e50c
JB
49522011-11-07 Joel Brobecker <brobecker@adacore.com>
4953
4954 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4955 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4956 dr_status_mirror and dr_control_mirror from debug_reg_state.
4957 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4958 (i386_initial_stuff): Remove use of deleted globals.
4959 (i386_get_thread_context, i386_set_thread_context,
4960 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4961 from debug_reg_state.
4962
a59306a3
YQ
49632011-11-05 Yao Qi <yao@codesourcery.com>
4964
4965 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4966 address as TPOINT's.
4967
3065dfb6
SS
49682011-11-02 Stan Shebs <stan@codesourcery.com>
4969
4970 * tracepoint.c (agent_mem_read_string): New function.
4971 (eval_agent_expr): Call it for tracenz.
4972 * server.c (handle_query): Report support for tracenz.
4973
fd0d8c7c
YQ
49742011-11-02 Yao Qi <yao@codesourcery.com>
4975
4976 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4977
609086b1
YQ
49782011-11-02 Yao Qi <yao@codesourcery.com>
4979
4980 * target.h: Fix a typo in comment.
4981
b9fd1791
PA
49822011-10-31 Pedro Alves <pedro@codesourcery.com>
4983
4984 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4985 clobber the breakpoints' shadows with fast tracepoint jumps.
4986 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4987 * target.c (write_inferior_memory): Also pass MYADDR down to
4988 check_mem_write.
4989
03583c20
UW
49902011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4991
4992 * configure.ac: Check support for personality routine.
4993 * configure: Regenerate.
4994 * config.in: Likewise.
4995 * linux-low.c: Include <sys/personality.h>.
4996 Define ADDR_NO_RANDOMIZE if necessary.
4997 (linux_create_inferior): Disable address space randomization when
4998 forking inferior, if requested.
4999 (linux_supports_disable_randomization): New function.
5000 (linux_target_ops): Install it.
5001 * server.h (disable_randomization): Declare.
5002 * server.c (disable_randomization): New global variable.
5003 (handle_general_set): Handle QDisableRandomization.
5004 (handle_query): Likewise for qSupported.
5005 (main): Support --disable-randomization and --no-disable-randomization
5006 command line arguments.
5007 * target.h (struct target_ops): Add supports_disable_randomization.
5008 (target_supports_disable_randomization): New macro.
5009
723b724b
MF
50102011-09-29 Mike Frysinger <vapier@gentoo.org>
5011
5012 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5013 ifdef check.
5014 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5015 [!PT_GETDSBT] (target_loadmap): New definition.
5016 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5017 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5018 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5019 and PT_GETDSBT to LINUX_LOADMAP.
5020 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5021 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5022
55329a5c 50232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5024
5025 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5026 (arm_linux_hwbp_cap): New static variable.
5027 (arm_linux_get_hwbp_cap): Replace by ...
5028 (arm_linux_init_hwbp_cap): ... this new function.
5029 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5030 (arm_linux_get_hw_watchpoint_count): Likewise.
5031 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5032 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5033 (arm_prepare_to_resume): Use perror_with_name instead of error.
5034
55329a5c 50352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5036
5037 * linux-arm-low.c: Include <signal.h>.
5038 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5039 (struct arm_linux_hwbp_cap): New data type.
5040 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5041 (struct arm_linux_hw_breakpoint): New data type.
5042 (MAX_BPTS, MAX_WPTS): Define.
5043 (struct arch_process_info, struct arch_lwp_info): New data types.
5044 (arm_linux_get_hwbp_cap): New function.
5045 (arm_linux_get_hw_breakpoint_count): Likewise.
5046 (arm_linux_get_hw_watchpoint_count): Likewise.
5047 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5048 (arm_hwbp_control_initialize): Likewise.
5049 (arm_hwbp_control_is_enabled): Likewise.
5050 (arm_hwbp_control_is_initialized): Likewise.
5051 (arm_hwbp_control_disable): Likewise.
5052 (arm_linux_hw_breakpoint_equal): Likewise.
5053 (arm_linux_hw_point_initialize): Likewise.
5054 (struct update_registers_data): New data structure.
5055 (update_registers_callback: New function.
5056 (arm_insert_point): Likewise.
5057 (arm_remove_point): Likewise.
5058 (arm_stopped_by_watchpoint): Likewise.
5059 (arm_stopped_data_address): Likewise.
5060 (arm_new_process): Likewise.
5061 (arm_new_thread): Likewise.
5062 (arm_prepare_to_resume): Likewise.
5063 (the_low_target): Register arm_insert_point, arm_remove_point,
5064 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5065 arm_new_thread, and arm_prepare_to_resume.
5066
6b9801d4
SS
50672011-09-15 Stan Shebs <stan@codesourcery.com>
5068
5069 * server.h (struct emit_ops): Add compare-goto fields.
5070 * tracepoint.c (gdb_agent_op_sizes): New table.
5071 (emit_eq_goto): New function.
5072 (emit_ne_goto): New function.
5073 (emit_lt_goto): New function.
5074 (emit_le_goto): New function.
5075 (emit_gt_goto): New function.
5076 (emit_ge_goto): New function.
5077 (is_goto_target): New function.
5078 (compile_bytecodes): Recognize special cases of compare-goto
5079 combinations and call specialized emitters for them.
5080 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5081 (amd64_emit_ne_goto): New function.
5082 (amd64_emit_lt_goto): New function.
5083 (amd64_emit_le_goto): New function.
5084 (amd64_emit_gt_goto): New function.
5085 (amd64_emit_ge_goto): New function.
5086 (amd64_emit_ops): Add the new functions.
5087 (i386_emit_eq_goto): New function.
5088 (i386_emit_ne_goto): New function.
5089 (i386_emit_lt_goto): New function.
5090 (i386_emit_le_goto): New function.
5091 (i386_emit_gt_goto): New function.
5092 (i386_emit_ge_goto): New function.
5093 (i386_emit_ops): Add the new functions.
5094
bf15cbda
SS
50952011-09-08 Stan Shebs <stan@codesourcery.com>
5096
5097 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5098 (i386_emit_epilogue): Restore %ebx.
5099
943ca1dd
JZ
51002011-08-31 Jie Zhang <jzhang918@gmail.com>
5101
5102 * server.c (step_thread): Remove definition.
5103 (process_serial_event): Don't handle Hs.
5104 * server.h (step_thread): Remove declaration.
5105 * target.c (set_desired_inferior): Remove use of step_thread.
5106
e3deef73
LM
51072011-08-24 Luis Machado <lgustavo@codesourcery.com>
5108
5109 * linux-low.c: Include linux-procfs.h.
5110 (linux_attach_lwp_1): Update comments.
5111 (linux_attach): Scan for existing threads when attaching to a
5112 process that is the tgid.
5113 * Makefile.in: Update dependencies.
5114
13da1c97
LM
51152011-08-24 Luis Machado <lgustavo@codesourcery.com>
5116
5117 * configure.srv: Add linux-procfs.o dependencies.
5118
881127c9
YQ
51192011-08-14 Yao Qi <yao@codesourcery.com>
5120
5121 * target.h (struct target_ops): Fix indent.
5122 * win32-low.c (win32_target_ops): Fix comment.
5123
58dbd541
YQ
51242011-08-14 Andrew Jenner <andrew@codesourcery.com>
5125 Yao Qi <yao@codesourcery.com>
5126
5127 * Makefile.in (clean): Remove tic6x-*.c files.
5128 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5129 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5130 (tic6x-c64xp-linux.c): Likewise.
5131 * configure.srv: Add support for tic6x-*-uclinux.
5132 * linux-tic6x-low.c: New.
5133 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5134
78d85199
YQ
51352011-08-14 Andrew Stubbs <ams@codesourcery.com>
5136 Yao Qi <yao@codesourcery.com>
5137
5138 * target.h (struct target_ops): Add read_loadmap.
5139 * linux-low.c (struct target_loadseg): New type.
5140 (struct target_loadmap): New type.
5141 (linux_read_loadmap): New function.
5142 (linux_target_ops): Add linux_read_loadmap.
5143 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5144 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5145 to NULL.
78d85199 5146
a959a88d
EZ
51472011-08-05 Eli Zaretskii <eliz@gnu.org>
5148
5149 * win32-low.c: Include <stdint.h>.
5150
1ced966e
PA
51512011-07-22 Pedro Alves <pedro@codesourcery.com>
5152
5153 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5154 to the inferior here.
5155 (i386_remove_aligned_watchpoint): Ditto.
5156 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5157 fit part of the watchpoint in the debug registers.
5158 (i386_update_inferior_debug_regs): New.
5159 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5160 registers, and only update the inferior on success.
5161 (i386_low_remove_watchpoint): Ditto.
5162
d26e3629
KY
51632011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5164
5165 * linux-low.c (compare_ints, unique, list_threads, show_process,
5166 linux_core_of_thread): Delete.
5167 (linux_target_ops): Change linux_core_of_thread to
5168 linux_common_core_of_thread.
5169 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5170 * utils.c (malloc_failure): Change type of argument.
5171 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5172 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5173 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5174 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5175 (IPA_OBJS): Add common-utils-ipa.o.
5176 (ptid_h, linux_osdata_h): New macros.
5177 (server_h): Add common/common-utils.h, common/xml-utils.h,
5178 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5179 common/ptid.h.
5180 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5181 ptid.o, buffer.o): New rules.
5182 (linux-low.o): Add common/linux-osdata.h as a dependency.
5183 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5184 * configure.ac: Add AC_HEADER_DIRENT check.
5185 * config.in: Regenerate.
5186 * configure: Regenerate.
5187 * remote-utils.c (xml_escape_text): Delete.
5188 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5189 buffer_xml_printf): Move to common/buffer.c.
5190 * server.c (main): Remove call to initialize_inferiors.
5191 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5192 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5193 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5194 internal_error, gdb_assert, gdb_assert_fail): Delete.
5195 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5196 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5197 common/buffer.h.
5198 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5199 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5200 initialize_inferiors): Delete.
5201
2275a1a7
PA
52022011-07-20 Pedro Alves <pedro@codesourcery.com>
5203
5204 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5205 symbol error.
5206
0a5b1e09
PA
52072011-05-31 Pedro Alves <pedro@codesourcery.com>
5208
5209 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5210 assertion.
5211 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5212
6938fd34
YQ
52132011-05-26 Yao Qi <yao@codesourcery.com>
5214
5215 * Makefile.in (thread-db.o): Track dependence to
5216 common/gdb_thread_db.h.
5217 * thread-db.c: include gdb_thread_db.h from right place.
5218
b481f9e0
TT
52192011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5220
5221 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5222 __FILE__ and __LINE__ to internal_error.
5223
98a5dd13
DE
52242011-05-13 Doug Evans <dje@google.com>
5225
5226 * thread-db.c (try_thread_db_load_from_sdir): New function.
5227 (try_thread_db_load_from_dir): New function.
5228 (thread_db_load_search): Handle $sdir, ignore $pdir.
5229 Remove trying of system directories if search of
5230 libthread-db-search-path fails, that is now done via $sdir.
5231
d248b706
KY
52322011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5233
5234 * server.c (handle_query): Add EnableDisableTracepoints to the list
5235 of supported features.
43aaf8b6 5236 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5237 tracepoints.
43aaf8b6
PA
5238 (cmd_qtenable_disable): New.
5239 (cmd_qtstart): Install tracepoints even if disabled.
5240 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5241 receiving a QTEnable or QTDisable packet.
5242 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5243 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5244 tracepoints.
5245 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5246
84e578fb
DE
52472011-05-10 Doug Evans <dje@google.com>
5248
5249 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5250
71f55dd8
DE
52512011-05-04 Doug Evans <dje@google.com>
5252
5253 * linux-low.c (linux_join): Skip process lookup.
5254 * spu-low.c (spu_join): Ditto.
5255 * server.c (join_inferiors_callback): Delete.
5256 (process_serial_event): For 'D' packet (detach) call join_inferior
5257 directly.
5258
4d393d60
JM
52592011-05-04 Joseph Myers <joseph@codesourcery.com>
5260
5261 * README: Don't mention xscale*-*-linux*.
5262 * configure.srv (xscale*-*-linux*): Don't handle target.
5263
b00ad6ff
NF
52642011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5265
5266 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5267 casting pointers.
5268 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5269 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5270 (i386_emit_void_call_2): Likewise.
5271
af96c192
YQ
52722011-04-26 Yao Qi <yao@codesourcery.com>
5273
43aaf8b6
PA
5274 * linux-low.c: Move common macros to linux-ptrace.h.
5275 Include linux-ptrace.h.
af96c192
YQ
5276 * Makefile.in (linux_ptrace_h): New.
5277 (linux-low.o): Depends on linux-ptrace.h.
5278
03f2bd59
JK
52792011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5280
5281 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5282 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5283 (remote_prepare): New function with most of the TCP code from ...
5284 (remote_open): ... here. Detect PORT here unconditionally. Move also
5285 setting transport_is_reliable.
5286 * server.c (run_once): New variable.
5287 (gdbserver_usage): Document it.
5288 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5289 the first run if RUN_ONCE.
5290 * server.h (run_once, remote_prepare): New declarations.
5291
7a9dd1b2
TT
52922011-04-19 Tom Tromey <tromey@redhat.com>
5293
5294 * win32-low.c (handle_load_dll): Remove duplicate "the".
5295
81239425
PM
52962011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5297
5298 Remove support for old Cygwin 1.5 versions.
5299 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5300 function to avoid warning.
5301 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5302 warning.
5303
9e0627f1
PM
53042011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5305
5306 * gdbserver/server.h (Macro _): Define it if not available.
5307
588eebee
MS
53082011-03-14 Michael Snyder <msnyder@vmware.com>
5309
348af9f7 5310 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5311
43f70d4c
JB
53122011-03-10 Joel Brobecker <brobecker@adacore.com>
5313
5314 * Makefile.in (maintainer-clean realclean distclean): Remove
5315 "make ... subdir_do" command.
5316
348af9f7
MS
53172011-03-10 Michael Snyder <msnyder@vmware.com>
5318
5319 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5320
5321 * server.c (handle_v_run): Free alloced buffer on early return.
5322
e637a4f5
YQ
53232011-03-09 Yao Qi <yao@codesourcery.com>
5324
5325 Revert:
5326 2011-03-04 Yao Qi <yao@codesourcery.com>
5327
5328 * Makefile.in: Remove GNU make feature --directory.
5329
5330 2011-03-05 Yao Qi <yao@codesourcery.com>
5331
5332 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5333 (subdir_do): New make target. Copied from gdb/Makefile.
5334 (maintainer-clean, realclean, distclean, clean): Call corresponding
5335 make targets in common/Makefile.
5336
5337 2011-02-11 Yao Qi <yao@codesourcery.com>
5338
5339 * configure.ac: Call AC_PROG_RANLIB.
5340 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5341 * configure: Regenerate.
5342
e6edda56
JK
53432011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5344
5345 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5346
e5141119
JB
53472011-03-06 Yao Qi <yao@codesourcery.com>
5348
5349 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5350
64794aa4
JB
53512011-03-05 Yao Qi <yao@codesourcery.com>
5352
5353 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5354 (subdir_do): New make target. Copied from gdb/Makefile.
5355 (maintainer-clean, realclean, distclean, clean): Call corresponding
5356 make targets in common/Makefile.
5357
7a762829
YQ
53582011-03-04 Yao Qi <yao@codesourcery.com>
5359
5360 * Makefile.in: Remove GNU make feature --directory.
5361
348af9f7
MS
53622011-03-04 Michael Snyder <msnyder@vmware.com>
5363
5364 * server.c (queue_stop_reply): Call xmalloc not malloc.
5365
53662011-03-02 Michael Snyder <msnyder@vmware.com>
5367
5368 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5369
9f72fee2
MS
53702011-02-28 Michael Snyder <msnyder@vmware.com>
5371
588eebee
MS
5372 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5373 (cmd_qtframe): Ditto.
5374 (cmd_qtbuffer): Ditto.
5375 (cmd_bigqtbuffer): Ditto.
5376
9f72fee2
MS
5377 * utils.c (decimal2str): Initialize 'width' to nine, then
5378 don't mess with it.
5379
8040bd49
UW
53802011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5381
5382 * hostio.c (require_data): Free *data, not data.
5383
7e52cbd0
JK
53842011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5385
5386 * hostio.c (require_data): Use free, not xfree.
5387
9130f83e
MS
53882011-02-27 Michael Snyder <msnyder@vmware.com>
5389
4b812f4e
MS
5390 * server.c (handle_query): Discard unused value.
5391
9130f83e
MS
5392 * hostio.c (require_data): Free malloc memory before returning
5393 error.
5394
69d37113
MS
53952011-02-26 Michael Snyder <msnyder@vmware.com>
5396
5397 * linux-low.c (list_threads): Call closedir for dirent.
5398
35f5825a
MS
53992011-02-27 Michael Snyder <msnyder@vmware.com>
5400
2a589cef
MS
5401 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5402 a case statement falls through.
5403
0adea5f7
MS
5404 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5405
35f5825a
MS
5406 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5407 in comparison.
5408
238f1c74
MS
54092011-02-26 Michael Snyder <msnyder@vmware.com>
5410
5411 * utils.c (decimal2str): Eliminate dead code and dead param.
5412 (pulongest): Drop dead param from call to decimal2str.
5413 (plongest): Ditto.
5414
633ff500
JB
54152011-02-24 Joel Brobecker <brobecker@adacore.com>
5416
5417 Revert the following patch (not approved yet):
5418 2011-02-21 Hui Zhu <teawater@gmail.com>
5419 * tracepoint.c (tp_printf): New function.
5420 (eval_agent_expr): Handle gdb_agent_op_printf.
5421
f9c6ff72
HZ
54222011-02-21 Hui Zhu <teawater@gmail.com>
5423
5424 * tracepoint.c (tp_printf): New function.
5425 (eval_agent_expr): Handle gdb_agent_op_printf.
5426
94d5e490
TT
54272011-02-18 Tom Tromey <tromey@redhat.com>
5428
5429 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5430 (tracepoint.o): Likewise.
5431 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5432 (gdb_agent_op_names): Likewise.
5433
c7f96d2b
TT
54342011-02-18 Tom Tromey <tromey@redhat.com>
5435
5436 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5437 gdb_agent_op_rot>: New constants.
5438 (gdb_agent_op_names): Add pick and roll.
5439 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5440 cases.
5441
0feedb2c
JK
54422011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5443
5444 * aclocal.m4: Regenerated with aclocal-1.11.1.
5445
b3b9301e
PA
54462011-02-14 Pedro Alves <pedro@codesourcery.com>
5447
5448 * server.c (handle_qxfer_traceframe_info): New.
5449 (qxfer_packets): Register "traceframe-info".
5450 (handle_query): Report support for qXfer:traceframe-info:read+.
5451 * tracepoint.c (match_blocktype): New.
5452 (traceframe_find_block_type): Rename to ...
5453 (traceframe_walk_blocks): ... this. Add callback filter argument,
5454 and use it.
5455 (traceframe_find_block_type): New, reimplemented on top of
5456 traceframe_walk_blocks.
5457 (build_traceframe_info_xml): New.
5458 (traceframe_read_info): New.
5459 * server.h (traceframe_read_info): Declare.
5460
4f3e6fb7
YQ
54612011-02-11 Yao Qi <yao@codesourcery.com>
5462
5463 * configure.ac: Call AC_PROG_RANLIB.
5464 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5465 * configure: Regenerate.
5466
764880b7
PA
54672011-02-07 Pedro Alves <pedro@codesourcery.com>
5468
5469 * server.c (gdb_read_memory): Change return semantics to allow
5470 partial transfers.
5471 (handle_search_memory_1): Adjust.
5472 (process_serial_event) <'m' packet>: Handle partial transfers.
5473 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5474
1c79eb8a
PA
54752011-01-28 Pedro Alves <pedro@codesourcery.com>
5476
5477 * regcache.c (init_register_cache): Initialize
5478 regcache->register_status.
5479 (free_register_cache): Release regcache->register_status.
5480 (regcache_cpy): Copy register_status.
5481 (registers_to_string): Print 'x's for unavailable registers.
5482 (supply_register): Mark the register's status valid or
5483 unavailable, depending on whether a buffer was passed in or not.
5484 (supply_register_zeroed): New.
5485 (supply_regblock): Mark the registers' status valid or
5486 unavailable, depending on whether a buffer was passed in or not.
5487 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5488 (struct regcache): New `register_status' field.
5489 (supply_register_zeroed): Declare.
5490 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5491 supply_register_zeroed, rather than passing a NULL buffer to
5492 supply_register.
5493 * tracepoint.c (fetch_traceframe_registers): Update comment.
5494
85724a0e
PA
54952011-01-28 Pedro Alves <pedro@codesourcery.com>
5496
5497 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5498 buffer explicit.
5499
d08aafef
PA
55002011-01-25 Pedro Alves <pedro@codesourcery.com>
5501
5502 * server.h (decode_xfer_write): Change prototype.
5503 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5504 and don't extract the annex here.
5505 * server.c (decode_xfer_read): Remove `annex' parameter,
5506 and don't extract the annex here.
5507 (decode_xfer): New.
5508 (struct qxfer): New.
5509 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5510 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5511 (handle_qxfer_statictrace): New functions, abstracted out from
5512 handle_query, and made to use the struct qxfer interface.
5513 (handle_threads_qxfer_proper): Rename to ...
5514 (handle_qxfer_threads_proper): ... this.
5515 (handle_threads_qxfer): Rename to ...
5516 (handle_qxfer_threads): ... this. Adjust.
5517 (qxfer_packets): New array.
5518 (handle_qxfer): New function.
5519 (handle_query): Use handle_qxfer.
5520
493e2a69
MS
55212011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5522
5523 * gdbreplay.c: Shorten lines of >= 80 columns.
5524 * linux-low.c: Ditto.
5525 * linux-ppc-low.c: Ditto.
5526 * linux-s390-low.c: Ditto.
5527 * linux-sparc-low.c: Ditto.
5528 * linux-x86-low.c: Ditto.
5529 * linux-xtensa-low.c: Ditto.
5530 * mem-break.c: Ditto.
5531 * nto-low.c: Ditto.
5532 * regcache.h: Ditto.
5533 * remote-utils.c: Ditto.
5534 * server.c: Ditto.
5535 * server.h: Ditto.
5536 * thread-db.c: Ditto.
5537 * tracepoint.c: Ditto.
5538 * utils.c: Ditto.
5539 * win32-low.h: Ditto.
5540
44944448
JB
55412011-01-05 Joel Brobecker <brobecker@adacore.com>
5542
5543 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5544 update.
5545
71ce852c
JB
55462011-01-01 Joel Brobecker <brobecker@adacore.com>
5547
5548 * server.c (gdbserver_version): Update copyright year in version
5549 output.
5550 * gdbreplay.c (gdbreplay_version): Ditto.
5551
eb826dc6
MF
55522010-12-29 Jie Zhang <jie.zhang@analog.com>
5553
5554 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5555 * linux-bfin-low.c: New file.
5556 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5557 PT_DATA_ADDR for BFIN targets.
5558 * Makefile.in (SFILES): Add linux-bfin-low.c.
5559 (clean): Remove reg-bfin.c.
5560 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5561 * README: Mention supported Blackfin targets.
5562
39ab222a
MF
55632010-12-23 Mike Frysinger <vapier@gentoo.org>
5564
5565 * .gitignore: New file.
5566
a1f2ce7d
MF
55672010-11-16 Mike Frysinger <vapier@gentoo.org>
5568
5569 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5570
f474844c
JZ
55712010-10-22 Jie Zhang <jie@codesourcery.com>
5572
5573 * Makefile.in: Add FLAGS_TO_PASS variable.
5574 (install): Remove dependency of install-only and recursively
5575 invoke make for install-only.
5576
f1048712
DE
55772010-10-04 Doug Evans <dje@google.com>
5578
5579 * Makefile.in (uninstall): Use $(DESTDIR).
5580
b53a1623
PA
55812010-09-24 Pedro Alves <pedro@codesourcery.com>
5582
e6ee044d
PA
5583 PR gdb/11842
5584
b53a1623
PA
5585 * linux-x86-low.c (compat_siginfo_from_siginfo)
5586 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5587 si_code is < 0. Check for si_code == SI_TIMER before checking for
5588 si_code < 0.
5589
fa1bd1e4
JB
55902010-09-13 Joel Brobecker <brobecker@adacore.com>
5591
5592 * lynx-i386-low.c: New file.
5593 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5594
47fac8f8
JB
55952010-09-13 Joel Brobecker <brobecker@adacore.com>
5596
5597 * lynx-low.c (ptrace_request_to_str): Remove handling for
5598 request values that have been removed in LynxOS 5.x.
5599
1adfc54d
JB
56002010-09-13 Joel Brobecker <brobecker@adacore.com>
5601
5602 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5603 <ptrace.h>
5604
c2a66c29
NS
56052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5606
5607 * configure.ac: Add --enable-inprocess-agent option.
5608 * configure: Rebuilt.
5609
32fcada3
YQ
56102010-09-06 Yao Qi <yao@codesourcery.com>
5611
5612 * linux-low.c (linux_kill): Remove unused variable.
5613 (linux_stabilize_threads): Likewise.
5614 * server.c (start_inferior): Likewise.
5615 (queue_stop_reply_callback): Likewise.
5616 * tracepoint.c (do_action_at_tracepoint): Likewise.
5617
0cccb683
YQ
56182010-09-06 Yao Qi <yao@codesourcery.com>
5619
5620 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5621 on return.
5622
423ec54c
JK
56232010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5624
5625 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5626
12ac6819
PA
56272010-09-06 Pedro Alves <pedro@codesourcery.com>
5628
5629 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5630 "$(IPA_DEPFILES)".
5631
8ed54b31
JB
56322010-09-01 Joel Brobecker <brobecker@adacore.com>
5633
5634 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5635 gdbserver/lynx-ppc-low.c: New files.
5636 * Makefile.in (lynx_low_h): New variable.
5637 (lynx-low.o, lynx-ppc-low.o): New rules.
5638 * configure.ac: On LynxOS, link with -lnetinet.
5639 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5640 * configure: regenerate.
5641
bb0116a4
JB
56422010-09-01 Joel Brobecker <brobecker@adacore.com>
5643
5644 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5645 * configure.ac: Add check for vasprintf and vsnprintf.
5646 * configure, config.in: Regenerate.
5647 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5648
a778ab81 56492010-09-01 Joel Brobecker <brobecker@adacore.com>
5650
5651 * gdbreplay.c: Move include of alloca.h up, next to include of
5652 malloc.h.
5653 * server.h: Add include of malloc.h.
5654 * mem-break.c: Remove include of malloc.h.
5655 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5656
8b034a19 56572010-09-01 Joel Brobecker <brobecker@adacore.com>
5658
5659 * Makefile.in (memmem.o): Build with -Wno-error.
5660
56612010-09-01 Joel Brobecker <brobecker@adacore.com>
5662
5663 * utils.c (xsnprintf): Make non-static.
5664 * server.h: Add xsnprintf declaration.
5665 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5666 replace calls to snprintf by calls to xsnprintf throughout.
5667
56682010-09-01 Joel Brobecker <brobecker@adacore.com>
5669
5670 * configure.ac: Add configure check for alloca.
5671 * configure, config.in: Regenerate.
5672 * server.h: Include alloca.h if it exists.
5673 * gdbreplay.c: Include alloca.h if it exists.
5674
1a981360
PA
56752010-08-28 Pedro Alves <pedro@codesourcery.com>
5676
5677 * linux-low.c (__SIGRTMIN): Define if not already defined.
5678 (linux_create_inferior): Check for __ANDROID__ rather than
5679 __SIGRTMIN.
5680 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5681 are already deferred.
5682 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5683 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5684 stopped and already has a pending signal to report.
5685 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5686 a pending signal to report or is moving out of a jump pad.
5687 (linux_init_signals): Check for __ANDROID__ rather than
5688 __SIGRTMIN.
5689
b4d51a55
PA
56902010-08-28 Pedro Alves <pedro@codesourcery.com>
5691
5692 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5693 debug_threads check. Avoid a linear search when not doing debug
5694 output.
5695
ec48365d
PA
56962010-08-27 Pedro Alves <pedro@codesourcery.com>
5697
5698 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5699 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5700 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5701 (process_event): Change local fd's type to gdb_fildes_t.
5702 (create_file_handler): Adjust prototype.
5703 (delete_file_handler): Adjust prototype.
5704 (handle_file_event): Adjust prototype. Use pfildes.
5705 (create_file_event): Adjsut prototype.
5706 * remote-utils.c (remote_desc, listen_desc): Change type to
5707 gdb_fildes_t.
5708 * server.h: New gdb_fildes_t typedef.
5709 [USE_WIN32API]: Include winsock2.h.
5710 (delete_file_handler, add_file_handler): Adjust prototypes.
5711 (pfildes): Declare.
5712 * utils.c (pfildes): New.
5713
854d88f0
PA
57142010-08-27 Pedro Alves <pedro@codesourcery.com>
5715
5716 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5717 * configure: Regenerate.
5718
0146f85b
PA
57192010-08-27 Pedro Alves <pedro@codesourcery.com>
5720
5721 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5722 (linux_done_accessing_memory): ... this.
5723 (linux_target_ops): Adjust.
5724 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5725 * nto-low.c (nto_target_ops): Adjust comment.
5726 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5727 * spu-low.c (spu_target_ops): Adjust comment.
5728 * target.h (target_ops): Rename unprepare_to_access_memory field
5729 to done_accessing_memory.
5730 (unprepare_to_access_memory): Rename to ...
5731 (done_accessing_memory): ... this.
5732
90d74c30
PA
57332010-08-26 Pedro Alves <pedro@codesourcery.com>
5734
5735 * linux-low.c (linux_prepare_to_access_memory): New.
5736 (linux_unprepare_to_access_memory): New.
5737 (linux_target_ops): Install them.
5738 * server.c (read_memory): Rename to ...
5739 (gdb_read_memory): ... this. Use
5740 prepare_to_access_memory/prepare_to_access_memory.
5741 (write_memory): Rename to ...
5742 (gdb_write_memory): ... this. Use
5743 prepare_to_access_memory/prepare_to_access_memory.
5744 (handle_search_memory_1): Adjust.
5745 (process_serial_event): Adjust.
5746 * target.h (struct target_ops): New fields
5747 prepare_to_access_memory and unprepare_to_access_memory.
5748 (prepare_to_access_memory, unprepare_to_access_memory): New.
5749 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5750 prepare_to_access_memory/prepare_to_access_memory.
5751 * nto-low.c (nto_target_ops): Adjust.
5752 * spu-low.c (spu_target_ops): Adjust.
5753 * win32-low.c (win32_target_ops): Adjust.
5754
fd467969
PA
57552010-08-26 Pedro Alves <pedro@codesourcery.com>
5756
5757 * Makefile.in (WARN_CFLAGS): Get it from configure.
5758 (WERROR_CFLAGS): New.
5759 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5760 * configure.ac: Introduce --enable-werror, which adds -Werror to
5761 the compiler command line. Enabled by default. Disable with
5762 --disable-werror. Add -Wdeclaration-after-statement
5763 Wpointer-arith and -Wformat-nonliteral to warning flags.
5764 * configure: Regenerate.
5765
331e2f5f
PA
57662010-08-26 Pedro Alves <pedro@codesourcery.com>
5767
5768 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5769
e581f2b4
PA
57702010-08-26 Pedro Alves <pedro@codesourcery.com>
5771
5772 * gdbreplay.c (remote_error): New.
5773 (gdbchar): New.
5774 (expect): Use gdbchar. Check for error reading from GDB.
5775 Clarify sync error output.
5776 (play): Check for errors writing to GDB.
5777 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5778 * remote-utils.c (getpkt): Check for errors writing to the remote
5779 descriptor.
5780
3c11dd79
PA
57812010-08-25 Pedro Alves <pedro@codesourcery.com>
5782
5783 * linux-low.c (linux_wait_1): Move non-debugging code out of
5784 `debug_threads' control.
5785
d20a8ad9
PA
57862010-08-25 Pedro Alves <pedro@codesourcery.com>
5787
5788 * linux-low.c (linux_wait_1): Don't set last_status here.
5789 * server.c (push_event, queue_stop_reply_callback): Assert we're
5790 not pushing a TARGET_WAITKIND_IGNORE event.
5791 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5792 (myresume, handle_target_event): Set the thread's last_resume_kind
5793 and last_status from the target returned status.
5794
964e4306
PA
57952010-08-25 Pedro Alves <pedro@codesourcery.com>
5796
5797 PR threads/10729
5798
5799 * linux-x86-low.c (update_debug_registers_callback): New.
5800 (i386_dr_low_set_addr): Use it.
5801 (i386_dr_low_get_addr): New.
5802 (i386_dr_low_set_control): Use update_debug_registers_callback.
5803 (i386_dr_low_get_control): New.
5804 (i386_dr_low_get_status): Adjust.
5805 * linux-low.c (linux_stop_lwp): New.
5806 * linux-low.h (linux_stop_lwp): Declare.
5807
5808 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5809 argument instead of a i386_debug_reg_state.
5810 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5811 a i386_debug_reg_state.
5812 (i386_insert_aligned_watchpoint): Adjust.
5813 (i386_remove_aligned_watchpoint): Adjust.
5814 (i386_low_stopped_data_address): Read the debug registers from the
5815 inferior instead of from the mirrors.
5816 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5817 (i386_dr_low_get_addr): Declare.
5818 (i386_dr_low_get_control): Declare.
5819 (i386_dr_low_get_status): Change prototype.
5820
5821 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5822 (i386_dr_low_get_addr): New.
5823 (i386_dr_low_get_control): New.
5824 (i386_dr_low_get_status): Adjust prototype. Return
5825 dr_status_mirror.
5826 (i386_initial_stuff): Clear dr_status_mirror and
5827 dr_control_mirror.
5828 (i386_get_thread_context): Adjust.
5829 (i386_set_thread_context): Adjust.
5830 (i386_thread_added): Adjust.
5831
5f21a75b
PA
58322010-08-24 Pedro Alves <pedro@codesourcery.com>
5833
5834 * linux-low.h (linux_thread_area): Delete declaration.
5835
3e4c1235
TS
58362010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5837
5838 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5839 after its termination.
5840
1971b033
PA
58412010-08-09 Pedro Alves <pedro@codesourcery.com>
5842
5843 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5844 (gdb_wants_all_stopped): Delete.
5845 (linux_wait_1): Don't call them.
5846 * server.c (handle_v_cont): Tag all threads as want-stopped.
5847 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5848 stopped as "client-wants-stopped".
5849
310444ac
PA
58502010-07-31 Pedro Alves <pedro@codesourcery.com>
5851
5852 * Makefile.in (signals_h): New.
5853 (server_h): Depend on it.
5854 (server.o): Don't depend on $(signals_def).
5855 (signals.o): Depend on $(signals_def).
5856
a19cae16
JK
58572010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5858
5859 * Makefile.in (signals_def): New.
5860 (server_h): Append include/gdb/signals.h and signals_def.
5861 (server.o): Append signals_def.
5862
30d50328
JK
58632010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5864
5865 * server.c (handle_target_event): Use target_signal_to_host for
5866 resume_info.sig initialization.
5867 * target.h (struct thread_resume) <sig>: New comment.
5868
5c3216e2
OS
58692010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5870
c6f46ca0
OS
5871 * server.c (handle_query): strcpy() the returned string from paddress()
5872 instead of sprintf().
5c3216e2
OS
5873 * utils.c (paddress): Return phex_nz().
5874
6bd31874
JB
58752010-07-07 Joel Brobecker <brobecker@adacore.com>
5876
5877 * server.c (handle_v_cont): Call mourn_inferior if process
5878 just exited.
5879 (myresume): Likewise.
5880
0fb4aa4b
PA
58812010-07-01 Pedro Alves <pedro@codesourcery.com>
5882
5883 Static tracepoints, and integration with UST.
5884
5885 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5886 * mem-break.c (uninsert_all_breakpoints)
5887 (reinsert_all_breakpoints): New.
5888 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5889 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5890 (gdb_agent_ust_loaded, helper_thread_id)
5891 (gdb_agent_helper_thread_id): New macros.
5892 (struct ipa_sym_addresses): Add addr_ust_loaded,
5893 addr_helper_thread_id, addr_cmd_buf.
5894 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5895 (in_process_agent_loaded_ust): New.
5896 (write_e_ust_not_loaded): New.
5897 (maybe_write_ipa_ust_not_loaded): New.
5898 (struct collect_static_trace_data_action): New.
5899 (enum tracepoint_type) <static_tracepoint>: New.
5900 (struct tracepoint) <handle>: Mention static tracepoints.
5901 (struct static_tracepoint_ctx): New.
5902 (CMD_BUF_SIZE): New.
5903 (add_tracepoint_action): Handle static tracepoint actions.
5904 (unprobe_marker_at): New.
5905 (clear_installed_tracepoints): Handle static tracepoints.
5906 (cmd_qtdp): Handle static tracepoints.
5907 (probe_marker_at): New.
5908 (cmd_qtstart): Handle static tracepoints.
5909 (response_tracepoint): Handle static tracepoints.
5910 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5911 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5912 (get_context_regcache): Handle static tracepoints.
5913 (do_action_at_tracepoint): Handle static tracepoint actions.
5914 (traceframe_find_block_type): Handle static trace data blocks.
5915 (traceframe_read_sdata): New.
5916 (download_tracepoints): Download static tracepoint actions.
5917 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5918 (GDB_PROBE_NAME): New.
5919 (ust_ops): New.
5920 (GET_UST_SYM): New.
5921 (USTF): New.
5922 (dlsym_ust): New.
5923 (ust_marker_to_static_tracepoint): New.
5924 (gdb_probe): New.
5925 (collect_ust_data_at_tracepoint): New.
5926 (gdb_ust_probe): New.
5927 (UNIX_PATH_MAX, SOCK_DIR): New.
5928 (gdb_ust_connect_sync_socket): New.
5929 (resume_thread, stop_thread): New.
5930 (run_inferior_command): New.
5931 (init_named_socket): New.
5932 (gdb_ust_socket_init): New.
5933 (cstr_to_hexstr): New.
5934 (next_st): New.
5935 (first_marker, next_marker): New.
5936 (response_ust_marker): New.
5937 (cmd_qtfstm, cmd_qtsstm): New.
5938 (unprobe_marker_at, probe_marker_at): New.
5939 (cmd_qtstmat, gdb_ust_thread): New.
5940 (gdb_ust_init): New.
5941 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5942 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5943 (ST_REGENTRY): New.
5944 (x86_64_st_collect_regmap): New.
5945 (X86_64_NUM_ST_COLLECT_GREGS): New.
5946 (AMD64_RIP_REGNUM): New.
5947 (supply_static_tracepoint_registers): New.
5948 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5949 (ST_REGENTRY): New.
5950 (i386_st_collect_regmap): New.
5951 (i386_NUM_ST_COLLECT_GREGS): New.
5952 (supply_static_tracepoint_registers): New.
5953 * server.c (handle_query): Handle qXfer:statictrace:read.
5954 <qSupported>: Report support for StaticTracepoints, and
5955 qXfer:statictrace:read features.
5956 * server.h (traceframe_read_sdata)
5957 (supply_static_tracepoint_registers): Declare.
5958 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5959 (unpack_varlen_hex): Include in IPA build.
5960 * Makefile.in (ustlibs, ustinc): New.
5961 (IPA_OBJS): Add remote-utils-ipa.o.
5962 ($(IPA_LIB)): Link -ldl and -lpthread.
5963 (UST_CFLAGS): New.
5964 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5965 * config.in, configure: Regenerate.
5966
9e4344e5
PA
59672010-06-20 Ian Lance Taylor <iant@google.com>
5968 Pedro Alves <pedro@codesourcery.com>
5969
5970 * linux-x86-low.c (always_true): Delete.
5971 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5972 trying to fool the compiler with always_true.
5973
c6beb2cb
PA
59742010-06-20 Pedro Alves <pedro@codesourcery.com>
5975
5976 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5977 conditions in gdbserver.
5978
d2ed6730
UW
59792010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5980
5981 * spu-low.c (spu_read_memory): Wrap around local store limit.
5982 (spu_write_memory): Likewise.
5983
4e29fb54
PA
59842010-06-15 Pedro Alves <pedro@codesourcery.com>
5985
5986 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5987 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5988 LONGEST uses.
5989 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5990 uses.
5991 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5992 uses with LONGEST uses.
5993
6a271cae
PA
59942010-06-14 Stan Shebs <stan@codesourcery.com>
5995 Pedro Alves <pedro@codesourcery.com>
5996
5997 Bytecode compiler.
5998
5999 * linux-x86-low.c: Include limits.h.
6000 (add_insns): New.
6001 (always_true): New.
6002 (EMIT_ASM): New.
6003 (EMIT_ASM32): New.
6004 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6005 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6006 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6007 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6008 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6009 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6010 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6011 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6012 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6013 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6014 (amd64_emit_void_call_2): New.
6015 (amd64_emit_ops): New.
6016 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6017 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6018 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6019 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6020 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6021 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6022 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6023 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6024 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6025 (i386_emit_stack_adjust, i386_emit_int_call_1)
6026 (i386_emit_void_call_2): New.
6027 (i386_emit_ops): New.
6028 (x86_emit_ops): New.
6029 (the_low_target): Install x86_emit_ops.
6030 * server.h (struct emit_ops): New.
6031 (get_raw_reg_func_addr): Declare.
6032 (current_insn_ptr, emit_error): Declare.
6033 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6034 (set_trace_state_variable_value): New defines.
6035 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6036 addr_get_trace_state_variable_value and
6037 addr_set_trace_state_variable_value.
6038 (symbol_list): New fields for get_raw_reg,
6039 get_trace_state_variable_value and set_trace_state_variable_value.
6040 (condfn): New typedef.
6041 (struct tracepoint): New field `compiled_cond'.
6042 (do_action_at_tracepoint): Clear compiled_cond.
6043 (get_trace_state_variable_value, set_trace_state_variable_value):
6044 Export in the IPA.
6045 (condition_true_at_tracepoint): If there's a compiled condition,
6046 run that.
6047 (current_insn_ptr, emit_error): New globals.
6048 (struct bytecode_address): New.
6049 (get_raw_reg_func_addr): New.
6050 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6051 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6052 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6053 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6054 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6055 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6056 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6057 (compile_tracepoint_condition, compile_bytecodes): New.
6058 * target.h (emit_ops): Forward declare.
6059 (struct target_ops): New field emit_ops.
6060 (target_emit_ops): New.
6061 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6062 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6063 * linux-low.c (linux_emit_ops): New.
6064 (linux_target_ops): Install it.
6065 * linux-low.h (struct linux_target_ops): New field emit_ops.
6066
92b72907
UW
60672010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6068
6069 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6070 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6071
fa593d66
PA
60722010-06-01 Pedro Alves <pedro@codesourcery.com>
6073 Stan Shebs <stan@codesourcery.com>
6074
6075 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6076 (all): Depend on $(extra_libraries).
6077 (install-only): Install the IPA.
6078 (IPA_OBJS, IPA_LIB): New.
6079 (clean): Remove the IPA lib.
6080 (IPAGENT_CFLAGS): New.
6081 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6082 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6083 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6084 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6085 * configure.ac: Check for atomic builtins support in the compiler.
6086 (IPA_DEPFILES, extra_libraries): Define.
6087 * configure.srv (ipa_obj): Add description.
6088 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6089 (i[34567]86-*-linux*): Set ipa_obj.
6090 (x86_64-*-linux*): Set ipa_obj.
6091 * linux-low.c (stabilizing_threads): New.
6092 (supports_fast_tracepoints): New.
6093 (linux_detach): Stabilize threads before detaching.
6094 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6095 the lwp is either not stabilizing, or is moving out of a jump pad.
6096 (linux_fast_tracepoint_collecting): New.
6097 (maybe_move_out_of_jump_pad): New.
6098 (enqueue_one_deferred_signal): New.
6099 (dequeue_one_deferred_signal): New.
6100 (linux_wait_for_event_1): If moving out of a jump pad, defer
6101 pending signals to later.
6102 (linux_stabilize_threads): New.
6103 (linux_wait_1): Check if threads need moving out of jump pads, and
6104 do it if so.
6105 (stuck_in_jump_pad_callback): New.
6106 (move_out_of_jump_pad_callback): New.
6107 (lwp_running): New.
6108 (linux_resume_one_lwp): Handle moving out of jump pads.
6109 (linux_set_resume_request): Dequeue deferred signals.
6110 (need_step_over_p): Also step over fast tracepoint jumps.
6111 (start_step_over): Also uninsert fast tracepoint jumps.
6112 (finish_step_over): Also reinsert fast tracepoint jumps.
6113 (linux_install_fast_tracepoint_jump): New.
6114 (linux_target_ops): Install linux_stabilize_threads and
6115 linux_install_fast_tracepoint_jump_pad.
6116 * linux-low.h (linux_target_ops) <get_thread_area,
6117 install_fast_tracepoint_jump_pad>: New fields.
6118 (struct lwp_info) <collecting_fast_tracepoint,
6119 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6120 (linux_get_thread_area): Declare.
6121 * linux-x86-low.c (jump_insn): New.
6122 (x86_get_thread_area): New.
6123 (append_insns): New.
6124 (push_opcode): New.
6125 (amd64_install_fast_tracepoint_jump_pad): New.
6126 (i386_install_fast_tracepoint_jump_pad): New.
6127 (x86_install_fast_tracepoint_jump_pad): New.
6128 (the_low_target): Install x86_get_thread_area and
6129 x86_install_fast_tracepoint_jump_pad.
6130 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6131 (struct fast_tracepoint_jump): New.
6132 (fast_tracepoint_jump_insn): New.
6133 (fast_tracepoint_jump_shadow): New.
6134 (find_fast_tracepoint_jump_at): New.
6135 (fast_tracepoint_jump_here): New.
6136 (delete_fast_tracepoint_jump): New.
6137 (set_fast_tracepoint_jump): New.
6138 (uninsert_fast_tracepoint_jumps_at): New.
6139 (reinsert_fast_tracepoint_jumps_at): New.
6140 (set_breakpoint_at): Use write_inferior_memory.
6141 (uninsert_raw_breakpoint): Use write_inferior_memory.
6142 (check_mem_read): Mask out fast tracepoint jumps.
6143 (check_mem_write): Mask out fast tracepoint jumps.
6144 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6145 (set_fast_tracepoint_jump): Declare.
6146 (delete_fast_tracepoint_jump)
6147 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6148 (reinsert_fast_tracepoint_jumps_at): Declare.
6149 * regcache.c: Don't compile many functions when building the
6150 in-process agent library.
6151 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6152 the register buffer in the heap.
6153 (free_register_cache): If the register buffer isn't owned by the
6154 regcache, don't free it.
6155 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6156 pre-existing register caches.
6157 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6158 type.
6159 (convert_ascii_to_int): : Constify `from' parameter type.
6160 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6161 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6162 the needed buffer in-place.
6163 (relocate_instruction): New.
6164 * server.c (handle_query) <qSymbols>: If the target supports
6165 tracepoints, give it a chance of looking up symbols. Report
6166 support for fast tracepoints.
6167 (handle_status): Stabilize threads.
6168 (process_serial_event): Adjust.
6169 * server.h (struct fast_tracepoint_jump): Forward declare.
6170 (struct process_info) <fast_tracepoint_jumps>: New field.
6171 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6172 (decode_X_packet, decode_M_packet): Adjust.
6173 (relocate_instruction): Declare.
6174 (in_process_agent_loaded): Declare.
6175 (tracepoint_look_up_symbols): Declare.
6176 (struct fast_tpoint_collect_status): Declare.
6177 (fast_tracepoint_collecting): Declare.
6178 (force_unlock_trace_buffer): Declare.
6179 (handle_tracepoint_bkpts): Declare.
6180 (initialize_low_tracepoint)
6181 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6182 * target.h (struct target_ops) <stabilize_threads,
6183 install_fast_tracepoint_jump_pad>: New fields.
6184 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6185 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6186 [HAVE_STDINT_H]: Include stdint.h.
6187 (trace_debug_1): Rename to ...
6188 (trace_vdebug): ... this.
6189 (trace_debug): Rename to ...
6190 (trace_debug_1): ... this. Add `level' parameter.
6191 (trace_debug): New.
6192 (ATTR_USED, ATTR_NOINLINE): New.
6193 (IP_AGENT_EXPORT): New.
6194 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6195 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6196 (about_to_request_buffer_space, trace_buffer_is_full)
6197 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6198 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6199 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6200 (traceframe_write_count, traceframes_created)
6201 (trace_state_variables)
6202 New renaming defines.
6203 (struct ipa_sym_addresses): New.
6204 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6205 (symbol_list): New.
6206 (ipa_sym_addrs): New.
6207 (all_tracepoint_symbols_looked_up): New.
6208 (in_process_agent_loaded): New.
6209 (write_e_ipa_not_loaded): New.
6210 (maybe_write_ipa_not_loaded): New.
6211 (tracepoint_look_up_symbols): New.
6212 (debug_threads) [IN_PROCESS_AGENT]: New.
6213 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6214 (UNKNOWN_SIDE_EFFECTS): New.
6215 (stop_tracing): New.
6216 (flush_trace_buffer): New.
6217 (stop_tracing_bkpt): New.
6218 (flush_trace_buffer_bkpt): New.
6219 (read_inferior_integer): New.
6220 (read_inferior_uinteger): New.
6221 (read_inferior_data_pointer): New.
6222 (write_inferior_data_pointer): New.
6223 (write_inferior_integer): New.
6224 (write_inferior_uinteger): New.
6225 (struct collect_static_trace_data_action): Delete.
6226 (enum tracepoint_type): New.
6227 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6228 <actions_str, step_actions, step_actions_str>: Only include in
6229 GDBserver.
fa593d66
PA
6230 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6231 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6232 (tracepoints): Use IP_AGENT_EXPORT.
6233 (last_tracepoint): Don't include in the IPA.
6234 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6235 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6236 (alloced_trace_state_variables): New.
6237 (trace_state_variables): Use IP_AGENT_EXPORT.
6238 (traceframe_t): Delete unused variable.
6239 (circular_trace_buffer): Don't include in the IPA.
6240 (trace_buffer_start): Delete.
6241 (struct trace_buffer_control): New.
6242 (trace_buffer_free): Delete.
6243 (struct ipa_trace_buffer_control): New.
6244 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6245 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6246 New.
6247 (trace_buffer_ctrl): New.
6248 (TRACE_BUFFER_CTRL_CURR): New.
6249 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6250 Reimplement as macros.
6251 (trace_buffer_wrap): Delete.
6252 (traceframe_write_count, traceframe_read_count)
6253 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6254 (struct tracepoint_hit_ctx) <type>: New field.
6255 (struct fast_tracepoint_ctx): New.
6256 (memory_barrier): New.
6257 (cmpxchg): New.
6258 (record_tracepoint_error): Update atomically in the IPA.
6259 (clear_inferior_trace_buffer): New.
6260 (about_to_request_buffer_space): New.
6261 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6262 updating the same buffer.
6263 (add_tracepoint): Default the tracepoint's type to trap
6264 tracepoint, and orig_size to -1.
6265 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6266 internal variables.
6267 (create_trace_state_variable): New parameter `gdb'. Handle it.
6268 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6269 (cmd_qtdp): Handle fast tracepoints.
6270 (cmd_qtdv): Adjust.
6271 (max_jump_pad_size): New.
6272 (gdb_jump_pad_head): New.
6273 (get_jump_space_head): New.
6274 (claim_jump_space): New.
6275 (sort_tracepoints): New.
6276 (MAX_JUMP_SIZE): New.
6277 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6278 IPA.
6279 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6280 support. Upload fast traceframes, and delete internal IPA
6281 breakpoints.
6282 (stop_tracing_handler): New.
6283 (flush_trace_buffer_handler): New.
6284 (cmd_qtstop): Upload fast tracepoints.
6285 (response_tracepoint): Handle fast tracepoints.
6286 (tracepoint_finished_step): Upload fast traceframes. Set the
6287 tracepoint hit context's tracepoint type.
6288 (handle_tracepoint_bkpts): New.
6289 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6290 type. Add comment about fast tracepoints.
6291 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6292 non-existing action_str field.
6293 (get_context_regcache): Handle fast tracepoints.
6294 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6295 to the regcache.
6296 (fast_tracepoint_from_jump_pad_address): New.
6297 (fast_tracepoint_from_ipa_tpoint_address): New.
6298 (collecting_t): New.
6299 (force_unlock_trace_buffer): New.
6300 (fast_tracepoint_collecting): New.
6301 (collecting): New.
6302 (gdb_collect): New.
6303 (write_inferior_data_ptr): New.
6304 (target_tp_heap): New.
6305 (target_malloc): New.
6306 (download_agent_expr): New.
6307 (UALIGN): New.
6308 (download_tracepoints): New.
6309 (download_trace_state_variables): New.
6310 (upload_fast_traceframes): New.
6311 (IPA_FIRST_TRACEFRAME): New.
6312 (IPA_NEXT_TRACEFRAME_1): New.
6313 (IPA_NEXT_TRACEFRAME): New.
6314 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6315 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6316 (gdb_jump_pad_buffer_end): New.
6317 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6318 (initialize_tracepoint): Adjust.
6319 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6320 buffer. Initialize the low module.
6321 * utils.c (PREFIX, TOOLNAME): New.
6322 (malloc_failure): Use PREFIX.
6323 (error): In the IPA, an error causes an exit.
6324 (fatal, warning): Use PREFIX.
6325 (internal_error): Use TOOLNAME.
6326 (NUMCELLS): Increase to 10.
6327 * configure, config.in: Regenerate.
6328
d149dd1d
PA
63292010-06-01 Pedro Alves <pedro@codesourcery.com>
6330
6331 * server.c (handle_query) <qSupported>: Do two passes over the
6332 qSupported string to avoid nesting strtok.
6333
f6528abd
JK
63342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6335
6336 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6337 (CDEPS): New.
6338 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6339 -Wl,--dynamic-list.
6340 * configure: Regenerate.
6341 * proc-service.list: New.
6342
ca2a87a0
JK
63432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6344
6345 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6346 New comment.
6347
363a6e9f
OS
63482010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6349
6350 * gdbreplay.c (remote_open): Check error return from socket() call by
6351 its equality to -1 not by it being negative.
6352 * remote-utils.c (remote_open): Likewise.
6353
d23b6cb1
PA
63542010-05-23 Pedro Alves <pedro@codesourcery.com>
6355
6356 * config.h: Regenerate.
6357
28d3cf85
MK
63582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6359
6360 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6361 doesn't provide PTRACE_GET_THREAD_AREA.
6362
fea36a59
MK
63632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6364
6365 * linux-m68k-low.c: Include <asm/ptrace.h>
6366 (ps_get_thread_area): Implement.
6367
24b066ba
DE
63682010-05-03 Doug Evans <dje@google.com>
6369
6370 * event-loop.c (struct callback_event): New struct.
6371 (callback_list): New global.
6372 (append_callback_event, delete_callback_event): New functions.
6373 (process_callback): New function.
6374 (start_event_loop): Call it.
6375 * remote-utils.c (NOT_SCHEDULED): Define.
6376 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6377 moved out of readchar.
6378 (readchar): Rewrite. Call reschedule before returning.
6379 (reset_readchar): New function.
6380 (remote_close): Call it.
6381 (process_remaining, reschedule): New functions.
6382 * server.h (callback_handler_func): New typedef.
6383 (append_callback_event, delete_callback_event): Declare.
6384
9836d6ea
PA
63852010-05-03 Pedro Alves <pedro@codesourcery.com>
6386
6387 * proc-service.c (ps_pglobal_lookup): Use
6388 thread_db_look_up_one_symbol.
6389 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6390 parameter. Use it instead of all_symbols_looked_up.
6391 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6392 field.
6393 (all_symbols_looked_up): Don't declare.
6394 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6395 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6396 field.
6397 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6398 Set all_symbols_looked_up here.
6399 (thread_db_look_up_one_symbol): New.
6400 (thread_db_get_tls_address): Adjust.
6401 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6402 thread_db object on the heap, and tentatively set it in the
6403 process structure.
6404 (thread_db_init): Don't set all_symbols_looked_up here.
6405 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6406
7984d532
PA
64072010-05-03 Pedro Alves <pedro@codesourcery.com>
6408
6409 * linux-low.c (linux_kill, linux_detach): Adjust.
6410 (status_pending_p_callback): Remove redundant statement. Check
6411 for !TARGET_WAITIKIND_IGNORE, instead of
6412 TARGET_WAITKIND_STOPPED.
6413 (handle_tracepoints): Make sure LWP is locked. Adjust.
6414 (linux_wait_for_event_1): Adjust.
6415 (linux_cancel_breakpoints): New.
6416 (unsuspend_one_lwp): New.
6417 (unsuspend_all_lwps): New.
6418 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6419 (send_sigstop_callback): Change return type to int, add new
6420 `except' parameter and handle it.
6421 (suspend_and_send_sigstop_callback): New.
6422 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6423 pass them down. If SUSPEND, also increment the lwp's suspend
6424 count.
6425 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6426 (need_step_over_p): Don't consider suspended LWPs.
6427 (start_step_over): Adjust.
6428 (proceed_one_lwp): Change return type to int, add new `except'
6429 parameter and handle it.
6430 (unsuspend_and_proceed_one_lwp): New.
6431 (proceed_all_lwps): Use find_inferior instead of
6432 for_each_inferior.
6433 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6434 also decrement the suspend count of LWPs. Pass `except' down,
6435 instead of hacking its suspend count.
6436 (linux_pause_all): Add `freeze' parameter. Adjust.
6437 (linux_unpause_all): New.
6438 (linux_target_ops): Install linux_unpause_all.
6439 * server.c (handle_status): Adjust.
6440 * target.h (struct target_ops): New fields `unpause_all' and
6441 `cancel_breakpoints'. Add new parameter to `pause_all'.
6442 (pause_all): Add new `freeze' parameter.
6443 (unpause_all): New.
6444 (cancel_breakpoints): New.
6445 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6446 cancel breakpoints.
6447 (cmd_qtstart): Pause threads.
6448 (stop_tracing): Pause threads, and cancel breakpoints.
6449 * win32-low.c (win32_target_ops): Adjust.
6450
e471f25b
PA
64512010-05-03 Pedro Alves <pedro@codesourcery.com>
6452
6453 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6454 the inferior right away from here...
6455 (linux_wait_1): ... to here, and adjust to check the thread's
6456 last_resume_kind instead of the lwp's step or stop_expected flags.
6457
1915ef4f
PA
64582010-05-02 Pedro Alves <pedro@codesourcery.com>
6459
6460 * README: Use consistent `GDB' and `GDBserver' spellings.
6461
f9e39928
PA
64622010-05-02 Pedro Alves <pedro@codesourcery.com>
6463
6464 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6465 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6466 (linux_detach_one_lwp): Assume the lwp is stopped.
6467 (any_thread_of): Delete.
6468 (linux_detach): Stop all lwps here. Don't blindly delete all
6469 breakpoints.
6470 (delete_lwp_callback): New.
6471 (linux_mourn): Delete all lwps of the process that is gone.
6472 (linux_wait_1): Don't delete the last lwp of the process here.
6473 * mem-break.h (mark_breakpoints_out): Declare.
6474 * mem-break.c (mark_breakpoints_out): New.
6475 (free_all_breakpoints): Use it.
6476 * server.c (handle_target_event): If the process is gone, mark
6477 breakpoints out.
6478 * thread-db.c (struct thread_db) <create_bp>: New field.
6479 (thread_db_enable_reporting): Fix prototype. Store a thread event
6480 breakpoint reference in the thread_db struct.
6481 (thread_db_load_search): Clear the thread_db object.
6482 (try_thread_db_load_1): Ditto.
6483 (switch_to_process): New.
6484 (disable_thread_event_reporting): Use it.
6485 (remove_thread_event_breakpoints): New.
6486 (thread_db_detach, thread_db_mourn): Use it.
6487
1e7fc18c
PA
64882010-05-01 Pedro Alves <pedro@codesourcery.com>
6489
6490 * linux-low.c (linux_enable_event_reporting): New.
6491 (linux_wait_for_event_1, handle_extended_wait): Use it.
6492
02fc4de7
PA
64932010-04-30 Pedro Alves <pedro@codesourcery.com>
6494
6495 * linux-low.c (linux_kill_one_lwp, linux_kill)
6496 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6497 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6498 SIGSTOP even if the LWP is stopped.
6499 (send_sigstop_callback): New.
6500 (stop_all_lwps): Use send_sigstop_callback instead.
6501 (linux_resume_one_thread): Adjust.
6502 (proceed_one_lwp): Still proceed an LWP that the client has
6503 requested to stop, if we haven't reported it as stopped yet. Make
6504 sure that LWPs the client want stopped, have a pending SIGSTOP.
6505
bc3b5632
DE
65062010-04-26 Doug Evans <dje@google.com>
6507
ae1ada35
DE
6508 * server.c (handle_general_set): Make static.
6509
bc3b5632
DE
6510 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6511 Print received char after testing for error/eof instead of before.
6512 (input_interrupt): Tweak comment.
6513
65730243
DE
65142010-04-23 Doug Evans <dje@google.com>
6515
6516 * server.c (start_inferior): Print inferior argv if --debug.
6517
a8ae7dc0
AR
65182010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6519
6520 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6521 * nto-x86-low.c: Include server.h
6522
1c07cc19
PM
65232010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6524
6525 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6526 be consistent with other sources of this directory.
6527 (init_registers_amd64): Correct name of source file of this function
6528 in the comment.
6529
e0a61e09
PM
65302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6531
6532 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6533 64-bit executables.
6534
54709339
PM
65352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6536
6537 * win32-i386-low.c: Add 64-bit support.
6538 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6539 (init_registers_amd64): Declare.
6540 (mappings): Add 64-bit version of array.
6541 (init_windows_x86): New function.
6542 (the_low_target): Change init_arch field to init_windows_x86.
6543
e8f0053d
PM
65442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6545
6546 * win32-low.c: Adapt to support also 64-bit architecture.
6547 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6548 (get_image_name): Use SIZE_T type for local variable `done'.
6549 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6550 (toolhelp_get_dll_name): Idem.
6551 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6552 Use uintptr_t typecast to avoid warning.
6553 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6554 (handle_exception): Use phex_nz to avoid warning.
6555 (win32_wait): Remove unused local variable `process'.
6556
c481e77e
PM
65572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6558
6559 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6560 `amd64-avx.o'.
6561
12ea4b69
PM
65622010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6563
6564 * configure.ac: Use `ws2_32' library for srv_mingw.
6565 * configure: Regenerate.
6566 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6567 * remote-utils.c: Likewise.
6568
f6d1620c
L
65692010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6570
6571 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6572 if __x86_64__ is defined.
6573
8e642873
PM
65742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6575
6576 * configure: Regenerate.
6577
711e434b
PM
65782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6579
6580 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6581 * target.h (target_ops): New get_tib_address field.
6582 * win32-low.h (win32_thread_info): Add thread_local_base field.
6583 * win32-low.c (child_add_thread): Add tlb argument.
6584 Set thread_local_base field to TLB.
6585 (get_child_debug_event): Adapt to child_add_thread change.
6586 (win32_get_tib_address): New function.
6587 (win32_target_ops): Set get_tib_address field to
6588 win32_get_tib_address.
6589 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6590
505106cd
PA
65912010-04-12 Pedro Alves <pedro@codesourcery.com>
6592
505106cd
PA
6593 * linux-low.c (linux_mourn): Also remove the process.
6594 * server.c (handle_target_event): Don't remove the process here.
6595 * nto-low.c (nto_mourn): New.
6596 (nto_target_ops): Install it.
6597 * spu-low.c (spu_mourn): New.
6598 (spu_target_ops): Install it.
6599 * win32-low.c (win32_mourn): New.
6600 (win32_target_ops): Install it.
6601
e8470a06
PA
66022010-04-12 Pedro Alves <pedro@codesourcery.com>
6603
6604 * server.h (buffer_xml_printf): Remove redundant `;'.
6605
45ba0d02
PA
66062010-04-12 Pedro Alves <pedro@codesourcery.com>
6607
6608 * regcache.c (set_register_cache): Invalidate regcaches before
6609 changing the register cache layout.
6610 (regcache_invalidate_one): Allow a NULL regcache.
6611 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6612 regcaches before changing the register cache layout or the target
6613 regsets.
6614
59e04013
L
66152010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6616
6617 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6618 variable warning on Linux/x86-64.
6619
8336d594
PA
66202010-04-11 Pedro Alves <pedro@codesourcery.com>
6621
6622 GDBserver disconnected tracing support.
6623
6624 * linux-low.c (linux_remove_process): Delete.
6625 (add_lwp): Don't set last_resume_kind here.
6626 (linux_kill): Use `mourn'.
6627 (linux_detach): Use `thread_db_detach', and `mourn'.
6628 (linux_mourn): New.
6629 (linux_attach_lwp_1): Adjust comment.
6630 (linux_attach): last_resume_kind moved the thread_info; adjust.
6631 (status_pending_p_callback): Adjust.
6632 (linux_wait_for_event_1): Adjust.
6633 (count_events_callback, select_singlestep_lwp_callback)
6634 (select_event_lwp_callback, cancel_breakpoints_callback)
6635 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6636 (proceed_one_lwp): Adjust.
6637 (linux_async): Add debug output.
6638 (linux_thread_stopped): New.
6639 (linux_pause_all): New.
6640 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6641 linux_pause_all.
6642 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6643 (thread_db_free): Delete declaration.
6644 (thread_db_detach, thread_db_mourn): Declare.
6645 * thread-db.c (thread_db_init): Use thread_db_mourn.
6646 (thread_db_free): Delete, split in two.
6647 (disable_thread_event_reporting): New.
6648 (thread_db_detach): New.
6649 (thread_db_mourn): New.
6650
6651 * server.h (struct thread_info) <last_resume_kind>: New field.
6652 <attached>: Add comment.
6653 <gdb_detached>: New field.
6654 (handler_func): Change return type to int.
6655 (handle_serial_event, handle_target_event): Ditto.
6656 (gdb_connected): Declare.
6657 (tracing): Delete.
6658 (disconnected_tracing): Declare.
6659 (stop_tracing): Declare.
6660
6661 * server.c (handle_query) <qSupported>: Report support for
6662 disconnected tracing.
6663 (queue_stop_reply_callback): Account for running threads.
6664 (gdb_wants_thread_stopped): New.
6665 (gdb_wants_all_threads_stopped): New.
6666 (gdb_reattached_process): New.
6667 (handle_status): Clear the `gdb_detached' flag of all processes.
6668 In all-stop, stop all threads.
6669 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6670 (process_serial_event): If the remote connection breaks, or if an
6671 exit was forced with "monitor exit", force an event loop exit.
6672 Handle disconnected tracing on detach.
6673 (handle_serial_event): Adjust.
6674 (handle_target_event): If GDB isn't connected, forward events back
6675 to the inferior, unless the last process exited, in which case,
6676 exit gdbserver. Adjust interface.
6677
6678 * remote-utils.c (remote_open): Don't block in accept. Instead
6679 register an event loop source on the listen socket file
6680 descriptor. Refactor bits into ...
6681 (listen_desc): ... this new global.
6682 (gdb_connected): ... this new function.
6683 (enable_async_notification): ... this new function.
6684 (handle_accept_event): ... this new function.
6685 (remote_close): Clear remote_desc.
6686
6687 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6688
6689 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6690 New fields.
6691 (mourn_inferior): Define.
6692 (target_process_qsupported): Avoid the dangling else problem.
6693 (thread_stopped): Define.
6694 (pause_all): Define.
6695 (target_waitstatus_to_string): Declare.
6696 * target.c (target_waitstatus_to_string): New.
6697
6698 * tracepoint.c (tracing): Make extern.
6699 (disconnected_tracing): New.
6700 (stop_tracing): Make extern. Handle tracing stops due to GDB
6701 disconnecting.
6702 (cmd_qtdisconnected): New.
6703 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6704 (handle_tracepoint_general_set): Handle QTDisconnected.
6705
6706 * event-loop.c (event_handler_func): Change return type to int.
6707 (process_event): Bail out if the event handler wants the event
6708 loop to stop.
6709 (handle_file_event): Ditto.
6710 (start_event_loop): Bail out if the event handler wants the event
6711 loop to stop.
6712
6713 * nto-low.c (nto_target_ops): Adjust.
6714 * spu-low.c (spu_wait): Don't remove the process here.
6715 (spu_target_ops): Adjust.
6716 * win32-low.c (win32_wait): Don't remove the process here.
6717 (win32_target_ops): Adjust.
6718
5d267c4c
PA
67192010-04-11 Pedro Alves <pedro@codesourcery.com>
6720
6721 * regcache.c (realloc_register_cache): Invalidate inferior's
6722 regcache before recreating it.
6723
623ccd72
PA
67242010-04-09 Pedro Alves <pedro@codesourcery.com>
6725
6726 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6727
219f2f23
PA
67282010-04-09 Stan Shebs <stan@codesourcery.com>
6729 Pedro Alves <pedro@codesourcery.com>
6730
6731 * server.h (LONGEST): New.
6732 (struct thread_info) <while_stepping>: New field.
6733 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6734 Declare.
6735 (initialize_tracepoint, handle_tracepoint_general_set)
6736 (handle_tracepoint_query, tracepoint_finished_step)
6737 (tracepoint_was_hit, release_while_stepping_state_list):
6738 (current_traceframe): Declare.
6739 * server.c (handle_general_set): Handle tracepoint packets.
6740 (read_memory): New.
6741 (write_memory): New.
6742 (handle_search_memory_1): Use read_memory.
6743 (handle_query): Report support for conditional tracepoints, trace
6744 state variables, and tracepoint sources. Handle tracepoint
6745 queries.
6746 (main): Initialize the tracepoints module.
6747 (process_serial_event): Handle traceframe reads/writes.
6748
6749 * linux-low.c (handle_tracepoints): New.
6750 (linux_wait_1): Call it.
6751 (linux_resume_one_lwp): Handle while-stepping.
6752 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6753 (linux_target_ops): Install them.
6754 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6755 New field.
6756 * linux-x86-low.c (x86_supports_tracepoints): New.
6757 (the_low_target). Install it.
6758
6759 * mem-break.h (delete_breakpoint): Declare.
6760 * mem-break.c (delete_breakpoint): Make external.
6761
6762 * target.h (struct target_ops): Add `supports_tracepoints',
6763 `read_pc', and `write_pc' fields.
6764 (target_supports_tracepoints): Define.
6765 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6766 (phex_nz): New.
6767
6768 * regcache.h (struct regcache) <registers_owned>: New field.
6769 (init_register_cache, regcache_cpy): Declare.
6770 (regcache_read_pc, regcache_write_pc): Declare.
6771 (register_cache_size): Declare.
6772 (supply_regblock): Declare.
6773 * regcache.c (init_register_cache): New.
6774 (new_register_cache): Use it.
6775 (regcache_cpy): New.
6776 (register_cache_size): New.
6777 (supply_regblock): New.
6778 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6779
219f2f23
PA
6780 * tracepoint.c: New.
6781
6782 * Makefile.in (OBS): Add tracepoint.o.
6783 (tracepoint.o): New rule.
6784
3a13a53b
L
67852010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6786
6787 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6788 (i386-mmx.o): New.
6789 (i386-mmx.c): Likewise.
6790 (i386-mmx-linux.o): Likewise.
6791 (i386-mmx-linux.c): Likewise.
6792
6793 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6794 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6795 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6796 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6797
6798 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6799 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6800 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6801
1570b33e
L
68022010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6803
6804 * Makefile.in (clean): Updated.
6805 (i386-avx.o): New.
6806 (i386-avx.c): Likewise.
6807 (i386-avx-linux.o): Likewise.
6808 (i386-avx-linux.c): Likewise.
6809 (amd64-avx.o): Likewise.
6810 (amd64-avx.c): Likewise.
6811 (amd64-avx-linux.o): Likewise.
6812 (amd64-avx-linux.c): Likewise.
6813
6814 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6815 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6816 (srv_amd64_regobj): Add amd64-avx.o.
6817 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6818 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6819 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6820 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6821 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6822 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6823 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6824
6825 * i387-fp.c: Include "i386-xstate.h".
6826 (i387_xsave): New.
6827 (i387_cache_to_xsave): Likewise.
6828 (i387_xsave_to_cache): Likewise.
6829 (x86_xcr0): Likewise.
6830
6831 * i387-fp.h (i387_cache_to_xsave): Likewise.
6832 (i387_xsave_to_cache): Likewise.
6833 (x86_xcr0): Likewise.
6834
6835 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6836 * linux-crisv32-low.c (target_regsets): Likewise.
6837 * linux-m68k-low.c (target_regsets): Likewise.
6838 * linux-mips-low.c (target_regsets): Likewise.
6839 * linux-ppc-low.c (target_regsets): Likewise.
6840 * linux-s390-low.c (target_regsets): Likewise.
6841 * linux-sh-low.c (target_regsets): Likewise.
6842 * linux-sparc-low.c (target_regsets): Likewise.
6843 * linux-xtensa-low.c (target_regsets): Likewise.
6844
6845 * linux-low.c: Include <sys/uio.h>.
6846 (regsets_fetch_inferior_registers): Support nt_type.
6847 (regsets_store_inferior_registers): Likewise.
6848 (linux_process_qsupported): New.
6849 (linux_target_ops): Add linux_process_qsupported.
6850
6851 * linux-low.h (regset_info): Add nt_type.
6852 (linux_target_ops): Add process_qsupported.
6853
6854 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6855 and <sys/uio.h>.
6856 (init_registers_i386_avx_linux): New.
6857 (init_registers_amd64_avx_linux): Likewise.
6858 (xmltarget_i386_linux_no_xml): Likewise.
6859 (xmltarget_amd64_linux_no_xml): Likewise.
6860 (PTRACE_GETREGSET): Likewise.
6861 (PTRACE_SETREGSET): Likewise.
6862 (x86_fill_xstateregset): Likewise.
6863 (x86_store_xstateregset): Likewise.
6864 (use_xml): Likewise.
6865 (x86_linux_update_xmltarget): Likewise.
6866 (x86_linux_process_qsupported): Likewise.
6867 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6868 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6869 init_registers_i386_linux here. Call
6870 x86_linux_update_xmltarget.
6871 (the_low_target): Add x86_linux_process_qsupported.
6872
6873 * server.c (handle_query): Call target_process_qsupported.
6874
6875 * target.h (target_ops): Add process_qsupported.
6876 (target_process_qsupported): New.
6877
fc7238bb
PA
68782010-04-03 Pedro Alves <pedro@codesourcery.com>
6879
6880 * inferiors.c (add_thread): Set last_status kind to
6881 TARGET_WAITKIND_IGNORE.
6882 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6883 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6884 (linux_wait_1): Move `thread' local definition to block that uses
6885 it. Don't NULL initialize `event_child'.
6886 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6887 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6888 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6889
bdabb078
PA
68902010-04-01 Pedro Alves <pedro@codesourcery.com>
6891
6892 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6893 an extended waitstatus, or by a watchpoint.
6894 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6895 thread was stepping or has been stopped by a watchpoint.
6896
d3bbe7a0
PA
68972010-04-01 Pedro Alves <pedro@codesourcery.com>
6898
6899 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6900 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6901 of another, then delete the previous, and validate all
6902 breakpoints.
6903 (validate_inserted_breakpoint): New.
6904 (delete_disabled_breakpoints): New.
6905 (validate_breakpoints): New.
6906 (check_mem_read): Validate breakpoints before trusting their
6907 shadow. Delete disabled breakpoints.
6908 (check_mem_write): Validate breakpoints before trusting they
6909 should be inserted. Delete disabled breakpoints.
6910 * mem-break.h (validate_breakpoints):
6911 * server.c (handle_query): Validate breakpoints when we see a
6912 qSymbol query.
6913
8b07ae33
PA
69142010-04-01 Pedro Alves <pedro@codesourcery.com>
6915
6916 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6917 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6918 if we could tell there's a GDB breakpoint at stop_pc.
6919 (need_step_over_p): Don't do a step over if we find a GDB
6920 breakpoint at the resume PC.
6921
6922 * mem-break.c (struct raw_breakpoint): New.
6923 (enum bkpt_type): New type `gdb_breakpoint'.
6924 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6925 fields. New field `raw'.
6926 (find_raw_breakpoint_at): New.
6927 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6928 breakpoint instead.
6929 (set_breakpoint_at): Adjust.
6930 (delete_raw_breakpoint): New.
6931 (release_breakpoint): New.
6932 (delete_breakpoint): Rename to...
6933 (delete_breakpoint_1): ... this. Add proc parameter. Use
6934 release_breakpoint. Return ENOENT.
6935 (delete_breakpoint): Reimplement.
6936 (find_breakpoint_at): Delete.
6937 (find_gdb_breakpoint_at): New.
6938 (delete_breakpoint_at): Delete.
6939 (set_gdb_breakpoint_at): New.
6940 (delete_gdb_breakpoint_at): New.
6941 (gdb_breakpoint_here): New.
6942 (set_reinsert_breakpoint): Use release_breakpoint.
6943 (uninsert_breakpoint): Rename to ...
6944 (uninsert_raw_breakpoint): ... this.
6945 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6946 (reinsert_raw_breakpoint): Change parameter type to
6947 raw_breakpoint.
6948 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6949 instead.
6950 (check_breakpoints): Adjust. Use release_breakpoint.
6951 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6952 (breakpoint_inserted_here): Ditto.
6953 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6954 Don't trust the breakpoint's shadow if it is not inserted.
6955 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6956 (delete_all_breakpoints): Adjust.
6957 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6958 use delete_breakpoint_1.
6959
6960 * mem-break.h (breakpoints_supported): Delete declaration.
6961 (set_gdb_breakpoint_at): Declare.
6962 (gdb_breakpoint_here): Declare.
6963 (delete_breakpoint_at): Delete.
6964 (delete_gdb_breakpoint_at): Declare.
6965
6966 * server.h (struct raw_breakpoint): Forward declare.
6967 (struct process_info): New field `raw_breakpoints'.
6968
6969 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6970 breakpoints.
6971
6bf5e0ba
PA
69722010-03-24 Pedro Alves <pedro@codesourcery.com>
6973
6974 * linux-low.c (status_pending_p_callback): Fix comment.
6975 (linux_wait_for_event_1): Move most of the internal breakpoint
6976 handling from here...
6977 (linux_wait_1): ... to here.
6978 (count_events_callback): New.
6979 (select_singlestep_lwp_callback): New.
6980 (select_event_lwp_callback): New.
6981 (cancel_breakpoints_callback): New.
6982 (select_event_lwp): New.
6983 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6984 priority to all LWPs that have had events that should be reported
6985 to the client. Cancel breakpoints when about to reporting the
6986 event to the client, not while stopping lwps. No longer cancel
6987 finished single-steps here.
6988 (cancel_finished_single_step): Delete.
6989 (cancel_finished_single_steps): Delete.
6990
414a389f
PA
69912010-03-24 Pedro Alves <pedro@codesourcery.com>
6992
6993 * mem-break.c (enum bkpt_type): New.
6994 (struct breakpoint): New field `type'.
6995 (set_breakpoint_at): Change return type to struct breakpoint
6996 pointer. Set type to `other_breakpoint' by default.
6997 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6998 in the breakpoint list.
6999 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7000 (reinsert_breakpoint): Rename to ...
7001 (reinsert_raw_breakpoint): ... this.
7002 (reinsert_breakpoints_at): Adjust.
7003 * mem-break.h (struct breakpoint): Declare.
7004 (set_breakpoint_at): Change return type to struct breakpoint
7005 pointer.
7006
2280c721
PA
70072010-03-24 Pedro Alves <pedro@codesourcery.com>
7008
7009 * server.c (handle_query): Assign, not compare.
7010
d50171e4
PA
70112010-03-24 Pedro Alves <pedro@codesourcery.com>
7012
7013 Teach linux gdbserver to step-over-breakpoints.
7014
7015 * linux-low.c (can_hardware_single_step): New.
7016 (supports_breakpoints): New.
7017 (handle_extended_wait): If stopping threads, read the stop pc of
7018 the new cloned LWP.
7019 (get_pc): New.
7020 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7021 low target doesn't support retrieving the PC.
7022 (add_lwp): Set last_resume_kind to resume_continue.
7023 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7024 (linux_attach): Don't clear stop_expected. Set the lwp's
7025 last_resume_kind to resume_stop.
7026 (linux_detach_one_lwp): Don't check for removed breakpoints.
7027 (check_removed_breakpoint): Delete.
7028 (status_pending_p): Rename to ...
7029 (status_pending_p_callback): ... this. Don't check for removed
7030 breakpoints. Don't consider threads that are stopped from GDB's
7031 perspective.
7032 (linux_wait_for_lwp): Always read the stop_pc here.
7033 (cancel_breakpoint): New.
7034 (step_over_bkpt): New global.
7035 (linux_wait_for_event_1): Implement stepping over breakpoints.
7036 (gdb_wants_lwp_stopped): New.
7037 (gdb_wants_all_stopped): New.
7038 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7039 single-step traps here. Store the thread's last reported target
7040 wait status.
7041 (send_sigstop): Don't clear stop_expected. Always set it,
7042 instead.
7043 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7044 (cancel_finished_single_step): New.
7045 (cancel_finished_single_steps): New.
7046 (wait_for_sigstop): Don't cancel finished single-step traps here.
7047 (linux_resume_one_lwp): Don't check for removed breakpoints.
7048 Don't set `step' on non-hardware step archs.
7049 (linux_set_resume_request): Ignore resume_stop requests if already
7050 stopping or stopped. Set the lwp's last_resume_kind.
7051 (resume_status_pending_p): Don't check for removed breakpoints.
7052 (need_step_over_p): New.
7053 (start_step_over): New.
7054 (finish_step_over): New.
7055 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7056 requests. Clear the thread's last reported target waitstatus.
7057 Don't use the `suspended' flag. Don't consider pending breakpoints.
7058 (linux_resume): Start a step-over if necessary.
7059 (proceed_one_lwp): New.
7060 (proceed_all_lwps): New.
7061 (unstop_all_lwps): New.
7062 * linux-low.h (struct lwp_info): Rewrite comment for the
7063 `suspended' flag. Add the `stop_pc' field. Delete the
7064 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7065 Add `'last_resume_kind' and `need_step_over' fields.
7066 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7067 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7068 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7069 (set_raw_breakpoint_at): New.
7070 (set_breakpoint_at): Rewrite to use it.
7071 (reinsert_breakpoint_handler): Delete.
7072 (set_reinsert_breakpoint): New.
7073 (reinsert_breakpoint_by_bp): Delete.
7074 (delete_reinsert_breakpoints): New.
7075 (uninsert_breakpoint): Rewrite.
7076 (uninsert_breakpoints_at): New.
7077 (reinsert_breakpoint): Rewrite.
7078 (reinsert_breakpoints_at): New.
7079 (check_breakpoints): Rewrite.
7080 (breakpoint_here): New.
7081 (breakpoint_inserted_here): New.
7082 (check_mem_read): Adjust.
7083 * mem-break.h (breakpoints_supported, breakpoint_here)
7084 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7085 (reinsert_breakpoint_by_bp): Delete declaration.
7086 (delete_reinsert_breakpoints): Declare.
7087 (reinsert_breakpoint): Delete declaration.
7088 (reinsert_breakpoints_at): Declare.
7089 (uninsert_breakpoint): Delete declaration.
7090 (uninsert_breakpoints_at): Declare.
7091 (check_breakpoints): Adjust prototype.
7092 * server.h: Adjust include order.
7093 (struct thread_info): Declare here. Add a `last_status' field.
7094
30ba68cb
MS
70952010-03-23 Michael Snyder <msnyder@vmware.com>
7096
7097 * server.c (crc32): New function.
7098 (handle_query): Add handling for 'qCRC:' request.
7099
b9a881c2
PA
71002010-03-23 Pedro Alves <pedro@codesourcery.com>
7101
7102 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7103 lwp had been stopped by a watchpoint.
7104
e92d13d5
PA
71052010-03-16 Pedro Alves <pedro@codesourcery.com>
7106
7107 * server.h (internal_error): Declare.
7108 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7109 * utils.c (internal_error): New function.
7110
64daa791
AS
71112010-03-15 Andreas Schwab <schwab@redhat.com>
7112
7113 * configure.srv: Fix typo setting srv_regobj.
7114
f52cd8cd
PA
71152010-03-15 Pedro Alves <pedro@codesourcery.com>
7116
7117 * linux-low.c (fetch_register): Avoid passing a non string literal
7118 format to `error'.
7119 (usr_store_inferior_registers): Ditto.
7120
93ae6fdc
PA
71212010-03-14 Pedro Alves <pedro@codesourcery.com>
7122
7123 * linux-low.c (linux_write_memory): Bail out early if peeking
7124 memory failed.
7125
c3adc08c
PA
71262010-03-14 Pedro Alves <pedro@codesourcery.com>
7127
7128 * linux-low.h (struct lwp_info): New fields
7129 `stopped_by_watchpoint' and `stopped_data_address'.
7130 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7131 here, and cache them in the lwp object.
7132 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7133 directly.
7134 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7135 field.
7136 (linux_stopped_by_watchpoint): Rewrite.
7137 (linux_stopped_data_address): Rewrite.
7138
bce522a2
PA
71392010-03-06 Simo Melenius <simo.melenius@iki.fi>
7140
7141 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7142 switching the current inferior, not before.
7143
90884b2b
L
71442010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7145
7146 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7147 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7148 i386-linux.c and amd64-linux.c.
7149 (reg-i386.o): Removed.
7150 (reg-i386.c): Likewise.
7151 (reg-i386-linux.o): Likewise.
7152 (reg-i386-linux.c): Likewise.
7153 (reg-x86-64.o): Likewise.
7154 (reg-x86-64.c): Likewise.
7155 (reg-x86-64-linux.o): Likewise.
7156 (reg-x86-64-linux.c): Likewise.
7157 (i386.o): New.
7158 (i386.c): Likewise.
7159 (i386-linux.o): Likewise.
7160 (i386-linux.c): Likewise.
7161 (amd64.o): Likewise.
7162 (amd64.c): Likewise.
7163 (amd64-linux.o): Likewise.
7164 (amd64-linux.c): Likewise.
7165
7166 * configure.srv (srv_i386_regobj): New.
7167 (srv_i386_linux_regobj): Likewise.
7168 (srv_amd64_regobj): Likewise.
7169 (srv_amd64_linux_regobj): Likewise.
7170 (srv_i386_32bit_xmlfiles): Likewise.
7171 (srv_i386_64bit_xmlfiles): Likewise.
7172 (srv_i386_xmlfiles): Likewise.
7173 (srv_amd64_xmlfiles): Likewise.
7174 (srv_i386_linux_xmlfiles): Likewise.
7175 (srv_amd64_linux_xmlfiles): Likewise.
7176 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7177 srv_xmlfiles to $srv_i386_xmlfiles.
7178 (i[34567]86-*-mingw32ce*): Likewise.
7179 (i[34567]86-*-mingw*): Likewise.
7180 (i[34567]86-*-nto*): Likewise.
7181 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7182 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7183 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7184 (x86_64-*-linux*): Likewise.
7185
7186 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7187 (init_registers_amd64_linux): New.
7188 (x86_arch_setup): Replace init_registers_x86_64_linux with
7189 init_registers_amd64_linux.
7190
193f13e6
MK
71912010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7192
7193 * configure.ac: Check for libdl. If it is not available link against
7194 static libthread_db.
7195 * configure: Regenerate.
7196
85d721b8
PA
71972010-02-22 Pedro Alves <pedro@codesourcery.com>
7198
7199 PR9605
7200
7201 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7202 handing a read watchpoint.
7203 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7204
6076632b
DE
72052010-02-12 Doug Evans <dje@google.com>
7206
7207 * linux-low.c (linux_supports_tracefork_flag): Document.
7208 (linux_look_up_symbols): Add comment.
7209
3327ccf7
L
72102010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7211
7212 * regcache.c (supply_register): Clear regcache if buf is NULL.
7213
0718675c 72142010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7215 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7216
7217 * inferiors.c (find_inferior): Add function documentation.
7218 (unloaded_dll): Handle the case where the unloaded dll has not
7219 been previously registered in the dll list.
7220
177321bd
DJ
72212010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7222
7223 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7224 (thumb2_breakpoint): New.
7225 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7226
2b009048
DJ
72272010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7228
7229 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7230 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7231 breakpoints.
7232
3be029c7
PA
72332010-01-21 Pedro Alves <pedro@codesourcery.com>
7234
7235 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7236
18f5de3b
JK
72372010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7238
7239 * linux-s390-low.c (s390_collect_ptrace_register)
7240 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7241
3743bb4f
DE
72422010-01-21 Doug Evans <dje@google.com>
7243
14ce3065
DE
7244 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7245 (PTRACE_ARG4_TYPE): New macro.
7246 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7247 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7248 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7249 (usr_store_inferior_registers): Ditto.
7250 (linux_read_memory, linux_write_memory): Ditto.
7251 (linux_test_for_tracefork): Ditto.
7252
3743bb4f
DE
7253 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7254 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7255
8b315be5
PA
72562010-01-21 Pedro Alves <pedro@codesourcery.com>
7257
7258 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7259 target.
7260
85492558
PA
72612010-01-21 Pedro Alves <pedro@codesourcery.com>
7262
7263 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7264 prototype to take a regcache. Adjust.
7265
442ea881
PA
72662010-01-20 Pedro Alves <pedro@codesourcery.com>
7267
7268 * regcache.h (struct thread_info): Forward declare.
7269 (struct regcache): New.
7270 (new_register_cache): Adjust prototype.
7271 (get_thread_regcache): Declare.
7272 (free_register_cache): Adjust prototype.
7273 (registers_to_string, registers_from_string): Ditto.
7274 (supply_register, supply_register_by_name, collect_register)
7275 (collect_register_as_string, collect_register_by_name): Ditto.
7276 * regcache.c (struct inferior_regcache_data): Delete.
7277 (get_regcache): Rename to ...
7278 (get_thread_regcache): ... this. Adjust. Switch inferior before
7279 fetching registers.
7280 (regcache_invalidate_one): Adjust.
7281 (regcache_invalidate): Fix prototype.
7282 (new_register_cache): Return the new register cache.
7283 (free_register_cache): Change prototype.
7284 (realloc_register_cache): Adjust.
7285 (registers_to_string): Change prototype to take a regcache. Adjust.
7286 (registers_from_string): Ditto.
7287 (register_data): Ditto.
7288 (supply_register): Ditto.
7289 (supply_register_by_name): Ditto.
7290 (collect_register): Ditto.
7291 (collect_register_as_string): Ditto.
7292 (collect_register_by_name): Ditto.
7293 * server.c (process_serial_event): Adjust.
7294 * linux-low.h (regset_fill_func, regset_store_func): Change
7295 prototype.
7296 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7297 Change prototype.
7298 * linux-low.c (get_stop_pc): Adjust.
7299 (check_removed_breakpoint): Adjust.
7300 (linux_wait_for_event): Adjust.
7301 (linux_resume_one_lwp): Adjust.
7302 (fetch_register): Add regcache parameter. Adjust.
7303 (usr_store_inferior_registers): Ditto.
7304 (regsets_fetch_inferior_registers): Ditto.
7305 (regsets_store_inferior_registers): Ditto.
7306 (linux_fetch_registers, linux_store_registers): Ditto.
7307 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7308 regcache. Adjust.
43aaf8b6
PA
7309 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7310 Ditto.
442ea881
PA
7311 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7312 prototype to take a regcache.
7313 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7314 * remote-utils.c (convert_ascii_to_int, outreg)
7315 (prepare_resume_reply): Change prototype to take a regcache.
7316 Adjust.
7317 * target.h (struct target_ops) <fetch_registers, store_registers>:
7318 Change prototype to take a regcache.
7319 (fetch_inferior_registers, store_inferior_registers): Change
7320 prototype to take a regcache. Adjust.
7321 * proc-service.c (ps_lgetregs): Adjust.
7322 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7323 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7324 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7325 take a regcache. Adjust.
7326 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7327 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7328 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7329 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7330 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7331 (cris_cannot_fetch_register):
7332 (cris_breakpoint_at): Change prototype to take a regcache.
7333 Adjust.
7334 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7335 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7336 to take a regcache. Adjust.
7337 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7338 Adjust.
7339 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7340 take a regcache. Adjust.
7341 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7342 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7343 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7344 * linux-mips-low.c (mips_get_pc):
7345 (mips_set_pc): Change prototype to take a regcache. Adjust.
7346 (mips_reinsert_addr): Adjust.
7347 (mips_collect_register): Change prototype to take a regcache.
7348 Adjust.
7349 (mips_supply_register):
7350 (mips_collect_register_32bit, mips_supply_register_32bit)
7351 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7352 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7353 * linux-ppc-low.c (ppc_supply_ptrace_register)
7354 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7355 (parse_spufs_run): Adjust.
7356 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7357 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7358 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7359 take a regcache. Adjust.
7360 * linux-s390-low.c (s390_collect_ptrace_register)
7361 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7362 (s390_set_pc): Change prototype to take a regcache. Adjust.
7363 (s390_arch_setup): Adjust.
7364 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7365 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7366 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7367 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7368 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7369 regcache. Adjust.
7370 (sparc_breakpoint_at): Adjust.
7371 * linux-xtensa-low.c (xtensa_fill_gregset):
7372 (xtensa_store_gregset):
7373 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7374 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7375 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7376 prototype to take a regcache. Adjust.
7377 * win32-arm-low.c (arm_fetch_inferior_register)
7378 (arm_store_inferior_register): Change prototype to take a
7379 regcache. Adjust.
7380 * win32-i386-low.c (i386_fetch_inferior_register)
7381 (i386_store_inferior_register): Change prototype to take a
7382 regcache. Adjust.
7383 * win32-low.c (child_fetch_inferior_registers)
7384 (child_store_inferior_registers): Change prototype to take a
7385 regcache. Adjust.
7386 (win32_wait): Adjust.
7387 (win32_fetch_inferior_registers): Change prototype to take a
7388 regcache. Adjust.
7389 (win32_store_inferior_registers): Adjust.
7390 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7391 store_inferior_register>: Change prototype to take a regcache.
7392
60c3d7b0
DE
73932010-01-20 Doug Evans <dje@google.com>
7394
7395 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7396 #ifdef.
7397 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7398 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7399
dc146f7c
VP
74002010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7401
7402 * linux-low.c (linux_core_of_thread): New.
7403 (compare_ints, show_process, list_threads): New.
7404 (linux_qxfer_osdata): Report threads and cores.
7405 (linux_target_op): Register linux_core_of_thread.
7406 * remote-utils.c (prepare_resume_reply): Report the core.
7407 (buffer_xml_printf): Support %d specifier.
7408 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7409 New.
7410 (handle_query): Handle qXfer:threads. Announce availability
7411 thereof.
7412 * target.h (struct target_ops): New field core_of_thread.
7413
7803799a
UW
74142010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7415
7416 * Makefile.in (clean): Remove new generated files.
7417 (reg-s390.o, reg-s390.c): Remove rules.
7418 (reg-s390x.o, reg-s390x.c): Likewise.
7419 (s390-linux32.o, s390-linux32.c): Add rules.
7420 (s390-linux64.o, s390-linux64.c): Likewise.
7421 (s390x-linux64.o, s390x-linux64.c): Likewise.
7422 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7423 * linux-s390-low.c: Include <elf.h>.
7424 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7425 (init_registers_s390): Remove prototype.
7426 (init_registers_s390x): Likewise.
7427 (init_registers_s390_linux32): Add prototype.
7428 (init_registers_s390_linux64): Likewise.
7429 (init_registers_s390x_linux64): Likewise.
7430 (s390_num_regs_3264): New define.
7431 (s390_regmap_3264): New global variable.
7432 (s390_cannot_fetch_register): Remove obsolete check.
7433 (s390_cannot_store_register): Likewise.
7434 (s390_collect_ptrace_register): Handle upper/lower register halves.
7435 (s390_supply_ptrace_register): Likewise.
7436 (s390_fill_gregset): Update to register number changes.
7437 (s390_get_hwcap): New routine.
7438 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7439 Install appropriate regmap and register set.
7440
6e7ffa39
JB
74412010-01-01 Joel Brobecker <brobecker@adacore.com>
7442
7443 * server.c (gdbserver_version): Update copyright year to 2010.
7444 * gdbreplay.c (gdbreplay_version): Likewise.
7445
957f3f49
DE
74462009-12-28 Doug Evans <dje@google.com>
7447
7448 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7449 elf/external.h. Include <elf.h> instead but only if necessary.
7450
ca5c370d
PA
74512009-12-28 Pedro Alves <pedro@codesourcery.com>
7452
7453 * linux-low.c (linux_remove_process): Remove `detaching'
7454 parameter. Don't release/detach from thread_db here.
7455 (linux_kill): Release/detach from thread_db here, ...
7456 (linux_detach): ... and here, before actually detaching.
7457 (linux_wait_1): ... and here, when a process exits.
7458 * thread-db.c (any_thread_of): New.
7459 (thread_db_free): Switch the current inferior to a thread of the
7460 passed in process.
7461
4ee62156
DE
74622009-12-21 Doug Evans <dje@google.com>
7463
d90e6a88
DE
7464 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7465
c5f62d5f
DE
7466 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7467 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7468 warning ifndef __NR_tkill. Move setting of errno there too.
7469 Delete unnecessary resetting of errno after syscall.
7470 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7471
10e86dd7
DE
7472 * configure.ac: Check for dladdr.
7473 * config.in: Regenerate.
7474 * configure: Regenerate.
7475 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7476 (try_thread_db_load): Update.
7477
4ee62156
DE
7478 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7479
00f515da
DE
74802009-12-18 Doug Evans <dje@google.com>
7481
e9464885
DE
7482 * event-loop.c: Include unistd.h if it exists.
7483
07d4f67e
DE
7484 * linux-low.c (my_waitpid): Move definition away from being in
7485 between linux_tracefork_child/linux_test_for_tracefork.
7486
00f515da
DE
7487 * gdb_proc_service.h (psaddr_t): Fix type.
7488 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7489 signature to match glibc.
7490
1de1badb
DE
74912009-12-16 Doug Evans <dje@google.com>
7492
7493 * linux-low.c (linux_read_memory): Fix argument to read.
7494
aeeb81d1
PA
74952009-11-26 Pedro Alves <pedro@codesourcery.com>
7496
7497 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7498 events, don't leave current_inferior pointing at null.
7499
10357975
PA
75002009-11-26 Pedro Alves <pedro@codesourcery.com>
7501
7502 * win32-low.c (LOG): Delete.
7503 (OUTMSG): Output to stderr.
7504 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7505 on compile time LOG macro.
7506 (win32_wait): Fix debug output.
7507
cf6e3471
PA
75082009-11-26 Pedro Alves <pedro@codesourcery.com>
7509
7510 * win32-low.c (win32_add_one_solib): If the dll name is
7511 "ntdll.dll", prepend the system directory to the dll path.
7512
0c85e18e
MK
75132009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7514
7515 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7516
9ac544ce 75172009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7518 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7519
7520 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7521 * configure.ac: Check for __mcoldfire__ and set
7522 gdb_cv_m68k_is_coldfire.
7523 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7524 reg-cf.o and reg-m68k.o.
7525 * configure: Regenerated.
7526
fd7dd3e6
PA
75272009-11-16 Pedro Alves <pedro@codesourcery.com>
7528
7529 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7530 Pass it to thread_db_free.
7531 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7532 proper `detaching' argument to linux_remove_process.
7533 * linux-low.h (thread_db_free): Add `detaching' parameter.
7534 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7535 to thread_db_free.
7536 (thread_db_free): Add `detaching' parameter. Only
7537 call td_ta_clear_event if detaching from process.
7538
75aa492e
MK
75392009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7540
7541 * thread-db.c (thread_db_free): Fix typo.
7542
21e1bee4
PP
75432009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7544
7545 PR gdb/10838
7546 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7547
8838b45e
NS
75482009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7549
7550 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7551 with an i686 compiler.
7552 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7553 needed.
7554 * configure: Rebuilt.
7555
8a35fb51
SL
75562009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7557
7558 PR gdb/10783
7559
7560 * server.c (handle_search_memory_1): Correct read_addr initialization
7561 in loop for searching subsequent chunks.
7562
96f15937
PP
75632009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7564
7565 * configure.ac: New --with-libthread-db option.
7566 * thread-db.c: Allow direct dependence on libthread_db.
7567 (thread_db_free): Adjust.
7568 * config.in: Regenerate.
7569 * configure: Likewise.
889bf7c5 7570
5f7d1694
PP
75712009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7572
7573 PR gdb/10757
7574 * thread-db.c (attach_thread): New function.
7575 (maybe_attach_thread): Return success/failure.
7576 (find_new_threads_callback): Adjust.
889bf7c5
PA
7577 (thread_db_find_new_threads): Loop until no new threads.
7578
88e3b899
PA
75792009-10-13 Pedro Alves <pedro@codesourcery.com>
7580
7581 * proc-service.c (ps_lgetregs): Formatting.
7582
cdbfd419
PP
75832009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7584
7585 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7586 * configure.ac: Adjust.
7587 * linux-low.h (struct process_info_private): Move members to struct
7588 thread_db.
7589 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7590 * linux-low.c (linux_remove_process): Adjust.
7591 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7592 * server.c (handle_query): Move code ...
7593 (handle_monitor_command): ... here. New function.
7594 * target.h (struct target_ops): New member.
7595 * thread-db.c (struct thread_db): New.
7596 (libthread_db_search_path): New variable.
7597 (thread_db_create_event, thread_db_enable_reporting)
7598 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7599 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7600 (try_thread_db_load_1, dladdr_to_soname): New functions.
7601 (try_thread_db_load, thread_db_load_search): New functions.
7602 (thread_db_init): Search for libthread_db.
7603 (thread_db_free): New function.
7604 (thread_db_handle_monitor_command): Likewise.
7605 * config.in: Regenerate.
7606 * configure: Regenerate.
889bf7c5 7607
4168d2d6
UW
76082009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7609
7610 * spu-low.c (spu_kill): Wait for inferior to terminate.
7611 Call clear_inferiors.
7612 (spu_detach): Call clear_inferiors.
7613
81ecdfbb
RW
76142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7615
7616 * aclocal.m4: Regenerate.
7617 * config.in: Likewise.
7618 * configure: Likewise.
7619
0b9ff2c0
UW
76202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7621
7622 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7623 (parse_spufs_run): New function.
7624 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7625 (ppc_breakpoint_at): Handle SPU breakpoints.
7626
efcbbd14
UW
76272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7628
7629 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7630 (SPUFS_MAGIC): Define.
7631 (spu_enumerate_spu_ids): New function.
7632 (linux_qxfer_spu): New function.
7633 (linux_target_ops): Install linux_qxfer_spu.
7634
f4d9bade
UW
76352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7636
7637 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7638 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7639 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7640 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7641 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7642 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7643 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7644 (init_registers_powerpc_cell32l): Add prototype.
7645 (init_registers_powerpc_cell64l): Likewise.
7646 (ppc_arch_setup): Detect Cell/B.E. architecture.
7647
96e946ca
RW
76482009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7649
7650 * Makefile.in (datarootdir): New variable.
7651
58d6951d
DJ
76522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7653
7654 * linux-low.c (linux_write_memory): Update debugging output.
7655 * Makefile.in (clean): Add new descriptions.
7656 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7657 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7658 * configure.srv: Add new files for arm*-*-linux*.
7659 * linux-arm-low.c: Add new declarations.
7660 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7661 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7662 (HWCAP_VFPv3D16): New.
7663 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7664 instead of __IWMMXT__.
7665 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7666 (arm_arch_setup): New.
7667 (target_regsets): Remove #ifdef. Add VFP regset.
7668 (the_low_target): Use arm_arch_setup.
7669
12b42a12
DJ
76702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7671
7672 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7673 the main thread again.
7674
ac8c974e
AR
76752009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7676
7677 Adding Neutrino gdbserver.
7678 * configure: Regenerated.
7679 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7680 * configure.srv (i[34567]86-*-nto*): New target.
7681 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7682 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7683 (nto_comctrl) [__QNX__]: New function.
7684 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7685
4424e0c3 76862009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7687
7688 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7689 srv_tgtobj.
7690
912cf4ba
PA
76912009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7692 Pedro Alves <pedro@codesourcery.com>
7693
7694 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7695 don't support CONTEXT_EXTENDED_REGISTERS.
7696 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7697 (the_low_target): Install them.
7698 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7699 failing with ERROR_PIPE_NOT_CONNECTED.
7700
aa5ca48f
DE
77012009-06-30 Doug Evans <dje@google.com>
7702 Pierre Muller <muller@ics.u-strasbg.fr>
7703
7704 Add h/w watchpoint support to x86-linux, win32-i386.
7705 * Makefile.in (SFILES): Add i386-low.c
7706 (i386_low_h): Define.
7707 (i386-low.o): Add dependencies.
7708 (linux-x86-low.o): Add i386-low.h dependency.
7709 (win32-i386-low.o): Ditto.
7710 * i386-low.c: New file.
7711 * i386-low.h: New file.
7712 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7713 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7714 * linux-low.c (linux_add_process): Initialize arch_private.
7715 (linux_remove_process): Free arch_private.
7716 (add_lwp): Initialize arch_private.
7717 (delete_lwp): Free arch_private.
7718 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7719 provided.
7720 * linux-low.h (process_info_private): New member arch_private.
7721 (lwp_info): New member arch_private.
7722 (linux_target_ops): New members new_process, new_thread,
7723 prepare_to_resume.
7724 (ptid_of): New macro.
7725 * linux-x86-low.c: Include stddef.h, i386-low.h.
7726 (arch_process_info): New struct.
7727 (arch_lwp_info): New struct.
7728 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7729 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7730 (i386_dr_low_get_status): New function.
7731 (x86_insert_point, x86_remove_point): New functions.
7732 (x86_stopped_by_watchpoint): New function.
7733 (x86_stopped_data_address): New function.
7734 (x86_linux_new_process, x86_linux_new_thread): New functions.
7735 (x86_linux_prepare_to_resume): New function.
7736 (the_low_target): Add entries for insert_point, remove_point,
7737 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7738 prepare_to_resume.
7739 * server.c (debug_hw_points): New global.
7740 (monitor_show_help): Document set debug-hw-points.
7741 (handle_query): Process "set debug-hw-points".
7742 * server.h (debug_hw_points): Declare.
7743 (paddress): Declare.
7744 * utils.c (NUMCELLS, CELLSIZE): New macros.
7745 (get_sell, xsnprintf, paddress): New functions.
7746 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7747 remove_point, stopped_by_watchpoint, stopped_data_address.
7748 * win32-i386-low.c: Include i386-low.h.
7749 (debug_reg_state): Replaces dr.
7750 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7751 (i386_dr_low_get_status): New function.
7752 (i386_insert_point, i386_remove_point): New functions.
7753 (i386_stopped_by_watchpoint): New function.
7754 (i386_stopped_data_address): New function.
7755 (i386_initial_stuff): Update.
7756 (get_thread_context,set_thread_context,i386_thread_added): Update.
7757 (the_low_target): Add entries for insert_point,
7758 remove_point, stopped_by_watchpoint, stopped_data_address.
7759 * win32-low.c (win32_insert_watchpoint): New function.
7760 (win32_remove_watchpoint): New function.
7761 (win32_stopped_by_watchpoint): New function.
7762 (win32_stopped_data_address): New function.
7763 (win32_target_ops): Add entries for insert_watchpoint,
7764 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7765 * win32-low.h (win32_target_ops): New members insert_point,
7766 remove_point, stopped_by_watchpoint, stopped_data_address.
7767
d993e290
PA
77682009-06-25 Pedro Alves <pedro@codesourcery.com>
7769
7770 * server.c (process_serial_event): Re-return unsupported, not
7771 error, if the type isn't recognized. Re-allow supporting only
7772 insert or remove packets. Also call require_running for
7773 breakpoints. Add missing break statement to default case. Tidy.
7774 * target.h (struct target_ops): Rename insert_watchpoint to
7775 insert_point, and remove_watchpoint to remove_point.
7776
7777 * linux-low.h (struct linux_target_ops): Likewise.
7778 * linux-low.c (linux_insert_watchpoint): Rename to ...
7779 (linux_insert_point): ... this. Adjust.
7780 (linux_remove_watchpoint): Rename to ...
7781 (linux_remove_point): ... this. Adjust.
7782 (linux_target_ops): Adjust.
7783 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7784 (cris_insert_point): ... this.
7785 (cris_remove_watchpoint): Rename to ...
7786 (cris_remove_point): ... this.
7787 (the_low_target): Adjust.
7788
0f54c268
PM
77892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7790
7791 * server.c (handle_v_kill): Pass signal_pid to
7792 kill_inferior if multi_process is zero.
7793
c6314022
AR
77942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7795
7796 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7797 * target.h (target_ops): Comment for *_watchpoint to make it clear
7798 the functions can get types '0' and '1'.
7799
4463ce24
AR
78002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7801
7802 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7803 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7804 * regcache.c (get_regcache): Likewise.
7805 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7806 * win32-low.c (child_fetch_inferior_registers): Remove check for
7807 regno 0.
7808
cf8fd78b
PA
78092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7810 Pedro Alves <pedro@codesourcery.com>
7811
7812 * target.h (struct target_ops) <supports_multi_process>: New
7813 callback.
7814 (target_supports_multi_process): New.
7815 * server.c (handle_query): Even if GDB reports support, only
7816 enable multi-process if the target also supports it. Report
7817 multi-process support only if the target backend supports it.
7818 * linux-low.c (linux_supports_multi_process): New function.
7819 (linux_target_ops): Install it as target_supports_multi_process
7820 callback.
7821
47c0c975
DE
78222009-05-24 Doug Evans <dje@google.com>
7823
e09875d4
DE
7824 Global renaming of find_thread_pid to find_thread_ptid.
7825 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7826 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7827 All callers updated.
7828
e27d73f6
DE
7829 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7830 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7831 directly.
7832
47c0c975
DE
7833 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7834 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7835 (linux_resume_one_lwp): Ditto.
7836
2acc282a
DE
78372009-05-23 Doug Evans <dje@google.com>
7838
7839 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7840 from struct inferior_list_entry * to struct lwp_info *.
7841 All callers updated.
7842
9f1036c1
DE
78432009-05-13 Doug Evans <dje@google.com>
7844
7845 * linux-x86-low.c: Don't include assert.h.
7846 (x86_siginfo_fixup): Use fatal, not assert.
7847 (x86_arch_setup): Fix comment.
7848
d0722149
DE
78492009-05-12 Doug Evans <dje@google.com>
7850
7851 Biarch support for i386/amd64 gdbserver.
7852 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7853 Add linux-x86-low.c.
7854 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7855 (linux-x86-low.o): Add.
7856 * linux-x86-64-low.c: Delete.
7857 * linux-i386-low.c: Delete.
7858 * linux-x86-low.c: New file.
7859 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7860 linux-x86-low.o.
7861 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7862 linux-x86-low.o.
7863 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7864 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7865 (linux_child_pid_to_exec_file): New function.
7866 (elf_64_header_p, elf_64_file_p): New functions.
7867 (siginfo_fixup): New function.
7868 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7869 give target a chance to convert layout.
7870 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7871 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7872
fdeb2a12
DE
78732009-05-07 Doug Evans <dje@google.com>
7874
7875 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7876 (regsets_store_inferior_registers): Ditto.
7877
a6dbe5df
PA
78782009-05-06 Pedro Alves <pedro@codesourcery.com>
7879
7880 PR server/10048
7881
7882 * linux-low.c (must_set_ptrace_flags): Delete.
7883 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7884 of the global.
7885 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7886 `lwp->must_set_ptrace_flags' instead.
ba42693b 7887 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7888 (linux_wait_1): ... not here.
7889
5091eb23
DE
78902009-04-30 Doug Evans <dje@google.com>
7891
9f767825
DE
7892 * inferiors.c (started_inferior_callback): New function.
7893 (attached_inferior_callback): New function.
7894 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7895 * server.c (print_started_pid, print_attached_pid): New functions.
7896 (detach_or_kill_for_exit): New function.
7897 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7898 * server.h (have_started_inferiors_p): Declare.
7899 (have_attached_inferiors_p): Declare.
7900
5091eb23
DE
7901 * inferiors.c (remove_process): Fix memory leak, free process.
7902 * linux-low.c (linux_remove_process): New function.
7903 (linux_kill): Call it instead of remove_process.
7904 (linux_detach, linux_wait_1): Ditto.
7905
155c8968
PA
79062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7907
7908 * configure.srv: Add x86 Windows CE target.
7909
7fe519cb
UW
79102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7911
7912 * inferiors.c (get_thread_process): Make global.
7913 * server.h (get_thread_process): Add prototype.
7914 * thread-db.c (find_one_thread): Use get_thread_process
7915 instead of current_process.
7916 (thread_db_get_tls_address): Do not crash if called when
7917 thread layer is not yet initialized.
7918
5472f405
UW
79192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7920
7921 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7922 * spu-low.c (current_tid): Rename to ...
7923 (current_ptid): ... this.
7924 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7925 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7926 ptid_get_lwp (current_ptid) instead of current_tid.
7927 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7928 instead of current_tid. Use find_process_pid to verify pid
7929 argument is valid. Pass proper argument to remove_process.
7930 (spu_thread_alive): Compare current_ptid instead of current_tid.
7931 (spu_resume): Likewise.
7932
55ac2b99
PA
79332009-04-02 Pedro Alves <pedro@codesourcery.com>
7934
7935 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7936 variable.
7937
95954743
PA
79382009-04-01 Pedro Alves <pedro@codesourcery.com>
7939
7940 Implement the multiprocess extensions, and add linux multiprocess
7941 support.
7942
7943 * server.h (ULONGEST): Declare.
7944 (struct ptid, ptid_t): New.
7945 (minus_one_ptid, null_ptid): Declare.
7946 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7947 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7948 (struct inferior_list_entry): Change `id' type from unsigned from
7949 to ptid_t.
7950 (struct sym_cache, struct breakpoint, struct
7951 process_info_private): Forward declare.
7952 (struct process_info): Declare.
7953 (current_process): Declare.
7954 (all_processes): Declare.
7955 (initialize_inferiors): Declare.
7956 (add_thread): Adjust to use ptid_t.
7957 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7958 (add_process, remove_process, find_thread_pid): Declare.
7959 (find_inferior_id): Adjust to use ptid_t.
7960 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7961 (multi_process): Declare.
7962 (push_event): Adjust to use ptid_t.
7963 (read_ptid, write_ptid): Declare.
7964 (prepare_resume_reply): Adjust to use ptid_t.
7965 (clear_symbol_cache): Declare.
7966 * inferiors.c (all_processes): New.
7967 (null_ptid, minus_one_ptid): New.
7968 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7969 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7970 (add_thread): Change unsigned long to ptid. Remove gdb_id
7971 parameter. Adjust.
7972 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7973 (gdb_id_to_thread): Rename to ...
7974 (find_thread_pid): ... this. Change unsigned long to ptid.
7975 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7976 (loaded_dll, pull_pid_from_list): Adjust.
7977 (add_process, remove_process, find_process_pid)
7978 (get_thread_process, current_process, initialize_inferiors): New.
7979 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7980 (struct target_waitstatus) <related_pid>: Ditto.
7981 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7982 return type to int.
7983 (struct target_ops) <join>: Add `pid' argument.
7984 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7985 (struct target_ops) <wait>: Add `ptid' field. Change return type
7986 to ptid.
7987 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7988 (mywait): Add `ptid' argument. Change return type to ptid_t.
7989 (target_pid_to_str): Declare.
7990 * target.c (set_desired_inferior): Adjust to use ptids.
7991 (mywait): Add new `ptid' argument. Adjust.
7992 (target_pid_to_str): New.
7993 * mem-break.h (free_all_breakpoints): Declare.
7994 * mem-break.c (breakpoints): Delelete.
7995 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7996 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7997 to use per-process breakpoint list.
7998 (free_all_breakpoints): New.
7999 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8000 (symbol_cache, all_symbols_looked_up): Delete.
8001 (hexchars): New.
8002 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8003 read_ptid): New.
8004 (prepare_resume_reply): Change ptid argument's type from unsigned
8005 long to ptid_t. Adjust. Implement W;process and X;process.
8006 (free_sym_cache, clear_symbol_cache): New.
8007 (look_up_one_symbol): Adjust to per-process symbol cache. *
8008 * server.c (cont_thread, general_thread, step_thread): Change type
8009 to ptid_t.
8010 (attached): Delete.
8011 (multi_process): New.
8012 (last_ptid): Change type to ptid_t.
8013 (struct vstop_notif) <ptid>: Change type to ptid_t.
8014 (queue_stop_reply, push_event): Change `ptid' argument's type to
8015 ptid_t.
8016 (discard_queued_stop_replies): Add `pid' argument.
8017 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8018 changes. Don't reference the `attached' global.
8019 (attach_inferior): Adjust to mywait interface changes.
8020 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8021 features. Handle and report "multiprocess+". Handle
8022 "qAttached:PID".
8023 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8024 changes.
8025 (handle_v_kill): New.
8026 (handle_v_stopped): Adjust to use target_pid_to_str.
8027 (handle_v_requests): Allow multiple attaches and runs when
8028 multiprocess extensions are in effect. Handle "vKill".
8029 (myresume): Adjust to use ptids.
8030 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8031 (handle_status): Adjust to discard_queued_stop_replies interface
8032 change.
8033 (first_thread_of, kill_inferior_callback)
8034 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8035 (main): Call initialize_inferiors. Adjust to use ptids, killing
8036 and detaching from all inferiors. Handle multiprocess packet
8037 variants.
8038 * linux-low.h: Include gdb_proc_service.h.
8039 (struct process_info_private): New.
8040 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8041 <lwpid_of>: Use ptid_get_lwp.
8042 (get_lwp_thread): Adjust.
8043 (struct lwp_info): Add `dead' member.
8044 (find_lwp_pid): Declare.
8045 * linux-low.c (thread_db_active): Delete.
8046 (new_inferior): Adjust comment.
8047 (inferior_pid): Delete.
8048 (linux_add_process): New.
8049 (handle_extended_wait): Adjust.
8050 (add_lwp): Change unsigned long to ptid.
8051 (linux_create_inferior): Add process to processes table. Adjust
8052 to use ptids. Don't set new_inferior here.
8053 (linux_attach_lwp): Rename to ...
8054 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8055 it. Adjust to use ptids.
8056 (linux_attach_lwp): New.
8057 (linux_attach): Add process to processes table. Don't set
8058 new_inferior here.
8059 (struct counter): New.
8060 (second_thread_of_pid_p, last_thread_of_process_p): New.
8061 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8062 multiple processes.
8063 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8064 processes. Remove process from process table.
8065 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8066 to multiple processes.
8067 (any_thread_of): New.
8068 (linux_detach): Add `pid' argument, and handle it. Remove process
8069 from processes table.
8070 (linux_join): Add `pid' argument. Handle it.
8071 (linux_thread_alive): Change unsighed long argument to ptid_t.
8072 Consider dead lwps as not being alive.
8073 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8074 threads we're not interested in.
8075 (same_lwp, find_lwp_pid): New.
8076 (linux_wait_for_lwp): Change `pid' argument's type from int to
8077 ptid_t. Adjust.
8078 (linux_wait_for_event): Rename to ...
8079 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8080 from int to ptid_t. Adjust.
8081 (linux_wait_for_event): New.
8082 (linux_wait_1): Add `ptid' argument. Change return type to
8083 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8084 that exit from the process table.
8085 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8086 Adjust.
8087 (mark_lwp_dead): New.
8088 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8089 stopping all threads, mark its main lwp as dead.
8090 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8091 ptids.
8092 (fetch_register, usr_store_inferior_registers)
8093 (regsets_fetch_inferior_registers)
8094 (regsets_store_inferior_registers, linux_read_memory)
8095 (linux_write_memory): Inline `inferior_pid'.
8096 (linux_look_up_symbols): Adjust to use per-process
8097 `thread_db_active'.
8098 (linux_request_interrupt): Adjust to use ptids.
8099 (linux_read_auxv): Inline `inferior_pid'.
8100 (initialize_low): Don't reference thread_db_active.
8101 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8102 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8103 (ps_getpid): Return the pid of the current inferior.
8104 * thread-db.c (proc_handle, thread_agent): Delete.
8105 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8106 per-process data.
8107 (find_one_thread): Change argument type to ptid_t. Adjust to
8108 per-process data.
8109 (maybe_attach_thread): Adjust to per-process data and ptids.
8110 (thread_db_find_new_threads): Ditto.
8111 (thread_db_init): Ditto.
8112 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8113 processes table. Adjust to use ptids.
8114 (spu_kill, spu_detach): Adjust interface. Remove process from
8115 processes table.
8116 (spu_join, spu_thread_alive): Adjust interface.
8117 (spu_wait): Adjust interface. Remove process from processes
8118 table. Adjust to use ptids.
8119 * win32-low.c (current_inferior_tid): Delete.
8120 (current_inferior_ptid): New.
8121 (debug_event_ptid): New.
8122 (thread_rec): Take a ptid. Adjust.
8123 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8124 (child_delete_thread): Ditto.
8125 (do_initial_child_stuff): Add `attached' argument. Add process to
8126 processes table.
8127 (child_fetch_inferior_registers, child_store_inferior_registers):
8128 Adjust.
8129 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8130 (win32_attach): Pass 1 to do_initial_child_stuff.
8131 (win32_kill): Adjust interface. Remove process from processes
8132 table.
8133 (win32_detach): Ditto.
8134 (win32_join): Adjust interface.
8135 (win32_thread_alive): Take a ptid.
8136 (win32_resume): Adjust to use ptids.
8137 (get_child_debug_event): Ditto.
8138 (win32_wait): Adjust interface. Remove exiting process from
8139 processes table.
8140
bd99dc85
PA
81412009-04-01 Pedro Alves <pedro@codesourcery.com>
8142
8143 Non-stop mode support.
8144
8145 * server.h (non_stop): Declare.
8146 (gdb_client_data, handler_func): Declare.
8147 (delete_file_handler, add_file_handler, start_event_loop):
8148 Declare.
8149 (handle_serial_event, handle_target_event, push_event)
8150 (putpkt_notif): Declare.
8151 * target.h (enum resume_kind): New.
8152 (struct thread_resume): Replace `step' field by `kind' field.
8153 (TARGET_WNOHANG): Define.
8154 (struct target_ops) <wait>: Add `options' argument.
8155 <supports_non_stop, async, start_non_stop>: New fields.
8156 (target_supports_non_stop, target_async): New.
8157 (start_non_stop): Declare.
8158 (mywait): Add `options' argument.
8159 * target.c (mywait): Add `options' argument. Print child exit
8160 notifications here.
8161 (start_non_stop): New.
8162 * server.c (non_stop, own_buf, mem_buf): New globals.
8163 (struct vstop_notif): New.
8164 (notif_queue): New global.
8165 (queue_stop_reply, push_event, discard_queued_stop_replies)
8166 (send_next_stop_reply): New.
8167 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8168 interface changes.
8169 (attach_inferior): In non-stop mode, don't wait for the target
8170 here.
8171 (handle_general_set): Handle QNonStop.
8172 (handle_query): When handling qC, return the current general
8173 thread, instead of the first thread of the list.
8174 (handle_query): If the backend supports non-stop mode, include
8175 QNonStop+ in the qSupported query response.
8176 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8177 and non-stop mode.
8178 (handle_v_attach, handle_v_run): Handle non-stop mode.
8179 (handle_v_stopped): New.
8180 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8181 (myresume): Adjust to use resume_kind. Handle non-stop.
8182 (queue_stop_reply_callback): New.
8183 (handle_status): Handle non-stop mode.
8184 (main): Clear non_stop flag on reconnection. Use the event-loop.
8185 Refactor serial protocol handling from here ...
8186 (process_serial_event): ... to this new function. When GDB
8187 selects any thread, select one here. In non-stop mode, wait until
8188 GDB acks all pending events before exiting.
8189 (handle_serial_event, handle_target_event): New.
8190 * remote-utils.c (remote_open): Install remote_desc in the event
8191 loop.
8192 (remote_close): Remove remote_desc from the event loop.
8193 (putpkt_binary): Rename to...
8194 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8195 (putpkt_binary): New as wrapper around putpkt_binary_1.
8196 (putpkt_notif): New.
8197 (prepare_resume_reply): In non-stop mode, don't change the
8198 general_thread.
8199 * event-loop.c: New.
8200 * Makefile.in (OBJ): Add event-loop.o.
8201 (event-loop.o): New rule.
8202
8203 * linux-low.h (pid_of): Moved here.
8204 (lwpid_of): New.
8205 (get_lwp_thread): Use lwpid_of.
8206 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8207 * linux-low.c (pid_of): Delete.
8208 (inferior_pid): Use lwpid_of.
8209 (linux_event_pipe): New.
8210 (target_is_async_p): New.
8211 (delete_lwp): New.
8212 (handle_extended_wait): Use lwpid_of.
8213 (add_lwp): Don't set lwpid field.
8214 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8215 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8216 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8217 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8218 first. Adjust to linux_wait_for_event interface changes. Use
8219 lwpid_of.
8220 (linux_detach): Don't delete the main lwp here.
8221 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8222 (status_pending_p): Don't consider explicitly suspended lwps.
8223 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8224 pointer. Add OPTIONS argument. Change return type to int. Use
8225 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8226 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8227 pointer. Add status pointer argument. Return a pid instead of a
8228 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8229 changes. In non-stop mode, don't switch to a random thread.
8230 (linux_wait): Rename to...
8231 (linux_wait_1): ... this. Add target_options argument, and handle
8232 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8233 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8234 clean exit and signal exit code. Don't stop all threads in
8235 non-stop mode. In all-stop mode, only stop all threads when
8236 reporting a stop to GDB. Handle explicit thread stop requests.
8237 (async_file_flush, async_file_mark): New.
8238 (linux_wait): New.
8239 (send_sigstop): Use lwpid_of.
8240 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8241 interface changes. In non-stop mode, don't switch to a random
8242 thread.
8243 (linux_resume_one_lwp): Use lwpid_of.
8244 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8245 (linux_resume_one_thread): ... this. Handle resume_stop. In
8246 non-stop mode, don't look for pending flag in all threads.
8247 (resume_status_pending_p): Don't consider explicitly suspended
8248 threads.
8249 (my_waitpid): Reimplement. Emulate __WALL.
8250 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8251 Use lwpid_of.
8252 (sigchld_handler, linux_supports_non_stop, linux_async)
8253 (linux_start_non_stop): New.
8254 (linux_target_ops): Register linux_supports_non_stop, linux_async
8255 and linux_start_non_stop.
8256 (initialize_low): Install SIGCHLD handler.
8257 * thread-db.c (thread_db_create_event, find_one_thread)
8258 (thread_db_get_tls_address): Use lwpid_of.
8259 * win32-low.c (win32_detach): Adjust to use resume_kind.
8260 (win32_wait): Add `options' argument.
8261 * spu-low.c (spu_resume): Adjust to use resume_kind.
8262 (spu_wait): Add `options' argument.
8263
5b1c542e
PA
82642009-04-01 Pedro Alves <pedro@codesourcery.com>
8265
8266 Decouple target code from remote protocol.
8267
8268 * target.h (enum target_waitkind): New.
8269 (struct target_waitstatus): New.
8270 (struct target_ops) <wait>: Return an unsigned long. Take a
8271 target_waitstatus pointer instead of a char pointer.
8272 (mywait): Likewise.
8273 * target.c (mywait): Change prototype to return an unsigned long.
8274 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8275 * server.h (thread_from_wait, old_thread_from_wait): Delete
8276 declarations.
8277 (prepare_resume_reply): Change prototype to take a
8278 target_waitstatus.
8279 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8280 (last_status, last_ptid): New.
8281 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8282 pid instead of a signal.
8283 (attach_inferior): Remove "status" and "signal" parameters.
8284 Adjust.
8285 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8286 not as an address.
8287 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8288 (handle_v_requests, myresume): Remove "status" and "signal"
8289 parameters. Adjust.
8290 (handle_status): New.
8291 (main): Delete local `status'. Adjust.
8292 * remote-utils.c: Include target.h.
8293 (prepare_resume_reply): Change prototype to take a
8294 target_waitstatus. Adjust.
8295
8296 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8297 interface.
8298 * spu-low.c (spu_wait): Adjust.
8299 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8300 Delete.
8301 (win32_wait): Adjust.
8302
2bd7c093
PA
83032009-04-01 Pedro Alves <pedro@codesourcery.com>
8304
8305 * target.h (struct thread_resume): Delete leave_stopped member.
8306 (struct target_ops): Add a `n' argument to the `resume' callback.
8307 * server.c (start_inferior): Adjust.
8308 (handle_v_cont, myresume): Adjust.
8309 * linux-low.c (check_removed_breakpoint): Adjust to resume
8310 interface change, and to removed leave_stopped field.
8311 (resume_ptr): Delete.
8312 (struct thread_resume_array): New.
8313 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8314 resume interface change.
8315 (linux_continue_one_thread, linux_queue_one_thread)
8316 (resume_status_pending_p): Check if the resume field is NULL
8317 instead of checking the leave_stopped member.
8318 (linux_resume): Adjust to the target resume interface change.
8319 * spu-low.c (spu_resume): Adjust to the target resume interface
8320 change.
8321 * win32-low.c (win32_detach, win32_resume): Ditto.
8322
c35fafde
PA
83232009-04-01 Pedro Alves <pedro@codesourcery.com>
8324
8325 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8326 flag.
8327 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8328 pending.
8329 (linux_continue_one_thread): Only preserve the stepping flag if
8330 there's a pending breakpoint.
8331
0a59d50b
PA
83322009-03-31 Pedro Alves <pedro@codesourcery.com>
8333
8334 * server.c (main): After the inferior having exited, call
8335 remote_close before exiting gdbserver.
8336
f04c6d38
TJB
83372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8338
8339 Fix size of FPSCR in Power 7 processors.
8340 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8341 (PPC_FEATURE_HAS_DFP): New #define.
8342 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8343 size of the FPSCR.
8344
78e5cee6
PA
83452009-03-23 Pedro Alves <pedro@codesourcery.com>
8346
8347 * server.c (handle_query) Whitespace and formatting.
8348
1b3f6016
PA
83492009-03-22 Pedro Alves <pedro@codesourcery.com>
8350
8351 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8352 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8353 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8354 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8355 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8356 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8357 Makefile.in, configure.ac: Fix whitespace throughout.
8358 * configure: Regenerate.
8359
a07b2135
PA
83602009-03-22 Pedro Alves <pedro@codesourcery.com>
8361
8362 * inferiors.c (find_inferior): Make it safe for the callback
8363 function to delete the currently iterated inferior.
8364
67cc2626
PA
83652009-03-22 Pedro Alves <pedro@codesourcery.com>
8366
8367 * Makefile.in (linuw_low_h): Move higher.
8368 (thread-db.o): Depend on $(linux_low_h).
8369
54a0b537
PA
83702009-03-17 Pedro Alves <pedro@codesourcery.com>
8371
8372 Rename "process" to "lwp" throughout.
8373
8374 * linux-low.c (all_processes): Rename to...
8375 (all_lwps): ... this.
8376 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8377 (add_process): Rename to ...
8378 (add_lwp): ... this. Adjust.
8379 (linux_create_inferior): Adjust.
8380 (linux_attach_lwp): Adjust.
8381 (linux_attach): Adjust.
8382 (linux_kill_one_process): Rename to ...
8383 (linux_kill_one_lwp): ... this. Adjust.
8384 (linux_kill): Adjust.
8385 (linux_detach_one_process): Rename to ...
8386 (linux_detach_one_lwp): ... this. Adjust.
8387 (linux_detach): Adjust.
8388 (check_removed_breakpoint): Adjust.
8389 (status_pending_p): Adjust.
8390 (linux_wait_for_process): Rename to ...
8391 (linux_wait_for_lwp): ... this. Adjust.
8392 (linux_wait_for_event): Adjust.
8393 (send_sigstop): Adjust.
8394 (wait_for_sigstop): Adjust.
8395 (stop_all_processes): Rename to ...
8396 (stop_all_lwps): ... this.
8397 (linux_resume_one_process): Rename to ...
8398 (linux_resume_one_lwp): ... this. Adjust.
8399 (linux_set_resume_request, linux_continue_one_thread)
8400 (linux_queue_one_thread, resume_status_pending_p)
8401 (usr_store_inferior_registers, regsets_store_inferior_registers)
8402 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8403 Adjust.
8404 * linux-low.h (get_process): Rename to ...
8405 (get_lwp): ... this. Adjust.
8406 (get_thread_process): Rename to ...
8407 (get_thread_lwp): ... this. Adjust.
8408 (get_process_thread): Rename to ...
8409 (get_lwp_thread): ... this. Adjust.
8410 (struct process_info): Rename to ...
8411 (struct lwp_info): ... this.
8412 (all_processes): Rename to ...
8413 (all_lwps): ... this.
8414 * proc-service.c (ps_lgetregs): Adjust.
8415 * thread-db.c (thread_db_create_event, find_one_thread)
8416 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8417
0b16c5cf
PA
84182009-03-14 Pedro Alves <pedro@codesourcery.com>
8419
8420 * server.c (handle_query): Handle "qAttached".
8421
32de4b9d
NS
84222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8423
8424 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8425 GPLv3, update license URL.
8426
2aecd87f
DE
84272009-03-01 Doug Evans <dje@google.com>
8428
93efd302 8429 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8430 (server_h): Add gdb_signals.h.
8431 (signals.o): Update.
8432 * server.h (target_signal_from_host,target_signal_to_host_p)
8433 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8434
86b1f9c5
PM
84352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8436
8437 * remote-utils.c (getpkt): Also generate remote-debug
8438 information if noack_mode is set.
8439
4aa995e1
PA
84402009-02-06 Pedro Alves <pedro@codesourcery.com>
8441
8442 * server.c (handle_query): Report qXfer:siginfo:read and
8443 qXfer:siginfo:write as supported and handle them.
8444 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8445 * linux-low.c (linux_xfer_siginfo): New.
8446 (linux_target_ops): Set it.
8447
62709adf
PA
84482009-01-26 Pedro Alves <pedro@codesourcery.com>
8449
8450 * server.c (gdbserver_usage): Mention --remote-debug.
8451 (main): Accept '--remote-debug' switch.
8452
aef93bd7
DE
84532009-01-18 Doug Evans <dje@google.com>
8454
8455 * regcache.c (new_register_cache): No need to check result of xcalloc.
8456 * server.c (handle_search_memory): Back out calls to xmalloc,
8457 result is checked and error is returned to user upon failure.
8458 (handle_query): Ditto. Add more checks for result of malloc.
8459 (handle_v_cont): Check result of malloc, report error back to
8460 user upon failure.
8461 (handle_v_run): Ditto. Call freeargv.
8462 * server.h (freeargv): Declare.
8463 * utils.c (freeargv): New fn.
8464
54363045
DE
84652009-01-15 Doug Evans <dje@google.com>
8466
f626972c
DE
8467 * gdbreplay.c (perror_with_name): Make arg const char *.
8468 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8469 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8470 * utils.c (perror_with_name): Make arg const char *.
54363045 8471
18aae699
PA
84722009-01-14 Pedro Alves <pedro@codesourcery.com>
8473
8474 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8475 when handling a EXIT_PROCESS_DEBUG_EVENT.
8476
ff703abe
JB
84772009-01-06 Joel Brobecker <brobecker@adacore.com>
8478
8479 * gdbreplay.c (gdbreplay_version): Update copyright year.
8480 * server.c (gdbserver_version): Likewise.
8481
f21cc1a2 84822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8483
8484 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8485 (handle_extended_wait): Improve comment.
0e21c1ec 8486
bca929d3
DE
84872008-12-13 Doug Evans <dje@google.com>
8488
8489 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8490 * server.h (ATTR_MALLOC): New macro.
8491 (xmalloc,xcalloc,xstrdup): Declare.
8492 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8493 * inferiors.c: Ditto.
8494 * linux-low.c: Ditto.
8495 * mem-break.c: Ditto.
8496 * regcache.c: Ditto.
8497 * remote-utils.c: Ditto.
8498 * server.c: Ditto.
8499 * target.c: Ditto.
8500 * win32-low.c: Ditto.
8501
97438e3f
DE
85022008-12-12 Doug Evans <dje@google.com>
8503
896c7fbb
DE
8504 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8505 in debugging printf.
8506
97438e3f
DE
8507 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8508
e3b886f8
DE
85092008-12-09 Doug Evans <dje@google.com>
8510
8511 * linux-low.h (struct process_info): Delete member tid, unused.
8512 * thread-db.c (find_one_thread): Update.
8513 (maybe_attach_thread): Update.
8514
07e059b5
VP
85152008-12-02 Pedro Alves <pedro@codesourcery.com>
8516
889bf7c5
PA
8517 * target.h (struct target_ops): Add qxfer_osdata member.
8518 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8519 and dirent.h.
8520 (linux_qxfer_osdata): New functions.
8521 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8522 callback.
8523 * server.c (handle_query): Handle "qXfer:osdata:read:".
8524 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8525 (buffer_xml_printf): New functions.
8526 * server.h (struct buffer): New.
8527 (buffer_grow_str, buffer_grow_str0): New macros.
8528 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8529 (buffer_xml_printf): Declare.
07e059b5 8530
4cab47ab
DE
85312008-11-24 Doug Evans <dje@google.com>
8532
8533 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8534
f142445f
DJ
85352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8536
8537 * server.c (handle_v_run): Always use the supplied argument list.
8538
d0107bb6 85392008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8540
d0107bb6
BW
8541 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8542 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8543
2c4ad781
TJB
85442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8545
8546 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8547 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8548 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8549 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8550 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8551 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8552 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8553 XML target descriptions.
8554 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8555 when inferior is running on an ISA 2.05 or later processor. Add
8556 special case to return offset for full 64-bit slot of FPSCR when
8557 in 32-bits.
8558
dfb64f85
DJ
85592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8560
8561 * Makefile.in (SFILES, clean): Added sparc64 files.
8562 (reg-sparc64.o, reg-sparc64.c): New.
8563 * configure.srv (sparc*-*-linux*): New configuration.
8564 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8565 syscall arguments for SPARC.
8566 (regsets_store_inferior_registers): Likewise.
8567 * linux-sparc-low.c: New file.
8568
66b6e1dd
DE
85692008-10-21 Doug Evans <dje@google.com>
8570
8571 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8572 (READLINE_DIR,READLINE_DEP): Delete.
8573 (INTERNAL_CFLAGS): Update.
8574 (LINTFLAGS): Update.
8575
9b710a42
PA
85762008-10-10 Pedro Alves <pedro@codesourcery.com>
8577
8578 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8579 whole argv from the last run, not just argv[0].
8580
5822d809
PA
85812008-09-08 Pedro Alves <pedro@codesourcery.com>
8582
8583 * regcache.c (new_register_cache): Return NULL if the register
8584 cache size isn't known yet.
8585 (free_register_cache): Avoid dereferencing a NULL regcache.
8586
74aac56f
DJ
85872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8588
8589 * configure.srv: Merge MIPS and MIPS64.
8590
400b20f5
MR
85912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8592
8593 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8594
677c5bb1
LM
85952008-08-18 Luis Machado <luisgpm@br.ibm.com>
8596
8597 * Makefile.in: Add required vsx dependencies.
8598
8599 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8600 Declare init_registers_powerpc_vsx32l.
8601 Declare init_registers_powerpc_vsx64l.
8602 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8603 (ppc_arch_setup): Check for VSX in hwcap.
8604 (ppc_fill_vsxregset): New function.
8605 (ppc_store_vsxregset): New function.
8606 Add new VSX entry in regset_info target_regsets.
8607
8608 * configure.srv: Add new VSX dependencies.
8609
a6f3e723
SL
86102008-08-12 Pedro Alves <pedro@codesourcery.com>
8611
8612 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8613 (remote_open): Set or clear transport_is_reliable.
8614 (putpkt_binary): Don't expect acks in noack mode.
8615 (getpkt): Don't send ack/nac in noack mode.
8616 * server.c (handle_general_set): Handle QStartNoAckMode.
8617 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8618 qSupported.
8619 (main): Reset noack_mode on every connection.
8620 * server.h (noack_mode): Declare.
8621
a417dc56
RW
86222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8623
8624 * Makefile.in (GDBREPLAY_OBS): New variable.
8625 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8626
3221518c
UW
86272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8628 Daniel Jacobowitz <dan@codesourcery.com>
8629
8630 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8631 (usr_store_inferior_registers): Likewise.
8632 (regsets_store_inferior_registers): Likewise.
8633
ec56be1b
PA
86342008-07-31 Rolf Jansen <rj@surtec.com>
8635 Pedro Alves <pedro@codesourcery.com>
8636
8637 * configure.ac: Check for memmem declaration.
8638 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8639 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8640 (disable_packet_qfThreadInfo): Unconditionally compile.
8641 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8642 * configure, config.in: Regenerate.
8643
2fe5e3ff
DE
86442008-07-28 Doug Kwan <dougkwan@google.com>
8645
8646 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8647 (linux_write_memory): Remove declaration of errno.
8648
836acd6d
UW
86492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8650
8651 * linux-low.c (handle_extended_wait): Do not use "status"
8652 variable uninitialized.
8653
aeba519e
PA
86542008-07-07 Pedro Alves <pedro@codesourcery.com>
8655
8656 * server.c (handle_v_attach): Inhibit reporting dll changes.
8657
db42f210
PA
86582008-06-27 Pedro Alves <pedro@codesourcery.com>
8659
8660 * remote-utils.c (prepare_resume_reply): If requested, don't
8661 output "thread:TID" in the T stop reply.
8662
8663 * server.c (disable_packet_vCont, disable_packet_Tthread)
8664 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8665 (handle_query): If requested, disable support for qC, qfThreadInfo
8666 and qsThreadInfo.
8667 (handle_v_requests): If requested, disable support for vCont.
8668 (gdbserver_show_disableable): New.
8669 (main): Handle --disable-packet and --disable-packet=LIST.
8670
8671 * server.h (disable_packet_vCont, disable_packet_Tthread)
8672 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8673
8e4c5421
CD
86742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8675
8676 * server.c (gdbserver_usage): Mention --version.
8677
6e23a804
DJ
86782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8679
8680 * Makefile.in (gdbreplay.o): New rule.
8681
90aa6a40
JM
86822008-06-06 Joseph Myers <joseph@codesourcery.com>
8683
8684 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8685 message, not gdbserver.
8686
c16158bc 86872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8688 Nathan Sidwell <nathan@codesourcery.com>
8689 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8690
8691 * acinclude.m4: Include ../../config/acx.m4.
8692 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8693 * configure, config.in: Regenerate.
8694 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8695 * server.c (gdbserver_version): Print PKGVERSION.
8696 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8697 (main): Adjust gdbserver_usage calls.
8698 * gdbreplay.c (version, host_name): Add declarations.
8699 (gdbreplay_version, gdbreplay_usage): New.
8700 (main): Accept --version and --help options.
8701
aeb75bf5
DJ
87022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8703
8704 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8705 (arm_breakpoint_at): Handle Thumb.
8706 (the_low_target): Add comment.
8707
76b233dd
UW
87082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8709
8710 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8711
08388c79
DE
87122008-05-09 Doug Evans <dje@google.com>
8713
a3c83fae
DE
8714 * server.h (decode_search_memory_packet): Declare.
8715 * remote-utils.c (decode_search_memory_packet): New fn.
8716 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8717 (handle_search_memory): New fn.
8718 (handle_query): Process qSearch:memory packets.
8719
bb9c3d36
UW
87202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8721
8722 * regcache.c (registers_length): Remove.
8723 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8724 full register packet.
8725 * regcache.h (registers_length): Remove prototype.
8726 * server.h (PBUFSIZ): Define to 16384.
8727
7284e1be
UW
87282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8729
8730 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8731 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8732 powerpc-64l.o, and powerpc-altivec64l.o.
8733 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8734 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8735 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8736 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8737 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8738 to srv_xmlfiles.
8739
8740 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8741 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8742 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8743 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8744 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8745 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8746 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8747 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8748 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8749 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8750 (clean): Update.
8751
8752 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8753 (init_registers_powerpc_32l): ... this new prototype.
8754 (init_registers_powerpc_32): Remove, replace by ...
8755 (init_registers_powerpc_altivec32l): ... this new prototype.
8756 (init_registers_powerpc_e500): Remove, replace by ...
8757 (init_registers_powerpc_e500l): ... this new prototype.
8758 (init_registers_ppc64): Remove, replace by ...
8759 (init_registers_powerpc_64l): ... this new prototype.
8760 (init_registers_powerpc_64): Remove, replace by ...
8761 (init_registers_powerpc_altivec64l): ... this new prototype.
8762 (ppc_num_regs): Set to 73.
8763 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8764 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8765 (ppc_cannot_store_register): Handle orig_r3 and trap.
8766 (ppc_arch_setup): Update init_registers_... calls.
8767 (ppc_fill_gregset): Handle orig_r3 and trap.
8768
8769 * inferiors.c (clear_inferiors): Reset current_inferior.
8770
fdc59709
PB
87712008-04-23 Paolo Bonzini <bonzini@gnu.org>
8772
889bf7c5
PA
8773 * acinclude.m4: Add override.m4.
8774 * configure: Regenerate.
fdc59709 8775
c9b2f845
UW
87762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8777
8778 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8779 initial call to init_register_ppc64.
8780
550512b8
UW
87812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8782
43aaf8b6
PA
8783 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8784 single powerpc*-*-linux* case.
550512b8
UW
8785 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8786
b6430ec3
UW
87872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8788
8789 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8790 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8791 from reg_xmlfiles.
8792 * linux-ppc-low.c: Include <elf.h>.
8793 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8794 (ppc_hwcap): New global variable.
8795 (ppc_regmap): Remove __SPE__ #ifdef sections.
8796 (ppc_regmap_e500): New global variable.
8797 (ppc_cannot_store_register): Update __SPE__ special case.
8798 (ppc_get_hwcap): New function.
8799 (ppc_arch_setup): Use it to determine whether inferior supports
8800 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8801 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8802 Do not access registers if target does not support AltiVec.
8803 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8804 Do not access registers if target does not support SPE.
8805 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8806
52fa2412
UW
88072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8808
8809 * linux-low.c (disabled_regsets, num_regsets): New.
8810 (use_regsets_p): Delete.
8811 (linux_wait_for_process): Clear disabled_regsets.
8812 (regsets_fetch_inferior_registers): Check and set it.
8813 (regsets_store_inferior_registers): Likewise.
8814 (linux_fetch_registers, linux_store_registers): Do not use
8815 use_regsets_p.
8816 (initialize_low): Allocate disabled_regsets.
8817
e28b3332
DJ
88182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8819
8820 * Makefile.in (LIBOBJS): New.
8821 (OBS): Use LIBOBJS.
8822 (memmem.o): New rule.
8823 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8824 * configure: Regenerated.
8825
4536995d
UW
88262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8827
8828 * server.c (handle_query): Never return "unsupported" for
8829 qXfer:features:read queries.
8830
221c031f
UW
88312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8832
8833 * server.c (get_features_xml): Fix inverted condition.
8834 (handle_query): Always support qXfer:feature:read.
8835
ccd213ac
DJ
88362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8837
8838 * server.c (wrapper_argv): New.
8839 (start_inferior): Handle wrapper_argv. If set, expect an extra
8840 trap.
8841 (gdbserver_usage): Document --wrapper.
8842 (main): Parse --wrapper.
8843
6fe305f7
UW
88442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8845
8846 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8847 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8848 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8849 (ppc_set_pc): Likewise.
8850 (ppc_arch_setup): New function.
8851 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8852 of collect_register.
889bf7c5 8853 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8854
5b0a002e
UW
88552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8856
8857 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8858 instead of linux-ppc64-low.o.
8859 * linux-ppc64-low.c: Remove file.
8860 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8861 (linux-ppc64-low.o): Remove rule.
8862
8863 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8864 (init_registers_powerpc_64): Likewise.
8865 (ppc_regmap): Conditionally define depending on __powerpc64__.
8866 (ppc_cannot_store_register): Do not special-case "fpscr" when
8867 compiled on __powerpc64__.
8868 (ppc_collect_ptrace_register): New function.
8869 (ppc_supply_ptrace_register): New function.
8870 (ppc_breakpoint): Change type to "unsigned int".
8871 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8872 (the_low_target): Conditionally provide initializers for the
889bf7c5 8873 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8874 collect_ptrace_register and supply_ptrace_register members.
8875
9b4b61c8
UW
88762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8877
8878 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8879 * server.c (gdbserver_xmltarget): Define.
8880 (get_features_xml): Use it to replace "target.xml" and arch_string.
8881
8882 * configure.srv: Remove srv_xmltarget. Add XML files that were
8883 mentioned there to srv_xmlfiles instead. Remove conditional tests
8884 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8885 srv_xmlfiles and srv_regobj to include all possible choices.
8886 * configure.ac (srv_xmltarget): Remove.
8887 (srv_xmlfiles): Do not add "target.xml".
8888 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8889 checks for supplementary target information.
8890 * configure: Regenerate.
8891 * Makefile.in (XML_TARGET): Remove.
8892 (target.xml): Remove rule.
8893 (clean): Do not clean up target.xml.
8894 (.PRECIOUS): Do not mention target.xml.
8895
8896 * target.h (struct target_ops): Remove arch_string member.
8897 * linux-low.c (linux_arch_string): Remove.
8898 (linux_target_ops): Remove arch_string initializer.
8899 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8900 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8901 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8902 * spu-low.c (spu_arch_string): Remove.
8903 (spu_target_ops): Remove arch_string initializer.
8904 * win32-low.c (win32_arch_string): Remove.
8905 (win32_target_ops): Remove arch_string initializer.
8906 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8907 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8908 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8909
ee1a7ae4
UW
89102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8911
8912 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8913 by collect_ptrace_register and supply_ptrace_register hooks.
8914 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8915 instead of checking for the_low_target.left_pad_xfer.
8916 (usr_store_inferior_registers): Use collect_ptrace_register callback
8917 instead of checking for the_low_target.left_pad_xfer.
8918
8919 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8920 (s390_supply_ptrace_register): Likewise.
8921 (s390_fill_gregset): Call s390_collect_ptrace_register.
8922 (the_low_target): Update.
8923
8924 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8925 (ppc_supply_ptrace_register): Likewise.
8926 (the_low_target): Update.
8927
8928 * linux-i386-low.c (the_low_target): Update.
8929 * linux-x86-64-low.c (the_low_target): Update.
8930
d61ddec4
UW
89312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8932
8933 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8934 reg-s390.o and reg-s390x.o.
8935
8936 * linux-low.c (new_inferior): New global variable.
8937 (linux_create_inferior, linux_attach): Set it.
8938 (linux_wait_for_process): Call the_low_target.arch_setup after the
8939 target has stopped for the first time.
8940 (initialize_low): Do not call the_low_target.arch_setup.
8941
8942 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8943 (s390_set_pc): Likewise.
8944 (s390_arch_setup): New function.
8945 (the_low_target): Use s390_arch_setup as arch_setup routine.
8946
8947 * regcache.c (realloc_register_cache): New function.
8948 (set_register_cache): Call it for each existing regcache.
8949
d05b4ac3
UW
89502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8951
8952 * server.h (init_registers): Remove prototype.
8953
8954 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8955 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8956 instead of init_registers ().
8957 * linux-arm-low.c (init_registers_arm): Add prototype.
8958 (init_registers_arm_with_iwmmxt): Likewise.
8959 (the_low_target): Add initializer for arch_setup field.
8960 * linux-cris-low.c (init_registers_cris): Add prototype.
8961 (the_low_target): Add initializer for arch_setup field.
8962 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8963 (the_low_target): Add initializer for arch_setup field.
8964 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8965 (the_low_target): Add initializer for arch_setup field.
8966 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8967 (the_low_target): Add initializer for arch_setup field.
8968 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8969 (the_low_target): Add initializer for arch_setup field.
8970 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8971 (the_low_target): Add initializer for arch_setup field.
8972 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8973 (init_registers_mips64_linux): Likewise.
8974 (the_low_target): Add initializer for arch_setup field.
8975 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8976 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8977 (the_low_target): Add initializer for arch_setup field.
8978 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8979 (init_registers_powerpc_64): Likewise.
8980 (the_low_target): Add initializer for arch_setup field.
8981 * linux-s390-low.c (init_registers_s390): Add prototype.
8982 (init_registers_s390x): Likewise.
8983 (the_low_target): Add initializer for arch_setup field.
8984 * linux-sh-low.c (init_registers_sh): Add prototype.
8985 (the_low_target): Add initializer for arch_setup field.
8986 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8987 (the_low_target): Add initializer for arch_setup field.
8988 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8989 (the_low_target): Add initializer for arch_setup field.
8990
8991 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8992 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8993 instead of init_registers ().
8994 * win32-arm-low.c (init_registers_arm): Add prototype.
8995 (the_low_target): Add initializer for arch_setup field.
8996 * win32-i386-low.c (init_registers_i386): Add prototype.
8997 (the_low_target): Add initializer for arch_setup field.
8998
8999 * spu-low.c (init_registers_spu): Add prototype.
9000 (initialize_low): Call initialie_registers_spu () instead of
9001 initialize_registers ().
9002
fd96d250
PA
90032008-02-19 Pedro Alves <pedro@codesourcery.com>
9004
9005 * server.c (handle_v_requests): When handling the vRun and vAttach
9006 packets, if already debugging a process, don't kill it. Return an
9007 error instead.
9008
d41b6bb4
DJ
90092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9010
9011 * server.c (handle_query): Correct length check.
9012
5ac588cf
PA
90132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9014
9015 * win32-low.c (do_initial_child_stuff): Add process handle
9016 parameter. Set current_process_handle and current_process_id from the
9017 parameters. Clear globals.
9018 (win32_create_inferior): Don't set current_process_handle and
9019 current_process_id here. Instead pass them on the call to
9020 do_initial_child_stuff.
9021 (win32_attach): Likewise.
9022 (win32_clear_inferiors): New.
9023 (win32_kill): Don't close the current process handle or the
9024 current thread handle here. Instead call win32_clear_inferiors.
9025 (win32_detach): Don't open a new handle to the process. Call
9026 win32_clear_inferiors.
9027 (win32_join): Don't rely on current_process_handle; open a new
9028 handle using the process id.
9029 (win32_wait): Call win32_clear_inferiors when the inferior process
9030 has exited.
9031
ecd7ecbc
DJ
90322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9033
9034 * server.c (monitor_show_help): Add "exit".
9035
1525d545
MG
90362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9037
ecd7ecbc 9038 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9039 (clean): Add reg-xtensa.c.
9040 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9041 * configure.srv (xtensa*-*-linux*) New target.
9042 * linux-xtensa-low.c: New.
9043 * xtensa-xtregs.c: New.
1525d545 9044
59a016f0
PA
90452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9046
9047 * hostio.c: Don't include errno.h.
9048 (errno_to_fileio_errno): Move to hostio-errno.
9049 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9050 error number outputting to the target->hostio_last_error callback.
9051 (hostio_packet_error): Use FILEIO_EINVAL directly.
9052 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9053 calls to hostio_error.
9054 * hostio-errno.c: New.
9055 * server.h (hostio_last_error_from_errno): Declare.
9056 * target.h (target_ops): Add hostio_last_error member.
9057 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9058 as hostio_last_error handler.
889bf7c5 9059 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9060 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9061 (wince_hostio_last_error): New functions.
9062 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9063 as hostio_last_error handler.
9064 (win32_target_ops) [!_WIN32_WCE]: Register
9065 hostio_last_error_from_errno as hostio_last_error handler.
9066 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9067 (hostio-errno.o): New rule.
9068 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9069 * configure.srv (srv_hostio_err_objs): New variable. Default to
9070 hostio-errno.o.
9071 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9072 * configure: Regenerate.
9073
2d717e4f
DJ
90742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9075
9076 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9077 (linux_kill, linux_detach): Clean up the process list.
9078 * remote-utils.c (remote_open): Improve port number parsing.
9079 (putpkt_binary, input_interrupt): Only send interrupts if the target
9080 is running.
9081 * server.c (extended_protocol): Make static.
9082 (attached): Define earlier.
9083 (exit_requested, response_needed, program_argv): New variables.
9084 (target_running): New.
9085 (start_inferior): Clear attached here.
9086 (attach_inferior): Set attached here.
9087 (require_running): Define.
9088 (handle_query): Use require_running and target_running. Implement
9089 "monitor exit".
9090 (handle_v_attach, handle_v_run): New.
9091 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9092 (gdbserver_usage): Update.
9093 (main): Redo argument parsing. Handle --debug and --multi. Handle
9094 --attach along with other options or after the port. Save
9095 program_argv. Support no initial program. Resynchronize
9096 communication with GDB after an error. Handle "monitor exit".
9097 Use require_running and target_running. Always allow the extended
9098 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9099 restart in extended mode.
9100 * README: Refer to the GDB manual. Update --attach usage.
9101
7407e2de
AS
91022007-12-20 Andreas Schwab <schwab@suse.de>
9103
9104 * linux-low.c (STACK_SIZE): Define.
9105 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9106 (linux_test_for_tracefork): Likewise.
9107
b65d95c5
DJ
91082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9109
9110 * linux-low.c (linux_wait_for_event): Update messages. Do not
9111 reinsert auto-delete breakpoints.
9112 * mem-break.c (struct breakpoint): Change return type of handler to
9113 int.
9114 (set_breakpoint_at): Update handler type.
9115 (reinsert_breakpoint_handler): Return 1 instead of calling
9116 delete_breakpoint.
9117 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9118 setting a new one.
9119 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9120 * mem-break.h (set_breakpoint_at): Update handler type.
9121 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9122 * win32-low.c (auto_delete_breakpoint): New.
9123 (get_child_debug_event): Use it.
9124
4e799345
DJ
91252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9126
9127 * configure.ac: Check for pread and pwrite.
9128 * hostio.c (handle_pread): Fall back to lseek and read.
9129 (handle_pwrite): Fall back to lseek and write.
9130 * config.in, configure: Regenerated.
9131
27524b67
DJ
91322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9133
9134 * server.c (myresume): Add own_buf argument.
9135 (main): Update calls.
9136
a20d5e98
DJ
91372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9138
9139 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9140 * remote-utils.c (remote_open): Do not call disable_async_io.
9141 (block_async_io): Delete.
9142 (unblock_async_io): Make static.
9143 (initialize_async_io): New.
9144 * server.c (handle_v_cont): Handle async I/O here.
9145 (myresume): Likewise. Move other common resume tasks here...
9146 (main): ... from here. Call initialize_async_io. Disable async
9147 I/O before the main loop.
9148 * server.h (initialize_async_io): Declare.
9149 (block_async_io, unblock_async_io): Delete prototypes.
9150 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9151
b79d787e
DJ
91522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9153
9154 * remote-utils.c (readchar): Allow binary data in received messages.
9155
d97903b2
PA
91562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9157
9158 * win32-low.c (attaching): New global.
9159 (win32_create_inferior): Clear the `attaching' global.
9160 (win32_attach): Set the `attaching' global.
9161 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9162 attaching. Only set a breakpoint at the entry point if not
9163 attaching.
9164
311de423
PA
91652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9166
9167 * server.c (main): Don't report dll events on the initial
9168 connection on attaches.
9169
6c2d16d2
PA
91702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9171
9172 * server.c (main): Relax numerical bases supported for the pid of
9173 the --attach command line argument.
9174
5ca906e6
PA
91752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9176
9177 * win32-low.c (win32_attach): Call OpenProcess before
9178 DebugActiveProcess, not after. Add last error output to error
9179 call.
9180
9c6c8194
PA
91812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9182
9183 * win32-low.c (win32_get_thread_context)
9184 (win32_set_thread_context): New functions.
9185 (thread_rec): Use win32_get_thread_context.
9186 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9187 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9188 field.
9189
4d5d1aaa
PA
91902007-12-03 Leo Zayas
9191 Pedro Alves <pedro_alves@portugalmail.pt>
9192
9193 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9194 global variables.
9195 (child_add_thread): Minor cleanup.
9196 (child_continue): Resume artificially suspended threads before
9197 calling ContinueDebugEvent.
9198 (suspend_one_thread): New.
9199 (fake_breakpoint_event): New.
9200 (get_child_debug_event): Change return type to int. Check here if
9201 gdb sent an interrupt request. If a soft interrupt was requested,
9202 fake a breakpoint event. Return 0 if there is no event to handle,
9203 and 1 otherwise.
9204 (win32_wait): Don't check here if gdb sent an interrupt request.
9205 Ensure there is a valid event to handle.
9206 (win32_request_interrupt): Add soft interruption method as last
9207 resort.
9208
c436e841
PA
92092007-12-03 Leo Zayas
9210 Pedro Alves <pedro_alves@portugalmail.pt>
9211
9212 * win32-low.h (win32_thread_info): Add descriptions to the
9213 structure members. Replace `suspend_count' counter by a
9214 `suspended' flag.
9215 * win32-low.c (thread_rec): Update condition of when to get the
9216 context from the inferior. Rely on ContextFlags being set if it
9217 has already been retrieved. Only suspend the inferior thread if
9218 we haven't already. Warn if that fails.
9219 (continue_one_thread): s/suspend_count/suspended/. Only call
9220 ResumeThread once. Warn if that fails.
9221
e7b5fa67
PA
92222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9223
9224 * win32-low.c (win32_wait): Don't read from the inferior when it
9225 has already exited.
9226
a385171d
PA
92272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9228
9229 * Makefile.in (win32_low_h): New variable.
9230 (win32-low.o): Add dependency on $(win32_low_h).
9231 (win32-arm-low.o, win32-i386-low.o): New rules.
9232
f80c84b3
DJ
92332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9234
9235 * hostio.c: Correct copyright year.
9236
a6b151f1
DJ
92372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9238
9239 * Makefile.in (OBS): Add hostio.o.
9240 (hostio.o): New rule.
9241 * server.h (handle_vFile): Declare.
9242 * hostio.c: New file.
9243 * server.c (handle_v_requests): Take packet_len and new_packet_len
9244 for binary packets. Call handle_vFile.
9245 (main): Update call to handle_v_requests.
9246
f9387fc3
DJ
92472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9248
9249 * linux-low.c: Include <sched.h>.
9250
51c2684e
DJ
92512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9252
9253 * linux-low.c (linux_tracefork_grandchild): New.
9254 (linux_tracefork_child): Use clone.
9255 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9256
75f83163
JB
92572007-10-31 Joel Brobecker <brobecker@adacore.com>
9258
9259 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9260
da5898ce
DJ
92612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9262
9263 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9264
24a09b5f
DJ
92652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9266
9267 * inferiors.c (change_inferior_id): Delete.
9268 (add_pid_to_list, pull_pid_from_list): New.
9269 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9270 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9271 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9272 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9273 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9274 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9275 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9276 (using_threads): Always set to 1.
9277 (handle_extended_wait): New.
9278 (add_process): Do not set TID.
9279 (linux_create_inferior): Set must_set_ptrace_flags.
9280 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9281 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9282 (linux_thread_alive): Rename TID argument to LWPID.
9283 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9284 (linux_wait_for_event): Do not use TID or check using_threads. Update
9285 call to dead_thread_notify. Call handle_extended_wait.
9286 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9287 (send_sigstop): Delete sigstop_sent.
9288 (wait_for_sigstop): Avoid TID.
9289 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9290 (linux_test_for_tracefork): New.
9291 (linux_lookup_signals): Use thread_db_active and
9292 linux_supports_tracefork_flag.
9293 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9294 * linux-low.h (get_process_thread): Avoid TID.
9295 (struct process_ifo): Move thread_known and tid to the end. Remove
9296 sigstop_sent.
9297 (linux_attach_lwp, thread_db_init): Update prototypes.
9298 * server.h (change_inferior_id): Delete prototype.
9299 (add_pid_to_list, pull_pid_from_list): New prototypes.
9300 * thread-db.c (thread_db_use_events): New.
9301 (find_first_thread): Rename to...
9302 (find_one_thread): ...this. Update callers and messages. Do not
9303 call fatal. Check thread_db_use_events. Do not call
9304 change_inferior_id or new_thread_notify.
9305 (maybe_attach_thread): Update. Do not call new_thread_notify.
9306 (thread_db_init): Set thread_db_use_events. Check use_events.
9307 * utils.c (fatal, warning): Correct message prefix.
9308
30ed0a8f
DJ
93092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9310
9311 * Makefile.in (clean): Remove new files.
9312 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9313 (powerpc-64.o, powerpc-64.c): New rules.
9314 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9315 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9316 with SPE.
9317 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9318 SPE targets.
9319 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9320 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9321 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9322 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9323 (target_regsets): Add AltiVec and SPE register sets.
9324 * configure.ac: Check for AltiVec and SPE.
9325 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9326 (ppc_fill_vrregset, ppc_store_vrregset): New.
9327 (target_regsets): Add AltiVec register set.
9328 * configure: Regenerated.
9329
fd462a61
DJ
93302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9331
9332 * linux-low.c (O_LARGEFILE): Define.
9333 (linux_read_memory): Use /proc/PID/mem.
9334 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9335 * configure, config.in: Regenerated.
9336
69f223ed
DJ
93372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9338
9339 * linux-low.c (linux_wait_for_event): Do not pass signals while
9340 single-stepping.
9341
aec18585
PA
93422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9343
9344 * win32-low.c (create_process): New.
9345 (win32_create_inferior): Use create_process instead of
9346 CreateProcess. If create_process failed retry appending an ".exe"
9347 suffix. Store the GetLastError result immediatelly after
9348 create_process calls and use it on the call to error.
9349
34d86ddd
PA
93502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9351
9352 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9353
5a0e3bd0
JB
93542007-08-23 Joel Brobecker <brobecker@adacore.com>
9355
9356 * configure.ac: Switch license to GPLv3.
9357
f88c79e6
MS
93582007-08-01 Michael Snyder <msnyder@access-company.com>
9359
9360 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9361
6b3d9b83
PA
93622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9363
9364 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9365 typedef.
9366 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9367 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9368 CloseToolhelp32Snapshot.
9369 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9370 CloseToolhelp32Snapshot.
9371
c588c53c
MS
93722007-07-27 Michael Snyder <michael.snyder@access-company.com>
9373
9374 * server.c (main): Check for inferior exit before main loop.
9375
aa0403d9
PA
93762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9377
9378 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9379 instead of on tmp_desc.
9380
255e7678
DJ
93812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9382 Daniel Jacobowitz <dan@codesourcery.com>
9383
9384 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9385 (add_thread): Minor cleanups.
9386 (clear_inferiors): Move lower in the file. Clear the DLL
9387 list.
9388 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9389 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9390 (xml_escape_text): New.
9391 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9392 for qSupported.
9393 (handle_v_cont): Report errors.
9394 (gdbserver_version): Update.
9395 (main): Correct size of own_buf. Do not report initial DLL events.
9396 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9397 (unloaded_dll, xml_escape_text): New.
9398 * win32-low.c (enum target_waitkind): Update comments.
9399 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9400 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9401 (win32_EnumProcessModules, win32_GetModuleInformation)
9402 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9403 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9404 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9405 (win32_Module32First, win32_Module32Next, load_toolhelp)
9406 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9407 (get_child_debug_event): Handle DLL events.
9408 (win32_wait): Likewise.
9409
0d37add9
DJ
94102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9411
9412 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9413 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9414
45e2715e
PA
94152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9416
9417 * win32-low.c (handle_output_debug_string): Ignore event if not
9418 waiting.
9419
c5674cf1
PA
94202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9421
9422 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9423
2bbe3cc1
DJ
94242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9425
9426 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9427
ae13219e
DJ
94282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9429
9430 * inferiors.c (change_inferior_id): Add comment.
9431 * linux-low.c (check_removed_breakpoint): Add an early
9432 prototype. Improve debug output.
9433 (linux_attach): Doc update.
9434 (linux_detach_one_process, linux_detach): Clean up before releasing
9435 each process.
9436 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9437 * linux-low.h (struct process_info): Doc improvement.
9438 * mem-break.c (delete_all_breakpoints): New.
9439 * mem-break.h (delete_all_breakpoints): New prototype.
9440 * thread-db.c (find_first_thread): New.
9441 (thread_db_create_event): Call it instead of
9442 thread_db_find_new_threads. Clean up unused variables.
9443 (maybe_attach_thread): Remove first thread handling.
9444 (thread_db_find_new_threads): Use find_first_thread.
9445 (thread_db_get_tls_address): Likewise.
9446
4105de34
DJ
94472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9448
9449 * thread-db.c (thread_db_find_new_threads): Add prototype.
9450 (thread_db_create_event): Check for the main thread before adding
9451 a new thread.
9452 (maybe_attach_thread): Only enable event reporting if TID == 0.
9453 (thread_db_get_tls_address): Check for new threads.
9454
2b876972
DJ
94552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9456
9457 * linux-low.c (linux_create_inferior): Try execv before execvp.
9458 * spu-low.c (spu_create_inferior): Likewise.
9459
7a245884
DJ
94602007-06-13 Mike Frysinger <vapier@gentoo.org>
9461
9462 * linux-low.c (linux_create_inferior): Change execv to execvp.
9463 * spu-low.c (spu_create_inferior): Likewies.
9464
117ce543
DJ
94652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9466
9467 * Makefile.in (clean): Clean new files instead of deleted ones.
9468 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9469 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9470 rules.
9471 * configure.srv: Specify XML files and new regformats for MIPS and
9472 MIPS64 GNU/Linux.
9473 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9474 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9475 an entry for the restart register.
9476 (mips_cannot_fetch_register, mips_cannot_store_register)
9477 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9478 register names to match the XML descriptions.
9479 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9480 restart register instead of $0.
9481
0e7f50da
UW
94822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9483 Markus Deuling <deuling@de.ibm.com>
9484
9485 * remote-utils.c (decode_xfer_write): New function.
9486 * server.h (decode_xfer_write): Add prototype.
9487 * server.c (handle_query): Add PACKET_LEN argument. Support
9488 qXfer:spu:read and qXfer:spu:write packets.
9489 (main): Pass packet_len to handle_query.
9490 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9491 * target.h (target_ops): Add qxfer_spu.
9492
374c1d38
UW
94932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9494
9495 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9496 accessing non-seekable spufs files.
9497
bb63802a
UW
94982007-05-16 Markus Deuling <deuling@de.ibm.com>
9499
889bf7c5 9500 * server.c (handle_query): Add reply for qC packet.
bb63802a 9501
7390519e
PA
95022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9503 Leo Zayas <lerele@champenstudios@com>
9504
9505 * server.h (check_remote_input_interrupt_request): New function.
9506 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9507 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9508 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9509 (check_remote_input_interrupt_request): New function.
9510 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9511 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9512 winapi_GenerateConsoleCtrlEvent): New typedefs.
9513 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9514 to 250 ms.
9515 (win32_wait): Check for remote interrupt request
9516 with check_remote_input_interrupt_request.
9517 (win32_request_interrupt): New function.
9518 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9519
34b34921
PA
95202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9521
9522 * win32-low.c (debug_registers_changed,
9523 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9524 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9525 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9526 (thread_rec): Get context using the low target.
9527 (child_add_thread): Call thread_added on the low target,
9528 which does the same thing.
9529 (regptr): Delete.
9530 (do_initial_child_stuff): Remove debug registers references.
9531 Set context using the low target. Resume threads after
9532 setting the contexts.
9533 (child_continue): Remove dead variable. Remove debug
9534 registers references.
9535 (child_fetch_inferior_registers): Go through the low target.
9536 (do_child_store_inferior_registers): Remove.
9537 (child_store_inferior_registers): Go through the low target.
9538 (win32_resume): Remove debug registers references.
9539 Set context using the low target.
9540 (handle_exception): Change return type to void. Don't record
9541 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9542 first chance exception.
889bf7c5 9543 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9544 goto loop. Always return after waiting for debug event.
9545 (win32_wait): Convert to switch statement. Handle spurious
9546 events.
9547
9548 * win32-i386-low.c (debug_registers_changed,
9549 debug_registers_used): New.
9550 (initial_stuff): Rename to ...
9551 (i386_initial_stuff): ... this. Clear debug registers
9552 state variables.
9553 (store_debug_registers): Delete.
9554 (i386_get_thread_context): New.
9555 (load_debug_registers): Delete.
9556 (i386_set_thread_context): New.
9557 (i386_thread_added): New.
9558 (single_step): Rename to ...
9559 (i386_single_step): ... this.
9560 (do_fetch_inferior_registers): Rename to ...
9561 (i386_fetch_inferior_register): ... this.
9562 (i386_store_inferior_register): New.
9563 (the_low_target): Adapt to new interface.
9564
9565 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9566 (arm_get_thread_context): New.
9567 (arm_set_thread_context): New.
9568 (regptr): New.
9569 (do_fetch_inferior_registers): Rename to ...
9570 (arm_fetch_inferior_register): ... this.
9571 (arm_store_inferior_register): New.
9572 (arm_wince_breakpoint): Reimplement as unsigned long.
9573 (arm_wince_breakpoint_len): Define.
9574 (the_low_target): Adapt to new interface.
9575
9576 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9577 load_debug_registers. Add get_thread_context, set_thread_context,
9578 thread_added and store_inferior_register. Rename
9579 fetch_inferior_registers to fetch_inferior_register.
9580 (regptr): Remove declaration.
9581
dd6953e1
PA
95822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9583
9584 * linux-low.c (linux_detach): Change return type to int. Return 0.
9585 * spu-low.c (spu_detach): Likewise.
9586
444d6139
PA
95872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9588
9589 * target.h (target_ops): Change return type of detach to int.
9590 Add join.
9591 (join_inferior): New.
9592 * server.c (main): Don't skip detach support on mingw32.
9593 If the inferior doesn't support detaching return error.
9594 Call join_inferior instead of using waitpid.
9595 * linux-low.c (linux_join): New.
9596 (linux_target_op): Add linux_join.
9597 * spu-low.c (spu_join): New.
9598 (spu_target_ops): Add spu_join.
9599 * win32-low.c (win32_detach): Adapt to new interface.
9600 Reopen current_process_handle before detaching. Issue a child
9601 resume before detaching.
9602 (win32_join): New.
9603 (win32_target_op): Add win32_join.
9604
1d5315fe
PA
96052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9606
9607 * win32-low.c (win32-attach): Fix return value.
9608 * target.h (target_ops): Describe ATTACH return values.
9609
bf914831
PA
96102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9611
9612 * win32-low.c (GETPROCADDRESS): Define.
9613 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9614 (winapi_DebugSetProcessKillOnExit): Likewise.
9615 (win32_create_inferior): Force usage of ansi CreateProcessA.
9616 (win32_attach): Use GETPROCADDRESS.
9617 (win32_detach): Likewise.
9618
f72f3e60
PA
96192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9620
9621 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9622
ed50f18f
PA
96232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9624
9625 * win32-low.c: Commit leftover changes from 2007-03-29.
9626
0c2ead7e
DJ
96272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9628
9629 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9630 fields short instead of int. Add explicit padding.
9631 (i387_cache_to_fsave): Remove unnecessary casts.
9632 (i387_fsave_to_cache): Doc fix.
9633 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9634
73725ff3
DJ
96352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9638 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9639
d99f33d8
PA
96402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9641
9642 * configure.srv (arm*-*-mingw32ce*): Move near the other
9643 arm targets.
9644
68070c10
PA
96452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9646
2482afc6 9647 * configure.ac: Add errno checking.
68070c10
PA
9648 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9649 sys/file.h and malloc.h.
9650 (AC_CHECK_DECLS): Add perror.
9651 (srv_mingwce): Handle.
2482afc6 9652 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9653 win32-i386-low.o to srv_tgtobj.
9654 (i[34567]86-*-mingw*): Likewise.
9655 (arm*-*-mingw32ce*): Add case.
9656 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9657 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9658 [__MINGW32CE__] (strerror): New function.
9659 [__MINGW32CE__] (errno): Define to GetLastError.
9660 [__MINGW32CE__] (COUNTOF): New macro.
9661 (remote_open): Remove extra close call.
9662 * mem-break.c (delete_breakpoint_at): New function.
9663 * mem-break.h (delete_breakpoint_at): Declare.
9664 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9665 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9666 [USE_WIN32API] (read, write): Add char* casts.
9667 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9668 * server.h: Include wincecompat.h on Windows CE.
9669 [HAVE_ERRNO_H]: Check.
9670 (perror): Declare if not declared.
9671 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9672 (perror_with_name): Remove errno declaration.
9673 * wincecompat.h: New.
9674 * wincecompat.c: New.
9675 * win32-low.h: New.
9676 * win32-arm-low.c: New.
9677 * win32-i386-low.c: New.
9678 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9679 (OUTMSG2): Make it safe.
9680 (_T): New macro.
9681 (COUNTOF): New macro.
9682 (NUM_REGS): Get it from the low target.
9683 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9684 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9685 (thread_rec): Let low target handle debug registers.
9686 (child_add_thread): Likewise.
9687 (child_init_thread_list): Likewise.
9688 (continue_one_thread): Likewise.
9689 (regptr): New.
9690 (do_child_fetch_inferior_registers): Move to ...
9691 * win32-i386-low.c: ... here, and rename to ...
9692 (do_fetch_inferior_registers): ... this.
889bf7c5 9693 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9694 Go through the low target.
9695 (do_child_store_inferior_registers): Use regptr.
9696 (strwinerror): New function.
9697 (win32_create_inferior): Handle Windows CE.
9698 Use strwinerror instead of strerror on Windows error
9699 codes. Add program to the error output.
9700 Don't close the main thread handle on Windows CE.
9701 (win32_attach): Use coredll.dll on Windows CE.
9702 (win32_kill): Close current process and current
9703 thread handles.
9704 (win32_detach): Use coredll.dll on Windows CE.
9705 (win32_resume): Let low target handle debug registers, and
9706 step request.
9707 (handle_exception): Add/Remove initial breakpoint. Avoid
9708 non-existant WSTOPSIG on Windows CE.
9709 (win32_read_inferior_memory): Cast to remove warning.
9710 (win32_arch_string): Go through the low target.
9711 (initialize_low): Call set_breakpoint_data with the low
9712 target's breakpoint.
9713 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9714 FOP_REGNUM, mappings): Move to ...
9715 * win32-i386-low.c: ... here.
9716 * win32-low.c (win32_thread_info): Move to ...
9717 * win32-low.h: ... here.
9718 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9719 win32-arm-low.c and wincecompat.c.
9720 (all:): Add $EXEEXT.
9721 (install-only:): Likewise.
9722 (gdbserver:): Likewise.
9723 (gdbreplay:): Likewise.
9724 * config.in: Regenerate.
9725 * configure: Regenerate.
9726
41093d81
PA
97272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9728
9729 * win32-low.c: Rename typedef thread_info to
9730 win32_thread_info throughout.
9731
544afa54
PA
97322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9733
9734 * win32-i386-low.c: Rename to ...
9735 * win32-low.c: ... this.
9736 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9737 * Makefile.in: Likewise.
9738
bce7165d
PA
97392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9740
9741 * remote-utils.c (monitor_output): Constify msg parameter.
9742 * server.h (monitor_output): Likewise.
9743 * win32-i386-low.c (handle_output_debug_string): New.
9744 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9745 handle_output_debug_string.
9746 (get_child_debug_event): Likewise.
9747
506c7aa0
DJ
97482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9749
9750 * server.c (main): Correct strtoul check.
9751
42c81e2a
DJ
97522007-03-27 Jon Ringle <jon@ringle.org>
9753
9754 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9755
9453113a
DJ
97562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9757
9758 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9759
64a69107
DJ
97602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9761
9762 * terminal.h: Check HAVE_SGTTY_H.
9763
97642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9765
9766 * remote-utils.c (remote_open): Print out the assigned port number.
9767
c74d0ad8
DJ
97682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * remote-utils.c (monitor_output): New function.
9771 * server.c (debug_threads): Define here.
9772 (monitor_show_help): New function.
9773 (handle_query): Handle qRcmd.
9774 (main): Do not handle 'd' packet.
9775 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9776 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9777 of debug_threads.
9778
de7c3b4a
PA
97792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9780
9781 * Makefile.in (EXEEXT): New.
9782 (clean): Use $(EXEEXT).
9783
ef57601b
PA
97842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9785
9786 * target.h (target_ops): Rename send_signal to request_interrupt,
9787 and remove enum target_signal parameter.
9788 * linux-low.c (linux_request_interrupt): Rename from
9789 linux_send_signal, and always send SIGINT.
9790 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9791 and always send SIGINT.
9792 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9793 of send_signal.
9794 (input_interrupt): Likewise.
9795
820f2bda
PA
97962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9797
9798 * server.c (get_features_xml): Check if target implemented
9799 arch_string.
9800 * win32-i386-low.c (win32_arch_string): New.
9801 (win32_target_ops): Add win32_arch_string as arch_string member.
9802
ab39bf24
UW
98032007-02-22 Markus Deuling <deuling@de.ibm.com>
9804
9805 * spu-low.c (spu_arch_string): New.
9806 (spu_target_ops): Add spu_arch_string.
9807
61ff6e04
DJ
98082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9809
9810 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9811 * configure.ac: Do not check for terminal.h.
9812 * configure, config.in: Regenerated.
9813
fb1e4ffc
DJ
98142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9815
9816 * Makefile.in (OBS): Add $(XML_BUILTIN).
9817 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9818 (clean): Update.
9819 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9820 (arm-with-iwmmxt.c): New.
9821 * config.in, configure: Regenerate.
9822 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9823 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9824 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9825 (arm*-*-linux*): Add iWMMXt and regset support.
9826 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9827 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9828 (arm_store_wmmxregset, target_regsets): New.
9829 * server.c (get_features_xml): Take annex argument. Check builtin
9830 XML documents.
9831 (handle_query): Handle multiple annexes.
9832
0f48aa01
DJ
98332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9834
9835 * remote-utils.c [USE_WIN32API] (read, write): Define.
9836 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9837 write.
9838
23181151
DJ
98392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9840
9841 * linux-i386-low.c (the_low_target): Set arch_string.
9842 * linux-x86-64-low.c (the_low_target): Likewise.
9843 * linux-low.c (linux_arch_string): New.
9844 (linux_target_ops): Add it.
9845 * linux-low.h (struct linux_target_ops): Add arch_string.
9846 * server.c (write_qxfer_response): Use const void * for DATA.
9847 (get_features_xml): New.
9848 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9849 * target.h (struct target_ops): Add arch_string method.
9850
9d606399
DJ
98512007-01-03 Denis Pilat <denis.pilat@st.com>
9852 Daniel Jacobowitz <dan@codesourcery.com>
9853
9854 * linux-low.c (linux_kill): Handle being called with no threads.
9855 * win32-i386-low.c (win32_kill): Likewise.
9856 (get_child_debug_event): Clear current_process_handle.
9857
98582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9859 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * remote-utils.c (remote_open): Check the type of specified
9862 serial port devices before opening them.
9863 * server.c (main): Kill the inferior if an error occurs during
9864 the first remote_open.
9865
a5e13d24
DJ
98662006-12-05 Markus Deuling <deuling@de.ibm.com>
9867
9868 * README: Update supported targets.
9869
186947f7
DJ
98702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9871
9872 * Makefile.in (clean): Remove reg-mips64.c.
9873 (reg-mips64.c, reg-mips64.o): New rules.
9874 * configure.srv: Handle mips64. Include regset support for mips.
9875 * linux-mips-low.c (union mips_register): New.
9876 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9877 (mips_breakpoint, mips_breakpoint_at): Use int.
9878 (mips_collect_register, mips_supply_register)
9879 (mips_collect_register_32bit, mips_supply_register_32bit)
9880 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9881 (mips_store_fpregset, target_regsets): New.
9882 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9883
a13e2c95
UW
98842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9885
9886 * configure.srv: Add target "spu*-*-*".
9887 * Makefile.in (clean): Remove reg-spu.c.
9888 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9889 * spu-low.c: New file.
9890
cb7283db
DJ
98912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9892
9893 * configure.ac: Correct td_thr_tls_get_addr test.
9894 * configure: Regenerated.
9895
89be2091
DJ
98962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9897
9898 * linux-low.c (linux_wait_for_event): Reformat. Use the
9899 pass_signals array.
9900 * remote-utils.c (decode_address_to_semicolon): New.
9901 * server.c (pass_signals, handle_general_set): New.
9902 (handle_query): Mention QPassSignals for qSupported.
9903 (main): Call handle_general_set.
9904 * server.h (pass_signals, decode_address_to_semicolon): New.
9905
000ef4f0
DJ
99062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9907
9908 * server.c (handle_query): Correct error handling for read_auxv.
9909
b7149293
UW
99102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9911
9912 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9913 and srv_linux_thread_db to yes.
9914 * linux-s390-low.c (s390_fill_gregset): New function.
9915 (target_regsets): Define data structure.
9916
dae5f5cf
DJ
99172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9918
9919 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9920 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9921 * config.in, configure: Regenerated.
9922 * inferiors.c (gdb_id_to_thread): New function.
9923 (gdb_id_to_thread_id): Use it.
9924 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9925 * linux-low.h (struct process_info): Add th member.
9926 (thread_db_get_tls_address): New prototype.
9927 * remote-utils.c (decode_address): Make non-static.
9928 * server.c (handle_query): Handle qGetTLSAddr.
9929 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9930 * target.h (struct target_ops): Add get_tls_address.
9931 * thread-db.c (maybe_attach_thread): Save the thread handle.
9932 (thread_db_get_tls_address): New.
9933
32ca6d61
DJ
99342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9935
9936 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9937 (linux_resume_one_process): Take a siginfo_t *. Update all
9938 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9939 (struct pending_signals): Add a siginfo_t.
9940 (linux_wait_for_process): Always set last_status.
9941 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9942 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9943 * linux-low.h (struct process_info): Add last_status.
9944
5ffff7c1
DJ
99452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9946
9947 * remote-utils.c (try_rle): New function.
9948 (putpkt_binary): Use it.
9949
8695c747
DJ
99502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9951
9952 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9953 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9954 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9955 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9956 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9957 point registers.
9958
290fadea
RS
99592006-08-08 Richard Sandiford <richard@codesourcery.com>
9960
9961 * server.c (terminal_fd): New variable.
9962 (old_foreground_pgrp): Likewise.
9963 (restore_old_foreground_pgrp): New function.
9964 (start_inferior): Record the terminal file descriptor in terminal_fd
9965 and its original foreground group in old_foreground_pgrp. Register
9966 restore_old_foreground_pgrp with atexit().
9967
9f2e1e63
DJ
99682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9969
9970 * server.c (handle_query): Correct qPart to qXfer.
9971
b80864fb
DJ
99722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9973
9974 * configure.ac: Check for more headers which are missing on
9975 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9976 * configure.srv: Add Cygwin and mingw32.
9977 * remote-utils.c: Don't include headers unconditionally which
9978 are missing on mingw32. Include <winsock.h> for mingw32.
9979 (remote_open): Adjust for mingw32 support. Flush
9980 standard error after writing to it.
9981 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9982 (unblock_async_io, enable_async_io, disable_async_io)
9983 (readchar, getpkt): Update for Winsock support.
9984 (prepare_resume_reply): Expect a protocol signal number.
9985 * server.c: Disable <sys/wait.h> on mingw32.
9986 (start_inferior): Adjust for mingw32 support. Flush
9987 standard error after writing to it.
9988 (attach_inferior): Likewise. Use protocol signal
9989 numbers.
9990 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9991 and names.
9992 * win32-i386-low.c: New file.
9993 * Makefile.in (XM_CLIBS): Set.
9994 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9995 (win32-i386-low.o): New dependency rule.
9996 * linux-low.c (linux_wait): Use target signal numbers.
9997 * target.h (struct target_ops): Doc fix.
9998 * server.h (target_signal_to_name): New prototype.
9999 * gdbreplay.c: Don't include headers unconditionally which
10000 are missing on mingw32. Include <winsock.h> for mingw32.
10001 (remote_close, remote_open): Adjust for Winsock support.
10002 * configure, config.in: Regenerated.
10003
0876f84a
DJ
100042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10005
10006 * server.c (decode_xfer_read, write_qxfer_response): New.
10007 (handle_query): Take a packet length argument. Handle
10008 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10009 the qSupported response.
10010 (main): Update call to handle_query.
10011
01f9e8fa
DJ
100122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10013
10014 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10015 (putpkt_binary): Renamed from putpkt and adjusted for binary
10016 data.
10017 (putpkt): New wrapper for putpkt_binary.
10018 (readchar): Don't mask off the high bit.
10019 (decode_X_packet): New function.
10020 * server.c (main): Call putpkt_binary if a handler sets the packet
10021 length. Save the length of the incoming packet. Handle 'X'.
10022 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10023
be2a5f71
DJ
100242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10025
10026 * server.c (handle_query): Handle qSupported.
10027
ea025f5f
DJ
100282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10029
10030 * remote-utils.c (all_symbols_looked_up): New variable.
10031 (look_up_one_symbol): Check it.
10032 * server.h (look_up_one_symbol): New declaration.
10033 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10034
9308fc88
DJ
100352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10036
10037 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10038 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10039 (PTRACE_GET_THREAD_AREA): Define.
10040 (ps_get_thread_area): New function.
10041
52fb6437
NS
100422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10043
10044 * configure.srv (m68k*-*-uclinux*): New target.
10045 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10046 (linux_resume_one_process): Remove extraneous cast.
10047 (linux_read_offsets): New.
10048 (linux_target_op): Add linux_read_offsets on mmuless systems.
10049 * server.c (handle_query): Add qOffsets logic.
10050 * target.h (struct target_ops): Add read_offsets.
10051
21b0f40c
DJ
100522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10055 (PTRACE_GET_THREAD_AREA): Define.
10056 (ps_get_thread_area): New function.
10057 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10058 (linux-x86-64-low.o): Update.
10059
0050a760
DJ
100602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10061
10062 * configure.ac: Remove checks for prfpregset_t.
10063 * gdb_proc_service.h: New file.
10064 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10065 new "gdb_proc_service.h".
10066 * proc-service.c: Likewise.
10067 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10068 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10069 * Makefile.in (gdb_proc_service_h): Updated.
10070 * configure, config.in: Regenerated.
10071
b92a518e
DJ
100722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * remote-utils.c (prepare_resume_reply): Move declaration
10075 of gdb_id_from_wait to the top of the block.
10076
545587ee
DJ
100772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10078
10079 * linux-low.c (regsets_store_inferior_registers): Read the regset
10080 from the target before filling it.
10081
9db87ebd
DJ
100822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10083
10084 * server.c (attach_inferior): Return SIGTRAP for a successful
10085 attach.
10086
dd24457d
DJ
100872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10088
10089 * Makefile.in (OBS): Add version.o.
10090 (STAGESTUFF): Delete.
10091 (version.o): Add dependencies.
10092 (version.c): Replace rule.
10093 (clean): Remove version.c.
10094 * server.c (gdbserver_version): New.
10095 (gdbserver_usage): Use printf.
10096 (main): Handle --version and --help.
10097 * server.h (version, host_name): Add declarations.
10098
6f0f660e
EZ
100992005-12-23 Eli Zaretskii <eliz@gnu.org>
10100
889bf7c5
PA
10101 * linux-arm-low.c:
10102 * linux-arm-low.c:
10103 * inferiors.c:
10104 * i387-fp.h:
10105 * i387-fp.c:
10106 * gdbreplay.c:
10107 * regcache.c:
10108 * proc-service.c:
10109 * mem-break.h:
10110 * mem-break.c:
10111 * linux-x86-64-low.c:
10112 * linux-sh-low.c:
10113 * linux-s390-low.c:
10114 * linux-ppc64-low.c:
10115 * linux-ppc-low.c:
10116 * linux-mips-low.c:
10117 * linux-m68k-low.c:
10118 * linux-m32r-low.c:
10119 * linux-low.h:
10120 * linux-low.c:
10121 * linux-ia64-low.c:
10122 * linux-i386-low.c:
10123 * linux-crisv32-low.c:
10124 * thread-db.c:
10125 * terminal.h:
10126 * target.h:
10127 * target.c:
10128 * server.h:
10129 * server.c:
10130 * remote-utils.c:
10131 * regcache.h:
10132 * utils.c:
10133 * Makefile.in:
10134 * configure.ac:
6f0f660e
EZ
10135 * gdbserver.1: Add (C) after Copyright. Update the FSF
10136 address.
10137
9d1fb177
DJ
101382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10141 (arm_breakpoint_at): Recognize both breakpoints.
10142 (the_low_target): Use the correct breakpoint instruction.
10143
011a70c2
DJ
101442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10147 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10148 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10149 (the_low_target): Update.
10150
7fb85e41
AS
101512005-10-25 Andreas Schwab <schwab@suse.de>
10152
10153 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10154
10155 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10156 (ia64_num_regs): Reduce to 462.
10157
3db0444b
DJ
101582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10159
10160 * acinclude.m4: Correct quoting.
10161 * aclocal.m4: Regenerated.
10162
10163 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10164 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10165 (thread_db_init): Call thread_db_err_str.
10166 * configure.ac: Check for TD_VERSION.
10167 * config.in, configure: Regenerated.
10168
bee0189a
DJ
101692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10170
10171 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10172
e9d25b98
DJ
101732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10174
10175 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10176 is not available. Define HAVE_PTRACE_GETREGS if it is.
10177 * config.in, configure: Regenerated.
10178 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10179 * linux-i386-low.c, linux-m68k-low.c: Update to use
10180 HAVE_PTRACE_GETREGS.
10181 * linux-low.c (regsets_fetch_inferior_registers)
10182 (regsets_store_inferior_registers): Only return 0 if we processed
10183 GENERAL_REGS.
10184 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10185 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10186
a06660f7
DJ
101872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10188
10189 * inferiors.c (struct thread_info): Add gdb_id.
10190 (add_thread): Add gdb_id argument.
10191 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10192 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10193 calls to add_thread.
10194 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10195 * server.c (handle_query): Use thread_to_gdb_id.
10196 (handle_v_cont, main): Use gdb_id_to_thread_id.
10197 * server.h (add_thread): Update prototype.
10198 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10199 prototypes.
10200
5a1f5858
DJ
102012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10202
10203 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10204 left-padded registers.
10205 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10206 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10207
e122f1f5
SE
102082005-07-01 Steve Ellcey <sje@cup.hp.com>
10209
10210 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10211 * configure: Regenerate.
10212 * config.in: Regenerate.
10213 * server.h (NEED_DECLARATION_STRERROR):
10214 Replace with !HAVE_DECL_STRERROR.
10215
d592fa2f
DJ
102162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10217
10218 * linux-low.c (linux_wait, linux_send_signal): Don't test
10219 an unsigned long variable for > 0 if it could be MAX_ULONG.
10220 * server.c (myresume): Likewise.
10221 * target.c (set_desired_inferior): Likewise.
10222
ccbd4912
MK
102232005-06-13 Mark Kettenis <kettenis@gnu.org>
10224
10225 * configure.ac: Simplify and improve check for socklen_t.
10226 * configure, config.in: Regenerate.
10227
f450004a
DJ
102282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10229
10230 * acconfig.h: Remove.
10231 * configure.ac: Add a test for socklen_t. Use three-argument
10232 AC_DEFINE throughout.
10233 * config.in: Regenerated using autoheader 2.59.
10234 * configure: Regenerated.
10235
10236 * gdbreplay.c (socklen_t): Provide a default.
10237 (remote_open): Use socklen_t.
10238 * remote-utils.c (socklen_t): Provide a default.
10239 (remote_open): Use socklen_t.
10240 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10241 unsigned char.
10242
10243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10244 char for buffers.
10245 * linux-low.c (linux_read_memory, linux_write_memory)
10246 (linux_read_auxv): Likewise.
10247 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10248 (check_mem_write): Likewise.
10249 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10250 Likewise.
10251 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10252 (registers_from_string, register_data): Likewise.
10253 * server.c (handle_query, main): Likewise.
10254 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10255 (decode_M_packet): Likewise.
10256 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10257 * target.h (struct target_ops): Update read_memory, write_memory,
10258 and read_auxv.
10259 (read_inferior_memory, write_inferior_memory): Update.
10260 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10261 to unsigned char *.
10262 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10263 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10264 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10265 linux-s390-low.c, linux-sh-low.c: Update for changes in
10266 read_inferior_memory and the_low_target->breakpoint.
10267
eee84df1
DJ
102682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10269
10270 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10271 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10272 * configure.srv: Add powerpc64-*-linux*.
10273 * linux-ppc64-low.c: New file.
10274
45b134e5
OF
102752005-05-23 Orjan Friberg <orjanf@axis.com>
10276
10277 * linux-cris-low.c: New file with support for CRIS.
10278 * linux-crisv32-low.c: Ditto for CRISv32.
10279 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10280 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10281 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10282 reg-crisv32.o, and reg-crisv32.c to make rules.
10283 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10284 recognized targets.
10285
48d93c75
UW
102862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10287
10288 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10289 of sizeof (PTRACE_XFER_TYPE).
10290 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10291
e013ee27
OF
102922005-05-12 Orjan Friberg <orjanf@axis.com>
10293
889bf7c5 10294 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10295 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10296 pointers for hardware watchpoint support.
10297 * linux-low.h (struct linux_target_ops): Ditto.
10298 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10299 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10300 to linux_target_ops.
10301 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10302 reply packet.
10303 * server.c (main): Recognize 'Z' and 'z' packets.
10304
b0ded00b
UW
103052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10306
10307 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10308 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10309 (the_low_target): Add new members.
10310
8643e2ad
DJ
103112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10312
10313 * proc-service.c (ps_lgetregs): Search all_processes instead of
10314 all_threads.
10315
fc620387
DJ
103162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10317
10318 * server.c (start_inferior): Change return type to int.
10319 (attach_inferior): Change sigptr to int *.
10320 (handle_v_cont, handle_v_requests): Change signal to int *.
10321 (main): Change signal to int.
10322
103232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10324
10325 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10326 * configure.srv: Add m32r*-*-linux*.
10327 * linux-m32r-low.c: New file.
10328
e0e76420
DJ
103292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10330
10331 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10332
a1928bad
DJ
103332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10334
10335 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10336 Take unsigned long arguments for PIDs.
10337 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10338 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10339 (wait_for_sigstop, linux_resume_one_process)
10340 (regsets_fetch_inferior_registers, linux_send_signal)
10341 (linux_read_auxv): Likewise. Update the types of variables holding
10342 PIDs. Update format string specifiers.
10343 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10344 * remote-utils.c (prepare_resume_reply): Likewise.
10345 * server.c (cont_thread, general_thread, step_thread)
10346 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10347 unsigned long.
10348 (handle_query): Update format specifiers.
10349 (handle_v_cont, main): Use strtoul for thread IDs.
10350 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10351 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10352 (general_thread, step_thread, thread_from_wait)
10353 (old_thread_from_wait): Update.
10354 * target.h (struct thread_resume): Use unsigned long for THREAD.
10355 (struct target_ops): Use unsigned long for arguments to attach and
10356 thread_alive.
10357
dcdb98d2
DJ
103582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10359
10360 * acinclude.m4: Include bfd/bfd.m4 directly.
10361 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10362 <agriffis@toolchain.org>.
10363 * aclocal.m4, configure: Regenerated.
10364
bec39cab
AC
103652005-01-07 Andrew Cagney <cagney@gnu.org>
10366
10367 * configure.ac: Rename configure.in, require autoconf 2.59.
10368 * configure: Re-generate.
10369
434c4c77
DJ
103702004-12-08 Daniel Jacobowitz <dan@debian.org>
10371
10372 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10373 LIBS when finished.
10374 * aclocal.m4: Regenerated.
10375 * configure: Regenerated.
10376
db1d3e1b
AS
103772004-11-21 Andreas Schwab <schwab@suse.de>
10378
10379 * linux-m68k-low.c (m68k_num_gregs): Define.
10380 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10381 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10382 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10383 (m68k_breakpoint_at): New. Add to the_low_target.
10384
10385 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10386 srv_linux_thread_db to yes.
10387
43360365
JB
103882004-10-20 Joel Brobecker <brobecker@gnat.com>
10389
10390 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10391 (ARCH_SET_FS): Likewise.
10392 (ARCH_GET_FS): Likewise.
10393 (ARCH_GET_GS): Likewise.
10394
fd500816
DJ
103952004-10-16 Daniel Jacobowitz <dan@debian.org>
10396
10397 * linux-i386-low.c (ps_get_thread_area): New.
10398 * linux-x86-64-low.c (ps_get_thread_area): New.
10399 * linux-low.c: Include <sys/syscall.h>.
10400 (linux_kill_one_process): Don't kill the first thread here.
10401 (linux_kill): Kill the first thread here.
10402 (kill_lwp): New function.
10403 (send_sigstop, linux_send_signal): Use it.
10404 * proc-service.c: Clean up #ifdefs.
10405 (fpregset_info): Delete.
10406 (ps_lgetregs): Update and enable implementation.
10407 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10408 implementations.
10409 * remote-utils.c (struct sym_cache, symbol_cache): New.
10410 (input_interrupt): Print a clearer message.
10411 (async_io_enabled): New variable.
10412 (enable_async_io, disable_async_io): Use it. Update comments.
10413 (look_up_one_symbol): Use the symbol cache.
10414 * thread-db.c (thread_db_look_up_symbols): New function.
10415 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10416
f6de3c42
DJ
104172004-10-16 Daniel Jacobowitz <dan@debian.org>
10418
10419 * configure.in: Test for -rdynamic.
10420 * configure: Regenerated.
10421 * Makefile (INTERNAL_LDFLAGS): New.
10422 (gdbserver, gdbreplay): Use it.
10423
2c0fc042
AC
104242004-09-02 Andrew Cagney <cagney@gnu.org>
10425
10426 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10427
075b3282
DJ
104282004-03-23 Daniel Jacobowitz <drow@mvista.com>
10429
10430 * linux-low.c (linux_wait): Clear all_processes list also.
10431
fa6a77dc
DJ
104322004-03-12 Daniel Jacobowitz <drow@mvista.com>
10433
10434 * linux-low.c: Include <errno.h>. Remove extern declaration of
10435 errno.
10436
6d782a97
DJ
104372004-03-12 Daniel Jacobowitz <drow@mvista.com>
10438
10439 * gdbreplay.c, server.h, utils.c: Update copyright years.
10440
3a7fb99b
DJ
104412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10442
10443 * server.c (main): Print child status or termination signal from
10444 variable 'signal', not 'sig'.
10445
c3e735a6
DJ
104462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10447
10448 * linux-low.c (linux_read_memory): Change return type to
10449 int. Check for and return error from ptrace().
10450 * target.c (read_inferior_memory): Change return type to int. Pass
10451 back return status from the_target->read_memory().
10452 * target.h (struct target_ops): Adapt *read_memory() prototype.
10453 Update comment.
10454 (read_inferior_memory): Adapt prototype.
10455 * server.c (main): Return an error packet if
10456 read_inferior_memory() returns an error.
10457
a59d1c82
DJ
104582004-03-04 Daniel Jacobowitz <drow@mvista.com>
10459
10460 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10461 Unify with other clean targets.
10462
dc3f8883
DJ
104632004-02-29 Daniel Jacobowitz <drow@mvista.com>
10464
10465 * server.c (handle_v_cont): Call set_desired_inferior.
10466
89a208da
DJ
104672004-02-29 Daniel Jacobowitz <drow@mvista.com>
10468
10469 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10470
62ea82f5
DJ
104712004-02-29 Daniel Jacobowitz <drow@mvista.com>
10472
10473 * linux-low.c (linux_wait): Unblock async I/O.
10474 (linux_resume): Block and enable async I/O.
10475 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10476 * server.h (block_async_io, unblock_async_io): Add prototypes.
10477
6910d122
DJ
104782004-02-29 Daniel Jacobowitz <drow@mvista.com>
10479
10480 * remote-utils.c (remote_open): Print a status notice after
10481 opening a TCP port.
10482 * server.c (attach_inferior): Print a status notice after
10483 attaching.
10484
104852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10486
10487 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10488
c89dc5d4
DJ
104892004-02-26 Daniel Jacobowitz <drow@mvista.com>
10490
10491 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10492 error packet.
10493 * server.c, target.h: Update copyright years.
10494
4b8dad4a
RM
104952004-02-25 Roland McGrath <roland@redhat.com>
10496
10497 * target.h (struct target_ops): New member `read_auxv'.
10498 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10499 * linux-low.c (linux_read_auxv): New function.
10500 (linux_target_ops): Initialize `read_auxv' member to that.
10501
d7446758
JB
105022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10503
10504 Committed by Jim Blandy <jimb@redhat.com>.
10505
10506 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10507 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10508 instead of GPR_SIZE to distiguish s390 and s390x targets.
10509
5544ad89
DJ
105102004-01-31 Daniel Jacobowitz <drow@mvista.com>
10511
10512 * linux-low.c: Update copyright year.
10513 (check_removed_breakpoint): Clear pending_is_breakpoint.
10514 (linux_set_resume_request, linux_queue_one_thread)
10515 (resume_status_pending_p): New functions.
10516 (linux_continue_one_thread): Use process->resume.
10517 (linux_resume): Only resume threads if there are no pending events.
10518 * linux-low.h (struct process_info): Add resume request
10519 pointer.
10520
2a68b70e
DJ
105212004-01-30 Daniel Jacobowitz <drow@mvista.com>
10522
10523 * regcache.c (new_register_cache): Clear the allocated register
10524 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10525
64386c31
DJ
105262003-10-13 Daniel Jacobowitz <drow@mvista.com>
10527
10528 * linux-low.c (linux_resume): Take a struct thread_resume *
10529 argument.
10530 (linux_wait): Update call.
10531 (resume_ptr): New static variable.
10532 (linux_continue_one_thread): Renamed from
10533 linux_continue_one_process. Use resume_ptr.
10534 (linux_resume): Use linux_continue_one_thread.
10535 * server.c (handle_v_cont, handle_v_requests): New functions.
10536 (myresume): New function.
10537 (main): Handle 'v' case.
10538 * target.h (struct thread_resume): New type.
10539 (struct target_ops): Change argument of "resume" to struct
10540 thread_resume *.
10541 (myresume): Delete macro.
10542
c938e9b0
L
105432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10544
10545 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10546 (uninstall): Support DESTDIR.
10547
7f313d07
BC
10548Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10549
10550 * configure.srv: Add xscale*linux copy of arm*linux entry.
10551
3b2fc2ea
DJ
105522003-07-24 Daniel Jacobowitz <drow@mvista.com>
10553
10554 * linux-arm-low.c (arm_reinsert_addr): New function.
10555 (the_low_target): Add arm_reinsert_addr.
10556
1c0a559e
MK
105572003-07-08 Mark Kettenis <kettenis@gnu.org>
10558
10559 * mem-break.c: Remove whitespace at end of file.
10560
43d5792c
DJ
105612003-06-28 Daniel Jacobowitz <drow@mvista.com>
10562
10563 * configure.in: Check whether we need to prototype strerror.
10564 * server.h: Optionally prototype strerror.
10565 * gdbreplay.c (perror_with_name): Use strerror.
10566 * linux-low.c (linux_attach_lwp): Use strerror.
10567 * utils.c (perror_with_name): Use strerror.
10568 * config.in, configure: Regenerated.
10569
c8a86edf
DJ
105702003-06-28 Daniel Jacobowitz <drow@mvista.com>
10571
10572 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10573 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10574
73d37363
DJ
105752003-06-20 Daniel Jacobowitz <drow@mvista.com>
10576
10577 * Makefile.in (SFILES): Update.
10578 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10579 low-sun3.c: Remove files.
10580
6ad8ae5c
DJ
105812003-06-17 Daniel Jacobowitz <drow@mvista.com>
10582
10583 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10584 (linux_detach_one_process, linux_detach): New functions.
10585 (linux_target_ops): Add linux_detach.
10586 * server.c (main): Handle 'D' packet.
10587 * target.h (struct target_ops): Add "detach" member.
10588 (detach_inferior): Define.
10589
1581182a
MK
105902003-06-13 Mark Kettenis <kettenis@gnu.org>
10591
10592 From Kelley Cook <kelleycook@wideopenwest.com>:
10593 * configure.srv: Accept i[34567]86 variants.
10594
e5379b03
DJ
105952003-06-05 Daniel Jacobowitz <drow@mvista.com>
10596
10597 * linux-low.c (linux_wait_for_event): Correct comment typos.
10598 (linux_resume_one_process): Call check_removed_breakpoint.
10599 (linux_send_signal): New function.
10600 (linux_target_ops): Add linux_send_signal.
10601 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10602 of kill.
10603 * target.h (struct target_ops): Add send_signal.
10604
2ff29de4
JB
106052003-05-29 Jim Blandy <jimb@redhat.com>
10606
10607 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10608 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10609 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10610 away part of the register's value.
10611
254787d4
DJ
106122003-03-26 Daniel Jacobowitz <drow@mvista.com>
10613
10614 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10615 (linux_wait_for_event, linux_init_signals): Likewise.
10616
94e10508
DJ
106172003-03-17 Daniel Jacobowitz <drow@mvista.com>
10618
10619 * configure.in: Check for stdlib.h.
10620 * configure: Regenerated.
10621 * config.in: Regenerated.
10622
4c0711e0
DJ
106232003-01-04 Andreas Schwab <schwab@suse.de>
10624
10625 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10626
ef66e766
AC
106272003-01-02 Andrew Cagney <ac131313@redhat.com>
10628
10629 * Makefile.in: Remove obsolete code.
10630
a1358604
DJ
106312002-11-20 Daniel Jacobowitz <drow@mvista.com>
10632
10633 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10634 defined(PT_FPR0_HI).
10635
23ce3b1c
DJ
106362002-11-17 Stuart Hughes <seh@zee2.com>
10637
10638 * linux-arm-low.c (arm_num_regs): Increase.
10639 (arm_regmap): Include status register.
10640
106412002-11-17 Daniel Jacobowitz <drow@mvista.com>
10642
10643 * linux-low.c (register_addr): Remove incorrect -1 check.
10644
a9fa9f7d
DJ
106452002-08-29 Daniel Jacobowitz <drow@mvista.com>
10646
10647 * linux-low.c (linux_create_inferior): Call setpgid. Return
10648 the new PID.
10649 (unstopped_p, linux_signal_pid): Remove.
10650 (linux_target_ops): Remove linux_signal_pid.
10651 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10652 global instead of target method.
10653 * target.h (struct target_ops): Remove signal_pid. Update comment
10654 for create_inferior.
10655 * server.c (signal_pid): New variable.
10656 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10657 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10658 (attach_inferior): Set signal_pid.
10659
17574093
DJ
106602002-08-23 Daniel Jacobowitz <drow@mvista.com>
10661
10662 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10663
106642002-08-20 Jim Blandy <jimb@redhat.com>
10665
10666 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10667 default for this.
10668
106692002-08-01 Andrew Cagney <cagney@redhat.com>
10670
10671 * Makefile.in: Make chill references obsolete.
10672
106732002-07-24 Kevin Buettner <kevinb@redhat.com>
10674
10675 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10676 * configure: Regenerate.
10677 * config.in: Regenerate.
10678
106792002-07-09 David O'Brien <obrien@FreeBSD.org>
10680
10681 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10682 (perror_with_name, remote_close, remote_open, expect, play): Static.
10683
106842002-07-04 Michal Ludvig <mludvig@suse.cz>
10685
4b8dad4a 10686 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10687 byte offsets instead of an array of indexes.
10688 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10689
106902002-06-13 Daniel Jacobowitz <drow@mvista.com>
10691
10692 * regcache.c: Add comment.
10693
106942002-06-11 Daniel Jacobowitz <drow@mvista.com>
10695
10696 * thread-db.c: New file.
10697 * proc-service.c: New file.
10698 * acinclude.m4: New file.
10699 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10700 proc-service.o, and thread-db.o.
10701 (linux-low.o): Add USE_THREAD_DB.
10702 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10703 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10704 * aclocal.m4: Regenerated.
10705 * config.in: Regenerated.
10706 * configure: Regenerated.
10707 * configure.in: Check for proc_service.h, sys/procfs.h,
10708 thread_db.h, and linux/elf.h headrs.
10709 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10710 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10711 Check for -lthread_db and thread support.
10712 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10713 PowerPC, and SuperH.
10714 * i387-fp.c: Constify arguments.
10715 * i387-fp.h: Likewise.
10716 * inferiors.c: (struct thread_info): Renamed from
10717 `struct inferior_info'. Remove PID member. Use generic inferior
10718 list header. All uses updated.
10719 (inferiors, signal_pid): Removed.
10720 (all_threads): New variable.
10721 (get_thread): Define.
10722 (add_inferior_to_list): New function.
10723 (for_each_inferior): New function.
10724 (change_inferior_id): New function.
10725 (add_inferior): Removed.
10726 (remove_inferior): New function.
10727 (add_thread): New function.
10728 (free_one_thread): New function.
10729 (remove_thread): New function.
10730 (clear_inferiors): Use for_each_inferior and free_one_thread.
10731 (find_inferior): New function.
10732 (find_inferior_id): New function.
10733 (inferior_target_data): Update argument type.
10734 (set_inferior_target_data): Likewise.
10735 (inferior_regcache_data): Likewise.
10736 (set_inferior_regcache_data): Likewise.
10737 * linux-low.c (linux_bp_reinsert): Remove.
10738 (all_processes, stopping_threads, using_thrads)
10739 (struct pending_signals, debug_threads, pid_of): New.
10740 (inferior_pid): Replace with macro.
10741 (struct inferior_linux_data): Remove.
10742 (get_stop_pc, add_process): New functions.
10743 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10744 Use add_process and add_thread.
10745 (linux_attach_lwp): New function, based on old linux_attach. Use
10746 add_process and add_thread. Set stop_expected for new threads.
10747 (linux_attach): New function.
10748 (linux_kill_one_process): New function.
10749 (linux_kill): Kill all LWPs.
10750 (linux_thread_alive): Use find_inferior_id.
10751 (check_removed_breakpoints, status_pending_p): New functions.
10752 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10753 Update. Use WNOHANG. Wait for cloned processes also. Update process
10754 struct for the found process.
10755 (linux_wait_for_event): New function.
10756 (linux_wait): Use it. Support LWPs.
10757 (send_sigstop, wait_for_sigstop, stop_all_processes)
10758 (linux_resume_one_process, linux_continue_one_process): New functions.
10759 (linux_resume): Support LWPs.
10760 (REGISTER_RAW_SIZE): Remove.
10761 (fetch_register): Use register_size instead. Call supply_register.
10762 (usr_store_inferior_registers): Likewise. Call collect_register.
10763 Fix recursive case.
10764 (regsets_fetch_inferior_registers): Improve error message.
10765 (regsets_store_inferior_registers): Add debugging.
10766 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10767 (unstopped_p, linux_signal_pid): New functions.
10768 (linux_target_ops): Add linux_signal_pid.
10769 (linux_init_signals): New function.
10770 (initialize_low): Call it. Initialize using_threads.
10771 * regcache.c (inferior_regcache_data): Add valid
10772 flag.
10773 (get_regcache): Fetch registers lazily. Add fetch argument
10774 and update all callers.
10775 (regcache_invalidate_one, regcache_invalidate): New
10776 functions.
10777 (new_register_cache): Renamed from create_register_cache.
10778 Return the new regcache.
10779 (free_register_cache): Change argument to a void *.
10780 (registers_to_string, registers_from_string): Call get_regcache
10781 with fetch flag set.
10782 (register_data): Make static. Pass fetch flag to get_regcache.
10783 (supply_register): Call get_regcache with fetch flag clear.
10784 (collect_register): Call get_regcache with fetch flag set.
10785 (collect_register_as_string): New function.
10786 * regcache.h: Update.
10787 * remote-utils.c (putpkt): Flush after debug output and use
10788 stderr.
10789 Handle input interrupts while waiting for an ACK.
10790 (input_interrupt): Use signal_pid method.
10791 (getpkt): Flush after debug output and use stderr.
10792 (outreg): Use collect_register_as_string.
10793 (new_thread_notify, dead_thread_notify): New functions.
10794 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10795 and general_thread.
10796 (look_up_one_symbol): Flush after debug output.
10797 * server.c (step_thread, server_waiting): New variables.
10798 (start_inferior): Don't use signal_pid. Update call to mywait.
10799 (attach_inferior): Update call to mywait.
10800 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10801 (main): Don't fetch/store registers explicitly. Use
10802 set_desired_inferior. Support proposed ``Hs'' packet. Update
10803 calls to mywait.
10804 * server.h: Update.
10805 (struct inferior_list, struct_inferior_list_entry): New.
10806 * target.c (set_desired_inferior): New.
10807 (write_inferior_memory): Constify.
10808 (mywait): New function.
10809 * target.h: Update.
10810 (struct target_ops): New signal_pid method.
10811 (mywait): Removed macro, added prototype.
10812
10813 * linux-low.h (regset_func): Removed.
10814 (regset_fill_func, regset_store_func): New.
10815 (enum regset_type): New.
10816 (struct regset_info): Add type field. Use new operation types.
10817 (struct linux_target_ops): stop_pc renamed to get_pc.
10818 Add decr_pc_after_break and breakpoint_at.
10819 (get_process, get_thread_proess, get_process_thread)
10820 (strut process_info, all_processes, linux_attach_lwp)
10821 (thread_db_init): New.
10822
10823 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10824 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10825 (the_low_target): Add new members.
10826 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10827 (i386_store_fpxregset): Constify.
10828 (target_regsets): Add new kind identifier.
10829 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10830 (i386_set_pc): Add debugging.
10831 (i386_breakpoint_at): New function.
10832 (the_low_target): Add new members.
10833 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10834 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10835 (mips_breakpoint_at): New.
10836 (the_low_target): Add new members.
10837 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10838 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10839 (the_low_target): Add new members.
10840 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10841 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10842 (the_low_target): Add new members.
10843 * linux-x86-64-low.c (target_regsets): Add new kind
10844 identifier.
10845
108462002-05-15 Daniel Jacobowitz <drow@mvista.com>
10847
10848 From Martin Pool <mbp@samba.org>:
10849 * server.c (gdbserver_usage): New function.
10850 (main): Call it.
10851
108522002-05-14 Daniel Jacobowitz <drow@mvista.com>
10853
10854 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10855 stop_at -> stop_pc.
10856
108572002-05-04 Andrew Cagney <ac131313@redhat.com>
10858
10859 * Makefile.in: Remove obsolete code.
10860
108612002-04-24 Michal Ludvig <mludvig@suse.cz>
10862
10863 * linux-low.c (regsets_fetch_inferior_registers),
10864 (regsets_store_inferior_registers): Removed cast to int from
10865 ptrace() calls.
10866 * regcache.h: Added declaration of struct inferior_info.
10867
108682002-04-20 Daniel Jacobowitz <drow@mvista.com>
10869
10870 * inferiors.c (struct inferior_info): Add regcache_data.
10871 (add_inferior): Call create_register_cache.
10872 (clear_inferiors): Call free_register_cache.
10873 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10874 * regcache.c (struct inferior_regcache_data): New.
10875 (registers): Remove.
10876 (get_regcache): New function.
10877 (create_register_cache, free_register_cache): New functions.
10878 (set_register_cache): Don't initialize the register cache here.
10879 (registers_to_string, registers_from_string, register_data): Call
10880 get_regcache.
10881 * regcache.h: Add prototypes.
10882 * server.h: Likewise.
10883
108842002-04-20 Daniel Jacobowitz <drow@mvista.com>
10885
10886 * mem-break.c: New file.
10887 * mem-break.h: New file.
10888 * Makefile.in: Add mem-break.o rule; update server.h
10889 dependencies.
10890 * inferiors.c (struct inferior_info): Add target_data
10891 member.
10892 (clear_inferiors): Free target_data member if set.
10893 (inferior_target_data, set_inferior_target_data): New functions.
10894 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10895 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10896 * linux-low.c (linux_bp_reinsert): New variable.
10897 (struct inferior_linux_data): New.
10898 (linux_create_inferior): Use set_inferior_target_data.
10899 (linux_attach): Likewise. Call add_inferior.
10900 (linux_wait_for_one_inferior): New function.
10901 (linux_wait): Call it.
10902 (linux_write_memory): Add const.
10903 (initialize_low): Call set_breakpoint_data.
10904 * linux-low.h (struct linux_target_ops): Add breakpoint
10905 handling members.
10906 * server.c (attach_inferior): Remove extra add_inferior
10907 call.
10908 * server.h: Include mem-break.h. Update inferior.c
10909 prototypes.
10910 * target.c (read_inferior_memory)
10911 (write_inferior_memory): New functions.
10912 * target.h (read_inferior_memory)
10913 (write_inferior_memory): Change macros to prototypes.
10914 (struct target_ops): Update comments. Add const to write_memory
10915 definition.
10916
109172002-04-11 Daniel Jacobowitz <drow@mvista.com>
10918
10919 * linux-low.c (usr_store_inferior_registers): Support
10920 registers which are allowed to fail to store.
10921 * linux-low.h (linux_target_ops): Likewise.
10922 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10923 (ppc_cannot_store_register): FPSCR may not be storable.
10924
109252002-04-09 Daniel Jacobowitz <drow@mvista.com>
10926
10927 * server.h: Include <string.h> if HAVE_STRING_H.
10928 * ChangeLog: Correct paths in last ChangeLog entry.
10929
109302002-04-09 Daniel Jacobowitz <drow@mvista.com>
10931
10932 * linux-low.h: Remove obsolete prototypes.
10933 (struct linux_target_ops): New.
10934 (extern the_low_target): New.
10935 * linux-low.c (num_regs, regmap): Remove declarations.
10936 (register_addr): Use the_low_target explicitly.
10937 (fetch_register): Likewise.
10938 (usr_fetch_inferior_registers): Likewise.
10939 (usr_store_inferior_registers): Likewise.
10940 * linux-arm-low.c (num_regs): Remove.
10941 (arm_num_regs): Define.
10942 (arm_regmap): Renamed from regmap, made static.
10943 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10944 made static.
10945 (arm_cannot_store_register): Renamed from cannot_store_register,
10946 made static.
10947 (the_low_target): New.
10948 * linux-i386-low.c (num_regs): Remove.
10949 (i386_num_regs): Define.
10950 (i386_regmap): Renamed from regmap, made static.
10951 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10952 made static.
10953 (i386_cannot_store_register): Renamed from cannot_store_register,
10954 made static.
10955 (the_low_target): New.
10956 * linux-ia64-low.c (num_regs): Remove.
10957 (ia64_num_regs): Define.
10958 (ia64_regmap): Renamed from regmap, made static.
10959 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10960 made static.
10961 (ia64_cannot_store_register): Renamed from cannot_store_register,
10962 made static.
10963 (the_low_target): New.
10964 * linux-m68k-low.c (num_regs): Remove.
10965 (m68k_num_regs): Define.
10966 (m68k_regmap): Renamed from regmap, made static.
10967 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10968 made static.
10969 (m68k_cannot_store_register): Renamed from cannot_store_register,
10970 made static.
10971 (the_low_target): New.
10972 * linux-mips-low.c (num_regs): Remove.
10973 (mips_num_regs): Define.
10974 (mips_regmap): Renamed from regmap, made static.
10975 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10976 made static.
10977 (mips_cannot_store_register): Renamed from cannot_store_register,
10978 made static.
10979 (the_low_target): New.
10980 * linux-ppc-low.c (num_regs): Remove.
10981 (ppc_num_regs): Define.
10982 (ppc_regmap): Renamed from regmap, made static.
10983 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10984 made static.
10985 (ppc_cannot_store_register): Renamed from cannot_store_register,
10986 made static.
10987 (the_low_target): New.
10988 * linux-s390-low.c (num_regs): Remove.
10989 (s390_num_regs): Define.
10990 (s390_regmap): Renamed from regmap, made static.
10991 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10992 made static.
10993 (s390_cannot_store_register): Renamed from cannot_store_register,
10994 made static.
10995 (the_low_target): New.
10996 * linux-sh-low.c (num_regs): Remove.
10997 (sh_num_regs): Define.
10998 (sh_regmap): Renamed from regmap, made static.
10999 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11000 made static.
11001 (sh_cannot_store_register): Renamed from cannot_store_register,
11002 made static.
11003 (the_low_target): New.
11004 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11005 (the_low_target): New.
11006
110072002-04-09 Daniel Jacobowitz <drow@mvista.com>
11008
11009 * Makefile.in: Add stamp-h target.
11010 * configure.in: Create stamp-h.
11011 * configure: Regenerated.
11012
110132002-04-09 Daniel Jacobowitz <drow@mvista.com>
11014
11015 * inferiors.c: New file.
11016 * target.c: New file.
11017 * target.h: New file.
11018 * Makefile.in: Add target.o and inferiors.o. Update
11019 dependencies.
11020 * linux-low.c (inferior_pid): New static variable,
11021 moved from server.c.
11022 (linux_create_inferior): Renamed from create_inferior.
11023 Call add_inferior. Return 0 on success instead of a PID.
11024 (linux_attach): Renamed from myattach.
11025 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11026 (linux_thread_alive): Renamed from mythread_alive.
11027 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11028 child dies.
11029 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11030 (regsets_store_inferior_registers): Correct error message.
11031 Add missing ``return 0''.
11032 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11033 (linux_store_registers): Renamed from store_inferior_registers.
11034 (linux_read_memory): Renamed from read_inferior_memory.
11035 (linux_write_memory): Renamed from write_inferior_memory.
11036 (linux_target_ops): New structure.
11037 (initialize_low): Call set_target_ops ().
11038 * remote-utils.c (unhexify): New function.
11039 (hexify): New function.
11040 (input_interrupt): Send signals to ``signal_pid''.
11041 * server.c (inferior_pid): Remove.
11042 (start_inferior): Update create_inferior call.
11043 (attach_inferior): Call add_inferior.
11044 (handle_query): New function.
11045 (main): Call handle_query for `q' packets.
11046 * server.h: Include "target.h". Remove obsolete prototypes.
11047 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11048
110492002-04-09 Daniel Jacobowitz <drow@mvista.com>
11050
11051 * Makefile.in: Add WARN_CFLAGS. Update configury
11052 dependencies.
11053 * configure.in: Check for <string.h>
11054 * configure: Regenerate.
11055 * config.in: Regenerate.
11056 * gdbreplay.c: Include needed system headers.
11057 (remote_open): Remove strchr prototype.
11058 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11059 * regcache.c (supply_register): Change buf argument to const void *.
11060 (supply_register_by_name): Likewise.
11061 (collect_register): Change buf argument to void *.
11062 (collect_register_by_name): Likewise.
11063 * regcache.h: Add missing prototypes.
11064 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11065 * server.c (handle_query): New function.
11066 (attached): New static variable, moved out of main.
11067 (main): Quiet longjmp clobber warnings.
11068 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11069 * utils.c (error): Remove NORETURN.
11070 (fatal): Likewise.
This page took 1.42713 seconds and 4 git commands to generate.