]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Make lwp_info.arch_private handling shared
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4b134ca1
GB
12015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * Makefile.in (x86-linux.o): New rule.
4 * configure.srv: Add x86-linux.o to relevant targets.
5 * linux-low.c (lwp_set_arch_private_info): New function.
6 (lwp_arch_private_info): Likewise.
7 * linux-x86-low.c: Include nat/x86-linux.h.
8 (arch_lwp_info): Removed structure.
9 (update_debug_registers_callback):
10 Use lwp_set_debug_registers_changed.
11 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
12 and lwp_set_debug_registers_changed.
13 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
14
34c703da
GB
152015-03-24 Gary Benson <gbenson@redhat.com>
16
17 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
18 * linux-arm-low.c (arm_new_thread): Likewise.
19 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
20 * linux-mips-low.c (mips_linux_new_thread): Likewise.
21 * linux-x86-low.c (x86_linux_new_thread): Likewise.
22 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
23
cff068da
GB
242015-03-24 Gary Benson <gbenson@redhat.com>
25
26 * linux-low.c (ptid_of_lwp): New function.
27 (lwp_is_stopped): Likewise.
28 (lwp_stop_reason): Likewise.
29 * linux-x86-low.c (update_debug_registers_callback):
30 Use lwp_is_stopped.
31 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
32 lwp_stop_reason.
33
b2f7c7e8
GB
342015-03-24 Gary Benson <gbenson@redhat.com>
35
36 * linux-low.h (linux_stop_lwp): Remove declaration.
37
6d4ee8c6
GB
382015-03-24 Gary Benson <gbenson@redhat.com>
39
40 * linux-low.h: Include nat/linux-nat.h.
41 * linux-low.c (iterate_over_lwps_args): New structure.
42 (iterate_over_lwps_filter): New function.
43 (iterate_over_lwps): Likewise.
44 * linux-x86-low.c (update_debug_registers_callback):
45 Update signature to what iterate_over_lwps expects.
46 Remove PID check that iterate_over_lwps now performs.
47 (x86_dr_low_set_addr): Use iterate_over_lwps.
48 (x86_dr_low_set_control): Likewise.
49
70a0bb6b
GB
502015-03-24 Gary Benson <gbenson@redhat.com>
51
52 * linux-x86-low.c (x86_debug_reg_state): New function.
53 (x86_linux_prepare_to_resume): Use the above.
54
7b669087
GB
552015-03-24 Gary Benson <gbenson@redhat.com>
56
57 * linux-low.c (current_lwp_ptid): New function.
58 * linux-x86-low.c: Include nat/linux-nat.h.
59 (x86_dr_low_get_addr): Use current_lwp_ptid.
60 (x86_dr_low_get_control): Likewise.
61 (x86_dr_low_get_status): Likewise.
62
eef49a3d
PA
632015-03-20 Pedro Alves <palves@redhat.com>
64
65 * tracepoint.c (cmd_qtstatus): Make "str" const.
66
b2333d22
PA
672015-03-20 Pedro Alves <palves@redhat.com>
68
69 * server.c (handle_general_set): Make "req_str" const.
70
23f238d3
PA
712015-03-19 Pedro Alves <palves@redhat.com>
72
73 * linux-low.c (linux_resume_one_lwp): Rename to ...
74 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
75 instead call perror_with_name.
76 (check_ptrace_stopped_lwp_gone): New function.
77 (linux_resume_one_lwp): Reimplement as wrapper around
78 linux_resume_one_lwp_throw that swallows errors if the LWP is
79 gone.
80
91baf43f
PA
812015-03-19 Pedro Alves <palves@redhat.com>
82
83 * linux-low.c (count_events_callback, select_event_lwp_callback):
84 No longer check whether the thread has resume_stop as last resume
85 kind.
86
8bf3b159
PA
872015-03-19 Pedro Alves <palves@redhat.com>
88
89 * linux-low.c (count_events_callback, select_event_lwp_callback):
90 Use the lwp's status_pending_p field, not the thread's.
91
b90fc188
PA
922015-03-19 Pedro Alves <palves@redhat.com>
93
94 * linux-low.c (select_event_lwp_callback): Update comments to
95 no longer mention SIGTRAP.
96
464b0089
GB
972015-03-18 Gary Benson <gbenson@redhat.com>
98
99 * server.c (handle_query): Do not report vFile:fstat as supported.
100
aa9e327f
GB
1012015-03-11 Gary Benson <gbenson@redhat.com>
102
103 * hostio.c (sys/types.h): New include.
104 (sys/stat.h): Likewise.
105 (common-remote-fileio.h): Likewise.
106 (handle_fstat): New function.
107 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 108
791c0056
GB
1092015-03-11 Gary Benson <gbenson@redhat.com>
110
111 * configure.ac (AC_CHECK_MEMBERS): Add checks for
112 struct stat.st_blocks and struct stat.st_blksize.
113 * configure: Regenerate.
114 * config.in: Likewise.
115 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
116 (OBS): Add common-remote-fileio.o.
117 (common-remote-fileio.o): New rule.
118
9a9df970
PA
1192015-03-09 Pedro Alves <palves@redhat.com>
120
121 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
122 'struct sockaddr' pointer in 'accept' call.
123
9eb1356e
PA
1242015-03-09 Pedro Alves <palves@redhat.com>
125
126 Revert:
127 2015-03-07 Pedro Alves <palves@redhat.com>
128 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
129 or <winsock2.h> here. Instead include "gdb_socket.h".
130 (remote_open): Use union gdb_sockaddr_u.
131 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
132 or <winsock2.h> here. Instead include "gdb_socket.h".
133 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
134 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
135 or <sys/un.h>.
136 (init_named_socket, gdb_agent_helper_thread): Use union
137 gdb_sockaddr_u.
138
aac331e4
PA
1392015-03-07 Pedro Alves <palves@redhat.com>
140
141 * configure.ac (build_warnings): Move
142 -Wdeclaration-after-statement to the C-specific set.
143 * configure: Regenerate.
144
366c75fc
PA
1452015-03-07 Pedro Alves <palves@redhat.com>
146
147 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
148 or <winsock2.h> here. Instead include "gdb_socket.h".
149 (remote_open): Use union gdb_sockaddr_u.
150 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
151 or <winsock2.h> here. Instead include "gdb_socket.h".
152 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
153 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
154 or <sys/un.h>.
155 (init_named_socket, gdb_agent_helper_thread): Use union
156 gdb_sockaddr_u.
157
492d29ea
PA
1582015-03-07 Pedro Alves <palves@redhat.com>
159
160 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
161 instead.
162
60a191ed
YQ
1632015-03-06 Yao Qi <yao.qi@linaro.org>
164
165 * linux-aarch64-low.c (aarch64_insert_point): Use
166 show_debug_regs as a boolean.
167 (aarch64_remove_point): Likewise.
168
f5771b1d
PA
1692015-03-05 Pedro Alves <palves@redhat.com>
170
171 * lynx-low.c (lynx_target_ops): Install NULL hooks for
172 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
173 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
174 * nto-low.c (nto_target_ops): Likewise.
175 * spu-low.c (spu_target_ops): Likewise.
176 * win32-low.c (win32_target_ops): Likewise.
177
3e572f71
PA
1782015-03-04 Pedro Alves <palves@redhat.com>
179
180 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
181 Decide whether a breakpoint triggered based on the SIGTRAP's
182 siginfo.si_code.
183 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
184 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
185 (linux_low_filter_event): Check for breakpoints before checking
186 watchpoints.
187 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
188 siginfo.si_code.
189 (linux_stopped_by_sw_breakpoint)
190 (linux_supports_stopped_by_sw_breakpoint)
191 (linux_stopped_by_hw_breakpoint)
192 (linux_supports_stopped_by_hw_breakpoint): New functions.
193 (linux_target_ops): Install new target methods.
194
1ec68e26
PA
1952015-03-04 Pedro Alves <palves@redhat.com>
196
197 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
198 * server.c (swbreak_feature, hwbreak_feature): New globals.
199 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
200 (captured_main): Clear swbreak_feature and hwbreak_feature.
201 * server.h (swbreak_feature, hwbreak_feature): Declare.
202 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
203 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
204 supports_stopped_by_hw_breakpoint>: New fields.
205 (target_supports_stopped_by_sw_breakpoint)
206 (target_stopped_by_sw_breakpoint)
207 (target_supports_stopped_by_hw_breakpoint)
208 (target_stopped_by_hw_breakpoint): Declare.
209
15c66dd6
PA
2102015-03-04 Pedro Alves <palves@redhat.com>
211
212 enum lwp_stop_reason -> enum target_stop_reason
213 * linux-low.c (check_stopped_by_breakpoint): Adjust.
214 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
215 (linux_wait_1, stuck_in_jump_pad_callback)
216 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
217 (linux_stopped_by_watchpoint):
218 * linux-low.h (enum lwp_stop_reason): Delete.
219 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
220 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
221
98fc70d6
YQ
2222015-03-04 Yao Qi <yao.qi@linaro.org>
223
224 * Makefile.in (SFILES): Add linux-aarch64-low.c.
225
dd2ac174
GB
2262015-03-03 Gary Benson <gbenson@redhat.com>
227
228 * hostio.c (handle_vFile): Fix prefix lengths.
229
d68e53f4
MM
2302015-03-03 Markus Metzger <markus.t.metzger@intel.com>
231
232 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
233 ptr_bits.
234
bf2d68ab
AA
2352015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
236
237 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
238 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
239 (clean): Add "rm -f" for above C files.
240 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
241 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
242 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
243 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
244 * linux-s390-low.c (HWCAP_S390_VX): New macro.
245 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
246 (init_registers_s390x_vx_linux64)
247 (init_registers_s390x_tevx_linux64)
248 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
249 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
250 declarations.
251 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
252 (s390_store_vxrs_high): New functions.
253 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
254 NT_S390_VXRS_HIGH.
255 (s390_arch_setup): Add logic for selecting one of the new target
256 descriptions. Activate the new vector regsets if applicable.
257 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
258 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
259 and init_registers_s390x_tevx_linux64.
260
c966a859
PA
2612015-03-01 Pedro Alves <palves@redhat.com>
262
263 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
264 parameter.
265
4180215b
PA
2662015-02-27 Pedro Alves <palves@redhat.com>
267
268 * linux-x86-low.c (u_debugreg_offset): New function.
269 (x86_linux_dr_get, x86_linux_dr_set): Use it.
270
749bab01
PA
2712015-02-27 Pedro Alves <palves@redhat.com>
272
273 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
274 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
275 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
276 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
277 (ps_lsetfpregs, ps_getpid)
278 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
279 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
280 (ps_lsetxregs, ps_plog): Declare.
281
3c14e5a3
PA
2822015-02-27 Pedro Alves <palves@redhat.com>
283
284 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
285 IP_AGENT_EXPORT_FUNC.
286 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
287 IP_AGENT_EXPORT_FUNC.
288 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
289 (IP_AGENT_EXPORT): Delete.
290 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
291 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
292 (gdb_trampoline_buffer_error, collecting, gdb_collect)
293 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
294 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
295 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
296 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
297 (traceframe_read_count, traceframe_write_count)
298 (traceframes_created, trace_state_variables, get_raw_reg)
299 (get_trace_state_variable_value, set_trace_state_variable_value)
300 (ust_loaded, helper_thread_id, cmd_buf): Use
301 IPA_SYM_EXPORTED_NAME.
302 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
303 (tracepoints) Use IP_AGENT_EXPORT_VAR.
304 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
305 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
306 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
307 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
308 EXTERN_C_PUSH/EXTERN_C_POP.
309 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
310 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
311 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
312 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
313 (traceframe_write_count, traceframe_read_count)
314 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
315 (about_to_request_buffer_space, get_trace_state_variable_value)
316 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
317 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
318 EXTERN_C_PUSH/EXTERN_C_POP.
319 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
320 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
321 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
322 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
323 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
324 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
325 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
326 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
327 Define.
328 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
329 (IP_AGENT_EXPORT_VAR_DECL): Define.
330 (tracing): Declare.
331 (gdb_agent_get_raw_reg): Declare.
332
fe978cb0
PA
3332015-02-27 Tom Tromey <tromey@redhat.com>
334 Pedro Alves <palves@redhat.com>
335
336 Rename symbols whose names are reserved C++ keywords throughout.
337
3bc3d82a
PA
3382015-02-27 Pedro Alves <palves@redhat.com>
339
340 * Makefile.in (COMPILER): New, get it from autoconf.
341 (CXX): Get from autoconf instead.
342 (COMPILE.pre): Use COMPILER.
343 (CC-LD): Rename to ...
344 (CC_LD): ... this. Use COMPILER.
345 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
346 (CXX_FOR_TARGET): Default to g++ instead of gcc.
347 * acinclude.m4: Include build-with-cxx.m4.
348 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
349 Disable -Werror by default if building in C++ mode.
350 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
351 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
352 the C++ compiler. Save/restore CXXFLAGS too.
353 * configure: Regenerate.
354
07697489
PA
3552015-02-27 Pedro Alves <palves@redhat.com>
356
357 * acinclude.m4: Include libiberty.m4.
358 * configure.ac: Call libiberty_INIT.
359 * config.in, configure: Regenerate.
360
9beb7c4e
PA
3612015-02-26 Pedro Alves <palves@redhat.com>
362
363 * linux-low.c (linux_wait_1): When incrementing the PC past a
364 program breakpoint always use the_low_target.breakpoint_len as
365 increment, rather than the maximum between that and
366 the_low_target.decr_pc_after_break.
367
8090aef2
PA
3682015-02-23 Pedro Alves <palves@redhat.com>
369
370 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
371 thread was doing a step-over; always adjust the PC if
372 we stepped over a permanent breakpoint.
373 (linux_wait_1): If we stepped over breakpoint that was on top of a
374 permanent breakpoint, manually advance the PC past it.
375
bc9540e8
PA
3762015-02-23 Pedro Alves <palves@redhat.com>
377
378 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
379 modes.
380 (x86_fill_gregset, x86_store_gregset): Use it when handling
381 $orig_eax.
382
2db9a427
PA
3832015-02-20 Pedro Alves <palves@redhat.com>
384
385 * thread-db.c: Include "nat/linux-procfs.h".
386 (thread_db_init): Skip listing new threads if the kernel supports
387 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
388
afa8d396
PA
3892015-02-20 Pedro Alves <palves@redhat.com>
390
391 * linux-low.c (status_pending_p_callback): Use ptid_match.
392
c9587f88
AT
3932015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
394
395 PR breakpoints/16812
396 * linux-low.c (wstatus_maybe_breakpoint): Remove.
397 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
398 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
399
b05ec7a5
AT
4002015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
401
402 PR breakpoints/15956
403 * tracepoint.c (cmd_qtinit): Add check for current_thread.
404
d33501a5
MM
4052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
406
407 * linux-low.c (linux_low_btrace_conf): Print size.
408 * server.c (handle_btrace_conf_general_set): New.
409 (hanle_general_set): Call handle_btrace_conf_general_set.
410 (handle_query): Report Qbtrace-conf:bts:size as supported.
411
f4abbc16
MM
4122015-02-09 Markus Metzger <markus.t.metzger@intel.com>
413
414 * linux-low.c (linux_low_enable_btrace): Update parameters.
415 (linux_low_btrace_conf): New.
416 (linux_target_ops)<to_btrace_conf>: Initialize.
417 * server.c (current_btrace_conf): New.
418 (handle_btrace_enable): Rename to ...
419 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
420 to target_enable_btrace. Update comment. Update users.
421 (handle_qxfer_btrace_conf): New.
422 (qxfer_packets): Add btrace-conf entry.
423 (handle_query): Report qXfer:btrace-conf:read as supported packet.
424 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
425 (target_ops)<read_btrace_conf>: New.
426 (target_enable_btrace): Update parameters.
427 (target_read_btrace_conf): New.
428
043c3577
MM
4292015-02-09 Markus Metzger <markus.t.metzger@intel.com>
430
431 * server.c (handle_btrace_general_set): Remove call to
432 target_supports_btrace.
433 (supported_btrace_packets): New.
434 (handle_query): Call supported_btrace_packets.
435 * target.h: include btrace-common.h.
436 (btrace_target_info): Removed.
437 (supports_btrace, target_supports_btrace): Update parameters.
438
734b0e4b
MM
4392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
440
441 * Makefile.in (SFILES): Add common/btrace-common.c.
442 (OBS): Add common/btrace-common.o.
443 (btrace-common.o): Add build rules.
444 * linux-low: Include btrace-common.h.
445 (linux_low_read_btrace): Use struct btrace_data. Call
446 btrace_data_init and btrace_data_fini.
447
d6c146e9
PA
4482015-02-06 Pedro Alves <palves@redhat.com>
449
450 * thread-db.c (find_new_threads_callback): Add debug output.
451
20ba1ce6
PA
4522015-02-04 Pedro Alves <palves@redhat.com>
453
454 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
455 (resume_stopped_resumed_lwps): New function.
456 (linux_wait_for_event_filtered): Use it.
457
8cc73a39
SDJ
4582015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
459
460 * Makefile.in (SFILES): Add linux-personality.c.
461 (linux-personality.o): New rule.
462 * configure.srv (srv_linux_obj): Add linux-personality.o to the
463 list of objects to be built.
464 * linux-low.c: Include nat/linux-personality.h.
465 (linux_create_inferior): Remove code to disable address space
466 randomization (moved to ../nat/linux-personality.c). Create
467 cleanup to disable address space randomization.
468
fb23d554
SDJ
4692015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
470
471 * Makefile.in (posix-strerror.o): New rule.
472 (mingw-strerror.o): Likewise.
473 * configure: Regenerated.
474 * configure.ac: Source file ../common/common.host. Initialize new
475 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
476
cdf43629
YQ
4772015-01-14 Yao Qi <yao@codesourcery.com>
478
479 * Makefile.in (SFILES): Add nat/ppc-linux.c.
480 (ppc-linux.o): New rule.
481 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
482 * configure.ac: AC_CHECK_FUNCS(getauxval).
483 * config.in: Re-generated.
484 * configure: Re-generated.
485 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
486 ppc64_64bit_inferior_p
487
514c5338
YQ
4882015-01-14 Yao Qi <yao@codesourcery.com>
489
490 * linux-ppc-low.c: Include "nat/ppc-linux.h".
491 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
492 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
493 (PT_ORIG_R3, PT_TRAP): Likewise.
494 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
495 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
496 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
497
3368c1e5
JB
4982015-01-10 Joel Brobecker <brobecker@adacore.com>
499
500 * i387-fp.c (i387_cache_to_xsave): In look over
501 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
502 zmmh_low_space field by use of zmmh_high_space.
503
582511be
PA
5042015-01-09 Pedro Alves <palves@redhat.com>
505
506 * linux-low.c (step_over_bkpt): Move higher up in the file.
507 (handle_extended_wait): Don't store the stop_pc here.
508 (get_stop_pc): Adjust comments and rename to ...
509 (check_stopped_by_breakpoint): ... this. Record whether the LWP
510 stopped for a software breakpoint or hardware breakpoint.
511 (thread_still_has_status_pending_p): New function.
512 (status_pending_p_callback): Use
513 thread_still_has_status_pending_p. If the event is no longer
514 interesting, resume the LWP.
515 (handle_tracepoints): Add assert.
516 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
517 (wstatus_maybe_breakpoint): New function.
518 (cancel_breakpoint): Delete function.
519 (check_stopped_by_watchpoint): New function, factored out from
520 linux_low_filter_event.
521 (lp_status_maybe_breakpoint): Delete function.
522 (linux_low_filter_event): Remove filter_ptid argument.
523 Leave thread group exits pending here. Store the LWP's stop PC.
524 Always leave events pending.
525 (linux_wait_for_event_filtered): Pull all events out of the
526 kernel, and leave them all pending.
527 (count_events_callback, select_event_lwp_callback): Consider all
528 events.
529 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
530 (select_event_lwp): Only give preference to the stepping LWP in
531 all-stop mode. Adjust comments.
532 (ignore_event): New function.
533 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
534 references to cancel_breakpoints. Adjust to renames. Also give
535 equal priority to all LWPs that have had events in non-stop mode.
536 If reporting a software breakpoint event, unadjust the LWP's PC.
537 (linux_wait): If linux_wait_1 returned an ignored event, retry.
538 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
539 Adjust.
540 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
541 (resume_status_pending_p): Use thread_still_has_status_pending_p.
542 (linux_stopped_by_watchpoint): Adjust.
543 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
544 * linux-low.h (enum lwp_stop_reason): New.
545 (struct lwp_info) <stop_pc>: Adjust comment.
546 <stopped_by_watchpoint>: Delete field.
547 <stop_reason>: New field.
548 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
549 * mem-break.c (software_breakpoint_inserted_here)
550 (hardware_breakpoint_inserted_here): New function.
551 * mem-break.h (software_breakpoint_inserted_here)
552 (hardware_breakpoint_inserted_here): Declare.
553 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
554 (cancel_breakpoints): Delete.
555 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
556 (upload_fast_traceframes): Remove references to
557 cancel_breakpoints.
558
a33e3959
PA
5592015-01-09 Pedro Alves <palves@redhat.com>
560
561 * thread-db.c (find_new_threads_callback): Ignore thread if the
562 kernel thread ID is -1.
563
8784d563
PA
5642015-01-09 Pedro Alves <palves@redhat.com>
565
566 * linux-low.c (linux_attach_fail_reason_string): Move to
567 nat/linux-ptrace.c, and rename.
568 (linux_attach_lwp): Update comment.
569 (attach_proc_task_lwp_callback): New function.
570 (linux_attach): Adjust to rename and use
571 linux_proc_attach_tgid_threads.
572 (linux_attach_fail_reason_string): Delete declaration.
573
76f2b779
JB
5742015-01-01 Joel Brobecker <brobecker@adacore.com>
575
576 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
577 * server.c (gdbserver_version): Likewise.
578
fafcc06a
SDJ
5792014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
580
581 * remote-utils.c: Include ctype.h.
582 (input_interrupt): Explicitly handle the case when the char
583 received is the NUL byte. Improve the printing of non-ASCII
584 characters.
585
beed38b8
JB
5862014-12-16 Joel Brobecker <brobecker@adacore.com>
587
588 * linux-low.c (linux_low_filter_event): Update call to
589 linux_enable_event_reporting following the addition of
590 a new parameter to that function.
591
bf330350
CU
5922014-12-16 Catalin Udma <catalin.udma@freescale.com>
593
594 PR server/17457
595 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
596 (AARCH64_FPCR_REGNO): Likewise.
597 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
598 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
599 (aarch64_store_fpregset): Likewise.
600
5227d625
JB
6012014-12-15 Joel Brobecker <brobecker@adacore.com>
602
603 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
604 Remove FIXME comment about assumption about N.
605
f93b65a0
JB
6062014-12-13 Joel Brobecker <brobecker@adacore.com>
607
608 * configure.ac: If large-file support is disabled in GDBserver,
609 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
610 * configure: Regenerate.
611
e5a9158d
AA
6122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
613
614 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
615 warning upon ENODATA from ptrace.
616 * linux-s390-low.c (s390_store_tdb): New.
617 (s390_regsets): Add regset for NT_S390_TDB.
618
feea5f36
AA
6192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
620
621 * linux-low.c (regsets_store_inferior_registers): Skip regsets
622 without a fill_function.
623 * linux-s390-low.c (s390_fill_last_break): Remove.
624 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
625 (s390_arch_setup): Use regset's size instead of fill_function for
626 loop end condition.
627
098dbe61
AA
6282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
629
630 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
631 the regset's store function when ptrace returned an error.
632 * regcache.c (get_thread_regcache): Invalidate register cache
633 before fetching inferior's registers.
634
28eef672
AA
6352014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
636
637 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
638 while-loop as for-loop.
639 (regsets_store_inferior_registers): Likewise.
640
bdca27a2
YQ
6412014-11-28 Yao Qi <yao@codesourcery.com>
642
643 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
644 * config.in, configure: Re-generate.
645 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
646 is defined.
647
9c232dda
YQ
6482014-11-21 Yao Qi <yao@codesourcery.com>
649
650 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
651 (AC_CHECK_HEADERS): Remove malloc.h.
652 * configure: Re-generated.
653 * config.in: Re-generated.
654 * server.h: Don't include alloca.h and malloc.h.
655 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
656 Don't include malloc.h.
657
43968415
JB
6582014-11-17 Joel Brobecker <brobecker@adacore.com>
659
660 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
661 corresponding ERRNO check in same block.
662
40e91bc7
PA
6632014-11-12 Pedro Alves <palves@redhat.com>
664
665 * server.c (cont_thread): Update comment.
666 (start_inferior, attach_inferior): No longer clear cont_thread.
667 (handle_v_cont): No longer set cont_thread.
668 (captured_main): Clear cont_thread each time a GDB connects.
669
c2c118cf
PA
6702014-11-12 Pedro Alves <palves@redhat.com>
671
672 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
673 thread, and don't resume all threads if the Hc thread has exited.
674
78708b7c
PA
6752014-11-12 Pedro Alves <palves@redhat.com>
676
677 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
678 the process group instead of to a specific LWP.
679
a2abc7de
PA
6802014-10-15 Pedro Alves <palves@redhat.com>
681
682 PR server/17487
683 * win32-arm-low.c (arm_set_thread_context): Remove current_event
684 parameter.
685 (arm_set_thread_context): Delete.
686 (the_low_target): Adjust.
687 * win32-i386-low.c (debug_registers_changed)
688 (debug_registers_used): Delete.
689 (update_debug_registers_callback): New function.
690 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
691 needing to update their debug registers.
692 (win32_get_current_dr): New function.
693 (x86_dr_low_get_addr, x86_dr_low_get_control)
694 (x86_dr_low_get_status): Fetch the debug register from the thread
695 record's context.
696 (i386_initial_stuff): Adjust.
697 (i386_get_thread_context): Remove current_event parameter. Don't
698 clear debug_registers_changed nor copy DR values to
699 debug_reg_state.
700 (i386_set_thread_context): Delete.
701 (i386_prepare_to_resume): New function.
702 (i386_thread_added): Mark the thread as needing to update irs
703 debug registers.
704 (the_low_target): Remove i386_set_thread_context and install
705 i386_prepare_to_resume.
706 * win32-low.c (win32_get_thread_context): Adjust.
707 (win32_set_thread_context): Use SetThreadContext
708 directly.
709 (win32_prepare_to_resume): New function.
710 (win32_require_context): New function, factored out from ...
711 (thread_rec): ... this.
712 (continue_one_thread): Call win32_prepare_to_resume on each thread
713 we're about to continue.
714 (win32_resume): Call win32_prepare_to_resume on the event thread.
715 * win32-low.h (struct win32_thread_info)
716 <debug_registers_changed>: New field.
717 (struct win32_target_ops): Change prototype of set_thread_context,
718 delete set_thread_context and add prepare_to_resume.
719 (win32_require_context): New declaration.
720
a442d071
GB
7212014-10-08 Gary Benson <gbenson@redhat.com>
722
723 * server.h: Do not include common-exceptions.h.
724
6f1947e8
GB
7252014-10-08 Gary Benson <gbenson@redhat.com>
726
727 * server.h: Do not include cleanups.h.
728
63b434a4
JH
7292014-09-30 James Hogan <james.hogan@imgtec.com>
730
731 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
732 mips64-dsp-linux.c.
733
c4d9ceb6
YQ
7342014-09-23 Yao Qi <yao@codesourcery.com>
735
736 * linux-low.c (lp_status_maybe_breakpoint): New function.
737 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
738 (count_events_callback): Likewise.
739 (select_event_lwp_callback): Likewise.
740 (cancel_breakpoints_callback): Likewise.
741
89a5711c
DB
7422014-09-19 Don Breazeal <donb@codesourcery.com>
743
744 * linux-low.c (handle_extended_wait): Call
745 linux_ptrace_get_extended_event.
746 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
747 linux_is_extended_waitstatus.
748
bffc0964
JB
7492014-09-16 Joel Brobecker <brobecker@adacore.com>
750
751 * Makefile.in (CPPFLAGS): Define.
752 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
753 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
754
0bfdf32f
GB
7552014-09-16 Gary Benson <gbenson@redhat.com>
756
757 * inferiors.h (current_inferior): Renamed as...
758 (current_thread): New variable. All uses updated.
759 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
760 (maybe_move_out_of_jump_pad): Likewise.
761 (cancel_breakpoint): Likewise.
762 (linux_low_filter_event): Likewise.
763 (wait_for_sigstop): Likewise.
764 (linux_resume_one_lwp): Likewise.
765 (need_step_over_p): Likewise.
766 (start_step_over): Likewise.
767 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
768 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
769 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
770 and save_inferior as saved_thread.
771 * regcache.c (get_thread_regcache): Renamed saved_inferior as
772 saved_thread.
773 (regcache_invalidate_thread): Likewise.
774 * remote-utils.c (prepare_resume_reply): Likewise.
775 * thread-db.c (thread_db_get_tls_address): Likewise.
776 (disable_thread_event_reporting): Likewise.
777 (remove_thread_event_breakpoints): Likewise.
778 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
779 as saved_thread.
780 * target.h (set_desired_inferior): Renamed as...
781 (set_desired_thread): New declaration. All uses updated.
782 * server.c (myresume): Updated comment to reference thread instead
783 of inferior.
784 (handle_serial_event): Likewise.
785 (handle_target_event): Likewise.
786
361c8ade
GB
7872014-09-12 Tom Tromey <tromey@redhat.com>
788 Gary Benson <gbenson@redhat.com>
789
790 * regcache.h: Include common-regcache.h.
791 (regcache_read_pc): Don't declare.
792 * regcache.c (get_thread_regcache_for_ptid): New function.
793
bd9269f7
GB
7942014-09-11 Tom Tromey <tromey@redhat.com>
795 Gary Benson <gbenson@redhat.com>
796
797 * symbol.c: New file.
798 * Makefile.in (SFILES): Add symbol.c.
799 (OBS): Add symbol.o.
800
f8c1d06b
GB
8012014-09-11 Gary Benson <gbenson@redhat.com>
802
803 * target.c (target_stop_ptid, target_continue_ptid): New
804 functions.
805
721ec300
GB
8062014-09-11 Tom Tromey <tromey@redhat.com>
807 Gary Benson <gbenson@redhat.com>
808
809 * target.h: Include target/target.h.
810 * target.c (target_read_memory, target_read_uint32)
811 (target_write_memory): New functions.
812
c5e92cca
GB
8132014-09-11 Gary Benson <gbenson@redhat.com>
814
815 * server.h (debug_hw_points): Don't declare.
816 * server.c (debug_hw_points): Don't define. Replace all uses
817 with show_debug_regs.
818 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
819 all uses with show_debug_regs.
820
2e4bb98a
EBM
8212014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
822
823 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
824 endianness into account.
825 (ppc_supply_ptrace_register): Likewise.
826
ac740bc7
JH
8272014-09-03 James Hogan <james.hogan@imgtec.com>
828
829 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
830 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
831
97ea6506
GB
8322014-09-03 Gary Benson <gbenson@redhat.com>
833
834 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
835 ALL_DEBUG_ADDRESS_REGISTERS.
836
df7e5265
GB
8372014-09-02 Gary Benson <gbenson@redhat.com>
838
839 * i386-low.h: Renamed as...
840 * x86-low.h: New file. All type, function and variable name
841 prefixes changed from "i386_" to "x86_". All references updated.
842 * i386-low.c: Renamed as...
843 * x86-low.c: New file. All type, function and variable name
844 prefixes changed from "i386_" to "x86_". All references updated.
845
ed859da7
GB
8462014-09-02 Gary Benson <gbenson@redhat.com>
847
848 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
849 (x86_linux_new_thread): Likewise.
850
860789c7
GB
8512014-08-29 Gary Benson <gbenson@redhat.com>
852
853 * server.h (setjmp.h): Do not include.
854 (toplevel): Do not declare.
855 (common-exceptions.h): Include.
856 (cleanups.h): Likewise.
857 * server.c (toplevel): Do not define.
858 (exit_code): New static global.
859 (detach_or_kill_for_exit_cleanup): New function.
860 (main): New function. Original main renamed to...
861 (captured_main): New function.
862 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
863
ff55e1b5
GB
8642014-08-29 Gary Benson <gbenson@redhat.com>
865
866 * Makefile.in (SFILES): Add common/common-exceptions.c.
867 (OBS): Add common-exceptions.o.
868 (common-exceptions.o): New rule.
869 * utils.c (prepare_to_throw_exception): New function.
870
e9bcb658
GB
8712014-08-29 Gary Benson <gbenson@redhat.com>
872
873 * config.in: Regenerate.
874 * configure: Likewise.
875
e3180625
GB
8762014-08-29 Gary Benson <gbenson@redhat.com>
877
878 * Makefile.in (SFILES): Add common/cleanups.c.
879 (OBS): cleanups.o.
880 (cleanups.o): New rule.
881
e3d6ba5d
GB
8822014-08-29 Gary Benson <gbenson@redhat.com>
883
884 * utils.c (internal_vwarning): New function.
885
7096e886
GB
8862014-08-28 Gary Benson <gbenson@redhat.com>
887
888 * utils.h (fatal): Remove declaration.
889 * utils.c (fatal): Remove function.
890
14ce3192
GB
8912014-08-28 Gary Benson <gbenson@redhat.com>
892
893 * tracepoint.c (gdb_agent_init): Replace fatal with
894 perror_with_name.
895 (initialize_tracepoint): Likewise.
896
50278d59
GB
8972014-08-28 Gary Benson <gbenson@redhat.com>
898
899 * remote-utils.c (remote_prepare): Replace fatal with error.
900
aa96c426
GB
9012014-08-28 Gary Benson <gbenson@redhat.com>
902
903 * linux-low.c (linux_async): Replace fatal with warning.
904 Tidy up and return.
905 (linux_start_non_stop): Return -1 if linux_async failed.
906
f7160e97
GB
9072014-08-28 Gary Benson <gbenson@redhat.com>
908
909 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
910 gdb_assert.
911 (i386_dr_low_get_addr): Remove vague comment.
912 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
913 gdb_assert.
914
38e08fca
GB
9152014-08-28 Gary Benson <gbenson@redhat.com>
916
917 * inferiors.c (get_thread_process): Replace check with gdb_assert.
918 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
919 internal_error.
920 (linux_resume_one_lwp): Likewise.
921 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
922 gdb_assert.
923 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
924 with internal_error.
925 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
926 (init_register_cache): Replace fatal with gdb_assert_not_reached.
927 (find_register_by_name): Replace fatal with internal_error.
928 (find_regno): Likewise.
929 * tdesc.c (init_target_desc): Replace check with gdb_assert.
930 * thread-db.c (thread_db_create_event): Likewise.
931 (thread_db_load_search): Likewise.
932 (try_thread_db_load_1): Likewise.
933 * tracepoint.c (get_jump_space_head): Replace fatal with
934 internal_error.
935 (claim_trampoline_space): Likewise.
936 (have_fast_tracepoint_trampoline_buffer): Likewise.
937 (cmd_qtstart): Likewise.
938 (stop_tracing): Likewise.
939 (fast_tracepoint_collecting): Likewise.
940 (target_malloc): Likewise.
941 (download_tracepoint): Likewise.
942 (download_trace_state_variables): Replace check with gdb_assert.
943 (upload_fast_traceframes): Replace fatal with internal_error.
944
34abf635
GB
9452014-08-19 Tom Tromey <tromey@redhat.com>
946 Gary Benson <gbenson@redhat.com>
947
948 * Makefile.in (SFILES): Add common/common-debug.c.
949 (OBS): Add common-debug.o.
950 (common-debug.o): New rule.
951 * debug.h (debug_printf): Don't declare.
952 * debug.c (debug_printf): Renamed and rewritten as...
953 (debug_vprintf): New function.
954
f6e94d78
GB
9552014-08-19 Gary Benson <gbenson@redhat.com>
956
957 * utils.h: Do not include print-utils.h.
958
9239eeab
GB
9592014-08-19 Tom Tromey <tromey@redhat.com>
960 Gary Benson <gbenson@redhat.com>
961
962 * server.h: Add static assertion.
963 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
964
ef87c8bb
GB
9652014-08-19 Tom Tromey <tromey@redhat.com>
966 Gary Benson <gbenson@redhat.com>
967
968 * Makefile.in (SFILES): Add common/errors.c.
969 (OBS): Add errors.o.
970 (IPA_OBS): Add errors-ipa.o.
971 (errors.o): New rule.
972 (errors-ipa.o): Likewise.
973 * utils.h (perror_with_name, error, warning): Don't declare.
974 * utils.c (warning): Renamed and rewritten as...
975 (vwarning): New function.
976 (error): Renamed and rewritten as...
977 (verror): New function.
978 (internal_error): Renamed and rewritten as...
979 (internal_verror): New function.
980
bb974a24
GB
9812014-08-07 Gary Benson <gbenson@redhat.com>
982
983 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
984 * configure: Regenerate.
985 * config.in: Likewise.
986 * server.h: Do not include errno.h.
987 * event-loop.c: Likewise.
988 * hostio-errno.c: Likewise.
989 * linux-low.c: Likewise.
990 * remote-utils.c: Likewise.
991 * spu-low.c: Likewise.
992 * utils.c: Likewise.
993 * gdbreplay.c: Unconditionally include errno.h.
994
6d3d12eb
GB
9952014-08-07 Gary Benson <gbenson@redhat.com>
996
997 * server.h: Do not include string.h.
998 * event-loop.c: Likewise.
999 * linux-low.c: Likewise.
1000 * regcache.c: Likewise.
1001 * remote-utils.c: Likewise.
1002 * spu-low.c: Likewise.
1003 * utils.c: Likewise.
1004
dccbb609
GB
10052014-08-07 Gary Benson <gbenson@redhat.com>
1006
1007 * server.h: Do not include gdb_assert.h.
1008
e76df0d0
GB
10092014-08-07 Gary Benson <gbenson@redhat.com>
1010
1011 * server.h: Do not include common-utils.h.
1012
4cb9c816
GB
10132014-08-07 Gary Benson <gbenson@redhat.com>
1014
1015 * server.h: Do not include ptid.h.
1016 * notif.h: Likewise.
1017
3995eeee
GB
10182014-08-07 Gary Benson <gbenson@redhat.com>
1019
1020 * server.h: Do not include gdb_locale.h.
1021
cb9f1a9b
GB
10222014-08-07 Gary Benson <gbenson@redhat.com>
1023
1024 * server.h: Do not include gdb/signals.h.
1025 * win32-low.c: Likewise.
1026
a5fceff8
GB
10272014-08-07 Gary Benson <gbenson@redhat.com>
1028
1029 * server.h: Do not include pathmax.h.
1030
b9391142
GB
10312014-08-07 Gary Benson <gbenson@redhat.com>
1032
1033 * server.h: Do not include libiberty.h.
1034 * linux-bfin-low.c: Likewise.
1035
0e443c87
GB
10362014-08-07 Gary Benson <gbenson@redhat.com>
1037
1038 * server.h: Do not include ansidecl.h.
1039
8ebb3f56
GB
10402014-08-07 Gary Benson <gbenson@redhat.com>
1041
1042 * linux-x86-low.c: Do not include stddef.h.
1043 * lynx-ppc-low.c: Likewise.
1044 * tracepoint.c: Likewise.
1045
8980bdf6
GB
10462014-08-07 Gary Benson <gbenson@redhat.com>
1047
1048 * server.h: Do not include stdarg.h.
1049 * nto-low.c: Likewise.
1050
d7096f71
GB
10512014-08-07 Gary Benson <gbenson@redhat.com>
1052
1053 * server.h: Do not include stdlib.h.
1054 * inferiors.c: Likewise.
1055 * linux-low.c: Likewise.
1056 * regcache.c: Likewise.
1057 * spu-low.c: Likewise.
1058 * tracepoint.c: Likewise.
1059 * utils.c: Likewise.
1060
d02f550d
GB
10612014-08-07 Gary Benson <gbenson@redhat.com>
1062
1063 * server.h: Do not include stdio.h.
1064 * linux-low.c: Likewise.
1065 * remote-utils.c: Likewise.
1066 * spu-low.c: Likewise.
1067 * utils.c: Likewise.
1068 * wincecompat.c: Likewise.
1069
87f6c4e3
GB
10702014-08-06 Gary Benson <gbenson@redhat.com>
1071
1072 * regcache.c (init_register_cache): Move conditionals inside if.
1073
7089dca4
GB
10742014-08-06 Gary Benson <gbenson@redhat.com>
1075
1076 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1077
462f517e
GB
10782014-07-31 Gary Benson <gbenson@redhat.com>
1079
1080 * ax.h: Do not include server.h.
1081 * gdbthread.h: Likewise.
1082 * lynx-low.h: Likewise.
1083 * notif.h: Likewise.
1084
976411d6
GB
10852014-07-30 Gary Benson <gbenson@redhat.com>
1086
1087 * server.h: Include common-defs.h.
1088 Do not include config.h or build-gnulib-gdbserver/config.h.
1089
d41f6d8e
GB
10902014-07-30 Gary Benson <gbenson@redhat.com>
1091
1092 * hostio-errno.c: Move server.h to top of includes list.
1093 * inferiors.c: Likewise.
1094 * linux-x86-low.c: Likewise.
1095 * notif.c: Include server.h.
1096
314c6a35
TT
10972014-07-24 Tom Tromey <tromey@redhat.com>
1098 Gary Benson <gbenson@redhat.com>
1099
1100 * server.h (CORE_ADDR): Now unsigned.
1101
69ff6be5
PA
11022014-07-16 Pedro Alves <palves@redhat.com>
1103
1104 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1105
ce9e3fe7
PA
11062014-07-15 Pedro Alves <palves@redhat.com>
1107
1108 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1109 copy.
1110
e76126e8
PA
11112014-07-11 Pedro Alves <palves@redhat.com>
1112
1113 * linux-low.c (kill_wait_lwp): New function, based on
1114 kill_one_lwp_callback, but use my_waitpid directly.
1115 (kill_one_lwp_callback, linux_kill): Use it.
1116
8e9db26e
PA
11172014-06-23 Pedro Alves <palves@redhat.com>
1118
1119 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1120 before setting DR0..DR3.
1121
698b3e08
GB
11222014-06-20 Gary Benson <gbenson@redhat.com>
1123
1124 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1125 * configure: Regenerated.
1126 * config.in: Likewise.
1127
125f8a3d
GB
11282014-06-20 Gary Benson <gbenson@redhat.com>
1129
1130 * Makefile.in (SFILES): Update locations for files moved
1131 from common to nat.
1132 (object file files): Reordered.
1133
42995dbd
GB
11342014-06-20 Gary Benson <gbenson@redhat.com>
1135
1136 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1137 (i386_dr_low_set_addr): Likewise.
1138 (i386_dr_low_get_addr): Likewise.
1139 (i386_dr_low_can_set_control): Likewise.
1140 (i386_dr_low_set_control): Likewise.
1141 (i386_dr_low_get_control): Likewise.
1142 (i386_dr_low_get_status): Likewise.
1143 (i386_get_debug_register_length): Likewise.
1144 * linux-x86-low.c (i386_dr_low_set_addr):
1145 Changed signature. Made static.
1146 (i386_dr_low_get_addr): Likewise.
1147 (i386_dr_low_set_control): Likewise.
1148 (i386_dr_low_get_control): Likewise.
1149 (i386_dr_low_get_status): Likewise.
1150 (i386_dr_low): New global variable.
1151 * win32-i386-low.c (i386_dr_low_set_addr):
1152 Changed signature. Made static.
1153 (i386_dr_low_get_addr): Likewise.
1154 (i386_dr_low_set_control): Likewise.
1155 (i386_dr_low_get_control): Likewise.
1156 (i386_dr_low_get_status): Likewise.
1157 (i386_dr_low): New global variable.
1158
e1d2394b
MS
11592014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1160
1161 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1162 * Makefile.in (AR, AR_FLAGS): Define.
1163 * configure: Regenerate.
1164
3a8ee006
GB
11652014-06-19 Gary Benson <gbenson@redhat.com>
1166
1167 * Makefile.in (i386-dregs.o): New rule.
1168 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1169 * i386-low.c (target.h): Remove include.
1170 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1171 (DR_CONTROL_SHIFT): Likewise.
1172 (DR_CONTROL_SIZE): Likewise.
1173 (DR_RW_EXECUTE): Likewise.
1174 (DR_RW_WRITE): Likewise.
1175 (DR_RW_READ): Likewise.
1176 (DR_RW_IORW): Likewise.
1177 (DR_LEN_1): Likewise.
1178 (DR_LEN_2): Likewise.
1179 (DR_LEN_4): Likewise.
1180 (DR_LEN_8): Likewise.
1181 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1182 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1183 (DR_ENABLE_SIZE): Likewise.
1184 (DR_LOCAL_SLOWDOWN): Likewise.
1185 (DR_GLOBAL_SLOWDOWN): Likewise.
1186 (DR_CONTROL_RESERVED): Likewise.
1187 (I386_DR_CONTROL_MASK): Likewise.
1188 (I386_DR_VACANT): Likewise.
1189 (I386_DR_LOCAL_ENABLE): Likewise.
1190 (I386_DR_GLOBAL_ENABLE): Likewise.
1191 (I386_DR_DISABLE): Likewise.
1192 (I386_DR_SET_RW_LEN): Likewise.
1193 (I386_DR_GET_RW_LEN): Likewise.
1194 (I386_DR_WATCH_HIT): Likewise.
1195 (i386_wp_op_t): Likewise.
1196 (i386_show_dr): Likewise.
1197 (i386_length_and_rw_bits): Likewise.
1198 (i386_insert_aligned_watchpoint): Likewise.
1199 (i386_remove_aligned_watchpoint): Likewise.
1200 (i386_handle_nonaligned_watchpoint): Likewise.
1201 i386_update_inferior_debug_regs(): Likewise.
1202 (i386_dr_insert_watchpoint): Likewise.
1203 (i386_dr_remove_watchpoint): Likewise.
1204 (i386_dr_region_ok_for_watchpoint): Likewise.
1205 (i386_dr_stopped_data_address): Likewise.
1206 (i386_dr_stopped_by_watchpoint): Likewise.
1207
8f26655c
GB
12082014-06-19 Gary Benson <gbenson@redhat.com>
1209
1210 * i386-low.c (i386_dr_show): Renamed to
1211 i386_show_dr and made static. All uses updated.
1212 (i386_dr_length_and_rw_bits): Renamed to
1213 i386_length_and_rw_bits and made static.
1214 All uses updated.
1215 (i386_dr_insert_aligned_watchpoint): Renamed to
1216 i386_insert_aligned_watchpoint and made static.
1217 All uses updated.
1218 (i386_dr_remove_aligned_watchpoint): Renamed to
1219 i386_remove_aligned_watchpoint and made static.
1220 All uses updated.
1221 (i386_dr_update_inferior_debug_regs): Renamed to
1222 i386_update_inferior_debug_regs and made static.
1223 All uses updated.
1224
b9228891
GB
12252014-06-18 Gary Benson <gbenson@redhat.com>
1226
5171def3
GB
1227 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1228 (i386_dr_low_can_set_control): Likewise.
1229 (i386_get_debug_register_length): Likewise.
1230 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1231 (i386_dr_low_can_set_control): Likewise.
1232 (i386_get_debug_register_length): Likewise.
1233
12342014-06-17 Gary Benson <gbenson@redhat.com>
1235
b9228891
GB
1236 * i386-low.h (i386-dregs.h): New include.
1237 (DR_FIRSTADDR): Now in i386-dregs.h.
1238 (DR_LASTADDR): Likewise.
1239 (DR_NADDR): Likewise.
1240 (DR_STATUS): Likewise.
1241 (DR_CONTROL): Likewise.
1242 (i386_debug_reg_state): Likewise.
1243 (i386_dr_insert_watchpoint): Likewise.
1244 (i386_dr_remove_watchpoint): Likewise.
1245 (i386_dr_region_ok_for_watchpoint): Likewise.
1246 (i386_dr_stopped_data_address): Likewise.
1247 (i386_dr_stopped_by_watchpoint): Likewise.
1248 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1249
4be83cc2
GB
12502014-06-18 Gary Benson <gbenson@redhat.com>
1251
1252 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1253 i386_dr_insert_watchpoint.
1254 (i386_low_remove_watchpoint): Renamed to
1255 i386_dr_remove_watchpoint.
1256 (i386_low_region_ok_for_watchpoint): Renamed to
1257 i386_dr_region_ok_for_watchpoint.
1258 (i386_low_stopped_data_address): Renamed to
1259 i386_dr_stopped_data_address.
1260 (i386_low_stopped_by_watchpoint): Renamed to
1261 i386_dr_stopped_by_watchpoint.
1262 * i386-low.c (i386_show_dr): Renamed to
1263 i386_dr_show and made nonstatic. All uses updated.
1264 (i386_length_and_rw_bits): Renamed to
1265 i386_dr_length_and_rw_bits and made nonstatic.
1266 All uses updated.
1267 (i386_insert_aligned_watchpoint): Renamed to
1268 i386_dr_insert_aligned_watchpoint and made nonstatic.
1269 All uses updated.
1270 (i386_remove_aligned_watchpoint): Renamed to
1271 i386_dr_remove_aligned_watchpoint and made nonstatic.
1272 All uses updated.
1273 (i386_update_inferior_debug_regs): Renamed to
1274 i386_dr_update_inferior_debug_regs and made nonstatic.
1275 All uses updated.
1276 (i386_low_insert_watchpoint): Renamed to
1277 i386_dr_insert_watchpoint. All uses updated.
1278 (i386_low_remove_watchpoint): Renamed to
1279 i386_dr_remove_watchpoint. All uses updated.
1280 (i386_low_region_ok_for_watchpoint): Renamed to
1281 i386_dr_region_ok_for_watchpoint. All uses updated.
1282 (i386_low_stopped_data_address): Renamed to
1283 i386_dr_stopped_data_address. All uses updated.
1284 (i386_low_stopped_by_watchpoint): Renamed to
1285 i386_dr_stopped_by_watchpoint. All uses updated.
1286
131aa0d4
GB
12872014-06-18 Gary Benson <gbenson@redhat.com>
1288
1289 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1290 (i386_dr_low_can_set_control): Likewise.
1291 (i386_insert_aligned_watchpoint): New check.
1292
d9305f7f
GB
12932014-06-18 Gary Benson <gbenson@redhat.com>
1294
1295 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1296 Renamed to state.
1297
e927c9fc
GB
12982014-06-18 Gary Benson <gbenson@redhat.com>
1299
1300 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1301 instead of fatal and error.
1302 (i386_handle_nonaligned_watchpoint): Likewise.
1303
1b6d4134
GB
13042014-06-18 Gary Benson <gbenson@redhat.com>
1305
1306 * i386-low.c (i386_get_debug_register_length): New macro.
1307 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1308 (i386_show_dr): Use debug_printf instead of fprintf. Use
1309 phex to format values.
1310
6e62758f
GB
13112014-06-18 Gary Benson <gbenson@redhat.com>
1312
1313 * i386-low.h: Comment changes.
1314 * i386-low.c: Likewise.
1315
fc6e2f03
GB
13162014-06-18 Gary Benson <gbenson@redhat.com>
1317
1318 * i386-low.c: Whitespace changes.
1319
f9d1eeed
TT
13202014-06-12 Tom Tromey <tromey@redhat.com>
1321
1322 * utils.c (freeargv): Remove.
1323
0b04e523
TT
13242014-06-12 Tom Tromey <tromey@redhat.com>
1325
1326 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1327 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1328 (parse_debug_format_options): Likewise.
1329 (gdbserver_usage): Likewise.
1330 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1331 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1332 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1333 against libiberty.
1334 ($(LIBGNU)): Depend on libiberty.
1335 (all-lib): Recurse into all subdirs.
1336 (install-only): Invoke "install" target in subdirs.
1337 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1338 targets.
1339 * configure: Rebuild.
1340 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1341 for vasprintf, vsnprintf, or gettimeofday.
1342 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1343 srv_tgtobj.
1344
270c9937
JB
13452014-06-05 Joel Brobecker <brobecker@adacore.com>
1346
1347 * development.sh: Delete.
1348 * Makefile.in (config.status): Adjust dependency on development.sh.
1349 * configure.ac: Adjust development.sh source call.
1350 * configure: Regenerate.
1351
0a261ed8
PA
13522014-06-02 Pedro Alves <palves@redhat.com>
1353
1354 * ax.c (gdb_free_agent_expr): New function.
1355 * ax.h (gdb_free_agent_expr): New declaration.
1356 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1357 list.
1358 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1359 static.
1360 (clear_breakpoint_conditions_and_commands): New function.
1361 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1362 (clear_breakpoint_conditions_and_commands): New declaration.
1363
e9dae05e
RR
13642014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1365
1366 * linux-aarch64-low.c (asm/ptrace.h): Include.
1367
5876f503
JK
13682014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1369
1370 Fix TLS access for -static -pthread.
1371 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1372 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1373 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1374
802e8e6d
PA
13752014-05-20 Pedro Alves <palves@redhat.com>
1376
1377 * linux-aarch64-low.c (aarch64_insert_point)
1378 (aarch64_remove_point): No longer check whether the type is
1379 supported here. Adjust to new interface.
1380 (the_low_target): Install aarch64_supports_z_point_type as
1381 supports_z_point_type method.
1382 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1383 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1384 instead of a Z packet char. Adjust.
1385 (arm_supports_z_point_type): New function.
1386 (arm_insert_point, arm_remove_point): Adjust to new interface.
1387 (the_low_target): Install arm_supports_z_point_type.
1388 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1389 (cris_insert_point, cris_remove_point): Adjust to new interface.
1390 Don't check whether the type is supported here.
1391 (the_low_target): Install cris_supports_z_point_type.
1392 * linux-low.c (linux_supports_z_point_type): New function.
1393 (linux_insert_point, linux_remove_point): Adjust to new interface.
1394 * linux-low.h (struct linux_target_ops) <insert_point,
1395 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1396 raw_breakpoint pointer parameter.
1397 <supports_z_point_type>: New method.
1398 * linux-mips-low.c (mips_supports_z_point_type): New function.
1399 (mips_insert_point, mips_remove_point): Adjust to new interface.
1400 Use mips_supports_z_point_type.
1401 (the_low_target): Install mips_supports_z_point_type.
1402 * linux-ppc-low.c (the_low_target): Install NULL as
1403 supports_z_point_type method.
1404 * linux-s390-low.c (the_low_target): Install NULL as
1405 supports_z_point_type method.
1406 * linux-sparc-low.c (the_low_target): Install NULL as
1407 supports_z_point_type method.
1408 * linux-x86-low.c (x86_supports_z_point_type): New function.
1409 (x86_insert_point): Adjust to new insert_point interface. Use
1410 insert_memory_breakpoint. Adjust to new
1411 i386_low_insert_watchpoint interface.
1412 (x86_remove_point): Adjust to remove_point interface. Use
1413 remove_memory_breakpoint. Adjust to new
1414 i386_low_remove_watchpoint interface.
1415 (the_low_target): Install x86_supports_z_point_type.
1416 * lynx-low.c (lynx_target_ops): Install NULL as
1417 supports_z_point_type callback.
1418 * nto-low.c (nto_supports_z_point_type): New.
1419 (nto_insert_point, nto_remove_point): Adjust to new interface.
1420 (nto_target_ops): Install nto_supports_z_point_type.
1421 * mem-break.c: Adjust intro comment.
1422 (struct raw_breakpoint) <raw_type, size>: New fields.
1423 <inserted>: Update comment.
1424 <shlib_disabled>: Delete field.
1425 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1426 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1427 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1428 (raw_bkpt_type_to_target_hw_bp_type): New function.
1429 (find_enabled_raw_code_breakpoint_at): New function.
1430 (find_raw_breakpoint_at): New type and size parameters. Use them.
1431 (insert_memory_breakpoint): New function, based off
1432 set_raw_breakpoint_at.
1433 (remove_memory_breakpoint): New function.
1434 (set_raw_breakpoint_at): Reimplement.
1435 (set_breakpoint): New, based on set_breakpoint_at.
1436 (set_breakpoint_at): Reimplement.
1437 (delete_raw_breakpoint): Go through the_target->remove_point
1438 instead of assuming memory breakpoints.
1439 (find_gdb_breakpoint_at): Delete.
1440 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1441 (find_gdb_breakpoint): New function.
1442 (set_gdb_breakpoint_at): Delete.
1443 (z_type_supported): New function.
1444 (set_gdb_breakpoint_1): New function, loosely based off
1445 set_gdb_breakpoint_at.
1446 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1447 (delete_gdb_breakpoint_at): Delete.
1448 (delete_gdb_breakpoint_1): New function, loosely based off
1449 delete_gdb_breakpoint_at.
1450 (delete_gdb_breakpoint): New function.
1451 (clear_gdb_breakpoint_conditions): Rename to ...
1452 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1453 breakpoint.
1454 (add_condition_to_breakpoint): Make static.
1455 (add_breakpoint_condition): Take a struct breakpoint pointer
1456 instead of an address. Adjust.
1457 (gdb_condition_true_at_breakpoint): Rename to ...
1458 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1459 z_type parameter.
1460 (gdb_condition_true_at_breakpoint): Reimplement.
1461 (add_breakpoint_commands): Take a struct breakpoint pointer
1462 instead of an address. Adjust.
1463 (gdb_no_commands_at_breakpoint): Rename to ...
1464 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1465 parameter. Return true if no breakpoint was found. Change debug
1466 output.
1467 (gdb_no_commands_at_breakpoint): Reimplement.
1468 (run_breakpoint_commands): Rename to ...
1469 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1470 and change return type to boolean.
1471 (run_breakpoint_commands): New function.
1472 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1473 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1474 breakpoint. Go through the_target->remove_point instead of
1475 assuming memory breakpoint.
1476 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1477 software and hardware breakpoints.
1478 (reinsert_raw_breakpoint): Go through the_target->insert_point
1479 instead of assuming memory breakpoint.
1480 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1481 software and hardware breakpoints.
1482 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1483 Check both software and hardware breakpoints.
1484 (validate_inserted_breakpoint): Assert the breakpoint is a
1485 software breakpoint. Set the inserted flag to -1 instead of
1486 setting shlib_disabled.
1487 (delete_disabled_breakpoints): Adjust.
1488 (validate_breakpoints): Only validate software breakpoints.
1489 Adjust to inserted flag change.
1490 (check_mem_read, check_mem_write): Skip breakpoint types other
1491 than software breakpoints. Adjust to inserted flag change.
1492 * mem-break.h (enum raw_bkpt_type): New enum.
1493 (raw_breakpoint, struct process_info): Forward declare.
1494 (Z_packet_to_target_hw_bp_type): Delete declaration.
1495 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1496 (set_gdb_breakpoint, delete_gdb_breakpoint)
1497 (clear_breakpoint_conditions): New declarations.
1498 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1499 (breakpoint_inserted_here): Update comment.
1500 (add_breakpoint_condition, add_breakpoint_commands): Replace
1501 address parameter with a breakpoint pointer parameter.
1502 (gdb_breakpoint_here): Update comment.
1503 (delete_gdb_breakpoint_at): Delete.
1504 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1505 * server.c (process_point_options): Take a struct breakpoint
1506 pointer instead of an address. Adjust.
1507 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1508 delete_gdb_breakpoint.
1509 * spu-low.c (spu_target_ops): Install NULL as
1510 supports_z_point_type method.
1511 * target.h: Include mem-break.h.
1512 (struct target_ops) <prepare_to_access_memory>: Update comment.
1513 <supports_z_point_type>: New field.
1514 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1515 instead of a char. Also take a raw breakpoint pointer.
1516 * win32-arm-low.c (the_low_target): Install NULL as
1517 supports_z_point_type.
1518 * win32-i386-low.c (i386_supports_z_point_type): New function.
1519 (i386_insert_point, i386_remove_point): Adjust to new interface.
1520 (the_low_target): Install i386_supports_z_point_type.
1521 * win32-low.c (win32_supports_z_point_type): New function.
1522 (win32_insert_point, win32_remove_point): Adjust to new interface.
1523 (win32_target_ops): Install win32_supports_z_point_type.
1524 * win32-low.h (struct win32_target_ops):
1525 <supports_z_point_type>: New method.
1526 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1527 instead of a char. Also take a raw breakpoint pointer.
1528
932539e3
PA
15292014-05-20 Pedro Alves <palves@redhat.com>
1530
1531 * mem-break.h: Include break-common.h.
1532 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1533 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1534 (Z_packet_to_target_hw_bp_type): New declaration.
1535 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1536 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1537 (Z_PACKET_ACCESS_WP): Delete macros.
1538 (Z_packet_to_hw_type): Delete function.
1539 * i386-low.h: Don't include break-common.h here.
1540 (Z_packet_to_hw_type): Delete declaration.
1541 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1542 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1543 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1544 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1545 * linux-aarch64-low.c: Don't include break-common.h here.
1546 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1547 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1548 (Z_packet_to_target_hw_bp_type): Delete function.
1549 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1550 function.
1551 (mips_insert_point, mips_remove_point): Use
1552 Z_packet_to_target_hw_bp_type.
1553
4ff0d3d8
PA
15542014-05-20 Pedro Alves <palves@redhat.com>
1555
1556 * linux-aarch64-low.c: Include break-common.h.
1557 (enum target_point_type): Delete.
1558 (Z_packet_to_point_type): Rename to ...
1559 (Z_packet_to_target_hw_bp_type): ... this, and return a
1560 target_hw_bp_type instead.
1561 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1562 instead of an enum target_point_type.
1563 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1564 breakpoint type.
1565 (aarch64_dr_state_insert_one_point)
1566 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1567 (aarch64_handle_aligned_watchpoint)
1568 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1569 Take an enum target_hw_bp_type instead of an enum
1570 target_point_type.
1571 (aarch64_supports_z_point_type): New function.
1572 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1573 use Z_packet_to_target_hw_bp_type.
1574
786dc519
JB
15752014-05-20 Joel Brobecker <brobecker@adacore.com>
1576
1577 * configure.ac: Only use -Werror by default when DEVELOPMENT
1578 is true.
1579 * configure: Regenerate.
1580
9e0aa64f
JK
15812014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1582
1583 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1584 * linux-x86-low.c (X86_64_USER_REGS): New.
1585 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1586
2b577b92
YQ
15872014-04-28 Yao Qi <yao@codesourcery.com>
1588
1589 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1590 name.
1591
94611da2
PA
15922014-04-25 Pedro Alves <palves@redhat.com>
1593
1594 PR server/16255
1595 * linux-low.c (linux_attach_fail_reason_string): New function.
1596 (linux_attach_lwp): Delete.
1597 (linux_attach_lwp_1): Rename to ...
1598 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1599 argument. Remove "initial" parameter. Return int instead of
1600 void. Don't error or warn here.
1601 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1602 failure to attach to the tgid. Call warning when failing to
1603 attach to an lwp.
1604 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1605 argument. Remove "initial" parameter. Return int instead of
1606 void. Don't error or warn here.
1607 (linux_attach_fail_reason_string): New declaration.
1608 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1609 interface change. Use linux_attach_fail_reason_string.
1610
01f9f808
MS
16112014-04-24 Michael Sturm <michael.sturm@mintel.com>
1612 Walfred Tedeschi <walfred.tedeschi@intel.com>
1613
1614 * Makefile.in: Added rules to handle new files
1615 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1616 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1617 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1618 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1619 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1620 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1621 x32-avx512-linux.o.
1622 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1623 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1624 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1625 i386/x32-avx512.xml.
1626 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1627 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1628 i386/x32-avx512-linux.xml.
1629 * i387-fp.c (num_avx512_k_registers): New constant for number
1630 of K registers.
1631 (num_avx512_zmmh_low_registers): New constant for number of
1632 lower ZMM registers (0-15).
1633 (num_avx512_zmmh_high_registers): New constant for number of
1634 higher ZMM registers (16-31).
1635 (num_avx512_ymmh_registers): New contant for number of higher
1636 YMM registers (ymm16-31 added by avx521 on x86_64).
1637 (num_avx512_xmm_registers): New constant for number of higher
1638 XMM registers (xmm16-31 added by AVX512 on x86_64).
1639 (struct i387_xsave): Add space for AVX512 registers.
1640 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1641 Add code to handle AVX512 registers.
1642 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1643 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1644 prototypei from generated file.
1645 (tdesc_amd64_avx512_linux): Likewise.
1646 (init_registers_x32_avx512_linux): Likewise.
1647 (tdesc_x32_avx512_linux): Likewise.
1648 (init_registers_i386_avx512_linux): Likewise.
1649 (tdesc_i386_avx512_linux): Likewise.
1650 (x86_64_regmap): Add AVX512 registers.
1651 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1652 mask.
1653 (initialize_low_arch): Add code to initialize AVX512 registers.
1654
51aa91f9
PA
16552014-04-23 Pedro Alves <palves@redhat.com>
1656
1657 * mem-break.c (find_gdb_breakpoint_at): Make static.
1658 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1659
a4165e94
PA
16602014-04-23 Pedro Alves <palves@redhat.com>
1661
1662 * i386-low.c: Don't include break-common.h here.
1663 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1664 prototype to take target_hw_bp_type as argument instead of a Z
1665 packet char.
1666 * i386-low.h: Include break-common.h here.
1667 (Z_packet_to_hw_type): Declare.
1668 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1669 prototypes.
1670 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1671 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1672 (x86_remove_point): Convert the packet number to a
1673 target_hw_bp_type before calling i386_low_remove_watchpoint.
1674 * win32-i386-low.c (i386_insert_point): Convert the packet number
1675 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1676 (i386_remove_point): Convert the packet number to a
1677 target_hw_bp_type before calling i386_low_remove_watchpoint.
1678
b8acf843
PA
16792014-04-23 Pedro Alves <palves@redhat.com>
1680
1681 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1682
d708bcd1
PA
16832014-04-10 Pedro Alves <palves@redhat.com>
1684
1685 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1686 Check if the condition or command is NULL before checking if the
1687 breakpoint is known. On success, return true.
1688 * mem-break.h (add_breakpoint_condition): Document return.
1689 (add_breakpoint_commands): Add describing comment.
1690 * server.c (skip_to_semicolon): New function.
1691 (process_point_options): Use it.
1692
2eec7d5b
PA
16932014-04-09 Pedro Alves <palves@redhat.com>
1694
1695 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1696 to lwpid_of.
1697
fa96cb38
PA
16982014-02-27 Pedro Alves <palves@redhat.com>
1699
1700 PR 12702
1701 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1702 macros.
1703 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1704 output.
1705 (last_thread_of_process_p): Take a PID argument instead of a
1706 thread pointer.
1707 (linux_wait_for_lwp): Delete.
1708 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1709 functions.
1710 (linux_low_filter_event): New function, party factored out from
1711 linux_wait_for_event.
1712 (linux_wait_for_event): Rename to ...
1713 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1714 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1715 sigsuspend. Check for zombie leaders.
1716 (linux_wait_for_event): Reimplement as wrapper around
1717 linux_wait_for_event_filtered.
1718 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1719 a normal or signal exit is seen, it's the whole process exiting.
1720 (wait_for_sigstop): No longer a for_each_inferior callback.
1721 Rewrite on top of linux_wait_for_event_filtered.
1722 (stop_all_lwps): Call wait_for_sigstop directly.
1723 * server.c (resume, handle_target_event): Handle
1724 TARGET_WAITKIND_NO_RESUMED.
1725
d763de10
JB
17262014-02-26 Joel Brobecker <brobecker@adacore.com>
1727
1728 * win32-low.c (psapi_get_dll_name,
1729 * win32_CreateToolhelp32Snapshot): Delete.
1730 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1731 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1732 Delete.
1733 (handle_load_dll): Add function description.
1734 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1735
850a0f76
JB
17362014-02-26 Joel Brobecker <brobecker@adacore.com>
1737
1738 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1739 Add comment.
1740 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1741 base address when calling win32_add_one_solib.
1742 (handle_load_dll): Delete local variable load_addr.
1743 Remove 0x1000 offset applied to DLL base address when calling
1744 win32_add_one_solib.
1745 (handle_unload_dll): Add comment.
1746
f25b3fc3
JB
17472014-02-26 Joel Brobecker <brobecker@adacore.com>
1748
1749 * win32-low.c (win32_add_all_dlls): Renames
1750 win32_ensure_ntdll_loaded. Rewrite function documentation.
1751 Adjust implementation to always load all DLLs.
1752 Add 0x1000 offset to DLL base address when calling
1753 win32_add_one_solib.
1754 (child_initialization_done): New static global.
1755 (do_initial_child_stuff): Set child_initialization_done to
1756 zero during child initialization, and 1 after. Replace call
1757 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1758 Add comment.
1759 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1760 (handle_unload_dll): Add function documentation.
1761 (get_child_debug_event): Ignore load and unload DLL events
1762 during child initialization.
1763
d86d4aaf
DE
17642014-02-20 Doug Evans <dje@google.com>
1765
3bc32da3 1766 Remove global all_lwps.
d86d4aaf
DE
1767 * inferiors.h (ptid_of): Move here from linux-low.h.
1768 (pid_of, lwpid_of): Ditto.
1769 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1770 parameter is a struct thread_info * now.
1771 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1772 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1773 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1774 directly.
1775 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1776 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1777 * linux-arm-low.c (update_registers_callback): Update, "entry"
1778 parameter is a struct thread_info * now.
1779 Fetch lwpid from current_inferior directly.
1780 (arm_insert_point): Pass &all_threads to find_inferior instead of
1781 &all_lwps.
1782 (arm_remove_point): Ditto.
1783 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1784 (arm_prepare_to_resume): Fetch pid from thread.
1785 (arm_read_description): Fetch lwpid from current_inferior directly.
1786 * linux-low.c (all_lwps): Delete.
1787 (delete_lwp): Delete call to remove_inferior.
1788 (handle_extended_wait): Fetch lwpid from thread.
1789 (add_lwp): Don't set lwp->entry.id. Remove call to
1790 add_inferior_to_list.
1791 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1792 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1793 (kill_one_lwp_callback): Ditto.
1794 (linux_kill): Don't dereference NULL pointer.
1795 Fetch ptid,lwpid from thread.
1796 (get_detach_signal): Fetch ptid from thread.
1797 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1798 Simplify call to regcache_invalidate_thread.
1799 (delete_lwp_callback): Update, "entry" parameter is a
1800 struct thread_info * now. Fetch pid from thread.
1801 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1802 (status_pending_p_callback): Update, "entry" parameter is a
1803 struct thread_info * now. Fetch ptid from thread.
1804 (find_lwp_pid): Update, "entry" parameter is a
1805 struct thread_info * now.
1806 (linux_wait_for_lwp): Fetch pid from thread.
1807 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1808 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1809 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1810 (dequeue_one_deferred_signal): Ditto.
1811 (cancel_breakpoint): Fetch ptid from current_inferior.
1812 (linux_wait_for_event): Pass &all_threads to find_inferior,
1813 not &all_lwps. Fetch ptid, lwpid from thread.
1814 (count_events_callback): Update, "entry" parameter is a
1815 struct thread_info * now.
1816 (select_singlestep_lwp_callback): Ditto.
1817 (select_event_lwp_callback): Ditto.
1818 (cancel_breakpoints_callback): Ditto.
1819 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1820 not &all_lwps.
1821 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1822 (unsuspend_one_lwp): Update, "entry" parameter is a
1823 struct thread_info * now.
1824 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1825 not &all_lwps.
1826 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1827 Fetch lwpid from thread, not lwp.
1828 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1829 Pass &all_threads to find_inferior, not &all_lwps.
1830 (send_sigstop): Fetch lwpid from thread, not lwp.
1831 (send_sigstop_callback): Update, "entry" parameter is a
1832 struct thread_info * now.
1833 (suspend_and_send_sigstop_callback): Ditto.
1834 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1835 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1836 struct thread_info * now.
1837 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1838 from thread, lwp.
1839 (lwp_running): Update, "entry" parameter is a
1840 struct thread_info * now.
1841 (stop_all_lwps): Fetch ptid from thread.
1842 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1843 (linux_resume_one_lwp): Fetch lwpid from thread.
1844 (linux_set_resume_request): Update, "entry" parameter is a
1845 struct thread_info * now. Fetch pid, lwpid from thread.
1846 (resume_status_pending_p): Update, "entry" parameter is a
1847 struct thread_info * now.
1848 (need_step_over_p): Ditto. Fetch lwpid from thread.
1849 (start_step_over): Fetch lwpid from thread.
1850 (linux_resume_one_thread): Update, "entry" parameter is a
1851 struct thread_info * now. Fetch lwpid from thread.
1852 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1853 (proceed_one_lwp): Update, "entry" parameter is a
1854 struct thread_info * now. Fetch lwpid from thread.
1855 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1856 struct thread_info * now.
1857 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1858 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1859 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1860 directly.
1861 (regsets_store_inferior_registers): Ditto.
1862 (fetch_register, store_register): Ditto.
1863 (linux_read_memory, linux_write_memory): Ditto.
1864 (linux_request_interrupt): Ditto.
1865 (linux_read_auxv): Ditto.
1866 (linux_xfer_siginfo): Ditto.
1867 (linux_qxfer_spu): Ditto.
1868 (linux_qxfer_libraries_svr4): Ditto.
1869 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1870 moved to inferiors.h.
1871 (get_lwp): Delete.
1872 (get_thread_lwp): Update.
1873 (struct lwp_info): Delete member "entry". Simplify comment for
1874 member "thread".
1875 (all_lwps): Delete.
1876 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1877 current_inferior directly.
1878 (update_watch_registers_callback): Update, "entry" parameter is a
1879 struct thread_info * now. Fetch pid from thread.
1880 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1881 (mips_insert_point): Fetch lwpid from current_inferior.
1882 Pass &all_threads to find_inferior, not &all_lwps.
1883 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1884 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1885 directly.
1886 (mips_stopped_data_address): Ditto.
1887 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1888 directly.
1889 * linux-tile-low.c (tile_arch_setup): Ditto.
1890 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1891 (update_debug_registers_callback): Update, "entry" parameter is a
1892 struct thread_info * now. Fetch pid from thread.
1893 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1894 Pass &all_threads to find_inferior, not &all_lwps.
1895 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1896 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1897 Pass &all_threads to find_inferior, not &all_lwps.
1898 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1899 (i386_dr_low_get_status): Ditto.
1900 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1901 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1902 (x86_linux_read_description): Ditto.
1903 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1904
3b8361aa
DE
19052014-02-20 Doug Evans <dje@google.com>
1906
1907 * inferiors.c (get_first_inferior): Fix buglet.
1908
f7667f0d
DE
19092014-02-19 Doug Evans <dje@google.com>
1910
1911 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1912 * inferiors.c (add_thread): Change result type to struct thread_info *.
1913 All callers updated.
1914 (add_lwp): Call add_thread here instead of in callers.
1915 All callers updated.
1916 * linux-low.h (get_lwp_thread): Rewrite.
1917 (struct lwp_info): New member "thread".
1918
b3312d80
DE
19192014-02-19 Doug Evans <dje@google.com>
1920
1921 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1922 All callers updated.
1923
ecc6f45c
DE
19242014-02-19 Doug Evans <dje@google.com>
1925
1926 * inferiors.c (add_thread): Fix whitespace.
1927
649ebbca
DE
19282014-02-19 Doug Evans <dje@google.com>
1929
1930 * dll.c (clear_dlls): Replace accessing list implemention details
1931 with API function.
1932 * gdbthread.h (get_first_thread): Declare.
1933 * inferiors.c (for_each_inferior_with_data): New function.
1934 (get_first_thread): New function.
1935 (find_thread_ptid): Simplify.
1936 (get_first_inferior): New function.
1937 (clear_list): Delete.
1938 (one_inferior_p): New function.
1939 (clear_inferior_list): New function.
1940 (clear_inferiors): Update.
1941 * inferiors.h (for_each_inferior_with_data): Declare.
1942 (clear_inferior_list): Declare.
1943 (one_inferior_p): Declare.
1944 (get_first_inferior): Declare.
1945 * linux-low.c (linux_wait_for_event): Replace accessing list
1946 implemention details with API function.
1947 * server.c (target_running): Ditto.
1948 (accumulate_file_name_length): New function.
1949 (emit_dll_description): New function.
1950 (handle_qxfer_libraries): Replace accessing list implemention
1951 details with API function.
1952 (handle_qxfer_threads_worker): New function.
1953 (handle_qxfer_threads_proper): Replace accessing list implemention
1954 details with API function.
1955 (handle_query): Ditto.
1956 (visit_actioned_threads_callback_ftype): New typedef.
1957 (visit_actioned_threads_data): New struct.
1958 (visit_actioned_threads): Rewrite to be find_inferior callback.
1959 (resume): Call find_inferior.
1960 (handle_status): Replace accessing list implemention
1961 details with API function.
1962 (process_serial_event): Replace accessing list implemention details
1963 with API function.
1964 * target.c (set_desired_inferior): Replace accessing list implemention
1965 details with API function.
1966 * tracepoint.c (same_process_p): New function.
1967 (gdb_agent_about_to_close): Replace accessing list implemention
1968 details with API function.
1969 * win32-low.c (child_delete_thread): Replace accessing list
1970 implemention details with API function.
1971 (match_dll_by_basename): New function.
1972 (dll_is_loaded_by_basename): New function.
1973 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1974 details call to dll_is_loaded_by_basename.
1975
80894984
DE
19762014-02-19 Doug Evans <dje@google.com>
1977
1978 * dll.h (struct dll_info): Add comment.
1979 * gdbthread.h (struct thread_info): Add comment.
1980 (current_ptid): Simplify.
1981 * inferiors.c (add_process): Update.
1982 (remove_process): Update.
1983 * inferiors.h (struct process_info): Rename member "head" to "entry".
1984 * linux-low.c (delete_lwp): Update.
1985 (add_lwp): Update.
1986 (last_thread_of_process_p): Update.
1987 (kill_one_lwp_callback, linux_kill): Update.
1988 (status_pending_p_callback): Update.
1989 (wait_for_sigstop): Update. Simplify read of ptid.
1990 (start_step_over): Update.
1991 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1992 (get_lwp_thread): Update.
1993 (struct lwp_info): Rename member "head" to "entry".
1994 * regcache.h (inferior_list_entry): Delete.
1995 * server.c (kill_inferior_callback): Update.
1996 (detach_or_kill_inferior_callback): Update.
1997 (print_started_pid): Update.
1998 (print_attached_pid): Update.
1999 (process_serial_event): Simplify read of ptid.
2000 * thread-db.c (thread_db_create_event): Update.
2001 (thread_db_get_tls_address): Update.
2002 * win32-low.c (current_inferior_ptid): Simplify.
2003
46917d26
TT
20042014-02-19 Tom Tromey <tromey@redhat.com>
2005
2006 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2007 argument.
2008 (target_supports_btrace): Update.
2009
0759a81e
YQ
20102014-02-14 Yao Qi <yao@codesourcery.com>
2011
2012 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2013 (rsp-low-ipa.o): New target.
2014
a7191e8b
TT
20152014-02-12 Tom Tromey <tromey@redhat.com>
2016
2017 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2018 convert_ascii_to_int.
2019 * regcache.c (registers_to_string): Likewise.
2020 * remote-utils.c (decode_M_packet): Likewise.
2021 * server.c (process_serial_event): Likewise.
2022
ff0e980e
TT
20232014-02-12 Tom Tromey <tromey@redhat.com>
2024
2025 * server.c (handle_query, handle_v_run): Use hex2bin, not
2026 unhexify.
2027 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2028
e9371aff
TT
20292014-02-12 Tom Tromey <tromey@redhat.com>
2030
2031 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2032 convert_int_to_ascii.
2033 * regcache.c (registers_to_string, collect_register_as_string):
2034 Likewise.
2035 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2036 Likewise.
2037 * server.c (process_serial_event): Likewise.
2038 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2039 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2040
971dc0b8
TT
20412014-02-12 Tom Tromey <tromey@redhat.com>
2042
2043 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2044 bin2hex, not hexify.
2045 * tracepoint.c (cmd_qtstatus): Likewise.
2046
0a822afb
TT
20472014-02-12 Tom Tromey <tromey@redhat.com>
2048
2049 * remote-utils.c (monitor_output): Pass explicit length to
2050 hexify.
2051
9c3d6531
TT
20522014-02-12 Tom Tromey <tromey@redhat.com>
2053
2054 * tracepoint.c: Include rsp-low.h.
2055 * server.c: Include rsp-low.h.
2056 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2057 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2058 declare.
2059 * remote-utils.c: Include rsp-low.h.
2060 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2061 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2062 (convert_int_to_ascii, convert_ascii_to_int): Move to
2063 common/rsp-low.c.
2064 * regcache.c: Include rsp-low.h.
2065 * ax.c: Include rsp-low.h.
2066 * Makefile.in (SFILES): Add common/rsp-low.c.
2067 (OBS): Add rsp-low.o.
2068 (rsp-low.o): New target.
2069
01fd3ea5
TT
20702014-02-12 Tom Tromey <tromey@redhat.com>
2071
2072 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2073 Include print-utils.h.
2074 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2075 (plongest, thirty_two, phex_nz): Remove.
2076 * Makefile.in (SFILES): Add common/print-utils.c.
2077 (OBS): Add print-utils.o.
2078 (print-utils-ipa.o): New target.
2079 (print-utils.o): New target.
2080 (IPA_OBJS): Add print-utils-ipa.o.
2081
e99dc820
TT
20822014-02-06 Tom Tromey <tromey@redhat.com>
2083
2084 * Makefile.in (SFILES): Fix indentation.
2085
ee1e2d4f
DE
20862014-02-05 Doug Evans <dje@google.com>
2087
2088 * linux-low.c (linux_wait_for_event): Improve comment.
2089 (linux_wait_1): Keep current_inferior in sync with event_child.
2090
f5a02773
DE
20912014-01-22 Doug Evans <dje@google.com>
2092
2093 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2094
87ce2a04
DE
20952014-01-22 Doug Evans <dje@google.com>
2096
2097 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2098 * configure: Regenerate.
2099 * config.in: Regenerate.
2100 * Makefile.in (SFILES): Add debug.c.
2101 (OBS): Add debug.o.
2102 * debug.c: New file.
2103 * debug.h: New file.
2104 * linux-aarch64-low.c (*): Update all debugging printfs to use
2105 debug_printf instead of fprintf.
2106 * linux-arm-low.c (*): Ditto.
2107 * linux-cris-low.c (*): Ditto.
2108 * linux-crisv32-low.c (*): Ditto.
2109 * linux-m32r-low.c (*): Ditto.
2110 * linux-sparc-low.c (*): Ditto.
2111 * linux-x86.c (*): Ditto.
2112 * linux-low.c (*): Ditto.
2113 (linux_wait_1): Add calls to debug_enter, debug_exit.
2114 (linux_wait): Remove redundant debugging printf.
2115 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2116 (linux_resume, unstop_all_lwps): Ditto.
2117 * mem-break.c (*): Update all debugging printfs to use
2118 debug_printf instead of fprintf.
2119 * remote-utils.c (*): Ditto.
2120 * thread-db.c (*): Ditto.
2121 * server.c #include <ctype.h>, "gdb_vecs.h".
2122 (debug_threads): Moved to debug.c.
2123 (*): Update all debugging printfs to use debug_printf instead of
2124 fprintf.
2125 (start_inferior): Replace call to fflush with call to debug_flush.
2126 (monitor_show_help): Mention set debug-format.
2127 (parse_debug_format_options): New function.
2128 (handle_monitor_command): Handle "monitor set debug-format".
2129 (gdbserver_usage): Mention --debug-format.
2130 (main): Parse --debug-format.
2131 * server.h (debug_threads): Declaration moved to debug.h.
2132 #include "debug.h".
2133 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2134 trace_debug_1 that uses debug_printf.
2135 (tracepoint_look_up_symbols): Update all debugging printfs to use
2136 debug_printf instead of fprintf.
2137
e671835b
BS
21382014-01-20 Baruch Siach <baruch@tkos.co.il>
2139
2140 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2141 sys/ptrace.h.
2142
b5737fa9
PA
21432014-01-17 Pedro Alves <palves@redhat.com>
2144
ea38d2a9 2145 PR build/16445
c7faa97a
PA
2146 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2147 defined after including gdb_proc_service.h.
b5737fa9 2148
40ed484e
DE
21492014-01-16 Doug Evans <dje@google.com>
2150
2151 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2152 (match_dll): Use it.
2153
969c39fb
MM
21542014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2155
2156 * target.h (target_ops) <read_btrace>: Change parameters and
2157 return type to allow error reporting.
2158 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2159 trace reading errors on.
2160 * linux-low.c (linux_low_read_btrace): Pass trace reading
2161 errors on.
2162 (linux_low_disable_btrace): New.
2163
ab7f45ba
DE
21642014-01-15 Doug Evans <dje@google.com>
2165
2166 * inferiors.c (thread_id_to_gdb_id): Delete.
2167 * inferiors.h (thread_id_to_gdb_id): Delete.
2168
66af0f44
EZ
21692014-01-13 Eli Zaretskii <eliz@gnu.org>
2170
2171 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2172 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2173 versions.
2174
9939e131
PA
21752014-01-08 Pedro Alves <palves@redhat.com>
2176
2177 * server.c (handle_status): Don't discard previous queued stop
2178 replies or thread's pending status here.
2179 (main) <disconnection>: Do it here instead.
2180
b7ea362b
PA
21812014-01-08 Pedro Alves <palves@redhat.com>
2182
2183 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2184 * server.c (visit_actioned_threads, handle_pending_status): New
2185 function.
2186 (handle_v_cont): Factor out parts to ...
2187 (resume): ... this new function. If in all-stop, and a thread
2188 being resumed has a pending status, report it without actually
2189 resuming.
2190 (myresume): Adjust to use the new 'resume' function.
2191 (clear_pending_status_callback, set_pending_status_callback)
2192 (find_status_pending_thread_callback): New functions.
2193 (handle_status): Handle the case of multiple threads having
2194 interesting statuses to report. Report threads' real last signal
2195 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2196 with an interesting thread to report the status for, instead of
2197 always reporting the status of the first thread.
2198
28498c42
JB
21992014-01-01 Joel Brobecker <brobecker@adacore.com>
2200
2201 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2202 * gdbreplay.c (gdbreplay_version): Likewise.
2203
f45c82da
YZ
22042013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2205
2206 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2207 iov.iov_len with the real length in use.
2208
379a5e2d
JB
22092013-12-13 Joel Brobecker <brobecker@adacore.com>
2210
2211 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2212 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2213 for all targets that use win32-low.c.
2214 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2215 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2216
4210d83e
PA
22172013-12-13 Pedro Alves <palves@redhat.com>
2218
2219 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2220 if equal to TARGET_WAITKIND_LOADED.
2221 * win32-low.c (cached_status): New static global.
2222 (win32_wait): Add declaration.
2223 (do_initial_child_stuff): Flush all initial pending debug events
2224 up to the initial breakpoint.
2225 (win32_wait): If CACHED_STATUS was set, return that instead
2226 of doing a real wait. Remove the code resuming the execution
2227 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2228 during the initial phase. Also remove the code changing
2229 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2230 TARGET_WAITKIND_STOPPED.
2231
e7f0d979
YQ
22322013-12-11 Yao Qi <yao@codesourcery.com>
2233
2234 * notif.c (handle_notif_ack): Return 0 if no notification
2235 matches.
2236
ebcf782c
DE
22372013-11-20 Doug Evans <dje@google.com>
2238
2239 * linux-low.c (linux_set_resume_request): Fix comment.
2240
20ad9378
DE
22412013-11-20 Doug Evans <dje@google.com>
2242
2243 * linux-low.c (resume_status_pending_p): Tweak comment.
2244
a196ebeb
WT
22452013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2246
2247 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2248 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2249 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2250 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2251 (srv_amd64_regobj): Add amd64-mpx.o.
2252 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2253 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2254 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2255 * i387-fp.c (num_pl_bnd_register) Added constant.
2256 (num_pl_bnd_cfg_registers) Added constant.
2257 (struct i387_xsave) Added reserved area and MPX fields.
2258 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2259 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2260 function.
2261 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2262 (init_registers_amd64_mpx_linux): Declare new function.
2263 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2264 (x86_64_regmap): Add MPX registers.
2265 (x86_linux_read_description): Add MPX case.
2266 (initialize_low_arch): Initialize MPX targets.
2267
0080a2f6
TT
22682013-11-18 Tom Tromey <tromey@redhat.com>
2269
2270 * configure: Rebuild.
2271 * configure.ac: Don't check for stdlib.h.
2272 * gdbreplay.c: Unconditionally include stdlib.h.
2273
2978b111
TT
22742013-11-18 Tom Tromey <tromey@redhat.com>
2275
2276 * config.in: Rebuild.
2277 * configure: Rebuild.
2278 * configure.ac: Don't use AC_HEADER_DIRENT.
2279
a3d08894
TT
22802013-11-18 Tom Tromey <tromey@redhat.com>
2281
2282 * server.h: Don't check HAVE_STRING_H.
2283 * gdbreplay.c: Don't check HAVE_STRING_H.
2284 * configure: Rebuild.
2285
0a5dd17d
TT
22862013-11-18 Tom Tromey <tromey@redhat.com>
2287
2288 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2289 LIBGNU.
2290
1bd2f0ba
TT
22912013-11-08 Tom Tromey <tromey@redhat.com>
2292
2293 * configure, config.in: Rebuild.
2294 * configure.ac: Remove unused configury.
2295
3266f10b
TT
22962013-11-08 Tom Tromey <tromey@redhat.com>
2297
2298 * acinclude.m4: Include common.m4, codeset.m4.
2299 * configure, config.in: Rebuild.
2300 * configure.ac: Use GDB_AC_COMMON.
2301
6682d959
AA
23022013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2303
2304 * linux-s390-low.c (HWCAP_S390_TE): New define.
2305 (s390_arch_setup): Consider the TE field in the HWCAP for
2306 determining 'have_regset_tdb'.
2307
fd0a4d76
SDJ
23082013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 PR gdb/16014
2311 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2312 call to sizeof.
2313
1a3d890b
PA
23142013-10-02 Pedro Alves <palves@redhat.com>
2315
2316 * server.c (process_serial_event): Don't output "GDBserver
2317 exiting" if GDB is connected through stdio.
2318 * target.c (mywait): Likewise, be silent if GDB is connected
2319 through stdio.
2320
97ad4581
JB
23212013-10-01 Joel Brobecker <brobecker@adacore.com>
2322
2323 * lynx-low.c (lynx_add_threads_after_attach): New function.
2324 (lynx_attach): Remove call to add_thread. Add call to
2325 lynx_add_threads_after_attach instead.
2326
5b4e221c
MF
23272013-09-28 Mike Frysinger <vapier@gentoo.org>
2328
2329 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2330 * config.in, configure: Regenerated.
2331
ee47b2f8
YQ
23322013-09-18 Yao Qi <yao@codesourcery.com>
2333
2334 PR server/15959
2335 * server.c (start_inferior): Clear 'resume_info'.
2336
d6707650 23372013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2338
d6707650
JW
2339 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2340 for each register.
2341
9243dd0e 23422013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2343
9243dd0e
JW
2344 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2345 linux-tile-low.o to srv_tgtobj.
2346
c623a6ef
WN
23472013-09-16 Will Newton <will.newton@linaro.org>
2348
2349 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2350 out regs.
2351
fb71d39e
PA
23522013-09-06 Pedro Alves <palves@redhat.com>
2353
2354 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2355 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2356 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2357 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2358 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2359 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2360
8e7e9910
PA
23612013-09-06 Pedro Alves <palves@redhat.com>
2362
2363 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2364 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2365
7c3a12ca
PA
23662013-09-06 Pedro Alves <palves@redhat.com>
2367
2368 * linux-amd64-ipa.c: Include tracepoint.h.
2369 * linux-i386-ipa.c: Include tracepoint.h.
2370
8eb3d7b6
RW
23712013-09-06 Ricard Wanderlof <ricardw@axis.com>
2372
2373 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2374 (ps_get_thread_area): New function.
2375
eddddb9d
RW
23762013-09-06 Ricard Wanderlof <ricardw@axis.com>
2377
2378 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2379 (initialize_low_arch): Call init_registers_crisv32 rather than
2380 init_register_crisv32.
2381
533b0600
PA
23822013-09-05 Pedro Alves <palves@redhat.com>
2383
2384 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2385 to ...
2386 * hostio.h: ... this new file.
2387 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2388 win32-low.c: Include hostio.h.
2389
0ce3d3b5
PA
23902013-09-05 Pedro Alves <palves@redhat.com>
2391
2392 * server.h (gdb_client_data, handler_func, callback_handler_func)
2393 (delete_file_handler, add_file_handler, append_callback_event)
2394 (delete_callback_event, start_event_loop, initialize_event_loop):
2395 Move to event-loop.h and include it.
2396 * event-loop.h: New file.
2397
799cdc37
PA
23982013-09-05 Pedro Alves <palves@redhat.com>
2399
2400 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2401 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2402 (loaded_dll, unloaded_dll): Move to ...
2403 * dll.h: ... this new file.
2404 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2405
6a6bbd9d
PA
24062013-09-05 Pedro Alves <palves@redhat.com>
2407
2408 * server.h (current_process, get_thread_process, all_processes)
2409 (add_inferior_to_list, for_each_inferior, current_inferior)
2410 (remove_inferior, add_process, remove_process, find_process_pid)
2411 (have_started_inferiors_p, have_attached_inferiors_p)
2412 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2413 (clear_inferiors, find_inferior, find_inferior_id)
2414 (inferior_target_data, set_inferior_target_data)
2415 (inferior_regcache_data, set_inferior_regcache_data): Move to
2416 inferiors.h, and include it.
2417 * inferiors.h: New file.
2418
f699aaba
PA
24192013-09-05 Pedro Alves <palves@redhat.com>
2420
2421 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2422 Move ...
2423 * ax.h: ... here.
2424
c144c7a0
PA
24252013-09-05 Pedro Alves <palves@redhat.com>
2426
2427 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2428 tracepoint.h.
2429 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2430 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2431 (handle_tracepoint_general_set, handle_tracepoint_query)
2432 (tracepoint_finished_step, tracepoint_was_hit)
2433 (release_while_stepping_state_list, current_traceframe)
2434 (in_readonly_region, traceframe_read_mem)
2435 (fetch_traceframe_registers, traceframe_read_sdata)
2436 (traceframe_read_info, struct fast_tpoint_collect_status)
2437 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2438 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2439 (supply_fast_tracepoint_registers)
2440 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2441 (ipa_tdesc, claim_trampoline_space)
2442 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2443 (agent_mem_read, agent_get_trace_state_variable_value)
2444 (agent_set_trace_state_variable_value, agent_tsv_read)
2445 (agent_mem_read_string, get_raw_reg_func_addr)
2446 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2447 * tracepoint.h: ... this new file.
2448
ff42e6ab
PA
24492013-09-05 Pedro Alves <palves@redhat.com>
2450
2451 * server.h (perror_with_name, error, fatal, warning, paddress)
2452 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2453 include it.
2454 * utils.h: New file.
2455
541af0f4
PA
24562013-09-05 Pedro Alves <palves@redhat.com>
2457
2458 * server.h (remote_debug, noack_mode, transport_is_reliable)
2459 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2460 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2461 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2462 (write_enn, initialize_async_io, enable_async_io)
2463 (disable_async_io, check_remote_input_interrupt_request)
2464 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2465 (dead_thread_notify, prepare_resume_reply)
2466 (decode_address_to_semicolon, decode_address, decode_m_packet)
2467 (decode_M_packet, decode_X_packet, decode_xfer_write)
2468 (decode_search_memory_packet, unhexify, hexify)
2469 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2470 (look_up_one_symbol, relocate_instruction)
2471 (monitor_output): Move to remote-utils.h, and include it.
2472 * remote-utils.h: New file.
2473
eebdf26b
PA
24742013-09-05 Pedro Alves <palves@redhat.com>
2475
2476 * server.h (_): Delete.
2477
3aafd2ff
PA
24782013-09-02 Pedro Alves <palves@redhat.com>
2479
2480 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2481 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2482 allocated.
2483 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2484
cee83bcb
PM
24852013-09-02 Pierre Muller <muller@sourceware.org>
2486
2487 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2488 or WriteProcessMemory complete successfully and handle
2489 ERROR_PARTIAL_COPY error.
2490
9a13b2fa
PA
24912013-09-02 Pedro Alves <palves@redhat.com>
2492
2493 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2494 error instead of EIO.
2495
602e3198
JK
24962013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2497
2498 PR server/15604
2499 * linux-low.c: Include filestuff.h.
2500 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2501 * lynx-low.c: Include filestuff.h.
2502 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2503 * server.c: Include filestuff.h.
2504 (main): Call notice_open_fds.
2505 * spu-low.c: Include filestuff.h.
2506 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2507
96d7229d
LM
25082013-08-22 Luis Machado <lgustavo@codesourcery.com>
2509
2510 * Makefile.in: Explain why ../target and ../nat are not
2511 listed as include file search paths.
2512 (linux-waitpid.o): New object file rule.
2513 * configure.srv (srv_native_linux_obj): New variable.
2514 Replace all occurrences of linux native object files with
2515 $srv_native_linux_obj.
2516 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2517 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2518 (linux_enable_event_reporting): Remove declaration.
2519 (my_waitpid): Moved to common/linux-waitpid.c.
2520 (linux_wait_for_event): Pass ptid when calling
2521 linux_enable_event_reporting.
2522 (linux_supports_tracefork_flag): Remove.
2523 (linux_enable_event_reporting): Likewise.
2524 (linux_tracefork_grandchild): Remove.
2525 (STACK_SIZE): Moved to common/linux-ptrace.c.
2526 (linux_tracefork_child): Remove.
2527 (linux_test_for_tracefork): Remove.
2528 (linux_look_up_symbols): Call linux_supports_traceclone.
2529 (initialize_low): Remove call to linux_test_for_tracefork.
2530 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2531 common/linux-ptrace.h.
2532 (PTRACE_TYPE_ARG4): Likewise.
2533 Include linux-ptrace.h.
2534
32940073
PA
25352013-08-21 Pedro Alves <palves@redhat.com>
2536
2537 * config.in: Renegerate.
2538
33b60d58 25392013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2540
33b60d58
LM
2541 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2542 (SFILES): Remove $(srcdir)/common/target-common.c and
2543 add $(srcdir)/target/waitstatus.c.
2544 (OBS): Remove target-common.o and add waitstatus.o.
2545 (server_h): Remove $(srcdir)/../common/target-common.h and
2546 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2547 and $(srcdir)/../target/waitstatus.h.
2548 (target-common.o): Remove.
2549 (waitstatus.o): New target object file.
2550 * target.h: Do not include target-common.h and
2551 include target/resume.h, target/wait.h and
2552 target/waitstatus.h.
2553
b8e1b30e
LM
25542013-08-13 Luis Machado <lgustavo@codesourcery.com>
2555
2556 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2557 to PTRACE_TYPE_ARG3.
2558 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2559 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2560 PTRACE_TYPE_ARG4.
2561 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2562 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2563
7a60ad40
YQ
25642013-07-27 Jie Zhang <jie@codesourcery.com>
2565 Daniel Jacobowitz <dan@codesourcery.com>
2566 Yao Qi <yao@codesourcery.com>
2567
2568 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2569 (mips-linux-watch.o): New rule.
2570 (mips_linux_watch_h): New variable.
2571 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2572 srv_tgtobj.
2573 * linux-mips-low.c: Include mips-linux-watch.h.
2574 (struct arch_process_info, struct arch_lwp_info): New.
2575 (update_watch_registers_callback): New function.
2576 (mips_linux_new_process, mips_linux_new_thread) New functions.
2577 (mips_linux_prepare_to_resume, mips_insert_point): New
2578 functions.
2579 (mips_remove_point, mips_stopped_by_watchpoint): New
2580 functions.
2581 (rsp_bp_type_to_target_hw_bp_type): New function.
2582 (mips_stopped_data_address): New function.
2583 (the_low_target): Add watchpoint support functions.
2584
de6f69ad
YQ
25852013-07-27 Yao Qi <yao@codesourcery.com>
2586
2587 * i386-low.c: Include break-common.h.
2588 (enum target_hw_bp_type): Remove.
2589
3360c0bf
LM
25902013-07-24 Luis Machado <lgustavo@codesourcery.com>
2591
2592 * Makefile.in (SFILES): /common/target-common.c.
2593 (OBS): Add target-common.o.
2594 (server_h): Add $(srcdir)/../common/target-common.h.
2595 (target-common.o): New target.
2596 * server.c (queue_stop_reply_callback): Free
2597 status string after use.
2598 * target.c (target_waitstatus_to_string): Remove.
2599 * target.h: Include target-common.h.
2600 (resume_kind): Likewise.
2601 (target_waitkind): Likewise.
2602 (target_waitstatus): Likewise.
2603 (TARGET_WNOHANG): Likewise.
2604
bd885420
YQ
26052013-07-04 Yao Qi <yao@codesourcery.com>
2606
2607 * Makefile.in (host_alias): Use @host_noncanonical@.
2608 (target_alias): Use @target_noncanonical@.
2609 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2610 ACX_NONCANONICAL_HOST.
2611 * configure: Regenerated.
2612
2613 Revert:
2614 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2615
2616 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2617 * configure: Rebuild.
2618 * Makefile.in (version_host, version_target): Get from configure.
2619 (version.c): Use $(version_host) and $(version_target).
2620
17ef446e
PA
26212013-07-03 Pedro Alves <palves@redhat.com>
2622
2623 * Makefile.in (config.status): Depend on development.sh.
2624 * acinclude.m4: Include libmcheck.m4.
2625 * configure: Regenerate.
2626
7a9a7487
MG
26272013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2628
2629 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2630 attribute inside the parentheses.
2631 (winapi_DebugSetProcessKillOnExit): Ditto.
2632 (winapi_DebugBreakProcess): Ditto.
2633 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2634
49b64de6
MG
26352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2636
2637 * notif.h (notif_event): Add a dummy member to avoid compiler
2638 errors.
2639
d5749ee7
PA
26402013-07-01 Pedro Alves <palves@redhat.com>
2641
2642 * hostio.c (HOSTIO_PATH_MAX): Define.
2643 (require_filename, handle_open, handle_unlink, handle_readlink):
2644 Use it.
2645
d8d2a3ee
PA
26462013-07-01 Pedro Alves <palves@redhat.com>
2647
2648 * server.h: Include "pathmax.h".
2649 * linux-low.c: Don't include sys/param.h.
2650 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2651 MAXPATHLEN.
2652 * win32-low.c: Don't include sys/param.h.
2653 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2654
bc7dea8d
PA
26552013-07-01 Pedro Alves <palves@redhat.com>
2656
2657 * event-loop.c: Don't check HAVE_UNISTD_H before including
2658 <unistd.h>.
2659 * gdbreplay.c: Likewise.
2660 * remote-utils.c: Likewise.
2661 * server.c: Likewise.
2662 * configure.ac: Don't check for unistd.h.
2663 * configure: Regenerate.
2664
d6c2da54
TT
26652013-06-28 Tom Tromey <tromey@redhat.com>
2666
2667 * Makefile.in (version.c): Use version.in, not
2668 common/version.in.
2669
257b6bec
MG
26702013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2671
2672 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2673 * configure: Rebuild.
2674 * Makefile.in (version_host, version_target): Get from configure.
2675 (version.c): Use $(version_host) and $(version_target).
2676
86ebe149
DK
26772013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2678
2679 Fix trace-status to output user name without trailing colon.
2680 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2681
f30aa5af
DK
26822013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2683
2684 Fix trace-status to output proper start-time and stop-time.
2685 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2686 output start time and stop time in hex as gdb expects.
2687
28a93511
YQ
26882013-06-26 Pedro Alves <pedro@codesourcery.com>
2689
2690 * tracepoint.c (build_traceframe_info_xml): Output trace state
2691 variables present in the trace buffer.
2692
01208463
TT
26932013-06-24 Tom Tromey <tromey@redhat.com>
2694
2695 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2696 create-version.sh.
2697 (version.o): Remove.
2698 * gdbreplay.c: Include version.h.
2699 (version, host_name): Don't declare.
2700 * server.h: Include version.h.
2701 (version, host_name): Don't declare.
2702
760256f9
PA
27032013-06-12 Pedro Alves <palves@redhat.com>
2704
2705 * linux-x86-low.c (linux_is_elf64): Delete global.
2706 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2707 with local linux_pid_exe_is_elf_64_file use.
2708
030031ee
PA
27092013-06-11 Pedro Alves <palves@redhat.com>
2710
2711 * linux-low.c (regset_disabled, disable_regset): New functions.
2712 (regsets_fetch_inferior_registers)
2713 (regsets_store_inferior_registers): Use them.
2714 (initialize_regsets_info); Don't allocate the disabled_regsets
2715 array here.
2716 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2717 comment.
2718
5da6eb0a
PA
27192013-06-11 Pedro Alves <palves@redhat.com>
2720
2721 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2722 xmalloc.
2723
7e5aaa09
PA
27242013-06-11 Pedro Alves <palves@redhat.com>
2725
2726 * linux-x86-low.c (initialize_low_arch): Call
2727 init_registers_x32_avx_linux.
2728
d878444c
JK
27292013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2730
2731 Fix compatibility with Android Bionic.
2732 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2733 it is not empty.
2734
3aee8918
PA
27352013-06-07 Pedro Alves <palves@redhat.com>
2736
5f2b57b5 2737 PR server/14823
3aee8918
PA
2738 * Makefile.in (OBS): Add tdesc.o.
2739 (IPA_OBJS): Add tdesc-ipa.o.
2740 (tdesc-ipa.o): New rule.
2741 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2742 interface.
2743 * linux-low.c (new_inferior): Delete.
2744 (disabled_regsets, num_regsets): Delete.
2745 (linux_add_process): Adjust to set the new per-process
2746 new_inferior flag.
2747 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2748 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2749 was a stop. When calling arch_setup, switch the current inferior
2750 to the thread that got an event.
2751 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2752 (regsets_fetch_inferior_registers)
2753 (regsets_store_inferior_registers): New regsets_info parameter.
2754 Adjust to use it.
2755 (linux_register_in_regsets): New regs_info parameter. Adjust to
2756 use it.
2757 (register_addr, fetch_register, store_register): New usrregs_info
2758 parameter. Adjust to use it.
2759 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2760 parameter regs_info. Adjust to use it.
2761 (linux_fetch_registers): Get the current inferior's regs_info, and
2762 adjust to use it.
2763 (linux_store_registers): Ditto.
2764 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2765 (initialize_low): Don't initialize the target_regsets here. Call
2766 initialize_low_arch.
2767 * linux-low.h (target_regsets): Delete declaration.
2768 (struct regsets_info): New.
2769 (struct usrregs_info): New.
2770 (struct regs_info): New.
2771 (struct process_info_private) <new_inferior>: New field.
2772 (struct linux_target_ops): Delete the num_regs, regmap, and
2773 regset_bitmap fields. New field regs_info.
2774 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2775 * i387-fp.c (num_xmm_registers): Delete.
2776 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2777 calls to new interface.
2778 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2779 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2780 Infer the number of xmm registers from the regcache's target
2781 description.
2782 * i387-fp.h (num_xmm_registers): Delete.
2783 * inferiors.c (add_thread): Don't install the thread's regcache
2784 here.
2785 * proc-service.c (gregset_info): Fetch the current inferior's
2786 regs_info. Adjust to use it.
2787 * regcache.c: Include tdesc.h.
2788 (register_bytes, reg_defs, num_registers)
2789 (gdbserver_expedite_regs): Delete.
2790 (get_thread_regcache): If the thread doesn't have a regcache yet,
2791 create one, instead of aborting gdbserver.
2792 (regcache_invalidate_one): Rename to ...
2793 (regcache_invalidate_thread): ... this.
2794 (regcache_invalidate_one): New.
2795 (regcache_invalidate): Only invalidate registers of the current
2796 process.
2797 (init_register_cache): Add target_desc parameter, and use it.
2798 (new_register_cache): Ditto. Assert the target description has a
2799 non zero registers_size.
2800 (regcache_cpy): Add assertions. Adjust.
2801 (realloc_register_cache, set_register_cache): Delete.
2802 (registers_to_string, registers_from_string): Adjust.
2803 (find_register_by_name, find_regno, find_register_by_number)
2804 (register_cache_size): Add target_desc parameter, and use it.
2805 (free_register_cache_thread, free_register_cache_thread_one)
2806 (regcache_release, register_cache_size): New.
2807 (register_size): Add target_desc parameter, and use it.
2808 (register_data, supply_register, supply_register_zeroed)
2809 (supply_regblock, supply_register_by_name, collect_register)
2810 (collect_register_as_string, collect_register_by_name): Adjust.
2811 * regcache.h (struct target_desc): Forward declare.
2812 (struct regcache) <tdesc>: New field.
2813 (init_register_cache, new_register_cache): Add target_desc
2814 parameter.
2815 (regcache_invalidate_thread): Declare.
2816 (regcache_invalidate_one): Delete declaration.
2817 (regcache_release): Declare.
2818 (find_register_by_number, register_cache_size, register_size)
2819 (find_regno): Add target_desc parameter.
2820 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2821 declarations.
2822 * remote-utils.c: Include tdesc.h.
2823 (outreg, prepare_resume_reply): Adjust.
2824 * server.c: Include tdesc.h.
2825 (gdbserver_xmltarget): Delete declaration.
2826 (get_features_xml, process_serial_event): Adjust.
2827 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2828 declare.
2829 (struct process_info) <tdesc>: New field.
2830 (ipa_tdesc): Declare.
2831 * tdesc.c: New file.
2832 * tdesc.h: New file.
2833 * tracepoint.c: Include tdesc.h.
2834 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2835 (get_context_regcache): Adjust to pass ipa_tdesc down.
2836 (do_action_at_tracepoint): Adjust to get the register cache size
2837 from the context regcache's description.
2838 (traceframe_walk_blocks): Adjust to get the register cache size
2839 from the current trace frame's description.
2840 (traceframe_get_pc): Adjust to get current trace frame's
2841 description and pass it down.
2842 (gdb_collect): Adjust to get the register cache size from the
2843 IPA's description.
2844 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2845 (gdbserver_xmltarget): Delete.
2846 (initialize_low_tracepoint): Set the ipa's target description.
2847 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2848 (initialize_low_tracepoint): Set the ipa's target description.
2849 * linux-x86-low.c: Include tdesc.h.
2850 [__x86_64__] (is_64bit_tdesc): New.
2851 (ps_get_thread_area, x86_get_thread_area): Use it.
2852 (i386_cannot_store_register): Rename to ...
2853 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2854 (i386_cannot_fetch_register): Rename to ...
2855 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2856 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2857 to new interface.
2858 (target_regsets): Rename to ...
2859 (x86_regsets): ... this.
2860 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2861 interface.
2862 (x86_siginfo_fixup): Use is_64bit_tdesc.
2863 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2864 (tdesc_x32_avx_linux, tdesc_x32_linux)
2865 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2866 Declare.
2867 (x86_linux_update_xmltarget): Delete.
2868 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2869 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2870 (AMD64_LINUX_USER64_CS): New.
2871 (x86_linux_read_description): New, based on
2872 x86_linux_update_xmltarget.
2873 (same_process_callback): New.
2874 (x86_arch_setup_process_callback): New.
2875 (x86_linux_update_xmltarget): New.
2876 (x86_regsets_info): New.
2877 (amd64_linux_regs_info): New.
2878 (i386_linux_usrregs_info): New.
2879 (i386_linux_regs_info): New.
2880 (x86_linux_regs_info): New.
2881 (x86_arch_setup): Reimplement.
2882 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2883 (x86_emit_ops): Ditto.
2884 (the_low_target): Adjust. Install x86_linux_regs_info,
2885 x86_cannot_fetch_register, and x86_cannot_store_register.
2886 (initialize_low_arch): New.
2887 * linux-ia64-low.c (tdesc_ia64): Declare.
2888 (ia64_fetch_register): Adjust.
2889 (ia64_usrregs_info, regs_info): New globals.
2890 (ia64_regs_info): New function.
2891 (the_low_target): Adjust.
2892 (initialize_low_arch): New function.
2893 * linux-sparc-low.c (tdesc_sparc64): Declare.
2894 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2895 Adjust.
2896 (sparc_arch_setup): New function.
2897 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2898 (the_low_target): Adjust.
2899 (initialize_low_arch): New function.
2900 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2901 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2902 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2903 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2904 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2905 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2906 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2907 (tdesc_powerpc_isa205_vsx64l): Declare.
2908 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2909 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2910 (ppc_set_pc, ppc_get_hwcap): Adjust.
2911 (ppc_usrregs_info): Forward declare.
2912 (!__powerpc64__) ppc_regmap_adjusted: New global.
2913 (ppc_arch_setup): Adjust to the current process'es target
2914 description.
2915 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2916 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2917 (ppc_store_evrregset): Adjust.
2918 (target_regsets): Rename to ...
2919 (ppc_regsets): ... this, and make static.
2920 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2921 (ppc_regs_info): New function.
2922 (the_low_target): Adjust.
2923 (initialize_low_arch): New function.
2924 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2925 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2926 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2927 (tdesc_s390x_linux64v2): Declare.
2928 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2929 (s390_fill_gregset, s390_store_last_break): Adjust.
2930 (target_regsets): Rename to ...
2931 (s390_regsets): ... this, and make static.
2932 (s390_get_pc, s390_set_pc): Adjust.
2933 (s390_get_hwcap): New target_desc parameter, and use it.
2934 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2935 (s390_arch_setup): Adjust to set the current process'es target
2936 description. Don't adjust the regmap.
2937 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2938 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2939 (regs_info_3264): New globals.
2940 (s390_regs_info): New function.
2941 (the_low_target): Adjust.
2942 (initialize_low_arch): New function.
2943 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2944 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2945 [__mips64] (init_registers_mips_linux)
2946 (init_registers_mips_dsp_linux): Delete defines.
2947 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2948 (have_dsp): New global.
2949 (mips_read_description): New, based on mips_arch_setup.
2950 (mips_arch_setup): Reimplement.
2951 (get_usrregs_info): New function.
2952 (mips_cannot_fetch_register, mips_cannot_store_register)
2953 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2954 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2955 (target_regsets): Rename to ...
2956 (mips_regsets): ... this, and make static.
2957 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2958 (dsp_regs_info, regs_info): New globals.
2959 (mips_regs_info): New function.
2960 (the_low_target): Adjust.
2961 (initialize_low_arch): New function.
2962 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2963 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2964 Declare.
2965 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2966 (arm_read_description): New, with bits factored from
2967 arm_arch_setup.
2968 (arm_arch_setup): Reimplement.
2969 (target_regsets): Rename to ...
2970 (arm_regsets): ... this, and make static.
2971 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2972 (arm_regs_info): New function.
2973 (the_low_target): Adjust.
2974 (initialize_low_arch): New function.
2975 * linux-m68k-low.c (tdesc_m68k): Declare.
2976 (target_regsets): Rename to ...
2977 (m68k_regsets): ... this, and make static.
2978 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2979 (m68k_regs_info): New function.
2980 (m68k_arch_setup): New function.
2981 (the_low_target): Adjust.
2982 (initialize_low_arch): New function.
2983 * linux-sh-low.c (tdesc_sharch): Declare.
2984 (target_regsets): Rename to ...
2985 (sh_regsets): ... this, and make static.
2986 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2987 (sh_regs_info, sh_arch_setup): New functions.
2988 (the_low_target): Adjust.
2989 (initialize_low_arch): New function.
2990 * linux-bfin-low.c (tdesc_bfin): Declare.
2991 (bfin_arch_setup): New function.
2992 (bfin_usrregs_info, regs_info): New globals.
2993 (bfin_regs_info): New function.
2994 (the_low_target): Adjust.
2995 (initialize_low_arch): New function.
2996 * linux-cris-low.c (tdesc_cris): Declare.
2997 (cris_arch_setup): New function.
2998 (cris_usrregs_info, regs_info): New globals.
2999 (cris_regs_info): New function.
3000 (the_low_target): Adjust.
3001 (initialize_low_arch): New function.
3002 * linux-cris-low.c (tdesc_crisv32): Declare.
3003 (cris_arch_setup): New function.
3004 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3005 (cris_regs_info): New function.
3006 (the_low_target): Adjust.
3007 (initialize_low_arch): New function.
3008 * linux-m32r-low.c (tdesc_m32r): Declare.
3009 (m32r_arch_setup): New function.
3010 (m32r_usrregs_info, regs_info): New globals.
3011 (m32r_regs_info): Adjust.
3012 (initialize_low_arch): New function.
3013 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3014 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3015 (tic6x_usrregs_info): Forward declare.
3016 (tic6x_read_description): New function, based on ...
3017 (tic6x_arch_setup): ... this. Reimplement.
3018 (target_regsets): Rename to ...
3019 (tic6x_regsets): ... this, and make static.
3020 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3021 (tic6x_regs_info): New function.
3022 (the_low_target): Adjust.
3023 (initialize_low_arch): New function.
3024 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3025 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3026 (target_regsets): Rename to ...
3027 (xtensa_regsets): ... this, and make static.
3028 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3029 globals.
3030 (xtensa_arch_setup, xtensa_regs_info): New functions.
3031 (the_low_target): Adjust.
3032 (initialize_low_arch): New function.
3033 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3034 (nios2_arch_setup): Set the current process'es tdesc.
3035 (target_regsets): Rename to ...
3036 (nios2_regsets): ... this.
3037 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3038 (nios2_regs_info): New function.
3039 (the_low_target): Adjust.
3040 (initialize_low_arch): New function.
a261b8f5
PA
3041 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3042 (aarch64_arch_setup): Set the current process'es tdesc.
3043 (target_regsets): Rename to ...
3044 (aarch64_regsets): ... this.
3045 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3046 (aarch64_regs_info): New function.
3047 (the_low_target): Adjust.
3048 (initialize_low_arch): New function.
3aee8918
PA
3049 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3050 globals.
3051 (target_regsets): Rename to ...
3052 (tile_regsets): ... this.
3053 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3054 (tile_regs_info): New function.
3055 (tile_arch_setup): Set the current process'es tdesc.
3056 (the_low_target): Adjust.
3057 (initialize_low_arch): New function.
3058 * spu-low.c (tdesc_spu): Declare.
3059 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3060 * win32-arm-low.c (tdesc_arm): Declare.
3061 (arm_arch_setup): New function.
3062 (the_low_target): Install arm_arch_setup instead of
3063 init_registers_arm.
3064 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3065 (init_windows_x86): Rename to ...
3066 (i386_arch_setup): ... this. Set `win32_tdesc'.
3067 (the_low_target): Adjust.
3068 * win32-low.c (win32_tdesc): New global.
3069 (child_add_thread): Don't create the thread cache here.
3070 (do_initial_child_stuff): Set the new process'es tdesc.
3071 * win32-low.h (struct target_desc): Forward declare.
3072 (win32_tdesc): Declare.
3073 * lynx-i386-low.c (tdesc_i386): Declare global.
3074 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3075 * lynx-low.c (lynx_tdesc): New global.
3076 (lynx_add_process): Set the new process'es tdesc.
3077 * lynx-low.h (struct target_desc): Forward declare.
3078 (lynx_tdesc): Declare global.
3079 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3080 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3081 * nto-low.c (nto_tdesc): New global.
3082 (do_attach): Set the new process'es tdesc.
3083 * nto-low.h (struct target_desc): Forward declare.
3084 (nto_tdesc): Declare.
3085 * nto-x86-low.c (tdesc_i386): Declare.
3086 (nto_x86_arch_setup): Set `nto_tdesc'.
3087
b1fbec62
GB
30882013-06-04 Gary Benson <gbenson@redhat.com>
3089
3090 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3091 to qSupported response when appropriate.
3092 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3093 with nonzero-length annex.
3094 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3095 arguments supplied in annex.
3096
d1ec4ce7
DE
30972013-05-31 Doug Evans <dje@google.com>
3098
ac44adcb 3099 PR server/15594
d1ec4ce7
DE
3100 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3101 64 bits in 64-cross-32 environment.
3102
9b25f2d3
PA
31032013-05-28 Pedro Alves <palves@redhat.com>
3104
3105 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3106 (aarch64-without-fpu.c): Delete rule.
3107 * configure.srv (aarch64*-*-linux*): Remove references to
3108 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3109 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3110 declaration.
3111
6740dc9c
PA
31122013-05-24 Pedro Alves <palves@redhat.com>
3113
3114 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3115 instead of strchr/decode_address. Error if the range isn't split
3116 with a ','. Don't assume there's be a ':' in the action.
3117
c2d6af84
PA
31182013-05-23 Yao Qi <yao@codesourcery.com>
3119 Pedro Alves <palves@redhat.com>
3120
3121 * linux-low.c (lwp_in_step_range): New function.
3122 (linux_wait_1): If the thread was range stepping and stopped
3123 outside the stepping range, report the stop to GDB. Otherwise,
3124 continue stepping. Add range stepping debug output.
3125 (linux_set_resume_request): Copy the step range from the resume
3126 request to the lwp.
3127 (linux_supports_range_stepping): New.
3128 (linux_target_ops) <supports_range_stepping>: Set to
3129 linux_supports_range_stepping.
3130 * linux-low.h (struct linux_target_ops)
3131 <supports_range_stepping>: New field.
3132 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3133 * linux-x86-low.c (x86_supports_range_stepping): New.
3134 (the_low_target) <supports_range_stepping>: Set to
3135 x86_supports_range_stepping.
3136 * server.c (handle_v_cont): Handle 'r' action.
3137 (handle_v_requests): Append ";r" if the target supports range
3138 stepping.
3139 * target.h (struct thread_resume) <step_range_start,
3140 step_range_end>: New fields.
3141 (struct target_ops) <supports_range_stepping>:
3142 New field.
3143 (target_supports_range_stepping): New macro.
3144
58794e1a
JB
31452013-05-17 Joel Brobecker <brobecker@adacore.com>
3146
3147 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3148 confusion in comment.
3149
d631c5a7
JB
31502013-05-17 Joel Brobecker <brobecker@adacore.com>
3151
3152 * lynx-low.c (struct process_info_private): New type.
3153 (lynx_add_process): New function.
3154 (lynx_create_inferior, lynx_attach): Replace calls to
3155 add_process by calls to lynx_add_process.
3156 (lynx_resume): If PTID is null, then try using
3157 current_process()->private->last_wait_event_ptid.
3158 Add comments.
3159 (lynx_clear_inferiors): Delete. The contents of that function
3160 has been inlined in lynx_mourn;
3161 (lynx_wait_1): Save the ptid in the process's private data.
3162 (lynx_mourn): Free the process' private data. Replace call
3163 to lynx_clear_inferiors by call to clear_inferiors.
3164
96f7a20f
YQ
31652013-05-17 Yao Qi <yao@codesourcery.com>
3166
3167 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3168 the right place.
3169
db0dfaa0
LM
31702013-05-16 Luis Machado <lgustavo@codesourcery.com>
3171
3172 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3173 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3174 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3175 PT_TEXT_END_ADDR guards. Update comments.
3176 (linux_target_op) <read_offsets>: Conditionally define to
3177 linux_read_offsets if the target is UCLIBC and if it defines
3178 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3179
68f5f838
SL
31802013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3181 Andrew Jenner <andrew@codesourcery.com>
3182
3183 * Makefile.in (SFILES): Add linux-nios2-low.c.
3184 (clean): Add action to delete nios2-linux.c.
3185 (nios2-linux.c): New rule.
3186 * configure.srv: Add nios2*-*-linux*.
3187 * linux-nios2-low.c: New.
3188
1ebff1fd
HAQ
31892013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3190
3191 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3192
f6150862
HZ
31932013-04-25 Hui Zhu <hui@codesourcery.com>
3194
3195 PR gdb/15186
f6150862
HZ
3196 * ax.c (ax_printf): Add fflush.
3197
614c279d
TT
31982013-04-22 Tom Tromey <tromey@redhat.com>
3199
3200 * Makefile.in (SFILES): Add filestuff.c.
3201 (OBS): Add filestuff.o.
3202 (filestuff.o): New target.
3203 * config.in, configure: Rebuild.
3204 * configure.ac: Check for fdwalk, pipe2.
3205
7d4e5717
PA
32062013-04-17 Pedro Alves <palves@redhat.com>
3207
3208 * configure.ac (USE_THREAD_DB): Delete variable.
3209 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3210 Don't AC_SUBST USE_THREAD_DB.
3211 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3212 * config.in, configure: Regenerate.
3213
d5c93e41
PA
32142013-04-16 Pedro Alves <palves@redhat.com>
3215
3216 * linux-low.h (struct lwp_info) <thread_known>: Move under
3217 the USE_THREAD_DB #ifdef.
3218
04f5fe89
PA
32192013-04-16 Pedro Alves <palves@redhat.com>
3220
3221 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3222 (linux-low.o): Delete rule.
3223 * linux-low.h: Always include "gdb_thread_db.h" instead of
3224 conditionally including thread_db.h.
3225 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3226 HAVE_THREAD_DB_H.
3227
480b27bf
JK
32282013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3229
3230 * Makefile.in (install-only): Fix make install regression.
3231
43662968
JK
32322013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3233
3234 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3235 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3236 installation.
3237 * gdbserver.1: Remove.
3238
3e74e146
PA
32392013-03-22 Pedro Alves <palves@redhat.com>
3240
3241 * linux-low.c (handle_extended_wait): Don't call
3242 linux_enable_event_reporting.
3243
a8347a2a
TT
32442013-03-15 Tony Theodore <tonyt@logyst.com>
3245
3246 PR build/9098:
3247 * Makefile.in (SHELL): Use @SHELL@.
3248
eeb56fa7
SDJ
32492013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3250
3251 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3252 compiler warning.
3253
4fa7e2ff
JB
32542013-03-13 Joel Brobecker <brobecker@adacore.com>
3255
3256 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3257 Remove extraneous NULL element.
3258
8ddb1965
YQ
32592013-03-13 Yao Qi <yao@codesourcery.com>
3260
3261 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3262 'V' block in trace frame.
3263
9accd112
MM
32642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3265
3266 * target.h (struct target_ops): Add btrace ops.
3267 (target_supports_btrace): New macro.
3268 (target_enable_btrace): New macro.
3269 (target_disable_btrace): New macro.
3270 (target_read_btrace): New macro.
3271 * gdbthread.h (struct thread_info): Add btrace field.
3272 * server.c: Include btrace-common.h.
3273 (handle_btrace_general_set): New function.
3274 (handle_btrace_enable): New function.
3275 (handle_btrace_disable): New function.
3276 (handle_general_set): Call handle_btrace_general_set.
3277 (handle_qxfer_btrace): New function.
3278 (struct qxfer qxfer_packets[]): Add btrace entry.
3279 * inferiors.c (remove_thread): Disable btrace.
3280 * linux-low: Include linux-btrace.h.
3281 (linux_low_enable_btrace): New function.
3282 (linux_low_read_btrace): New function.
3283 (linux_target_ops): Add btrace ops.
3284 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3285 Add srv_linux_btrace=yes.
3286 (x86_64-*-linux*): Add linux-btrace.o.
3287 Add srv_linux_btrace=yes.
3288 * configure.ac: Define HAVE_LINUX_BTRACE.
3289 * config.in: Regenerated.
3290 * configure: Regenerated.
3291
5cc22e4c
MM
32922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3293
3294 * server.c (handle_qxfer): Preserve error message if -3 is
3295 returned.
3296 (qxfer): Document the -3 return value.
3297
7c97f91e
MM
32982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3299
3300 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3301 (linux_btrace_h): New variable.
3302 (linux-btrace.o): New rule.
3303
be9a119c 33042013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3305 Hafiz Abid Qadeer <abidh@codesourcery.com>
3306
3307 * tracepoint.c (trace_buffer_size): New global.
3308 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3309 (init_trace_buffer): Change to one-argument function. Allocate
3310 trace buffer memory.
3311 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3312 handle QTBuffer:size packet.
3313 (cmd_bigqtbuffer_size): New function.
3314 (initialize_tracepoint): Call init_trace_buffer with
3315 DEFAULT_TRACE_BUFFER_SIZE.
3316 * server.c (handle_query): Add QTBuffer:size in the
3317 supported packets.
3318
e64f7499
YQ
33192013-03-07 Yao Qi <yao@codesourcery.com>
3320
3321 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3322 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3323 of -1.
3324 (cmd_qtsp): Adjust condition. Do post increment.
3325 Set cur_action and cur_step_action back to 0.
3326
f0ae6fc3
PA
33272013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3328
3329 PR server/15236
3330 * linux-low.c (linux_write_memory): Return early success if LEN is
3331 zero.
3332
b5b0b0af
CV
33332013-03-05 Corinna Vinschen <vinschen@redhat.de>
3334
334ad4a8 3335 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3336
589bc927
TT
33372013-02-28 Tom Tromey <tromey@redhat.com>
3338
3339 * configure.ac: Invoke AC_SYS_LARGEFILE.
3340 * configure, config.in: Rebuild.
3341
dfe07582
CV
33422013-02-28 Corinna Vinschen <vinschen@redhat.com>
3343
3344 * win32-low.c: Throughout, fix format strings and casts of
3345 printf-like functions to avoid type related warnings on all
3346 platforms.
3347 (get_child_debug_event): Print dwDebugEventCode as hex since
3348 that's how it's usually documented.
3349
736cd585
YQ
33502013-02-28 Yao Qi <yao@codesourcery.com>
3351
3352 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3353 pulongest.
3354
e1f58301
JW
33552013-02-27 Jiong Wang <jiwang@tilera.com>
3356
3357 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3358 (reg-tilegx32.c): New rule.
3359 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3360 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3361 different register info initializer according to elf class.
3362 (init_registers_tilgx32): New function. The tilegx32 register info
3363 initializer.
3364 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3365 (tile_store_gregset): Likewise.
3366
d171ca78
YQ
33672013-02-27 Yao Qi <yao@codesourcery.com>
3368
3369 * server.c (process_point_options): Print debug message when
3370 debug_threads is true.
3371
282bbdf3
YQ
33722013-02-26 Yao Qi <yao@codesourcery.com>
3373
3374 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3375
aca22551
PA
33762013-02-19 Pedro Alves <palves@redhat.com>
3377 Kai Tietz <ktietz@redhat.com>
3378
3379 PR gdb/15161
3380
3381 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3382 instead of strtoul to extract address from packet.
3383 (process_serial_event) <'z'>: Likewise.
3384
4f3cee1c
YQ
33852013-02-18 Yao Qi <yao@codesourcery.com>
3386
3387 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3388
8e1d55a3
PA
33892013-02-14 Pedro Alves <palves@redhat.com>
3390
3391 Plug memory leak.
3392
3393 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3394 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3395
458820da
PA
33962013-02-14 Pedro Alves <palves@redhat.com>
3397
3398 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3399
baea0dae
PA
34002013-02-14 Pedro Alves <palves@redhat.com>
3401
3402 * tracepoint.c (save_string): Delete.
3403 (add_tracepoint_action): Use savestring instead of save_string.
3404
0b1afbb3
PA
34052013-02-12 Pedro Alves <palves@redhat.com>
3406
3407 * linux-xtensa-low.c: Ditto.
3408 * xtensa-xtregs.c: Ditto.
3409
8a4ac37e
PA
34102013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3411
3412 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3413 thread_db.
3414
148de6bb
MS
34152013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3416
3417 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3418 aarch64_num_wp_regs and aarch64_num_bp_regs to
3419 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3420
55fac6e0
MS
34212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3422
3423 * linux-aarch64-low.c (ps_get_thread_area): Replace
3424 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3425
176eb98c
MS
34262013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3427 Marcus Shawcroft <marcus.shawcroft@arm.com>
3428 Nigel Stephens <nigel.stephens@arm.com>
3429 Yufeng Zhang <yufeng.zhang@arm.com>
3430
3431 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3432 (aarch64.c, aarch64-without-fpu.c): New targets.
3433 * configure.srv (aarch64*-*-linux*): New.
3434 * linux-aarch64-low.c: New file.
3435
56f7af9c
MS
34362013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3437
43aaf8b6 3438 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3439 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3440 (dequeue_one_deferred_signal, linux_resume_one_thread)
3441 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3442 (linux_tracefork_grandchild, linux_test_for_tracefork)
3443 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3444 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3445 where the argument is 0.
3446
60f662b0
YQ
34472013-01-25 Yao Qi <yao@codesourcery.com>
3448
3449 * event-loop.c: Include "queue.h".
3450 (gdb_event_p): New typedef.
3451 (struct gdb_event) <next_event>: Remove.
3452 (event_queue): Change to QUEUE(gdb_event_p).
3453 (async_queue_event): Remove.
3454 (gdb_event_xfree): New.
3455 (initialize_event_loop): New.
3456 (process_event): Use API from QUEUE.
3457 (wait_for_event): Likewise.
3458 * server.c (main): Call initialize_event_loop.
3459 * server.h (initialize_event_loop): Declare.
3460
5ae4861a
YQ
34612013-01-18 Yao Qi <yao@codesourcery.com>
3462
3463 * ax.h (struct eval_agent_expr_context): New.
3464 (gdb_eval_agent_expr): Update declaration.
3465 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3466 TFRAME. Add new argument CTX.
3467 * server.h (struct eval_agent_expr_context): Declare.
3468 (agent_mem_read, agent_tsv_read): Update declaration.
3469 (agent_mem_read_string): Likewise.
3470 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3471 (add_traceframe_block): Add new argument TPOINT.
3472 Increase TPOINT->traceframe_usage.
3473 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3474 eval_tracepoint_agent_expr.
3475 (condition_true_at_tracepoint): Likewise.
3476 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3477 (agent_mem_read_string, agent_tsv_read): Likewise.
3478
85e00e85
YQ
34792013-01-16 Yao Qi <yao@codesourcery.com>
3480
3481 * linux-low.c (linux_resume_one_lwp): Don't check
3482 'lwp->bp_reinsert != 0'.
3483
4039cf45
JB
34842013-01-07 Joel Brobecker <brobecker@adacore.com>
3485 Pedro Alves <palves@redhat.com>
3486
3487 * lynx-low.c (ptrace_request_to_str): Define a temporary
3488 macro and use it to simplify this function's implementation.
3489
9044dee2
JB
34902013-01-07 Joel Brobecker <brobecker@adacore.com>
3491
3492 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3493 sets errno.
3494
e6352c8f
JB
34952013-01-07 Joel Brobecker <brobecker@adacore.com>
3496
3497 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3498
50681a27
JB
34992013-01-07 Joel Brobecker <brobecker@adacore.com>
3500
3501 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3502
3f6e77ef
JB
35032013-01-07 Joel Brobecker <brobecker@adacore.com>
3504
3505 * lynx-low.c (lynx_resume): Use the resume_info parameter
3506 to determine the ptid for the lynx_ptrace call, unless
3507 it is equal to minus_one_ptid, in which case we use the
3508 ptid of the current_inferior.
3509 (lynx_wait_1): After having received a thread create/exit
3510 event, resume the inferior's execution using the signaling
3511 thread's ptid, rather than the old ptid.
3512
7fda33ae
JB
35132013-01-07 Joel Brobecker <brobecker@adacore.com>
3514
3515 * lynx-low.c (lynx_resume): Delete variable ret.
3516
b9786c74
JB
35172013-01-01 Joel Brobecker <brobecker@adacore.com>
3518
3519 * gdbreplay.c (gdbreplay_version): Update copyright year.
3520 * server.c (gdbserver_version): Likewise.
3521
8b93d60f
JB
35222012-12-17 Joel Brobecker <brobecker@adacore.com>
3523
3524 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3525 new thread.
3526
037335a7
JB
35272012-12-17 Joel Brobecker <brobecker@adacore.com>
3528
3529 * lynx-low.c (ptrace_request_to_str): Add handling for
3530 PTRACE_GETTRACESIG.
3531
52d4cbd8
JB
35322012-12-17 Joel Brobecker <brobecker@adacore.com>
3533
3534 * lynx-low.c (lynx_attach): Delete variable new_process.
3535
ab8f6ca9
JB
35362012-12-17 Joel Brobecker <brobecker@adacore.com>
3537
3538 * lynx-low.c (lynx_create_inferior): Delete variable
3539 new_process.
3540
78cbc024
JB
35412012-12-17 Joel Brobecker <brobecker@adacore.com>
3542
3543 * lynx-low.c (ptrace_request_to_str): Do not handle
3544 PTRACE_GETTHREADLIST if this macro does not exist.
3545
14a00470
YQ
35462012-12-15 Yao Qi <yao@codesourcery.com>
3547
3548 * Makefile.in (OBS): Add notif.o.
3549 * notif.c, notif.h: New.
3550 * server.c: Include "notif.h".
3551 (struct vstop_notif) <next>: Remove.
3552 <base>: New field.
3553 (queue_stop_reply): Update.
3554 (push_event, send_next_stop_reply): Remove.
3555 (discard_queued_stop_replies): Update.
3556 (notif_stop): New variable.
3557 (handle_v_stopped): Remove.
3558 (handle_v_requests): Don't call handle_v_stopped. Call
3559 handle_ack_notif instead.
3560 (queue_stop_reply_callback): Call notif_event_enque instead
3561 of queue_stop_reply.
3562 (handle_status): Don't call send_next_stop_reply, call
3563 notif_write_event instead.
3564 (kill_inferior_callback): Likewise.
3565 (detach_or_kill_inferior_callback): Likewise.
3566 (main): Call initialize_notif.
3567 (process_serial_event): Call QUEUE_is_empty.
3568 (handle_target_event): Call notif_push instead of push event.
3569 * server.h (push_event): Remove declaration.
3570
61c125b9
TT
35712012-12-10 Tom Tromey <tromey@redhat.com>
3572
3573 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3574 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3575 macros.
3576 (.c.o): Rewrite.
3577 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3578 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3579 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3580 (amd64-linux-ipa.o, ax.o): Rewrite.
3581 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3582 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3583 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3584 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3585 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3586 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3587 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3588 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3589 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3590 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3591 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3592 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3593 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3594 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3595 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3596 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3597 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3598 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3599 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3600 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3601 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3602 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3603 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3604 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3605 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3606 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3607 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3608 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3609 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3610 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3611 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3612 (reg-tilegx.o): Remove.
3613 (all_object_files): New macro.
3614 Include .deps files.
3615 * aclocal.m4, configure: Rebuild.
3616 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3617 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3618 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3619
e90e9ad9
TT
36202012-12-05 Tom Tromey <tromey@redhat.com>
3621
3622 PR gdb/14917:
3623 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3624
02d403bf 36252012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3626
3627 * configure.ac: Check for linux/perf_event.h.
3628 * config.in: Regenerated.
3629 * configure: Regenerated.
3630
0270a750
PA
36312012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3632
3633 * hostio.c (handle_readlink): Decrease buffer size
3634 parameter passed to readlink by one byte.
3635
8c29b58e
YQ
36362012-11-26 Yao Qi <yao@codesourcery.com>
3637
3638 * configure.ac (build_warnings): Append '-Wempty-body'.
3639 * configure: Regenerated.
3640 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3641 body.
3642
8bdce1ff
PM
36432012-11-15 Pierre Muller <muller@sourceware.org>
3644
3645 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3646 * config.in: Regenerate.
3647 * configure: Regenerate.
3648 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3649 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3650 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3651 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3652 header.
3653 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3654 instead of <sys/wait.h> header.
3655 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3656
02d403bf 36572012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3658
3659 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3660 (various make rules): Remove -DGDBSERVER
3661
fbd5db48
YQ
36622012-11-09 Yao Qi <yao@codesourcery.com>
3663
3664 * spu-low.c (current_ptid): Move it to ..
3665 * gdbthread.h: ... here. New.
3666 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3667 * server.c (myresume, process_serial_event): Likewise.
3668 * thread-db.c (thread_db_find_new_threads): Likewise.
3669 * tracepoint.c (run_inferior_command): Likewise.
3670
b3dc46ff
AB
36712012-10-01 Andrew Burgess <aburgess@broadcom.com>
3672
3673 * server.c (handle_search_memory_1): Include access length in
3674 warning message.
3675
07c04788
HPN
36762012-09-05 Michael Brandt <michael.brandt@axis.com>
3677
3678 * linux-crisv32-low.c: Fix compile errors.
3679
918d227b
YQ
36802012-09-04 Yao Qi <yao@codesourcery.com>
3681
3682 * tracepoint.c (cmd_qtsv): Adjust debug message.
3683 Don't check CUR_TPOINT.
3684
18c1b81a
YQ
36852012-08-28 Yao Qi <yao@codesourcery.com>
3686
3687 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3688 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3689 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3690 Remove declarations of xmalloc, xreallloc, xstrdup and
3691 freeargv.
3692 * Makefile.in (libiberty_h): New.
3693 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3694 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3695
dc82f37b
YQ
36962012-08-23 Yao Qi <yao@codesourcery.com>
3697
3698 * server.h: Remove declaration of 'xsnprintf'.
3699
406b1477
KS
37002012-08-22 Keith Seitz <keiths@redhat.com>
3701
3702 * server.h: Include build-gnulib-gbserver/config.h.
3703 * gdbreplay.c: Likewise.
3704
e6712ff1
DE
37052012-08-08 Doug Evans <dje@google.com>
3706
3707 * Makefile.in (SFILES): Add gdb_vecs.c.
3708 (OBS): Add gdb_vecs.o.
3709 (gdb_vecs_h, host_defs_h): New variables.
3710 (thread-db.o): Add $(gdb_vecs_h) dependency.
3711 (gdb_vecs.o): New rule.
3712 * thread-db.c: #include "gdb_vecs.h".
3713 (thread_db_load_search): Use a vector to iterate over path elements.
3714 Handle text appearing after "$pdir".
3715
3716 * configure.ac: Add check for strstr.
3717 * config.in: Regenerate.
3718 * configure: Regenerate.
3719
7c3270ae
UW
37202012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3721
3722 * hostio.c (handle_pread): If pread fails, fall back to attempting
3723 lseek/read.
3724 (handle_pwrite): Likewise for pwrite.
3725
b62e2b27
UW
37262012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3727
3728 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3729 between unsupported TYPE and unimplementable ADDR/LEN combination.
3730 (arm_insert_point): Act on new return value.
3731
78a99e91
PA
37322012-07-31 Pedro Alves <palves@redhat.com>
3733
3734 * server.c (process_point_options): Only skip tokens if we find
3735 one that is unrecognized. Don't treat 'X' specially while
3736 skipping unrecognized tokens.
3737
fcf303ab
UW
37382012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3739
3740 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3741 to 4-byte-align HW breakpoint addresses for Thumb.
3742
7255706c
YQ
37432012-07-27 Yao Qi <yao@codesourcery.com>
3744
3745 PR remote/14161.
3746
3747 * server.h: Declare gdb_agent_about_to_close.
3748 * target.c (kill_inferior): Include "agent.h".
3749 New. Send command 'kill'.
3750 * target.h (kill_inferior): Removed macro.
3751 * tracepoint.c (gdb_agent_about_to_close): New.
3752 (gdb_agent_helper_thread): Handle command 'close'.
3753 Wait endlessly until the inferior stops.
3754 Install gdb_agent_remove_socket to atexit hook.
3755 (agent_socket_name): New static variable.
3756 (gdb_agent_socket_init): Replace local variable 'name' with
3757 'agent_socket_name'.
3758 (gdb_agent_remove_socket): New.
3759
5a3f286f
YQ
37602012-07-27 Yao Qi <yao@codesourcery.com>
3761
3762 * server.c (process_point_options): Stop at 'X' when parsing.
3763
961bd387
ME
37642012-07-19 Michael Eager <eager@eagercon.com>
3765
a261b8f5 3766 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3767 to hw_execute.
3768 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3769 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3770 hardware breakpoint.
3771
aa7c7447
JK
37722012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3773
3774 * gdbserver/linux-low.c (initialize_low): Call
3775 linux_ptrace_init_warnings.
3776
7f216e7c
DE
37772012-07-02 Doug Evans <dje@google.com>
3778
3779 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3780 pointer to int.
3781
d3ce09f5
SS
37822012-07-02 Stan Shebs <stan@codesourcery.com>
3783
3784 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3785 (ax.o): Add it to build rule.
3786 (ax-ipa.o): Ditto.
3787 (OBS): Add format.o.
3788 (IPA_OBS): Add format.o.
3789 * server.c (handle_query): Claim support for breakpoint commands.
3790 (process_point_options): Add command case.
3791 (process_serial_event): Leave running if there are printfs in
3792 effect.
3793 * mem-break.h (any_persistent_commands): Declare.
3794 (add_breakpoint_commands): Declare.
3795 (gdb_no_commands_at_breakpoint): Declare.
3796 (run_breakpoint_commands): Declare.
3797 * mem-break.c (struct point_command_list): New struct.
3798 (struct breakpoint): New field command_list.
3799 (any_persistent_commands): New function.
3800 (add_commands_to_breakpoint): New function.
3801 (add_breakpoint_commands): New function.
3802 (gdb_no_commands_at_breakpoint): New function.
3803 (run_breakpoint_commands): New function.
3804 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3805 locally.
3806 * ax.c: Include format.h.
3807 (ax_printf): New function.
3808 (gdb_eval_agent_expr): Add printf opcode.
3809
2f8f6aed
YQ
38102012-06-13 Yao Qi <yao@codesourcery.com>
3811
3812 * server.c (start_inferior): Remove duplicated writes to fields
3813 'last_resume_kind' and 'last_status' of 'current_inferior'.
3814
0c9070b3
YQ
38152012-06-12 Yao Qi <yao@codesourcery.com>
3816 Pedro Alves <palves@redhat.com>
3817
3818 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3819 comment.
3820 * server.c (handle_v_cont): Extend comment.
3821
c52daf70
YQ
38222012-06-11 Yao Qi <yao@codesourcery.com>
3823
3824 * linux-low.c (linux_attach): Add 'static'.
3825
d38bbb0a
YQ
38262012-06-06 Yao Qi <yao@codesourcery.com>
3827
3828 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3829
89dc0afd
JK
38302012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3831
3832 Fix gcc -flto compilation warning.
3833 * server.c (main): Make variable multi_mode and attach volatile.
3834
75f62ce7
TJB
38352012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3836
3837 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3838 if the platform doesn't know about it.
3839
65f479b6
PA
38402012-05-30 Jeff Kenton <jkenton@tilera.com>
3841
3842 * Makefile.in (SFILES): Add linux-tile-low.c.
3843 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3844 * configure.srv: Handle tilegx-*-linux*.
3845 * linux-tile-low.c: New file.
3846
0c5bf5a9
JK
38472012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3848
3849 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3850
a493e3e2
PA
38512012-05-24 Pedro Alves <palves@redhat.com>
3852
3853 PR gdb/7205
3854
43aaf8b6 3855 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3856
2ea28649
PA
38572012-05-24 Pedro Alves <palves@redhat.com>
3858
3859 PR gdb/7205
3860
3861 Replace target_signal with gdb_signal throughout.
3862
8d409d16
MR
38632012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3864
3865 * linux-low.c (linux_store_registers): Avoid the copying sequence
3866 when no data has been retrieved by ptrace.
3867
23512c01
MGD
38682012-05-22 Will Deacon <will.deacon@arm.com>
3869
3870 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3871 Include asm/ptrace.h.
3872 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3873 already defined.
3874
4934b29e
MR
38752012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3876
3877 * linux-low.c (linux_store_registers): Don't re-retrieve data
3878 with ptrace that has already been obtained from /proc. Always
3879 copy any data retrieved with ptrace to the buffer supplied.
3880
bde24c0a
PA
38812012-05-11 Yao Qi <yao@codesourcery.com>
3882 Pedro Alves <palves@redhat.com>
3883
3884 * linux-low.c (enum stopping_threads_kind): New.
3885 (stopping_threads): Change type to `enum stopping_threads_kind'.
3886 (handle_extended_wait): If stopping and suspending threads, leave
3887 the new_lwp suspended too.
3888 (linux_wait_for_event): Adjust.
3889 (stop_all_lwps): Set `stopping_threads' to
3890 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3891 whether we're suspending threads or just stopping them. Assert no
3892 recursion happens.
3893
623b6bdf
YQ
38942012-04-29 Yao Qi <yao@codesourcery.com>
3895
3896 * server.h: Move some code to ...
3897 * gdbthread.h: ... here. New.
3898 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3899 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3900 (nto-low.o, win32-low.o): Likewise.
3901 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3902 * regcache.c, remote-utils.c, server.c: Likewise.
3903 * target.c, tracepoint.c, win32-low.c: Likewise.
3904
f15f9948
TJB
39052012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3906
3907 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3908 (PTRACE_ARG4_TYPE): Likewise.
3909 (PTRACE_XFER_TYPE): Likewise.
3910 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3911 ptrace to PTRACE_ARG3_TYPE.
3912 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3913 (PTRACE_ARG4_TYPE): Likewise.
3914 (PTRACE_XFER_TYPE): Likewise.
3915 (linux_detach_one_lwp): Cast fourth argument of
3916 ptrace to long then PTRACE_ARG4_TYPE.
3917 (regsets_fetch_inferior_registers): Cast third argument of
3918 ptrace to long then PTRACE_ARG3_TYPE.
3919 (regsets_store_inferior_registers): Likewise.
3920
38ea300a
PA
39212012-04-20 Pedro Alves <palves@redhat.com>
3922
3923 * configure: Regenerate.
3924
c971b7fa
PA
39252012-04-19 Pedro Alves <palves@redhat.com>
3926
43aaf8b6 3927 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3928 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3929 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3930 (all, install-only, uninstall, clean-info, all-lib, clean): No
3931 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3932 (maintainer-clean realclean distclean): Use subdir_do.
3933 (subdir_do): New.
3934 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3935 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3936 * acinclude.m4: Include acx_configure_dir.m4.
3937 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3938 calls. Call AC_PROG_RANLIB. Configure gnulib using
3939 ACX_CONFIGURE_DIR.
3940 (GNULIB): New.
3941 (GNULIB_STDINT_H): Adjust.
3942 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3943 * gdbreplay.c: Include build-gnulib/config.h.
3944 * server.h: Likewise.
3945 * aclocal.m4: Regenerate.
3946 * config.in: Regenerate.
3947 * configure: Regenerate.
c971b7fa 3948
809277f8
PA
39492012-04-19 Pedro Alves <palves@redhat.com>
3950
3951 * Makefile.in (LIBGNU, INCGNU): Adjust.
3952 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3953 (all, install-only, uninstall, clean-info, all-lib, clean)
3954 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3955 * configure.ac: Adjust AC_OUTPUT output.
3956 * aclocal.m4: Regenerate.
3957 * configure: Regenerate.
3958
fd9bb8b8
PA
39592012-04-19 Pedro Alves <palves@redhat.com>
3960
3961 * Makefile.in (generated_files): New.
3962 (server_h): Remove the explicit dependency on config.h, and depend
3963 on $generated_files.
3964
1c298c66
PA
39652012-04-19 Pedro Alves <palves@redhat.com>
3966
3967 * Makefile.in (INCGNU): Add -Ignulib.
3968
57c4b50b
PA
39692012-04-19 Pedro Alves <palves@redhat.com>
3970
3971 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3972 (INCGNU): ... this, and spell out -I here.
3973 (GNULIB_LIB): Rename to ...
3974 (LIBGNU): ... this.
3975 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3976
1030e047
PA
39772012-04-19 Pedro Alves <palves@redhat.com>
3978
3979 * config.in: Regenerate.
3980
447d4319
PA
39812012-04-19 Pedro Alves <palves@redhat.com>
3982
3983 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3984 * server.h (memmem): Remove declaration.
3985 * config.in: Regenerate.
3986 * configure: Regenerate.
3987
aad9eab9
YQ
39882012-04-19 Yao Qi <yao@codesourcery.com>
3989
3990 * Makefile.in (SFILES): Add common/vec.c.
3991 (OBS): Add vec.o.
3992 (vec.o): New rule.
3993
3e10640f
YQ
39942012-04-19 Yao Qi <yao@codesourcery.com>
3995
3996 * remote-utils.c (prepare_resume_reply): Replace with macro
3997 target_core_of_thread.
3998 * server.c (handle_qxfer_threads_proper): Likewise.
3999 * target.h (traget_core_of_thread): New macro.
4000
71622373
PA
40012012-04-18 Pedro Alves <palves@redhat.com>
4002
4003 * aclocal.m4: Regenerate.
4004 * configure: Regenerate.
4005
80d26939
YQ
40062012-04-16 Yao Qi <yao@codesourcery.com>
4007
4008 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4009 duplicated on address.
4010
42476b70
YQ
40112012-04-16 Yao Qi <yao@codesourcery.com>
4012
4013 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4014 (struct tracepoint_action_ops) <send>: New field.
4015 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4016 (agent_expr_send, x_tracepoint_action_send): New.
4017 (l_tracepoint_action_send): New.
4018 (cmd_qtdp): Download and install tracepoint
4019 according to `use_agent'.
4020 (run_inferior_command): Add one more parameter `len'.
4021 Update callers.
4022 (tracepoint_send_agent): New.
4023 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4024
7bc83639
YQ
40252012-04-16 Yao Qi <yao@codesourcery.com>
4026
4027 * tracepoint.c (download_tracepoints): Moved to ...
4028 (cmd_qtstart): ... here.
4029
5f18041e
YQ
40302012-04-14 Yao Qi <yao@codesourcery.com>
4031
4032 * tracepoint.c: Include inttypes.h.
4033 (struct collect_memory_action): Use sized types.
4034 (struct tracepoint): Likewise.
4035 (cmd_qtdp, stop_tracing): Update print specifiers.
4036 (cmd_qtp, response_tracepoint): Likewise.
4037 (collect_data_at_tracepoint): Likewise.
4038 (collect_data_at_step): Likewise.
4039
55a8c076
YQ
40402012-04-14 Yao Qi <yao@codesourcery.com>
4041
4042 Import gnulib module inttypes.
4043 * aclocal.m4, config.in, configure: Regenerated.
4044
dc750257
YQ
40452012-04-14 Yao Qi <yao@codesourcery.com>
4046
4047 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4048 Makefile and config.status at last.
4049
0ab5faf9
YQ
40502012-04-13 Yao Qi <yao@codesourcery.com>
4051
4052 * tracepoint.c: Include stdint.h unconditionally.
4053
18f5fd81
TJB
40542012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4055
4056 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4057 on BFD_HAVE_SYS_PROCFS_TYPE.
4058 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4059 * configure: Regenerate.
4060 * config.in: Likewise.
4061
4d47af5c
L
40622012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4063
4064 * Makefile.in (clean): Also remove x32.c x32-linux.c
4065 x32-avx.c x32-avx-linux.c.
4066 (x32.o): New target.
4067 (x32.c): Likewise.
4068 (x32-linux.o): Likewise.
4069 (x32-linux.c): Likewise.
4070 (x32-avx.o): Likewise.
4071 (x32-avx.c): Likewise.
4072 (x32-avx-linux.o): Likewise.
4073 (x32-avx-linux.c): Likewise.
4074
4075 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4076 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4077 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4078 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4079 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4080 i386/x32-avx-linux.xml.
4081
4082 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4083 (init_registers_x32_avx_linux): Likwise.
4084 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4085 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4086
ecedbe58
PA
40872012-04-13 Pedro Alves <palves@redhat.com>
4088
4089 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4090 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4091 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4092 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4093 the sub-make.
4094
c92b5177
L
40952012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4096
4097 * linux-x86-low.c (compat_x32_clock_t): New.
4098 (compat_x32_siginfo_t): Likewise.
4099 (compat_x32_siginfo_from_siginfo): Likewise.
4100 (siginfo_from_compat_x32_siginfo): Likewise.
4101 (linux_is_elf64): Likewise.
4102 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4103 and siginfo_from_compat_x32_siginfo for x32.
4104 (x86_arch_setup): Set linux_is_elf64.
4105
214d508e
L
41062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4107
4108 PR gdb/13969
4109 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4110 e_machine field.
4111 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4112 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4113 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4114 compatible with process.
4115
c9a1864a
YQ
41162012-04-12 Yao Qi <yao@codesourcery.com>
4117
4118 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4119 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4120 (install-only, install-info, clean): Handle sub dir gnulib.
4121 (all-lib, am--refresh): New targets.
4122 (memmem.o): Remove target.
4123 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4124 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4125 (AC_REPLACE_FUNCS): Remove memmem.
4126 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4127 (AC_OUTPUT): Generate Makefile in gnulib/.
4128 * aclocal.m4, config.in, configure: Regenerated.
4129
367ba2c2
MR
41302012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4131
4132 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4133
9d236627
PA
41342012-04-05 Pedro Alves <palves@redhat.com>
4135
4136 -Werror=strict-aliasing
4137
4138 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4139 pointer.
4140
111217b3
PA
41412012-04-04 Pedro Alves <palves@redhat.com>
4142
4143 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4144 (sparc_store_gregset_from_stack, sparc_store_gregset)
4145 (sparc_breakpoint_at): Fix formatting.
4146
8365dcf5
TJB
41472012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4148
4149 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4150 are available.
4151 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4152 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4153 * config.in: Regenerate.
4154 * configure: Likewise.
4155
689cc2ae
PA
41562012-03-29 Pedro Alves <palves@redhat.com>
4157
4158 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4159 Correct ptrace arguments.
4160
c14dfd32
PA
41612012-03-28 Pedro Alves <palves@redhat.com>
4162
4163 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4164 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4165 (IA64_FR1_REGNUM): New defines.
4166 (ia64_fetch_register): New.
4167 (the_low_target): Install it.
4168 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4169 field.
4170 * linux-low.c (linux_fetch_registers): Try the
4171 the_low_target.fetch_register hook first.
4172
4173 * linux-arm-low.c (the_low_target): Adjust.
4174 * linux-bfin-low.c (the_low_target): Adjust.
4175 * linux-cris-low.c (the_low_target): Adjust.
4176 * linux-crisv32-low.c (the_low_target): Adjust.
4177 * linux-m32r-low.c (the_low_target): Adjust.
4178 * linux-m68k-low.c (the_low_target): Adjust.
4179 * linux-mips-low.c (the_low_target): Adjust.
4180 * linux-ppc-low.c (the_low_target): Adjust.
4181 * linux-s390-low.c (the_low_target): Adjust.
4182 * linux-sh-low.c (the_low_target): Adjust.
4183 * linux-sparc-low.c (the_low_target): Adjust.
4184 * linux-tic6x-low.c (the_low_target): Adjust.
4185 * linux-x86-low.c (the_low_target): Adjust.
4186 * linux-xtensa-low.c (the_low_target): Adjust.
4187
63c88e13
PA
41882012-03-26 Pedro Alves <palves@redhat.com>
4189
4190 * server.c (handle_qxfer_libraries): Don't bail early if
4191 the_target->qxfer_libraries_svr4 is not NULL.
4192
fb723180
PA
41932012-03-26 Pedro Alves <palves@redhat.com>
4194
4195 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4196
0afae3cf
PA
41972012-03-23 Pedro Alves <palves@redhat.com>
4198
4199 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4200 "library-list-svr4" element's start tag when the the DSO list is
4201 empty.
4202
485f1ee4
PA
42032012-03-23 Pedro Alves <palves@redhat.com>
4204
4205 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4206 a variable whose type size is the same as the inferior's pointer
4207 size.
4208
a5362b9a
TS
42092012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4210
4211 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4212 struct siginfo.
4213 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4214 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4215 * linux-low.h: Include <signal.h>.
4216 (struct siginfo): Remove forward declaration.
4217 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4218 struct siginfo.
4219
d226c142
MF
42202012-03-21 Mike Frysinger <vapier@gentoo.org>
4221
4222 * .gitignore: Ignore more files.
4223
122f36ef
PA
42242012-03-19 Pedro Alves <palves@redhat.com>
4225 Jan Kratochvil <jan.kratochvil@redhat.com>
4226
4227 * server.c (cont_thread, general_thread): Add describing comments.
4228 (start_inferior): Clear `cont_thread'.
4229 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4230 of a process.
4231
fc3e5175
YQ
42322012-03-15 Yao Qi <yao@codesourcery.com>
4233
4234 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4235 handling to ...
4236 (cmd_qtdp): ... here.
4237
8d0d92cd
YQ
42382012-03-15 Yao Qi <yao@codesourcery.com>
4239
4240 * tracepoint.c (struct tracepoint_action_ops): New.
4241 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4242 (m_tracepoint_action_download): New.
4243 (r_tracepoint_action_download): New.
4244 (x_tracepoint_action_download): New.
4245 (l_tracepoint_action_download): New.
4246 (add_tracepoint_action): Install `action->ops' according type.
4247 (download_tracepoint_1): Move code `download' function pointer
4248 of various tracepoint_action_ops.
4249
87b0bb13
JK
42502012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4251
4252 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4253 linux_ptrace_attach_warnings.
4254
5f572dec
JK
42552012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4256
4257 * Makefile.in (linux-ptrace.o): New.
4258 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4259 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4260 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4261 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4262 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4263 of these targets.
4264 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4265
f4647387
YQ
42662012-03-08 Yao Qi <yao@codesourcery.com>
4267 Pedro Alves <palves@redhat.com>
4268
4269 Fix PR server/13392.
4270 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4271 offset of JMP insn.
4272 * tracepoint.c (remove_tracepoint): New.
4273 (cmd_qtdp): Call remove_tracepoint when failed to install.
4274
9b224c5e
PA
42752012-03-07 Pedro Alves <palves@redhat.com>
4276
4277 * linux-low.c (get_detach_signal): New.
4278 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4279 Pass on pending signals to PTRACE_DETACH. Check the result of the
4280 ptrace call.
4281 * server.c (program_signals, program_signals_p): New.
4282 (handle_general_set): Handle QProgramSignals.
4283 * server.h (program_signals, program_signals_p): Declare.
4284
e237a7e2
JK
42852012-03-05 Pedro Alves <palves@redhat.com>
4286 Jan Kratochvil <jan.kratochvil@redhat.com>
4287
4288 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4289 New comment why.
4290
5808517f
YQ
42912012-03-03 Yao Qi <yao@codesourcery.com>
4292
4293 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4294 agent_look_up_symbols.
4295
58b4daa5
YQ
42962012-03-03 Yao Qi <yao@codesourcery.com>
4297
4298 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4299 (linux-x86-low.o): Likewise.
4300 * server.h: Remove in_process_agent_loaded.
4301 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4302 common/agent.c.
4303 Update callers.
4304
8ffcbaaf
YQ
43052012-03-03 Yao Qi <yao@codesourcery.com>
4306
4307 * tracepoint.c (gdb_agent_capability): New global.
4308 (in_process_agent_loaded_ust): Renamed to
4309 `in_process_agent_supports_ust'.
4310 Update callers.
4311 (in_process_agent_supports_ust): Call agent_capability_check.
4312 (clear_installed_tracepoints): Assert that agent supports
4313 agent.
4314
d1feda86
YQ
43152012-03-03 Yao Qi <yao@codesourcery.com>
4316
4317 * linux-low.c (linux_supports_agent): New.
4318 (linux_target_ops): Initialize field `supports_agent' with
4319 linux_supports_agent.
4320 * target.h (struct target_ops) <supports_agent>: New.
4321 (target_supports_agent): New macro.
4322 * server.c (handle_general_set): Handle packet 'QAgent'.
4323 (handle_query): Send `QAgent+'.
4324 * Makefile.in (server.o): Depends on agent.h.
4325
2fa291ac
YQ
43262012-03-03 Yao Qi <yao@codesourcery.com>
4327
4328 * Makefile.in (OBS): Add agent.o.
4329 Add new rule for agent.o.
4330 Track dependence of tracepoint.c on agent.h.
4331 * tracepoint.c (run_inferior_command_1):
4332 (run_inferior_command): Call agent_run_command.
4333 (gdb_ust_connect_sync_socket): Deleted. Move it to
4334 common/agent.c.
4335 (resume_thread, stop_thread): Likewise.
4336 (gdb_ust_socket_init): Renamed to ...
4337 (gdb_agent_socket_init): ... New.
4338 (gdb_ust_thread): Renamed to ...
4339 (gdb_agent_helper_thread): ... New.
4340 (gdb_ust_init): Move some code to ...
4341 (gdb_agent_init): ... here. New.
4342 [HAVE_UST]: Call gdb_ust_init.
4343 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4344 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4345 * config.in, configure: Regenerated.
4346
05044653
PA
43472012-03-02 Pedro Alves <palves@redhat.com>
4348
4349 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4350 * linux-low.c (struct simple_pid_list): New.
4351 (stopped_pids): New a struct simple_pid_list pointer.
4352 (add_to_pid_list, pull_pid_from_list): New.
4353 (handle_extended_wait): Don't assume the first signal new children
4354 report is SIGSTOP. Adjust call to pull_pid_from_list.
4355 (linux_wait_for_lwp): Adjust.
4356
8d00225b
YQ
43572012-03-02 Yao Qi <yao@codesourcery.com>
4358
4359 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4360 debug log.
4361
19560ba5
YQ
43622012-03-02 Yao Qi <yao@codesourcery.com>
4363
4364 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4365 `stop_pc' and `tpoint'. Update caller.
4366
1faeff08
MR
43672012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4368
4369 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4370 * linux-low.c (use_linux_regsets): New macro.
4371 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4372 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4373 (linux_register_in_regsets): New function.
4374 (usr_fetch_inferior_registers): Skip registers covered by
4375 regsets.
4376 (usr_store_inferior_registers): Likewise.
4377 (usr_fetch_inferior_registers): New macro.
4378 (usr_store_inferior_registers): Likewise.
4379 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4380 (linux_store_registers): Likewise.
4381 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4382 prototype.
4383 (init_registers_mips64_dsp_linux): Likewise.
4384 (init_registers_mips_linux): New macro.
4385 (init_registers_mips_dsp_linux): Likewise.
4386 (mips_dsp_num_regs): Likewise.
4387 (DSP_BASE, DSP_CONTROL): New fallback macros.
4388 (mips_base_regs): New macro.
4389 (mips_regmap): Use it. Fix the size.
4390 (mips_dsp_regmap): New variable.
4391 (mips_dsp_regset_bitmap): Likewise.
4392 (mips_arch_setup): New function.
4393 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4394 than mips_regmap.
4395 (mips_cannot_store_register): Likewise.
4396 (the_low_target): Update .arch_setup, .num_regs and .regmap
4397 initializers. Add .regset_bitmap initializer.
4398 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4399 initializer.
4400 * linux-bfin-low.c (the_low_target): Likewise.
4401 * linux-cris-low.c (the_low_target): Likewise.
4402 * linux-crisv32-low.c (the_low_target): Likewise.
4403 * linux-ia64-low.c (the_low_target): Likewise.
4404 * linux-m32r-low.c (the_low_target): Likewise.
4405 * linux-m68k-low.c (the_low_target): Likewise.
4406 * linux-ppc-low.c (the_low_target): Likewise.
4407 * linux-s390-low.c (the_low_target): Likewise.
4408 * linux-sh-low.c (the_low_target): Likewise.
4409 * linux-sparc-low.c (the_low_target): Likewise.
4410 * linux-tic6x-low.c (the_low_target): Likewise.
4411 * linux-x86-low.c (the_low_target): Likewise.
4412 * linux-xtensa-low.c (the_low_target): Likewise.
4413 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4414 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4415 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4416 srv_xmlfiles.
4417 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4418 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4419
c03e6ccc
YQ
44202012-02-29 Yao Qi <yao@codesourcery.com>
4421 Pedro Alves <palves@redhat.com>
4422
4423 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4424 `step_over_finished' is true.
4425
644cebc9
PA
44262012-02-27 Pedro Alves <palves@redhat.com>
4427
4428 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4429 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4430
c14d7ab2
PA
44312012-02-27 Pedro Alves <palves@redhat.com>
4432
4433 PR server/9684
4434 * linux-low.c (pid_is_stopped): New.
4435 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4436
412c89dd
LM
44372012-02-25 Luis Machado <lgustavo@codesourcery.com>
4438
4439 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4440 of conditions.
4441
b745defe
MR
44422012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4443
4444 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4445
9f3a5c85
LM
44462012-02-24 Luis Machado <lgustavo@codesourcery>
4447
4448 * server.c (handle_query): Advertise support for target-side
4449 breakpoint condition evaluation.
4450 (process_point_options): New function.
4451 (process_serial_event): When inserting a breakpoint, check for
4452 a target-side condition that should be evaluated.
4453
4454 * mem-break.c: Include regcache.h and ax.h.
4455 (point_cond_list_t): New data structure.
4456 (breakpoint) <cond_list>: New field.
4457 (find_gdb_breakpoint_at): Make non-static.
4458 (delete_gdb_breakpoint_at): Clear any target-side
4459 conditions.
4460 (clear_gdb_breakpoint_conditions): New function.
4461 (add_condition_to_breakpoint): Likewise.
4462 (add_breakpoint_condition): Likewise.
4463 (gdb_condition_true_at_breakpoint): Likewise.
4464 (gdb_breakpoint_here): Return result directly instead
4465 of going through a local variable.
4466
4467 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4468 (clear_gdb_breakpoint_conditions): Likewise.
4469 (add_breakpoint_condition): Likewise.
4470 (gdb_condition_true_at_breakpoint): Likewise.
4471
4472 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4473 (need_step_over_p): Take target-side breakpoint condition into
4474 consideration.
4475
5e1dc496
LM
44762012-02-24 Luis Machado <lgustavo@codesourcery>
4477
4478 * server.h: Include tracepoint.h.
4479 (agent_mem_read, agent_get_trace_state_variable_value,
4480 agent_set_trace_state_variable_value,
4481 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4482 get_set_tsv_func_addr): New prototypes.
4483
4484 * ax.h: New include file.
4485 * ax.c: New source file.
4486
4487 * tracepoint.c: Include ax.h.
4488 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4489 agent_expr, eval_result_type): Move to ax.h.
4490 (parse_agent_expr): Rename to ...
4491 (gdb_parse_agent_expr): ... this, make it non-static and move
4492 to ax.h.
4493 (unparse_agent_expr) Rename to ...
4494 (gdb_unparse_agent_expr): ... this, make it non-static and move
4495 to ax.h.
4496 (eval_agent_expr): Rename to ...
4497 (eval_tracepoint_agent_expr): ... this.
4498 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4499 forward declarations.
4500 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4501 (agent_get_trace_state_variable_value): New function.
4502 (agent_set_trace_state_variable_value): New function.
4503 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4504 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4505 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4506 (condition_true_at_tracepoint): Likewise.
4507 (parse_agent_expr): Rename to ...
4508 (gdb_parse_agent_expr): ... this and move to ax.c.
4509 (unparse_agent_expr): Rename to ...
4510 (gdb_unparse_agent_expr): ... this and move to ax.c.
4511 (gdb_agent_op_name): Move to ax.c.
4512 (eval_agent_expr): Rename to ...
4513 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4514 and move to ax.c.
4515 (eval_tracepoint_agent_expr): New function.
4516 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4517 non-static.
5e1dc496
LM
4518 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4519 ax.c.
4520 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4521 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4522 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4523 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4524 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4525 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4526 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4527 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4528 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4529 (compile_bytecodes): Remove forward declaration.
4530 (is_goto_target): Move to ax.c.
4531 (compile_bytecodes): Move to ax.c and call
4532 agent_get_trace_state_variable_value (...) and
4533 agent_set_trace_state_variable_value (...).
4534
4535 * Makefile.in: Update ax.c and IPA dependencies.
4536
277e4e52
PA
45372012-02-24 Pedro Alves <palves@redhat.com>
4538
4539 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4540 (cmd_bigqtbuffer_circular): ... this. Only handle
4541 'QTBuffer:circular:'.
4542 (handle_tracepoint_general_set): Adjust.
4543
bf4c19f7
YQ
45442012-02-16 Yao Qi <yao@codesourcery.com>
4545
4546 * inferiors.c: Move code to ...
4547 * dll.c: .... here. New.
4548 * server.h: Declare clear_dlls.
4549 * Makefile.in (SFILES): Add dll.c.
4550 (OBS): Add dll.o
4551 (dll.o): New rule.
4552
d73f2619
YQ
45532012-02-11 Yao Qi <yao@codesourcery.com>
4554
4555 * server.c: (handle_monitor_command): Add a new parameter
4556 `own_buf'.
4557 (handle_query): Update caller.
4558
f8255c2a
JB
45592012-02-09 Joel Brobecker <brobecker@adacore.com>
4560
4561 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4562 * configure, config.in: Regenerate.
4563 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4564 is not defined.
4565
da84f473
PA
45662012-02-02 Pedro Alves <palves@redhat.com>
4567
4568 Try SIGKILL first, then PTRACE_KILL.
4569 * linux-low.c (linux_kill_one_lwp): New.
4570 (linux_kill_one_lwp): Rename to ...
4571 (kill_one_lwp_callback): ... this. Use the new
4572 linux_kill_one_lwp.
4573
e886a173
PA
45742012-02-02 Pedro Alves <palves@redhat.com>
4575
4576 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4577 inferior.
4578
be07f1a2
PA
45792012-01-27 Pedro Alves <palves@redhat.com>
4580
4581 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4582 (elf_64_file_p): Make static.
4583 (linux_pid_exe_is_elf_64_file): New.
4584 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4585 Delete declarations.
4586 (linux_pid_exe_is_elf_64_file): Declare.
4587 * linux-x86-low.c (x86_arch_setup): Use
4588 linux_pid_exe_is_elf_64_file.
4589
d8301ad1
JK
45902012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4591
4592 * linux-low.c (linux_wait_for_event_1): Rename to ...
4593 (linux_wait_for_event): ... here and merge it with former
4594 linux_wait_for_event - new variable wait_ptid, use it.
4595 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4596
01b17894
PA
45972012-01-23 Pedro Alves <palves@redhat.com>
4598
4599 * server.c (main): Avoid yet another case of infinite loop while
4600 detaching/killing after a longjmp.
4601
e825046f
JK
46022012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4603
4604 Code cleanup.
4605 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4606
b9e7b9c3
UW
46072012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4608
4609 * hostio.c (handle_readlink): New function.
4610 (handle_vFile): Call it to handle "vFile:readlink" packets.
4611
901f9912
UW
46122012-01-20 Pedro Alves <palves@redhat.com>
4613 Ulrich Weigand <ulrich.weigand@linaro.org>
4614
4615 * server.c (handle_v_requests): Only support vAttach and vRun to
4616 start multiple processes when in extended protocol mode.
4617
fc1ab1a0
PA
46182012-01-17 Pedro Alves <palves@redhat.com>
4619
4620 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4621 memalign plus mprotect to allocate the scratch buffer.
4622
7d5d4e98
PA
46232012-01-13 Pedro Alves <palves@redhat.com>
4624
4625 * server.c (attach_inferior): Clear `cont_thread'.
4626
f128d5e9
PA
46272012-01-13 Pedro Alves <palves@redhat.com>
4628
4629 * server.c (main): Avoid infinite loop while detaching/killing
4630 after a longjmp.
4631
06db92f0
DE
46322012-01-09 Doug Evans <dje@google.com>
4633
4634 * server.c (start_inferior): Set last_ptid in --wrapper case.
4635
32d92999
YQ
46362012-01-06 Yao Qi <yao@codesourcery.com>
4637
4638 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4639 defined.
4640 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4641
5e0a92a9
YQ
46422012-01-04 Yao Qi <yao@codesourcery.com>
4643
4644 * tracepoint.c (cmd_qtdp): Print debug message
4645 for static tracepoint.
4646
ae639e8c
YQ
46472012-01-04 Yao Qi <yao@codesourcery.com>
4648
4649 * tracepoint.c (trace_vdebug): Differentiate debug message
4650 between gdbserver and IPA.
4651
f72429c5
YQ
46522012-01-03 Yao Qi <yao@codesourcery.com>
4653
4654 * tracepoint.c (tracepoint_was_hit): Don't collect for
4655 static tracepoint.
4656
12c3e59c
JB
46572012-01-02 Joel Brobecker <brobecker@adacore.com>
4658
4659 * terminal.h: Reformat copyright header.
4660
67827812
JB
46612012-01-02 Joel Brobecker <brobecker@adacore.com>
4662
4663 * server.c (gdbserver_version): Update copyright year.
4664 * gdbreplay.c (gdbreplay_version): Likewise.
4665
3e52c33d
JK
46662011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4667
4668 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4669
4670 Revert:
4671 2011-12-18 Hui Zhu <teawater@gmail.com>
4672 * linux-low.c (linux_create_inferior): Save return value to ret.
4673
66f1260e
HZ
46742011-12-18 Hui Zhu <teawater@gmail.com>
4675
4676 * linux-low.c (linux_create_inferior): Save return value to ret.
4677
e77616d7
DE
46782011-12-16 Doug Evans <dje@google.com>
4679
e7b06c57
DE
4680 * linux-low.c (linux_create_inferior): If stdio connection,
4681 redirect stdin from /dev/null, stdout to stderr.
4682 * remote-utils.c (remote_is_stdio): New static global.
4683 (remote_connection_is_stdio): New function.
4684 (remote_prepare): Handle stdio connection.
4685 (remote_open): Ditto.
4686 (remote_close): Don't close stdin for stdio connections.
4687 (read_prim,write_prim): New functions. Replace all calls to
4688 read/write to these.
4689 * server.c (main): Watch for "-" argument. Move call to
4690 remote_prepare before start_inferior.
4691 * server.h (STDIO_CONNECTION_NAME): New macro.
4692 (remote_connection_is_stdio): Declare.
4693
e77616d7
DE
4694 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4695 in debugging output.
4696
82067193
YQ
46972011-12-15 Yao Qi <yao@codesourcery.com>
4698
4699 * tracepoint.c: Include sys/syscall.h.
4700 (gdb_ust_thread): Remove preprocessor conditional.
4701
82bfbe7e
PA
47022011-12-14 Pedro Alves <pedro@codesourcery.com>
4703
4704 * linux-low.c (linux_detach_one_lwp): Call
4705 the_low_target.prepare_to_resume before detaching.
4706
712c6575
YQ
47072011-12-14 Yao Qi <yao@codesourcery.com>
4708
4709 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4710 of write.
4711
d54d1edf
YQ
47122011-12-14 Yao Qi <yao@codesourcery.com>
4713
4714 * i386-low.c (i386_low_stopped_data_address): Initialize local
4715 variable `control'.
4716
6210a125
PA
47172011-12-13 Pedro Alves <pedro@codesourcery.com>
4718
4719 PR remote/13492
4720
4721 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4722 DR_CONTROL unless necessary. Extend comments.
4723 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4724 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4725
2ece8244
YQ
47262011-12-13 Yao Qi <yao@codesourcery.com>
4727
4728 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4729 macros.
4730 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4731
784867a5
JK
47322011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4733
4734 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4735 Print new debug message for such case.
4736
6bf36717
JK
47372011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4738
4739 Fix overlapping memcpy.
4740 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4741 the read_inferior_memory transfer.
4742 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4743 write_inferior_memory transfer.
4744 (set_fast_tracepoint_jump): New variable buf. Use it for the
4745 read_inferior_memory and write_inferior_memory transfers.
4746 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4747 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4748 Use it for the write_inferior_memory transfer.
4749 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4750 buffers.
4751
50275556
MR
47522011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4753
4754 * linux-low.c (fetch_register, store_register): Make code
4755 consistent, fix formatting.
4756
7325beb4
MR
47572011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4758
4759 * linux-low.c (usr_store_inferior_registers): Factor out code
4760 to handle individual registers into...
4761 (store_register): ... this new function.
4762
c642a434
UW
47632011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4764
4765 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4766 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4767 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4768 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4769 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4770 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4771 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4772 (srv_xmlfiles): Add new XML files.
4773
4774 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4775 and <sys/uio.h>.
4776 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4777 (init_registers_s390_linux32v1): Add prototype.
4778 (init_registers_s390_linux32v2): Likewise.
4779 (init_registers_s390_linux64v1): Likewise.
4780 (init_registers_s390_linux64v2): Likewise.
4781 (init_registers_s390x_linux64v1): Likewise.
4782 (init_registers_s390x_linux64v2): Likewise.
4783 (s390_num_regs): Increment to 52.
4784 (s390_regmap): Add orig_r2 register.
4785 (s390_num_regs_3264): Increment to 68.
4786 (s390_regmap_3264): Add orig_r2 register.
4787 (s390_collect_ptrace_register): Handle orig_r2 register.
4788 (s390_supply_ptrace_register): Likewise.
4789 (s390_fill_last_break): New function.
4790 (s390_store_last_break): Likewise.
4791 (s390_fill_system_call): New function.
4792 (s390_store_system_call): Likewise.
4793 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4794 register sets.
4795 (s390_check_regset): New function.
4796 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4797 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4798 Update target_regsets for available register sets.
4799
2268b414
JK
48002011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4801 Jan Kratochvil <jan.kratochvil@redhat.com>
4802
4803 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4804 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4805 New.
4806 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4807 * linux-low.h (struct process_info_private): New member r_debug.
4808 * server.c (handle_qxfer_libraries): Call
4809 the_target->qxfer_libraries_svr4.
4810 (handle_qxfer_libraries_svr4): New function.
4811 (qxfer_packets): New entry "libraries-svr4".
4812 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4813 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4814 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4815 PACKET_qXfer_libraries_svr4.
4816
d6db1fab
UW
48172011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4818
4819 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4820 PSW address/mask between 8-byte and 16-byte formats.
4821 (s390_supply_ptrace_register): Likewise.
4822 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4823 basic addressing mode bit.
4824
242f5f1c
SS
48252011-11-24 Stan Shebs <stan@codesourcery.com>
4826
4827 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4828
f196051f
SS
48292011-11-17 Stan Shebs <stan@codesourcery.com>
4830
4831 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4832 (tracing_start_time): New global.
4833 (tracing_stop_time): New global.
4834 (tracing_user_name): New global.
4835 (tracing_notes): New global.
4836 (tracing_stop_note): New global.
4837 (cmd_qtstart): Set traceframe_usage, start_time.
4838 (stop_tracing): Set stop_time.
4839 (cmd_qtstatus): Report additional status.
4840 (cmd_qtp): New function.
4841 (handle_tracepoint_query): Call it.
4842 (cmd_qtnotes): New function.
4843 (handle_tracepoint_general_set): Call it.
4844 (get_timestamp): Rename from tsv_get_timestamp.
4845
405f8e94
SS
48462011-11-14 Stan Shebs <stan@codesourcery.com>
4847 Kwok Cheung Yeung <kcy@codesourcery.com>
4848
4849 * linux-x86-low.c (small_jump_insn): New.
4850 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4851 trampoline and error message, build a trampoline and issue a small
4852 jump instruction to it.
4853 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4854 trampoline and error message.
4855 (x86_get_min_fast_tracepoint_insn_len): New.
4856 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4857 * linux-low.h (struct linux_target_ops): Add arguments to
4858 install_fast_tracepoint_jump_pad operation, add new operation.
4859 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4860 arguments.
4861 (linux_get_min_fast_tracepoint_insn_len): New function.
4862 (linux_target_op): Add new operation.
4863 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4864 (gdb_trampoline_buffer_end): Ditto.
4865 (gdb_trampoline_buffer_error): Ditto.
4866 (struct ipa_sym_addresses): Add fields for new IPA variables.
4867 (symbol_list): Add entries for new IPA variables.
4868 (struct tracepoint): Add fields to hold the address range of the
4869 trampoline used by the tracepoint.
4870 (trampoline_buffer_head): New static variable.
4871 (trampoline_buffer_tail): Ditto.
4872 (claim_trampoline_space): New function.
4873 (have_fast_tracepoint_trampoline_buffer): New function.
4874 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4875 structure.
4876 (install_fast_tracepoint): Ditto, also add error buffer argument.
4877 (cmd_qtminftpilen): New function.
4878 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4879 (fast_tracepoint_from_trampoline_address): New function.
4880 (fast_tracepoint_collecting): Handle trampoline as part of jump
4881 pad space.
4882 (set_trampoline_buffer_space): New function.
4883 (initialize_tracepoint): Initialize new IPA variables.
4884 * target.h (struct target_ops): Add arguments to
4885 install_fast_tracepoint_jump_pad operation, add new
4886 get_min_fast_tracepoint_insn_len operation.
4887 (target_get_min_fast_tracepoint_insn_len): New.
4888 (install_fast_tracepoint_jump_pad): Add arguments.
4889 * server.h (IPA_BUFSIZ): Define.
4890 * linux-i386-ipa.c: Include extra header files.
4891 (initialize_fast_tracepoint_trampoline_buffer): New function.
4892 (initialize_low_tracepoint): Call it.
4893 * server.h (set_trampoline_buffer_space): Declare.
4894 (claim_trampoline_space): Ditto.
4895 (have_fast_tracepoint_trampoline_buffer): Ditto.
4896
1e4d1764
YQ
48972011-11-14 Yao Qi <yao@codesourcery.com>
4898
4899 * server.c (handle_query): Handle InstallInTrace for qSupported.
4900 * tracepoint.c (add_tracepoint): Sort list.
4901 (install_tracepoint, download_tracepoint): New.
4902 (cmd_qtdp): Call them to install and download tracepoints.
4903 (sort_tracepoints): Removed.
4904 (cmd_qtstart): Update.
4905
5c73ff4e
YQ
49062011-11-14 Yao Qi <yao@codesourcery.com>
4907
4908 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4909 * mem-break.h: Declare.
4910 * tracepoint.c (cmd_qtstart): Move some code to ...
4911 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4912 New.
4913 (download_tracepoints): Move some code to ...
4914 (download_tracepoint_1): ... here. New.
4915
86a30030
YQ
49162011-11-08 Yao Qi <yao@codesourcery.com>
4917
4918 * remote-utils.c (relocate_instruction): A comment fix.
4919
8d26e50c
JB
49202011-11-07 Joel Brobecker <brobecker@adacore.com>
4921
4922 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4923 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4924 dr_status_mirror and dr_control_mirror from debug_reg_state.
4925 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4926 (i386_initial_stuff): Remove use of deleted globals.
4927 (i386_get_thread_context, i386_set_thread_context,
4928 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4929 from debug_reg_state.
4930
a59306a3
YQ
49312011-11-05 Yao Qi <yao@codesourcery.com>
4932
4933 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4934 address as TPOINT's.
4935
3065dfb6
SS
49362011-11-02 Stan Shebs <stan@codesourcery.com>
4937
4938 * tracepoint.c (agent_mem_read_string): New function.
4939 (eval_agent_expr): Call it for tracenz.
4940 * server.c (handle_query): Report support for tracenz.
4941
fd0d8c7c
YQ
49422011-11-02 Yao Qi <yao@codesourcery.com>
4943
4944 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4945
609086b1
YQ
49462011-11-02 Yao Qi <yao@codesourcery.com>
4947
4948 * target.h: Fix a typo in comment.
4949
b9fd1791
PA
49502011-10-31 Pedro Alves <pedro@codesourcery.com>
4951
4952 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4953 clobber the breakpoints' shadows with fast tracepoint jumps.
4954 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4955 * target.c (write_inferior_memory): Also pass MYADDR down to
4956 check_mem_write.
4957
03583c20
UW
49582011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4959
4960 * configure.ac: Check support for personality routine.
4961 * configure: Regenerate.
4962 * config.in: Likewise.
4963 * linux-low.c: Include <sys/personality.h>.
4964 Define ADDR_NO_RANDOMIZE if necessary.
4965 (linux_create_inferior): Disable address space randomization when
4966 forking inferior, if requested.
4967 (linux_supports_disable_randomization): New function.
4968 (linux_target_ops): Install it.
4969 * server.h (disable_randomization): Declare.
4970 * server.c (disable_randomization): New global variable.
4971 (handle_general_set): Handle QDisableRandomization.
4972 (handle_query): Likewise for qSupported.
4973 (main): Support --disable-randomization and --no-disable-randomization
4974 command line arguments.
4975 * target.h (struct target_ops): Add supports_disable_randomization.
4976 (target_supports_disable_randomization): New macro.
4977
723b724b
MF
49782011-09-29 Mike Frysinger <vapier@gentoo.org>
4979
4980 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4981 ifdef check.
4982 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4983 [!PT_GETDSBT] (target_loadmap): New definition.
4984 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4985 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4986 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4987 and PT_GETDSBT to LINUX_LOADMAP.
4988 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4989 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4990
55329a5c 49912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4992
4993 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4994 (arm_linux_hwbp_cap): New static variable.
4995 (arm_linux_get_hwbp_cap): Replace by ...
4996 (arm_linux_init_hwbp_cap): ... this new function.
4997 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4998 (arm_linux_get_hw_watchpoint_count): Likewise.
4999 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5000 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5001 (arm_prepare_to_resume): Use perror_with_name instead of error.
5002
55329a5c 50032011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5004
5005 * linux-arm-low.c: Include <signal.h>.
5006 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5007 (struct arm_linux_hwbp_cap): New data type.
5008 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5009 (struct arm_linux_hw_breakpoint): New data type.
5010 (MAX_BPTS, MAX_WPTS): Define.
5011 (struct arch_process_info, struct arch_lwp_info): New data types.
5012 (arm_linux_get_hwbp_cap): New function.
5013 (arm_linux_get_hw_breakpoint_count): Likewise.
5014 (arm_linux_get_hw_watchpoint_count): Likewise.
5015 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5016 (arm_hwbp_control_initialize): Likewise.
5017 (arm_hwbp_control_is_enabled): Likewise.
5018 (arm_hwbp_control_is_initialized): Likewise.
5019 (arm_hwbp_control_disable): Likewise.
5020 (arm_linux_hw_breakpoint_equal): Likewise.
5021 (arm_linux_hw_point_initialize): Likewise.
5022 (struct update_registers_data): New data structure.
5023 (update_registers_callback: New function.
5024 (arm_insert_point): Likewise.
5025 (arm_remove_point): Likewise.
5026 (arm_stopped_by_watchpoint): Likewise.
5027 (arm_stopped_data_address): Likewise.
5028 (arm_new_process): Likewise.
5029 (arm_new_thread): Likewise.
5030 (arm_prepare_to_resume): Likewise.
5031 (the_low_target): Register arm_insert_point, arm_remove_point,
5032 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5033 arm_new_thread, and arm_prepare_to_resume.
5034
6b9801d4
SS
50352011-09-15 Stan Shebs <stan@codesourcery.com>
5036
5037 * server.h (struct emit_ops): Add compare-goto fields.
5038 * tracepoint.c (gdb_agent_op_sizes): New table.
5039 (emit_eq_goto): New function.
5040 (emit_ne_goto): New function.
5041 (emit_lt_goto): New function.
5042 (emit_le_goto): New function.
5043 (emit_gt_goto): New function.
5044 (emit_ge_goto): New function.
5045 (is_goto_target): New function.
5046 (compile_bytecodes): Recognize special cases of compare-goto
5047 combinations and call specialized emitters for them.
5048 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5049 (amd64_emit_ne_goto): New function.
5050 (amd64_emit_lt_goto): New function.
5051 (amd64_emit_le_goto): New function.
5052 (amd64_emit_gt_goto): New function.
5053 (amd64_emit_ge_goto): New function.
5054 (amd64_emit_ops): Add the new functions.
5055 (i386_emit_eq_goto): New function.
5056 (i386_emit_ne_goto): New function.
5057 (i386_emit_lt_goto): New function.
5058 (i386_emit_le_goto): New function.
5059 (i386_emit_gt_goto): New function.
5060 (i386_emit_ge_goto): New function.
5061 (i386_emit_ops): Add the new functions.
5062
bf15cbda
SS
50632011-09-08 Stan Shebs <stan@codesourcery.com>
5064
5065 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5066 (i386_emit_epilogue): Restore %ebx.
5067
943ca1dd
JZ
50682011-08-31 Jie Zhang <jzhang918@gmail.com>
5069
5070 * server.c (step_thread): Remove definition.
5071 (process_serial_event): Don't handle Hs.
5072 * server.h (step_thread): Remove declaration.
5073 * target.c (set_desired_inferior): Remove use of step_thread.
5074
e3deef73
LM
50752011-08-24 Luis Machado <lgustavo@codesourcery.com>
5076
5077 * linux-low.c: Include linux-procfs.h.
5078 (linux_attach_lwp_1): Update comments.
5079 (linux_attach): Scan for existing threads when attaching to a
5080 process that is the tgid.
5081 * Makefile.in: Update dependencies.
5082
13da1c97
LM
50832011-08-24 Luis Machado <lgustavo@codesourcery.com>
5084
5085 * configure.srv: Add linux-procfs.o dependencies.
5086
881127c9
YQ
50872011-08-14 Yao Qi <yao@codesourcery.com>
5088
5089 * target.h (struct target_ops): Fix indent.
5090 * win32-low.c (win32_target_ops): Fix comment.
5091
58dbd541
YQ
50922011-08-14 Andrew Jenner <andrew@codesourcery.com>
5093 Yao Qi <yao@codesourcery.com>
5094
5095 * Makefile.in (clean): Remove tic6x-*.c files.
5096 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5097 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5098 (tic6x-c64xp-linux.c): Likewise.
5099 * configure.srv: Add support for tic6x-*-uclinux.
5100 * linux-tic6x-low.c: New.
5101 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5102
78d85199
YQ
51032011-08-14 Andrew Stubbs <ams@codesourcery.com>
5104 Yao Qi <yao@codesourcery.com>
5105
5106 * target.h (struct target_ops): Add read_loadmap.
5107 * linux-low.c (struct target_loadseg): New type.
5108 (struct target_loadmap): New type.
5109 (linux_read_loadmap): New function.
5110 (linux_target_ops): Add linux_read_loadmap.
5111 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5112 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5113 to NULL.
78d85199 5114
a959a88d
EZ
51152011-08-05 Eli Zaretskii <eliz@gnu.org>
5116
5117 * win32-low.c: Include <stdint.h>.
5118
1ced966e
PA
51192011-07-22 Pedro Alves <pedro@codesourcery.com>
5120
5121 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5122 to the inferior here.
5123 (i386_remove_aligned_watchpoint): Ditto.
5124 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5125 fit part of the watchpoint in the debug registers.
5126 (i386_update_inferior_debug_regs): New.
5127 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5128 registers, and only update the inferior on success.
5129 (i386_low_remove_watchpoint): Ditto.
5130
d26e3629
KY
51312011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5132
5133 * linux-low.c (compare_ints, unique, list_threads, show_process,
5134 linux_core_of_thread): Delete.
5135 (linux_target_ops): Change linux_core_of_thread to
5136 linux_common_core_of_thread.
5137 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5138 * utils.c (malloc_failure): Change type of argument.
5139 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5140 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5141 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5142 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5143 (IPA_OBJS): Add common-utils-ipa.o.
5144 (ptid_h, linux_osdata_h): New macros.
5145 (server_h): Add common/common-utils.h, common/xml-utils.h,
5146 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5147 common/ptid.h.
5148 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5149 ptid.o, buffer.o): New rules.
5150 (linux-low.o): Add common/linux-osdata.h as a dependency.
5151 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5152 * configure.ac: Add AC_HEADER_DIRENT check.
5153 * config.in: Regenerate.
5154 * configure: Regenerate.
5155 * remote-utils.c (xml_escape_text): Delete.
5156 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5157 buffer_xml_printf): Move to common/buffer.c.
5158 * server.c (main): Remove call to initialize_inferiors.
5159 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5160 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5161 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5162 internal_error, gdb_assert, gdb_assert_fail): Delete.
5163 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5164 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5165 common/buffer.h.
5166 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5167 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5168 initialize_inferiors): Delete.
5169
2275a1a7
PA
51702011-07-20 Pedro Alves <pedro@codesourcery.com>
5171
5172 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5173 symbol error.
5174
0a5b1e09
PA
51752011-05-31 Pedro Alves <pedro@codesourcery.com>
5176
5177 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5178 assertion.
5179 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5180
6938fd34
YQ
51812011-05-26 Yao Qi <yao@codesourcery.com>
5182
5183 * Makefile.in (thread-db.o): Track dependence to
5184 common/gdb_thread_db.h.
5185 * thread-db.c: include gdb_thread_db.h from right place.
5186
b481f9e0
TT
51872011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5188
5189 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5190 __FILE__ and __LINE__ to internal_error.
5191
98a5dd13
DE
51922011-05-13 Doug Evans <dje@google.com>
5193
5194 * thread-db.c (try_thread_db_load_from_sdir): New function.
5195 (try_thread_db_load_from_dir): New function.
5196 (thread_db_load_search): Handle $sdir, ignore $pdir.
5197 Remove trying of system directories if search of
5198 libthread-db-search-path fails, that is now done via $sdir.
5199
d248b706
KY
52002011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5201
5202 * server.c (handle_query): Add EnableDisableTracepoints to the list
5203 of supported features.
43aaf8b6 5204 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5205 tracepoints.
43aaf8b6
PA
5206 (cmd_qtenable_disable): New.
5207 (cmd_qtstart): Install tracepoints even if disabled.
5208 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5209 receiving a QTEnable or QTDisable packet.
5210 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5211 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5212 tracepoints.
5213 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5214
84e578fb
DE
52152011-05-10 Doug Evans <dje@google.com>
5216
5217 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5218
71f55dd8
DE
52192011-05-04 Doug Evans <dje@google.com>
5220
5221 * linux-low.c (linux_join): Skip process lookup.
5222 * spu-low.c (spu_join): Ditto.
5223 * server.c (join_inferiors_callback): Delete.
5224 (process_serial_event): For 'D' packet (detach) call join_inferior
5225 directly.
5226
4d393d60
JM
52272011-05-04 Joseph Myers <joseph@codesourcery.com>
5228
5229 * README: Don't mention xscale*-*-linux*.
5230 * configure.srv (xscale*-*-linux*): Don't handle target.
5231
b00ad6ff
NF
52322011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5233
5234 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5235 casting pointers.
5236 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5237 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5238 (i386_emit_void_call_2): Likewise.
5239
af96c192
YQ
52402011-04-26 Yao Qi <yao@codesourcery.com>
5241
43aaf8b6
PA
5242 * linux-low.c: Move common macros to linux-ptrace.h.
5243 Include linux-ptrace.h.
af96c192
YQ
5244 * Makefile.in (linux_ptrace_h): New.
5245 (linux-low.o): Depends on linux-ptrace.h.
5246
03f2bd59
JK
52472011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5248
5249 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5250 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5251 (remote_prepare): New function with most of the TCP code from ...
5252 (remote_open): ... here. Detect PORT here unconditionally. Move also
5253 setting transport_is_reliable.
5254 * server.c (run_once): New variable.
5255 (gdbserver_usage): Document it.
5256 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5257 the first run if RUN_ONCE.
5258 * server.h (run_once, remote_prepare): New declarations.
5259
7a9dd1b2
TT
52602011-04-19 Tom Tromey <tromey@redhat.com>
5261
5262 * win32-low.c (handle_load_dll): Remove duplicate "the".
5263
81239425
PM
52642011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5265
5266 Remove support for old Cygwin 1.5 versions.
5267 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5268 function to avoid warning.
5269 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5270 warning.
5271
9e0627f1
PM
52722011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5273
5274 * gdbserver/server.h (Macro _): Define it if not available.
5275
588eebee
MS
52762011-03-14 Michael Snyder <msnyder@vmware.com>
5277
348af9f7 5278 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5279
43f70d4c
JB
52802011-03-10 Joel Brobecker <brobecker@adacore.com>
5281
5282 * Makefile.in (maintainer-clean realclean distclean): Remove
5283 "make ... subdir_do" command.
5284
348af9f7
MS
52852011-03-10 Michael Snyder <msnyder@vmware.com>
5286
5287 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5288
5289 * server.c (handle_v_run): Free alloced buffer on early return.
5290
e637a4f5
YQ
52912011-03-09 Yao Qi <yao@codesourcery.com>
5292
5293 Revert:
5294 2011-03-04 Yao Qi <yao@codesourcery.com>
5295
5296 * Makefile.in: Remove GNU make feature --directory.
5297
5298 2011-03-05 Yao Qi <yao@codesourcery.com>
5299
5300 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5301 (subdir_do): New make target. Copied from gdb/Makefile.
5302 (maintainer-clean, realclean, distclean, clean): Call corresponding
5303 make targets in common/Makefile.
5304
5305 2011-02-11 Yao Qi <yao@codesourcery.com>
5306
5307 * configure.ac: Call AC_PROG_RANLIB.
5308 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5309 * configure: Regenerate.
5310
e6edda56
JK
53112011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5312
5313 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5314
e5141119
JB
53152011-03-06 Yao Qi <yao@codesourcery.com>
5316
5317 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5318
64794aa4
JB
53192011-03-05 Yao Qi <yao@codesourcery.com>
5320
5321 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5322 (subdir_do): New make target. Copied from gdb/Makefile.
5323 (maintainer-clean, realclean, distclean, clean): Call corresponding
5324 make targets in common/Makefile.
5325
7a762829
YQ
53262011-03-04 Yao Qi <yao@codesourcery.com>
5327
5328 * Makefile.in: Remove GNU make feature --directory.
5329
348af9f7
MS
53302011-03-04 Michael Snyder <msnyder@vmware.com>
5331
5332 * server.c (queue_stop_reply): Call xmalloc not malloc.
5333
53342011-03-02 Michael Snyder <msnyder@vmware.com>
5335
5336 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5337
9f72fee2
MS
53382011-02-28 Michael Snyder <msnyder@vmware.com>
5339
588eebee
MS
5340 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5341 (cmd_qtframe): Ditto.
5342 (cmd_qtbuffer): Ditto.
5343 (cmd_bigqtbuffer): Ditto.
5344
9f72fee2
MS
5345 * utils.c (decimal2str): Initialize 'width' to nine, then
5346 don't mess with it.
5347
8040bd49
UW
53482011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5349
5350 * hostio.c (require_data): Free *data, not data.
5351
7e52cbd0
JK
53522011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5353
5354 * hostio.c (require_data): Use free, not xfree.
5355
9130f83e
MS
53562011-02-27 Michael Snyder <msnyder@vmware.com>
5357
4b812f4e
MS
5358 * server.c (handle_query): Discard unused value.
5359
9130f83e
MS
5360 * hostio.c (require_data): Free malloc memory before returning
5361 error.
5362
69d37113
MS
53632011-02-26 Michael Snyder <msnyder@vmware.com>
5364
5365 * linux-low.c (list_threads): Call closedir for dirent.
5366
35f5825a
MS
53672011-02-27 Michael Snyder <msnyder@vmware.com>
5368
2a589cef
MS
5369 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5370 a case statement falls through.
5371
0adea5f7
MS
5372 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5373
35f5825a
MS
5374 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5375 in comparison.
5376
238f1c74
MS
53772011-02-26 Michael Snyder <msnyder@vmware.com>
5378
5379 * utils.c (decimal2str): Eliminate dead code and dead param.
5380 (pulongest): Drop dead param from call to decimal2str.
5381 (plongest): Ditto.
5382
633ff500
JB
53832011-02-24 Joel Brobecker <brobecker@adacore.com>
5384
5385 Revert the following patch (not approved yet):
5386 2011-02-21 Hui Zhu <teawater@gmail.com>
5387 * tracepoint.c (tp_printf): New function.
5388 (eval_agent_expr): Handle gdb_agent_op_printf.
5389
f9c6ff72
HZ
53902011-02-21 Hui Zhu <teawater@gmail.com>
5391
5392 * tracepoint.c (tp_printf): New function.
5393 (eval_agent_expr): Handle gdb_agent_op_printf.
5394
94d5e490
TT
53952011-02-18 Tom Tromey <tromey@redhat.com>
5396
5397 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5398 (tracepoint.o): Likewise.
5399 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5400 (gdb_agent_op_names): Likewise.
5401
c7f96d2b
TT
54022011-02-18 Tom Tromey <tromey@redhat.com>
5403
5404 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5405 gdb_agent_op_rot>: New constants.
5406 (gdb_agent_op_names): Add pick and roll.
5407 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5408 cases.
5409
0feedb2c
JK
54102011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5411
5412 * aclocal.m4: Regenerated with aclocal-1.11.1.
5413
b3b9301e
PA
54142011-02-14 Pedro Alves <pedro@codesourcery.com>
5415
5416 * server.c (handle_qxfer_traceframe_info): New.
5417 (qxfer_packets): Register "traceframe-info".
5418 (handle_query): Report support for qXfer:traceframe-info:read+.
5419 * tracepoint.c (match_blocktype): New.
5420 (traceframe_find_block_type): Rename to ...
5421 (traceframe_walk_blocks): ... this. Add callback filter argument,
5422 and use it.
5423 (traceframe_find_block_type): New, reimplemented on top of
5424 traceframe_walk_blocks.
5425 (build_traceframe_info_xml): New.
5426 (traceframe_read_info): New.
5427 * server.h (traceframe_read_info): Declare.
5428
4f3e6fb7
YQ
54292011-02-11 Yao Qi <yao@codesourcery.com>
5430
5431 * configure.ac: Call AC_PROG_RANLIB.
5432 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5433 * configure: Regenerate.
5434
764880b7
PA
54352011-02-07 Pedro Alves <pedro@codesourcery.com>
5436
5437 * server.c (gdb_read_memory): Change return semantics to allow
5438 partial transfers.
5439 (handle_search_memory_1): Adjust.
5440 (process_serial_event) <'m' packet>: Handle partial transfers.
5441 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5442
1c79eb8a
PA
54432011-01-28 Pedro Alves <pedro@codesourcery.com>
5444
5445 * regcache.c (init_register_cache): Initialize
5446 regcache->register_status.
5447 (free_register_cache): Release regcache->register_status.
5448 (regcache_cpy): Copy register_status.
5449 (registers_to_string): Print 'x's for unavailable registers.
5450 (supply_register): Mark the register's status valid or
5451 unavailable, depending on whether a buffer was passed in or not.
5452 (supply_register_zeroed): New.
5453 (supply_regblock): Mark the registers' status valid or
5454 unavailable, depending on whether a buffer was passed in or not.
5455 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5456 (struct regcache): New `register_status' field.
5457 (supply_register_zeroed): Declare.
5458 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5459 supply_register_zeroed, rather than passing a NULL buffer to
5460 supply_register.
5461 * tracepoint.c (fetch_traceframe_registers): Update comment.
5462
85724a0e
PA
54632011-01-28 Pedro Alves <pedro@codesourcery.com>
5464
5465 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5466 buffer explicit.
5467
d08aafef
PA
54682011-01-25 Pedro Alves <pedro@codesourcery.com>
5469
5470 * server.h (decode_xfer_write): Change prototype.
5471 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5472 and don't extract the annex here.
5473 * server.c (decode_xfer_read): Remove `annex' parameter,
5474 and don't extract the annex here.
5475 (decode_xfer): New.
5476 (struct qxfer): New.
5477 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5478 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5479 (handle_qxfer_statictrace): New functions, abstracted out from
5480 handle_query, and made to use the struct qxfer interface.
5481 (handle_threads_qxfer_proper): Rename to ...
5482 (handle_qxfer_threads_proper): ... this.
5483 (handle_threads_qxfer): Rename to ...
5484 (handle_qxfer_threads): ... this. Adjust.
5485 (qxfer_packets): New array.
5486 (handle_qxfer): New function.
5487 (handle_query): Use handle_qxfer.
5488
493e2a69
MS
54892011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5490
5491 * gdbreplay.c: Shorten lines of >= 80 columns.
5492 * linux-low.c: Ditto.
5493 * linux-ppc-low.c: Ditto.
5494 * linux-s390-low.c: Ditto.
5495 * linux-sparc-low.c: Ditto.
5496 * linux-x86-low.c: Ditto.
5497 * linux-xtensa-low.c: Ditto.
5498 * mem-break.c: Ditto.
5499 * nto-low.c: Ditto.
5500 * regcache.h: Ditto.
5501 * remote-utils.c: Ditto.
5502 * server.c: Ditto.
5503 * server.h: Ditto.
5504 * thread-db.c: Ditto.
5505 * tracepoint.c: Ditto.
5506 * utils.c: Ditto.
5507 * win32-low.h: Ditto.
5508
44944448
JB
55092011-01-05 Joel Brobecker <brobecker@adacore.com>
5510
5511 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5512 update.
5513
71ce852c
JB
55142011-01-01 Joel Brobecker <brobecker@adacore.com>
5515
5516 * server.c (gdbserver_version): Update copyright year in version
5517 output.
5518 * gdbreplay.c (gdbreplay_version): Ditto.
5519
eb826dc6
MF
55202010-12-29 Jie Zhang <jie.zhang@analog.com>
5521
5522 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5523 * linux-bfin-low.c: New file.
5524 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5525 PT_DATA_ADDR for BFIN targets.
5526 * Makefile.in (SFILES): Add linux-bfin-low.c.
5527 (clean): Remove reg-bfin.c.
5528 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5529 * README: Mention supported Blackfin targets.
5530
39ab222a
MF
55312010-12-23 Mike Frysinger <vapier@gentoo.org>
5532
5533 * .gitignore: New file.
5534
a1f2ce7d
MF
55352010-11-16 Mike Frysinger <vapier@gentoo.org>
5536
5537 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5538
f474844c
JZ
55392010-10-22 Jie Zhang <jie@codesourcery.com>
5540
5541 * Makefile.in: Add FLAGS_TO_PASS variable.
5542 (install): Remove dependency of install-only and recursively
5543 invoke make for install-only.
5544
f1048712
DE
55452010-10-04 Doug Evans <dje@google.com>
5546
5547 * Makefile.in (uninstall): Use $(DESTDIR).
5548
b53a1623
PA
55492010-09-24 Pedro Alves <pedro@codesourcery.com>
5550
e6ee044d
PA
5551 PR gdb/11842
5552
b53a1623
PA
5553 * linux-x86-low.c (compat_siginfo_from_siginfo)
5554 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5555 si_code is < 0. Check for si_code == SI_TIMER before checking for
5556 si_code < 0.
5557
fa1bd1e4
JB
55582010-09-13 Joel Brobecker <brobecker@adacore.com>
5559
5560 * lynx-i386-low.c: New file.
5561 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5562
47fac8f8
JB
55632010-09-13 Joel Brobecker <brobecker@adacore.com>
5564
5565 * lynx-low.c (ptrace_request_to_str): Remove handling for
5566 request values that have been removed in LynxOS 5.x.
5567
1adfc54d
JB
55682010-09-13 Joel Brobecker <brobecker@adacore.com>
5569
5570 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5571 <ptrace.h>
5572
c2a66c29
NS
55732010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5574
5575 * configure.ac: Add --enable-inprocess-agent option.
5576 * configure: Rebuilt.
5577
32fcada3
YQ
55782010-09-06 Yao Qi <yao@codesourcery.com>
5579
5580 * linux-low.c (linux_kill): Remove unused variable.
5581 (linux_stabilize_threads): Likewise.
5582 * server.c (start_inferior): Likewise.
5583 (queue_stop_reply_callback): Likewise.
5584 * tracepoint.c (do_action_at_tracepoint): Likewise.
5585
0cccb683
YQ
55862010-09-06 Yao Qi <yao@codesourcery.com>
5587
5588 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5589 on return.
5590
423ec54c
JK
55912010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5592
5593 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5594
12ac6819
PA
55952010-09-06 Pedro Alves <pedro@codesourcery.com>
5596
5597 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5598 "$(IPA_DEPFILES)".
5599
8ed54b31
JB
56002010-09-01 Joel Brobecker <brobecker@adacore.com>
5601
5602 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5603 gdbserver/lynx-ppc-low.c: New files.
5604 * Makefile.in (lynx_low_h): New variable.
5605 (lynx-low.o, lynx-ppc-low.o): New rules.
5606 * configure.ac: On LynxOS, link with -lnetinet.
5607 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5608 * configure: regenerate.
5609
bb0116a4
JB
56102010-09-01 Joel Brobecker <brobecker@adacore.com>
5611
5612 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5613 * configure.ac: Add check for vasprintf and vsnprintf.
5614 * configure, config.in: Regenerate.
5615 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5616
a778ab81 56172010-09-01 Joel Brobecker <brobecker@adacore.com>
5618
5619 * gdbreplay.c: Move include of alloca.h up, next to include of
5620 malloc.h.
5621 * server.h: Add include of malloc.h.
5622 * mem-break.c: Remove include of malloc.h.
5623 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5624
8b034a19 56252010-09-01 Joel Brobecker <brobecker@adacore.com>
5626
5627 * Makefile.in (memmem.o): Build with -Wno-error.
5628
56292010-09-01 Joel Brobecker <brobecker@adacore.com>
5630
5631 * utils.c (xsnprintf): Make non-static.
5632 * server.h: Add xsnprintf declaration.
5633 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5634 replace calls to snprintf by calls to xsnprintf throughout.
5635
56362010-09-01 Joel Brobecker <brobecker@adacore.com>
5637
5638 * configure.ac: Add configure check for alloca.
5639 * configure, config.in: Regenerate.
5640 * server.h: Include alloca.h if it exists.
5641 * gdbreplay.c: Include alloca.h if it exists.
5642
1a981360
PA
56432010-08-28 Pedro Alves <pedro@codesourcery.com>
5644
5645 * linux-low.c (__SIGRTMIN): Define if not already defined.
5646 (linux_create_inferior): Check for __ANDROID__ rather than
5647 __SIGRTMIN.
5648 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5649 are already deferred.
5650 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5651 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5652 stopped and already has a pending signal to report.
5653 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5654 a pending signal to report or is moving out of a jump pad.
5655 (linux_init_signals): Check for __ANDROID__ rather than
5656 __SIGRTMIN.
5657
b4d51a55
PA
56582010-08-28 Pedro Alves <pedro@codesourcery.com>
5659
5660 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5661 debug_threads check. Avoid a linear search when not doing debug
5662 output.
5663
ec48365d
PA
56642010-08-27 Pedro Alves <pedro@codesourcery.com>
5665
5666 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5667 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5668 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5669 (process_event): Change local fd's type to gdb_fildes_t.
5670 (create_file_handler): Adjust prototype.
5671 (delete_file_handler): Adjust prototype.
5672 (handle_file_event): Adjust prototype. Use pfildes.
5673 (create_file_event): Adjsut prototype.
5674 * remote-utils.c (remote_desc, listen_desc): Change type to
5675 gdb_fildes_t.
5676 * server.h: New gdb_fildes_t typedef.
5677 [USE_WIN32API]: Include winsock2.h.
5678 (delete_file_handler, add_file_handler): Adjust prototypes.
5679 (pfildes): Declare.
5680 * utils.c (pfildes): New.
5681
854d88f0
PA
56822010-08-27 Pedro Alves <pedro@codesourcery.com>
5683
5684 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5685 * configure: Regenerate.
5686
0146f85b
PA
56872010-08-27 Pedro Alves <pedro@codesourcery.com>
5688
5689 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5690 (linux_done_accessing_memory): ... this.
5691 (linux_target_ops): Adjust.
5692 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5693 * nto-low.c (nto_target_ops): Adjust comment.
5694 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5695 * spu-low.c (spu_target_ops): Adjust comment.
5696 * target.h (target_ops): Rename unprepare_to_access_memory field
5697 to done_accessing_memory.
5698 (unprepare_to_access_memory): Rename to ...
5699 (done_accessing_memory): ... this.
5700
90d74c30
PA
57012010-08-26 Pedro Alves <pedro@codesourcery.com>
5702
5703 * linux-low.c (linux_prepare_to_access_memory): New.
5704 (linux_unprepare_to_access_memory): New.
5705 (linux_target_ops): Install them.
5706 * server.c (read_memory): Rename to ...
5707 (gdb_read_memory): ... this. Use
5708 prepare_to_access_memory/prepare_to_access_memory.
5709 (write_memory): Rename to ...
5710 (gdb_write_memory): ... this. Use
5711 prepare_to_access_memory/prepare_to_access_memory.
5712 (handle_search_memory_1): Adjust.
5713 (process_serial_event): Adjust.
5714 * target.h (struct target_ops): New fields
5715 prepare_to_access_memory and unprepare_to_access_memory.
5716 (prepare_to_access_memory, unprepare_to_access_memory): New.
5717 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5718 prepare_to_access_memory/prepare_to_access_memory.
5719 * nto-low.c (nto_target_ops): Adjust.
5720 * spu-low.c (spu_target_ops): Adjust.
5721 * win32-low.c (win32_target_ops): Adjust.
5722
fd467969
PA
57232010-08-26 Pedro Alves <pedro@codesourcery.com>
5724
5725 * Makefile.in (WARN_CFLAGS): Get it from configure.
5726 (WERROR_CFLAGS): New.
5727 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5728 * configure.ac: Introduce --enable-werror, which adds -Werror to
5729 the compiler command line. Enabled by default. Disable with
5730 --disable-werror. Add -Wdeclaration-after-statement
5731 Wpointer-arith and -Wformat-nonliteral to warning flags.
5732 * configure: Regenerate.
5733
331e2f5f
PA
57342010-08-26 Pedro Alves <pedro@codesourcery.com>
5735
5736 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5737
e581f2b4
PA
57382010-08-26 Pedro Alves <pedro@codesourcery.com>
5739
5740 * gdbreplay.c (remote_error): New.
5741 (gdbchar): New.
5742 (expect): Use gdbchar. Check for error reading from GDB.
5743 Clarify sync error output.
5744 (play): Check for errors writing to GDB.
5745 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5746 * remote-utils.c (getpkt): Check for errors writing to the remote
5747 descriptor.
5748
3c11dd79
PA
57492010-08-25 Pedro Alves <pedro@codesourcery.com>
5750
5751 * linux-low.c (linux_wait_1): Move non-debugging code out of
5752 `debug_threads' control.
5753
d20a8ad9
PA
57542010-08-25 Pedro Alves <pedro@codesourcery.com>
5755
5756 * linux-low.c (linux_wait_1): Don't set last_status here.
5757 * server.c (push_event, queue_stop_reply_callback): Assert we're
5758 not pushing a TARGET_WAITKIND_IGNORE event.
5759 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5760 (myresume, handle_target_event): Set the thread's last_resume_kind
5761 and last_status from the target returned status.
5762
964e4306
PA
57632010-08-25 Pedro Alves <pedro@codesourcery.com>
5764
5765 PR threads/10729
5766
5767 * linux-x86-low.c (update_debug_registers_callback): New.
5768 (i386_dr_low_set_addr): Use it.
5769 (i386_dr_low_get_addr): New.
5770 (i386_dr_low_set_control): Use update_debug_registers_callback.
5771 (i386_dr_low_get_control): New.
5772 (i386_dr_low_get_status): Adjust.
5773 * linux-low.c (linux_stop_lwp): New.
5774 * linux-low.h (linux_stop_lwp): Declare.
5775
5776 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5777 argument instead of a i386_debug_reg_state.
5778 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5779 a i386_debug_reg_state.
5780 (i386_insert_aligned_watchpoint): Adjust.
5781 (i386_remove_aligned_watchpoint): Adjust.
5782 (i386_low_stopped_data_address): Read the debug registers from the
5783 inferior instead of from the mirrors.
5784 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5785 (i386_dr_low_get_addr): Declare.
5786 (i386_dr_low_get_control): Declare.
5787 (i386_dr_low_get_status): Change prototype.
5788
5789 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5790 (i386_dr_low_get_addr): New.
5791 (i386_dr_low_get_control): New.
5792 (i386_dr_low_get_status): Adjust prototype. Return
5793 dr_status_mirror.
5794 (i386_initial_stuff): Clear dr_status_mirror and
5795 dr_control_mirror.
5796 (i386_get_thread_context): Adjust.
5797 (i386_set_thread_context): Adjust.
5798 (i386_thread_added): Adjust.
5799
5f21a75b
PA
58002010-08-24 Pedro Alves <pedro@codesourcery.com>
5801
5802 * linux-low.h (linux_thread_area): Delete declaration.
5803
3e4c1235
TS
58042010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5805
5806 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5807 after its termination.
5808
1971b033
PA
58092010-08-09 Pedro Alves <pedro@codesourcery.com>
5810
5811 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5812 (gdb_wants_all_stopped): Delete.
5813 (linux_wait_1): Don't call them.
5814 * server.c (handle_v_cont): Tag all threads as want-stopped.
5815 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5816 stopped as "client-wants-stopped".
5817
310444ac
PA
58182010-07-31 Pedro Alves <pedro@codesourcery.com>
5819
5820 * Makefile.in (signals_h): New.
5821 (server_h): Depend on it.
5822 (server.o): Don't depend on $(signals_def).
5823 (signals.o): Depend on $(signals_def).
5824
a19cae16
JK
58252010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5826
5827 * Makefile.in (signals_def): New.
5828 (server_h): Append include/gdb/signals.h and signals_def.
5829 (server.o): Append signals_def.
5830
30d50328
JK
58312010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5832
5833 * server.c (handle_target_event): Use target_signal_to_host for
5834 resume_info.sig initialization.
5835 * target.h (struct thread_resume) <sig>: New comment.
5836
5c3216e2
OS
58372010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5838
c6f46ca0
OS
5839 * server.c (handle_query): strcpy() the returned string from paddress()
5840 instead of sprintf().
5c3216e2
OS
5841 * utils.c (paddress): Return phex_nz().
5842
6bd31874
JB
58432010-07-07 Joel Brobecker <brobecker@adacore.com>
5844
5845 * server.c (handle_v_cont): Call mourn_inferior if process
5846 just exited.
5847 (myresume): Likewise.
5848
0fb4aa4b
PA
58492010-07-01 Pedro Alves <pedro@codesourcery.com>
5850
5851 Static tracepoints, and integration with UST.
5852
5853 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5854 * mem-break.c (uninsert_all_breakpoints)
5855 (reinsert_all_breakpoints): New.
5856 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5857 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5858 (gdb_agent_ust_loaded, helper_thread_id)
5859 (gdb_agent_helper_thread_id): New macros.
5860 (struct ipa_sym_addresses): Add addr_ust_loaded,
5861 addr_helper_thread_id, addr_cmd_buf.
5862 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5863 (in_process_agent_loaded_ust): New.
5864 (write_e_ust_not_loaded): New.
5865 (maybe_write_ipa_ust_not_loaded): New.
5866 (struct collect_static_trace_data_action): New.
5867 (enum tracepoint_type) <static_tracepoint>: New.
5868 (struct tracepoint) <handle>: Mention static tracepoints.
5869 (struct static_tracepoint_ctx): New.
5870 (CMD_BUF_SIZE): New.
5871 (add_tracepoint_action): Handle static tracepoint actions.
5872 (unprobe_marker_at): New.
5873 (clear_installed_tracepoints): Handle static tracepoints.
5874 (cmd_qtdp): Handle static tracepoints.
5875 (probe_marker_at): New.
5876 (cmd_qtstart): Handle static tracepoints.
5877 (response_tracepoint): Handle static tracepoints.
5878 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5879 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5880 (get_context_regcache): Handle static tracepoints.
5881 (do_action_at_tracepoint): Handle static tracepoint actions.
5882 (traceframe_find_block_type): Handle static trace data blocks.
5883 (traceframe_read_sdata): New.
5884 (download_tracepoints): Download static tracepoint actions.
5885 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5886 (GDB_PROBE_NAME): New.
5887 (ust_ops): New.
5888 (GET_UST_SYM): New.
5889 (USTF): New.
5890 (dlsym_ust): New.
5891 (ust_marker_to_static_tracepoint): New.
5892 (gdb_probe): New.
5893 (collect_ust_data_at_tracepoint): New.
5894 (gdb_ust_probe): New.
5895 (UNIX_PATH_MAX, SOCK_DIR): New.
5896 (gdb_ust_connect_sync_socket): New.
5897 (resume_thread, stop_thread): New.
5898 (run_inferior_command): New.
5899 (init_named_socket): New.
5900 (gdb_ust_socket_init): New.
5901 (cstr_to_hexstr): New.
5902 (next_st): New.
5903 (first_marker, next_marker): New.
5904 (response_ust_marker): New.
5905 (cmd_qtfstm, cmd_qtsstm): New.
5906 (unprobe_marker_at, probe_marker_at): New.
5907 (cmd_qtstmat, gdb_ust_thread): New.
5908 (gdb_ust_init): New.
5909 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5910 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5911 (ST_REGENTRY): New.
5912 (x86_64_st_collect_regmap): New.
5913 (X86_64_NUM_ST_COLLECT_GREGS): New.
5914 (AMD64_RIP_REGNUM): New.
5915 (supply_static_tracepoint_registers): New.
5916 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5917 (ST_REGENTRY): New.
5918 (i386_st_collect_regmap): New.
5919 (i386_NUM_ST_COLLECT_GREGS): New.
5920 (supply_static_tracepoint_registers): New.
5921 * server.c (handle_query): Handle qXfer:statictrace:read.
5922 <qSupported>: Report support for StaticTracepoints, and
5923 qXfer:statictrace:read features.
5924 * server.h (traceframe_read_sdata)
5925 (supply_static_tracepoint_registers): Declare.
5926 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5927 (unpack_varlen_hex): Include in IPA build.
5928 * Makefile.in (ustlibs, ustinc): New.
5929 (IPA_OBJS): Add remote-utils-ipa.o.
5930 ($(IPA_LIB)): Link -ldl and -lpthread.
5931 (UST_CFLAGS): New.
5932 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5933 * config.in, configure: Regenerate.
5934
9e4344e5
PA
59352010-06-20 Ian Lance Taylor <iant@google.com>
5936 Pedro Alves <pedro@codesourcery.com>
5937
5938 * linux-x86-low.c (always_true): Delete.
5939 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5940 trying to fool the compiler with always_true.
5941
c6beb2cb
PA
59422010-06-20 Pedro Alves <pedro@codesourcery.com>
5943
5944 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5945 conditions in gdbserver.
5946
d2ed6730
UW
59472010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5948
5949 * spu-low.c (spu_read_memory): Wrap around local store limit.
5950 (spu_write_memory): Likewise.
5951
4e29fb54
PA
59522010-06-15 Pedro Alves <pedro@codesourcery.com>
5953
5954 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5955 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5956 LONGEST uses.
5957 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5958 uses.
5959 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5960 uses with LONGEST uses.
5961
6a271cae
PA
59622010-06-14 Stan Shebs <stan@codesourcery.com>
5963 Pedro Alves <pedro@codesourcery.com>
5964
5965 Bytecode compiler.
5966
5967 * linux-x86-low.c: Include limits.h.
5968 (add_insns): New.
5969 (always_true): New.
5970 (EMIT_ASM): New.
5971 (EMIT_ASM32): New.
5972 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5973 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5974 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5975 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5976 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5977 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5978 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5979 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5980 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5981 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5982 (amd64_emit_void_call_2): New.
5983 (amd64_emit_ops): New.
5984 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5985 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5986 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5987 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5988 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5989 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5990 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5991 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5992 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5993 (i386_emit_stack_adjust, i386_emit_int_call_1)
5994 (i386_emit_void_call_2): New.
5995 (i386_emit_ops): New.
5996 (x86_emit_ops): New.
5997 (the_low_target): Install x86_emit_ops.
5998 * server.h (struct emit_ops): New.
5999 (get_raw_reg_func_addr): Declare.
6000 (current_insn_ptr, emit_error): Declare.
6001 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6002 (set_trace_state_variable_value): New defines.
6003 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6004 addr_get_trace_state_variable_value and
6005 addr_set_trace_state_variable_value.
6006 (symbol_list): New fields for get_raw_reg,
6007 get_trace_state_variable_value and set_trace_state_variable_value.
6008 (condfn): New typedef.
6009 (struct tracepoint): New field `compiled_cond'.
6010 (do_action_at_tracepoint): Clear compiled_cond.
6011 (get_trace_state_variable_value, set_trace_state_variable_value):
6012 Export in the IPA.
6013 (condition_true_at_tracepoint): If there's a compiled condition,
6014 run that.
6015 (current_insn_ptr, emit_error): New globals.
6016 (struct bytecode_address): New.
6017 (get_raw_reg_func_addr): New.
6018 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6019 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6020 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6021 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6022 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6023 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6024 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6025 (compile_tracepoint_condition, compile_bytecodes): New.
6026 * target.h (emit_ops): Forward declare.
6027 (struct target_ops): New field emit_ops.
6028 (target_emit_ops): New.
6029 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6030 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6031 * linux-low.c (linux_emit_ops): New.
6032 (linux_target_ops): Install it.
6033 * linux-low.h (struct linux_target_ops): New field emit_ops.
6034
92b72907
UW
60352010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6036
6037 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6038 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6039
fa593d66
PA
60402010-06-01 Pedro Alves <pedro@codesourcery.com>
6041 Stan Shebs <stan@codesourcery.com>
6042
6043 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6044 (all): Depend on $(extra_libraries).
6045 (install-only): Install the IPA.
6046 (IPA_OBJS, IPA_LIB): New.
6047 (clean): Remove the IPA lib.
6048 (IPAGENT_CFLAGS): New.
6049 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6050 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6051 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6052 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6053 * configure.ac: Check for atomic builtins support in the compiler.
6054 (IPA_DEPFILES, extra_libraries): Define.
6055 * configure.srv (ipa_obj): Add description.
6056 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6057 (i[34567]86-*-linux*): Set ipa_obj.
6058 (x86_64-*-linux*): Set ipa_obj.
6059 * linux-low.c (stabilizing_threads): New.
6060 (supports_fast_tracepoints): New.
6061 (linux_detach): Stabilize threads before detaching.
6062 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6063 the lwp is either not stabilizing, or is moving out of a jump pad.
6064 (linux_fast_tracepoint_collecting): New.
6065 (maybe_move_out_of_jump_pad): New.
6066 (enqueue_one_deferred_signal): New.
6067 (dequeue_one_deferred_signal): New.
6068 (linux_wait_for_event_1): If moving out of a jump pad, defer
6069 pending signals to later.
6070 (linux_stabilize_threads): New.
6071 (linux_wait_1): Check if threads need moving out of jump pads, and
6072 do it if so.
6073 (stuck_in_jump_pad_callback): New.
6074 (move_out_of_jump_pad_callback): New.
6075 (lwp_running): New.
6076 (linux_resume_one_lwp): Handle moving out of jump pads.
6077 (linux_set_resume_request): Dequeue deferred signals.
6078 (need_step_over_p): Also step over fast tracepoint jumps.
6079 (start_step_over): Also uninsert fast tracepoint jumps.
6080 (finish_step_over): Also reinsert fast tracepoint jumps.
6081 (linux_install_fast_tracepoint_jump): New.
6082 (linux_target_ops): Install linux_stabilize_threads and
6083 linux_install_fast_tracepoint_jump_pad.
6084 * linux-low.h (linux_target_ops) <get_thread_area,
6085 install_fast_tracepoint_jump_pad>: New fields.
6086 (struct lwp_info) <collecting_fast_tracepoint,
6087 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6088 (linux_get_thread_area): Declare.
6089 * linux-x86-low.c (jump_insn): New.
6090 (x86_get_thread_area): New.
6091 (append_insns): New.
6092 (push_opcode): New.
6093 (amd64_install_fast_tracepoint_jump_pad): New.
6094 (i386_install_fast_tracepoint_jump_pad): New.
6095 (x86_install_fast_tracepoint_jump_pad): New.
6096 (the_low_target): Install x86_get_thread_area and
6097 x86_install_fast_tracepoint_jump_pad.
6098 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6099 (struct fast_tracepoint_jump): New.
6100 (fast_tracepoint_jump_insn): New.
6101 (fast_tracepoint_jump_shadow): New.
6102 (find_fast_tracepoint_jump_at): New.
6103 (fast_tracepoint_jump_here): New.
6104 (delete_fast_tracepoint_jump): New.
6105 (set_fast_tracepoint_jump): New.
6106 (uninsert_fast_tracepoint_jumps_at): New.
6107 (reinsert_fast_tracepoint_jumps_at): New.
6108 (set_breakpoint_at): Use write_inferior_memory.
6109 (uninsert_raw_breakpoint): Use write_inferior_memory.
6110 (check_mem_read): Mask out fast tracepoint jumps.
6111 (check_mem_write): Mask out fast tracepoint jumps.
6112 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6113 (set_fast_tracepoint_jump): Declare.
6114 (delete_fast_tracepoint_jump)
6115 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6116 (reinsert_fast_tracepoint_jumps_at): Declare.
6117 * regcache.c: Don't compile many functions when building the
6118 in-process agent library.
6119 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6120 the register buffer in the heap.
6121 (free_register_cache): If the register buffer isn't owned by the
6122 regcache, don't free it.
6123 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6124 pre-existing register caches.
6125 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6126 type.
6127 (convert_ascii_to_int): : Constify `from' parameter type.
6128 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6129 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6130 the needed buffer in-place.
6131 (relocate_instruction): New.
6132 * server.c (handle_query) <qSymbols>: If the target supports
6133 tracepoints, give it a chance of looking up symbols. Report
6134 support for fast tracepoints.
6135 (handle_status): Stabilize threads.
6136 (process_serial_event): Adjust.
6137 * server.h (struct fast_tracepoint_jump): Forward declare.
6138 (struct process_info) <fast_tracepoint_jumps>: New field.
6139 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6140 (decode_X_packet, decode_M_packet): Adjust.
6141 (relocate_instruction): Declare.
6142 (in_process_agent_loaded): Declare.
6143 (tracepoint_look_up_symbols): Declare.
6144 (struct fast_tpoint_collect_status): Declare.
6145 (fast_tracepoint_collecting): Declare.
6146 (force_unlock_trace_buffer): Declare.
6147 (handle_tracepoint_bkpts): Declare.
6148 (initialize_low_tracepoint)
6149 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6150 * target.h (struct target_ops) <stabilize_threads,
6151 install_fast_tracepoint_jump_pad>: New fields.
6152 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6153 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6154 [HAVE_STDINT_H]: Include stdint.h.
6155 (trace_debug_1): Rename to ...
6156 (trace_vdebug): ... this.
6157 (trace_debug): Rename to ...
6158 (trace_debug_1): ... this. Add `level' parameter.
6159 (trace_debug): New.
6160 (ATTR_USED, ATTR_NOINLINE): New.
6161 (IP_AGENT_EXPORT): New.
6162 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6163 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6164 (about_to_request_buffer_space, trace_buffer_is_full)
6165 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6166 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6167 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6168 (traceframe_write_count, traceframes_created)
6169 (trace_state_variables)
6170 New renaming defines.
6171 (struct ipa_sym_addresses): New.
6172 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6173 (symbol_list): New.
6174 (ipa_sym_addrs): New.
6175 (all_tracepoint_symbols_looked_up): New.
6176 (in_process_agent_loaded): New.
6177 (write_e_ipa_not_loaded): New.
6178 (maybe_write_ipa_not_loaded): New.
6179 (tracepoint_look_up_symbols): New.
6180 (debug_threads) [IN_PROCESS_AGENT]: New.
6181 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6182 (UNKNOWN_SIDE_EFFECTS): New.
6183 (stop_tracing): New.
6184 (flush_trace_buffer): New.
6185 (stop_tracing_bkpt): New.
6186 (flush_trace_buffer_bkpt): New.
6187 (read_inferior_integer): New.
6188 (read_inferior_uinteger): New.
6189 (read_inferior_data_pointer): New.
6190 (write_inferior_data_pointer): New.
6191 (write_inferior_integer): New.
6192 (write_inferior_uinteger): New.
6193 (struct collect_static_trace_data_action): Delete.
6194 (enum tracepoint_type): New.
6195 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6196 <actions_str, step_actions, step_actions_str>: Only include in
6197 GDBserver.
fa593d66
PA
6198 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6199 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6200 (tracepoints): Use IP_AGENT_EXPORT.
6201 (last_tracepoint): Don't include in the IPA.
6202 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6203 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6204 (alloced_trace_state_variables): New.
6205 (trace_state_variables): Use IP_AGENT_EXPORT.
6206 (traceframe_t): Delete unused variable.
6207 (circular_trace_buffer): Don't include in the IPA.
6208 (trace_buffer_start): Delete.
6209 (struct trace_buffer_control): New.
6210 (trace_buffer_free): Delete.
6211 (struct ipa_trace_buffer_control): New.
6212 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6213 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6214 New.
6215 (trace_buffer_ctrl): New.
6216 (TRACE_BUFFER_CTRL_CURR): New.
6217 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6218 Reimplement as macros.
6219 (trace_buffer_wrap): Delete.
6220 (traceframe_write_count, traceframe_read_count)
6221 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6222 (struct tracepoint_hit_ctx) <type>: New field.
6223 (struct fast_tracepoint_ctx): New.
6224 (memory_barrier): New.
6225 (cmpxchg): New.
6226 (record_tracepoint_error): Update atomically in the IPA.
6227 (clear_inferior_trace_buffer): New.
6228 (about_to_request_buffer_space): New.
6229 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6230 updating the same buffer.
6231 (add_tracepoint): Default the tracepoint's type to trap
6232 tracepoint, and orig_size to -1.
6233 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6234 internal variables.
6235 (create_trace_state_variable): New parameter `gdb'. Handle it.
6236 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6237 (cmd_qtdp): Handle fast tracepoints.
6238 (cmd_qtdv): Adjust.
6239 (max_jump_pad_size): New.
6240 (gdb_jump_pad_head): New.
6241 (get_jump_space_head): New.
6242 (claim_jump_space): New.
6243 (sort_tracepoints): New.
6244 (MAX_JUMP_SIZE): New.
6245 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6246 IPA.
6247 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6248 support. Upload fast traceframes, and delete internal IPA
6249 breakpoints.
6250 (stop_tracing_handler): New.
6251 (flush_trace_buffer_handler): New.
6252 (cmd_qtstop): Upload fast tracepoints.
6253 (response_tracepoint): Handle fast tracepoints.
6254 (tracepoint_finished_step): Upload fast traceframes. Set the
6255 tracepoint hit context's tracepoint type.
6256 (handle_tracepoint_bkpts): New.
6257 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6258 type. Add comment about fast tracepoints.
6259 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6260 non-existing action_str field.
6261 (get_context_regcache): Handle fast tracepoints.
6262 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6263 to the regcache.
6264 (fast_tracepoint_from_jump_pad_address): New.
6265 (fast_tracepoint_from_ipa_tpoint_address): New.
6266 (collecting_t): New.
6267 (force_unlock_trace_buffer): New.
6268 (fast_tracepoint_collecting): New.
6269 (collecting): New.
6270 (gdb_collect): New.
6271 (write_inferior_data_ptr): New.
6272 (target_tp_heap): New.
6273 (target_malloc): New.
6274 (download_agent_expr): New.
6275 (UALIGN): New.
6276 (download_tracepoints): New.
6277 (download_trace_state_variables): New.
6278 (upload_fast_traceframes): New.
6279 (IPA_FIRST_TRACEFRAME): New.
6280 (IPA_NEXT_TRACEFRAME_1): New.
6281 (IPA_NEXT_TRACEFRAME): New.
6282 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6283 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6284 (gdb_jump_pad_buffer_end): New.
6285 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6286 (initialize_tracepoint): Adjust.
6287 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6288 buffer. Initialize the low module.
6289 * utils.c (PREFIX, TOOLNAME): New.
6290 (malloc_failure): Use PREFIX.
6291 (error): In the IPA, an error causes an exit.
6292 (fatal, warning): Use PREFIX.
6293 (internal_error): Use TOOLNAME.
6294 (NUMCELLS): Increase to 10.
6295 * configure, config.in: Regenerate.
6296
d149dd1d
PA
62972010-06-01 Pedro Alves <pedro@codesourcery.com>
6298
6299 * server.c (handle_query) <qSupported>: Do two passes over the
6300 qSupported string to avoid nesting strtok.
6301
f6528abd
JK
63022010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6303
6304 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6305 (CDEPS): New.
6306 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6307 -Wl,--dynamic-list.
6308 * configure: Regenerate.
6309 * proc-service.list: New.
6310
ca2a87a0
JK
63112010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6312
6313 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6314 New comment.
6315
363a6e9f
OS
63162010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6317
6318 * gdbreplay.c (remote_open): Check error return from socket() call by
6319 its equality to -1 not by it being negative.
6320 * remote-utils.c (remote_open): Likewise.
6321
d23b6cb1
PA
63222010-05-23 Pedro Alves <pedro@codesourcery.com>
6323
6324 * config.h: Regenerate.
6325
28d3cf85
MK
63262010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6327
6328 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6329 doesn't provide PTRACE_GET_THREAD_AREA.
6330
fea36a59
MK
63312010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6332
6333 * linux-m68k-low.c: Include <asm/ptrace.h>
6334 (ps_get_thread_area): Implement.
6335
24b066ba
DE
63362010-05-03 Doug Evans <dje@google.com>
6337
6338 * event-loop.c (struct callback_event): New struct.
6339 (callback_list): New global.
6340 (append_callback_event, delete_callback_event): New functions.
6341 (process_callback): New function.
6342 (start_event_loop): Call it.
6343 * remote-utils.c (NOT_SCHEDULED): Define.
6344 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6345 moved out of readchar.
6346 (readchar): Rewrite. Call reschedule before returning.
6347 (reset_readchar): New function.
6348 (remote_close): Call it.
6349 (process_remaining, reschedule): New functions.
6350 * server.h (callback_handler_func): New typedef.
6351 (append_callback_event, delete_callback_event): Declare.
6352
9836d6ea
PA
63532010-05-03 Pedro Alves <pedro@codesourcery.com>
6354
6355 * proc-service.c (ps_pglobal_lookup): Use
6356 thread_db_look_up_one_symbol.
6357 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6358 parameter. Use it instead of all_symbols_looked_up.
6359 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6360 field.
6361 (all_symbols_looked_up): Don't declare.
6362 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6363 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6364 field.
6365 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6366 Set all_symbols_looked_up here.
6367 (thread_db_look_up_one_symbol): New.
6368 (thread_db_get_tls_address): Adjust.
6369 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6370 thread_db object on the heap, and tentatively set it in the
6371 process structure.
6372 (thread_db_init): Don't set all_symbols_looked_up here.
6373 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6374
7984d532
PA
63752010-05-03 Pedro Alves <pedro@codesourcery.com>
6376
6377 * linux-low.c (linux_kill, linux_detach): Adjust.
6378 (status_pending_p_callback): Remove redundant statement. Check
6379 for !TARGET_WAITIKIND_IGNORE, instead of
6380 TARGET_WAITKIND_STOPPED.
6381 (handle_tracepoints): Make sure LWP is locked. Adjust.
6382 (linux_wait_for_event_1): Adjust.
6383 (linux_cancel_breakpoints): New.
6384 (unsuspend_one_lwp): New.
6385 (unsuspend_all_lwps): New.
6386 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6387 (send_sigstop_callback): Change return type to int, add new
6388 `except' parameter and handle it.
6389 (suspend_and_send_sigstop_callback): New.
6390 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6391 pass them down. If SUSPEND, also increment the lwp's suspend
6392 count.
6393 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6394 (need_step_over_p): Don't consider suspended LWPs.
6395 (start_step_over): Adjust.
6396 (proceed_one_lwp): Change return type to int, add new `except'
6397 parameter and handle it.
6398 (unsuspend_and_proceed_one_lwp): New.
6399 (proceed_all_lwps): Use find_inferior instead of
6400 for_each_inferior.
6401 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6402 also decrement the suspend count of LWPs. Pass `except' down,
6403 instead of hacking its suspend count.
6404 (linux_pause_all): Add `freeze' parameter. Adjust.
6405 (linux_unpause_all): New.
6406 (linux_target_ops): Install linux_unpause_all.
6407 * server.c (handle_status): Adjust.
6408 * target.h (struct target_ops): New fields `unpause_all' and
6409 `cancel_breakpoints'. Add new parameter to `pause_all'.
6410 (pause_all): Add new `freeze' parameter.
6411 (unpause_all): New.
6412 (cancel_breakpoints): New.
6413 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6414 cancel breakpoints.
6415 (cmd_qtstart): Pause threads.
6416 (stop_tracing): Pause threads, and cancel breakpoints.
6417 * win32-low.c (win32_target_ops): Adjust.
6418
e471f25b
PA
64192010-05-03 Pedro Alves <pedro@codesourcery.com>
6420
6421 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6422 the inferior right away from here...
6423 (linux_wait_1): ... to here, and adjust to check the thread's
6424 last_resume_kind instead of the lwp's step or stop_expected flags.
6425
1915ef4f
PA
64262010-05-02 Pedro Alves <pedro@codesourcery.com>
6427
6428 * README: Use consistent `GDB' and `GDBserver' spellings.
6429
f9e39928
PA
64302010-05-02 Pedro Alves <pedro@codesourcery.com>
6431
6432 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6433 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6434 (linux_detach_one_lwp): Assume the lwp is stopped.
6435 (any_thread_of): Delete.
6436 (linux_detach): Stop all lwps here. Don't blindly delete all
6437 breakpoints.
6438 (delete_lwp_callback): New.
6439 (linux_mourn): Delete all lwps of the process that is gone.
6440 (linux_wait_1): Don't delete the last lwp of the process here.
6441 * mem-break.h (mark_breakpoints_out): Declare.
6442 * mem-break.c (mark_breakpoints_out): New.
6443 (free_all_breakpoints): Use it.
6444 * server.c (handle_target_event): If the process is gone, mark
6445 breakpoints out.
6446 * thread-db.c (struct thread_db) <create_bp>: New field.
6447 (thread_db_enable_reporting): Fix prototype. Store a thread event
6448 breakpoint reference in the thread_db struct.
6449 (thread_db_load_search): Clear the thread_db object.
6450 (try_thread_db_load_1): Ditto.
6451 (switch_to_process): New.
6452 (disable_thread_event_reporting): Use it.
6453 (remove_thread_event_breakpoints): New.
6454 (thread_db_detach, thread_db_mourn): Use it.
6455
1e7fc18c
PA
64562010-05-01 Pedro Alves <pedro@codesourcery.com>
6457
6458 * linux-low.c (linux_enable_event_reporting): New.
6459 (linux_wait_for_event_1, handle_extended_wait): Use it.
6460
02fc4de7
PA
64612010-04-30 Pedro Alves <pedro@codesourcery.com>
6462
6463 * linux-low.c (linux_kill_one_lwp, linux_kill)
6464 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6465 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6466 SIGSTOP even if the LWP is stopped.
6467 (send_sigstop_callback): New.
6468 (stop_all_lwps): Use send_sigstop_callback instead.
6469 (linux_resume_one_thread): Adjust.
6470 (proceed_one_lwp): Still proceed an LWP that the client has
6471 requested to stop, if we haven't reported it as stopped yet. Make
6472 sure that LWPs the client want stopped, have a pending SIGSTOP.
6473
bc3b5632
DE
64742010-04-26 Doug Evans <dje@google.com>
6475
ae1ada35
DE
6476 * server.c (handle_general_set): Make static.
6477
bc3b5632
DE
6478 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6479 Print received char after testing for error/eof instead of before.
6480 (input_interrupt): Tweak comment.
6481
65730243
DE
64822010-04-23 Doug Evans <dje@google.com>
6483
6484 * server.c (start_inferior): Print inferior argv if --debug.
6485
a8ae7dc0
AR
64862010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6487
6488 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6489 * nto-x86-low.c: Include server.h
6490
1c07cc19
PM
64912010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6492
6493 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6494 be consistent with other sources of this directory.
6495 (init_registers_amd64): Correct name of source file of this function
6496 in the comment.
6497
e0a61e09
PM
64982010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6499
6500 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6501 64-bit executables.
6502
54709339
PM
65032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6504
6505 * win32-i386-low.c: Add 64-bit support.
6506 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6507 (init_registers_amd64): Declare.
6508 (mappings): Add 64-bit version of array.
6509 (init_windows_x86): New function.
6510 (the_low_target): Change init_arch field to init_windows_x86.
6511
e8f0053d
PM
65122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6513
6514 * win32-low.c: Adapt to support also 64-bit architecture.
6515 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6516 (get_image_name): Use SIZE_T type for local variable `done'.
6517 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6518 (toolhelp_get_dll_name): Idem.
6519 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6520 Use uintptr_t typecast to avoid warning.
6521 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6522 (handle_exception): Use phex_nz to avoid warning.
6523 (win32_wait): Remove unused local variable `process'.
6524
c481e77e
PM
65252010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6526
6527 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6528 `amd64-avx.o'.
6529
12ea4b69
PM
65302010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6531
6532 * configure.ac: Use `ws2_32' library for srv_mingw.
6533 * configure: Regenerate.
6534 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6535 * remote-utils.c: Likewise.
6536
f6d1620c
L
65372010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6538
6539 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6540 if __x86_64__ is defined.
6541
8e642873
PM
65422010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6543
6544 * configure: Regenerate.
6545
711e434b
PM
65462010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6547
6548 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6549 * target.h (target_ops): New get_tib_address field.
6550 * win32-low.h (win32_thread_info): Add thread_local_base field.
6551 * win32-low.c (child_add_thread): Add tlb argument.
6552 Set thread_local_base field to TLB.
6553 (get_child_debug_event): Adapt to child_add_thread change.
6554 (win32_get_tib_address): New function.
6555 (win32_target_ops): Set get_tib_address field to
6556 win32_get_tib_address.
6557 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6558
505106cd
PA
65592010-04-12 Pedro Alves <pedro@codesourcery.com>
6560
505106cd
PA
6561 * linux-low.c (linux_mourn): Also remove the process.
6562 * server.c (handle_target_event): Don't remove the process here.
6563 * nto-low.c (nto_mourn): New.
6564 (nto_target_ops): Install it.
6565 * spu-low.c (spu_mourn): New.
6566 (spu_target_ops): Install it.
6567 * win32-low.c (win32_mourn): New.
6568 (win32_target_ops): Install it.
6569
e8470a06
PA
65702010-04-12 Pedro Alves <pedro@codesourcery.com>
6571
6572 * server.h (buffer_xml_printf): Remove redundant `;'.
6573
45ba0d02
PA
65742010-04-12 Pedro Alves <pedro@codesourcery.com>
6575
6576 * regcache.c (set_register_cache): Invalidate regcaches before
6577 changing the register cache layout.
6578 (regcache_invalidate_one): Allow a NULL regcache.
6579 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6580 regcaches before changing the register cache layout or the target
6581 regsets.
6582
59e04013
L
65832010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6584
6585 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6586 variable warning on Linux/x86-64.
6587
8336d594
PA
65882010-04-11 Pedro Alves <pedro@codesourcery.com>
6589
6590 GDBserver disconnected tracing support.
6591
6592 * linux-low.c (linux_remove_process): Delete.
6593 (add_lwp): Don't set last_resume_kind here.
6594 (linux_kill): Use `mourn'.
6595 (linux_detach): Use `thread_db_detach', and `mourn'.
6596 (linux_mourn): New.
6597 (linux_attach_lwp_1): Adjust comment.
6598 (linux_attach): last_resume_kind moved the thread_info; adjust.
6599 (status_pending_p_callback): Adjust.
6600 (linux_wait_for_event_1): Adjust.
6601 (count_events_callback, select_singlestep_lwp_callback)
6602 (select_event_lwp_callback, cancel_breakpoints_callback)
6603 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6604 (proceed_one_lwp): Adjust.
6605 (linux_async): Add debug output.
6606 (linux_thread_stopped): New.
6607 (linux_pause_all): New.
6608 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6609 linux_pause_all.
6610 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6611 (thread_db_free): Delete declaration.
6612 (thread_db_detach, thread_db_mourn): Declare.
6613 * thread-db.c (thread_db_init): Use thread_db_mourn.
6614 (thread_db_free): Delete, split in two.
6615 (disable_thread_event_reporting): New.
6616 (thread_db_detach): New.
6617 (thread_db_mourn): New.
6618
6619 * server.h (struct thread_info) <last_resume_kind>: New field.
6620 <attached>: Add comment.
6621 <gdb_detached>: New field.
6622 (handler_func): Change return type to int.
6623 (handle_serial_event, handle_target_event): Ditto.
6624 (gdb_connected): Declare.
6625 (tracing): Delete.
6626 (disconnected_tracing): Declare.
6627 (stop_tracing): Declare.
6628
6629 * server.c (handle_query) <qSupported>: Report support for
6630 disconnected tracing.
6631 (queue_stop_reply_callback): Account for running threads.
6632 (gdb_wants_thread_stopped): New.
6633 (gdb_wants_all_threads_stopped): New.
6634 (gdb_reattached_process): New.
6635 (handle_status): Clear the `gdb_detached' flag of all processes.
6636 In all-stop, stop all threads.
6637 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6638 (process_serial_event): If the remote connection breaks, or if an
6639 exit was forced with "monitor exit", force an event loop exit.
6640 Handle disconnected tracing on detach.
6641 (handle_serial_event): Adjust.
6642 (handle_target_event): If GDB isn't connected, forward events back
6643 to the inferior, unless the last process exited, in which case,
6644 exit gdbserver. Adjust interface.
6645
6646 * remote-utils.c (remote_open): Don't block in accept. Instead
6647 register an event loop source on the listen socket file
6648 descriptor. Refactor bits into ...
6649 (listen_desc): ... this new global.
6650 (gdb_connected): ... this new function.
6651 (enable_async_notification): ... this new function.
6652 (handle_accept_event): ... this new function.
6653 (remote_close): Clear remote_desc.
6654
6655 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6656
6657 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6658 New fields.
6659 (mourn_inferior): Define.
6660 (target_process_qsupported): Avoid the dangling else problem.
6661 (thread_stopped): Define.
6662 (pause_all): Define.
6663 (target_waitstatus_to_string): Declare.
6664 * target.c (target_waitstatus_to_string): New.
6665
6666 * tracepoint.c (tracing): Make extern.
6667 (disconnected_tracing): New.
6668 (stop_tracing): Make extern. Handle tracing stops due to GDB
6669 disconnecting.
6670 (cmd_qtdisconnected): New.
6671 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6672 (handle_tracepoint_general_set): Handle QTDisconnected.
6673
6674 * event-loop.c (event_handler_func): Change return type to int.
6675 (process_event): Bail out if the event handler wants the event
6676 loop to stop.
6677 (handle_file_event): Ditto.
6678 (start_event_loop): Bail out if the event handler wants the event
6679 loop to stop.
6680
6681 * nto-low.c (nto_target_ops): Adjust.
6682 * spu-low.c (spu_wait): Don't remove the process here.
6683 (spu_target_ops): Adjust.
6684 * win32-low.c (win32_wait): Don't remove the process here.
6685 (win32_target_ops): Adjust.
6686
5d267c4c
PA
66872010-04-11 Pedro Alves <pedro@codesourcery.com>
6688
6689 * regcache.c (realloc_register_cache): Invalidate inferior's
6690 regcache before recreating it.
6691
623ccd72
PA
66922010-04-09 Pedro Alves <pedro@codesourcery.com>
6693
6694 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6695
219f2f23
PA
66962010-04-09 Stan Shebs <stan@codesourcery.com>
6697 Pedro Alves <pedro@codesourcery.com>
6698
6699 * server.h (LONGEST): New.
6700 (struct thread_info) <while_stepping>: New field.
6701 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6702 Declare.
6703 (initialize_tracepoint, handle_tracepoint_general_set)
6704 (handle_tracepoint_query, tracepoint_finished_step)
6705 (tracepoint_was_hit, release_while_stepping_state_list):
6706 (current_traceframe): Declare.
6707 * server.c (handle_general_set): Handle tracepoint packets.
6708 (read_memory): New.
6709 (write_memory): New.
6710 (handle_search_memory_1): Use read_memory.
6711 (handle_query): Report support for conditional tracepoints, trace
6712 state variables, and tracepoint sources. Handle tracepoint
6713 queries.
6714 (main): Initialize the tracepoints module.
6715 (process_serial_event): Handle traceframe reads/writes.
6716
6717 * linux-low.c (handle_tracepoints): New.
6718 (linux_wait_1): Call it.
6719 (linux_resume_one_lwp): Handle while-stepping.
6720 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6721 (linux_target_ops): Install them.
6722 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6723 New field.
6724 * linux-x86-low.c (x86_supports_tracepoints): New.
6725 (the_low_target). Install it.
6726
6727 * mem-break.h (delete_breakpoint): Declare.
6728 * mem-break.c (delete_breakpoint): Make external.
6729
6730 * target.h (struct target_ops): Add `supports_tracepoints',
6731 `read_pc', and `write_pc' fields.
6732 (target_supports_tracepoints): Define.
6733 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6734 (phex_nz): New.
6735
6736 * regcache.h (struct regcache) <registers_owned>: New field.
6737 (init_register_cache, regcache_cpy): Declare.
6738 (regcache_read_pc, regcache_write_pc): Declare.
6739 (register_cache_size): Declare.
6740 (supply_regblock): Declare.
6741 * regcache.c (init_register_cache): New.
6742 (new_register_cache): Use it.
6743 (regcache_cpy): New.
6744 (register_cache_size): New.
6745 (supply_regblock): New.
6746 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6747
219f2f23
PA
6748 * tracepoint.c: New.
6749
6750 * Makefile.in (OBS): Add tracepoint.o.
6751 (tracepoint.o): New rule.
6752
3a13a53b
L
67532010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6754
6755 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6756 (i386-mmx.o): New.
6757 (i386-mmx.c): Likewise.
6758 (i386-mmx-linux.o): Likewise.
6759 (i386-mmx-linux.c): Likewise.
6760
6761 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6762 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6763 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6764 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6765
6766 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6767 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6768 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6769
1570b33e
L
67702010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6771
6772 * Makefile.in (clean): Updated.
6773 (i386-avx.o): New.
6774 (i386-avx.c): Likewise.
6775 (i386-avx-linux.o): Likewise.
6776 (i386-avx-linux.c): Likewise.
6777 (amd64-avx.o): Likewise.
6778 (amd64-avx.c): Likewise.
6779 (amd64-avx-linux.o): Likewise.
6780 (amd64-avx-linux.c): Likewise.
6781
6782 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6783 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6784 (srv_amd64_regobj): Add amd64-avx.o.
6785 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6786 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6787 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6788 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6789 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6790 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6791 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6792
6793 * i387-fp.c: Include "i386-xstate.h".
6794 (i387_xsave): New.
6795 (i387_cache_to_xsave): Likewise.
6796 (i387_xsave_to_cache): Likewise.
6797 (x86_xcr0): Likewise.
6798
6799 * i387-fp.h (i387_cache_to_xsave): Likewise.
6800 (i387_xsave_to_cache): Likewise.
6801 (x86_xcr0): Likewise.
6802
6803 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6804 * linux-crisv32-low.c (target_regsets): Likewise.
6805 * linux-m68k-low.c (target_regsets): Likewise.
6806 * linux-mips-low.c (target_regsets): Likewise.
6807 * linux-ppc-low.c (target_regsets): Likewise.
6808 * linux-s390-low.c (target_regsets): Likewise.
6809 * linux-sh-low.c (target_regsets): Likewise.
6810 * linux-sparc-low.c (target_regsets): Likewise.
6811 * linux-xtensa-low.c (target_regsets): Likewise.
6812
6813 * linux-low.c: Include <sys/uio.h>.
6814 (regsets_fetch_inferior_registers): Support nt_type.
6815 (regsets_store_inferior_registers): Likewise.
6816 (linux_process_qsupported): New.
6817 (linux_target_ops): Add linux_process_qsupported.
6818
6819 * linux-low.h (regset_info): Add nt_type.
6820 (linux_target_ops): Add process_qsupported.
6821
6822 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6823 and <sys/uio.h>.
6824 (init_registers_i386_avx_linux): New.
6825 (init_registers_amd64_avx_linux): Likewise.
6826 (xmltarget_i386_linux_no_xml): Likewise.
6827 (xmltarget_amd64_linux_no_xml): Likewise.
6828 (PTRACE_GETREGSET): Likewise.
6829 (PTRACE_SETREGSET): Likewise.
6830 (x86_fill_xstateregset): Likewise.
6831 (x86_store_xstateregset): Likewise.
6832 (use_xml): Likewise.
6833 (x86_linux_update_xmltarget): Likewise.
6834 (x86_linux_process_qsupported): Likewise.
6835 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6836 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6837 init_registers_i386_linux here. Call
6838 x86_linux_update_xmltarget.
6839 (the_low_target): Add x86_linux_process_qsupported.
6840
6841 * server.c (handle_query): Call target_process_qsupported.
6842
6843 * target.h (target_ops): Add process_qsupported.
6844 (target_process_qsupported): New.
6845
fc7238bb
PA
68462010-04-03 Pedro Alves <pedro@codesourcery.com>
6847
6848 * inferiors.c (add_thread): Set last_status kind to
6849 TARGET_WAITKIND_IGNORE.
6850 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6851 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6852 (linux_wait_1): Move `thread' local definition to block that uses
6853 it. Don't NULL initialize `event_child'.
6854 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6855 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6856 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6857
bdabb078
PA
68582010-04-01 Pedro Alves <pedro@codesourcery.com>
6859
6860 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6861 an extended waitstatus, or by a watchpoint.
6862 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6863 thread was stepping or has been stopped by a watchpoint.
6864
d3bbe7a0
PA
68652010-04-01 Pedro Alves <pedro@codesourcery.com>
6866
6867 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6868 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6869 of another, then delete the previous, and validate all
6870 breakpoints.
6871 (validate_inserted_breakpoint): New.
6872 (delete_disabled_breakpoints): New.
6873 (validate_breakpoints): New.
6874 (check_mem_read): Validate breakpoints before trusting their
6875 shadow. Delete disabled breakpoints.
6876 (check_mem_write): Validate breakpoints before trusting they
6877 should be inserted. Delete disabled breakpoints.
6878 * mem-break.h (validate_breakpoints):
6879 * server.c (handle_query): Validate breakpoints when we see a
6880 qSymbol query.
6881
8b07ae33
PA
68822010-04-01 Pedro Alves <pedro@codesourcery.com>
6883
6884 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6885 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6886 if we could tell there's a GDB breakpoint at stop_pc.
6887 (need_step_over_p): Don't do a step over if we find a GDB
6888 breakpoint at the resume PC.
6889
6890 * mem-break.c (struct raw_breakpoint): New.
6891 (enum bkpt_type): New type `gdb_breakpoint'.
6892 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6893 fields. New field `raw'.
6894 (find_raw_breakpoint_at): New.
6895 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6896 breakpoint instead.
6897 (set_breakpoint_at): Adjust.
6898 (delete_raw_breakpoint): New.
6899 (release_breakpoint): New.
6900 (delete_breakpoint): Rename to...
6901 (delete_breakpoint_1): ... this. Add proc parameter. Use
6902 release_breakpoint. Return ENOENT.
6903 (delete_breakpoint): Reimplement.
6904 (find_breakpoint_at): Delete.
6905 (find_gdb_breakpoint_at): New.
6906 (delete_breakpoint_at): Delete.
6907 (set_gdb_breakpoint_at): New.
6908 (delete_gdb_breakpoint_at): New.
6909 (gdb_breakpoint_here): New.
6910 (set_reinsert_breakpoint): Use release_breakpoint.
6911 (uninsert_breakpoint): Rename to ...
6912 (uninsert_raw_breakpoint): ... this.
6913 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6914 (reinsert_raw_breakpoint): Change parameter type to
6915 raw_breakpoint.
6916 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6917 instead.
6918 (check_breakpoints): Adjust. Use release_breakpoint.
6919 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6920 (breakpoint_inserted_here): Ditto.
6921 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6922 Don't trust the breakpoint's shadow if it is not inserted.
6923 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6924 (delete_all_breakpoints): Adjust.
6925 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6926 use delete_breakpoint_1.
6927
6928 * mem-break.h (breakpoints_supported): Delete declaration.
6929 (set_gdb_breakpoint_at): Declare.
6930 (gdb_breakpoint_here): Declare.
6931 (delete_breakpoint_at): Delete.
6932 (delete_gdb_breakpoint_at): Declare.
6933
6934 * server.h (struct raw_breakpoint): Forward declare.
6935 (struct process_info): New field `raw_breakpoints'.
6936
6937 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6938 breakpoints.
6939
6bf5e0ba
PA
69402010-03-24 Pedro Alves <pedro@codesourcery.com>
6941
6942 * linux-low.c (status_pending_p_callback): Fix comment.
6943 (linux_wait_for_event_1): Move most of the internal breakpoint
6944 handling from here...
6945 (linux_wait_1): ... to here.
6946 (count_events_callback): New.
6947 (select_singlestep_lwp_callback): New.
6948 (select_event_lwp_callback): New.
6949 (cancel_breakpoints_callback): New.
6950 (select_event_lwp): New.
6951 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6952 priority to all LWPs that have had events that should be reported
6953 to the client. Cancel breakpoints when about to reporting the
6954 event to the client, not while stopping lwps. No longer cancel
6955 finished single-steps here.
6956 (cancel_finished_single_step): Delete.
6957 (cancel_finished_single_steps): Delete.
6958
414a389f
PA
69592010-03-24 Pedro Alves <pedro@codesourcery.com>
6960
6961 * mem-break.c (enum bkpt_type): New.
6962 (struct breakpoint): New field `type'.
6963 (set_breakpoint_at): Change return type to struct breakpoint
6964 pointer. Set type to `other_breakpoint' by default.
6965 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6966 in the breakpoint list.
6967 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6968 (reinsert_breakpoint): Rename to ...
6969 (reinsert_raw_breakpoint): ... this.
6970 (reinsert_breakpoints_at): Adjust.
6971 * mem-break.h (struct breakpoint): Declare.
6972 (set_breakpoint_at): Change return type to struct breakpoint
6973 pointer.
6974
2280c721
PA
69752010-03-24 Pedro Alves <pedro@codesourcery.com>
6976
6977 * server.c (handle_query): Assign, not compare.
6978
d50171e4
PA
69792010-03-24 Pedro Alves <pedro@codesourcery.com>
6980
6981 Teach linux gdbserver to step-over-breakpoints.
6982
6983 * linux-low.c (can_hardware_single_step): New.
6984 (supports_breakpoints): New.
6985 (handle_extended_wait): If stopping threads, read the stop pc of
6986 the new cloned LWP.
6987 (get_pc): New.
6988 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6989 low target doesn't support retrieving the PC.
6990 (add_lwp): Set last_resume_kind to resume_continue.
6991 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6992 (linux_attach): Don't clear stop_expected. Set the lwp's
6993 last_resume_kind to resume_stop.
6994 (linux_detach_one_lwp): Don't check for removed breakpoints.
6995 (check_removed_breakpoint): Delete.
6996 (status_pending_p): Rename to ...
6997 (status_pending_p_callback): ... this. Don't check for removed
6998 breakpoints. Don't consider threads that are stopped from GDB's
6999 perspective.
7000 (linux_wait_for_lwp): Always read the stop_pc here.
7001 (cancel_breakpoint): New.
7002 (step_over_bkpt): New global.
7003 (linux_wait_for_event_1): Implement stepping over breakpoints.
7004 (gdb_wants_lwp_stopped): New.
7005 (gdb_wants_all_stopped): New.
7006 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7007 single-step traps here. Store the thread's last reported target
7008 wait status.
7009 (send_sigstop): Don't clear stop_expected. Always set it,
7010 instead.
7011 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7012 (cancel_finished_single_step): New.
7013 (cancel_finished_single_steps): New.
7014 (wait_for_sigstop): Don't cancel finished single-step traps here.
7015 (linux_resume_one_lwp): Don't check for removed breakpoints.
7016 Don't set `step' on non-hardware step archs.
7017 (linux_set_resume_request): Ignore resume_stop requests if already
7018 stopping or stopped. Set the lwp's last_resume_kind.
7019 (resume_status_pending_p): Don't check for removed breakpoints.
7020 (need_step_over_p): New.
7021 (start_step_over): New.
7022 (finish_step_over): New.
7023 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7024 requests. Clear the thread's last reported target waitstatus.
7025 Don't use the `suspended' flag. Don't consider pending breakpoints.
7026 (linux_resume): Start a step-over if necessary.
7027 (proceed_one_lwp): New.
7028 (proceed_all_lwps): New.
7029 (unstop_all_lwps): New.
7030 * linux-low.h (struct lwp_info): Rewrite comment for the
7031 `suspended' flag. Add the `stop_pc' field. Delete the
7032 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7033 Add `'last_resume_kind' and `need_step_over' fields.
7034 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7035 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7036 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7037 (set_raw_breakpoint_at): New.
7038 (set_breakpoint_at): Rewrite to use it.
7039 (reinsert_breakpoint_handler): Delete.
7040 (set_reinsert_breakpoint): New.
7041 (reinsert_breakpoint_by_bp): Delete.
7042 (delete_reinsert_breakpoints): New.
7043 (uninsert_breakpoint): Rewrite.
7044 (uninsert_breakpoints_at): New.
7045 (reinsert_breakpoint): Rewrite.
7046 (reinsert_breakpoints_at): New.
7047 (check_breakpoints): Rewrite.
7048 (breakpoint_here): New.
7049 (breakpoint_inserted_here): New.
7050 (check_mem_read): Adjust.
7051 * mem-break.h (breakpoints_supported, breakpoint_here)
7052 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7053 (reinsert_breakpoint_by_bp): Delete declaration.
7054 (delete_reinsert_breakpoints): Declare.
7055 (reinsert_breakpoint): Delete declaration.
7056 (reinsert_breakpoints_at): Declare.
7057 (uninsert_breakpoint): Delete declaration.
7058 (uninsert_breakpoints_at): Declare.
7059 (check_breakpoints): Adjust prototype.
7060 * server.h: Adjust include order.
7061 (struct thread_info): Declare here. Add a `last_status' field.
7062
30ba68cb
MS
70632010-03-23 Michael Snyder <msnyder@vmware.com>
7064
7065 * server.c (crc32): New function.
7066 (handle_query): Add handling for 'qCRC:' request.
7067
b9a881c2
PA
70682010-03-23 Pedro Alves <pedro@codesourcery.com>
7069
7070 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7071 lwp had been stopped by a watchpoint.
7072
e92d13d5
PA
70732010-03-16 Pedro Alves <pedro@codesourcery.com>
7074
7075 * server.h (internal_error): Declare.
7076 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7077 * utils.c (internal_error): New function.
7078
64daa791
AS
70792010-03-15 Andreas Schwab <schwab@redhat.com>
7080
7081 * configure.srv: Fix typo setting srv_regobj.
7082
f52cd8cd
PA
70832010-03-15 Pedro Alves <pedro@codesourcery.com>
7084
7085 * linux-low.c (fetch_register): Avoid passing a non string literal
7086 format to `error'.
7087 (usr_store_inferior_registers): Ditto.
7088
93ae6fdc
PA
70892010-03-14 Pedro Alves <pedro@codesourcery.com>
7090
7091 * linux-low.c (linux_write_memory): Bail out early if peeking
7092 memory failed.
7093
c3adc08c
PA
70942010-03-14 Pedro Alves <pedro@codesourcery.com>
7095
7096 * linux-low.h (struct lwp_info): New fields
7097 `stopped_by_watchpoint' and `stopped_data_address'.
7098 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7099 here, and cache them in the lwp object.
7100 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7101 directly.
7102 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7103 field.
7104 (linux_stopped_by_watchpoint): Rewrite.
7105 (linux_stopped_data_address): Rewrite.
7106
bce522a2
PA
71072010-03-06 Simo Melenius <simo.melenius@iki.fi>
7108
7109 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7110 switching the current inferior, not before.
7111
90884b2b
L
71122010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7113
7114 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7115 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7116 i386-linux.c and amd64-linux.c.
7117 (reg-i386.o): Removed.
7118 (reg-i386.c): Likewise.
7119 (reg-i386-linux.o): Likewise.
7120 (reg-i386-linux.c): Likewise.
7121 (reg-x86-64.o): Likewise.
7122 (reg-x86-64.c): Likewise.
7123 (reg-x86-64-linux.o): Likewise.
7124 (reg-x86-64-linux.c): Likewise.
7125 (i386.o): New.
7126 (i386.c): Likewise.
7127 (i386-linux.o): Likewise.
7128 (i386-linux.c): Likewise.
7129 (amd64.o): Likewise.
7130 (amd64.c): Likewise.
7131 (amd64-linux.o): Likewise.
7132 (amd64-linux.c): Likewise.
7133
7134 * configure.srv (srv_i386_regobj): New.
7135 (srv_i386_linux_regobj): Likewise.
7136 (srv_amd64_regobj): Likewise.
7137 (srv_amd64_linux_regobj): Likewise.
7138 (srv_i386_32bit_xmlfiles): Likewise.
7139 (srv_i386_64bit_xmlfiles): Likewise.
7140 (srv_i386_xmlfiles): Likewise.
7141 (srv_amd64_xmlfiles): Likewise.
7142 (srv_i386_linux_xmlfiles): Likewise.
7143 (srv_amd64_linux_xmlfiles): Likewise.
7144 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7145 srv_xmlfiles to $srv_i386_xmlfiles.
7146 (i[34567]86-*-mingw32ce*): Likewise.
7147 (i[34567]86-*-mingw*): Likewise.
7148 (i[34567]86-*-nto*): Likewise.
7149 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7150 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7151 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7152 (x86_64-*-linux*): Likewise.
7153
7154 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7155 (init_registers_amd64_linux): New.
7156 (x86_arch_setup): Replace init_registers_x86_64_linux with
7157 init_registers_amd64_linux.
7158
193f13e6
MK
71592010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7160
7161 * configure.ac: Check for libdl. If it is not available link against
7162 static libthread_db.
7163 * configure: Regenerate.
7164
85d721b8
PA
71652010-02-22 Pedro Alves <pedro@codesourcery.com>
7166
7167 PR9605
7168
7169 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7170 handing a read watchpoint.
7171 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7172
6076632b
DE
71732010-02-12 Doug Evans <dje@google.com>
7174
7175 * linux-low.c (linux_supports_tracefork_flag): Document.
7176 (linux_look_up_symbols): Add comment.
7177
3327ccf7
L
71782010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7179
7180 * regcache.c (supply_register): Clear regcache if buf is NULL.
7181
0718675c 71822010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7183 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7184
7185 * inferiors.c (find_inferior): Add function documentation.
7186 (unloaded_dll): Handle the case where the unloaded dll has not
7187 been previously registered in the dll list.
7188
177321bd
DJ
71892010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7190
7191 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7192 (thumb2_breakpoint): New.
7193 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7194
2b009048
DJ
71952010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7196
7197 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7198 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7199 breakpoints.
7200
3be029c7
PA
72012010-01-21 Pedro Alves <pedro@codesourcery.com>
7202
7203 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7204
18f5de3b
JK
72052010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7206
7207 * linux-s390-low.c (s390_collect_ptrace_register)
7208 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7209
3743bb4f
DE
72102010-01-21 Doug Evans <dje@google.com>
7211
14ce3065
DE
7212 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7213 (PTRACE_ARG4_TYPE): New macro.
7214 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7215 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7216 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7217 (usr_store_inferior_registers): Ditto.
7218 (linux_read_memory, linux_write_memory): Ditto.
7219 (linux_test_for_tracefork): Ditto.
7220
3743bb4f
DE
7221 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7222 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7223
8b315be5
PA
72242010-01-21 Pedro Alves <pedro@codesourcery.com>
7225
7226 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7227 target.
7228
85492558
PA
72292010-01-21 Pedro Alves <pedro@codesourcery.com>
7230
7231 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7232 prototype to take a regcache. Adjust.
7233
442ea881
PA
72342010-01-20 Pedro Alves <pedro@codesourcery.com>
7235
7236 * regcache.h (struct thread_info): Forward declare.
7237 (struct regcache): New.
7238 (new_register_cache): Adjust prototype.
7239 (get_thread_regcache): Declare.
7240 (free_register_cache): Adjust prototype.
7241 (registers_to_string, registers_from_string): Ditto.
7242 (supply_register, supply_register_by_name, collect_register)
7243 (collect_register_as_string, collect_register_by_name): Ditto.
7244 * regcache.c (struct inferior_regcache_data): Delete.
7245 (get_regcache): Rename to ...
7246 (get_thread_regcache): ... this. Adjust. Switch inferior before
7247 fetching registers.
7248 (regcache_invalidate_one): Adjust.
7249 (regcache_invalidate): Fix prototype.
7250 (new_register_cache): Return the new register cache.
7251 (free_register_cache): Change prototype.
7252 (realloc_register_cache): Adjust.
7253 (registers_to_string): Change prototype to take a regcache. Adjust.
7254 (registers_from_string): Ditto.
7255 (register_data): Ditto.
7256 (supply_register): Ditto.
7257 (supply_register_by_name): Ditto.
7258 (collect_register): Ditto.
7259 (collect_register_as_string): Ditto.
7260 (collect_register_by_name): Ditto.
7261 * server.c (process_serial_event): Adjust.
7262 * linux-low.h (regset_fill_func, regset_store_func): Change
7263 prototype.
7264 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7265 Change prototype.
7266 * linux-low.c (get_stop_pc): Adjust.
7267 (check_removed_breakpoint): Adjust.
7268 (linux_wait_for_event): Adjust.
7269 (linux_resume_one_lwp): Adjust.
7270 (fetch_register): Add regcache parameter. Adjust.
7271 (usr_store_inferior_registers): Ditto.
7272 (regsets_fetch_inferior_registers): Ditto.
7273 (regsets_store_inferior_registers): Ditto.
7274 (linux_fetch_registers, linux_store_registers): Ditto.
7275 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7276 regcache. Adjust.
43aaf8b6
PA
7277 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7278 Ditto.
442ea881
PA
7279 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7280 prototype to take a regcache.
7281 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7282 * remote-utils.c (convert_ascii_to_int, outreg)
7283 (prepare_resume_reply): Change prototype to take a regcache.
7284 Adjust.
7285 * target.h (struct target_ops) <fetch_registers, store_registers>:
7286 Change prototype to take a regcache.
7287 (fetch_inferior_registers, store_inferior_registers): Change
7288 prototype to take a regcache. Adjust.
7289 * proc-service.c (ps_lgetregs): Adjust.
7290 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7291 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7292 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7293 take a regcache. Adjust.
7294 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7295 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7296 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7297 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7298 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7299 (cris_cannot_fetch_register):
7300 (cris_breakpoint_at): Change prototype to take a regcache.
7301 Adjust.
7302 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7303 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7304 to take a regcache. Adjust.
7305 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7306 Adjust.
7307 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7308 take a regcache. Adjust.
7309 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7310 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7311 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7312 * linux-mips-low.c (mips_get_pc):
7313 (mips_set_pc): Change prototype to take a regcache. Adjust.
7314 (mips_reinsert_addr): Adjust.
7315 (mips_collect_register): Change prototype to take a regcache.
7316 Adjust.
7317 (mips_supply_register):
7318 (mips_collect_register_32bit, mips_supply_register_32bit)
7319 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7320 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7321 * linux-ppc-low.c (ppc_supply_ptrace_register)
7322 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7323 (parse_spufs_run): Adjust.
7324 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7325 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7326 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7327 take a regcache. Adjust.
7328 * linux-s390-low.c (s390_collect_ptrace_register)
7329 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7330 (s390_set_pc): Change prototype to take a regcache. Adjust.
7331 (s390_arch_setup): Adjust.
7332 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7333 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7334 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7335 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7336 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7337 regcache. Adjust.
7338 (sparc_breakpoint_at): Adjust.
7339 * linux-xtensa-low.c (xtensa_fill_gregset):
7340 (xtensa_store_gregset):
7341 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7342 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7343 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7344 prototype to take a regcache. Adjust.
7345 * win32-arm-low.c (arm_fetch_inferior_register)
7346 (arm_store_inferior_register): Change prototype to take a
7347 regcache. Adjust.
7348 * win32-i386-low.c (i386_fetch_inferior_register)
7349 (i386_store_inferior_register): Change prototype to take a
7350 regcache. Adjust.
7351 * win32-low.c (child_fetch_inferior_registers)
7352 (child_store_inferior_registers): Change prototype to take a
7353 regcache. Adjust.
7354 (win32_wait): Adjust.
7355 (win32_fetch_inferior_registers): Change prototype to take a
7356 regcache. Adjust.
7357 (win32_store_inferior_registers): Adjust.
7358 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7359 store_inferior_register>: Change prototype to take a regcache.
7360
60c3d7b0
DE
73612010-01-20 Doug Evans <dje@google.com>
7362
7363 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7364 #ifdef.
7365 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7366 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7367
dc146f7c
VP
73682010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7369
7370 * linux-low.c (linux_core_of_thread): New.
7371 (compare_ints, show_process, list_threads): New.
7372 (linux_qxfer_osdata): Report threads and cores.
7373 (linux_target_op): Register linux_core_of_thread.
7374 * remote-utils.c (prepare_resume_reply): Report the core.
7375 (buffer_xml_printf): Support %d specifier.
7376 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7377 New.
7378 (handle_query): Handle qXfer:threads. Announce availability
7379 thereof.
7380 * target.h (struct target_ops): New field core_of_thread.
7381
7803799a
UW
73822010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7383
7384 * Makefile.in (clean): Remove new generated files.
7385 (reg-s390.o, reg-s390.c): Remove rules.
7386 (reg-s390x.o, reg-s390x.c): Likewise.
7387 (s390-linux32.o, s390-linux32.c): Add rules.
7388 (s390-linux64.o, s390-linux64.c): Likewise.
7389 (s390x-linux64.o, s390x-linux64.c): Likewise.
7390 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7391 * linux-s390-low.c: Include <elf.h>.
7392 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7393 (init_registers_s390): Remove prototype.
7394 (init_registers_s390x): Likewise.
7395 (init_registers_s390_linux32): Add prototype.
7396 (init_registers_s390_linux64): Likewise.
7397 (init_registers_s390x_linux64): Likewise.
7398 (s390_num_regs_3264): New define.
7399 (s390_regmap_3264): New global variable.
7400 (s390_cannot_fetch_register): Remove obsolete check.
7401 (s390_cannot_store_register): Likewise.
7402 (s390_collect_ptrace_register): Handle upper/lower register halves.
7403 (s390_supply_ptrace_register): Likewise.
7404 (s390_fill_gregset): Update to register number changes.
7405 (s390_get_hwcap): New routine.
7406 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7407 Install appropriate regmap and register set.
7408
6e7ffa39
JB
74092010-01-01 Joel Brobecker <brobecker@adacore.com>
7410
7411 * server.c (gdbserver_version): Update copyright year to 2010.
7412 * gdbreplay.c (gdbreplay_version): Likewise.
7413
957f3f49
DE
74142009-12-28 Doug Evans <dje@google.com>
7415
7416 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7417 elf/external.h. Include <elf.h> instead but only if necessary.
7418
ca5c370d
PA
74192009-12-28 Pedro Alves <pedro@codesourcery.com>
7420
7421 * linux-low.c (linux_remove_process): Remove `detaching'
7422 parameter. Don't release/detach from thread_db here.
7423 (linux_kill): Release/detach from thread_db here, ...
7424 (linux_detach): ... and here, before actually detaching.
7425 (linux_wait_1): ... and here, when a process exits.
7426 * thread-db.c (any_thread_of): New.
7427 (thread_db_free): Switch the current inferior to a thread of the
7428 passed in process.
7429
4ee62156
DE
74302009-12-21 Doug Evans <dje@google.com>
7431
d90e6a88
DE
7432 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7433
c5f62d5f
DE
7434 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7435 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7436 warning ifndef __NR_tkill. Move setting of errno there too.
7437 Delete unnecessary resetting of errno after syscall.
7438 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7439
10e86dd7
DE
7440 * configure.ac: Check for dladdr.
7441 * config.in: Regenerate.
7442 * configure: Regenerate.
7443 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7444 (try_thread_db_load): Update.
7445
4ee62156
DE
7446 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7447
00f515da
DE
74482009-12-18 Doug Evans <dje@google.com>
7449
e9464885
DE
7450 * event-loop.c: Include unistd.h if it exists.
7451
07d4f67e
DE
7452 * linux-low.c (my_waitpid): Move definition away from being in
7453 between linux_tracefork_child/linux_test_for_tracefork.
7454
00f515da
DE
7455 * gdb_proc_service.h (psaddr_t): Fix type.
7456 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7457 signature to match glibc.
7458
1de1badb
DE
74592009-12-16 Doug Evans <dje@google.com>
7460
7461 * linux-low.c (linux_read_memory): Fix argument to read.
7462
aeeb81d1
PA
74632009-11-26 Pedro Alves <pedro@codesourcery.com>
7464
7465 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7466 events, don't leave current_inferior pointing at null.
7467
10357975
PA
74682009-11-26 Pedro Alves <pedro@codesourcery.com>
7469
7470 * win32-low.c (LOG): Delete.
7471 (OUTMSG): Output to stderr.
7472 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7473 on compile time LOG macro.
7474 (win32_wait): Fix debug output.
7475
cf6e3471
PA
74762009-11-26 Pedro Alves <pedro@codesourcery.com>
7477
7478 * win32-low.c (win32_add_one_solib): If the dll name is
7479 "ntdll.dll", prepend the system directory to the dll path.
7480
0c85e18e
MK
74812009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7482
7483 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7484
9ac544ce 74852009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7486 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7487
7488 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7489 * configure.ac: Check for __mcoldfire__ and set
7490 gdb_cv_m68k_is_coldfire.
7491 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7492 reg-cf.o and reg-m68k.o.
7493 * configure: Regenerated.
7494
fd7dd3e6
PA
74952009-11-16 Pedro Alves <pedro@codesourcery.com>
7496
7497 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7498 Pass it to thread_db_free.
7499 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7500 proper `detaching' argument to linux_remove_process.
7501 * linux-low.h (thread_db_free): Add `detaching' parameter.
7502 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7503 to thread_db_free.
7504 (thread_db_free): Add `detaching' parameter. Only
7505 call td_ta_clear_event if detaching from process.
7506
75aa492e
MK
75072009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7508
7509 * thread-db.c (thread_db_free): Fix typo.
7510
21e1bee4
PP
75112009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7512
7513 PR gdb/10838
7514 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7515
8838b45e
NS
75162009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7517
7518 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7519 with an i686 compiler.
7520 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7521 needed.
7522 * configure: Rebuilt.
7523
8a35fb51
SL
75242009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7525
7526 PR gdb/10783
7527
7528 * server.c (handle_search_memory_1): Correct read_addr initialization
7529 in loop for searching subsequent chunks.
7530
96f15937
PP
75312009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7532
7533 * configure.ac: New --with-libthread-db option.
7534 * thread-db.c: Allow direct dependence on libthread_db.
7535 (thread_db_free): Adjust.
7536 * config.in: Regenerate.
7537 * configure: Likewise.
889bf7c5 7538
5f7d1694
PP
75392009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7540
7541 PR gdb/10757
7542 * thread-db.c (attach_thread): New function.
7543 (maybe_attach_thread): Return success/failure.
7544 (find_new_threads_callback): Adjust.
889bf7c5
PA
7545 (thread_db_find_new_threads): Loop until no new threads.
7546
88e3b899
PA
75472009-10-13 Pedro Alves <pedro@codesourcery.com>
7548
7549 * proc-service.c (ps_lgetregs): Formatting.
7550
cdbfd419
PP
75512009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7552
7553 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7554 * configure.ac: Adjust.
7555 * linux-low.h (struct process_info_private): Move members to struct
7556 thread_db.
7557 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7558 * linux-low.c (linux_remove_process): Adjust.
7559 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7560 * server.c (handle_query): Move code ...
7561 (handle_monitor_command): ... here. New function.
7562 * target.h (struct target_ops): New member.
7563 * thread-db.c (struct thread_db): New.
7564 (libthread_db_search_path): New variable.
7565 (thread_db_create_event, thread_db_enable_reporting)
7566 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7567 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7568 (try_thread_db_load_1, dladdr_to_soname): New functions.
7569 (try_thread_db_load, thread_db_load_search): New functions.
7570 (thread_db_init): Search for libthread_db.
7571 (thread_db_free): New function.
7572 (thread_db_handle_monitor_command): Likewise.
7573 * config.in: Regenerate.
7574 * configure: Regenerate.
889bf7c5 7575
4168d2d6
UW
75762009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7577
7578 * spu-low.c (spu_kill): Wait for inferior to terminate.
7579 Call clear_inferiors.
7580 (spu_detach): Call clear_inferiors.
7581
81ecdfbb
RW
75822009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7583
7584 * aclocal.m4: Regenerate.
7585 * config.in: Likewise.
7586 * configure: Likewise.
7587
0b9ff2c0
UW
75882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7589
7590 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7591 (parse_spufs_run): New function.
7592 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7593 (ppc_breakpoint_at): Handle SPU breakpoints.
7594
efcbbd14
UW
75952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7596
7597 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7598 (SPUFS_MAGIC): Define.
7599 (spu_enumerate_spu_ids): New function.
7600 (linux_qxfer_spu): New function.
7601 (linux_target_ops): Install linux_qxfer_spu.
7602
f4d9bade
UW
76032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7604
7605 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7606 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7607 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7608 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7609 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7610 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7611 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7612 (init_registers_powerpc_cell32l): Add prototype.
7613 (init_registers_powerpc_cell64l): Likewise.
7614 (ppc_arch_setup): Detect Cell/B.E. architecture.
7615
96e946ca
RW
76162009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7617
7618 * Makefile.in (datarootdir): New variable.
7619
58d6951d
DJ
76202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7621
7622 * linux-low.c (linux_write_memory): Update debugging output.
7623 * Makefile.in (clean): Add new descriptions.
7624 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7625 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7626 * configure.srv: Add new files for arm*-*-linux*.
7627 * linux-arm-low.c: Add new declarations.
7628 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7629 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7630 (HWCAP_VFPv3D16): New.
7631 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7632 instead of __IWMMXT__.
7633 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7634 (arm_arch_setup): New.
7635 (target_regsets): Remove #ifdef. Add VFP regset.
7636 (the_low_target): Use arm_arch_setup.
7637
12b42a12
DJ
76382009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7639
7640 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7641 the main thread again.
7642
ac8c974e
AR
76432009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7644
7645 Adding Neutrino gdbserver.
7646 * configure: Regenerated.
7647 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7648 * configure.srv (i[34567]86-*-nto*): New target.
7649 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7650 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7651 (nto_comctrl) [__QNX__]: New function.
7652 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7653
4424e0c3 76542009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7655
7656 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7657 srv_tgtobj.
7658
912cf4ba
PA
76592009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7660 Pedro Alves <pedro@codesourcery.com>
7661
7662 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7663 don't support CONTEXT_EXTENDED_REGISTERS.
7664 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7665 (the_low_target): Install them.
7666 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7667 failing with ERROR_PIPE_NOT_CONNECTED.
7668
aa5ca48f
DE
76692009-06-30 Doug Evans <dje@google.com>
7670 Pierre Muller <muller@ics.u-strasbg.fr>
7671
7672 Add h/w watchpoint support to x86-linux, win32-i386.
7673 * Makefile.in (SFILES): Add i386-low.c
7674 (i386_low_h): Define.
7675 (i386-low.o): Add dependencies.
7676 (linux-x86-low.o): Add i386-low.h dependency.
7677 (win32-i386-low.o): Ditto.
7678 * i386-low.c: New file.
7679 * i386-low.h: New file.
7680 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7681 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7682 * linux-low.c (linux_add_process): Initialize arch_private.
7683 (linux_remove_process): Free arch_private.
7684 (add_lwp): Initialize arch_private.
7685 (delete_lwp): Free arch_private.
7686 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7687 provided.
7688 * linux-low.h (process_info_private): New member arch_private.
7689 (lwp_info): New member arch_private.
7690 (linux_target_ops): New members new_process, new_thread,
7691 prepare_to_resume.
7692 (ptid_of): New macro.
7693 * linux-x86-low.c: Include stddef.h, i386-low.h.
7694 (arch_process_info): New struct.
7695 (arch_lwp_info): New struct.
7696 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7697 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7698 (i386_dr_low_get_status): New function.
7699 (x86_insert_point, x86_remove_point): New functions.
7700 (x86_stopped_by_watchpoint): New function.
7701 (x86_stopped_data_address): New function.
7702 (x86_linux_new_process, x86_linux_new_thread): New functions.
7703 (x86_linux_prepare_to_resume): New function.
7704 (the_low_target): Add entries for insert_point, remove_point,
7705 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7706 prepare_to_resume.
7707 * server.c (debug_hw_points): New global.
7708 (monitor_show_help): Document set debug-hw-points.
7709 (handle_query): Process "set debug-hw-points".
7710 * server.h (debug_hw_points): Declare.
7711 (paddress): Declare.
7712 * utils.c (NUMCELLS, CELLSIZE): New macros.
7713 (get_sell, xsnprintf, paddress): New functions.
7714 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7715 remove_point, stopped_by_watchpoint, stopped_data_address.
7716 * win32-i386-low.c: Include i386-low.h.
7717 (debug_reg_state): Replaces dr.
7718 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7719 (i386_dr_low_get_status): New function.
7720 (i386_insert_point, i386_remove_point): New functions.
7721 (i386_stopped_by_watchpoint): New function.
7722 (i386_stopped_data_address): New function.
7723 (i386_initial_stuff): Update.
7724 (get_thread_context,set_thread_context,i386_thread_added): Update.
7725 (the_low_target): Add entries for insert_point,
7726 remove_point, stopped_by_watchpoint, stopped_data_address.
7727 * win32-low.c (win32_insert_watchpoint): New function.
7728 (win32_remove_watchpoint): New function.
7729 (win32_stopped_by_watchpoint): New function.
7730 (win32_stopped_data_address): New function.
7731 (win32_target_ops): Add entries for insert_watchpoint,
7732 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7733 * win32-low.h (win32_target_ops): New members insert_point,
7734 remove_point, stopped_by_watchpoint, stopped_data_address.
7735
d993e290
PA
77362009-06-25 Pedro Alves <pedro@codesourcery.com>
7737
7738 * server.c (process_serial_event): Re-return unsupported, not
7739 error, if the type isn't recognized. Re-allow supporting only
7740 insert or remove packets. Also call require_running for
7741 breakpoints. Add missing break statement to default case. Tidy.
7742 * target.h (struct target_ops): Rename insert_watchpoint to
7743 insert_point, and remove_watchpoint to remove_point.
7744
7745 * linux-low.h (struct linux_target_ops): Likewise.
7746 * linux-low.c (linux_insert_watchpoint): Rename to ...
7747 (linux_insert_point): ... this. Adjust.
7748 (linux_remove_watchpoint): Rename to ...
7749 (linux_remove_point): ... this. Adjust.
7750 (linux_target_ops): Adjust.
7751 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7752 (cris_insert_point): ... this.
7753 (cris_remove_watchpoint): Rename to ...
7754 (cris_remove_point): ... this.
7755 (the_low_target): Adjust.
7756
0f54c268
PM
77572009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7758
7759 * server.c (handle_v_kill): Pass signal_pid to
7760 kill_inferior if multi_process is zero.
7761
c6314022
AR
77622009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7763
7764 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7765 * target.h (target_ops): Comment for *_watchpoint to make it clear
7766 the functions can get types '0' and '1'.
7767
4463ce24
AR
77682009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7769
7770 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7771 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7772 * regcache.c (get_regcache): Likewise.
7773 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7774 * win32-low.c (child_fetch_inferior_registers): Remove check for
7775 regno 0.
7776
cf8fd78b
PA
77772009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7778 Pedro Alves <pedro@codesourcery.com>
7779
7780 * target.h (struct target_ops) <supports_multi_process>: New
7781 callback.
7782 (target_supports_multi_process): New.
7783 * server.c (handle_query): Even if GDB reports support, only
7784 enable multi-process if the target also supports it. Report
7785 multi-process support only if the target backend supports it.
7786 * linux-low.c (linux_supports_multi_process): New function.
7787 (linux_target_ops): Install it as target_supports_multi_process
7788 callback.
7789
47c0c975
DE
77902009-05-24 Doug Evans <dje@google.com>
7791
e09875d4
DE
7792 Global renaming of find_thread_pid to find_thread_ptid.
7793 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7794 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7795 All callers updated.
7796
e27d73f6
DE
7797 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7798 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7799 directly.
7800
47c0c975
DE
7801 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7802 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7803 (linux_resume_one_lwp): Ditto.
7804
2acc282a
DE
78052009-05-23 Doug Evans <dje@google.com>
7806
7807 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7808 from struct inferior_list_entry * to struct lwp_info *.
7809 All callers updated.
7810
9f1036c1
DE
78112009-05-13 Doug Evans <dje@google.com>
7812
7813 * linux-x86-low.c: Don't include assert.h.
7814 (x86_siginfo_fixup): Use fatal, not assert.
7815 (x86_arch_setup): Fix comment.
7816
d0722149
DE
78172009-05-12 Doug Evans <dje@google.com>
7818
7819 Biarch support for i386/amd64 gdbserver.
7820 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7821 Add linux-x86-low.c.
7822 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7823 (linux-x86-low.o): Add.
7824 * linux-x86-64-low.c: Delete.
7825 * linux-i386-low.c: Delete.
7826 * linux-x86-low.c: New file.
7827 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7828 linux-x86-low.o.
7829 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7830 linux-x86-low.o.
7831 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7832 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7833 (linux_child_pid_to_exec_file): New function.
7834 (elf_64_header_p, elf_64_file_p): New functions.
7835 (siginfo_fixup): New function.
7836 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7837 give target a chance to convert layout.
7838 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7839 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7840
fdeb2a12
DE
78412009-05-07 Doug Evans <dje@google.com>
7842
7843 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7844 (regsets_store_inferior_registers): Ditto.
7845
a6dbe5df
PA
78462009-05-06 Pedro Alves <pedro@codesourcery.com>
7847
7848 PR server/10048
7849
7850 * linux-low.c (must_set_ptrace_flags): Delete.
7851 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7852 of the global.
7853 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7854 `lwp->must_set_ptrace_flags' instead.
ba42693b 7855 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7856 (linux_wait_1): ... not here.
7857
5091eb23
DE
78582009-04-30 Doug Evans <dje@google.com>
7859
9f767825
DE
7860 * inferiors.c (started_inferior_callback): New function.
7861 (attached_inferior_callback): New function.
7862 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7863 * server.c (print_started_pid, print_attached_pid): New functions.
7864 (detach_or_kill_for_exit): New function.
7865 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7866 * server.h (have_started_inferiors_p): Declare.
7867 (have_attached_inferiors_p): Declare.
7868
5091eb23
DE
7869 * inferiors.c (remove_process): Fix memory leak, free process.
7870 * linux-low.c (linux_remove_process): New function.
7871 (linux_kill): Call it instead of remove_process.
7872 (linux_detach, linux_wait_1): Ditto.
7873
155c8968
PA
78742009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7875
7876 * configure.srv: Add x86 Windows CE target.
7877
7fe519cb
UW
78782009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7879
7880 * inferiors.c (get_thread_process): Make global.
7881 * server.h (get_thread_process): Add prototype.
7882 * thread-db.c (find_one_thread): Use get_thread_process
7883 instead of current_process.
7884 (thread_db_get_tls_address): Do not crash if called when
7885 thread layer is not yet initialized.
7886
5472f405
UW
78872009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7888
7889 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7890 * spu-low.c (current_tid): Rename to ...
7891 (current_ptid): ... this.
7892 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7893 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7894 ptid_get_lwp (current_ptid) instead of current_tid.
7895 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7896 instead of current_tid. Use find_process_pid to verify pid
7897 argument is valid. Pass proper argument to remove_process.
7898 (spu_thread_alive): Compare current_ptid instead of current_tid.
7899 (spu_resume): Likewise.
7900
55ac2b99
PA
79012009-04-02 Pedro Alves <pedro@codesourcery.com>
7902
7903 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7904 variable.
7905
95954743
PA
79062009-04-01 Pedro Alves <pedro@codesourcery.com>
7907
7908 Implement the multiprocess extensions, and add linux multiprocess
7909 support.
7910
7911 * server.h (ULONGEST): Declare.
7912 (struct ptid, ptid_t): New.
7913 (minus_one_ptid, null_ptid): Declare.
7914 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7915 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7916 (struct inferior_list_entry): Change `id' type from unsigned from
7917 to ptid_t.
7918 (struct sym_cache, struct breakpoint, struct
7919 process_info_private): Forward declare.
7920 (struct process_info): Declare.
7921 (current_process): Declare.
7922 (all_processes): Declare.
7923 (initialize_inferiors): Declare.
7924 (add_thread): Adjust to use ptid_t.
7925 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7926 (add_process, remove_process, find_thread_pid): Declare.
7927 (find_inferior_id): Adjust to use ptid_t.
7928 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7929 (multi_process): Declare.
7930 (push_event): Adjust to use ptid_t.
7931 (read_ptid, write_ptid): Declare.
7932 (prepare_resume_reply): Adjust to use ptid_t.
7933 (clear_symbol_cache): Declare.
7934 * inferiors.c (all_processes): New.
7935 (null_ptid, minus_one_ptid): New.
7936 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7937 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7938 (add_thread): Change unsigned long to ptid. Remove gdb_id
7939 parameter. Adjust.
7940 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7941 (gdb_id_to_thread): Rename to ...
7942 (find_thread_pid): ... this. Change unsigned long to ptid.
7943 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7944 (loaded_dll, pull_pid_from_list): Adjust.
7945 (add_process, remove_process, find_process_pid)
7946 (get_thread_process, current_process, initialize_inferiors): New.
7947 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7948 (struct target_waitstatus) <related_pid>: Ditto.
7949 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7950 return type to int.
7951 (struct target_ops) <join>: Add `pid' argument.
7952 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7953 (struct target_ops) <wait>: Add `ptid' field. Change return type
7954 to ptid.
7955 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7956 (mywait): Add `ptid' argument. Change return type to ptid_t.
7957 (target_pid_to_str): Declare.
7958 * target.c (set_desired_inferior): Adjust to use ptids.
7959 (mywait): Add new `ptid' argument. Adjust.
7960 (target_pid_to_str): New.
7961 * mem-break.h (free_all_breakpoints): Declare.
7962 * mem-break.c (breakpoints): Delelete.
7963 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7964 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7965 to use per-process breakpoint list.
7966 (free_all_breakpoints): New.
7967 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7968 (symbol_cache, all_symbols_looked_up): Delete.
7969 (hexchars): New.
7970 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7971 read_ptid): New.
7972 (prepare_resume_reply): Change ptid argument's type from unsigned
7973 long to ptid_t. Adjust. Implement W;process and X;process.
7974 (free_sym_cache, clear_symbol_cache): New.
7975 (look_up_one_symbol): Adjust to per-process symbol cache. *
7976 * server.c (cont_thread, general_thread, step_thread): Change type
7977 to ptid_t.
7978 (attached): Delete.
7979 (multi_process): New.
7980 (last_ptid): Change type to ptid_t.
7981 (struct vstop_notif) <ptid>: Change type to ptid_t.
7982 (queue_stop_reply, push_event): Change `ptid' argument's type to
7983 ptid_t.
7984 (discard_queued_stop_replies): Add `pid' argument.
7985 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7986 changes. Don't reference the `attached' global.
7987 (attach_inferior): Adjust to mywait interface changes.
7988 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7989 features. Handle and report "multiprocess+". Handle
7990 "qAttached:PID".
7991 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7992 changes.
7993 (handle_v_kill): New.
7994 (handle_v_stopped): Adjust to use target_pid_to_str.
7995 (handle_v_requests): Allow multiple attaches and runs when
7996 multiprocess extensions are in effect. Handle "vKill".
7997 (myresume): Adjust to use ptids.
7998 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7999 (handle_status): Adjust to discard_queued_stop_replies interface
8000 change.
8001 (first_thread_of, kill_inferior_callback)
8002 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8003 (main): Call initialize_inferiors. Adjust to use ptids, killing
8004 and detaching from all inferiors. Handle multiprocess packet
8005 variants.
8006 * linux-low.h: Include gdb_proc_service.h.
8007 (struct process_info_private): New.
8008 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8009 <lwpid_of>: Use ptid_get_lwp.
8010 (get_lwp_thread): Adjust.
8011 (struct lwp_info): Add `dead' member.
8012 (find_lwp_pid): Declare.
8013 * linux-low.c (thread_db_active): Delete.
8014 (new_inferior): Adjust comment.
8015 (inferior_pid): Delete.
8016 (linux_add_process): New.
8017 (handle_extended_wait): Adjust.
8018 (add_lwp): Change unsigned long to ptid.
8019 (linux_create_inferior): Add process to processes table. Adjust
8020 to use ptids. Don't set new_inferior here.
8021 (linux_attach_lwp): Rename to ...
8022 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8023 it. Adjust to use ptids.
8024 (linux_attach_lwp): New.
8025 (linux_attach): Add process to processes table. Don't set
8026 new_inferior here.
8027 (struct counter): New.
8028 (second_thread_of_pid_p, last_thread_of_process_p): New.
8029 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8030 multiple processes.
8031 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8032 processes. Remove process from process table.
8033 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8034 to multiple processes.
8035 (any_thread_of): New.
8036 (linux_detach): Add `pid' argument, and handle it. Remove process
8037 from processes table.
8038 (linux_join): Add `pid' argument. Handle it.
8039 (linux_thread_alive): Change unsighed long argument to ptid_t.
8040 Consider dead lwps as not being alive.
8041 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8042 threads we're not interested in.
8043 (same_lwp, find_lwp_pid): New.
8044 (linux_wait_for_lwp): Change `pid' argument's type from int to
8045 ptid_t. Adjust.
8046 (linux_wait_for_event): Rename to ...
8047 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8048 from int to ptid_t. Adjust.
8049 (linux_wait_for_event): New.
8050 (linux_wait_1): Add `ptid' argument. Change return type to
8051 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8052 that exit from the process table.
8053 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8054 Adjust.
8055 (mark_lwp_dead): New.
8056 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8057 stopping all threads, mark its main lwp as dead.
8058 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8059 ptids.
8060 (fetch_register, usr_store_inferior_registers)
8061 (regsets_fetch_inferior_registers)
8062 (regsets_store_inferior_registers, linux_read_memory)
8063 (linux_write_memory): Inline `inferior_pid'.
8064 (linux_look_up_symbols): Adjust to use per-process
8065 `thread_db_active'.
8066 (linux_request_interrupt): Adjust to use ptids.
8067 (linux_read_auxv): Inline `inferior_pid'.
8068 (initialize_low): Don't reference thread_db_active.
8069 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8070 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8071 (ps_getpid): Return the pid of the current inferior.
8072 * thread-db.c (proc_handle, thread_agent): Delete.
8073 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8074 per-process data.
8075 (find_one_thread): Change argument type to ptid_t. Adjust to
8076 per-process data.
8077 (maybe_attach_thread): Adjust to per-process data and ptids.
8078 (thread_db_find_new_threads): Ditto.
8079 (thread_db_init): Ditto.
8080 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8081 processes table. Adjust to use ptids.
8082 (spu_kill, spu_detach): Adjust interface. Remove process from
8083 processes table.
8084 (spu_join, spu_thread_alive): Adjust interface.
8085 (spu_wait): Adjust interface. Remove process from processes
8086 table. Adjust to use ptids.
8087 * win32-low.c (current_inferior_tid): Delete.
8088 (current_inferior_ptid): New.
8089 (debug_event_ptid): New.
8090 (thread_rec): Take a ptid. Adjust.
8091 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8092 (child_delete_thread): Ditto.
8093 (do_initial_child_stuff): Add `attached' argument. Add process to
8094 processes table.
8095 (child_fetch_inferior_registers, child_store_inferior_registers):
8096 Adjust.
8097 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8098 (win32_attach): Pass 1 to do_initial_child_stuff.
8099 (win32_kill): Adjust interface. Remove process from processes
8100 table.
8101 (win32_detach): Ditto.
8102 (win32_join): Adjust interface.
8103 (win32_thread_alive): Take a ptid.
8104 (win32_resume): Adjust to use ptids.
8105 (get_child_debug_event): Ditto.
8106 (win32_wait): Adjust interface. Remove exiting process from
8107 processes table.
8108
bd99dc85
PA
81092009-04-01 Pedro Alves <pedro@codesourcery.com>
8110
8111 Non-stop mode support.
8112
8113 * server.h (non_stop): Declare.
8114 (gdb_client_data, handler_func): Declare.
8115 (delete_file_handler, add_file_handler, start_event_loop):
8116 Declare.
8117 (handle_serial_event, handle_target_event, push_event)
8118 (putpkt_notif): Declare.
8119 * target.h (enum resume_kind): New.
8120 (struct thread_resume): Replace `step' field by `kind' field.
8121 (TARGET_WNOHANG): Define.
8122 (struct target_ops) <wait>: Add `options' argument.
8123 <supports_non_stop, async, start_non_stop>: New fields.
8124 (target_supports_non_stop, target_async): New.
8125 (start_non_stop): Declare.
8126 (mywait): Add `options' argument.
8127 * target.c (mywait): Add `options' argument. Print child exit
8128 notifications here.
8129 (start_non_stop): New.
8130 * server.c (non_stop, own_buf, mem_buf): New globals.
8131 (struct vstop_notif): New.
8132 (notif_queue): New global.
8133 (queue_stop_reply, push_event, discard_queued_stop_replies)
8134 (send_next_stop_reply): New.
8135 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8136 interface changes.
8137 (attach_inferior): In non-stop mode, don't wait for the target
8138 here.
8139 (handle_general_set): Handle QNonStop.
8140 (handle_query): When handling qC, return the current general
8141 thread, instead of the first thread of the list.
8142 (handle_query): If the backend supports non-stop mode, include
8143 QNonStop+ in the qSupported query response.
8144 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8145 and non-stop mode.
8146 (handle_v_attach, handle_v_run): Handle non-stop mode.
8147 (handle_v_stopped): New.
8148 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8149 (myresume): Adjust to use resume_kind. Handle non-stop.
8150 (queue_stop_reply_callback): New.
8151 (handle_status): Handle non-stop mode.
8152 (main): Clear non_stop flag on reconnection. Use the event-loop.
8153 Refactor serial protocol handling from here ...
8154 (process_serial_event): ... to this new function. When GDB
8155 selects any thread, select one here. In non-stop mode, wait until
8156 GDB acks all pending events before exiting.
8157 (handle_serial_event, handle_target_event): New.
8158 * remote-utils.c (remote_open): Install remote_desc in the event
8159 loop.
8160 (remote_close): Remove remote_desc from the event loop.
8161 (putpkt_binary): Rename to...
8162 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8163 (putpkt_binary): New as wrapper around putpkt_binary_1.
8164 (putpkt_notif): New.
8165 (prepare_resume_reply): In non-stop mode, don't change the
8166 general_thread.
8167 * event-loop.c: New.
8168 * Makefile.in (OBJ): Add event-loop.o.
8169 (event-loop.o): New rule.
8170
8171 * linux-low.h (pid_of): Moved here.
8172 (lwpid_of): New.
8173 (get_lwp_thread): Use lwpid_of.
8174 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8175 * linux-low.c (pid_of): Delete.
8176 (inferior_pid): Use lwpid_of.
8177 (linux_event_pipe): New.
8178 (target_is_async_p): New.
8179 (delete_lwp): New.
8180 (handle_extended_wait): Use lwpid_of.
8181 (add_lwp): Don't set lwpid field.
8182 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8183 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8184 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8185 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8186 first. Adjust to linux_wait_for_event interface changes. Use
8187 lwpid_of.
8188 (linux_detach): Don't delete the main lwp here.
8189 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8190 (status_pending_p): Don't consider explicitly suspended lwps.
8191 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8192 pointer. Add OPTIONS argument. Change return type to int. Use
8193 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8194 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8195 pointer. Add status pointer argument. Return a pid instead of a
8196 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8197 changes. In non-stop mode, don't switch to a random thread.
8198 (linux_wait): Rename to...
8199 (linux_wait_1): ... this. Add target_options argument, and handle
8200 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8201 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8202 clean exit and signal exit code. Don't stop all threads in
8203 non-stop mode. In all-stop mode, only stop all threads when
8204 reporting a stop to GDB. Handle explicit thread stop requests.
8205 (async_file_flush, async_file_mark): New.
8206 (linux_wait): New.
8207 (send_sigstop): Use lwpid_of.
8208 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8209 interface changes. In non-stop mode, don't switch to a random
8210 thread.
8211 (linux_resume_one_lwp): Use lwpid_of.
8212 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8213 (linux_resume_one_thread): ... this. Handle resume_stop. In
8214 non-stop mode, don't look for pending flag in all threads.
8215 (resume_status_pending_p): Don't consider explicitly suspended
8216 threads.
8217 (my_waitpid): Reimplement. Emulate __WALL.
8218 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8219 Use lwpid_of.
8220 (sigchld_handler, linux_supports_non_stop, linux_async)
8221 (linux_start_non_stop): New.
8222 (linux_target_ops): Register linux_supports_non_stop, linux_async
8223 and linux_start_non_stop.
8224 (initialize_low): Install SIGCHLD handler.
8225 * thread-db.c (thread_db_create_event, find_one_thread)
8226 (thread_db_get_tls_address): Use lwpid_of.
8227 * win32-low.c (win32_detach): Adjust to use resume_kind.
8228 (win32_wait): Add `options' argument.
8229 * spu-low.c (spu_resume): Adjust to use resume_kind.
8230 (spu_wait): Add `options' argument.
8231
5b1c542e
PA
82322009-04-01 Pedro Alves <pedro@codesourcery.com>
8233
8234 Decouple target code from remote protocol.
8235
8236 * target.h (enum target_waitkind): New.
8237 (struct target_waitstatus): New.
8238 (struct target_ops) <wait>: Return an unsigned long. Take a
8239 target_waitstatus pointer instead of a char pointer.
8240 (mywait): Likewise.
8241 * target.c (mywait): Change prototype to return an unsigned long.
8242 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8243 * server.h (thread_from_wait, old_thread_from_wait): Delete
8244 declarations.
8245 (prepare_resume_reply): Change prototype to take a
8246 target_waitstatus.
8247 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8248 (last_status, last_ptid): New.
8249 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8250 pid instead of a signal.
8251 (attach_inferior): Remove "status" and "signal" parameters.
8252 Adjust.
8253 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8254 not as an address.
8255 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8256 (handle_v_requests, myresume): Remove "status" and "signal"
8257 parameters. Adjust.
8258 (handle_status): New.
8259 (main): Delete local `status'. Adjust.
8260 * remote-utils.c: Include target.h.
8261 (prepare_resume_reply): Change prototype to take a
8262 target_waitstatus. Adjust.
8263
8264 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8265 interface.
8266 * spu-low.c (spu_wait): Adjust.
8267 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8268 Delete.
8269 (win32_wait): Adjust.
8270
2bd7c093
PA
82712009-04-01 Pedro Alves <pedro@codesourcery.com>
8272
8273 * target.h (struct thread_resume): Delete leave_stopped member.
8274 (struct target_ops): Add a `n' argument to the `resume' callback.
8275 * server.c (start_inferior): Adjust.
8276 (handle_v_cont, myresume): Adjust.
8277 * linux-low.c (check_removed_breakpoint): Adjust to resume
8278 interface change, and to removed leave_stopped field.
8279 (resume_ptr): Delete.
8280 (struct thread_resume_array): New.
8281 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8282 resume interface change.
8283 (linux_continue_one_thread, linux_queue_one_thread)
8284 (resume_status_pending_p): Check if the resume field is NULL
8285 instead of checking the leave_stopped member.
8286 (linux_resume): Adjust to the target resume interface change.
8287 * spu-low.c (spu_resume): Adjust to the target resume interface
8288 change.
8289 * win32-low.c (win32_detach, win32_resume): Ditto.
8290
c35fafde
PA
82912009-04-01 Pedro Alves <pedro@codesourcery.com>
8292
8293 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8294 flag.
8295 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8296 pending.
8297 (linux_continue_one_thread): Only preserve the stepping flag if
8298 there's a pending breakpoint.
8299
0a59d50b
PA
83002009-03-31 Pedro Alves <pedro@codesourcery.com>
8301
8302 * server.c (main): After the inferior having exited, call
8303 remote_close before exiting gdbserver.
8304
f04c6d38
TJB
83052009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8306
8307 Fix size of FPSCR in Power 7 processors.
8308 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8309 (PPC_FEATURE_HAS_DFP): New #define.
8310 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8311 size of the FPSCR.
8312
78e5cee6
PA
83132009-03-23 Pedro Alves <pedro@codesourcery.com>
8314
8315 * server.c (handle_query) Whitespace and formatting.
8316
1b3f6016
PA
83172009-03-22 Pedro Alves <pedro@codesourcery.com>
8318
8319 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8320 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8321 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8322 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8323 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8324 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8325 Makefile.in, configure.ac: Fix whitespace throughout.
8326 * configure: Regenerate.
8327
a07b2135
PA
83282009-03-22 Pedro Alves <pedro@codesourcery.com>
8329
8330 * inferiors.c (find_inferior): Make it safe for the callback
8331 function to delete the currently iterated inferior.
8332
67cc2626
PA
83332009-03-22 Pedro Alves <pedro@codesourcery.com>
8334
8335 * Makefile.in (linuw_low_h): Move higher.
8336 (thread-db.o): Depend on $(linux_low_h).
8337
54a0b537
PA
83382009-03-17 Pedro Alves <pedro@codesourcery.com>
8339
8340 Rename "process" to "lwp" throughout.
8341
8342 * linux-low.c (all_processes): Rename to...
8343 (all_lwps): ... this.
8344 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8345 (add_process): Rename to ...
8346 (add_lwp): ... this. Adjust.
8347 (linux_create_inferior): Adjust.
8348 (linux_attach_lwp): Adjust.
8349 (linux_attach): Adjust.
8350 (linux_kill_one_process): Rename to ...
8351 (linux_kill_one_lwp): ... this. Adjust.
8352 (linux_kill): Adjust.
8353 (linux_detach_one_process): Rename to ...
8354 (linux_detach_one_lwp): ... this. Adjust.
8355 (linux_detach): Adjust.
8356 (check_removed_breakpoint): Adjust.
8357 (status_pending_p): Adjust.
8358 (linux_wait_for_process): Rename to ...
8359 (linux_wait_for_lwp): ... this. Adjust.
8360 (linux_wait_for_event): Adjust.
8361 (send_sigstop): Adjust.
8362 (wait_for_sigstop): Adjust.
8363 (stop_all_processes): Rename to ...
8364 (stop_all_lwps): ... this.
8365 (linux_resume_one_process): Rename to ...
8366 (linux_resume_one_lwp): ... this. Adjust.
8367 (linux_set_resume_request, linux_continue_one_thread)
8368 (linux_queue_one_thread, resume_status_pending_p)
8369 (usr_store_inferior_registers, regsets_store_inferior_registers)
8370 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8371 Adjust.
8372 * linux-low.h (get_process): Rename to ...
8373 (get_lwp): ... this. Adjust.
8374 (get_thread_process): Rename to ...
8375 (get_thread_lwp): ... this. Adjust.
8376 (get_process_thread): Rename to ...
8377 (get_lwp_thread): ... this. Adjust.
8378 (struct process_info): Rename to ...
8379 (struct lwp_info): ... this.
8380 (all_processes): Rename to ...
8381 (all_lwps): ... this.
8382 * proc-service.c (ps_lgetregs): Adjust.
8383 * thread-db.c (thread_db_create_event, find_one_thread)
8384 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8385
0b16c5cf
PA
83862009-03-14 Pedro Alves <pedro@codesourcery.com>
8387
8388 * server.c (handle_query): Handle "qAttached".
8389
32de4b9d
NS
83902009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8391
8392 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8393 GPLv3, update license URL.
8394
2aecd87f
DE
83952009-03-01 Doug Evans <dje@google.com>
8396
93efd302 8397 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8398 (server_h): Add gdb_signals.h.
8399 (signals.o): Update.
8400 * server.h (target_signal_from_host,target_signal_to_host_p)
8401 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8402
86b1f9c5
PM
84032009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8404
8405 * remote-utils.c (getpkt): Also generate remote-debug
8406 information if noack_mode is set.
8407
4aa995e1
PA
84082009-02-06 Pedro Alves <pedro@codesourcery.com>
8409
8410 * server.c (handle_query): Report qXfer:siginfo:read and
8411 qXfer:siginfo:write as supported and handle them.
8412 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8413 * linux-low.c (linux_xfer_siginfo): New.
8414 (linux_target_ops): Set it.
8415
62709adf
PA
84162009-01-26 Pedro Alves <pedro@codesourcery.com>
8417
8418 * server.c (gdbserver_usage): Mention --remote-debug.
8419 (main): Accept '--remote-debug' switch.
8420
aef93bd7
DE
84212009-01-18 Doug Evans <dje@google.com>
8422
8423 * regcache.c (new_register_cache): No need to check result of xcalloc.
8424 * server.c (handle_search_memory): Back out calls to xmalloc,
8425 result is checked and error is returned to user upon failure.
8426 (handle_query): Ditto. Add more checks for result of malloc.
8427 (handle_v_cont): Check result of malloc, report error back to
8428 user upon failure.
8429 (handle_v_run): Ditto. Call freeargv.
8430 * server.h (freeargv): Declare.
8431 * utils.c (freeargv): New fn.
8432
54363045
DE
84332009-01-15 Doug Evans <dje@google.com>
8434
f626972c
DE
8435 * gdbreplay.c (perror_with_name): Make arg const char *.
8436 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8437 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8438 * utils.c (perror_with_name): Make arg const char *.
54363045 8439
18aae699
PA
84402009-01-14 Pedro Alves <pedro@codesourcery.com>
8441
8442 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8443 when handling a EXIT_PROCESS_DEBUG_EVENT.
8444
ff703abe
JB
84452009-01-06 Joel Brobecker <brobecker@adacore.com>
8446
8447 * gdbreplay.c (gdbreplay_version): Update copyright year.
8448 * server.c (gdbserver_version): Likewise.
8449
f21cc1a2 84502009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8451
8452 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8453 (handle_extended_wait): Improve comment.
0e21c1ec 8454
bca929d3
DE
84552008-12-13 Doug Evans <dje@google.com>
8456
8457 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8458 * server.h (ATTR_MALLOC): New macro.
8459 (xmalloc,xcalloc,xstrdup): Declare.
8460 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8461 * inferiors.c: Ditto.
8462 * linux-low.c: Ditto.
8463 * mem-break.c: Ditto.
8464 * regcache.c: Ditto.
8465 * remote-utils.c: Ditto.
8466 * server.c: Ditto.
8467 * target.c: Ditto.
8468 * win32-low.c: Ditto.
8469
97438e3f
DE
84702008-12-12 Doug Evans <dje@google.com>
8471
896c7fbb
DE
8472 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8473 in debugging printf.
8474
97438e3f
DE
8475 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8476
e3b886f8
DE
84772008-12-09 Doug Evans <dje@google.com>
8478
8479 * linux-low.h (struct process_info): Delete member tid, unused.
8480 * thread-db.c (find_one_thread): Update.
8481 (maybe_attach_thread): Update.
8482
07e059b5
VP
84832008-12-02 Pedro Alves <pedro@codesourcery.com>
8484
889bf7c5
PA
8485 * target.h (struct target_ops): Add qxfer_osdata member.
8486 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8487 and dirent.h.
8488 (linux_qxfer_osdata): New functions.
8489 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8490 callback.
8491 * server.c (handle_query): Handle "qXfer:osdata:read:".
8492 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8493 (buffer_xml_printf): New functions.
8494 * server.h (struct buffer): New.
8495 (buffer_grow_str, buffer_grow_str0): New macros.
8496 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8497 (buffer_xml_printf): Declare.
07e059b5 8498
4cab47ab
DE
84992008-11-24 Doug Evans <dje@google.com>
8500
8501 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8502
f142445f
DJ
85032008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8504
8505 * server.c (handle_v_run): Always use the supplied argument list.
8506
d0107bb6 85072008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8508
d0107bb6
BW
8509 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8510 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8511
2c4ad781
TJB
85122008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8513
8514 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8515 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8516 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8517 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8518 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8519 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8520 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8521 XML target descriptions.
8522 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8523 when inferior is running on an ISA 2.05 or later processor. Add
8524 special case to return offset for full 64-bit slot of FPSCR when
8525 in 32-bits.
8526
dfb64f85
DJ
85272008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8528
8529 * Makefile.in (SFILES, clean): Added sparc64 files.
8530 (reg-sparc64.o, reg-sparc64.c): New.
8531 * configure.srv (sparc*-*-linux*): New configuration.
8532 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8533 syscall arguments for SPARC.
8534 (regsets_store_inferior_registers): Likewise.
8535 * linux-sparc-low.c: New file.
8536
66b6e1dd
DE
85372008-10-21 Doug Evans <dje@google.com>
8538
8539 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8540 (READLINE_DIR,READLINE_DEP): Delete.
8541 (INTERNAL_CFLAGS): Update.
8542 (LINTFLAGS): Update.
8543
9b710a42
PA
85442008-10-10 Pedro Alves <pedro@codesourcery.com>
8545
8546 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8547 whole argv from the last run, not just argv[0].
8548
5822d809
PA
85492008-09-08 Pedro Alves <pedro@codesourcery.com>
8550
8551 * regcache.c (new_register_cache): Return NULL if the register
8552 cache size isn't known yet.
8553 (free_register_cache): Avoid dereferencing a NULL regcache.
8554
74aac56f
DJ
85552008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8556
8557 * configure.srv: Merge MIPS and MIPS64.
8558
400b20f5
MR
85592008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8560
8561 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8562
677c5bb1
LM
85632008-08-18 Luis Machado <luisgpm@br.ibm.com>
8564
8565 * Makefile.in: Add required vsx dependencies.
8566
8567 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8568 Declare init_registers_powerpc_vsx32l.
8569 Declare init_registers_powerpc_vsx64l.
8570 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8571 (ppc_arch_setup): Check for VSX in hwcap.
8572 (ppc_fill_vsxregset): New function.
8573 (ppc_store_vsxregset): New function.
8574 Add new VSX entry in regset_info target_regsets.
8575
8576 * configure.srv: Add new VSX dependencies.
8577
a6f3e723
SL
85782008-08-12 Pedro Alves <pedro@codesourcery.com>
8579
8580 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8581 (remote_open): Set or clear transport_is_reliable.
8582 (putpkt_binary): Don't expect acks in noack mode.
8583 (getpkt): Don't send ack/nac in noack mode.
8584 * server.c (handle_general_set): Handle QStartNoAckMode.
8585 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8586 qSupported.
8587 (main): Reset noack_mode on every connection.
8588 * server.h (noack_mode): Declare.
8589
a417dc56
RW
85902008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8591
8592 * Makefile.in (GDBREPLAY_OBS): New variable.
8593 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8594
3221518c
UW
85952008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8596 Daniel Jacobowitz <dan@codesourcery.com>
8597
8598 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8599 (usr_store_inferior_registers): Likewise.
8600 (regsets_store_inferior_registers): Likewise.
8601
ec56be1b
PA
86022008-07-31 Rolf Jansen <rj@surtec.com>
8603 Pedro Alves <pedro@codesourcery.com>
8604
8605 * configure.ac: Check for memmem declaration.
8606 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8607 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8608 (disable_packet_qfThreadInfo): Unconditionally compile.
8609 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8610 * configure, config.in: Regenerate.
8611
2fe5e3ff
DE
86122008-07-28 Doug Kwan <dougkwan@google.com>
8613
8614 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8615 (linux_write_memory): Remove declaration of errno.
8616
836acd6d
UW
86172008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8618
8619 * linux-low.c (handle_extended_wait): Do not use "status"
8620 variable uninitialized.
8621
aeba519e
PA
86222008-07-07 Pedro Alves <pedro@codesourcery.com>
8623
8624 * server.c (handle_v_attach): Inhibit reporting dll changes.
8625
db42f210
PA
86262008-06-27 Pedro Alves <pedro@codesourcery.com>
8627
8628 * remote-utils.c (prepare_resume_reply): If requested, don't
8629 output "thread:TID" in the T stop reply.
8630
8631 * server.c (disable_packet_vCont, disable_packet_Tthread)
8632 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8633 (handle_query): If requested, disable support for qC, qfThreadInfo
8634 and qsThreadInfo.
8635 (handle_v_requests): If requested, disable support for vCont.
8636 (gdbserver_show_disableable): New.
8637 (main): Handle --disable-packet and --disable-packet=LIST.
8638
8639 * server.h (disable_packet_vCont, disable_packet_Tthread)
8640 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8641
8e4c5421
CD
86422008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8643
8644 * server.c (gdbserver_usage): Mention --version.
8645
6e23a804
DJ
86462008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8647
8648 * Makefile.in (gdbreplay.o): New rule.
8649
90aa6a40
JM
86502008-06-06 Joseph Myers <joseph@codesourcery.com>
8651
8652 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8653 message, not gdbserver.
8654
c16158bc 86552008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8656 Nathan Sidwell <nathan@codesourcery.com>
8657 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8658
8659 * acinclude.m4: Include ../../config/acx.m4.
8660 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8661 * configure, config.in: Regenerate.
8662 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8663 * server.c (gdbserver_version): Print PKGVERSION.
8664 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8665 (main): Adjust gdbserver_usage calls.
8666 * gdbreplay.c (version, host_name): Add declarations.
8667 (gdbreplay_version, gdbreplay_usage): New.
8668 (main): Accept --version and --help options.
8669
aeb75bf5
DJ
86702008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8671
8672 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8673 (arm_breakpoint_at): Handle Thumb.
8674 (the_low_target): Add comment.
8675
76b233dd
UW
86762008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8677
8678 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8679
08388c79
DE
86802008-05-09 Doug Evans <dje@google.com>
8681
a3c83fae
DE
8682 * server.h (decode_search_memory_packet): Declare.
8683 * remote-utils.c (decode_search_memory_packet): New fn.
8684 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8685 (handle_search_memory): New fn.
8686 (handle_query): Process qSearch:memory packets.
8687
bb9c3d36
UW
86882008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8689
8690 * regcache.c (registers_length): Remove.
8691 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8692 full register packet.
8693 * regcache.h (registers_length): Remove prototype.
8694 * server.h (PBUFSIZ): Define to 16384.
8695
7284e1be
UW
86962008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8697
8698 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8699 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8700 powerpc-64l.o, and powerpc-altivec64l.o.
8701 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8702 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8703 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8704 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8705 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8706 to srv_xmlfiles.
8707
8708 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8709 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8710 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8711 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8712 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8713 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8714 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8715 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8716 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8717 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8718 (clean): Update.
8719
8720 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8721 (init_registers_powerpc_32l): ... this new prototype.
8722 (init_registers_powerpc_32): Remove, replace by ...
8723 (init_registers_powerpc_altivec32l): ... this new prototype.
8724 (init_registers_powerpc_e500): Remove, replace by ...
8725 (init_registers_powerpc_e500l): ... this new prototype.
8726 (init_registers_ppc64): Remove, replace by ...
8727 (init_registers_powerpc_64l): ... this new prototype.
8728 (init_registers_powerpc_64): Remove, replace by ...
8729 (init_registers_powerpc_altivec64l): ... this new prototype.
8730 (ppc_num_regs): Set to 73.
8731 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8732 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8733 (ppc_cannot_store_register): Handle orig_r3 and trap.
8734 (ppc_arch_setup): Update init_registers_... calls.
8735 (ppc_fill_gregset): Handle orig_r3 and trap.
8736
8737 * inferiors.c (clear_inferiors): Reset current_inferior.
8738
fdc59709
PB
87392008-04-23 Paolo Bonzini <bonzini@gnu.org>
8740
889bf7c5
PA
8741 * acinclude.m4: Add override.m4.
8742 * configure: Regenerate.
fdc59709 8743
c9b2f845
UW
87442008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8745
8746 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8747 initial call to init_register_ppc64.
8748
550512b8
UW
87492008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8750
43aaf8b6
PA
8751 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8752 single powerpc*-*-linux* case.
550512b8
UW
8753 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8754
b6430ec3
UW
87552008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8756
8757 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8758 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8759 from reg_xmlfiles.
8760 * linux-ppc-low.c: Include <elf.h>.
8761 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8762 (ppc_hwcap): New global variable.
8763 (ppc_regmap): Remove __SPE__ #ifdef sections.
8764 (ppc_regmap_e500): New global variable.
8765 (ppc_cannot_store_register): Update __SPE__ special case.
8766 (ppc_get_hwcap): New function.
8767 (ppc_arch_setup): Use it to determine whether inferior supports
8768 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8769 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8770 Do not access registers if target does not support AltiVec.
8771 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8772 Do not access registers if target does not support SPE.
8773 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8774
52fa2412
UW
87752008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8776
8777 * linux-low.c (disabled_regsets, num_regsets): New.
8778 (use_regsets_p): Delete.
8779 (linux_wait_for_process): Clear disabled_regsets.
8780 (regsets_fetch_inferior_registers): Check and set it.
8781 (regsets_store_inferior_registers): Likewise.
8782 (linux_fetch_registers, linux_store_registers): Do not use
8783 use_regsets_p.
8784 (initialize_low): Allocate disabled_regsets.
8785
e28b3332
DJ
87862008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8787
8788 * Makefile.in (LIBOBJS): New.
8789 (OBS): Use LIBOBJS.
8790 (memmem.o): New rule.
8791 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8792 * configure: Regenerated.
8793
4536995d
UW
87942008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8795
8796 * server.c (handle_query): Never return "unsupported" for
8797 qXfer:features:read queries.
8798
221c031f
UW
87992008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8800
8801 * server.c (get_features_xml): Fix inverted condition.
8802 (handle_query): Always support qXfer:feature:read.
8803
ccd213ac
DJ
88042008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8805
8806 * server.c (wrapper_argv): New.
8807 (start_inferior): Handle wrapper_argv. If set, expect an extra
8808 trap.
8809 (gdbserver_usage): Document --wrapper.
8810 (main): Parse --wrapper.
8811
6fe305f7
UW
88122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8813
8814 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8815 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8816 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8817 (ppc_set_pc): Likewise.
8818 (ppc_arch_setup): New function.
8819 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8820 of collect_register.
889bf7c5 8821 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8822
5b0a002e
UW
88232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8824
8825 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8826 instead of linux-ppc64-low.o.
8827 * linux-ppc64-low.c: Remove file.
8828 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8829 (linux-ppc64-low.o): Remove rule.
8830
8831 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8832 (init_registers_powerpc_64): Likewise.
8833 (ppc_regmap): Conditionally define depending on __powerpc64__.
8834 (ppc_cannot_store_register): Do not special-case "fpscr" when
8835 compiled on __powerpc64__.
8836 (ppc_collect_ptrace_register): New function.
8837 (ppc_supply_ptrace_register): New function.
8838 (ppc_breakpoint): Change type to "unsigned int".
8839 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8840 (the_low_target): Conditionally provide initializers for the
889bf7c5 8841 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8842 collect_ptrace_register and supply_ptrace_register members.
8843
9b4b61c8
UW
88442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8845
8846 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8847 * server.c (gdbserver_xmltarget): Define.
8848 (get_features_xml): Use it to replace "target.xml" and arch_string.
8849
8850 * configure.srv: Remove srv_xmltarget. Add XML files that were
8851 mentioned there to srv_xmlfiles instead. Remove conditional tests
8852 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8853 srv_xmlfiles and srv_regobj to include all possible choices.
8854 * configure.ac (srv_xmltarget): Remove.
8855 (srv_xmlfiles): Do not add "target.xml".
8856 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8857 checks for supplementary target information.
8858 * configure: Regenerate.
8859 * Makefile.in (XML_TARGET): Remove.
8860 (target.xml): Remove rule.
8861 (clean): Do not clean up target.xml.
8862 (.PRECIOUS): Do not mention target.xml.
8863
8864 * target.h (struct target_ops): Remove arch_string member.
8865 * linux-low.c (linux_arch_string): Remove.
8866 (linux_target_ops): Remove arch_string initializer.
8867 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8868 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8869 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8870 * spu-low.c (spu_arch_string): Remove.
8871 (spu_target_ops): Remove arch_string initializer.
8872 * win32-low.c (win32_arch_string): Remove.
8873 (win32_target_ops): Remove arch_string initializer.
8874 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8875 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8876 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8877
ee1a7ae4
UW
88782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8879
8880 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8881 by collect_ptrace_register and supply_ptrace_register hooks.
8882 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8883 instead of checking for the_low_target.left_pad_xfer.
8884 (usr_store_inferior_registers): Use collect_ptrace_register callback
8885 instead of checking for the_low_target.left_pad_xfer.
8886
8887 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8888 (s390_supply_ptrace_register): Likewise.
8889 (s390_fill_gregset): Call s390_collect_ptrace_register.
8890 (the_low_target): Update.
8891
8892 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8893 (ppc_supply_ptrace_register): Likewise.
8894 (the_low_target): Update.
8895
8896 * linux-i386-low.c (the_low_target): Update.
8897 * linux-x86-64-low.c (the_low_target): Update.
8898
d61ddec4
UW
88992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8900
8901 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8902 reg-s390.o and reg-s390x.o.
8903
8904 * linux-low.c (new_inferior): New global variable.
8905 (linux_create_inferior, linux_attach): Set it.
8906 (linux_wait_for_process): Call the_low_target.arch_setup after the
8907 target has stopped for the first time.
8908 (initialize_low): Do not call the_low_target.arch_setup.
8909
8910 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8911 (s390_set_pc): Likewise.
8912 (s390_arch_setup): New function.
8913 (the_low_target): Use s390_arch_setup as arch_setup routine.
8914
8915 * regcache.c (realloc_register_cache): New function.
8916 (set_register_cache): Call it for each existing regcache.
8917
d05b4ac3
UW
89182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8919
8920 * server.h (init_registers): Remove prototype.
8921
8922 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8923 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8924 instead of init_registers ().
8925 * linux-arm-low.c (init_registers_arm): Add prototype.
8926 (init_registers_arm_with_iwmmxt): Likewise.
8927 (the_low_target): Add initializer for arch_setup field.
8928 * linux-cris-low.c (init_registers_cris): Add prototype.
8929 (the_low_target): Add initializer for arch_setup field.
8930 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8931 (the_low_target): Add initializer for arch_setup field.
8932 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8933 (the_low_target): Add initializer for arch_setup field.
8934 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8935 (the_low_target): Add initializer for arch_setup field.
8936 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8937 (the_low_target): Add initializer for arch_setup field.
8938 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8939 (the_low_target): Add initializer for arch_setup field.
8940 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8941 (init_registers_mips64_linux): Likewise.
8942 (the_low_target): Add initializer for arch_setup field.
8943 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8944 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8945 (the_low_target): Add initializer for arch_setup field.
8946 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8947 (init_registers_powerpc_64): Likewise.
8948 (the_low_target): Add initializer for arch_setup field.
8949 * linux-s390-low.c (init_registers_s390): Add prototype.
8950 (init_registers_s390x): Likewise.
8951 (the_low_target): Add initializer for arch_setup field.
8952 * linux-sh-low.c (init_registers_sh): Add prototype.
8953 (the_low_target): Add initializer for arch_setup field.
8954 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8955 (the_low_target): Add initializer for arch_setup field.
8956 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8957 (the_low_target): Add initializer for arch_setup field.
8958
8959 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8960 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8961 instead of init_registers ().
8962 * win32-arm-low.c (init_registers_arm): Add prototype.
8963 (the_low_target): Add initializer for arch_setup field.
8964 * win32-i386-low.c (init_registers_i386): Add prototype.
8965 (the_low_target): Add initializer for arch_setup field.
8966
8967 * spu-low.c (init_registers_spu): Add prototype.
8968 (initialize_low): Call initialie_registers_spu () instead of
8969 initialize_registers ().
8970
fd96d250
PA
89712008-02-19 Pedro Alves <pedro@codesourcery.com>
8972
8973 * server.c (handle_v_requests): When handling the vRun and vAttach
8974 packets, if already debugging a process, don't kill it. Return an
8975 error instead.
8976
d41b6bb4
DJ
89772008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8978
8979 * server.c (handle_query): Correct length check.
8980
5ac588cf
PA
89812008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8982
8983 * win32-low.c (do_initial_child_stuff): Add process handle
8984 parameter. Set current_process_handle and current_process_id from the
8985 parameters. Clear globals.
8986 (win32_create_inferior): Don't set current_process_handle and
8987 current_process_id here. Instead pass them on the call to
8988 do_initial_child_stuff.
8989 (win32_attach): Likewise.
8990 (win32_clear_inferiors): New.
8991 (win32_kill): Don't close the current process handle or the
8992 current thread handle here. Instead call win32_clear_inferiors.
8993 (win32_detach): Don't open a new handle to the process. Call
8994 win32_clear_inferiors.
8995 (win32_join): Don't rely on current_process_handle; open a new
8996 handle using the process id.
8997 (win32_wait): Call win32_clear_inferiors when the inferior process
8998 has exited.
8999
ecd7ecbc
DJ
90002008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9001
9002 * server.c (monitor_show_help): Add "exit".
9003
1525d545
MG
90042008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9005
ecd7ecbc 9006 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9007 (clean): Add reg-xtensa.c.
9008 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9009 * configure.srv (xtensa*-*-linux*) New target.
9010 * linux-xtensa-low.c: New.
9011 * xtensa-xtregs.c: New.
1525d545 9012
59a016f0
PA
90132008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9014
9015 * hostio.c: Don't include errno.h.
9016 (errno_to_fileio_errno): Move to hostio-errno.
9017 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9018 error number outputting to the target->hostio_last_error callback.
9019 (hostio_packet_error): Use FILEIO_EINVAL directly.
9020 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9021 calls to hostio_error.
9022 * hostio-errno.c: New.
9023 * server.h (hostio_last_error_from_errno): Declare.
9024 * target.h (target_ops): Add hostio_last_error member.
9025 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9026 as hostio_last_error handler.
889bf7c5 9027 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9028 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9029 (wince_hostio_last_error): New functions.
9030 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9031 as hostio_last_error handler.
9032 (win32_target_ops) [!_WIN32_WCE]: Register
9033 hostio_last_error_from_errno as hostio_last_error handler.
9034 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9035 (hostio-errno.o): New rule.
9036 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9037 * configure.srv (srv_hostio_err_objs): New variable. Default to
9038 hostio-errno.o.
9039 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9040 * configure: Regenerate.
9041
2d717e4f
DJ
90422008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9043
9044 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9045 (linux_kill, linux_detach): Clean up the process list.
9046 * remote-utils.c (remote_open): Improve port number parsing.
9047 (putpkt_binary, input_interrupt): Only send interrupts if the target
9048 is running.
9049 * server.c (extended_protocol): Make static.
9050 (attached): Define earlier.
9051 (exit_requested, response_needed, program_argv): New variables.
9052 (target_running): New.
9053 (start_inferior): Clear attached here.
9054 (attach_inferior): Set attached here.
9055 (require_running): Define.
9056 (handle_query): Use require_running and target_running. Implement
9057 "monitor exit".
9058 (handle_v_attach, handle_v_run): New.
9059 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9060 (gdbserver_usage): Update.
9061 (main): Redo argument parsing. Handle --debug and --multi. Handle
9062 --attach along with other options or after the port. Save
9063 program_argv. Support no initial program. Resynchronize
9064 communication with GDB after an error. Handle "monitor exit".
9065 Use require_running and target_running. Always allow the extended
9066 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9067 restart in extended mode.
9068 * README: Refer to the GDB manual. Update --attach usage.
9069
7407e2de
AS
90702007-12-20 Andreas Schwab <schwab@suse.de>
9071
9072 * linux-low.c (STACK_SIZE): Define.
9073 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9074 (linux_test_for_tracefork): Likewise.
9075
b65d95c5
DJ
90762007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9077
9078 * linux-low.c (linux_wait_for_event): Update messages. Do not
9079 reinsert auto-delete breakpoints.
9080 * mem-break.c (struct breakpoint): Change return type of handler to
9081 int.
9082 (set_breakpoint_at): Update handler type.
9083 (reinsert_breakpoint_handler): Return 1 instead of calling
9084 delete_breakpoint.
9085 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9086 setting a new one.
9087 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9088 * mem-break.h (set_breakpoint_at): Update handler type.
9089 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9090 * win32-low.c (auto_delete_breakpoint): New.
9091 (get_child_debug_event): Use it.
9092
4e799345
DJ
90932007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9094
9095 * configure.ac: Check for pread and pwrite.
9096 * hostio.c (handle_pread): Fall back to lseek and read.
9097 (handle_pwrite): Fall back to lseek and write.
9098 * config.in, configure: Regenerated.
9099
27524b67
DJ
91002007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9101
9102 * server.c (myresume): Add own_buf argument.
9103 (main): Update calls.
9104
a20d5e98
DJ
91052007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9106
9107 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9108 * remote-utils.c (remote_open): Do not call disable_async_io.
9109 (block_async_io): Delete.
9110 (unblock_async_io): Make static.
9111 (initialize_async_io): New.
9112 * server.c (handle_v_cont): Handle async I/O here.
9113 (myresume): Likewise. Move other common resume tasks here...
9114 (main): ... from here. Call initialize_async_io. Disable async
9115 I/O before the main loop.
9116 * server.h (initialize_async_io): Declare.
9117 (block_async_io, unblock_async_io): Delete prototypes.
9118 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9119
b79d787e
DJ
91202007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9121
9122 * remote-utils.c (readchar): Allow binary data in received messages.
9123
d97903b2
PA
91242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9125
9126 * win32-low.c (attaching): New global.
9127 (win32_create_inferior): Clear the `attaching' global.
9128 (win32_attach): Set the `attaching' global.
9129 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9130 attaching. Only set a breakpoint at the entry point if not
9131 attaching.
9132
311de423
PA
91332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9134
9135 * server.c (main): Don't report dll events on the initial
9136 connection on attaches.
9137
6c2d16d2
PA
91382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9139
9140 * server.c (main): Relax numerical bases supported for the pid of
9141 the --attach command line argument.
9142
5ca906e6
PA
91432007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9144
9145 * win32-low.c (win32_attach): Call OpenProcess before
9146 DebugActiveProcess, not after. Add last error output to error
9147 call.
9148
9c6c8194
PA
91492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9150
9151 * win32-low.c (win32_get_thread_context)
9152 (win32_set_thread_context): New functions.
9153 (thread_rec): Use win32_get_thread_context.
9154 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9155 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9156 field.
9157
4d5d1aaa
PA
91582007-12-03 Leo Zayas
9159 Pedro Alves <pedro_alves@portugalmail.pt>
9160
9161 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9162 global variables.
9163 (child_add_thread): Minor cleanup.
9164 (child_continue): Resume artificially suspended threads before
9165 calling ContinueDebugEvent.
9166 (suspend_one_thread): New.
9167 (fake_breakpoint_event): New.
9168 (get_child_debug_event): Change return type to int. Check here if
9169 gdb sent an interrupt request. If a soft interrupt was requested,
9170 fake a breakpoint event. Return 0 if there is no event to handle,
9171 and 1 otherwise.
9172 (win32_wait): Don't check here if gdb sent an interrupt request.
9173 Ensure there is a valid event to handle.
9174 (win32_request_interrupt): Add soft interruption method as last
9175 resort.
9176
c436e841
PA
91772007-12-03 Leo Zayas
9178 Pedro Alves <pedro_alves@portugalmail.pt>
9179
9180 * win32-low.h (win32_thread_info): Add descriptions to the
9181 structure members. Replace `suspend_count' counter by a
9182 `suspended' flag.
9183 * win32-low.c (thread_rec): Update condition of when to get the
9184 context from the inferior. Rely on ContextFlags being set if it
9185 has already been retrieved. Only suspend the inferior thread if
9186 we haven't already. Warn if that fails.
9187 (continue_one_thread): s/suspend_count/suspended/. Only call
9188 ResumeThread once. Warn if that fails.
9189
e7b5fa67
PA
91902007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9191
9192 * win32-low.c (win32_wait): Don't read from the inferior when it
9193 has already exited.
9194
a385171d
PA
91952007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9196
9197 * Makefile.in (win32_low_h): New variable.
9198 (win32-low.o): Add dependency on $(win32_low_h).
9199 (win32-arm-low.o, win32-i386-low.o): New rules.
9200
f80c84b3
DJ
92012007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9202
9203 * hostio.c: Correct copyright year.
9204
a6b151f1
DJ
92052007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9206
9207 * Makefile.in (OBS): Add hostio.o.
9208 (hostio.o): New rule.
9209 * server.h (handle_vFile): Declare.
9210 * hostio.c: New file.
9211 * server.c (handle_v_requests): Take packet_len and new_packet_len
9212 for binary packets. Call handle_vFile.
9213 (main): Update call to handle_v_requests.
9214
f9387fc3
DJ
92152007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * linux-low.c: Include <sched.h>.
9218
51c2684e
DJ
92192007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * linux-low.c (linux_tracefork_grandchild): New.
9222 (linux_tracefork_child): Use clone.
9223 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9224
75f83163
JB
92252007-10-31 Joel Brobecker <brobecker@adacore.com>
9226
9227 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9228
da5898ce
DJ
92292007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9230
9231 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9232
24a09b5f
DJ
92332007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9234
9235 * inferiors.c (change_inferior_id): Delete.
9236 (add_pid_to_list, pull_pid_from_list): New.
9237 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9238 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9239 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9240 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9241 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9242 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9243 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9244 (using_threads): Always set to 1.
9245 (handle_extended_wait): New.
9246 (add_process): Do not set TID.
9247 (linux_create_inferior): Set must_set_ptrace_flags.
9248 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9249 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9250 (linux_thread_alive): Rename TID argument to LWPID.
9251 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9252 (linux_wait_for_event): Do not use TID or check using_threads. Update
9253 call to dead_thread_notify. Call handle_extended_wait.
9254 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9255 (send_sigstop): Delete sigstop_sent.
9256 (wait_for_sigstop): Avoid TID.
9257 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9258 (linux_test_for_tracefork): New.
9259 (linux_lookup_signals): Use thread_db_active and
9260 linux_supports_tracefork_flag.
9261 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9262 * linux-low.h (get_process_thread): Avoid TID.
9263 (struct process_ifo): Move thread_known and tid to the end. Remove
9264 sigstop_sent.
9265 (linux_attach_lwp, thread_db_init): Update prototypes.
9266 * server.h (change_inferior_id): Delete prototype.
9267 (add_pid_to_list, pull_pid_from_list): New prototypes.
9268 * thread-db.c (thread_db_use_events): New.
9269 (find_first_thread): Rename to...
9270 (find_one_thread): ...this. Update callers and messages. Do not
9271 call fatal. Check thread_db_use_events. Do not call
9272 change_inferior_id or new_thread_notify.
9273 (maybe_attach_thread): Update. Do not call new_thread_notify.
9274 (thread_db_init): Set thread_db_use_events. Check use_events.
9275 * utils.c (fatal, warning): Correct message prefix.
9276
30ed0a8f
DJ
92772007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9278
9279 * Makefile.in (clean): Remove new files.
9280 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9281 (powerpc-64.o, powerpc-64.c): New rules.
9282 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9283 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9284 with SPE.
9285 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9286 SPE targets.
9287 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9288 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9289 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9290 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9291 (target_regsets): Add AltiVec and SPE register sets.
9292 * configure.ac: Check for AltiVec and SPE.
9293 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9294 (ppc_fill_vrregset, ppc_store_vrregset): New.
9295 (target_regsets): Add AltiVec register set.
9296 * configure: Regenerated.
9297
fd462a61
DJ
92982007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9299
9300 * linux-low.c (O_LARGEFILE): Define.
9301 (linux_read_memory): Use /proc/PID/mem.
9302 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9303 * configure, config.in: Regenerated.
9304
69f223ed
DJ
93052007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9306
9307 * linux-low.c (linux_wait_for_event): Do not pass signals while
9308 single-stepping.
9309
aec18585
PA
93102007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9311
9312 * win32-low.c (create_process): New.
9313 (win32_create_inferior): Use create_process instead of
9314 CreateProcess. If create_process failed retry appending an ".exe"
9315 suffix. Store the GetLastError result immediatelly after
9316 create_process calls and use it on the call to error.
9317
34d86ddd
PA
93182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9319
9320 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9321
5a0e3bd0
JB
93222007-08-23 Joel Brobecker <brobecker@adacore.com>
9323
9324 * configure.ac: Switch license to GPLv3.
9325
f88c79e6
MS
93262007-08-01 Michael Snyder <msnyder@access-company.com>
9327
9328 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9329
6b3d9b83
PA
93302007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9331
9332 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9333 typedef.
9334 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9335 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9336 CloseToolhelp32Snapshot.
9337 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9338 CloseToolhelp32Snapshot.
9339
c588c53c
MS
93402007-07-27 Michael Snyder <michael.snyder@access-company.com>
9341
9342 * server.c (main): Check for inferior exit before main loop.
9343
aa0403d9
PA
93442007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9345
9346 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9347 instead of on tmp_desc.
9348
255e7678
DJ
93492007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9350 Daniel Jacobowitz <dan@codesourcery.com>
9351
9352 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9353 (add_thread): Minor cleanups.
9354 (clear_inferiors): Move lower in the file. Clear the DLL
9355 list.
9356 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9357 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9358 (xml_escape_text): New.
9359 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9360 for qSupported.
9361 (handle_v_cont): Report errors.
9362 (gdbserver_version): Update.
9363 (main): Correct size of own_buf. Do not report initial DLL events.
9364 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9365 (unloaded_dll, xml_escape_text): New.
9366 * win32-low.c (enum target_waitkind): Update comments.
9367 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9368 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9369 (win32_EnumProcessModules, win32_GetModuleInformation)
9370 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9371 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9372 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9373 (win32_Module32First, win32_Module32Next, load_toolhelp)
9374 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9375 (get_child_debug_event): Handle DLL events.
9376 (win32_wait): Likewise.
9377
0d37add9
DJ
93782007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9381 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9382
45e2715e
PA
93832007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9384
9385 * win32-low.c (handle_output_debug_string): Ignore event if not
9386 waiting.
9387
c5674cf1
PA
93882007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9389
9390 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9391
2bbe3cc1
DJ
93922007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9393
9394 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9395
ae13219e
DJ
93962007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9397
9398 * inferiors.c (change_inferior_id): Add comment.
9399 * linux-low.c (check_removed_breakpoint): Add an early
9400 prototype. Improve debug output.
9401 (linux_attach): Doc update.
9402 (linux_detach_one_process, linux_detach): Clean up before releasing
9403 each process.
9404 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9405 * linux-low.h (struct process_info): Doc improvement.
9406 * mem-break.c (delete_all_breakpoints): New.
9407 * mem-break.h (delete_all_breakpoints): New prototype.
9408 * thread-db.c (find_first_thread): New.
9409 (thread_db_create_event): Call it instead of
9410 thread_db_find_new_threads. Clean up unused variables.
9411 (maybe_attach_thread): Remove first thread handling.
9412 (thread_db_find_new_threads): Use find_first_thread.
9413 (thread_db_get_tls_address): Likewise.
9414
4105de34
DJ
94152007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9416
9417 * thread-db.c (thread_db_find_new_threads): Add prototype.
9418 (thread_db_create_event): Check for the main thread before adding
9419 a new thread.
9420 (maybe_attach_thread): Only enable event reporting if TID == 0.
9421 (thread_db_get_tls_address): Check for new threads.
9422
2b876972
DJ
94232007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9424
9425 * linux-low.c (linux_create_inferior): Try execv before execvp.
9426 * spu-low.c (spu_create_inferior): Likewise.
9427
7a245884
DJ
94282007-06-13 Mike Frysinger <vapier@gentoo.org>
9429
9430 * linux-low.c (linux_create_inferior): Change execv to execvp.
9431 * spu-low.c (spu_create_inferior): Likewies.
9432
117ce543
DJ
94332007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9434
9435 * Makefile.in (clean): Clean new files instead of deleted ones.
9436 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9437 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9438 rules.
9439 * configure.srv: Specify XML files and new regformats for MIPS and
9440 MIPS64 GNU/Linux.
9441 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9442 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9443 an entry for the restart register.
9444 (mips_cannot_fetch_register, mips_cannot_store_register)
9445 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9446 register names to match the XML descriptions.
9447 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9448 restart register instead of $0.
9449
0e7f50da
UW
94502007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9451 Markus Deuling <deuling@de.ibm.com>
9452
9453 * remote-utils.c (decode_xfer_write): New function.
9454 * server.h (decode_xfer_write): Add prototype.
9455 * server.c (handle_query): Add PACKET_LEN argument. Support
9456 qXfer:spu:read and qXfer:spu:write packets.
9457 (main): Pass packet_len to handle_query.
9458 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9459 * target.h (target_ops): Add qxfer_spu.
9460
374c1d38
UW
94612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9462
9463 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9464 accessing non-seekable spufs files.
9465
bb63802a
UW
94662007-05-16 Markus Deuling <deuling@de.ibm.com>
9467
889bf7c5 9468 * server.c (handle_query): Add reply for qC packet.
bb63802a 9469
7390519e
PA
94702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9471 Leo Zayas <lerele@champenstudios@com>
9472
9473 * server.h (check_remote_input_interrupt_request): New function.
9474 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9475 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9476 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9477 (check_remote_input_interrupt_request): New function.
9478 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9479 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9480 winapi_GenerateConsoleCtrlEvent): New typedefs.
9481 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9482 to 250 ms.
9483 (win32_wait): Check for remote interrupt request
9484 with check_remote_input_interrupt_request.
9485 (win32_request_interrupt): New function.
9486 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9487
34b34921
PA
94882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9489
9490 * win32-low.c (debug_registers_changed,
9491 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9492 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9493 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9494 (thread_rec): Get context using the low target.
9495 (child_add_thread): Call thread_added on the low target,
9496 which does the same thing.
9497 (regptr): Delete.
9498 (do_initial_child_stuff): Remove debug registers references.
9499 Set context using the low target. Resume threads after
9500 setting the contexts.
9501 (child_continue): Remove dead variable. Remove debug
9502 registers references.
9503 (child_fetch_inferior_registers): Go through the low target.
9504 (do_child_store_inferior_registers): Remove.
9505 (child_store_inferior_registers): Go through the low target.
9506 (win32_resume): Remove debug registers references.
9507 Set context using the low target.
9508 (handle_exception): Change return type to void. Don't record
9509 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9510 first chance exception.
889bf7c5 9511 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9512 goto loop. Always return after waiting for debug event.
9513 (win32_wait): Convert to switch statement. Handle spurious
9514 events.
9515
9516 * win32-i386-low.c (debug_registers_changed,
9517 debug_registers_used): New.
9518 (initial_stuff): Rename to ...
9519 (i386_initial_stuff): ... this. Clear debug registers
9520 state variables.
9521 (store_debug_registers): Delete.
9522 (i386_get_thread_context): New.
9523 (load_debug_registers): Delete.
9524 (i386_set_thread_context): New.
9525 (i386_thread_added): New.
9526 (single_step): Rename to ...
9527 (i386_single_step): ... this.
9528 (do_fetch_inferior_registers): Rename to ...
9529 (i386_fetch_inferior_register): ... this.
9530 (i386_store_inferior_register): New.
9531 (the_low_target): Adapt to new interface.
9532
9533 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9534 (arm_get_thread_context): New.
9535 (arm_set_thread_context): New.
9536 (regptr): New.
9537 (do_fetch_inferior_registers): Rename to ...
9538 (arm_fetch_inferior_register): ... this.
9539 (arm_store_inferior_register): New.
9540 (arm_wince_breakpoint): Reimplement as unsigned long.
9541 (arm_wince_breakpoint_len): Define.
9542 (the_low_target): Adapt to new interface.
9543
9544 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9545 load_debug_registers. Add get_thread_context, set_thread_context,
9546 thread_added and store_inferior_register. Rename
9547 fetch_inferior_registers to fetch_inferior_register.
9548 (regptr): Remove declaration.
9549
dd6953e1
PA
95502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9551
9552 * linux-low.c (linux_detach): Change return type to int. Return 0.
9553 * spu-low.c (spu_detach): Likewise.
9554
444d6139
PA
95552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9556
9557 * target.h (target_ops): Change return type of detach to int.
9558 Add join.
9559 (join_inferior): New.
9560 * server.c (main): Don't skip detach support on mingw32.
9561 If the inferior doesn't support detaching return error.
9562 Call join_inferior instead of using waitpid.
9563 * linux-low.c (linux_join): New.
9564 (linux_target_op): Add linux_join.
9565 * spu-low.c (spu_join): New.
9566 (spu_target_ops): Add spu_join.
9567 * win32-low.c (win32_detach): Adapt to new interface.
9568 Reopen current_process_handle before detaching. Issue a child
9569 resume before detaching.
9570 (win32_join): New.
9571 (win32_target_op): Add win32_join.
9572
1d5315fe
PA
95732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9574
9575 * win32-low.c (win32-attach): Fix return value.
9576 * target.h (target_ops): Describe ATTACH return values.
9577
bf914831
PA
95782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9579
9580 * win32-low.c (GETPROCADDRESS): Define.
9581 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9582 (winapi_DebugSetProcessKillOnExit): Likewise.
9583 (win32_create_inferior): Force usage of ansi CreateProcessA.
9584 (win32_attach): Use GETPROCADDRESS.
9585 (win32_detach): Likewise.
9586
f72f3e60
PA
95872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9588
9589 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9590
ed50f18f
PA
95912007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9592
9593 * win32-low.c: Commit leftover changes from 2007-03-29.
9594
0c2ead7e
DJ
95952007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9596
9597 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9598 fields short instead of int. Add explicit padding.
9599 (i387_cache_to_fsave): Remove unnecessary casts.
9600 (i387_fsave_to_cache): Doc fix.
9601 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9602
73725ff3
DJ
96032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9604
9605 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9606 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9607
d99f33d8
PA
96082007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9609
9610 * configure.srv (arm*-*-mingw32ce*): Move near the other
9611 arm targets.
9612
68070c10
PA
96132007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9614
2482afc6 9615 * configure.ac: Add errno checking.
68070c10
PA
9616 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9617 sys/file.h and malloc.h.
9618 (AC_CHECK_DECLS): Add perror.
9619 (srv_mingwce): Handle.
2482afc6 9620 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9621 win32-i386-low.o to srv_tgtobj.
9622 (i[34567]86-*-mingw*): Likewise.
9623 (arm*-*-mingw32ce*): Add case.
9624 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9625 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9626 [__MINGW32CE__] (strerror): New function.
9627 [__MINGW32CE__] (errno): Define to GetLastError.
9628 [__MINGW32CE__] (COUNTOF): New macro.
9629 (remote_open): Remove extra close call.
9630 * mem-break.c (delete_breakpoint_at): New function.
9631 * mem-break.h (delete_breakpoint_at): Declare.
9632 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9633 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9634 [USE_WIN32API] (read, write): Add char* casts.
9635 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9636 * server.h: Include wincecompat.h on Windows CE.
9637 [HAVE_ERRNO_H]: Check.
9638 (perror): Declare if not declared.
9639 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9640 (perror_with_name): Remove errno declaration.
9641 * wincecompat.h: New.
9642 * wincecompat.c: New.
9643 * win32-low.h: New.
9644 * win32-arm-low.c: New.
9645 * win32-i386-low.c: New.
9646 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9647 (OUTMSG2): Make it safe.
9648 (_T): New macro.
9649 (COUNTOF): New macro.
9650 (NUM_REGS): Get it from the low target.
9651 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9652 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9653 (thread_rec): Let low target handle debug registers.
9654 (child_add_thread): Likewise.
9655 (child_init_thread_list): Likewise.
9656 (continue_one_thread): Likewise.
9657 (regptr): New.
9658 (do_child_fetch_inferior_registers): Move to ...
9659 * win32-i386-low.c: ... here, and rename to ...
9660 (do_fetch_inferior_registers): ... this.
889bf7c5 9661 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9662 Go through the low target.
9663 (do_child_store_inferior_registers): Use regptr.
9664 (strwinerror): New function.
9665 (win32_create_inferior): Handle Windows CE.
9666 Use strwinerror instead of strerror on Windows error
9667 codes. Add program to the error output.
9668 Don't close the main thread handle on Windows CE.
9669 (win32_attach): Use coredll.dll on Windows CE.
9670 (win32_kill): Close current process and current
9671 thread handles.
9672 (win32_detach): Use coredll.dll on Windows CE.
9673 (win32_resume): Let low target handle debug registers, and
9674 step request.
9675 (handle_exception): Add/Remove initial breakpoint. Avoid
9676 non-existant WSTOPSIG on Windows CE.
9677 (win32_read_inferior_memory): Cast to remove warning.
9678 (win32_arch_string): Go through the low target.
9679 (initialize_low): Call set_breakpoint_data with the low
9680 target's breakpoint.
9681 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9682 FOP_REGNUM, mappings): Move to ...
9683 * win32-i386-low.c: ... here.
9684 * win32-low.c (win32_thread_info): Move to ...
9685 * win32-low.h: ... here.
9686 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9687 win32-arm-low.c and wincecompat.c.
9688 (all:): Add $EXEEXT.
9689 (install-only:): Likewise.
9690 (gdbserver:): Likewise.
9691 (gdbreplay:): Likewise.
9692 * config.in: Regenerate.
9693 * configure: Regenerate.
9694
41093d81
PA
96952007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9696
9697 * win32-low.c: Rename typedef thread_info to
9698 win32_thread_info throughout.
9699
544afa54
PA
97002007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9701
9702 * win32-i386-low.c: Rename to ...
9703 * win32-low.c: ... this.
9704 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9705 * Makefile.in: Likewise.
9706
bce7165d
PA
97072007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9708
9709 * remote-utils.c (monitor_output): Constify msg parameter.
9710 * server.h (monitor_output): Likewise.
9711 * win32-i386-low.c (handle_output_debug_string): New.
9712 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9713 handle_output_debug_string.
9714 (get_child_debug_event): Likewise.
9715
506c7aa0
DJ
97162007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9717
9718 * server.c (main): Correct strtoul check.
9719
42c81e2a
DJ
97202007-03-27 Jon Ringle <jon@ringle.org>
9721
9722 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9723
9453113a
DJ
97242007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9725
9726 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9727
64a69107
DJ
97282007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9729
9730 * terminal.h: Check HAVE_SGTTY_H.
9731
97322007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9733
9734 * remote-utils.c (remote_open): Print out the assigned port number.
9735
c74d0ad8
DJ
97362007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * remote-utils.c (monitor_output): New function.
9739 * server.c (debug_threads): Define here.
9740 (monitor_show_help): New function.
9741 (handle_query): Handle qRcmd.
9742 (main): Do not handle 'd' packet.
9743 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9744 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9745 of debug_threads.
9746
de7c3b4a
PA
97472007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9748
9749 * Makefile.in (EXEEXT): New.
9750 (clean): Use $(EXEEXT).
9751
ef57601b
PA
97522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9753
9754 * target.h (target_ops): Rename send_signal to request_interrupt,
9755 and remove enum target_signal parameter.
9756 * linux-low.c (linux_request_interrupt): Rename from
9757 linux_send_signal, and always send SIGINT.
9758 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9759 and always send SIGINT.
9760 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9761 of send_signal.
9762 (input_interrupt): Likewise.
9763
820f2bda
PA
97642007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9765
9766 * server.c (get_features_xml): Check if target implemented
9767 arch_string.
9768 * win32-i386-low.c (win32_arch_string): New.
9769 (win32_target_ops): Add win32_arch_string as arch_string member.
9770
ab39bf24
UW
97712007-02-22 Markus Deuling <deuling@de.ibm.com>
9772
9773 * spu-low.c (spu_arch_string): New.
9774 (spu_target_ops): Add spu_arch_string.
9775
61ff6e04
DJ
97762007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9777
9778 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9779 * configure.ac: Do not check for terminal.h.
9780 * configure, config.in: Regenerated.
9781
fb1e4ffc
DJ
97822007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9783
9784 * Makefile.in (OBS): Add $(XML_BUILTIN).
9785 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9786 (clean): Update.
9787 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9788 (arm-with-iwmmxt.c): New.
9789 * config.in, configure: Regenerate.
9790 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9791 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9792 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9793 (arm*-*-linux*): Add iWMMXt and regset support.
9794 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9795 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9796 (arm_store_wmmxregset, target_regsets): New.
9797 * server.c (get_features_xml): Take annex argument. Check builtin
9798 XML documents.
9799 (handle_query): Handle multiple annexes.
9800
0f48aa01
DJ
98012007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9802
9803 * remote-utils.c [USE_WIN32API] (read, write): Define.
9804 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9805 write.
9806
23181151
DJ
98072007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9808
9809 * linux-i386-low.c (the_low_target): Set arch_string.
9810 * linux-x86-64-low.c (the_low_target): Likewise.
9811 * linux-low.c (linux_arch_string): New.
9812 (linux_target_ops): Add it.
9813 * linux-low.h (struct linux_target_ops): Add arch_string.
9814 * server.c (write_qxfer_response): Use const void * for DATA.
9815 (get_features_xml): New.
9816 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9817 * target.h (struct target_ops): Add arch_string method.
9818
9d606399
DJ
98192007-01-03 Denis Pilat <denis.pilat@st.com>
9820 Daniel Jacobowitz <dan@codesourcery.com>
9821
9822 * linux-low.c (linux_kill): Handle being called with no threads.
9823 * win32-i386-low.c (win32_kill): Likewise.
9824 (get_child_debug_event): Clear current_process_handle.
9825
98262006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9827 Daniel Jacobowitz <dan@codesourcery.com>
9828
9829 * remote-utils.c (remote_open): Check the type of specified
9830 serial port devices before opening them.
9831 * server.c (main): Kill the inferior if an error occurs during
9832 the first remote_open.
9833
a5e13d24
DJ
98342006-12-05 Markus Deuling <deuling@de.ibm.com>
9835
9836 * README: Update supported targets.
9837
186947f7
DJ
98382006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9839
9840 * Makefile.in (clean): Remove reg-mips64.c.
9841 (reg-mips64.c, reg-mips64.o): New rules.
9842 * configure.srv: Handle mips64. Include regset support for mips.
9843 * linux-mips-low.c (union mips_register): New.
9844 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9845 (mips_breakpoint, mips_breakpoint_at): Use int.
9846 (mips_collect_register, mips_supply_register)
9847 (mips_collect_register_32bit, mips_supply_register_32bit)
9848 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9849 (mips_store_fpregset, target_regsets): New.
9850 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9851
a13e2c95
UW
98522006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9853
9854 * configure.srv: Add target "spu*-*-*".
9855 * Makefile.in (clean): Remove reg-spu.c.
9856 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9857 * spu-low.c: New file.
9858
cb7283db
DJ
98592006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * configure.ac: Correct td_thr_tls_get_addr test.
9862 * configure: Regenerated.
9863
89be2091
DJ
98642006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9865
9866 * linux-low.c (linux_wait_for_event): Reformat. Use the
9867 pass_signals array.
9868 * remote-utils.c (decode_address_to_semicolon): New.
9869 * server.c (pass_signals, handle_general_set): New.
9870 (handle_query): Mention QPassSignals for qSupported.
9871 (main): Call handle_general_set.
9872 * server.h (pass_signals, decode_address_to_semicolon): New.
9873
000ef4f0
DJ
98742006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9875
9876 * server.c (handle_query): Correct error handling for read_auxv.
9877
b7149293
UW
98782005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9879
9880 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9881 and srv_linux_thread_db to yes.
9882 * linux-s390-low.c (s390_fill_gregset): New function.
9883 (target_regsets): Define data structure.
9884
dae5f5cf
DJ
98852006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9886
9887 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9888 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9889 * config.in, configure: Regenerated.
9890 * inferiors.c (gdb_id_to_thread): New function.
9891 (gdb_id_to_thread_id): Use it.
9892 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9893 * linux-low.h (struct process_info): Add th member.
9894 (thread_db_get_tls_address): New prototype.
9895 * remote-utils.c (decode_address): Make non-static.
9896 * server.c (handle_query): Handle qGetTLSAddr.
9897 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9898 * target.h (struct target_ops): Add get_tls_address.
9899 * thread-db.c (maybe_attach_thread): Save the thread handle.
9900 (thread_db_get_tls_address): New.
9901
32ca6d61
DJ
99022006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9905 (linux_resume_one_process): Take a siginfo_t *. Update all
9906 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9907 (struct pending_signals): Add a siginfo_t.
9908 (linux_wait_for_process): Always set last_status.
9909 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9910 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9911 * linux-low.h (struct process_info): Add last_status.
9912
5ffff7c1
DJ
99132006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9914
9915 * remote-utils.c (try_rle): New function.
9916 (putpkt_binary): Use it.
9917
8695c747
DJ
99182006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9919
9920 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9921 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9922 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9923 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9924 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9925 point registers.
9926
290fadea
RS
99272006-08-08 Richard Sandiford <richard@codesourcery.com>
9928
9929 * server.c (terminal_fd): New variable.
9930 (old_foreground_pgrp): Likewise.
9931 (restore_old_foreground_pgrp): New function.
9932 (start_inferior): Record the terminal file descriptor in terminal_fd
9933 and its original foreground group in old_foreground_pgrp. Register
9934 restore_old_foreground_pgrp with atexit().
9935
9f2e1e63
DJ
99362006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9937
9938 * server.c (handle_query): Correct qPart to qXfer.
9939
b80864fb
DJ
99402006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9941
9942 * configure.ac: Check for more headers which are missing on
9943 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9944 * configure.srv: Add Cygwin and mingw32.
9945 * remote-utils.c: Don't include headers unconditionally which
9946 are missing on mingw32. Include <winsock.h> for mingw32.
9947 (remote_open): Adjust for mingw32 support. Flush
9948 standard error after writing to it.
9949 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9950 (unblock_async_io, enable_async_io, disable_async_io)
9951 (readchar, getpkt): Update for Winsock support.
9952 (prepare_resume_reply): Expect a protocol signal number.
9953 * server.c: Disable <sys/wait.h> on mingw32.
9954 (start_inferior): Adjust for mingw32 support. Flush
9955 standard error after writing to it.
9956 (attach_inferior): Likewise. Use protocol signal
9957 numbers.
9958 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9959 and names.
9960 * win32-i386-low.c: New file.
9961 * Makefile.in (XM_CLIBS): Set.
9962 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9963 (win32-i386-low.o): New dependency rule.
9964 * linux-low.c (linux_wait): Use target signal numbers.
9965 * target.h (struct target_ops): Doc fix.
9966 * server.h (target_signal_to_name): New prototype.
9967 * gdbreplay.c: Don't include headers unconditionally which
9968 are missing on mingw32. Include <winsock.h> for mingw32.
9969 (remote_close, remote_open): Adjust for Winsock support.
9970 * configure, config.in: Regenerated.
9971
0876f84a
DJ
99722006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9973
9974 * server.c (decode_xfer_read, write_qxfer_response): New.
9975 (handle_query): Take a packet length argument. Handle
9976 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9977 the qSupported response.
9978 (main): Update call to handle_query.
9979
01f9e8fa
DJ
99802006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9981
9982 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9983 (putpkt_binary): Renamed from putpkt and adjusted for binary
9984 data.
9985 (putpkt): New wrapper for putpkt_binary.
9986 (readchar): Don't mask off the high bit.
9987 (decode_X_packet): New function.
9988 * server.c (main): Call putpkt_binary if a handler sets the packet
9989 length. Save the length of the incoming packet. Handle 'X'.
9990 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9991
be2a5f71
DJ
99922006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9993
9994 * server.c (handle_query): Handle qSupported.
9995
ea025f5f
DJ
99962006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9997
9998 * remote-utils.c (all_symbols_looked_up): New variable.
9999 (look_up_one_symbol): Check it.
10000 * server.h (look_up_one_symbol): New declaration.
10001 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10002
9308fc88
DJ
100032006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10006 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10007 (PTRACE_GET_THREAD_AREA): Define.
10008 (ps_get_thread_area): New function.
10009
52fb6437
NS
100102006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10011
10012 * configure.srv (m68k*-*-uclinux*): New target.
10013 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10014 (linux_resume_one_process): Remove extraneous cast.
10015 (linux_read_offsets): New.
10016 (linux_target_op): Add linux_read_offsets on mmuless systems.
10017 * server.c (handle_query): Add qOffsets logic.
10018 * target.h (struct target_ops): Add read_offsets.
10019
21b0f40c
DJ
100202006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10021
10022 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10023 (PTRACE_GET_THREAD_AREA): Define.
10024 (ps_get_thread_area): New function.
10025 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10026 (linux-x86-64-low.o): Update.
10027
0050a760
DJ
100282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10029
10030 * configure.ac: Remove checks for prfpregset_t.
10031 * gdb_proc_service.h: New file.
10032 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10033 new "gdb_proc_service.h".
10034 * proc-service.c: Likewise.
10035 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10036 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10037 * Makefile.in (gdb_proc_service_h): Updated.
10038 * configure, config.in: Regenerated.
10039
b92a518e
DJ
100402006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10041
10042 * remote-utils.c (prepare_resume_reply): Move declaration
10043 of gdb_id_from_wait to the top of the block.
10044
545587ee
DJ
100452006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10046
10047 * linux-low.c (regsets_store_inferior_registers): Read the regset
10048 from the target before filling it.
10049
9db87ebd
DJ
100502006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10051
10052 * server.c (attach_inferior): Return SIGTRAP for a successful
10053 attach.
10054
dd24457d
DJ
100552006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10056
10057 * Makefile.in (OBS): Add version.o.
10058 (STAGESTUFF): Delete.
10059 (version.o): Add dependencies.
10060 (version.c): Replace rule.
10061 (clean): Remove version.c.
10062 * server.c (gdbserver_version): New.
10063 (gdbserver_usage): Use printf.
10064 (main): Handle --version and --help.
10065 * server.h (version, host_name): Add declarations.
10066
6f0f660e
EZ
100672005-12-23 Eli Zaretskii <eliz@gnu.org>
10068
889bf7c5
PA
10069 * linux-arm-low.c:
10070 * linux-arm-low.c:
10071 * inferiors.c:
10072 * i387-fp.h:
10073 * i387-fp.c:
10074 * gdbreplay.c:
10075 * regcache.c:
10076 * proc-service.c:
10077 * mem-break.h:
10078 * mem-break.c:
10079 * linux-x86-64-low.c:
10080 * linux-sh-low.c:
10081 * linux-s390-low.c:
10082 * linux-ppc64-low.c:
10083 * linux-ppc-low.c:
10084 * linux-mips-low.c:
10085 * linux-m68k-low.c:
10086 * linux-m32r-low.c:
10087 * linux-low.h:
10088 * linux-low.c:
10089 * linux-ia64-low.c:
10090 * linux-i386-low.c:
10091 * linux-crisv32-low.c:
10092 * thread-db.c:
10093 * terminal.h:
10094 * target.h:
10095 * target.c:
10096 * server.h:
10097 * server.c:
10098 * remote-utils.c:
10099 * regcache.h:
10100 * utils.c:
10101 * Makefile.in:
10102 * configure.ac:
6f0f660e
EZ
10103 * gdbserver.1: Add (C) after Copyright. Update the FSF
10104 address.
10105
9d1fb177
DJ
101062005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10107
10108 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10109 (arm_breakpoint_at): Recognize both breakpoints.
10110 (the_low_target): Use the correct breakpoint instruction.
10111
011a70c2
DJ
101122005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10115 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10116 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10117 (the_low_target): Update.
10118
7fb85e41
AS
101192005-10-25 Andreas Schwab <schwab@suse.de>
10120
10121 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10122
10123 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10124 (ia64_num_regs): Reduce to 462.
10125
3db0444b
DJ
101262005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * acinclude.m4: Correct quoting.
10129 * aclocal.m4: Regenerated.
10130
10131 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10132 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10133 (thread_db_init): Call thread_db_err_str.
10134 * configure.ac: Check for TD_VERSION.
10135 * config.in, configure: Regenerated.
10136
bee0189a
DJ
101372005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10138
10139 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10140
e9d25b98
DJ
101412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10144 is not available. Define HAVE_PTRACE_GETREGS if it is.
10145 * config.in, configure: Regenerated.
10146 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10147 * linux-i386-low.c, linux-m68k-low.c: Update to use
10148 HAVE_PTRACE_GETREGS.
10149 * linux-low.c (regsets_fetch_inferior_registers)
10150 (regsets_store_inferior_registers): Only return 0 if we processed
10151 GENERAL_REGS.
10152 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10153 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10154
a06660f7
DJ
101552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * inferiors.c (struct thread_info): Add gdb_id.
10158 (add_thread): Add gdb_id argument.
10159 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10160 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10161 calls to add_thread.
10162 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10163 * server.c (handle_query): Use thread_to_gdb_id.
10164 (handle_v_cont, main): Use gdb_id_to_thread_id.
10165 * server.h (add_thread): Update prototype.
10166 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10167 prototypes.
10168
5a1f5858
DJ
101692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10170
10171 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10172 left-padded registers.
10173 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10174 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10175
e122f1f5
SE
101762005-07-01 Steve Ellcey <sje@cup.hp.com>
10177
10178 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10179 * configure: Regenerate.
10180 * config.in: Regenerate.
10181 * server.h (NEED_DECLARATION_STRERROR):
10182 Replace with !HAVE_DECL_STRERROR.
10183
d592fa2f
DJ
101842005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10185
10186 * linux-low.c (linux_wait, linux_send_signal): Don't test
10187 an unsigned long variable for > 0 if it could be MAX_ULONG.
10188 * server.c (myresume): Likewise.
10189 * target.c (set_desired_inferior): Likewise.
10190
ccbd4912
MK
101912005-06-13 Mark Kettenis <kettenis@gnu.org>
10192
10193 * configure.ac: Simplify and improve check for socklen_t.
10194 * configure, config.in: Regenerate.
10195
f450004a
DJ
101962005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * acconfig.h: Remove.
10199 * configure.ac: Add a test for socklen_t. Use three-argument
10200 AC_DEFINE throughout.
10201 * config.in: Regenerated using autoheader 2.59.
10202 * configure: Regenerated.
10203
10204 * gdbreplay.c (socklen_t): Provide a default.
10205 (remote_open): Use socklen_t.
10206 * remote-utils.c (socklen_t): Provide a default.
10207 (remote_open): Use socklen_t.
10208 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10209 unsigned char.
10210
10211 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10212 char for buffers.
10213 * linux-low.c (linux_read_memory, linux_write_memory)
10214 (linux_read_auxv): Likewise.
10215 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10216 (check_mem_write): Likewise.
10217 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10218 Likewise.
10219 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10220 (registers_from_string, register_data): Likewise.
10221 * server.c (handle_query, main): Likewise.
10222 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10223 (decode_M_packet): Likewise.
10224 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10225 * target.h (struct target_ops): Update read_memory, write_memory,
10226 and read_auxv.
10227 (read_inferior_memory, write_inferior_memory): Update.
10228 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10229 to unsigned char *.
10230 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10231 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10232 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10233 linux-s390-low.c, linux-sh-low.c: Update for changes in
10234 read_inferior_memory and the_low_target->breakpoint.
10235
eee84df1
DJ
102362005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10239 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10240 * configure.srv: Add powerpc64-*-linux*.
10241 * linux-ppc64-low.c: New file.
10242
45b134e5
OF
102432005-05-23 Orjan Friberg <orjanf@axis.com>
10244
10245 * linux-cris-low.c: New file with support for CRIS.
10246 * linux-crisv32-low.c: Ditto for CRISv32.
10247 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10248 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10249 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10250 reg-crisv32.o, and reg-crisv32.c to make rules.
10251 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10252 recognized targets.
10253
48d93c75
UW
102542005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10255
10256 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10257 of sizeof (PTRACE_XFER_TYPE).
10258 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10259
e013ee27
OF
102602005-05-12 Orjan Friberg <orjanf@axis.com>
10261
889bf7c5 10262 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10263 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10264 pointers for hardware watchpoint support.
10265 * linux-low.h (struct linux_target_ops): Ditto.
10266 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10267 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10268 to linux_target_ops.
10269 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10270 reply packet.
10271 * server.c (main): Recognize 'Z' and 'z' packets.
10272
b0ded00b
UW
102732005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10274
10275 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10276 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10277 (the_low_target): Add new members.
10278
8643e2ad
DJ
102792005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * proc-service.c (ps_lgetregs): Search all_processes instead of
10282 all_threads.
10283
fc620387
DJ
102842005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10285
10286 * server.c (start_inferior): Change return type to int.
10287 (attach_inferior): Change sigptr to int *.
10288 (handle_v_cont, handle_v_requests): Change signal to int *.
10289 (main): Change signal to int.
10290
102912005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10292
10293 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10294 * configure.srv: Add m32r*-*-linux*.
10295 * linux-m32r-low.c: New file.
10296
e0e76420
DJ
102972005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10298
10299 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10300
a1928bad
DJ
103012005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10304 Take unsigned long arguments for PIDs.
10305 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10306 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10307 (wait_for_sigstop, linux_resume_one_process)
10308 (regsets_fetch_inferior_registers, linux_send_signal)
10309 (linux_read_auxv): Likewise. Update the types of variables holding
10310 PIDs. Update format string specifiers.
10311 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10312 * remote-utils.c (prepare_resume_reply): Likewise.
10313 * server.c (cont_thread, general_thread, step_thread)
10314 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10315 unsigned long.
10316 (handle_query): Update format specifiers.
10317 (handle_v_cont, main): Use strtoul for thread IDs.
10318 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10319 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10320 (general_thread, step_thread, thread_from_wait)
10321 (old_thread_from_wait): Update.
10322 * target.h (struct thread_resume): Use unsigned long for THREAD.
10323 (struct target_ops): Use unsigned long for arguments to attach and
10324 thread_alive.
10325
dcdb98d2
DJ
103262005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10327
10328 * acinclude.m4: Include bfd/bfd.m4 directly.
10329 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10330 <agriffis@toolchain.org>.
10331 * aclocal.m4, configure: Regenerated.
10332
bec39cab
AC
103332005-01-07 Andrew Cagney <cagney@gnu.org>
10334
10335 * configure.ac: Rename configure.in, require autoconf 2.59.
10336 * configure: Re-generate.
10337
434c4c77
DJ
103382004-12-08 Daniel Jacobowitz <dan@debian.org>
10339
10340 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10341 LIBS when finished.
10342 * aclocal.m4: Regenerated.
10343 * configure: Regenerated.
10344
db1d3e1b
AS
103452004-11-21 Andreas Schwab <schwab@suse.de>
10346
10347 * linux-m68k-low.c (m68k_num_gregs): Define.
10348 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10349 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10350 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10351 (m68k_breakpoint_at): New. Add to the_low_target.
10352
10353 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10354 srv_linux_thread_db to yes.
10355
43360365
JB
103562004-10-20 Joel Brobecker <brobecker@gnat.com>
10357
10358 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10359 (ARCH_SET_FS): Likewise.
10360 (ARCH_GET_FS): Likewise.
10361 (ARCH_GET_GS): Likewise.
10362
fd500816
DJ
103632004-10-16 Daniel Jacobowitz <dan@debian.org>
10364
10365 * linux-i386-low.c (ps_get_thread_area): New.
10366 * linux-x86-64-low.c (ps_get_thread_area): New.
10367 * linux-low.c: Include <sys/syscall.h>.
10368 (linux_kill_one_process): Don't kill the first thread here.
10369 (linux_kill): Kill the first thread here.
10370 (kill_lwp): New function.
10371 (send_sigstop, linux_send_signal): Use it.
10372 * proc-service.c: Clean up #ifdefs.
10373 (fpregset_info): Delete.
10374 (ps_lgetregs): Update and enable implementation.
10375 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10376 implementations.
10377 * remote-utils.c (struct sym_cache, symbol_cache): New.
10378 (input_interrupt): Print a clearer message.
10379 (async_io_enabled): New variable.
10380 (enable_async_io, disable_async_io): Use it. Update comments.
10381 (look_up_one_symbol): Use the symbol cache.
10382 * thread-db.c (thread_db_look_up_symbols): New function.
10383 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10384
f6de3c42
DJ
103852004-10-16 Daniel Jacobowitz <dan@debian.org>
10386
10387 * configure.in: Test for -rdynamic.
10388 * configure: Regenerated.
10389 * Makefile (INTERNAL_LDFLAGS): New.
10390 (gdbserver, gdbreplay): Use it.
10391
2c0fc042
AC
103922004-09-02 Andrew Cagney <cagney@gnu.org>
10393
10394 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10395
075b3282
DJ
103962004-03-23 Daniel Jacobowitz <drow@mvista.com>
10397
10398 * linux-low.c (linux_wait): Clear all_processes list also.
10399
fa6a77dc
DJ
104002004-03-12 Daniel Jacobowitz <drow@mvista.com>
10401
10402 * linux-low.c: Include <errno.h>. Remove extern declaration of
10403 errno.
10404
6d782a97
DJ
104052004-03-12 Daniel Jacobowitz <drow@mvista.com>
10406
10407 * gdbreplay.c, server.h, utils.c: Update copyright years.
10408
3a7fb99b
DJ
104092004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10410
10411 * server.c (main): Print child status or termination signal from
10412 variable 'signal', not 'sig'.
10413
c3e735a6
DJ
104142004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10415
10416 * linux-low.c (linux_read_memory): Change return type to
10417 int. Check for and return error from ptrace().
10418 * target.c (read_inferior_memory): Change return type to int. Pass
10419 back return status from the_target->read_memory().
10420 * target.h (struct target_ops): Adapt *read_memory() prototype.
10421 Update comment.
10422 (read_inferior_memory): Adapt prototype.
10423 * server.c (main): Return an error packet if
10424 read_inferior_memory() returns an error.
10425
a59d1c82
DJ
104262004-03-04 Daniel Jacobowitz <drow@mvista.com>
10427
10428 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10429 Unify with other clean targets.
10430
dc3f8883
DJ
104312004-02-29 Daniel Jacobowitz <drow@mvista.com>
10432
10433 * server.c (handle_v_cont): Call set_desired_inferior.
10434
89a208da
DJ
104352004-02-29 Daniel Jacobowitz <drow@mvista.com>
10436
10437 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10438
62ea82f5
DJ
104392004-02-29 Daniel Jacobowitz <drow@mvista.com>
10440
10441 * linux-low.c (linux_wait): Unblock async I/O.
10442 (linux_resume): Block and enable async I/O.
10443 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10444 * server.h (block_async_io, unblock_async_io): Add prototypes.
10445
6910d122
DJ
104462004-02-29 Daniel Jacobowitz <drow@mvista.com>
10447
10448 * remote-utils.c (remote_open): Print a status notice after
10449 opening a TCP port.
10450 * server.c (attach_inferior): Print a status notice after
10451 attaching.
10452
104532004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10454
10455 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10456
c89dc5d4
DJ
104572004-02-26 Daniel Jacobowitz <drow@mvista.com>
10458
10459 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10460 error packet.
10461 * server.c, target.h: Update copyright years.
10462
4b8dad4a
RM
104632004-02-25 Roland McGrath <roland@redhat.com>
10464
10465 * target.h (struct target_ops): New member `read_auxv'.
10466 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10467 * linux-low.c (linux_read_auxv): New function.
10468 (linux_target_ops): Initialize `read_auxv' member to that.
10469
d7446758
JB
104702004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10471
10472 Committed by Jim Blandy <jimb@redhat.com>.
10473
10474 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10475 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10476 instead of GPR_SIZE to distiguish s390 and s390x targets.
10477
5544ad89
DJ
104782004-01-31 Daniel Jacobowitz <drow@mvista.com>
10479
10480 * linux-low.c: Update copyright year.
10481 (check_removed_breakpoint): Clear pending_is_breakpoint.
10482 (linux_set_resume_request, linux_queue_one_thread)
10483 (resume_status_pending_p): New functions.
10484 (linux_continue_one_thread): Use process->resume.
10485 (linux_resume): Only resume threads if there are no pending events.
10486 * linux-low.h (struct process_info): Add resume request
10487 pointer.
10488
2a68b70e
DJ
104892004-01-30 Daniel Jacobowitz <drow@mvista.com>
10490
10491 * regcache.c (new_register_cache): Clear the allocated register
10492 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10493
64386c31
DJ
104942003-10-13 Daniel Jacobowitz <drow@mvista.com>
10495
10496 * linux-low.c (linux_resume): Take a struct thread_resume *
10497 argument.
10498 (linux_wait): Update call.
10499 (resume_ptr): New static variable.
10500 (linux_continue_one_thread): Renamed from
10501 linux_continue_one_process. Use resume_ptr.
10502 (linux_resume): Use linux_continue_one_thread.
10503 * server.c (handle_v_cont, handle_v_requests): New functions.
10504 (myresume): New function.
10505 (main): Handle 'v' case.
10506 * target.h (struct thread_resume): New type.
10507 (struct target_ops): Change argument of "resume" to struct
10508 thread_resume *.
10509 (myresume): Delete macro.
10510
c938e9b0
L
105112003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10512
10513 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10514 (uninstall): Support DESTDIR.
10515
7f313d07
BC
10516Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10517
10518 * configure.srv: Add xscale*linux copy of arm*linux entry.
10519
3b2fc2ea
DJ
105202003-07-24 Daniel Jacobowitz <drow@mvista.com>
10521
10522 * linux-arm-low.c (arm_reinsert_addr): New function.
10523 (the_low_target): Add arm_reinsert_addr.
10524
1c0a559e
MK
105252003-07-08 Mark Kettenis <kettenis@gnu.org>
10526
10527 * mem-break.c: Remove whitespace at end of file.
10528
43d5792c
DJ
105292003-06-28 Daniel Jacobowitz <drow@mvista.com>
10530
10531 * configure.in: Check whether we need to prototype strerror.
10532 * server.h: Optionally prototype strerror.
10533 * gdbreplay.c (perror_with_name): Use strerror.
10534 * linux-low.c (linux_attach_lwp): Use strerror.
10535 * utils.c (perror_with_name): Use strerror.
10536 * config.in, configure: Regenerated.
10537
c8a86edf
DJ
105382003-06-28 Daniel Jacobowitz <drow@mvista.com>
10539
10540 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10541 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10542
73d37363
DJ
105432003-06-20 Daniel Jacobowitz <drow@mvista.com>
10544
10545 * Makefile.in (SFILES): Update.
10546 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10547 low-sun3.c: Remove files.
10548
6ad8ae5c
DJ
105492003-06-17 Daniel Jacobowitz <drow@mvista.com>
10550
10551 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10552 (linux_detach_one_process, linux_detach): New functions.
10553 (linux_target_ops): Add linux_detach.
10554 * server.c (main): Handle 'D' packet.
10555 * target.h (struct target_ops): Add "detach" member.
10556 (detach_inferior): Define.
10557
1581182a
MK
105582003-06-13 Mark Kettenis <kettenis@gnu.org>
10559
10560 From Kelley Cook <kelleycook@wideopenwest.com>:
10561 * configure.srv: Accept i[34567]86 variants.
10562
e5379b03
DJ
105632003-06-05 Daniel Jacobowitz <drow@mvista.com>
10564
10565 * linux-low.c (linux_wait_for_event): Correct comment typos.
10566 (linux_resume_one_process): Call check_removed_breakpoint.
10567 (linux_send_signal): New function.
10568 (linux_target_ops): Add linux_send_signal.
10569 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10570 of kill.
10571 * target.h (struct target_ops): Add send_signal.
10572
2ff29de4
JB
105732003-05-29 Jim Blandy <jimb@redhat.com>
10574
10575 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10576 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10577 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10578 away part of the register's value.
10579
254787d4
DJ
105802003-03-26 Daniel Jacobowitz <drow@mvista.com>
10581
10582 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10583 (linux_wait_for_event, linux_init_signals): Likewise.
10584
94e10508
DJ
105852003-03-17 Daniel Jacobowitz <drow@mvista.com>
10586
10587 * configure.in: Check for stdlib.h.
10588 * configure: Regenerated.
10589 * config.in: Regenerated.
10590
4c0711e0
DJ
105912003-01-04 Andreas Schwab <schwab@suse.de>
10592
10593 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10594
ef66e766
AC
105952003-01-02 Andrew Cagney <ac131313@redhat.com>
10596
10597 * Makefile.in: Remove obsolete code.
10598
a1358604
DJ
105992002-11-20 Daniel Jacobowitz <drow@mvista.com>
10600
10601 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10602 defined(PT_FPR0_HI).
10603
23ce3b1c
DJ
106042002-11-17 Stuart Hughes <seh@zee2.com>
10605
10606 * linux-arm-low.c (arm_num_regs): Increase.
10607 (arm_regmap): Include status register.
10608
106092002-11-17 Daniel Jacobowitz <drow@mvista.com>
10610
10611 * linux-low.c (register_addr): Remove incorrect -1 check.
10612
a9fa9f7d
DJ
106132002-08-29 Daniel Jacobowitz <drow@mvista.com>
10614
10615 * linux-low.c (linux_create_inferior): Call setpgid. Return
10616 the new PID.
10617 (unstopped_p, linux_signal_pid): Remove.
10618 (linux_target_ops): Remove linux_signal_pid.
10619 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10620 global instead of target method.
10621 * target.h (struct target_ops): Remove signal_pid. Update comment
10622 for create_inferior.
10623 * server.c (signal_pid): New variable.
10624 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10625 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10626 (attach_inferior): Set signal_pid.
10627
17574093
DJ
106282002-08-23 Daniel Jacobowitz <drow@mvista.com>
10629
10630 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10631
106322002-08-20 Jim Blandy <jimb@redhat.com>
10633
10634 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10635 default for this.
10636
106372002-08-01 Andrew Cagney <cagney@redhat.com>
10638
10639 * Makefile.in: Make chill references obsolete.
10640
106412002-07-24 Kevin Buettner <kevinb@redhat.com>
10642
10643 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10644 * configure: Regenerate.
10645 * config.in: Regenerate.
10646
106472002-07-09 David O'Brien <obrien@FreeBSD.org>
10648
10649 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10650 (perror_with_name, remote_close, remote_open, expect, play): Static.
10651
106522002-07-04 Michal Ludvig <mludvig@suse.cz>
10653
4b8dad4a 10654 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10655 byte offsets instead of an array of indexes.
10656 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10657
106582002-06-13 Daniel Jacobowitz <drow@mvista.com>
10659
10660 * regcache.c: Add comment.
10661
106622002-06-11 Daniel Jacobowitz <drow@mvista.com>
10663
10664 * thread-db.c: New file.
10665 * proc-service.c: New file.
10666 * acinclude.m4: New file.
10667 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10668 proc-service.o, and thread-db.o.
10669 (linux-low.o): Add USE_THREAD_DB.
10670 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10671 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10672 * aclocal.m4: Regenerated.
10673 * config.in: Regenerated.
10674 * configure: Regenerated.
10675 * configure.in: Check for proc_service.h, sys/procfs.h,
10676 thread_db.h, and linux/elf.h headrs.
10677 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10678 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10679 Check for -lthread_db and thread support.
10680 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10681 PowerPC, and SuperH.
10682 * i387-fp.c: Constify arguments.
10683 * i387-fp.h: Likewise.
10684 * inferiors.c: (struct thread_info): Renamed from
10685 `struct inferior_info'. Remove PID member. Use generic inferior
10686 list header. All uses updated.
10687 (inferiors, signal_pid): Removed.
10688 (all_threads): New variable.
10689 (get_thread): Define.
10690 (add_inferior_to_list): New function.
10691 (for_each_inferior): New function.
10692 (change_inferior_id): New function.
10693 (add_inferior): Removed.
10694 (remove_inferior): New function.
10695 (add_thread): New function.
10696 (free_one_thread): New function.
10697 (remove_thread): New function.
10698 (clear_inferiors): Use for_each_inferior and free_one_thread.
10699 (find_inferior): New function.
10700 (find_inferior_id): New function.
10701 (inferior_target_data): Update argument type.
10702 (set_inferior_target_data): Likewise.
10703 (inferior_regcache_data): Likewise.
10704 (set_inferior_regcache_data): Likewise.
10705 * linux-low.c (linux_bp_reinsert): Remove.
10706 (all_processes, stopping_threads, using_thrads)
10707 (struct pending_signals, debug_threads, pid_of): New.
10708 (inferior_pid): Replace with macro.
10709 (struct inferior_linux_data): Remove.
10710 (get_stop_pc, add_process): New functions.
10711 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10712 Use add_process and add_thread.
10713 (linux_attach_lwp): New function, based on old linux_attach. Use
10714 add_process and add_thread. Set stop_expected for new threads.
10715 (linux_attach): New function.
10716 (linux_kill_one_process): New function.
10717 (linux_kill): Kill all LWPs.
10718 (linux_thread_alive): Use find_inferior_id.
10719 (check_removed_breakpoints, status_pending_p): New functions.
10720 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10721 Update. Use WNOHANG. Wait for cloned processes also. Update process
10722 struct for the found process.
10723 (linux_wait_for_event): New function.
10724 (linux_wait): Use it. Support LWPs.
10725 (send_sigstop, wait_for_sigstop, stop_all_processes)
10726 (linux_resume_one_process, linux_continue_one_process): New functions.
10727 (linux_resume): Support LWPs.
10728 (REGISTER_RAW_SIZE): Remove.
10729 (fetch_register): Use register_size instead. Call supply_register.
10730 (usr_store_inferior_registers): Likewise. Call collect_register.
10731 Fix recursive case.
10732 (regsets_fetch_inferior_registers): Improve error message.
10733 (regsets_store_inferior_registers): Add debugging.
10734 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10735 (unstopped_p, linux_signal_pid): New functions.
10736 (linux_target_ops): Add linux_signal_pid.
10737 (linux_init_signals): New function.
10738 (initialize_low): Call it. Initialize using_threads.
10739 * regcache.c (inferior_regcache_data): Add valid
10740 flag.
10741 (get_regcache): Fetch registers lazily. Add fetch argument
10742 and update all callers.
10743 (regcache_invalidate_one, regcache_invalidate): New
10744 functions.
10745 (new_register_cache): Renamed from create_register_cache.
10746 Return the new regcache.
10747 (free_register_cache): Change argument to a void *.
10748 (registers_to_string, registers_from_string): Call get_regcache
10749 with fetch flag set.
10750 (register_data): Make static. Pass fetch flag to get_regcache.
10751 (supply_register): Call get_regcache with fetch flag clear.
10752 (collect_register): Call get_regcache with fetch flag set.
10753 (collect_register_as_string): New function.
10754 * regcache.h: Update.
10755 * remote-utils.c (putpkt): Flush after debug output and use
10756 stderr.
10757 Handle input interrupts while waiting for an ACK.
10758 (input_interrupt): Use signal_pid method.
10759 (getpkt): Flush after debug output and use stderr.
10760 (outreg): Use collect_register_as_string.
10761 (new_thread_notify, dead_thread_notify): New functions.
10762 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10763 and general_thread.
10764 (look_up_one_symbol): Flush after debug output.
10765 * server.c (step_thread, server_waiting): New variables.
10766 (start_inferior): Don't use signal_pid. Update call to mywait.
10767 (attach_inferior): Update call to mywait.
10768 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10769 (main): Don't fetch/store registers explicitly. Use
10770 set_desired_inferior. Support proposed ``Hs'' packet. Update
10771 calls to mywait.
10772 * server.h: Update.
10773 (struct inferior_list, struct_inferior_list_entry): New.
10774 * target.c (set_desired_inferior): New.
10775 (write_inferior_memory): Constify.
10776 (mywait): New function.
10777 * target.h: Update.
10778 (struct target_ops): New signal_pid method.
10779 (mywait): Removed macro, added prototype.
10780
10781 * linux-low.h (regset_func): Removed.
10782 (regset_fill_func, regset_store_func): New.
10783 (enum regset_type): New.
10784 (struct regset_info): Add type field. Use new operation types.
10785 (struct linux_target_ops): stop_pc renamed to get_pc.
10786 Add decr_pc_after_break and breakpoint_at.
10787 (get_process, get_thread_proess, get_process_thread)
10788 (strut process_info, all_processes, linux_attach_lwp)
10789 (thread_db_init): New.
10790
10791 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10792 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10793 (the_low_target): Add new members.
10794 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10795 (i386_store_fpxregset): Constify.
10796 (target_regsets): Add new kind identifier.
10797 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10798 (i386_set_pc): Add debugging.
10799 (i386_breakpoint_at): New function.
10800 (the_low_target): Add new members.
10801 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10802 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10803 (mips_breakpoint_at): New.
10804 (the_low_target): Add new members.
10805 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10806 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10807 (the_low_target): Add new members.
10808 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10809 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10810 (the_low_target): Add new members.
10811 * linux-x86-64-low.c (target_regsets): Add new kind
10812 identifier.
10813
108142002-05-15 Daniel Jacobowitz <drow@mvista.com>
10815
10816 From Martin Pool <mbp@samba.org>:
10817 * server.c (gdbserver_usage): New function.
10818 (main): Call it.
10819
108202002-05-14 Daniel Jacobowitz <drow@mvista.com>
10821
10822 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10823 stop_at -> stop_pc.
10824
108252002-05-04 Andrew Cagney <ac131313@redhat.com>
10826
10827 * Makefile.in: Remove obsolete code.
10828
108292002-04-24 Michal Ludvig <mludvig@suse.cz>
10830
10831 * linux-low.c (regsets_fetch_inferior_registers),
10832 (regsets_store_inferior_registers): Removed cast to int from
10833 ptrace() calls.
10834 * regcache.h: Added declaration of struct inferior_info.
10835
108362002-04-20 Daniel Jacobowitz <drow@mvista.com>
10837
10838 * inferiors.c (struct inferior_info): Add regcache_data.
10839 (add_inferior): Call create_register_cache.
10840 (clear_inferiors): Call free_register_cache.
10841 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10842 * regcache.c (struct inferior_regcache_data): New.
10843 (registers): Remove.
10844 (get_regcache): New function.
10845 (create_register_cache, free_register_cache): New functions.
10846 (set_register_cache): Don't initialize the register cache here.
10847 (registers_to_string, registers_from_string, register_data): Call
10848 get_regcache.
10849 * regcache.h: Add prototypes.
10850 * server.h: Likewise.
10851
108522002-04-20 Daniel Jacobowitz <drow@mvista.com>
10853
10854 * mem-break.c: New file.
10855 * mem-break.h: New file.
10856 * Makefile.in: Add mem-break.o rule; update server.h
10857 dependencies.
10858 * inferiors.c (struct inferior_info): Add target_data
10859 member.
10860 (clear_inferiors): Free target_data member if set.
10861 (inferior_target_data, set_inferior_target_data): New functions.
10862 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10863 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10864 * linux-low.c (linux_bp_reinsert): New variable.
10865 (struct inferior_linux_data): New.
10866 (linux_create_inferior): Use set_inferior_target_data.
10867 (linux_attach): Likewise. Call add_inferior.
10868 (linux_wait_for_one_inferior): New function.
10869 (linux_wait): Call it.
10870 (linux_write_memory): Add const.
10871 (initialize_low): Call set_breakpoint_data.
10872 * linux-low.h (struct linux_target_ops): Add breakpoint
10873 handling members.
10874 * server.c (attach_inferior): Remove extra add_inferior
10875 call.
10876 * server.h: Include mem-break.h. Update inferior.c
10877 prototypes.
10878 * target.c (read_inferior_memory)
10879 (write_inferior_memory): New functions.
10880 * target.h (read_inferior_memory)
10881 (write_inferior_memory): Change macros to prototypes.
10882 (struct target_ops): Update comments. Add const to write_memory
10883 definition.
10884
108852002-04-11 Daniel Jacobowitz <drow@mvista.com>
10886
10887 * linux-low.c (usr_store_inferior_registers): Support
10888 registers which are allowed to fail to store.
10889 * linux-low.h (linux_target_ops): Likewise.
10890 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10891 (ppc_cannot_store_register): FPSCR may not be storable.
10892
108932002-04-09 Daniel Jacobowitz <drow@mvista.com>
10894
10895 * server.h: Include <string.h> if HAVE_STRING_H.
10896 * ChangeLog: Correct paths in last ChangeLog entry.
10897
108982002-04-09 Daniel Jacobowitz <drow@mvista.com>
10899
10900 * linux-low.h: Remove obsolete prototypes.
10901 (struct linux_target_ops): New.
10902 (extern the_low_target): New.
10903 * linux-low.c (num_regs, regmap): Remove declarations.
10904 (register_addr): Use the_low_target explicitly.
10905 (fetch_register): Likewise.
10906 (usr_fetch_inferior_registers): Likewise.
10907 (usr_store_inferior_registers): Likewise.
10908 * linux-arm-low.c (num_regs): Remove.
10909 (arm_num_regs): Define.
10910 (arm_regmap): Renamed from regmap, made static.
10911 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10912 made static.
10913 (arm_cannot_store_register): Renamed from cannot_store_register,
10914 made static.
10915 (the_low_target): New.
10916 * linux-i386-low.c (num_regs): Remove.
10917 (i386_num_regs): Define.
10918 (i386_regmap): Renamed from regmap, made static.
10919 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10920 made static.
10921 (i386_cannot_store_register): Renamed from cannot_store_register,
10922 made static.
10923 (the_low_target): New.
10924 * linux-ia64-low.c (num_regs): Remove.
10925 (ia64_num_regs): Define.
10926 (ia64_regmap): Renamed from regmap, made static.
10927 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10928 made static.
10929 (ia64_cannot_store_register): Renamed from cannot_store_register,
10930 made static.
10931 (the_low_target): New.
10932 * linux-m68k-low.c (num_regs): Remove.
10933 (m68k_num_regs): Define.
10934 (m68k_regmap): Renamed from regmap, made static.
10935 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10936 made static.
10937 (m68k_cannot_store_register): Renamed from cannot_store_register,
10938 made static.
10939 (the_low_target): New.
10940 * linux-mips-low.c (num_regs): Remove.
10941 (mips_num_regs): Define.
10942 (mips_regmap): Renamed from regmap, made static.
10943 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10944 made static.
10945 (mips_cannot_store_register): Renamed from cannot_store_register,
10946 made static.
10947 (the_low_target): New.
10948 * linux-ppc-low.c (num_regs): Remove.
10949 (ppc_num_regs): Define.
10950 (ppc_regmap): Renamed from regmap, made static.
10951 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10952 made static.
10953 (ppc_cannot_store_register): Renamed from cannot_store_register,
10954 made static.
10955 (the_low_target): New.
10956 * linux-s390-low.c (num_regs): Remove.
10957 (s390_num_regs): Define.
10958 (s390_regmap): Renamed from regmap, made static.
10959 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10960 made static.
10961 (s390_cannot_store_register): Renamed from cannot_store_register,
10962 made static.
10963 (the_low_target): New.
10964 * linux-sh-low.c (num_regs): Remove.
10965 (sh_num_regs): Define.
10966 (sh_regmap): Renamed from regmap, made static.
10967 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10968 made static.
10969 (sh_cannot_store_register): Renamed from cannot_store_register,
10970 made static.
10971 (the_low_target): New.
10972 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10973 (the_low_target): New.
10974
109752002-04-09 Daniel Jacobowitz <drow@mvista.com>
10976
10977 * Makefile.in: Add stamp-h target.
10978 * configure.in: Create stamp-h.
10979 * configure: Regenerated.
10980
109812002-04-09 Daniel Jacobowitz <drow@mvista.com>
10982
10983 * inferiors.c: New file.
10984 * target.c: New file.
10985 * target.h: New file.
10986 * Makefile.in: Add target.o and inferiors.o. Update
10987 dependencies.
10988 * linux-low.c (inferior_pid): New static variable,
10989 moved from server.c.
10990 (linux_create_inferior): Renamed from create_inferior.
10991 Call add_inferior. Return 0 on success instead of a PID.
10992 (linux_attach): Renamed from myattach.
10993 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10994 (linux_thread_alive): Renamed from mythread_alive.
10995 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10996 child dies.
10997 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10998 (regsets_store_inferior_registers): Correct error message.
10999 Add missing ``return 0''.
11000 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11001 (linux_store_registers): Renamed from store_inferior_registers.
11002 (linux_read_memory): Renamed from read_inferior_memory.
11003 (linux_write_memory): Renamed from write_inferior_memory.
11004 (linux_target_ops): New structure.
11005 (initialize_low): Call set_target_ops ().
11006 * remote-utils.c (unhexify): New function.
11007 (hexify): New function.
11008 (input_interrupt): Send signals to ``signal_pid''.
11009 * server.c (inferior_pid): Remove.
11010 (start_inferior): Update create_inferior call.
11011 (attach_inferior): Call add_inferior.
11012 (handle_query): New function.
11013 (main): Call handle_query for `q' packets.
11014 * server.h: Include "target.h". Remove obsolete prototypes.
11015 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11016
110172002-04-09 Daniel Jacobowitz <drow@mvista.com>
11018
11019 * Makefile.in: Add WARN_CFLAGS. Update configury
11020 dependencies.
11021 * configure.in: Check for <string.h>
11022 * configure: Regenerate.
11023 * config.in: Regenerate.
11024 * gdbreplay.c: Include needed system headers.
11025 (remote_open): Remove strchr prototype.
11026 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11027 * regcache.c (supply_register): Change buf argument to const void *.
11028 (supply_register_by_name): Likewise.
11029 (collect_register): Change buf argument to void *.
11030 (collect_register_by_name): Likewise.
11031 * regcache.h: Add missing prototypes.
11032 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11033 * server.c (handle_query): New function.
11034 (attached): New static variable, moved out of main.
11035 (main): Quiet longjmp clobber warnings.
11036 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11037 * utils.c (error): Remove NORETURN.
11038 (fatal): Likewise.