]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Do not make "prop" field of struct dynamic_prop_list a pointer.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
369f6daa
GB
12015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * linux-x86-low.c (x86_linux_new_thread): Moved to
4 nat/x86-linux.c.
5 (x86_linux_prepare_to_resume): Likewise.
6
8e5d4070
GB
72015-03-24 Gary Benson <gbenson@redhat.com>
8
9 * Makefile.in (x86-linux-dregs.o): New rule.
10 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
12 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
13 (x86_linux_dr_get): Likewise.
14 (x86_linux_dr_set): Likewise.
15 (update_debug_registers_callback): Likewise.
16 (x86_linux_dr_set_addr): Likewise.
17 (x86_linux_dr_get_addr): Likewise.
18 (x86_linux_dr_set_control): Likewise.
19 (x86_linux_dr_get_control): Likewise.
20 (x86_linux_dr_get_status): Likewise.
21 (x86_linux_update_debug_registers): Likewise.
22
2b95d440
GB
232015-03-24 Gary Benson <gbenson@redhat.com>
24
25 * linux-x86-low.c (x86_linux_update_debug_registers):
26 New function, factored out from...
27 (x86_linux_prepare_to_resume): ...this.
28
14b0bc68
GB
292015-03-24 Gary Benson <gbenson@redhat.com>
30
31 * linux-x86-low.c (x86_linux_dr_get): Update comments.
32 (x86_linux_dr_set): Likewise.
33 (update_debug_registers_callback): Likewise.
34 (x86_linux_dr_set_addr): Likewise.
35 (x86_linux_dr_get_addr): Likewise.
36 (x86_linux_dr_set_control): Likewise.
37 (x86_linux_dr_get_control): Likewise.
38 (x86_linux_dr_get_status): Likewise.
39 (x86_linux_prepare_to_resume): Likewise.
40
5dfe6ca8
GB
412015-03-24 Gary Benson <gbenson@redhat.com>
42
43 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
44 Use perror_with_name. Pass string through gettext.
45 (x86_linux_dr_set): Likewise.
46
d33472ad
GB
472015-03-24 Gary Benson <gbenson@redhat.com>
48
49 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
50 (x86_linux_dr_set_addr): ...this.
51 (x86_dr_low_get_addr): Rename to...
52 (x86_linux_dr_get_addr): ...this.
53 (x86_dr_low_set_control): Rename to...
54 (x86_linux_dr_set_control): ...this.
55 (x86_dr_low_get_control): Rename to...
56 (x86_linux_dr_get_control): ...this.
57 (x86_dr_low_get_status): Rename to...
58 (x86_linux_dr_get_status): ...this.
59 (x86_dr_low): Update with new function names.
60
4b134ca1
GB
612015-03-24 Gary Benson <gbenson@redhat.com>
62
63 * Makefile.in (x86-linux.o): New rule.
64 * configure.srv: Add x86-linux.o to relevant targets.
65 * linux-low.c (lwp_set_arch_private_info): New function.
66 (lwp_arch_private_info): Likewise.
67 * linux-x86-low.c: Include nat/x86-linux.h.
68 (arch_lwp_info): Removed structure.
69 (update_debug_registers_callback):
70 Use lwp_set_debug_registers_changed.
71 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
72 and lwp_set_debug_registers_changed.
73 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
74
34c703da
GB
752015-03-24 Gary Benson <gbenson@redhat.com>
76
77 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
78 * linux-arm-low.c (arm_new_thread): Likewise.
79 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
80 * linux-mips-low.c (mips_linux_new_thread): Likewise.
81 * linux-x86-low.c (x86_linux_new_thread): Likewise.
82 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
83
cff068da
GB
842015-03-24 Gary Benson <gbenson@redhat.com>
85
86 * linux-low.c (ptid_of_lwp): New function.
87 (lwp_is_stopped): Likewise.
88 (lwp_stop_reason): Likewise.
89 * linux-x86-low.c (update_debug_registers_callback):
90 Use lwp_is_stopped.
91 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
92 lwp_stop_reason.
93
b2f7c7e8
GB
942015-03-24 Gary Benson <gbenson@redhat.com>
95
96 * linux-low.h (linux_stop_lwp): Remove declaration.
97
6d4ee8c6
GB
982015-03-24 Gary Benson <gbenson@redhat.com>
99
100 * linux-low.h: Include nat/linux-nat.h.
101 * linux-low.c (iterate_over_lwps_args): New structure.
102 (iterate_over_lwps_filter): New function.
103 (iterate_over_lwps): Likewise.
104 * linux-x86-low.c (update_debug_registers_callback):
105 Update signature to what iterate_over_lwps expects.
106 Remove PID check that iterate_over_lwps now performs.
107 (x86_dr_low_set_addr): Use iterate_over_lwps.
108 (x86_dr_low_set_control): Likewise.
109
70a0bb6b
GB
1102015-03-24 Gary Benson <gbenson@redhat.com>
111
112 * linux-x86-low.c (x86_debug_reg_state): New function.
113 (x86_linux_prepare_to_resume): Use the above.
114
7b669087
GB
1152015-03-24 Gary Benson <gbenson@redhat.com>
116
117 * linux-low.c (current_lwp_ptid): New function.
118 * linux-x86-low.c: Include nat/linux-nat.h.
119 (x86_dr_low_get_addr): Use current_lwp_ptid.
120 (x86_dr_low_get_control): Likewise.
121 (x86_dr_low_get_status): Likewise.
122
eef49a3d
PA
1232015-03-20 Pedro Alves <palves@redhat.com>
124
125 * tracepoint.c (cmd_qtstatus): Make "str" const.
126
b2333d22
PA
1272015-03-20 Pedro Alves <palves@redhat.com>
128
129 * server.c (handle_general_set): Make "req_str" const.
130
23f238d3
PA
1312015-03-19 Pedro Alves <palves@redhat.com>
132
133 * linux-low.c (linux_resume_one_lwp): Rename to ...
134 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
135 instead call perror_with_name.
136 (check_ptrace_stopped_lwp_gone): New function.
137 (linux_resume_one_lwp): Reimplement as wrapper around
138 linux_resume_one_lwp_throw that swallows errors if the LWP is
139 gone.
140
91baf43f
PA
1412015-03-19 Pedro Alves <palves@redhat.com>
142
143 * linux-low.c (count_events_callback, select_event_lwp_callback):
144 No longer check whether the thread has resume_stop as last resume
145 kind.
146
8bf3b159
PA
1472015-03-19 Pedro Alves <palves@redhat.com>
148
149 * linux-low.c (count_events_callback, select_event_lwp_callback):
150 Use the lwp's status_pending_p field, not the thread's.
151
b90fc188
PA
1522015-03-19 Pedro Alves <palves@redhat.com>
153
154 * linux-low.c (select_event_lwp_callback): Update comments to
155 no longer mention SIGTRAP.
156
464b0089
GB
1572015-03-18 Gary Benson <gbenson@redhat.com>
158
159 * server.c (handle_query): Do not report vFile:fstat as supported.
160
aa9e327f
GB
1612015-03-11 Gary Benson <gbenson@redhat.com>
162
163 * hostio.c (sys/types.h): New include.
164 (sys/stat.h): Likewise.
165 (common-remote-fileio.h): Likewise.
166 (handle_fstat): New function.
167 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 168
791c0056
GB
1692015-03-11 Gary Benson <gbenson@redhat.com>
170
171 * configure.ac (AC_CHECK_MEMBERS): Add checks for
172 struct stat.st_blocks and struct stat.st_blksize.
173 * configure: Regenerate.
174 * config.in: Likewise.
175 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
176 (OBS): Add common-remote-fileio.o.
177 (common-remote-fileio.o): New rule.
178
9a9df970
PA
1792015-03-09 Pedro Alves <palves@redhat.com>
180
181 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
182 'struct sockaddr' pointer in 'accept' call.
183
9eb1356e
PA
1842015-03-09 Pedro Alves <palves@redhat.com>
185
186 Revert:
187 2015-03-07 Pedro Alves <palves@redhat.com>
188 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
189 or <winsock2.h> here. Instead include "gdb_socket.h".
190 (remote_open): Use union gdb_sockaddr_u.
191 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
192 or <winsock2.h> here. Instead include "gdb_socket.h".
193 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
194 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
195 or <sys/un.h>.
196 (init_named_socket, gdb_agent_helper_thread): Use union
197 gdb_sockaddr_u.
198
aac331e4
PA
1992015-03-07 Pedro Alves <palves@redhat.com>
200
201 * configure.ac (build_warnings): Move
202 -Wdeclaration-after-statement to the C-specific set.
203 * configure: Regenerate.
204
366c75fc
PA
2052015-03-07 Pedro Alves <palves@redhat.com>
206
207 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
208 or <winsock2.h> here. Instead include "gdb_socket.h".
209 (remote_open): Use union gdb_sockaddr_u.
210 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
211 or <winsock2.h> here. Instead include "gdb_socket.h".
212 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
213 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
214 or <sys/un.h>.
215 (init_named_socket, gdb_agent_helper_thread): Use union
216 gdb_sockaddr_u.
217
492d29ea
PA
2182015-03-07 Pedro Alves <palves@redhat.com>
219
220 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
221 instead.
222
60a191ed
YQ
2232015-03-06 Yao Qi <yao.qi@linaro.org>
224
225 * linux-aarch64-low.c (aarch64_insert_point): Use
226 show_debug_regs as a boolean.
227 (aarch64_remove_point): Likewise.
228
f5771b1d
PA
2292015-03-05 Pedro Alves <palves@redhat.com>
230
231 * lynx-low.c (lynx_target_ops): Install NULL hooks for
232 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
233 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
234 * nto-low.c (nto_target_ops): Likewise.
235 * spu-low.c (spu_target_ops): Likewise.
236 * win32-low.c (win32_target_ops): Likewise.
237
3e572f71
PA
2382015-03-04 Pedro Alves <palves@redhat.com>
239
240 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
241 Decide whether a breakpoint triggered based on the SIGTRAP's
242 siginfo.si_code.
243 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
244 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
245 (linux_low_filter_event): Check for breakpoints before checking
246 watchpoints.
247 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
248 siginfo.si_code.
249 (linux_stopped_by_sw_breakpoint)
250 (linux_supports_stopped_by_sw_breakpoint)
251 (linux_stopped_by_hw_breakpoint)
252 (linux_supports_stopped_by_hw_breakpoint): New functions.
253 (linux_target_ops): Install new target methods.
254
1ec68e26
PA
2552015-03-04 Pedro Alves <palves@redhat.com>
256
257 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
258 * server.c (swbreak_feature, hwbreak_feature): New globals.
259 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
260 (captured_main): Clear swbreak_feature and hwbreak_feature.
261 * server.h (swbreak_feature, hwbreak_feature): Declare.
262 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
263 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
264 supports_stopped_by_hw_breakpoint>: New fields.
265 (target_supports_stopped_by_sw_breakpoint)
266 (target_stopped_by_sw_breakpoint)
267 (target_supports_stopped_by_hw_breakpoint)
268 (target_stopped_by_hw_breakpoint): Declare.
269
15c66dd6
PA
2702015-03-04 Pedro Alves <palves@redhat.com>
271
272 enum lwp_stop_reason -> enum target_stop_reason
273 * linux-low.c (check_stopped_by_breakpoint): Adjust.
274 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
275 (linux_wait_1, stuck_in_jump_pad_callback)
276 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
277 (linux_stopped_by_watchpoint):
278 * linux-low.h (enum lwp_stop_reason): Delete.
279 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
280 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
281
98fc70d6
YQ
2822015-03-04 Yao Qi <yao.qi@linaro.org>
283
284 * Makefile.in (SFILES): Add linux-aarch64-low.c.
285
dd2ac174
GB
2862015-03-03 Gary Benson <gbenson@redhat.com>
287
288 * hostio.c (handle_vFile): Fix prefix lengths.
289
d68e53f4
MM
2902015-03-03 Markus Metzger <markus.t.metzger@intel.com>
291
292 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
293 ptr_bits.
294
bf2d68ab
AA
2952015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
296
297 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
298 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
299 (clean): Add "rm -f" for above C files.
300 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
301 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
302 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
303 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
304 * linux-s390-low.c (HWCAP_S390_VX): New macro.
305 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
306 (init_registers_s390x_vx_linux64)
307 (init_registers_s390x_tevx_linux64)
308 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
309 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
310 declarations.
311 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
312 (s390_store_vxrs_high): New functions.
313 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
314 NT_S390_VXRS_HIGH.
315 (s390_arch_setup): Add logic for selecting one of the new target
316 descriptions. Activate the new vector regsets if applicable.
317 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
318 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
319 and init_registers_s390x_tevx_linux64.
320
c966a859
PA
3212015-03-01 Pedro Alves <palves@redhat.com>
322
323 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
324 parameter.
325
4180215b
PA
3262015-02-27 Pedro Alves <palves@redhat.com>
327
328 * linux-x86-low.c (u_debugreg_offset): New function.
329 (x86_linux_dr_get, x86_linux_dr_set): Use it.
330
749bab01
PA
3312015-02-27 Pedro Alves <palves@redhat.com>
332
333 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
334 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
335 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
336 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
337 (ps_lsetfpregs, ps_getpid)
338 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
339 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
340 (ps_lsetxregs, ps_plog): Declare.
341
3c14e5a3
PA
3422015-02-27 Pedro Alves <palves@redhat.com>
343
344 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
345 IP_AGENT_EXPORT_FUNC.
346 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
347 IP_AGENT_EXPORT_FUNC.
348 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
349 (IP_AGENT_EXPORT): Delete.
350 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
351 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
352 (gdb_trampoline_buffer_error, collecting, gdb_collect)
353 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
354 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
355 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
356 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
357 (traceframe_read_count, traceframe_write_count)
358 (traceframes_created, trace_state_variables, get_raw_reg)
359 (get_trace_state_variable_value, set_trace_state_variable_value)
360 (ust_loaded, helper_thread_id, cmd_buf): Use
361 IPA_SYM_EXPORTED_NAME.
362 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
363 (tracepoints) Use IP_AGENT_EXPORT_VAR.
364 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
365 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
366 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
367 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
368 EXTERN_C_PUSH/EXTERN_C_POP.
369 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
370 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
371 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
372 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
373 (traceframe_write_count, traceframe_read_count)
374 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
375 (about_to_request_buffer_space, get_trace_state_variable_value)
376 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
377 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
378 EXTERN_C_PUSH/EXTERN_C_POP.
379 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
380 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
381 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
382 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
383 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
384 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
385 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
386 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
387 Define.
388 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
389 (IP_AGENT_EXPORT_VAR_DECL): Define.
390 (tracing): Declare.
391 (gdb_agent_get_raw_reg): Declare.
392
fe978cb0
PA
3932015-02-27 Tom Tromey <tromey@redhat.com>
394 Pedro Alves <palves@redhat.com>
395
396 Rename symbols whose names are reserved C++ keywords throughout.
397
3bc3d82a
PA
3982015-02-27 Pedro Alves <palves@redhat.com>
399
400 * Makefile.in (COMPILER): New, get it from autoconf.
401 (CXX): Get from autoconf instead.
402 (COMPILE.pre): Use COMPILER.
403 (CC-LD): Rename to ...
404 (CC_LD): ... this. Use COMPILER.
405 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
406 (CXX_FOR_TARGET): Default to g++ instead of gcc.
407 * acinclude.m4: Include build-with-cxx.m4.
408 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
409 Disable -Werror by default if building in C++ mode.
410 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
411 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
412 the C++ compiler. Save/restore CXXFLAGS too.
413 * configure: Regenerate.
414
07697489
PA
4152015-02-27 Pedro Alves <palves@redhat.com>
416
417 * acinclude.m4: Include libiberty.m4.
418 * configure.ac: Call libiberty_INIT.
419 * config.in, configure: Regenerate.
420
9beb7c4e
PA
4212015-02-26 Pedro Alves <palves@redhat.com>
422
423 * linux-low.c (linux_wait_1): When incrementing the PC past a
424 program breakpoint always use the_low_target.breakpoint_len as
425 increment, rather than the maximum between that and
426 the_low_target.decr_pc_after_break.
427
8090aef2
PA
4282015-02-23 Pedro Alves <palves@redhat.com>
429
430 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
431 thread was doing a step-over; always adjust the PC if
432 we stepped over a permanent breakpoint.
433 (linux_wait_1): If we stepped over breakpoint that was on top of a
434 permanent breakpoint, manually advance the PC past it.
435
bc9540e8
PA
4362015-02-23 Pedro Alves <palves@redhat.com>
437
438 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
439 modes.
440 (x86_fill_gregset, x86_store_gregset): Use it when handling
441 $orig_eax.
442
2db9a427
PA
4432015-02-20 Pedro Alves <palves@redhat.com>
444
445 * thread-db.c: Include "nat/linux-procfs.h".
446 (thread_db_init): Skip listing new threads if the kernel supports
447 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
448
afa8d396
PA
4492015-02-20 Pedro Alves <palves@redhat.com>
450
451 * linux-low.c (status_pending_p_callback): Use ptid_match.
452
c9587f88
AT
4532015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
454
455 PR breakpoints/16812
456 * linux-low.c (wstatus_maybe_breakpoint): Remove.
457 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
458 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
459
b05ec7a5
AT
4602015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
461
462 PR breakpoints/15956
463 * tracepoint.c (cmd_qtinit): Add check for current_thread.
464
d33501a5
MM
4652015-02-09 Markus Metzger <markus.t.metzger@intel.com>
466
467 * linux-low.c (linux_low_btrace_conf): Print size.
468 * server.c (handle_btrace_conf_general_set): New.
469 (hanle_general_set): Call handle_btrace_conf_general_set.
470 (handle_query): Report Qbtrace-conf:bts:size as supported.
471
f4abbc16
MM
4722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
473
474 * linux-low.c (linux_low_enable_btrace): Update parameters.
475 (linux_low_btrace_conf): New.
476 (linux_target_ops)<to_btrace_conf>: Initialize.
477 * server.c (current_btrace_conf): New.
478 (handle_btrace_enable): Rename to ...
479 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
480 to target_enable_btrace. Update comment. Update users.
481 (handle_qxfer_btrace_conf): New.
482 (qxfer_packets): Add btrace-conf entry.
483 (handle_query): Report qXfer:btrace-conf:read as supported packet.
484 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
485 (target_ops)<read_btrace_conf>: New.
486 (target_enable_btrace): Update parameters.
487 (target_read_btrace_conf): New.
488
043c3577
MM
4892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
490
491 * server.c (handle_btrace_general_set): Remove call to
492 target_supports_btrace.
493 (supported_btrace_packets): New.
494 (handle_query): Call supported_btrace_packets.
495 * target.h: include btrace-common.h.
496 (btrace_target_info): Removed.
497 (supports_btrace, target_supports_btrace): Update parameters.
498
734b0e4b
MM
4992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
500
501 * Makefile.in (SFILES): Add common/btrace-common.c.
502 (OBS): Add common/btrace-common.o.
503 (btrace-common.o): Add build rules.
504 * linux-low: Include btrace-common.h.
505 (linux_low_read_btrace): Use struct btrace_data. Call
506 btrace_data_init and btrace_data_fini.
507
d6c146e9
PA
5082015-02-06 Pedro Alves <palves@redhat.com>
509
510 * thread-db.c (find_new_threads_callback): Add debug output.
511
20ba1ce6
PA
5122015-02-04 Pedro Alves <palves@redhat.com>
513
514 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
515 (resume_stopped_resumed_lwps): New function.
516 (linux_wait_for_event_filtered): Use it.
517
8cc73a39
SDJ
5182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
519
520 * Makefile.in (SFILES): Add linux-personality.c.
521 (linux-personality.o): New rule.
522 * configure.srv (srv_linux_obj): Add linux-personality.o to the
523 list of objects to be built.
524 * linux-low.c: Include nat/linux-personality.h.
525 (linux_create_inferior): Remove code to disable address space
526 randomization (moved to ../nat/linux-personality.c). Create
527 cleanup to disable address space randomization.
528
fb23d554
SDJ
5292015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
530
531 * Makefile.in (posix-strerror.o): New rule.
532 (mingw-strerror.o): Likewise.
533 * configure: Regenerated.
534 * configure.ac: Source file ../common/common.host. Initialize new
535 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
536
cdf43629
YQ
5372015-01-14 Yao Qi <yao@codesourcery.com>
538
539 * Makefile.in (SFILES): Add nat/ppc-linux.c.
540 (ppc-linux.o): New rule.
541 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
542 * configure.ac: AC_CHECK_FUNCS(getauxval).
543 * config.in: Re-generated.
544 * configure: Re-generated.
545 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
546 ppc64_64bit_inferior_p
547
514c5338
YQ
5482015-01-14 Yao Qi <yao@codesourcery.com>
549
550 * linux-ppc-low.c: Include "nat/ppc-linux.h".
551 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
552 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
553 (PT_ORIG_R3, PT_TRAP): Likewise.
554 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
555 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
556 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
557
3368c1e5
JB
5582015-01-10 Joel Brobecker <brobecker@adacore.com>
559
560 * i387-fp.c (i387_cache_to_xsave): In look over
561 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
562 zmmh_low_space field by use of zmmh_high_space.
563
582511be
PA
5642015-01-09 Pedro Alves <palves@redhat.com>
565
566 * linux-low.c (step_over_bkpt): Move higher up in the file.
567 (handle_extended_wait): Don't store the stop_pc here.
568 (get_stop_pc): Adjust comments and rename to ...
569 (check_stopped_by_breakpoint): ... this. Record whether the LWP
570 stopped for a software breakpoint or hardware breakpoint.
571 (thread_still_has_status_pending_p): New function.
572 (status_pending_p_callback): Use
573 thread_still_has_status_pending_p. If the event is no longer
574 interesting, resume the LWP.
575 (handle_tracepoints): Add assert.
576 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
577 (wstatus_maybe_breakpoint): New function.
578 (cancel_breakpoint): Delete function.
579 (check_stopped_by_watchpoint): New function, factored out from
580 linux_low_filter_event.
581 (lp_status_maybe_breakpoint): Delete function.
582 (linux_low_filter_event): Remove filter_ptid argument.
583 Leave thread group exits pending here. Store the LWP's stop PC.
584 Always leave events pending.
585 (linux_wait_for_event_filtered): Pull all events out of the
586 kernel, and leave them all pending.
587 (count_events_callback, select_event_lwp_callback): Consider all
588 events.
589 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
590 (select_event_lwp): Only give preference to the stepping LWP in
591 all-stop mode. Adjust comments.
592 (ignore_event): New function.
593 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
594 references to cancel_breakpoints. Adjust to renames. Also give
595 equal priority to all LWPs that have had events in non-stop mode.
596 If reporting a software breakpoint event, unadjust the LWP's PC.
597 (linux_wait): If linux_wait_1 returned an ignored event, retry.
598 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
599 Adjust.
600 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
601 (resume_status_pending_p): Use thread_still_has_status_pending_p.
602 (linux_stopped_by_watchpoint): Adjust.
603 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
604 * linux-low.h (enum lwp_stop_reason): New.
605 (struct lwp_info) <stop_pc>: Adjust comment.
606 <stopped_by_watchpoint>: Delete field.
607 <stop_reason>: New field.
608 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
609 * mem-break.c (software_breakpoint_inserted_here)
610 (hardware_breakpoint_inserted_here): New function.
611 * mem-break.h (software_breakpoint_inserted_here)
612 (hardware_breakpoint_inserted_here): Declare.
613 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
614 (cancel_breakpoints): Delete.
615 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
616 (upload_fast_traceframes): Remove references to
617 cancel_breakpoints.
618
a33e3959
PA
6192015-01-09 Pedro Alves <palves@redhat.com>
620
621 * thread-db.c (find_new_threads_callback): Ignore thread if the
622 kernel thread ID is -1.
623
8784d563
PA
6242015-01-09 Pedro Alves <palves@redhat.com>
625
626 * linux-low.c (linux_attach_fail_reason_string): Move to
627 nat/linux-ptrace.c, and rename.
628 (linux_attach_lwp): Update comment.
629 (attach_proc_task_lwp_callback): New function.
630 (linux_attach): Adjust to rename and use
631 linux_proc_attach_tgid_threads.
632 (linux_attach_fail_reason_string): Delete declaration.
633
76f2b779
JB
6342015-01-01 Joel Brobecker <brobecker@adacore.com>
635
636 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
637 * server.c (gdbserver_version): Likewise.
638
fafcc06a
SDJ
6392014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
640
641 * remote-utils.c: Include ctype.h.
642 (input_interrupt): Explicitly handle the case when the char
643 received is the NUL byte. Improve the printing of non-ASCII
644 characters.
645
beed38b8
JB
6462014-12-16 Joel Brobecker <brobecker@adacore.com>
647
648 * linux-low.c (linux_low_filter_event): Update call to
649 linux_enable_event_reporting following the addition of
650 a new parameter to that function.
651
bf330350
CU
6522014-12-16 Catalin Udma <catalin.udma@freescale.com>
653
654 PR server/17457
655 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
656 (AARCH64_FPCR_REGNO): Likewise.
657 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
658 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
659 (aarch64_store_fpregset): Likewise.
660
5227d625
JB
6612014-12-15 Joel Brobecker <brobecker@adacore.com>
662
663 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
664 Remove FIXME comment about assumption about N.
665
f93b65a0
JB
6662014-12-13 Joel Brobecker <brobecker@adacore.com>
667
668 * configure.ac: If large-file support is disabled in GDBserver,
669 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
670 * configure: Regenerate.
671
e5a9158d
AA
6722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
673
674 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
675 warning upon ENODATA from ptrace.
676 * linux-s390-low.c (s390_store_tdb): New.
677 (s390_regsets): Add regset for NT_S390_TDB.
678
feea5f36
AA
6792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
680
681 * linux-low.c (regsets_store_inferior_registers): Skip regsets
682 without a fill_function.
683 * linux-s390-low.c (s390_fill_last_break): Remove.
684 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
685 (s390_arch_setup): Use regset's size instead of fill_function for
686 loop end condition.
687
098dbe61
AA
6882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
689
690 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
691 the regset's store function when ptrace returned an error.
692 * regcache.c (get_thread_regcache): Invalidate register cache
693 before fetching inferior's registers.
694
28eef672
AA
6952014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
696
697 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
698 while-loop as for-loop.
699 (regsets_store_inferior_registers): Likewise.
700
bdca27a2
YQ
7012014-11-28 Yao Qi <yao@codesourcery.com>
702
703 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
704 * config.in, configure: Re-generate.
705 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
706 is defined.
707
9c232dda
YQ
7082014-11-21 Yao Qi <yao@codesourcery.com>
709
710 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
711 (AC_CHECK_HEADERS): Remove malloc.h.
712 * configure: Re-generated.
713 * config.in: Re-generated.
714 * server.h: Don't include alloca.h and malloc.h.
715 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
716 Don't include malloc.h.
717
43968415
JB
7182014-11-17 Joel Brobecker <brobecker@adacore.com>
719
720 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
721 corresponding ERRNO check in same block.
722
40e91bc7
PA
7232014-11-12 Pedro Alves <palves@redhat.com>
724
725 * server.c (cont_thread): Update comment.
726 (start_inferior, attach_inferior): No longer clear cont_thread.
727 (handle_v_cont): No longer set cont_thread.
728 (captured_main): Clear cont_thread each time a GDB connects.
729
c2c118cf
PA
7302014-11-12 Pedro Alves <palves@redhat.com>
731
732 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
733 thread, and don't resume all threads if the Hc thread has exited.
734
78708b7c
PA
7352014-11-12 Pedro Alves <palves@redhat.com>
736
737 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
738 the process group instead of to a specific LWP.
739
a2abc7de
PA
7402014-10-15 Pedro Alves <palves@redhat.com>
741
742 PR server/17487
743 * win32-arm-low.c (arm_set_thread_context): Remove current_event
744 parameter.
745 (arm_set_thread_context): Delete.
746 (the_low_target): Adjust.
747 * win32-i386-low.c (debug_registers_changed)
748 (debug_registers_used): Delete.
749 (update_debug_registers_callback): New function.
750 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
751 needing to update their debug registers.
752 (win32_get_current_dr): New function.
753 (x86_dr_low_get_addr, x86_dr_low_get_control)
754 (x86_dr_low_get_status): Fetch the debug register from the thread
755 record's context.
756 (i386_initial_stuff): Adjust.
757 (i386_get_thread_context): Remove current_event parameter. Don't
758 clear debug_registers_changed nor copy DR values to
759 debug_reg_state.
760 (i386_set_thread_context): Delete.
761 (i386_prepare_to_resume): New function.
762 (i386_thread_added): Mark the thread as needing to update irs
763 debug registers.
764 (the_low_target): Remove i386_set_thread_context and install
765 i386_prepare_to_resume.
766 * win32-low.c (win32_get_thread_context): Adjust.
767 (win32_set_thread_context): Use SetThreadContext
768 directly.
769 (win32_prepare_to_resume): New function.
770 (win32_require_context): New function, factored out from ...
771 (thread_rec): ... this.
772 (continue_one_thread): Call win32_prepare_to_resume on each thread
773 we're about to continue.
774 (win32_resume): Call win32_prepare_to_resume on the event thread.
775 * win32-low.h (struct win32_thread_info)
776 <debug_registers_changed>: New field.
777 (struct win32_target_ops): Change prototype of set_thread_context,
778 delete set_thread_context and add prepare_to_resume.
779 (win32_require_context): New declaration.
780
a442d071
GB
7812014-10-08 Gary Benson <gbenson@redhat.com>
782
783 * server.h: Do not include common-exceptions.h.
784
6f1947e8
GB
7852014-10-08 Gary Benson <gbenson@redhat.com>
786
787 * server.h: Do not include cleanups.h.
788
63b434a4
JH
7892014-09-30 James Hogan <james.hogan@imgtec.com>
790
791 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
792 mips64-dsp-linux.c.
793
c4d9ceb6
YQ
7942014-09-23 Yao Qi <yao@codesourcery.com>
795
796 * linux-low.c (lp_status_maybe_breakpoint): New function.
797 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
798 (count_events_callback): Likewise.
799 (select_event_lwp_callback): Likewise.
800 (cancel_breakpoints_callback): Likewise.
801
89a5711c
DB
8022014-09-19 Don Breazeal <donb@codesourcery.com>
803
804 * linux-low.c (handle_extended_wait): Call
805 linux_ptrace_get_extended_event.
806 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
807 linux_is_extended_waitstatus.
808
bffc0964
JB
8092014-09-16 Joel Brobecker <brobecker@adacore.com>
810
811 * Makefile.in (CPPFLAGS): Define.
812 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
813 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
814
0bfdf32f
GB
8152014-09-16 Gary Benson <gbenson@redhat.com>
816
817 * inferiors.h (current_inferior): Renamed as...
818 (current_thread): New variable. All uses updated.
819 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
820 (maybe_move_out_of_jump_pad): Likewise.
821 (cancel_breakpoint): Likewise.
822 (linux_low_filter_event): Likewise.
823 (wait_for_sigstop): Likewise.
824 (linux_resume_one_lwp): Likewise.
825 (need_step_over_p): Likewise.
826 (start_step_over): Likewise.
827 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
828 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
829 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
830 and save_inferior as saved_thread.
831 * regcache.c (get_thread_regcache): Renamed saved_inferior as
832 saved_thread.
833 (regcache_invalidate_thread): Likewise.
834 * remote-utils.c (prepare_resume_reply): Likewise.
835 * thread-db.c (thread_db_get_tls_address): Likewise.
836 (disable_thread_event_reporting): Likewise.
837 (remove_thread_event_breakpoints): Likewise.
838 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
839 as saved_thread.
840 * target.h (set_desired_inferior): Renamed as...
841 (set_desired_thread): New declaration. All uses updated.
842 * server.c (myresume): Updated comment to reference thread instead
843 of inferior.
844 (handle_serial_event): Likewise.
845 (handle_target_event): Likewise.
846
361c8ade
GB
8472014-09-12 Tom Tromey <tromey@redhat.com>
848 Gary Benson <gbenson@redhat.com>
849
850 * regcache.h: Include common-regcache.h.
851 (regcache_read_pc): Don't declare.
852 * regcache.c (get_thread_regcache_for_ptid): New function.
853
bd9269f7
GB
8542014-09-11 Tom Tromey <tromey@redhat.com>
855 Gary Benson <gbenson@redhat.com>
856
857 * symbol.c: New file.
858 * Makefile.in (SFILES): Add symbol.c.
859 (OBS): Add symbol.o.
860
f8c1d06b
GB
8612014-09-11 Gary Benson <gbenson@redhat.com>
862
863 * target.c (target_stop_ptid, target_continue_ptid): New
864 functions.
865
721ec300
GB
8662014-09-11 Tom Tromey <tromey@redhat.com>
867 Gary Benson <gbenson@redhat.com>
868
869 * target.h: Include target/target.h.
870 * target.c (target_read_memory, target_read_uint32)
871 (target_write_memory): New functions.
872
c5e92cca
GB
8732014-09-11 Gary Benson <gbenson@redhat.com>
874
875 * server.h (debug_hw_points): Don't declare.
876 * server.c (debug_hw_points): Don't define. Replace all uses
877 with show_debug_regs.
878 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
879 all uses with show_debug_regs.
880
2e4bb98a
EBM
8812014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
882
883 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
884 endianness into account.
885 (ppc_supply_ptrace_register): Likewise.
886
ac740bc7
JH
8872014-09-03 James Hogan <james.hogan@imgtec.com>
888
889 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
890 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
891
97ea6506
GB
8922014-09-03 Gary Benson <gbenson@redhat.com>
893
894 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
895 ALL_DEBUG_ADDRESS_REGISTERS.
896
df7e5265
GB
8972014-09-02 Gary Benson <gbenson@redhat.com>
898
899 * i386-low.h: Renamed as...
900 * x86-low.h: New file. All type, function and variable name
901 prefixes changed from "i386_" to "x86_". All references updated.
902 * i386-low.c: Renamed as...
903 * x86-low.c: New file. All type, function and variable name
904 prefixes changed from "i386_" to "x86_". All references updated.
905
ed859da7
GB
9062014-09-02 Gary Benson <gbenson@redhat.com>
907
908 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
909 (x86_linux_new_thread): Likewise.
910
860789c7
GB
9112014-08-29 Gary Benson <gbenson@redhat.com>
912
913 * server.h (setjmp.h): Do not include.
914 (toplevel): Do not declare.
915 (common-exceptions.h): Include.
916 (cleanups.h): Likewise.
917 * server.c (toplevel): Do not define.
918 (exit_code): New static global.
919 (detach_or_kill_for_exit_cleanup): New function.
920 (main): New function. Original main renamed to...
921 (captured_main): New function.
922 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
923
ff55e1b5
GB
9242014-08-29 Gary Benson <gbenson@redhat.com>
925
926 * Makefile.in (SFILES): Add common/common-exceptions.c.
927 (OBS): Add common-exceptions.o.
928 (common-exceptions.o): New rule.
929 * utils.c (prepare_to_throw_exception): New function.
930
e9bcb658
GB
9312014-08-29 Gary Benson <gbenson@redhat.com>
932
933 * config.in: Regenerate.
934 * configure: Likewise.
935
e3180625
GB
9362014-08-29 Gary Benson <gbenson@redhat.com>
937
938 * Makefile.in (SFILES): Add common/cleanups.c.
939 (OBS): cleanups.o.
940 (cleanups.o): New rule.
941
e3d6ba5d
GB
9422014-08-29 Gary Benson <gbenson@redhat.com>
943
944 * utils.c (internal_vwarning): New function.
945
7096e886
GB
9462014-08-28 Gary Benson <gbenson@redhat.com>
947
948 * utils.h (fatal): Remove declaration.
949 * utils.c (fatal): Remove function.
950
14ce3192
GB
9512014-08-28 Gary Benson <gbenson@redhat.com>
952
953 * tracepoint.c (gdb_agent_init): Replace fatal with
954 perror_with_name.
955 (initialize_tracepoint): Likewise.
956
50278d59
GB
9572014-08-28 Gary Benson <gbenson@redhat.com>
958
959 * remote-utils.c (remote_prepare): Replace fatal with error.
960
aa96c426
GB
9612014-08-28 Gary Benson <gbenson@redhat.com>
962
963 * linux-low.c (linux_async): Replace fatal with warning.
964 Tidy up and return.
965 (linux_start_non_stop): Return -1 if linux_async failed.
966
f7160e97
GB
9672014-08-28 Gary Benson <gbenson@redhat.com>
968
969 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
970 gdb_assert.
971 (i386_dr_low_get_addr): Remove vague comment.
972 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
973 gdb_assert.
974
38e08fca
GB
9752014-08-28 Gary Benson <gbenson@redhat.com>
976
977 * inferiors.c (get_thread_process): Replace check with gdb_assert.
978 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
979 internal_error.
980 (linux_resume_one_lwp): Likewise.
981 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
982 gdb_assert.
983 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
984 with internal_error.
985 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
986 (init_register_cache): Replace fatal with gdb_assert_not_reached.
987 (find_register_by_name): Replace fatal with internal_error.
988 (find_regno): Likewise.
989 * tdesc.c (init_target_desc): Replace check with gdb_assert.
990 * thread-db.c (thread_db_create_event): Likewise.
991 (thread_db_load_search): Likewise.
992 (try_thread_db_load_1): Likewise.
993 * tracepoint.c (get_jump_space_head): Replace fatal with
994 internal_error.
995 (claim_trampoline_space): Likewise.
996 (have_fast_tracepoint_trampoline_buffer): Likewise.
997 (cmd_qtstart): Likewise.
998 (stop_tracing): Likewise.
999 (fast_tracepoint_collecting): Likewise.
1000 (target_malloc): Likewise.
1001 (download_tracepoint): Likewise.
1002 (download_trace_state_variables): Replace check with gdb_assert.
1003 (upload_fast_traceframes): Replace fatal with internal_error.
1004
34abf635
GB
10052014-08-19 Tom Tromey <tromey@redhat.com>
1006 Gary Benson <gbenson@redhat.com>
1007
1008 * Makefile.in (SFILES): Add common/common-debug.c.
1009 (OBS): Add common-debug.o.
1010 (common-debug.o): New rule.
1011 * debug.h (debug_printf): Don't declare.
1012 * debug.c (debug_printf): Renamed and rewritten as...
1013 (debug_vprintf): New function.
1014
f6e94d78
GB
10152014-08-19 Gary Benson <gbenson@redhat.com>
1016
1017 * utils.h: Do not include print-utils.h.
1018
9239eeab
GB
10192014-08-19 Tom Tromey <tromey@redhat.com>
1020 Gary Benson <gbenson@redhat.com>
1021
1022 * server.h: Add static assertion.
1023 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1024
ef87c8bb
GB
10252014-08-19 Tom Tromey <tromey@redhat.com>
1026 Gary Benson <gbenson@redhat.com>
1027
1028 * Makefile.in (SFILES): Add common/errors.c.
1029 (OBS): Add errors.o.
1030 (IPA_OBS): Add errors-ipa.o.
1031 (errors.o): New rule.
1032 (errors-ipa.o): Likewise.
1033 * utils.h (perror_with_name, error, warning): Don't declare.
1034 * utils.c (warning): Renamed and rewritten as...
1035 (vwarning): New function.
1036 (error): Renamed and rewritten as...
1037 (verror): New function.
1038 (internal_error): Renamed and rewritten as...
1039 (internal_verror): New function.
1040
bb974a24
GB
10412014-08-07 Gary Benson <gbenson@redhat.com>
1042
1043 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1044 * configure: Regenerate.
1045 * config.in: Likewise.
1046 * server.h: Do not include errno.h.
1047 * event-loop.c: Likewise.
1048 * hostio-errno.c: Likewise.
1049 * linux-low.c: Likewise.
1050 * remote-utils.c: Likewise.
1051 * spu-low.c: Likewise.
1052 * utils.c: Likewise.
1053 * gdbreplay.c: Unconditionally include errno.h.
1054
6d3d12eb
GB
10552014-08-07 Gary Benson <gbenson@redhat.com>
1056
1057 * server.h: Do not include string.h.
1058 * event-loop.c: Likewise.
1059 * linux-low.c: Likewise.
1060 * regcache.c: Likewise.
1061 * remote-utils.c: Likewise.
1062 * spu-low.c: Likewise.
1063 * utils.c: Likewise.
1064
dccbb609
GB
10652014-08-07 Gary Benson <gbenson@redhat.com>
1066
1067 * server.h: Do not include gdb_assert.h.
1068
e76df0d0
GB
10692014-08-07 Gary Benson <gbenson@redhat.com>
1070
1071 * server.h: Do not include common-utils.h.
1072
4cb9c816
GB
10732014-08-07 Gary Benson <gbenson@redhat.com>
1074
1075 * server.h: Do not include ptid.h.
1076 * notif.h: Likewise.
1077
3995eeee
GB
10782014-08-07 Gary Benson <gbenson@redhat.com>
1079
1080 * server.h: Do not include gdb_locale.h.
1081
cb9f1a9b
GB
10822014-08-07 Gary Benson <gbenson@redhat.com>
1083
1084 * server.h: Do not include gdb/signals.h.
1085 * win32-low.c: Likewise.
1086
a5fceff8
GB
10872014-08-07 Gary Benson <gbenson@redhat.com>
1088
1089 * server.h: Do not include pathmax.h.
1090
b9391142
GB
10912014-08-07 Gary Benson <gbenson@redhat.com>
1092
1093 * server.h: Do not include libiberty.h.
1094 * linux-bfin-low.c: Likewise.
1095
0e443c87
GB
10962014-08-07 Gary Benson <gbenson@redhat.com>
1097
1098 * server.h: Do not include ansidecl.h.
1099
8ebb3f56
GB
11002014-08-07 Gary Benson <gbenson@redhat.com>
1101
1102 * linux-x86-low.c: Do not include stddef.h.
1103 * lynx-ppc-low.c: Likewise.
1104 * tracepoint.c: Likewise.
1105
8980bdf6
GB
11062014-08-07 Gary Benson <gbenson@redhat.com>
1107
1108 * server.h: Do not include stdarg.h.
1109 * nto-low.c: Likewise.
1110
d7096f71
GB
11112014-08-07 Gary Benson <gbenson@redhat.com>
1112
1113 * server.h: Do not include stdlib.h.
1114 * inferiors.c: Likewise.
1115 * linux-low.c: Likewise.
1116 * regcache.c: Likewise.
1117 * spu-low.c: Likewise.
1118 * tracepoint.c: Likewise.
1119 * utils.c: Likewise.
1120
d02f550d
GB
11212014-08-07 Gary Benson <gbenson@redhat.com>
1122
1123 * server.h: Do not include stdio.h.
1124 * linux-low.c: Likewise.
1125 * remote-utils.c: Likewise.
1126 * spu-low.c: Likewise.
1127 * utils.c: Likewise.
1128 * wincecompat.c: Likewise.
1129
87f6c4e3
GB
11302014-08-06 Gary Benson <gbenson@redhat.com>
1131
1132 * regcache.c (init_register_cache): Move conditionals inside if.
1133
7089dca4
GB
11342014-08-06 Gary Benson <gbenson@redhat.com>
1135
1136 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1137
462f517e
GB
11382014-07-31 Gary Benson <gbenson@redhat.com>
1139
1140 * ax.h: Do not include server.h.
1141 * gdbthread.h: Likewise.
1142 * lynx-low.h: Likewise.
1143 * notif.h: Likewise.
1144
976411d6
GB
11452014-07-30 Gary Benson <gbenson@redhat.com>
1146
1147 * server.h: Include common-defs.h.
1148 Do not include config.h or build-gnulib-gdbserver/config.h.
1149
d41f6d8e
GB
11502014-07-30 Gary Benson <gbenson@redhat.com>
1151
1152 * hostio-errno.c: Move server.h to top of includes list.
1153 * inferiors.c: Likewise.
1154 * linux-x86-low.c: Likewise.
1155 * notif.c: Include server.h.
1156
314c6a35
TT
11572014-07-24 Tom Tromey <tromey@redhat.com>
1158 Gary Benson <gbenson@redhat.com>
1159
1160 * server.h (CORE_ADDR): Now unsigned.
1161
69ff6be5
PA
11622014-07-16 Pedro Alves <palves@redhat.com>
1163
1164 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1165
ce9e3fe7
PA
11662014-07-15 Pedro Alves <palves@redhat.com>
1167
1168 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1169 copy.
1170
e76126e8
PA
11712014-07-11 Pedro Alves <palves@redhat.com>
1172
1173 * linux-low.c (kill_wait_lwp): New function, based on
1174 kill_one_lwp_callback, but use my_waitpid directly.
1175 (kill_one_lwp_callback, linux_kill): Use it.
1176
8e9db26e
PA
11772014-06-23 Pedro Alves <palves@redhat.com>
1178
1179 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1180 before setting DR0..DR3.
1181
698b3e08
GB
11822014-06-20 Gary Benson <gbenson@redhat.com>
1183
1184 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1185 * configure: Regenerated.
1186 * config.in: Likewise.
1187
125f8a3d
GB
11882014-06-20 Gary Benson <gbenson@redhat.com>
1189
1190 * Makefile.in (SFILES): Update locations for files moved
1191 from common to nat.
1192 (object file files): Reordered.
1193
42995dbd
GB
11942014-06-20 Gary Benson <gbenson@redhat.com>
1195
1196 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1197 (i386_dr_low_set_addr): Likewise.
1198 (i386_dr_low_get_addr): Likewise.
1199 (i386_dr_low_can_set_control): Likewise.
1200 (i386_dr_low_set_control): Likewise.
1201 (i386_dr_low_get_control): Likewise.
1202 (i386_dr_low_get_status): Likewise.
1203 (i386_get_debug_register_length): Likewise.
1204 * linux-x86-low.c (i386_dr_low_set_addr):
1205 Changed signature. Made static.
1206 (i386_dr_low_get_addr): Likewise.
1207 (i386_dr_low_set_control): Likewise.
1208 (i386_dr_low_get_control): Likewise.
1209 (i386_dr_low_get_status): Likewise.
1210 (i386_dr_low): New global variable.
1211 * win32-i386-low.c (i386_dr_low_set_addr):
1212 Changed signature. Made static.
1213 (i386_dr_low_get_addr): Likewise.
1214 (i386_dr_low_set_control): Likewise.
1215 (i386_dr_low_get_control): Likewise.
1216 (i386_dr_low_get_status): Likewise.
1217 (i386_dr_low): New global variable.
1218
e1d2394b
MS
12192014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1220
1221 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1222 * Makefile.in (AR, AR_FLAGS): Define.
1223 * configure: Regenerate.
1224
3a8ee006
GB
12252014-06-19 Gary Benson <gbenson@redhat.com>
1226
1227 * Makefile.in (i386-dregs.o): New rule.
1228 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1229 * i386-low.c (target.h): Remove include.
1230 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1231 (DR_CONTROL_SHIFT): Likewise.
1232 (DR_CONTROL_SIZE): Likewise.
1233 (DR_RW_EXECUTE): Likewise.
1234 (DR_RW_WRITE): Likewise.
1235 (DR_RW_READ): Likewise.
1236 (DR_RW_IORW): Likewise.
1237 (DR_LEN_1): Likewise.
1238 (DR_LEN_2): Likewise.
1239 (DR_LEN_4): Likewise.
1240 (DR_LEN_8): Likewise.
1241 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1242 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1243 (DR_ENABLE_SIZE): Likewise.
1244 (DR_LOCAL_SLOWDOWN): Likewise.
1245 (DR_GLOBAL_SLOWDOWN): Likewise.
1246 (DR_CONTROL_RESERVED): Likewise.
1247 (I386_DR_CONTROL_MASK): Likewise.
1248 (I386_DR_VACANT): Likewise.
1249 (I386_DR_LOCAL_ENABLE): Likewise.
1250 (I386_DR_GLOBAL_ENABLE): Likewise.
1251 (I386_DR_DISABLE): Likewise.
1252 (I386_DR_SET_RW_LEN): Likewise.
1253 (I386_DR_GET_RW_LEN): Likewise.
1254 (I386_DR_WATCH_HIT): Likewise.
1255 (i386_wp_op_t): Likewise.
1256 (i386_show_dr): Likewise.
1257 (i386_length_and_rw_bits): Likewise.
1258 (i386_insert_aligned_watchpoint): Likewise.
1259 (i386_remove_aligned_watchpoint): Likewise.
1260 (i386_handle_nonaligned_watchpoint): Likewise.
1261 i386_update_inferior_debug_regs(): Likewise.
1262 (i386_dr_insert_watchpoint): Likewise.
1263 (i386_dr_remove_watchpoint): Likewise.
1264 (i386_dr_region_ok_for_watchpoint): Likewise.
1265 (i386_dr_stopped_data_address): Likewise.
1266 (i386_dr_stopped_by_watchpoint): Likewise.
1267
8f26655c
GB
12682014-06-19 Gary Benson <gbenson@redhat.com>
1269
1270 * i386-low.c (i386_dr_show): Renamed to
1271 i386_show_dr and made static. All uses updated.
1272 (i386_dr_length_and_rw_bits): Renamed to
1273 i386_length_and_rw_bits and made static.
1274 All uses updated.
1275 (i386_dr_insert_aligned_watchpoint): Renamed to
1276 i386_insert_aligned_watchpoint and made static.
1277 All uses updated.
1278 (i386_dr_remove_aligned_watchpoint): Renamed to
1279 i386_remove_aligned_watchpoint and made static.
1280 All uses updated.
1281 (i386_dr_update_inferior_debug_regs): Renamed to
1282 i386_update_inferior_debug_regs and made static.
1283 All uses updated.
1284
b9228891
GB
12852014-06-18 Gary Benson <gbenson@redhat.com>
1286
5171def3
GB
1287 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1288 (i386_dr_low_can_set_control): Likewise.
1289 (i386_get_debug_register_length): Likewise.
1290 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1291 (i386_dr_low_can_set_control): Likewise.
1292 (i386_get_debug_register_length): Likewise.
1293
12942014-06-17 Gary Benson <gbenson@redhat.com>
1295
b9228891
GB
1296 * i386-low.h (i386-dregs.h): New include.
1297 (DR_FIRSTADDR): Now in i386-dregs.h.
1298 (DR_LASTADDR): Likewise.
1299 (DR_NADDR): Likewise.
1300 (DR_STATUS): Likewise.
1301 (DR_CONTROL): Likewise.
1302 (i386_debug_reg_state): Likewise.
1303 (i386_dr_insert_watchpoint): Likewise.
1304 (i386_dr_remove_watchpoint): Likewise.
1305 (i386_dr_region_ok_for_watchpoint): Likewise.
1306 (i386_dr_stopped_data_address): Likewise.
1307 (i386_dr_stopped_by_watchpoint): Likewise.
1308 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1309
4be83cc2
GB
13102014-06-18 Gary Benson <gbenson@redhat.com>
1311
1312 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1313 i386_dr_insert_watchpoint.
1314 (i386_low_remove_watchpoint): Renamed to
1315 i386_dr_remove_watchpoint.
1316 (i386_low_region_ok_for_watchpoint): Renamed to
1317 i386_dr_region_ok_for_watchpoint.
1318 (i386_low_stopped_data_address): Renamed to
1319 i386_dr_stopped_data_address.
1320 (i386_low_stopped_by_watchpoint): Renamed to
1321 i386_dr_stopped_by_watchpoint.
1322 * i386-low.c (i386_show_dr): Renamed to
1323 i386_dr_show and made nonstatic. All uses updated.
1324 (i386_length_and_rw_bits): Renamed to
1325 i386_dr_length_and_rw_bits and made nonstatic.
1326 All uses updated.
1327 (i386_insert_aligned_watchpoint): Renamed to
1328 i386_dr_insert_aligned_watchpoint and made nonstatic.
1329 All uses updated.
1330 (i386_remove_aligned_watchpoint): Renamed to
1331 i386_dr_remove_aligned_watchpoint and made nonstatic.
1332 All uses updated.
1333 (i386_update_inferior_debug_regs): Renamed to
1334 i386_dr_update_inferior_debug_regs and made nonstatic.
1335 All uses updated.
1336 (i386_low_insert_watchpoint): Renamed to
1337 i386_dr_insert_watchpoint. All uses updated.
1338 (i386_low_remove_watchpoint): Renamed to
1339 i386_dr_remove_watchpoint. All uses updated.
1340 (i386_low_region_ok_for_watchpoint): Renamed to
1341 i386_dr_region_ok_for_watchpoint. All uses updated.
1342 (i386_low_stopped_data_address): Renamed to
1343 i386_dr_stopped_data_address. All uses updated.
1344 (i386_low_stopped_by_watchpoint): Renamed to
1345 i386_dr_stopped_by_watchpoint. All uses updated.
1346
131aa0d4
GB
13472014-06-18 Gary Benson <gbenson@redhat.com>
1348
1349 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1350 (i386_dr_low_can_set_control): Likewise.
1351 (i386_insert_aligned_watchpoint): New check.
1352
d9305f7f
GB
13532014-06-18 Gary Benson <gbenson@redhat.com>
1354
1355 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1356 Renamed to state.
1357
e927c9fc
GB
13582014-06-18 Gary Benson <gbenson@redhat.com>
1359
1360 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1361 instead of fatal and error.
1362 (i386_handle_nonaligned_watchpoint): Likewise.
1363
1b6d4134
GB
13642014-06-18 Gary Benson <gbenson@redhat.com>
1365
1366 * i386-low.c (i386_get_debug_register_length): New macro.
1367 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1368 (i386_show_dr): Use debug_printf instead of fprintf. Use
1369 phex to format values.
1370
6e62758f
GB
13712014-06-18 Gary Benson <gbenson@redhat.com>
1372
1373 * i386-low.h: Comment changes.
1374 * i386-low.c: Likewise.
1375
fc6e2f03
GB
13762014-06-18 Gary Benson <gbenson@redhat.com>
1377
1378 * i386-low.c: Whitespace changes.
1379
f9d1eeed
TT
13802014-06-12 Tom Tromey <tromey@redhat.com>
1381
1382 * utils.c (freeargv): Remove.
1383
0b04e523
TT
13842014-06-12 Tom Tromey <tromey@redhat.com>
1385
1386 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1387 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1388 (parse_debug_format_options): Likewise.
1389 (gdbserver_usage): Likewise.
1390 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1391 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1392 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1393 against libiberty.
1394 ($(LIBGNU)): Depend on libiberty.
1395 (all-lib): Recurse into all subdirs.
1396 (install-only): Invoke "install" target in subdirs.
1397 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1398 targets.
1399 * configure: Rebuild.
1400 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1401 for vasprintf, vsnprintf, or gettimeofday.
1402 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1403 srv_tgtobj.
1404
270c9937
JB
14052014-06-05 Joel Brobecker <brobecker@adacore.com>
1406
1407 * development.sh: Delete.
1408 * Makefile.in (config.status): Adjust dependency on development.sh.
1409 * configure.ac: Adjust development.sh source call.
1410 * configure: Regenerate.
1411
0a261ed8
PA
14122014-06-02 Pedro Alves <palves@redhat.com>
1413
1414 * ax.c (gdb_free_agent_expr): New function.
1415 * ax.h (gdb_free_agent_expr): New declaration.
1416 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1417 list.
1418 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1419 static.
1420 (clear_breakpoint_conditions_and_commands): New function.
1421 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1422 (clear_breakpoint_conditions_and_commands): New declaration.
1423
e9dae05e
RR
14242014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1425
1426 * linux-aarch64-low.c (asm/ptrace.h): Include.
1427
5876f503
JK
14282014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1429
1430 Fix TLS access for -static -pthread.
1431 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1432 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1433 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1434
802e8e6d
PA
14352014-05-20 Pedro Alves <palves@redhat.com>
1436
1437 * linux-aarch64-low.c (aarch64_insert_point)
1438 (aarch64_remove_point): No longer check whether the type is
1439 supported here. Adjust to new interface.
1440 (the_low_target): Install aarch64_supports_z_point_type as
1441 supports_z_point_type method.
1442 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1443 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1444 instead of a Z packet char. Adjust.
1445 (arm_supports_z_point_type): New function.
1446 (arm_insert_point, arm_remove_point): Adjust to new interface.
1447 (the_low_target): Install arm_supports_z_point_type.
1448 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1449 (cris_insert_point, cris_remove_point): Adjust to new interface.
1450 Don't check whether the type is supported here.
1451 (the_low_target): Install cris_supports_z_point_type.
1452 * linux-low.c (linux_supports_z_point_type): New function.
1453 (linux_insert_point, linux_remove_point): Adjust to new interface.
1454 * linux-low.h (struct linux_target_ops) <insert_point,
1455 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1456 raw_breakpoint pointer parameter.
1457 <supports_z_point_type>: New method.
1458 * linux-mips-low.c (mips_supports_z_point_type): New function.
1459 (mips_insert_point, mips_remove_point): Adjust to new interface.
1460 Use mips_supports_z_point_type.
1461 (the_low_target): Install mips_supports_z_point_type.
1462 * linux-ppc-low.c (the_low_target): Install NULL as
1463 supports_z_point_type method.
1464 * linux-s390-low.c (the_low_target): Install NULL as
1465 supports_z_point_type method.
1466 * linux-sparc-low.c (the_low_target): Install NULL as
1467 supports_z_point_type method.
1468 * linux-x86-low.c (x86_supports_z_point_type): New function.
1469 (x86_insert_point): Adjust to new insert_point interface. Use
1470 insert_memory_breakpoint. Adjust to new
1471 i386_low_insert_watchpoint interface.
1472 (x86_remove_point): Adjust to remove_point interface. Use
1473 remove_memory_breakpoint. Adjust to new
1474 i386_low_remove_watchpoint interface.
1475 (the_low_target): Install x86_supports_z_point_type.
1476 * lynx-low.c (lynx_target_ops): Install NULL as
1477 supports_z_point_type callback.
1478 * nto-low.c (nto_supports_z_point_type): New.
1479 (nto_insert_point, nto_remove_point): Adjust to new interface.
1480 (nto_target_ops): Install nto_supports_z_point_type.
1481 * mem-break.c: Adjust intro comment.
1482 (struct raw_breakpoint) <raw_type, size>: New fields.
1483 <inserted>: Update comment.
1484 <shlib_disabled>: Delete field.
1485 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1486 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1487 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1488 (raw_bkpt_type_to_target_hw_bp_type): New function.
1489 (find_enabled_raw_code_breakpoint_at): New function.
1490 (find_raw_breakpoint_at): New type and size parameters. Use them.
1491 (insert_memory_breakpoint): New function, based off
1492 set_raw_breakpoint_at.
1493 (remove_memory_breakpoint): New function.
1494 (set_raw_breakpoint_at): Reimplement.
1495 (set_breakpoint): New, based on set_breakpoint_at.
1496 (set_breakpoint_at): Reimplement.
1497 (delete_raw_breakpoint): Go through the_target->remove_point
1498 instead of assuming memory breakpoints.
1499 (find_gdb_breakpoint_at): Delete.
1500 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1501 (find_gdb_breakpoint): New function.
1502 (set_gdb_breakpoint_at): Delete.
1503 (z_type_supported): New function.
1504 (set_gdb_breakpoint_1): New function, loosely based off
1505 set_gdb_breakpoint_at.
1506 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1507 (delete_gdb_breakpoint_at): Delete.
1508 (delete_gdb_breakpoint_1): New function, loosely based off
1509 delete_gdb_breakpoint_at.
1510 (delete_gdb_breakpoint): New function.
1511 (clear_gdb_breakpoint_conditions): Rename to ...
1512 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1513 breakpoint.
1514 (add_condition_to_breakpoint): Make static.
1515 (add_breakpoint_condition): Take a struct breakpoint pointer
1516 instead of an address. Adjust.
1517 (gdb_condition_true_at_breakpoint): Rename to ...
1518 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1519 z_type parameter.
1520 (gdb_condition_true_at_breakpoint): Reimplement.
1521 (add_breakpoint_commands): Take a struct breakpoint pointer
1522 instead of an address. Adjust.
1523 (gdb_no_commands_at_breakpoint): Rename to ...
1524 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1525 parameter. Return true if no breakpoint was found. Change debug
1526 output.
1527 (gdb_no_commands_at_breakpoint): Reimplement.
1528 (run_breakpoint_commands): Rename to ...
1529 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1530 and change return type to boolean.
1531 (run_breakpoint_commands): New function.
1532 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1533 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1534 breakpoint. Go through the_target->remove_point instead of
1535 assuming memory breakpoint.
1536 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1537 software and hardware breakpoints.
1538 (reinsert_raw_breakpoint): Go through the_target->insert_point
1539 instead of assuming memory breakpoint.
1540 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1541 software and hardware breakpoints.
1542 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1543 Check both software and hardware breakpoints.
1544 (validate_inserted_breakpoint): Assert the breakpoint is a
1545 software breakpoint. Set the inserted flag to -1 instead of
1546 setting shlib_disabled.
1547 (delete_disabled_breakpoints): Adjust.
1548 (validate_breakpoints): Only validate software breakpoints.
1549 Adjust to inserted flag change.
1550 (check_mem_read, check_mem_write): Skip breakpoint types other
1551 than software breakpoints. Adjust to inserted flag change.
1552 * mem-break.h (enum raw_bkpt_type): New enum.
1553 (raw_breakpoint, struct process_info): Forward declare.
1554 (Z_packet_to_target_hw_bp_type): Delete declaration.
1555 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1556 (set_gdb_breakpoint, delete_gdb_breakpoint)
1557 (clear_breakpoint_conditions): New declarations.
1558 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1559 (breakpoint_inserted_here): Update comment.
1560 (add_breakpoint_condition, add_breakpoint_commands): Replace
1561 address parameter with a breakpoint pointer parameter.
1562 (gdb_breakpoint_here): Update comment.
1563 (delete_gdb_breakpoint_at): Delete.
1564 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1565 * server.c (process_point_options): Take a struct breakpoint
1566 pointer instead of an address. Adjust.
1567 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1568 delete_gdb_breakpoint.
1569 * spu-low.c (spu_target_ops): Install NULL as
1570 supports_z_point_type method.
1571 * target.h: Include mem-break.h.
1572 (struct target_ops) <prepare_to_access_memory>: Update comment.
1573 <supports_z_point_type>: New field.
1574 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1575 instead of a char. Also take a raw breakpoint pointer.
1576 * win32-arm-low.c (the_low_target): Install NULL as
1577 supports_z_point_type.
1578 * win32-i386-low.c (i386_supports_z_point_type): New function.
1579 (i386_insert_point, i386_remove_point): Adjust to new interface.
1580 (the_low_target): Install i386_supports_z_point_type.
1581 * win32-low.c (win32_supports_z_point_type): New function.
1582 (win32_insert_point, win32_remove_point): Adjust to new interface.
1583 (win32_target_ops): Install win32_supports_z_point_type.
1584 * win32-low.h (struct win32_target_ops):
1585 <supports_z_point_type>: New method.
1586 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1587 instead of a char. Also take a raw breakpoint pointer.
1588
932539e3
PA
15892014-05-20 Pedro Alves <palves@redhat.com>
1590
1591 * mem-break.h: Include break-common.h.
1592 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1593 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1594 (Z_packet_to_target_hw_bp_type): New declaration.
1595 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1596 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1597 (Z_PACKET_ACCESS_WP): Delete macros.
1598 (Z_packet_to_hw_type): Delete function.
1599 * i386-low.h: Don't include break-common.h here.
1600 (Z_packet_to_hw_type): Delete declaration.
1601 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1602 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1603 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1604 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1605 * linux-aarch64-low.c: Don't include break-common.h here.
1606 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1607 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1608 (Z_packet_to_target_hw_bp_type): Delete function.
1609 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1610 function.
1611 (mips_insert_point, mips_remove_point): Use
1612 Z_packet_to_target_hw_bp_type.
1613
4ff0d3d8
PA
16142014-05-20 Pedro Alves <palves@redhat.com>
1615
1616 * linux-aarch64-low.c: Include break-common.h.
1617 (enum target_point_type): Delete.
1618 (Z_packet_to_point_type): Rename to ...
1619 (Z_packet_to_target_hw_bp_type): ... this, and return a
1620 target_hw_bp_type instead.
1621 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1622 instead of an enum target_point_type.
1623 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1624 breakpoint type.
1625 (aarch64_dr_state_insert_one_point)
1626 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1627 (aarch64_handle_aligned_watchpoint)
1628 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1629 Take an enum target_hw_bp_type instead of an enum
1630 target_point_type.
1631 (aarch64_supports_z_point_type): New function.
1632 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1633 use Z_packet_to_target_hw_bp_type.
1634
786dc519
JB
16352014-05-20 Joel Brobecker <brobecker@adacore.com>
1636
1637 * configure.ac: Only use -Werror by default when DEVELOPMENT
1638 is true.
1639 * configure: Regenerate.
1640
9e0aa64f
JK
16412014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1642
1643 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1644 * linux-x86-low.c (X86_64_USER_REGS): New.
1645 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1646
2b577b92
YQ
16472014-04-28 Yao Qi <yao@codesourcery.com>
1648
1649 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1650 name.
1651
94611da2
PA
16522014-04-25 Pedro Alves <palves@redhat.com>
1653
1654 PR server/16255
1655 * linux-low.c (linux_attach_fail_reason_string): New function.
1656 (linux_attach_lwp): Delete.
1657 (linux_attach_lwp_1): Rename to ...
1658 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1659 argument. Remove "initial" parameter. Return int instead of
1660 void. Don't error or warn here.
1661 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1662 failure to attach to the tgid. Call warning when failing to
1663 attach to an lwp.
1664 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1665 argument. Remove "initial" parameter. Return int instead of
1666 void. Don't error or warn here.
1667 (linux_attach_fail_reason_string): New declaration.
1668 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1669 interface change. Use linux_attach_fail_reason_string.
1670
01f9f808
MS
16712014-04-24 Michael Sturm <michael.sturm@mintel.com>
1672 Walfred Tedeschi <walfred.tedeschi@intel.com>
1673
1674 * Makefile.in: Added rules to handle new files
1675 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1676 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1677 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1678 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1679 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1680 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1681 x32-avx512-linux.o.
1682 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1683 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1684 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1685 i386/x32-avx512.xml.
1686 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1687 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1688 i386/x32-avx512-linux.xml.
1689 * i387-fp.c (num_avx512_k_registers): New constant for number
1690 of K registers.
1691 (num_avx512_zmmh_low_registers): New constant for number of
1692 lower ZMM registers (0-15).
1693 (num_avx512_zmmh_high_registers): New constant for number of
1694 higher ZMM registers (16-31).
1695 (num_avx512_ymmh_registers): New contant for number of higher
1696 YMM registers (ymm16-31 added by avx521 on x86_64).
1697 (num_avx512_xmm_registers): New constant for number of higher
1698 XMM registers (xmm16-31 added by AVX512 on x86_64).
1699 (struct i387_xsave): Add space for AVX512 registers.
1700 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1701 Add code to handle AVX512 registers.
1702 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1703 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1704 prototypei from generated file.
1705 (tdesc_amd64_avx512_linux): Likewise.
1706 (init_registers_x32_avx512_linux): Likewise.
1707 (tdesc_x32_avx512_linux): Likewise.
1708 (init_registers_i386_avx512_linux): Likewise.
1709 (tdesc_i386_avx512_linux): Likewise.
1710 (x86_64_regmap): Add AVX512 registers.
1711 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1712 mask.
1713 (initialize_low_arch): Add code to initialize AVX512 registers.
1714
51aa91f9
PA
17152014-04-23 Pedro Alves <palves@redhat.com>
1716
1717 * mem-break.c (find_gdb_breakpoint_at): Make static.
1718 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1719
a4165e94
PA
17202014-04-23 Pedro Alves <palves@redhat.com>
1721
1722 * i386-low.c: Don't include break-common.h here.
1723 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1724 prototype to take target_hw_bp_type as argument instead of a Z
1725 packet char.
1726 * i386-low.h: Include break-common.h here.
1727 (Z_packet_to_hw_type): Declare.
1728 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1729 prototypes.
1730 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1731 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1732 (x86_remove_point): Convert the packet number to a
1733 target_hw_bp_type before calling i386_low_remove_watchpoint.
1734 * win32-i386-low.c (i386_insert_point): Convert the packet number
1735 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1736 (i386_remove_point): Convert the packet number to a
1737 target_hw_bp_type before calling i386_low_remove_watchpoint.
1738
b8acf843
PA
17392014-04-23 Pedro Alves <palves@redhat.com>
1740
1741 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1742
d708bcd1
PA
17432014-04-10 Pedro Alves <palves@redhat.com>
1744
1745 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1746 Check if the condition or command is NULL before checking if the
1747 breakpoint is known. On success, return true.
1748 * mem-break.h (add_breakpoint_condition): Document return.
1749 (add_breakpoint_commands): Add describing comment.
1750 * server.c (skip_to_semicolon): New function.
1751 (process_point_options): Use it.
1752
2eec7d5b
PA
17532014-04-09 Pedro Alves <palves@redhat.com>
1754
1755 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1756 to lwpid_of.
1757
fa96cb38
PA
17582014-02-27 Pedro Alves <palves@redhat.com>
1759
1760 PR 12702
1761 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1762 macros.
1763 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1764 output.
1765 (last_thread_of_process_p): Take a PID argument instead of a
1766 thread pointer.
1767 (linux_wait_for_lwp): Delete.
1768 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1769 functions.
1770 (linux_low_filter_event): New function, party factored out from
1771 linux_wait_for_event.
1772 (linux_wait_for_event): Rename to ...
1773 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1774 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1775 sigsuspend. Check for zombie leaders.
1776 (linux_wait_for_event): Reimplement as wrapper around
1777 linux_wait_for_event_filtered.
1778 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1779 a normal or signal exit is seen, it's the whole process exiting.
1780 (wait_for_sigstop): No longer a for_each_inferior callback.
1781 Rewrite on top of linux_wait_for_event_filtered.
1782 (stop_all_lwps): Call wait_for_sigstop directly.
1783 * server.c (resume, handle_target_event): Handle
1784 TARGET_WAITKIND_NO_RESUMED.
1785
d763de10
JB
17862014-02-26 Joel Brobecker <brobecker@adacore.com>
1787
1788 * win32-low.c (psapi_get_dll_name,
1789 * win32_CreateToolhelp32Snapshot): Delete.
1790 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1791 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1792 Delete.
1793 (handle_load_dll): Add function description.
1794 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1795
850a0f76
JB
17962014-02-26 Joel Brobecker <brobecker@adacore.com>
1797
1798 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1799 Add comment.
1800 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1801 base address when calling win32_add_one_solib.
1802 (handle_load_dll): Delete local variable load_addr.
1803 Remove 0x1000 offset applied to DLL base address when calling
1804 win32_add_one_solib.
1805 (handle_unload_dll): Add comment.
1806
f25b3fc3
JB
18072014-02-26 Joel Brobecker <brobecker@adacore.com>
1808
1809 * win32-low.c (win32_add_all_dlls): Renames
1810 win32_ensure_ntdll_loaded. Rewrite function documentation.
1811 Adjust implementation to always load all DLLs.
1812 Add 0x1000 offset to DLL base address when calling
1813 win32_add_one_solib.
1814 (child_initialization_done): New static global.
1815 (do_initial_child_stuff): Set child_initialization_done to
1816 zero during child initialization, and 1 after. Replace call
1817 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1818 Add comment.
1819 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1820 (handle_unload_dll): Add function documentation.
1821 (get_child_debug_event): Ignore load and unload DLL events
1822 during child initialization.
1823
d86d4aaf
DE
18242014-02-20 Doug Evans <dje@google.com>
1825
3bc32da3 1826 Remove global all_lwps.
d86d4aaf
DE
1827 * inferiors.h (ptid_of): Move here from linux-low.h.
1828 (pid_of, lwpid_of): Ditto.
1829 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1830 parameter is a struct thread_info * now.
1831 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1832 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1833 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1834 directly.
1835 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1836 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1837 * linux-arm-low.c (update_registers_callback): Update, "entry"
1838 parameter is a struct thread_info * now.
1839 Fetch lwpid from current_inferior directly.
1840 (arm_insert_point): Pass &all_threads to find_inferior instead of
1841 &all_lwps.
1842 (arm_remove_point): Ditto.
1843 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1844 (arm_prepare_to_resume): Fetch pid from thread.
1845 (arm_read_description): Fetch lwpid from current_inferior directly.
1846 * linux-low.c (all_lwps): Delete.
1847 (delete_lwp): Delete call to remove_inferior.
1848 (handle_extended_wait): Fetch lwpid from thread.
1849 (add_lwp): Don't set lwp->entry.id. Remove call to
1850 add_inferior_to_list.
1851 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1852 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1853 (kill_one_lwp_callback): Ditto.
1854 (linux_kill): Don't dereference NULL pointer.
1855 Fetch ptid,lwpid from thread.
1856 (get_detach_signal): Fetch ptid from thread.
1857 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1858 Simplify call to regcache_invalidate_thread.
1859 (delete_lwp_callback): Update, "entry" parameter is a
1860 struct thread_info * now. Fetch pid from thread.
1861 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1862 (status_pending_p_callback): Update, "entry" parameter is a
1863 struct thread_info * now. Fetch ptid from thread.
1864 (find_lwp_pid): Update, "entry" parameter is a
1865 struct thread_info * now.
1866 (linux_wait_for_lwp): Fetch pid from thread.
1867 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1868 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1869 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1870 (dequeue_one_deferred_signal): Ditto.
1871 (cancel_breakpoint): Fetch ptid from current_inferior.
1872 (linux_wait_for_event): Pass &all_threads to find_inferior,
1873 not &all_lwps. Fetch ptid, lwpid from thread.
1874 (count_events_callback): Update, "entry" parameter is a
1875 struct thread_info * now.
1876 (select_singlestep_lwp_callback): Ditto.
1877 (select_event_lwp_callback): Ditto.
1878 (cancel_breakpoints_callback): Ditto.
1879 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1880 not &all_lwps.
1881 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1882 (unsuspend_one_lwp): Update, "entry" parameter is a
1883 struct thread_info * now.
1884 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1885 not &all_lwps.
1886 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1887 Fetch lwpid from thread, not lwp.
1888 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1889 Pass &all_threads to find_inferior, not &all_lwps.
1890 (send_sigstop): Fetch lwpid from thread, not lwp.
1891 (send_sigstop_callback): Update, "entry" parameter is a
1892 struct thread_info * now.
1893 (suspend_and_send_sigstop_callback): Ditto.
1894 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1895 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1896 struct thread_info * now.
1897 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1898 from thread, lwp.
1899 (lwp_running): Update, "entry" parameter is a
1900 struct thread_info * now.
1901 (stop_all_lwps): Fetch ptid from thread.
1902 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1903 (linux_resume_one_lwp): Fetch lwpid from thread.
1904 (linux_set_resume_request): Update, "entry" parameter is a
1905 struct thread_info * now. Fetch pid, lwpid from thread.
1906 (resume_status_pending_p): Update, "entry" parameter is a
1907 struct thread_info * now.
1908 (need_step_over_p): Ditto. Fetch lwpid from thread.
1909 (start_step_over): Fetch lwpid from thread.
1910 (linux_resume_one_thread): Update, "entry" parameter is a
1911 struct thread_info * now. Fetch lwpid from thread.
1912 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1913 (proceed_one_lwp): Update, "entry" parameter is a
1914 struct thread_info * now. Fetch lwpid from thread.
1915 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1916 struct thread_info * now.
1917 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1918 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1919 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1920 directly.
1921 (regsets_store_inferior_registers): Ditto.
1922 (fetch_register, store_register): Ditto.
1923 (linux_read_memory, linux_write_memory): Ditto.
1924 (linux_request_interrupt): Ditto.
1925 (linux_read_auxv): Ditto.
1926 (linux_xfer_siginfo): Ditto.
1927 (linux_qxfer_spu): Ditto.
1928 (linux_qxfer_libraries_svr4): Ditto.
1929 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1930 moved to inferiors.h.
1931 (get_lwp): Delete.
1932 (get_thread_lwp): Update.
1933 (struct lwp_info): Delete member "entry". Simplify comment for
1934 member "thread".
1935 (all_lwps): Delete.
1936 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1937 current_inferior directly.
1938 (update_watch_registers_callback): Update, "entry" parameter is a
1939 struct thread_info * now. Fetch pid from thread.
1940 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1941 (mips_insert_point): Fetch lwpid from current_inferior.
1942 Pass &all_threads to find_inferior, not &all_lwps.
1943 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1944 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1945 directly.
1946 (mips_stopped_data_address): Ditto.
1947 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1948 directly.
1949 * linux-tile-low.c (tile_arch_setup): Ditto.
1950 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1951 (update_debug_registers_callback): Update, "entry" parameter is a
1952 struct thread_info * now. Fetch pid from thread.
1953 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1954 Pass &all_threads to find_inferior, not &all_lwps.
1955 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1956 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1957 Pass &all_threads to find_inferior, not &all_lwps.
1958 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1959 (i386_dr_low_get_status): Ditto.
1960 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1961 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1962 (x86_linux_read_description): Ditto.
1963 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1964
3b8361aa
DE
19652014-02-20 Doug Evans <dje@google.com>
1966
1967 * inferiors.c (get_first_inferior): Fix buglet.
1968
f7667f0d
DE
19692014-02-19 Doug Evans <dje@google.com>
1970
1971 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1972 * inferiors.c (add_thread): Change result type to struct thread_info *.
1973 All callers updated.
1974 (add_lwp): Call add_thread here instead of in callers.
1975 All callers updated.
1976 * linux-low.h (get_lwp_thread): Rewrite.
1977 (struct lwp_info): New member "thread".
1978
b3312d80
DE
19792014-02-19 Doug Evans <dje@google.com>
1980
1981 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1982 All callers updated.
1983
ecc6f45c
DE
19842014-02-19 Doug Evans <dje@google.com>
1985
1986 * inferiors.c (add_thread): Fix whitespace.
1987
649ebbca
DE
19882014-02-19 Doug Evans <dje@google.com>
1989
1990 * dll.c (clear_dlls): Replace accessing list implemention details
1991 with API function.
1992 * gdbthread.h (get_first_thread): Declare.
1993 * inferiors.c (for_each_inferior_with_data): New function.
1994 (get_first_thread): New function.
1995 (find_thread_ptid): Simplify.
1996 (get_first_inferior): New function.
1997 (clear_list): Delete.
1998 (one_inferior_p): New function.
1999 (clear_inferior_list): New function.
2000 (clear_inferiors): Update.
2001 * inferiors.h (for_each_inferior_with_data): Declare.
2002 (clear_inferior_list): Declare.
2003 (one_inferior_p): Declare.
2004 (get_first_inferior): Declare.
2005 * linux-low.c (linux_wait_for_event): Replace accessing list
2006 implemention details with API function.
2007 * server.c (target_running): Ditto.
2008 (accumulate_file_name_length): New function.
2009 (emit_dll_description): New function.
2010 (handle_qxfer_libraries): Replace accessing list implemention
2011 details with API function.
2012 (handle_qxfer_threads_worker): New function.
2013 (handle_qxfer_threads_proper): Replace accessing list implemention
2014 details with API function.
2015 (handle_query): Ditto.
2016 (visit_actioned_threads_callback_ftype): New typedef.
2017 (visit_actioned_threads_data): New struct.
2018 (visit_actioned_threads): Rewrite to be find_inferior callback.
2019 (resume): Call find_inferior.
2020 (handle_status): Replace accessing list implemention
2021 details with API function.
2022 (process_serial_event): Replace accessing list implemention details
2023 with API function.
2024 * target.c (set_desired_inferior): Replace accessing list implemention
2025 details with API function.
2026 * tracepoint.c (same_process_p): New function.
2027 (gdb_agent_about_to_close): Replace accessing list implemention
2028 details with API function.
2029 * win32-low.c (child_delete_thread): Replace accessing list
2030 implemention details with API function.
2031 (match_dll_by_basename): New function.
2032 (dll_is_loaded_by_basename): New function.
2033 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2034 details call to dll_is_loaded_by_basename.
2035
80894984
DE
20362014-02-19 Doug Evans <dje@google.com>
2037
2038 * dll.h (struct dll_info): Add comment.
2039 * gdbthread.h (struct thread_info): Add comment.
2040 (current_ptid): Simplify.
2041 * inferiors.c (add_process): Update.
2042 (remove_process): Update.
2043 * inferiors.h (struct process_info): Rename member "head" to "entry".
2044 * linux-low.c (delete_lwp): Update.
2045 (add_lwp): Update.
2046 (last_thread_of_process_p): Update.
2047 (kill_one_lwp_callback, linux_kill): Update.
2048 (status_pending_p_callback): Update.
2049 (wait_for_sigstop): Update. Simplify read of ptid.
2050 (start_step_over): Update.
2051 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2052 (get_lwp_thread): Update.
2053 (struct lwp_info): Rename member "head" to "entry".
2054 * regcache.h (inferior_list_entry): Delete.
2055 * server.c (kill_inferior_callback): Update.
2056 (detach_or_kill_inferior_callback): Update.
2057 (print_started_pid): Update.
2058 (print_attached_pid): Update.
2059 (process_serial_event): Simplify read of ptid.
2060 * thread-db.c (thread_db_create_event): Update.
2061 (thread_db_get_tls_address): Update.
2062 * win32-low.c (current_inferior_ptid): Simplify.
2063
46917d26
TT
20642014-02-19 Tom Tromey <tromey@redhat.com>
2065
2066 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2067 argument.
2068 (target_supports_btrace): Update.
2069
0759a81e
YQ
20702014-02-14 Yao Qi <yao@codesourcery.com>
2071
2072 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2073 (rsp-low-ipa.o): New target.
2074
a7191e8b
TT
20752014-02-12 Tom Tromey <tromey@redhat.com>
2076
2077 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2078 convert_ascii_to_int.
2079 * regcache.c (registers_to_string): Likewise.
2080 * remote-utils.c (decode_M_packet): Likewise.
2081 * server.c (process_serial_event): Likewise.
2082
ff0e980e
TT
20832014-02-12 Tom Tromey <tromey@redhat.com>
2084
2085 * server.c (handle_query, handle_v_run): Use hex2bin, not
2086 unhexify.
2087 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2088
e9371aff
TT
20892014-02-12 Tom Tromey <tromey@redhat.com>
2090
2091 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2092 convert_int_to_ascii.
2093 * regcache.c (registers_to_string, collect_register_as_string):
2094 Likewise.
2095 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2096 Likewise.
2097 * server.c (process_serial_event): Likewise.
2098 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2099 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2100
971dc0b8
TT
21012014-02-12 Tom Tromey <tromey@redhat.com>
2102
2103 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2104 bin2hex, not hexify.
2105 * tracepoint.c (cmd_qtstatus): Likewise.
2106
0a822afb
TT
21072014-02-12 Tom Tromey <tromey@redhat.com>
2108
2109 * remote-utils.c (monitor_output): Pass explicit length to
2110 hexify.
2111
9c3d6531
TT
21122014-02-12 Tom Tromey <tromey@redhat.com>
2113
2114 * tracepoint.c: Include rsp-low.h.
2115 * server.c: Include rsp-low.h.
2116 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2117 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2118 declare.
2119 * remote-utils.c: Include rsp-low.h.
2120 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2121 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2122 (convert_int_to_ascii, convert_ascii_to_int): Move to
2123 common/rsp-low.c.
2124 * regcache.c: Include rsp-low.h.
2125 * ax.c: Include rsp-low.h.
2126 * Makefile.in (SFILES): Add common/rsp-low.c.
2127 (OBS): Add rsp-low.o.
2128 (rsp-low.o): New target.
2129
01fd3ea5
TT
21302014-02-12 Tom Tromey <tromey@redhat.com>
2131
2132 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2133 Include print-utils.h.
2134 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2135 (plongest, thirty_two, phex_nz): Remove.
2136 * Makefile.in (SFILES): Add common/print-utils.c.
2137 (OBS): Add print-utils.o.
2138 (print-utils-ipa.o): New target.
2139 (print-utils.o): New target.
2140 (IPA_OBJS): Add print-utils-ipa.o.
2141
e99dc820
TT
21422014-02-06 Tom Tromey <tromey@redhat.com>
2143
2144 * Makefile.in (SFILES): Fix indentation.
2145
ee1e2d4f
DE
21462014-02-05 Doug Evans <dje@google.com>
2147
2148 * linux-low.c (linux_wait_for_event): Improve comment.
2149 (linux_wait_1): Keep current_inferior in sync with event_child.
2150
f5a02773
DE
21512014-01-22 Doug Evans <dje@google.com>
2152
2153 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2154
87ce2a04
DE
21552014-01-22 Doug Evans <dje@google.com>
2156
2157 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2158 * configure: Regenerate.
2159 * config.in: Regenerate.
2160 * Makefile.in (SFILES): Add debug.c.
2161 (OBS): Add debug.o.
2162 * debug.c: New file.
2163 * debug.h: New file.
2164 * linux-aarch64-low.c (*): Update all debugging printfs to use
2165 debug_printf instead of fprintf.
2166 * linux-arm-low.c (*): Ditto.
2167 * linux-cris-low.c (*): Ditto.
2168 * linux-crisv32-low.c (*): Ditto.
2169 * linux-m32r-low.c (*): Ditto.
2170 * linux-sparc-low.c (*): Ditto.
2171 * linux-x86.c (*): Ditto.
2172 * linux-low.c (*): Ditto.
2173 (linux_wait_1): Add calls to debug_enter, debug_exit.
2174 (linux_wait): Remove redundant debugging printf.
2175 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2176 (linux_resume, unstop_all_lwps): Ditto.
2177 * mem-break.c (*): Update all debugging printfs to use
2178 debug_printf instead of fprintf.
2179 * remote-utils.c (*): Ditto.
2180 * thread-db.c (*): Ditto.
2181 * server.c #include <ctype.h>, "gdb_vecs.h".
2182 (debug_threads): Moved to debug.c.
2183 (*): Update all debugging printfs to use debug_printf instead of
2184 fprintf.
2185 (start_inferior): Replace call to fflush with call to debug_flush.
2186 (monitor_show_help): Mention set debug-format.
2187 (parse_debug_format_options): New function.
2188 (handle_monitor_command): Handle "monitor set debug-format".
2189 (gdbserver_usage): Mention --debug-format.
2190 (main): Parse --debug-format.
2191 * server.h (debug_threads): Declaration moved to debug.h.
2192 #include "debug.h".
2193 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2194 trace_debug_1 that uses debug_printf.
2195 (tracepoint_look_up_symbols): Update all debugging printfs to use
2196 debug_printf instead of fprintf.
2197
e671835b
BS
21982014-01-20 Baruch Siach <baruch@tkos.co.il>
2199
2200 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2201 sys/ptrace.h.
2202
b5737fa9
PA
22032014-01-17 Pedro Alves <palves@redhat.com>
2204
ea38d2a9 2205 PR build/16445
c7faa97a
PA
2206 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2207 defined after including gdb_proc_service.h.
b5737fa9 2208
40ed484e
DE
22092014-01-16 Doug Evans <dje@google.com>
2210
2211 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2212 (match_dll): Use it.
2213
969c39fb
MM
22142014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2215
2216 * target.h (target_ops) <read_btrace>: Change parameters and
2217 return type to allow error reporting.
2218 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2219 trace reading errors on.
2220 * linux-low.c (linux_low_read_btrace): Pass trace reading
2221 errors on.
2222 (linux_low_disable_btrace): New.
2223
ab7f45ba
DE
22242014-01-15 Doug Evans <dje@google.com>
2225
2226 * inferiors.c (thread_id_to_gdb_id): Delete.
2227 * inferiors.h (thread_id_to_gdb_id): Delete.
2228
66af0f44
EZ
22292014-01-13 Eli Zaretskii <eliz@gnu.org>
2230
2231 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2232 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2233 versions.
2234
9939e131
PA
22352014-01-08 Pedro Alves <palves@redhat.com>
2236
2237 * server.c (handle_status): Don't discard previous queued stop
2238 replies or thread's pending status here.
2239 (main) <disconnection>: Do it here instead.
2240
b7ea362b
PA
22412014-01-08 Pedro Alves <palves@redhat.com>
2242
2243 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2244 * server.c (visit_actioned_threads, handle_pending_status): New
2245 function.
2246 (handle_v_cont): Factor out parts to ...
2247 (resume): ... this new function. If in all-stop, and a thread
2248 being resumed has a pending status, report it without actually
2249 resuming.
2250 (myresume): Adjust to use the new 'resume' function.
2251 (clear_pending_status_callback, set_pending_status_callback)
2252 (find_status_pending_thread_callback): New functions.
2253 (handle_status): Handle the case of multiple threads having
2254 interesting statuses to report. Report threads' real last signal
2255 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2256 with an interesting thread to report the status for, instead of
2257 always reporting the status of the first thread.
2258
28498c42
JB
22592014-01-01 Joel Brobecker <brobecker@adacore.com>
2260
2261 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2262 * gdbreplay.c (gdbreplay_version): Likewise.
2263
f45c82da
YZ
22642013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2265
2266 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2267 iov.iov_len with the real length in use.
2268
379a5e2d
JB
22692013-12-13 Joel Brobecker <brobecker@adacore.com>
2270
2271 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2272 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2273 for all targets that use win32-low.c.
2274 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2275 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2276
4210d83e
PA
22772013-12-13 Pedro Alves <palves@redhat.com>
2278
2279 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2280 if equal to TARGET_WAITKIND_LOADED.
2281 * win32-low.c (cached_status): New static global.
2282 (win32_wait): Add declaration.
2283 (do_initial_child_stuff): Flush all initial pending debug events
2284 up to the initial breakpoint.
2285 (win32_wait): If CACHED_STATUS was set, return that instead
2286 of doing a real wait. Remove the code resuming the execution
2287 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2288 during the initial phase. Also remove the code changing
2289 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2290 TARGET_WAITKIND_STOPPED.
2291
e7f0d979
YQ
22922013-12-11 Yao Qi <yao@codesourcery.com>
2293
2294 * notif.c (handle_notif_ack): Return 0 if no notification
2295 matches.
2296
ebcf782c
DE
22972013-11-20 Doug Evans <dje@google.com>
2298
2299 * linux-low.c (linux_set_resume_request): Fix comment.
2300
20ad9378
DE
23012013-11-20 Doug Evans <dje@google.com>
2302
2303 * linux-low.c (resume_status_pending_p): Tweak comment.
2304
a196ebeb
WT
23052013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2306
2307 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2308 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2309 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2310 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2311 (srv_amd64_regobj): Add amd64-mpx.o.
2312 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2313 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2314 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2315 * i387-fp.c (num_pl_bnd_register) Added constant.
2316 (num_pl_bnd_cfg_registers) Added constant.
2317 (struct i387_xsave) Added reserved area and MPX fields.
2318 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2319 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2320 function.
2321 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2322 (init_registers_amd64_mpx_linux): Declare new function.
2323 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2324 (x86_64_regmap): Add MPX registers.
2325 (x86_linux_read_description): Add MPX case.
2326 (initialize_low_arch): Initialize MPX targets.
2327
0080a2f6
TT
23282013-11-18 Tom Tromey <tromey@redhat.com>
2329
2330 * configure: Rebuild.
2331 * configure.ac: Don't check for stdlib.h.
2332 * gdbreplay.c: Unconditionally include stdlib.h.
2333
2978b111
TT
23342013-11-18 Tom Tromey <tromey@redhat.com>
2335
2336 * config.in: Rebuild.
2337 * configure: Rebuild.
2338 * configure.ac: Don't use AC_HEADER_DIRENT.
2339
a3d08894
TT
23402013-11-18 Tom Tromey <tromey@redhat.com>
2341
2342 * server.h: Don't check HAVE_STRING_H.
2343 * gdbreplay.c: Don't check HAVE_STRING_H.
2344 * configure: Rebuild.
2345
0a5dd17d
TT
23462013-11-18 Tom Tromey <tromey@redhat.com>
2347
2348 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2349 LIBGNU.
2350
1bd2f0ba
TT
23512013-11-08 Tom Tromey <tromey@redhat.com>
2352
2353 * configure, config.in: Rebuild.
2354 * configure.ac: Remove unused configury.
2355
3266f10b
TT
23562013-11-08 Tom Tromey <tromey@redhat.com>
2357
2358 * acinclude.m4: Include common.m4, codeset.m4.
2359 * configure, config.in: Rebuild.
2360 * configure.ac: Use GDB_AC_COMMON.
2361
6682d959
AA
23622013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2363
2364 * linux-s390-low.c (HWCAP_S390_TE): New define.
2365 (s390_arch_setup): Consider the TE field in the HWCAP for
2366 determining 'have_regset_tdb'.
2367
fd0a4d76
SDJ
23682013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2369
2370 PR gdb/16014
2371 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2372 call to sizeof.
2373
1a3d890b
PA
23742013-10-02 Pedro Alves <palves@redhat.com>
2375
2376 * server.c (process_serial_event): Don't output "GDBserver
2377 exiting" if GDB is connected through stdio.
2378 * target.c (mywait): Likewise, be silent if GDB is connected
2379 through stdio.
2380
97ad4581
JB
23812013-10-01 Joel Brobecker <brobecker@adacore.com>
2382
2383 * lynx-low.c (lynx_add_threads_after_attach): New function.
2384 (lynx_attach): Remove call to add_thread. Add call to
2385 lynx_add_threads_after_attach instead.
2386
5b4e221c
MF
23872013-09-28 Mike Frysinger <vapier@gentoo.org>
2388
2389 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2390 * config.in, configure: Regenerated.
2391
ee47b2f8
YQ
23922013-09-18 Yao Qi <yao@codesourcery.com>
2393
2394 PR server/15959
2395 * server.c (start_inferior): Clear 'resume_info'.
2396
d6707650 23972013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2398
d6707650
JW
2399 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2400 for each register.
2401
9243dd0e 24022013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2403
9243dd0e
JW
2404 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2405 linux-tile-low.o to srv_tgtobj.
2406
c623a6ef
WN
24072013-09-16 Will Newton <will.newton@linaro.org>
2408
2409 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2410 out regs.
2411
fb71d39e
PA
24122013-09-06 Pedro Alves <palves@redhat.com>
2413
2414 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2415 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2416 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2417 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2418 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2419 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2420
8e7e9910
PA
24212013-09-06 Pedro Alves <palves@redhat.com>
2422
2423 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2424 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2425
7c3a12ca
PA
24262013-09-06 Pedro Alves <palves@redhat.com>
2427
2428 * linux-amd64-ipa.c: Include tracepoint.h.
2429 * linux-i386-ipa.c: Include tracepoint.h.
2430
8eb3d7b6
RW
24312013-09-06 Ricard Wanderlof <ricardw@axis.com>
2432
2433 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2434 (ps_get_thread_area): New function.
2435
eddddb9d
RW
24362013-09-06 Ricard Wanderlof <ricardw@axis.com>
2437
2438 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2439 (initialize_low_arch): Call init_registers_crisv32 rather than
2440 init_register_crisv32.
2441
533b0600
PA
24422013-09-05 Pedro Alves <palves@redhat.com>
2443
2444 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2445 to ...
2446 * hostio.h: ... this new file.
2447 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2448 win32-low.c: Include hostio.h.
2449
0ce3d3b5
PA
24502013-09-05 Pedro Alves <palves@redhat.com>
2451
2452 * server.h (gdb_client_data, handler_func, callback_handler_func)
2453 (delete_file_handler, add_file_handler, append_callback_event)
2454 (delete_callback_event, start_event_loop, initialize_event_loop):
2455 Move to event-loop.h and include it.
2456 * event-loop.h: New file.
2457
799cdc37
PA
24582013-09-05 Pedro Alves <palves@redhat.com>
2459
2460 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2461 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2462 (loaded_dll, unloaded_dll): Move to ...
2463 * dll.h: ... this new file.
2464 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2465
6a6bbd9d
PA
24662013-09-05 Pedro Alves <palves@redhat.com>
2467
2468 * server.h (current_process, get_thread_process, all_processes)
2469 (add_inferior_to_list, for_each_inferior, current_inferior)
2470 (remove_inferior, add_process, remove_process, find_process_pid)
2471 (have_started_inferiors_p, have_attached_inferiors_p)
2472 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2473 (clear_inferiors, find_inferior, find_inferior_id)
2474 (inferior_target_data, set_inferior_target_data)
2475 (inferior_regcache_data, set_inferior_regcache_data): Move to
2476 inferiors.h, and include it.
2477 * inferiors.h: New file.
2478
f699aaba
PA
24792013-09-05 Pedro Alves <palves@redhat.com>
2480
2481 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2482 Move ...
2483 * ax.h: ... here.
2484
c144c7a0
PA
24852013-09-05 Pedro Alves <palves@redhat.com>
2486
2487 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2488 tracepoint.h.
2489 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2490 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2491 (handle_tracepoint_general_set, handle_tracepoint_query)
2492 (tracepoint_finished_step, tracepoint_was_hit)
2493 (release_while_stepping_state_list, current_traceframe)
2494 (in_readonly_region, traceframe_read_mem)
2495 (fetch_traceframe_registers, traceframe_read_sdata)
2496 (traceframe_read_info, struct fast_tpoint_collect_status)
2497 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2498 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2499 (supply_fast_tracepoint_registers)
2500 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2501 (ipa_tdesc, claim_trampoline_space)
2502 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2503 (agent_mem_read, agent_get_trace_state_variable_value)
2504 (agent_set_trace_state_variable_value, agent_tsv_read)
2505 (agent_mem_read_string, get_raw_reg_func_addr)
2506 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2507 * tracepoint.h: ... this new file.
2508
ff42e6ab
PA
25092013-09-05 Pedro Alves <palves@redhat.com>
2510
2511 * server.h (perror_with_name, error, fatal, warning, paddress)
2512 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2513 include it.
2514 * utils.h: New file.
2515
541af0f4
PA
25162013-09-05 Pedro Alves <palves@redhat.com>
2517
2518 * server.h (remote_debug, noack_mode, transport_is_reliable)
2519 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2520 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2521 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2522 (write_enn, initialize_async_io, enable_async_io)
2523 (disable_async_io, check_remote_input_interrupt_request)
2524 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2525 (dead_thread_notify, prepare_resume_reply)
2526 (decode_address_to_semicolon, decode_address, decode_m_packet)
2527 (decode_M_packet, decode_X_packet, decode_xfer_write)
2528 (decode_search_memory_packet, unhexify, hexify)
2529 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2530 (look_up_one_symbol, relocate_instruction)
2531 (monitor_output): Move to remote-utils.h, and include it.
2532 * remote-utils.h: New file.
2533
eebdf26b
PA
25342013-09-05 Pedro Alves <palves@redhat.com>
2535
2536 * server.h (_): Delete.
2537
3aafd2ff
PA
25382013-09-02 Pedro Alves <palves@redhat.com>
2539
2540 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2541 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2542 allocated.
2543 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2544
cee83bcb
PM
25452013-09-02 Pierre Muller <muller@sourceware.org>
2546
2547 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2548 or WriteProcessMemory complete successfully and handle
2549 ERROR_PARTIAL_COPY error.
2550
9a13b2fa
PA
25512013-09-02 Pedro Alves <palves@redhat.com>
2552
2553 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2554 error instead of EIO.
2555
602e3198
JK
25562013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2557
2558 PR server/15604
2559 * linux-low.c: Include filestuff.h.
2560 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2561 * lynx-low.c: Include filestuff.h.
2562 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2563 * server.c: Include filestuff.h.
2564 (main): Call notice_open_fds.
2565 * spu-low.c: Include filestuff.h.
2566 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2567
96d7229d
LM
25682013-08-22 Luis Machado <lgustavo@codesourcery.com>
2569
2570 * Makefile.in: Explain why ../target and ../nat are not
2571 listed as include file search paths.
2572 (linux-waitpid.o): New object file rule.
2573 * configure.srv (srv_native_linux_obj): New variable.
2574 Replace all occurrences of linux native object files with
2575 $srv_native_linux_obj.
2576 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2577 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2578 (linux_enable_event_reporting): Remove declaration.
2579 (my_waitpid): Moved to common/linux-waitpid.c.
2580 (linux_wait_for_event): Pass ptid when calling
2581 linux_enable_event_reporting.
2582 (linux_supports_tracefork_flag): Remove.
2583 (linux_enable_event_reporting): Likewise.
2584 (linux_tracefork_grandchild): Remove.
2585 (STACK_SIZE): Moved to common/linux-ptrace.c.
2586 (linux_tracefork_child): Remove.
2587 (linux_test_for_tracefork): Remove.
2588 (linux_look_up_symbols): Call linux_supports_traceclone.
2589 (initialize_low): Remove call to linux_test_for_tracefork.
2590 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2591 common/linux-ptrace.h.
2592 (PTRACE_TYPE_ARG4): Likewise.
2593 Include linux-ptrace.h.
2594
32940073
PA
25952013-08-21 Pedro Alves <palves@redhat.com>
2596
2597 * config.in: Renegerate.
2598
33b60d58 25992013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2600
33b60d58
LM
2601 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2602 (SFILES): Remove $(srcdir)/common/target-common.c and
2603 add $(srcdir)/target/waitstatus.c.
2604 (OBS): Remove target-common.o and add waitstatus.o.
2605 (server_h): Remove $(srcdir)/../common/target-common.h and
2606 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2607 and $(srcdir)/../target/waitstatus.h.
2608 (target-common.o): Remove.
2609 (waitstatus.o): New target object file.
2610 * target.h: Do not include target-common.h and
2611 include target/resume.h, target/wait.h and
2612 target/waitstatus.h.
2613
b8e1b30e
LM
26142013-08-13 Luis Machado <lgustavo@codesourcery.com>
2615
2616 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2617 to PTRACE_TYPE_ARG3.
2618 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2619 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2620 PTRACE_TYPE_ARG4.
2621 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2622 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2623
7a60ad40
YQ
26242013-07-27 Jie Zhang <jie@codesourcery.com>
2625 Daniel Jacobowitz <dan@codesourcery.com>
2626 Yao Qi <yao@codesourcery.com>
2627
2628 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2629 (mips-linux-watch.o): New rule.
2630 (mips_linux_watch_h): New variable.
2631 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2632 srv_tgtobj.
2633 * linux-mips-low.c: Include mips-linux-watch.h.
2634 (struct arch_process_info, struct arch_lwp_info): New.
2635 (update_watch_registers_callback): New function.
2636 (mips_linux_new_process, mips_linux_new_thread) New functions.
2637 (mips_linux_prepare_to_resume, mips_insert_point): New
2638 functions.
2639 (mips_remove_point, mips_stopped_by_watchpoint): New
2640 functions.
2641 (rsp_bp_type_to_target_hw_bp_type): New function.
2642 (mips_stopped_data_address): New function.
2643 (the_low_target): Add watchpoint support functions.
2644
de6f69ad
YQ
26452013-07-27 Yao Qi <yao@codesourcery.com>
2646
2647 * i386-low.c: Include break-common.h.
2648 (enum target_hw_bp_type): Remove.
2649
3360c0bf
LM
26502013-07-24 Luis Machado <lgustavo@codesourcery.com>
2651
2652 * Makefile.in (SFILES): /common/target-common.c.
2653 (OBS): Add target-common.o.
2654 (server_h): Add $(srcdir)/../common/target-common.h.
2655 (target-common.o): New target.
2656 * server.c (queue_stop_reply_callback): Free
2657 status string after use.
2658 * target.c (target_waitstatus_to_string): Remove.
2659 * target.h: Include target-common.h.
2660 (resume_kind): Likewise.
2661 (target_waitkind): Likewise.
2662 (target_waitstatus): Likewise.
2663 (TARGET_WNOHANG): Likewise.
2664
bd885420
YQ
26652013-07-04 Yao Qi <yao@codesourcery.com>
2666
2667 * Makefile.in (host_alias): Use @host_noncanonical@.
2668 (target_alias): Use @target_noncanonical@.
2669 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2670 ACX_NONCANONICAL_HOST.
2671 * configure: Regenerated.
2672
2673 Revert:
2674 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2675
2676 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2677 * configure: Rebuild.
2678 * Makefile.in (version_host, version_target): Get from configure.
2679 (version.c): Use $(version_host) and $(version_target).
2680
17ef446e
PA
26812013-07-03 Pedro Alves <palves@redhat.com>
2682
2683 * Makefile.in (config.status): Depend on development.sh.
2684 * acinclude.m4: Include libmcheck.m4.
2685 * configure: Regenerate.
2686
7a9a7487
MG
26872013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2688
2689 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2690 attribute inside the parentheses.
2691 (winapi_DebugSetProcessKillOnExit): Ditto.
2692 (winapi_DebugBreakProcess): Ditto.
2693 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2694
49b64de6
MG
26952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2696
2697 * notif.h (notif_event): Add a dummy member to avoid compiler
2698 errors.
2699
d5749ee7
PA
27002013-07-01 Pedro Alves <palves@redhat.com>
2701
2702 * hostio.c (HOSTIO_PATH_MAX): Define.
2703 (require_filename, handle_open, handle_unlink, handle_readlink):
2704 Use it.
2705
d8d2a3ee
PA
27062013-07-01 Pedro Alves <palves@redhat.com>
2707
2708 * server.h: Include "pathmax.h".
2709 * linux-low.c: Don't include sys/param.h.
2710 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2711 MAXPATHLEN.
2712 * win32-low.c: Don't include sys/param.h.
2713 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2714
bc7dea8d
PA
27152013-07-01 Pedro Alves <palves@redhat.com>
2716
2717 * event-loop.c: Don't check HAVE_UNISTD_H before including
2718 <unistd.h>.
2719 * gdbreplay.c: Likewise.
2720 * remote-utils.c: Likewise.
2721 * server.c: Likewise.
2722 * configure.ac: Don't check for unistd.h.
2723 * configure: Regenerate.
2724
d6c2da54
TT
27252013-06-28 Tom Tromey <tromey@redhat.com>
2726
2727 * Makefile.in (version.c): Use version.in, not
2728 common/version.in.
2729
257b6bec
MG
27302013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2731
2732 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2733 * configure: Rebuild.
2734 * Makefile.in (version_host, version_target): Get from configure.
2735 (version.c): Use $(version_host) and $(version_target).
2736
86ebe149
DK
27372013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2738
2739 Fix trace-status to output user name without trailing colon.
2740 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2741
f30aa5af
DK
27422013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2743
2744 Fix trace-status to output proper start-time and stop-time.
2745 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2746 output start time and stop time in hex as gdb expects.
2747
28a93511
YQ
27482013-06-26 Pedro Alves <pedro@codesourcery.com>
2749
2750 * tracepoint.c (build_traceframe_info_xml): Output trace state
2751 variables present in the trace buffer.
2752
01208463
TT
27532013-06-24 Tom Tromey <tromey@redhat.com>
2754
2755 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2756 create-version.sh.
2757 (version.o): Remove.
2758 * gdbreplay.c: Include version.h.
2759 (version, host_name): Don't declare.
2760 * server.h: Include version.h.
2761 (version, host_name): Don't declare.
2762
760256f9
PA
27632013-06-12 Pedro Alves <palves@redhat.com>
2764
2765 * linux-x86-low.c (linux_is_elf64): Delete global.
2766 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2767 with local linux_pid_exe_is_elf_64_file use.
2768
030031ee
PA
27692013-06-11 Pedro Alves <palves@redhat.com>
2770
2771 * linux-low.c (regset_disabled, disable_regset): New functions.
2772 (regsets_fetch_inferior_registers)
2773 (regsets_store_inferior_registers): Use them.
2774 (initialize_regsets_info); Don't allocate the disabled_regsets
2775 array here.
2776 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2777 comment.
2778
5da6eb0a
PA
27792013-06-11 Pedro Alves <palves@redhat.com>
2780
2781 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2782 xmalloc.
2783
7e5aaa09
PA
27842013-06-11 Pedro Alves <palves@redhat.com>
2785
2786 * linux-x86-low.c (initialize_low_arch): Call
2787 init_registers_x32_avx_linux.
2788
d878444c
JK
27892013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2790
2791 Fix compatibility with Android Bionic.
2792 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2793 it is not empty.
2794
3aee8918
PA
27952013-06-07 Pedro Alves <palves@redhat.com>
2796
5f2b57b5 2797 PR server/14823
3aee8918
PA
2798 * Makefile.in (OBS): Add tdesc.o.
2799 (IPA_OBJS): Add tdesc-ipa.o.
2800 (tdesc-ipa.o): New rule.
2801 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2802 interface.
2803 * linux-low.c (new_inferior): Delete.
2804 (disabled_regsets, num_regsets): Delete.
2805 (linux_add_process): Adjust to set the new per-process
2806 new_inferior flag.
2807 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2808 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2809 was a stop. When calling arch_setup, switch the current inferior
2810 to the thread that got an event.
2811 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2812 (regsets_fetch_inferior_registers)
2813 (regsets_store_inferior_registers): New regsets_info parameter.
2814 Adjust to use it.
2815 (linux_register_in_regsets): New regs_info parameter. Adjust to
2816 use it.
2817 (register_addr, fetch_register, store_register): New usrregs_info
2818 parameter. Adjust to use it.
2819 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2820 parameter regs_info. Adjust to use it.
2821 (linux_fetch_registers): Get the current inferior's regs_info, and
2822 adjust to use it.
2823 (linux_store_registers): Ditto.
2824 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2825 (initialize_low): Don't initialize the target_regsets here. Call
2826 initialize_low_arch.
2827 * linux-low.h (target_regsets): Delete declaration.
2828 (struct regsets_info): New.
2829 (struct usrregs_info): New.
2830 (struct regs_info): New.
2831 (struct process_info_private) <new_inferior>: New field.
2832 (struct linux_target_ops): Delete the num_regs, regmap, and
2833 regset_bitmap fields. New field regs_info.
2834 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2835 * i387-fp.c (num_xmm_registers): Delete.
2836 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2837 calls to new interface.
2838 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2839 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2840 Infer the number of xmm registers from the regcache's target
2841 description.
2842 * i387-fp.h (num_xmm_registers): Delete.
2843 * inferiors.c (add_thread): Don't install the thread's regcache
2844 here.
2845 * proc-service.c (gregset_info): Fetch the current inferior's
2846 regs_info. Adjust to use it.
2847 * regcache.c: Include tdesc.h.
2848 (register_bytes, reg_defs, num_registers)
2849 (gdbserver_expedite_regs): Delete.
2850 (get_thread_regcache): If the thread doesn't have a regcache yet,
2851 create one, instead of aborting gdbserver.
2852 (regcache_invalidate_one): Rename to ...
2853 (regcache_invalidate_thread): ... this.
2854 (regcache_invalidate_one): New.
2855 (regcache_invalidate): Only invalidate registers of the current
2856 process.
2857 (init_register_cache): Add target_desc parameter, and use it.
2858 (new_register_cache): Ditto. Assert the target description has a
2859 non zero registers_size.
2860 (regcache_cpy): Add assertions. Adjust.
2861 (realloc_register_cache, set_register_cache): Delete.
2862 (registers_to_string, registers_from_string): Adjust.
2863 (find_register_by_name, find_regno, find_register_by_number)
2864 (register_cache_size): Add target_desc parameter, and use it.
2865 (free_register_cache_thread, free_register_cache_thread_one)
2866 (regcache_release, register_cache_size): New.
2867 (register_size): Add target_desc parameter, and use it.
2868 (register_data, supply_register, supply_register_zeroed)
2869 (supply_regblock, supply_register_by_name, collect_register)
2870 (collect_register_as_string, collect_register_by_name): Adjust.
2871 * regcache.h (struct target_desc): Forward declare.
2872 (struct regcache) <tdesc>: New field.
2873 (init_register_cache, new_register_cache): Add target_desc
2874 parameter.
2875 (regcache_invalidate_thread): Declare.
2876 (regcache_invalidate_one): Delete declaration.
2877 (regcache_release): Declare.
2878 (find_register_by_number, register_cache_size, register_size)
2879 (find_regno): Add target_desc parameter.
2880 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2881 declarations.
2882 * remote-utils.c: Include tdesc.h.
2883 (outreg, prepare_resume_reply): Adjust.
2884 * server.c: Include tdesc.h.
2885 (gdbserver_xmltarget): Delete declaration.
2886 (get_features_xml, process_serial_event): Adjust.
2887 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2888 declare.
2889 (struct process_info) <tdesc>: New field.
2890 (ipa_tdesc): Declare.
2891 * tdesc.c: New file.
2892 * tdesc.h: New file.
2893 * tracepoint.c: Include tdesc.h.
2894 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2895 (get_context_regcache): Adjust to pass ipa_tdesc down.
2896 (do_action_at_tracepoint): Adjust to get the register cache size
2897 from the context regcache's description.
2898 (traceframe_walk_blocks): Adjust to get the register cache size
2899 from the current trace frame's description.
2900 (traceframe_get_pc): Adjust to get current trace frame's
2901 description and pass it down.
2902 (gdb_collect): Adjust to get the register cache size from the
2903 IPA's description.
2904 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2905 (gdbserver_xmltarget): Delete.
2906 (initialize_low_tracepoint): Set the ipa's target description.
2907 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2908 (initialize_low_tracepoint): Set the ipa's target description.
2909 * linux-x86-low.c: Include tdesc.h.
2910 [__x86_64__] (is_64bit_tdesc): New.
2911 (ps_get_thread_area, x86_get_thread_area): Use it.
2912 (i386_cannot_store_register): Rename to ...
2913 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2914 (i386_cannot_fetch_register): Rename to ...
2915 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2916 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2917 to new interface.
2918 (target_regsets): Rename to ...
2919 (x86_regsets): ... this.
2920 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2921 interface.
2922 (x86_siginfo_fixup): Use is_64bit_tdesc.
2923 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2924 (tdesc_x32_avx_linux, tdesc_x32_linux)
2925 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2926 Declare.
2927 (x86_linux_update_xmltarget): Delete.
2928 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2929 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2930 (AMD64_LINUX_USER64_CS): New.
2931 (x86_linux_read_description): New, based on
2932 x86_linux_update_xmltarget.
2933 (same_process_callback): New.
2934 (x86_arch_setup_process_callback): New.
2935 (x86_linux_update_xmltarget): New.
2936 (x86_regsets_info): New.
2937 (amd64_linux_regs_info): New.
2938 (i386_linux_usrregs_info): New.
2939 (i386_linux_regs_info): New.
2940 (x86_linux_regs_info): New.
2941 (x86_arch_setup): Reimplement.
2942 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2943 (x86_emit_ops): Ditto.
2944 (the_low_target): Adjust. Install x86_linux_regs_info,
2945 x86_cannot_fetch_register, and x86_cannot_store_register.
2946 (initialize_low_arch): New.
2947 * linux-ia64-low.c (tdesc_ia64): Declare.
2948 (ia64_fetch_register): Adjust.
2949 (ia64_usrregs_info, regs_info): New globals.
2950 (ia64_regs_info): New function.
2951 (the_low_target): Adjust.
2952 (initialize_low_arch): New function.
2953 * linux-sparc-low.c (tdesc_sparc64): Declare.
2954 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2955 Adjust.
2956 (sparc_arch_setup): New function.
2957 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2958 (the_low_target): Adjust.
2959 (initialize_low_arch): New function.
2960 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2961 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2962 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2963 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2964 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2965 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2966 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2967 (tdesc_powerpc_isa205_vsx64l): Declare.
2968 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2969 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2970 (ppc_set_pc, ppc_get_hwcap): Adjust.
2971 (ppc_usrregs_info): Forward declare.
2972 (!__powerpc64__) ppc_regmap_adjusted: New global.
2973 (ppc_arch_setup): Adjust to the current process'es target
2974 description.
2975 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2976 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2977 (ppc_store_evrregset): Adjust.
2978 (target_regsets): Rename to ...
2979 (ppc_regsets): ... this, and make static.
2980 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2981 (ppc_regs_info): New function.
2982 (the_low_target): Adjust.
2983 (initialize_low_arch): New function.
2984 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2985 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2986 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2987 (tdesc_s390x_linux64v2): Declare.
2988 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2989 (s390_fill_gregset, s390_store_last_break): Adjust.
2990 (target_regsets): Rename to ...
2991 (s390_regsets): ... this, and make static.
2992 (s390_get_pc, s390_set_pc): Adjust.
2993 (s390_get_hwcap): New target_desc parameter, and use it.
2994 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2995 (s390_arch_setup): Adjust to set the current process'es target
2996 description. Don't adjust the regmap.
2997 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2998 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2999 (regs_info_3264): New globals.
3000 (s390_regs_info): New function.
3001 (the_low_target): Adjust.
3002 (initialize_low_arch): New function.
3003 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3004 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3005 [__mips64] (init_registers_mips_linux)
3006 (init_registers_mips_dsp_linux): Delete defines.
3007 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3008 (have_dsp): New global.
3009 (mips_read_description): New, based on mips_arch_setup.
3010 (mips_arch_setup): Reimplement.
3011 (get_usrregs_info): New function.
3012 (mips_cannot_fetch_register, mips_cannot_store_register)
3013 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3014 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3015 (target_regsets): Rename to ...
3016 (mips_regsets): ... this, and make static.
3017 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3018 (dsp_regs_info, regs_info): New globals.
3019 (mips_regs_info): New function.
3020 (the_low_target): Adjust.
3021 (initialize_low_arch): New function.
3022 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3023 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3024 Declare.
3025 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3026 (arm_read_description): New, with bits factored from
3027 arm_arch_setup.
3028 (arm_arch_setup): Reimplement.
3029 (target_regsets): Rename to ...
3030 (arm_regsets): ... this, and make static.
3031 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3032 (arm_regs_info): New function.
3033 (the_low_target): Adjust.
3034 (initialize_low_arch): New function.
3035 * linux-m68k-low.c (tdesc_m68k): Declare.
3036 (target_regsets): Rename to ...
3037 (m68k_regsets): ... this, and make static.
3038 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3039 (m68k_regs_info): New function.
3040 (m68k_arch_setup): New function.
3041 (the_low_target): Adjust.
3042 (initialize_low_arch): New function.
3043 * linux-sh-low.c (tdesc_sharch): Declare.
3044 (target_regsets): Rename to ...
3045 (sh_regsets): ... this, and make static.
3046 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3047 (sh_regs_info, sh_arch_setup): New functions.
3048 (the_low_target): Adjust.
3049 (initialize_low_arch): New function.
3050 * linux-bfin-low.c (tdesc_bfin): Declare.
3051 (bfin_arch_setup): New function.
3052 (bfin_usrregs_info, regs_info): New globals.
3053 (bfin_regs_info): New function.
3054 (the_low_target): Adjust.
3055 (initialize_low_arch): New function.
3056 * linux-cris-low.c (tdesc_cris): Declare.
3057 (cris_arch_setup): New function.
3058 (cris_usrregs_info, regs_info): New globals.
3059 (cris_regs_info): New function.
3060 (the_low_target): Adjust.
3061 (initialize_low_arch): New function.
3062 * linux-cris-low.c (tdesc_crisv32): Declare.
3063 (cris_arch_setup): New function.
3064 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3065 (cris_regs_info): New function.
3066 (the_low_target): Adjust.
3067 (initialize_low_arch): New function.
3068 * linux-m32r-low.c (tdesc_m32r): Declare.
3069 (m32r_arch_setup): New function.
3070 (m32r_usrregs_info, regs_info): New globals.
3071 (m32r_regs_info): Adjust.
3072 (initialize_low_arch): New function.
3073 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3074 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3075 (tic6x_usrregs_info): Forward declare.
3076 (tic6x_read_description): New function, based on ...
3077 (tic6x_arch_setup): ... this. Reimplement.
3078 (target_regsets): Rename to ...
3079 (tic6x_regsets): ... this, and make static.
3080 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3081 (tic6x_regs_info): New function.
3082 (the_low_target): Adjust.
3083 (initialize_low_arch): New function.
3084 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3085 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3086 (target_regsets): Rename to ...
3087 (xtensa_regsets): ... this, and make static.
3088 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3089 globals.
3090 (xtensa_arch_setup, xtensa_regs_info): New functions.
3091 (the_low_target): Adjust.
3092 (initialize_low_arch): New function.
3093 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3094 (nios2_arch_setup): Set the current process'es tdesc.
3095 (target_regsets): Rename to ...
3096 (nios2_regsets): ... this.
3097 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3098 (nios2_regs_info): New function.
3099 (the_low_target): Adjust.
3100 (initialize_low_arch): New function.
a261b8f5
PA
3101 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3102 (aarch64_arch_setup): Set the current process'es tdesc.
3103 (target_regsets): Rename to ...
3104 (aarch64_regsets): ... this.
3105 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3106 (aarch64_regs_info): New function.
3107 (the_low_target): Adjust.
3108 (initialize_low_arch): New function.
3aee8918
PA
3109 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3110 globals.
3111 (target_regsets): Rename to ...
3112 (tile_regsets): ... this.
3113 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3114 (tile_regs_info): New function.
3115 (tile_arch_setup): Set the current process'es tdesc.
3116 (the_low_target): Adjust.
3117 (initialize_low_arch): New function.
3118 * spu-low.c (tdesc_spu): Declare.
3119 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3120 * win32-arm-low.c (tdesc_arm): Declare.
3121 (arm_arch_setup): New function.
3122 (the_low_target): Install arm_arch_setup instead of
3123 init_registers_arm.
3124 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3125 (init_windows_x86): Rename to ...
3126 (i386_arch_setup): ... this. Set `win32_tdesc'.
3127 (the_low_target): Adjust.
3128 * win32-low.c (win32_tdesc): New global.
3129 (child_add_thread): Don't create the thread cache here.
3130 (do_initial_child_stuff): Set the new process'es tdesc.
3131 * win32-low.h (struct target_desc): Forward declare.
3132 (win32_tdesc): Declare.
3133 * lynx-i386-low.c (tdesc_i386): Declare global.
3134 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3135 * lynx-low.c (lynx_tdesc): New global.
3136 (lynx_add_process): Set the new process'es tdesc.
3137 * lynx-low.h (struct target_desc): Forward declare.
3138 (lynx_tdesc): Declare global.
3139 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3140 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3141 * nto-low.c (nto_tdesc): New global.
3142 (do_attach): Set the new process'es tdesc.
3143 * nto-low.h (struct target_desc): Forward declare.
3144 (nto_tdesc): Declare.
3145 * nto-x86-low.c (tdesc_i386): Declare.
3146 (nto_x86_arch_setup): Set `nto_tdesc'.
3147
b1fbec62
GB
31482013-06-04 Gary Benson <gbenson@redhat.com>
3149
3150 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3151 to qSupported response when appropriate.
3152 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3153 with nonzero-length annex.
3154 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3155 arguments supplied in annex.
3156
d1ec4ce7
DE
31572013-05-31 Doug Evans <dje@google.com>
3158
ac44adcb 3159 PR server/15594
d1ec4ce7
DE
3160 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3161 64 bits in 64-cross-32 environment.
3162
9b25f2d3
PA
31632013-05-28 Pedro Alves <palves@redhat.com>
3164
3165 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3166 (aarch64-without-fpu.c): Delete rule.
3167 * configure.srv (aarch64*-*-linux*): Remove references to
3168 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3169 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3170 declaration.
3171
6740dc9c
PA
31722013-05-24 Pedro Alves <palves@redhat.com>
3173
3174 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3175 instead of strchr/decode_address. Error if the range isn't split
3176 with a ','. Don't assume there's be a ':' in the action.
3177
c2d6af84
PA
31782013-05-23 Yao Qi <yao@codesourcery.com>
3179 Pedro Alves <palves@redhat.com>
3180
3181 * linux-low.c (lwp_in_step_range): New function.
3182 (linux_wait_1): If the thread was range stepping and stopped
3183 outside the stepping range, report the stop to GDB. Otherwise,
3184 continue stepping. Add range stepping debug output.
3185 (linux_set_resume_request): Copy the step range from the resume
3186 request to the lwp.
3187 (linux_supports_range_stepping): New.
3188 (linux_target_ops) <supports_range_stepping>: Set to
3189 linux_supports_range_stepping.
3190 * linux-low.h (struct linux_target_ops)
3191 <supports_range_stepping>: New field.
3192 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3193 * linux-x86-low.c (x86_supports_range_stepping): New.
3194 (the_low_target) <supports_range_stepping>: Set to
3195 x86_supports_range_stepping.
3196 * server.c (handle_v_cont): Handle 'r' action.
3197 (handle_v_requests): Append ";r" if the target supports range
3198 stepping.
3199 * target.h (struct thread_resume) <step_range_start,
3200 step_range_end>: New fields.
3201 (struct target_ops) <supports_range_stepping>:
3202 New field.
3203 (target_supports_range_stepping): New macro.
3204
58794e1a
JB
32052013-05-17 Joel Brobecker <brobecker@adacore.com>
3206
3207 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3208 confusion in comment.
3209
d631c5a7
JB
32102013-05-17 Joel Brobecker <brobecker@adacore.com>
3211
3212 * lynx-low.c (struct process_info_private): New type.
3213 (lynx_add_process): New function.
3214 (lynx_create_inferior, lynx_attach): Replace calls to
3215 add_process by calls to lynx_add_process.
3216 (lynx_resume): If PTID is null, then try using
3217 current_process()->private->last_wait_event_ptid.
3218 Add comments.
3219 (lynx_clear_inferiors): Delete. The contents of that function
3220 has been inlined in lynx_mourn;
3221 (lynx_wait_1): Save the ptid in the process's private data.
3222 (lynx_mourn): Free the process' private data. Replace call
3223 to lynx_clear_inferiors by call to clear_inferiors.
3224
96f7a20f
YQ
32252013-05-17 Yao Qi <yao@codesourcery.com>
3226
3227 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3228 the right place.
3229
db0dfaa0
LM
32302013-05-16 Luis Machado <lgustavo@codesourcery.com>
3231
3232 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3233 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3234 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3235 PT_TEXT_END_ADDR guards. Update comments.
3236 (linux_target_op) <read_offsets>: Conditionally define to
3237 linux_read_offsets if the target is UCLIBC and if it defines
3238 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3239
68f5f838
SL
32402013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3241 Andrew Jenner <andrew@codesourcery.com>
3242
3243 * Makefile.in (SFILES): Add linux-nios2-low.c.
3244 (clean): Add action to delete nios2-linux.c.
3245 (nios2-linux.c): New rule.
3246 * configure.srv: Add nios2*-*-linux*.
3247 * linux-nios2-low.c: New.
3248
1ebff1fd
HAQ
32492013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3250
3251 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3252
f6150862
HZ
32532013-04-25 Hui Zhu <hui@codesourcery.com>
3254
3255 PR gdb/15186
f6150862
HZ
3256 * ax.c (ax_printf): Add fflush.
3257
614c279d
TT
32582013-04-22 Tom Tromey <tromey@redhat.com>
3259
3260 * Makefile.in (SFILES): Add filestuff.c.
3261 (OBS): Add filestuff.o.
3262 (filestuff.o): New target.
3263 * config.in, configure: Rebuild.
3264 * configure.ac: Check for fdwalk, pipe2.
3265
7d4e5717
PA
32662013-04-17 Pedro Alves <palves@redhat.com>
3267
3268 * configure.ac (USE_THREAD_DB): Delete variable.
3269 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3270 Don't AC_SUBST USE_THREAD_DB.
3271 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3272 * config.in, configure: Regenerate.
3273
d5c93e41
PA
32742013-04-16 Pedro Alves <palves@redhat.com>
3275
3276 * linux-low.h (struct lwp_info) <thread_known>: Move under
3277 the USE_THREAD_DB #ifdef.
3278
04f5fe89
PA
32792013-04-16 Pedro Alves <palves@redhat.com>
3280
3281 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3282 (linux-low.o): Delete rule.
3283 * linux-low.h: Always include "gdb_thread_db.h" instead of
3284 conditionally including thread_db.h.
3285 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3286 HAVE_THREAD_DB_H.
3287
480b27bf
JK
32882013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3289
3290 * Makefile.in (install-only): Fix make install regression.
3291
43662968
JK
32922013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3293
3294 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3295 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3296 installation.
3297 * gdbserver.1: Remove.
3298
3e74e146
PA
32992013-03-22 Pedro Alves <palves@redhat.com>
3300
3301 * linux-low.c (handle_extended_wait): Don't call
3302 linux_enable_event_reporting.
3303
a8347a2a
TT
33042013-03-15 Tony Theodore <tonyt@logyst.com>
3305
3306 PR build/9098:
3307 * Makefile.in (SHELL): Use @SHELL@.
3308
eeb56fa7
SDJ
33092013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3310
3311 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3312 compiler warning.
3313
4fa7e2ff
JB
33142013-03-13 Joel Brobecker <brobecker@adacore.com>
3315
3316 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3317 Remove extraneous NULL element.
3318
8ddb1965
YQ
33192013-03-13 Yao Qi <yao@codesourcery.com>
3320
3321 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3322 'V' block in trace frame.
3323
9accd112
MM
33242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3325
3326 * target.h (struct target_ops): Add btrace ops.
3327 (target_supports_btrace): New macro.
3328 (target_enable_btrace): New macro.
3329 (target_disable_btrace): New macro.
3330 (target_read_btrace): New macro.
3331 * gdbthread.h (struct thread_info): Add btrace field.
3332 * server.c: Include btrace-common.h.
3333 (handle_btrace_general_set): New function.
3334 (handle_btrace_enable): New function.
3335 (handle_btrace_disable): New function.
3336 (handle_general_set): Call handle_btrace_general_set.
3337 (handle_qxfer_btrace): New function.
3338 (struct qxfer qxfer_packets[]): Add btrace entry.
3339 * inferiors.c (remove_thread): Disable btrace.
3340 * linux-low: Include linux-btrace.h.
3341 (linux_low_enable_btrace): New function.
3342 (linux_low_read_btrace): New function.
3343 (linux_target_ops): Add btrace ops.
3344 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3345 Add srv_linux_btrace=yes.
3346 (x86_64-*-linux*): Add linux-btrace.o.
3347 Add srv_linux_btrace=yes.
3348 * configure.ac: Define HAVE_LINUX_BTRACE.
3349 * config.in: Regenerated.
3350 * configure: Regenerated.
3351
5cc22e4c
MM
33522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3353
3354 * server.c (handle_qxfer): Preserve error message if -3 is
3355 returned.
3356 (qxfer): Document the -3 return value.
3357
7c97f91e
MM
33582013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3359
3360 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3361 (linux_btrace_h): New variable.
3362 (linux-btrace.o): New rule.
3363
be9a119c 33642013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3365 Hafiz Abid Qadeer <abidh@codesourcery.com>
3366
3367 * tracepoint.c (trace_buffer_size): New global.
3368 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3369 (init_trace_buffer): Change to one-argument function. Allocate
3370 trace buffer memory.
3371 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3372 handle QTBuffer:size packet.
3373 (cmd_bigqtbuffer_size): New function.
3374 (initialize_tracepoint): Call init_trace_buffer with
3375 DEFAULT_TRACE_BUFFER_SIZE.
3376 * server.c (handle_query): Add QTBuffer:size in the
3377 supported packets.
3378
e64f7499
YQ
33792013-03-07 Yao Qi <yao@codesourcery.com>
3380
3381 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3382 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3383 of -1.
3384 (cmd_qtsp): Adjust condition. Do post increment.
3385 Set cur_action and cur_step_action back to 0.
3386
f0ae6fc3
PA
33872013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3388
3389 PR server/15236
3390 * linux-low.c (linux_write_memory): Return early success if LEN is
3391 zero.
3392
b5b0b0af
CV
33932013-03-05 Corinna Vinschen <vinschen@redhat.de>
3394
334ad4a8 3395 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3396
589bc927
TT
33972013-02-28 Tom Tromey <tromey@redhat.com>
3398
3399 * configure.ac: Invoke AC_SYS_LARGEFILE.
3400 * configure, config.in: Rebuild.
3401
dfe07582
CV
34022013-02-28 Corinna Vinschen <vinschen@redhat.com>
3403
3404 * win32-low.c: Throughout, fix format strings and casts of
3405 printf-like functions to avoid type related warnings on all
3406 platforms.
3407 (get_child_debug_event): Print dwDebugEventCode as hex since
3408 that's how it's usually documented.
3409
736cd585
YQ
34102013-02-28 Yao Qi <yao@codesourcery.com>
3411
3412 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3413 pulongest.
3414
e1f58301
JW
34152013-02-27 Jiong Wang <jiwang@tilera.com>
3416
3417 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3418 (reg-tilegx32.c): New rule.
3419 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3420 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3421 different register info initializer according to elf class.
3422 (init_registers_tilgx32): New function. The tilegx32 register info
3423 initializer.
3424 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3425 (tile_store_gregset): Likewise.
3426
d171ca78
YQ
34272013-02-27 Yao Qi <yao@codesourcery.com>
3428
3429 * server.c (process_point_options): Print debug message when
3430 debug_threads is true.
3431
282bbdf3
YQ
34322013-02-26 Yao Qi <yao@codesourcery.com>
3433
3434 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3435
aca22551
PA
34362013-02-19 Pedro Alves <palves@redhat.com>
3437 Kai Tietz <ktietz@redhat.com>
3438
3439 PR gdb/15161
3440
3441 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3442 instead of strtoul to extract address from packet.
3443 (process_serial_event) <'z'>: Likewise.
3444
4f3cee1c
YQ
34452013-02-18 Yao Qi <yao@codesourcery.com>
3446
3447 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3448
8e1d55a3
PA
34492013-02-14 Pedro Alves <palves@redhat.com>
3450
3451 Plug memory leak.
3452
3453 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3454 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3455
458820da
PA
34562013-02-14 Pedro Alves <palves@redhat.com>
3457
3458 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3459
baea0dae
PA
34602013-02-14 Pedro Alves <palves@redhat.com>
3461
3462 * tracepoint.c (save_string): Delete.
3463 (add_tracepoint_action): Use savestring instead of save_string.
3464
0b1afbb3
PA
34652013-02-12 Pedro Alves <palves@redhat.com>
3466
3467 * linux-xtensa-low.c: Ditto.
3468 * xtensa-xtregs.c: Ditto.
3469
8a4ac37e
PA
34702013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3471
3472 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3473 thread_db.
3474
148de6bb
MS
34752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3476
3477 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3478 aarch64_num_wp_regs and aarch64_num_bp_regs to
3479 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3480
55fac6e0
MS
34812013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3482
3483 * linux-aarch64-low.c (ps_get_thread_area): Replace
3484 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3485
176eb98c
MS
34862013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3487 Marcus Shawcroft <marcus.shawcroft@arm.com>
3488 Nigel Stephens <nigel.stephens@arm.com>
3489 Yufeng Zhang <yufeng.zhang@arm.com>
3490
3491 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3492 (aarch64.c, aarch64-without-fpu.c): New targets.
3493 * configure.srv (aarch64*-*-linux*): New.
3494 * linux-aarch64-low.c: New file.
3495
56f7af9c
MS
34962013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3497
43aaf8b6 3498 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3499 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3500 (dequeue_one_deferred_signal, linux_resume_one_thread)
3501 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3502 (linux_tracefork_grandchild, linux_test_for_tracefork)
3503 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3504 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3505 where the argument is 0.
3506
60f662b0
YQ
35072013-01-25 Yao Qi <yao@codesourcery.com>
3508
3509 * event-loop.c: Include "queue.h".
3510 (gdb_event_p): New typedef.
3511 (struct gdb_event) <next_event>: Remove.
3512 (event_queue): Change to QUEUE(gdb_event_p).
3513 (async_queue_event): Remove.
3514 (gdb_event_xfree): New.
3515 (initialize_event_loop): New.
3516 (process_event): Use API from QUEUE.
3517 (wait_for_event): Likewise.
3518 * server.c (main): Call initialize_event_loop.
3519 * server.h (initialize_event_loop): Declare.
3520
5ae4861a
YQ
35212013-01-18 Yao Qi <yao@codesourcery.com>
3522
3523 * ax.h (struct eval_agent_expr_context): New.
3524 (gdb_eval_agent_expr): Update declaration.
3525 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3526 TFRAME. Add new argument CTX.
3527 * server.h (struct eval_agent_expr_context): Declare.
3528 (agent_mem_read, agent_tsv_read): Update declaration.
3529 (agent_mem_read_string): Likewise.
3530 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3531 (add_traceframe_block): Add new argument TPOINT.
3532 Increase TPOINT->traceframe_usage.
3533 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3534 eval_tracepoint_agent_expr.
3535 (condition_true_at_tracepoint): Likewise.
3536 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3537 (agent_mem_read_string, agent_tsv_read): Likewise.
3538
85e00e85
YQ
35392013-01-16 Yao Qi <yao@codesourcery.com>
3540
3541 * linux-low.c (linux_resume_one_lwp): Don't check
3542 'lwp->bp_reinsert != 0'.
3543
4039cf45
JB
35442013-01-07 Joel Brobecker <brobecker@adacore.com>
3545 Pedro Alves <palves@redhat.com>
3546
3547 * lynx-low.c (ptrace_request_to_str): Define a temporary
3548 macro and use it to simplify this function's implementation.
3549
9044dee2
JB
35502013-01-07 Joel Brobecker <brobecker@adacore.com>
3551
3552 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3553 sets errno.
3554
e6352c8f
JB
35552013-01-07 Joel Brobecker <brobecker@adacore.com>
3556
3557 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3558
50681a27
JB
35592013-01-07 Joel Brobecker <brobecker@adacore.com>
3560
3561 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3562
3f6e77ef
JB
35632013-01-07 Joel Brobecker <brobecker@adacore.com>
3564
3565 * lynx-low.c (lynx_resume): Use the resume_info parameter
3566 to determine the ptid for the lynx_ptrace call, unless
3567 it is equal to minus_one_ptid, in which case we use the
3568 ptid of the current_inferior.
3569 (lynx_wait_1): After having received a thread create/exit
3570 event, resume the inferior's execution using the signaling
3571 thread's ptid, rather than the old ptid.
3572
7fda33ae
JB
35732013-01-07 Joel Brobecker <brobecker@adacore.com>
3574
3575 * lynx-low.c (lynx_resume): Delete variable ret.
3576
b9786c74
JB
35772013-01-01 Joel Brobecker <brobecker@adacore.com>
3578
3579 * gdbreplay.c (gdbreplay_version): Update copyright year.
3580 * server.c (gdbserver_version): Likewise.
3581
8b93d60f
JB
35822012-12-17 Joel Brobecker <brobecker@adacore.com>
3583
3584 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3585 new thread.
3586
037335a7
JB
35872012-12-17 Joel Brobecker <brobecker@adacore.com>
3588
3589 * lynx-low.c (ptrace_request_to_str): Add handling for
3590 PTRACE_GETTRACESIG.
3591
52d4cbd8
JB
35922012-12-17 Joel Brobecker <brobecker@adacore.com>
3593
3594 * lynx-low.c (lynx_attach): Delete variable new_process.
3595
ab8f6ca9
JB
35962012-12-17 Joel Brobecker <brobecker@adacore.com>
3597
3598 * lynx-low.c (lynx_create_inferior): Delete variable
3599 new_process.
3600
78cbc024
JB
36012012-12-17 Joel Brobecker <brobecker@adacore.com>
3602
3603 * lynx-low.c (ptrace_request_to_str): Do not handle
3604 PTRACE_GETTHREADLIST if this macro does not exist.
3605
14a00470
YQ
36062012-12-15 Yao Qi <yao@codesourcery.com>
3607
3608 * Makefile.in (OBS): Add notif.o.
3609 * notif.c, notif.h: New.
3610 * server.c: Include "notif.h".
3611 (struct vstop_notif) <next>: Remove.
3612 <base>: New field.
3613 (queue_stop_reply): Update.
3614 (push_event, send_next_stop_reply): Remove.
3615 (discard_queued_stop_replies): Update.
3616 (notif_stop): New variable.
3617 (handle_v_stopped): Remove.
3618 (handle_v_requests): Don't call handle_v_stopped. Call
3619 handle_ack_notif instead.
3620 (queue_stop_reply_callback): Call notif_event_enque instead
3621 of queue_stop_reply.
3622 (handle_status): Don't call send_next_stop_reply, call
3623 notif_write_event instead.
3624 (kill_inferior_callback): Likewise.
3625 (detach_or_kill_inferior_callback): Likewise.
3626 (main): Call initialize_notif.
3627 (process_serial_event): Call QUEUE_is_empty.
3628 (handle_target_event): Call notif_push instead of push event.
3629 * server.h (push_event): Remove declaration.
3630
61c125b9
TT
36312012-12-10 Tom Tromey <tromey@redhat.com>
3632
3633 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3634 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3635 macros.
3636 (.c.o): Rewrite.
3637 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3638 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3639 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3640 (amd64-linux-ipa.o, ax.o): Rewrite.
3641 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3642 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3643 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3644 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3645 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3646 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3647 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3648 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3649 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3650 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3651 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3652 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3653 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3654 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3655 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3656 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3657 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3658 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3659 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3660 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3661 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3662 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3663 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3664 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3665 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3666 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3667 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3668 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3669 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3670 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3671 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3672 (reg-tilegx.o): Remove.
3673 (all_object_files): New macro.
3674 Include .deps files.
3675 * aclocal.m4, configure: Rebuild.
3676 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3677 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3678 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3679
e90e9ad9
TT
36802012-12-05 Tom Tromey <tromey@redhat.com>
3681
3682 PR gdb/14917:
3683 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3684
02d403bf 36852012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3686
3687 * configure.ac: Check for linux/perf_event.h.
3688 * config.in: Regenerated.
3689 * configure: Regenerated.
3690
0270a750
PA
36912012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3692
3693 * hostio.c (handle_readlink): Decrease buffer size
3694 parameter passed to readlink by one byte.
3695
8c29b58e
YQ
36962012-11-26 Yao Qi <yao@codesourcery.com>
3697
3698 * configure.ac (build_warnings): Append '-Wempty-body'.
3699 * configure: Regenerated.
3700 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3701 body.
3702
8bdce1ff
PM
37032012-11-15 Pierre Muller <muller@sourceware.org>
3704
3705 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3706 * config.in: Regenerate.
3707 * configure: Regenerate.
3708 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3709 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3710 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3711 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3712 header.
3713 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3714 instead of <sys/wait.h> header.
3715 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3716
02d403bf 37172012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3718
3719 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3720 (various make rules): Remove -DGDBSERVER
3721
fbd5db48
YQ
37222012-11-09 Yao Qi <yao@codesourcery.com>
3723
3724 * spu-low.c (current_ptid): Move it to ..
3725 * gdbthread.h: ... here. New.
3726 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3727 * server.c (myresume, process_serial_event): Likewise.
3728 * thread-db.c (thread_db_find_new_threads): Likewise.
3729 * tracepoint.c (run_inferior_command): Likewise.
3730
b3dc46ff
AB
37312012-10-01 Andrew Burgess <aburgess@broadcom.com>
3732
3733 * server.c (handle_search_memory_1): Include access length in
3734 warning message.
3735
07c04788
HPN
37362012-09-05 Michael Brandt <michael.brandt@axis.com>
3737
3738 * linux-crisv32-low.c: Fix compile errors.
3739
918d227b
YQ
37402012-09-04 Yao Qi <yao@codesourcery.com>
3741
3742 * tracepoint.c (cmd_qtsv): Adjust debug message.
3743 Don't check CUR_TPOINT.
3744
18c1b81a
YQ
37452012-08-28 Yao Qi <yao@codesourcery.com>
3746
3747 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3748 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3749 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3750 Remove declarations of xmalloc, xreallloc, xstrdup and
3751 freeargv.
3752 * Makefile.in (libiberty_h): New.
3753 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3754 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3755
dc82f37b
YQ
37562012-08-23 Yao Qi <yao@codesourcery.com>
3757
3758 * server.h: Remove declaration of 'xsnprintf'.
3759
406b1477
KS
37602012-08-22 Keith Seitz <keiths@redhat.com>
3761
3762 * server.h: Include build-gnulib-gbserver/config.h.
3763 * gdbreplay.c: Likewise.
3764
e6712ff1
DE
37652012-08-08 Doug Evans <dje@google.com>
3766
3767 * Makefile.in (SFILES): Add gdb_vecs.c.
3768 (OBS): Add gdb_vecs.o.
3769 (gdb_vecs_h, host_defs_h): New variables.
3770 (thread-db.o): Add $(gdb_vecs_h) dependency.
3771 (gdb_vecs.o): New rule.
3772 * thread-db.c: #include "gdb_vecs.h".
3773 (thread_db_load_search): Use a vector to iterate over path elements.
3774 Handle text appearing after "$pdir".
3775
3776 * configure.ac: Add check for strstr.
3777 * config.in: Regenerate.
3778 * configure: Regenerate.
3779
7c3270ae
UW
37802012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3781
3782 * hostio.c (handle_pread): If pread fails, fall back to attempting
3783 lseek/read.
3784 (handle_pwrite): Likewise for pwrite.
3785
b62e2b27
UW
37862012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3787
3788 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3789 between unsupported TYPE and unimplementable ADDR/LEN combination.
3790 (arm_insert_point): Act on new return value.
3791
78a99e91
PA
37922012-07-31 Pedro Alves <palves@redhat.com>
3793
3794 * server.c (process_point_options): Only skip tokens if we find
3795 one that is unrecognized. Don't treat 'X' specially while
3796 skipping unrecognized tokens.
3797
fcf303ab
UW
37982012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3799
3800 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3801 to 4-byte-align HW breakpoint addresses for Thumb.
3802
7255706c
YQ
38032012-07-27 Yao Qi <yao@codesourcery.com>
3804
3805 PR remote/14161.
3806
3807 * server.h: Declare gdb_agent_about_to_close.
3808 * target.c (kill_inferior): Include "agent.h".
3809 New. Send command 'kill'.
3810 * target.h (kill_inferior): Removed macro.
3811 * tracepoint.c (gdb_agent_about_to_close): New.
3812 (gdb_agent_helper_thread): Handle command 'close'.
3813 Wait endlessly until the inferior stops.
3814 Install gdb_agent_remove_socket to atexit hook.
3815 (agent_socket_name): New static variable.
3816 (gdb_agent_socket_init): Replace local variable 'name' with
3817 'agent_socket_name'.
3818 (gdb_agent_remove_socket): New.
3819
5a3f286f
YQ
38202012-07-27 Yao Qi <yao@codesourcery.com>
3821
3822 * server.c (process_point_options): Stop at 'X' when parsing.
3823
961bd387
ME
38242012-07-19 Michael Eager <eager@eagercon.com>
3825
a261b8f5 3826 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3827 to hw_execute.
3828 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3829 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3830 hardware breakpoint.
3831
aa7c7447
JK
38322012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3833
3834 * gdbserver/linux-low.c (initialize_low): Call
3835 linux_ptrace_init_warnings.
3836
7f216e7c
DE
38372012-07-02 Doug Evans <dje@google.com>
3838
3839 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3840 pointer to int.
3841
d3ce09f5
SS
38422012-07-02 Stan Shebs <stan@codesourcery.com>
3843
3844 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3845 (ax.o): Add it to build rule.
3846 (ax-ipa.o): Ditto.
3847 (OBS): Add format.o.
3848 (IPA_OBS): Add format.o.
3849 * server.c (handle_query): Claim support for breakpoint commands.
3850 (process_point_options): Add command case.
3851 (process_serial_event): Leave running if there are printfs in
3852 effect.
3853 * mem-break.h (any_persistent_commands): Declare.
3854 (add_breakpoint_commands): Declare.
3855 (gdb_no_commands_at_breakpoint): Declare.
3856 (run_breakpoint_commands): Declare.
3857 * mem-break.c (struct point_command_list): New struct.
3858 (struct breakpoint): New field command_list.
3859 (any_persistent_commands): New function.
3860 (add_commands_to_breakpoint): New function.
3861 (add_breakpoint_commands): New function.
3862 (gdb_no_commands_at_breakpoint): New function.
3863 (run_breakpoint_commands): New function.
3864 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3865 locally.
3866 * ax.c: Include format.h.
3867 (ax_printf): New function.
3868 (gdb_eval_agent_expr): Add printf opcode.
3869
2f8f6aed
YQ
38702012-06-13 Yao Qi <yao@codesourcery.com>
3871
3872 * server.c (start_inferior): Remove duplicated writes to fields
3873 'last_resume_kind' and 'last_status' of 'current_inferior'.
3874
0c9070b3
YQ
38752012-06-12 Yao Qi <yao@codesourcery.com>
3876 Pedro Alves <palves@redhat.com>
3877
3878 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3879 comment.
3880 * server.c (handle_v_cont): Extend comment.
3881
c52daf70
YQ
38822012-06-11 Yao Qi <yao@codesourcery.com>
3883
3884 * linux-low.c (linux_attach): Add 'static'.
3885
d38bbb0a
YQ
38862012-06-06 Yao Qi <yao@codesourcery.com>
3887
3888 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3889
89dc0afd
JK
38902012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3891
3892 Fix gcc -flto compilation warning.
3893 * server.c (main): Make variable multi_mode and attach volatile.
3894
75f62ce7
TJB
38952012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3896
3897 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3898 if the platform doesn't know about it.
3899
65f479b6
PA
39002012-05-30 Jeff Kenton <jkenton@tilera.com>
3901
3902 * Makefile.in (SFILES): Add linux-tile-low.c.
3903 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3904 * configure.srv: Handle tilegx-*-linux*.
3905 * linux-tile-low.c: New file.
3906
0c5bf5a9
JK
39072012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3908
3909 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3910
a493e3e2
PA
39112012-05-24 Pedro Alves <palves@redhat.com>
3912
3913 PR gdb/7205
3914
43aaf8b6 3915 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3916
2ea28649
PA
39172012-05-24 Pedro Alves <palves@redhat.com>
3918
3919 PR gdb/7205
3920
3921 Replace target_signal with gdb_signal throughout.
3922
8d409d16
MR
39232012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3924
3925 * linux-low.c (linux_store_registers): Avoid the copying sequence
3926 when no data has been retrieved by ptrace.
3927
23512c01
MGD
39282012-05-22 Will Deacon <will.deacon@arm.com>
3929
3930 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3931 Include asm/ptrace.h.
3932 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3933 already defined.
3934
4934b29e
MR
39352012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3936
3937 * linux-low.c (linux_store_registers): Don't re-retrieve data
3938 with ptrace that has already been obtained from /proc. Always
3939 copy any data retrieved with ptrace to the buffer supplied.
3940
bde24c0a
PA
39412012-05-11 Yao Qi <yao@codesourcery.com>
3942 Pedro Alves <palves@redhat.com>
3943
3944 * linux-low.c (enum stopping_threads_kind): New.
3945 (stopping_threads): Change type to `enum stopping_threads_kind'.
3946 (handle_extended_wait): If stopping and suspending threads, leave
3947 the new_lwp suspended too.
3948 (linux_wait_for_event): Adjust.
3949 (stop_all_lwps): Set `stopping_threads' to
3950 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3951 whether we're suspending threads or just stopping them. Assert no
3952 recursion happens.
3953
623b6bdf
YQ
39542012-04-29 Yao Qi <yao@codesourcery.com>
3955
3956 * server.h: Move some code to ...
3957 * gdbthread.h: ... here. New.
3958 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3959 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3960 (nto-low.o, win32-low.o): Likewise.
3961 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3962 * regcache.c, remote-utils.c, server.c: Likewise.
3963 * target.c, tracepoint.c, win32-low.c: Likewise.
3964
f15f9948
TJB
39652012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3966
3967 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3968 (PTRACE_ARG4_TYPE): Likewise.
3969 (PTRACE_XFER_TYPE): Likewise.
3970 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3971 ptrace to PTRACE_ARG3_TYPE.
3972 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3973 (PTRACE_ARG4_TYPE): Likewise.
3974 (PTRACE_XFER_TYPE): Likewise.
3975 (linux_detach_one_lwp): Cast fourth argument of
3976 ptrace to long then PTRACE_ARG4_TYPE.
3977 (regsets_fetch_inferior_registers): Cast third argument of
3978 ptrace to long then PTRACE_ARG3_TYPE.
3979 (regsets_store_inferior_registers): Likewise.
3980
38ea300a
PA
39812012-04-20 Pedro Alves <palves@redhat.com>
3982
3983 * configure: Regenerate.
3984
c971b7fa
PA
39852012-04-19 Pedro Alves <palves@redhat.com>
3986
43aaf8b6 3987 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3988 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3989 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3990 (all, install-only, uninstall, clean-info, all-lib, clean): No
3991 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3992 (maintainer-clean realclean distclean): Use subdir_do.
3993 (subdir_do): New.
3994 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3995 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3996 * acinclude.m4: Include acx_configure_dir.m4.
3997 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3998 calls. Call AC_PROG_RANLIB. Configure gnulib using
3999 ACX_CONFIGURE_DIR.
4000 (GNULIB): New.
4001 (GNULIB_STDINT_H): Adjust.
4002 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4003 * gdbreplay.c: Include build-gnulib/config.h.
4004 * server.h: Likewise.
4005 * aclocal.m4: Regenerate.
4006 * config.in: Regenerate.
4007 * configure: Regenerate.
c971b7fa 4008
809277f8
PA
40092012-04-19 Pedro Alves <palves@redhat.com>
4010
4011 * Makefile.in (LIBGNU, INCGNU): Adjust.
4012 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4013 (all, install-only, uninstall, clean-info, all-lib, clean)
4014 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4015 * configure.ac: Adjust AC_OUTPUT output.
4016 * aclocal.m4: Regenerate.
4017 * configure: Regenerate.
4018
fd9bb8b8
PA
40192012-04-19 Pedro Alves <palves@redhat.com>
4020
4021 * Makefile.in (generated_files): New.
4022 (server_h): Remove the explicit dependency on config.h, and depend
4023 on $generated_files.
4024
1c298c66
PA
40252012-04-19 Pedro Alves <palves@redhat.com>
4026
4027 * Makefile.in (INCGNU): Add -Ignulib.
4028
57c4b50b
PA
40292012-04-19 Pedro Alves <palves@redhat.com>
4030
4031 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4032 (INCGNU): ... this, and spell out -I here.
4033 (GNULIB_LIB): Rename to ...
4034 (LIBGNU): ... this.
4035 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4036
1030e047
PA
40372012-04-19 Pedro Alves <palves@redhat.com>
4038
4039 * config.in: Regenerate.
4040
447d4319
PA
40412012-04-19 Pedro Alves <palves@redhat.com>
4042
4043 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4044 * server.h (memmem): Remove declaration.
4045 * config.in: Regenerate.
4046 * configure: Regenerate.
4047
aad9eab9
YQ
40482012-04-19 Yao Qi <yao@codesourcery.com>
4049
4050 * Makefile.in (SFILES): Add common/vec.c.
4051 (OBS): Add vec.o.
4052 (vec.o): New rule.
4053
3e10640f
YQ
40542012-04-19 Yao Qi <yao@codesourcery.com>
4055
4056 * remote-utils.c (prepare_resume_reply): Replace with macro
4057 target_core_of_thread.
4058 * server.c (handle_qxfer_threads_proper): Likewise.
4059 * target.h (traget_core_of_thread): New macro.
4060
71622373
PA
40612012-04-18 Pedro Alves <palves@redhat.com>
4062
4063 * aclocal.m4: Regenerate.
4064 * configure: Regenerate.
4065
80d26939
YQ
40662012-04-16 Yao Qi <yao@codesourcery.com>
4067
4068 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4069 duplicated on address.
4070
42476b70
YQ
40712012-04-16 Yao Qi <yao@codesourcery.com>
4072
4073 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4074 (struct tracepoint_action_ops) <send>: New field.
4075 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4076 (agent_expr_send, x_tracepoint_action_send): New.
4077 (l_tracepoint_action_send): New.
4078 (cmd_qtdp): Download and install tracepoint
4079 according to `use_agent'.
4080 (run_inferior_command): Add one more parameter `len'.
4081 Update callers.
4082 (tracepoint_send_agent): New.
4083 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4084
7bc83639
YQ
40852012-04-16 Yao Qi <yao@codesourcery.com>
4086
4087 * tracepoint.c (download_tracepoints): Moved to ...
4088 (cmd_qtstart): ... here.
4089
5f18041e
YQ
40902012-04-14 Yao Qi <yao@codesourcery.com>
4091
4092 * tracepoint.c: Include inttypes.h.
4093 (struct collect_memory_action): Use sized types.
4094 (struct tracepoint): Likewise.
4095 (cmd_qtdp, stop_tracing): Update print specifiers.
4096 (cmd_qtp, response_tracepoint): Likewise.
4097 (collect_data_at_tracepoint): Likewise.
4098 (collect_data_at_step): Likewise.
4099
55a8c076
YQ
41002012-04-14 Yao Qi <yao@codesourcery.com>
4101
4102 Import gnulib module inttypes.
4103 * aclocal.m4, config.in, configure: Regenerated.
4104
dc750257
YQ
41052012-04-14 Yao Qi <yao@codesourcery.com>
4106
4107 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4108 Makefile and config.status at last.
4109
0ab5faf9
YQ
41102012-04-13 Yao Qi <yao@codesourcery.com>
4111
4112 * tracepoint.c: Include stdint.h unconditionally.
4113
18f5fd81
TJB
41142012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4115
4116 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4117 on BFD_HAVE_SYS_PROCFS_TYPE.
4118 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4119 * configure: Regenerate.
4120 * config.in: Likewise.
4121
4d47af5c
L
41222012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4123
4124 * Makefile.in (clean): Also remove x32.c x32-linux.c
4125 x32-avx.c x32-avx-linux.c.
4126 (x32.o): New target.
4127 (x32.c): Likewise.
4128 (x32-linux.o): Likewise.
4129 (x32-linux.c): Likewise.
4130 (x32-avx.o): Likewise.
4131 (x32-avx.c): Likewise.
4132 (x32-avx-linux.o): Likewise.
4133 (x32-avx-linux.c): Likewise.
4134
4135 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4136 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4137 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4138 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4139 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4140 i386/x32-avx-linux.xml.
4141
4142 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4143 (init_registers_x32_avx_linux): Likwise.
4144 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4145 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4146
ecedbe58
PA
41472012-04-13 Pedro Alves <palves@redhat.com>
4148
4149 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4150 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4151 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4152 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4153 the sub-make.
4154
c92b5177
L
41552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4156
4157 * linux-x86-low.c (compat_x32_clock_t): New.
4158 (compat_x32_siginfo_t): Likewise.
4159 (compat_x32_siginfo_from_siginfo): Likewise.
4160 (siginfo_from_compat_x32_siginfo): Likewise.
4161 (linux_is_elf64): Likewise.
4162 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4163 and siginfo_from_compat_x32_siginfo for x32.
4164 (x86_arch_setup): Set linux_is_elf64.
4165
214d508e
L
41662012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4167
4168 PR gdb/13969
4169 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4170 e_machine field.
4171 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4172 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4173 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4174 compatible with process.
4175
c9a1864a
YQ
41762012-04-12 Yao Qi <yao@codesourcery.com>
4177
4178 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4179 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4180 (install-only, install-info, clean): Handle sub dir gnulib.
4181 (all-lib, am--refresh): New targets.
4182 (memmem.o): Remove target.
4183 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4184 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4185 (AC_REPLACE_FUNCS): Remove memmem.
4186 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4187 (AC_OUTPUT): Generate Makefile in gnulib/.
4188 * aclocal.m4, config.in, configure: Regenerated.
4189
367ba2c2
MR
41902012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4191
4192 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4193
9d236627
PA
41942012-04-05 Pedro Alves <palves@redhat.com>
4195
4196 -Werror=strict-aliasing
4197
4198 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4199 pointer.
4200
111217b3
PA
42012012-04-04 Pedro Alves <palves@redhat.com>
4202
4203 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4204 (sparc_store_gregset_from_stack, sparc_store_gregset)
4205 (sparc_breakpoint_at): Fix formatting.
4206
8365dcf5
TJB
42072012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4208
4209 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4210 are available.
4211 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4212 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4213 * config.in: Regenerate.
4214 * configure: Likewise.
4215
689cc2ae
PA
42162012-03-29 Pedro Alves <palves@redhat.com>
4217
4218 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4219 Correct ptrace arguments.
4220
c14dfd32
PA
42212012-03-28 Pedro Alves <palves@redhat.com>
4222
4223 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4224 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4225 (IA64_FR1_REGNUM): New defines.
4226 (ia64_fetch_register): New.
4227 (the_low_target): Install it.
4228 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4229 field.
4230 * linux-low.c (linux_fetch_registers): Try the
4231 the_low_target.fetch_register hook first.
4232
4233 * linux-arm-low.c (the_low_target): Adjust.
4234 * linux-bfin-low.c (the_low_target): Adjust.
4235 * linux-cris-low.c (the_low_target): Adjust.
4236 * linux-crisv32-low.c (the_low_target): Adjust.
4237 * linux-m32r-low.c (the_low_target): Adjust.
4238 * linux-m68k-low.c (the_low_target): Adjust.
4239 * linux-mips-low.c (the_low_target): Adjust.
4240 * linux-ppc-low.c (the_low_target): Adjust.
4241 * linux-s390-low.c (the_low_target): Adjust.
4242 * linux-sh-low.c (the_low_target): Adjust.
4243 * linux-sparc-low.c (the_low_target): Adjust.
4244 * linux-tic6x-low.c (the_low_target): Adjust.
4245 * linux-x86-low.c (the_low_target): Adjust.
4246 * linux-xtensa-low.c (the_low_target): Adjust.
4247
63c88e13
PA
42482012-03-26 Pedro Alves <palves@redhat.com>
4249
4250 * server.c (handle_qxfer_libraries): Don't bail early if
4251 the_target->qxfer_libraries_svr4 is not NULL.
4252
fb723180
PA
42532012-03-26 Pedro Alves <palves@redhat.com>
4254
4255 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4256
0afae3cf
PA
42572012-03-23 Pedro Alves <palves@redhat.com>
4258
4259 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4260 "library-list-svr4" element's start tag when the the DSO list is
4261 empty.
4262
485f1ee4
PA
42632012-03-23 Pedro Alves <palves@redhat.com>
4264
4265 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4266 a variable whose type size is the same as the inferior's pointer
4267 size.
4268
a5362b9a
TS
42692012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4270
4271 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4272 struct siginfo.
4273 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4274 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4275 * linux-low.h: Include <signal.h>.
4276 (struct siginfo): Remove forward declaration.
4277 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4278 struct siginfo.
4279
d226c142
MF
42802012-03-21 Mike Frysinger <vapier@gentoo.org>
4281
4282 * .gitignore: Ignore more files.
4283
122f36ef
PA
42842012-03-19 Pedro Alves <palves@redhat.com>
4285 Jan Kratochvil <jan.kratochvil@redhat.com>
4286
4287 * server.c (cont_thread, general_thread): Add describing comments.
4288 (start_inferior): Clear `cont_thread'.
4289 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4290 of a process.
4291
fc3e5175
YQ
42922012-03-15 Yao Qi <yao@codesourcery.com>
4293
4294 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4295 handling to ...
4296 (cmd_qtdp): ... here.
4297
8d0d92cd
YQ
42982012-03-15 Yao Qi <yao@codesourcery.com>
4299
4300 * tracepoint.c (struct tracepoint_action_ops): New.
4301 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4302 (m_tracepoint_action_download): New.
4303 (r_tracepoint_action_download): New.
4304 (x_tracepoint_action_download): New.
4305 (l_tracepoint_action_download): New.
4306 (add_tracepoint_action): Install `action->ops' according type.
4307 (download_tracepoint_1): Move code `download' function pointer
4308 of various tracepoint_action_ops.
4309
87b0bb13
JK
43102012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4311
4312 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4313 linux_ptrace_attach_warnings.
4314
5f572dec
JK
43152012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4316
4317 * Makefile.in (linux-ptrace.o): New.
4318 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4319 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4320 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4321 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4322 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4323 of these targets.
4324 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4325
f4647387
YQ
43262012-03-08 Yao Qi <yao@codesourcery.com>
4327 Pedro Alves <palves@redhat.com>
4328
4329 Fix PR server/13392.
4330 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4331 offset of JMP insn.
4332 * tracepoint.c (remove_tracepoint): New.
4333 (cmd_qtdp): Call remove_tracepoint when failed to install.
4334
9b224c5e
PA
43352012-03-07 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (get_detach_signal): New.
4338 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4339 Pass on pending signals to PTRACE_DETACH. Check the result of the
4340 ptrace call.
4341 * server.c (program_signals, program_signals_p): New.
4342 (handle_general_set): Handle QProgramSignals.
4343 * server.h (program_signals, program_signals_p): Declare.
4344
e237a7e2
JK
43452012-03-05 Pedro Alves <palves@redhat.com>
4346 Jan Kratochvil <jan.kratochvil@redhat.com>
4347
4348 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4349 New comment why.
4350
5808517f
YQ
43512012-03-03 Yao Qi <yao@codesourcery.com>
4352
4353 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4354 agent_look_up_symbols.
4355
58b4daa5
YQ
43562012-03-03 Yao Qi <yao@codesourcery.com>
4357
4358 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4359 (linux-x86-low.o): Likewise.
4360 * server.h: Remove in_process_agent_loaded.
4361 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4362 common/agent.c.
4363 Update callers.
4364
8ffcbaaf
YQ
43652012-03-03 Yao Qi <yao@codesourcery.com>
4366
4367 * tracepoint.c (gdb_agent_capability): New global.
4368 (in_process_agent_loaded_ust): Renamed to
4369 `in_process_agent_supports_ust'.
4370 Update callers.
4371 (in_process_agent_supports_ust): Call agent_capability_check.
4372 (clear_installed_tracepoints): Assert that agent supports
4373 agent.
4374
d1feda86
YQ
43752012-03-03 Yao Qi <yao@codesourcery.com>
4376
4377 * linux-low.c (linux_supports_agent): New.
4378 (linux_target_ops): Initialize field `supports_agent' with
4379 linux_supports_agent.
4380 * target.h (struct target_ops) <supports_agent>: New.
4381 (target_supports_agent): New macro.
4382 * server.c (handle_general_set): Handle packet 'QAgent'.
4383 (handle_query): Send `QAgent+'.
4384 * Makefile.in (server.o): Depends on agent.h.
4385
2fa291ac
YQ
43862012-03-03 Yao Qi <yao@codesourcery.com>
4387
4388 * Makefile.in (OBS): Add agent.o.
4389 Add new rule for agent.o.
4390 Track dependence of tracepoint.c on agent.h.
4391 * tracepoint.c (run_inferior_command_1):
4392 (run_inferior_command): Call agent_run_command.
4393 (gdb_ust_connect_sync_socket): Deleted. Move it to
4394 common/agent.c.
4395 (resume_thread, stop_thread): Likewise.
4396 (gdb_ust_socket_init): Renamed to ...
4397 (gdb_agent_socket_init): ... New.
4398 (gdb_ust_thread): Renamed to ...
4399 (gdb_agent_helper_thread): ... New.
4400 (gdb_ust_init): Move some code to ...
4401 (gdb_agent_init): ... here. New.
4402 [HAVE_UST]: Call gdb_ust_init.
4403 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4404 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4405 * config.in, configure: Regenerated.
4406
05044653
PA
44072012-03-02 Pedro Alves <palves@redhat.com>
4408
4409 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4410 * linux-low.c (struct simple_pid_list): New.
4411 (stopped_pids): New a struct simple_pid_list pointer.
4412 (add_to_pid_list, pull_pid_from_list): New.
4413 (handle_extended_wait): Don't assume the first signal new children
4414 report is SIGSTOP. Adjust call to pull_pid_from_list.
4415 (linux_wait_for_lwp): Adjust.
4416
8d00225b
YQ
44172012-03-02 Yao Qi <yao@codesourcery.com>
4418
4419 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4420 debug log.
4421
19560ba5
YQ
44222012-03-02 Yao Qi <yao@codesourcery.com>
4423
4424 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4425 `stop_pc' and `tpoint'. Update caller.
4426
1faeff08
MR
44272012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4428
4429 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4430 * linux-low.c (use_linux_regsets): New macro.
4431 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4432 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4433 (linux_register_in_regsets): New function.
4434 (usr_fetch_inferior_registers): Skip registers covered by
4435 regsets.
4436 (usr_store_inferior_registers): Likewise.
4437 (usr_fetch_inferior_registers): New macro.
4438 (usr_store_inferior_registers): Likewise.
4439 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4440 (linux_store_registers): Likewise.
4441 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4442 prototype.
4443 (init_registers_mips64_dsp_linux): Likewise.
4444 (init_registers_mips_linux): New macro.
4445 (init_registers_mips_dsp_linux): Likewise.
4446 (mips_dsp_num_regs): Likewise.
4447 (DSP_BASE, DSP_CONTROL): New fallback macros.
4448 (mips_base_regs): New macro.
4449 (mips_regmap): Use it. Fix the size.
4450 (mips_dsp_regmap): New variable.
4451 (mips_dsp_regset_bitmap): Likewise.
4452 (mips_arch_setup): New function.
4453 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4454 than mips_regmap.
4455 (mips_cannot_store_register): Likewise.
4456 (the_low_target): Update .arch_setup, .num_regs and .regmap
4457 initializers. Add .regset_bitmap initializer.
4458 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4459 initializer.
4460 * linux-bfin-low.c (the_low_target): Likewise.
4461 * linux-cris-low.c (the_low_target): Likewise.
4462 * linux-crisv32-low.c (the_low_target): Likewise.
4463 * linux-ia64-low.c (the_low_target): Likewise.
4464 * linux-m32r-low.c (the_low_target): Likewise.
4465 * linux-m68k-low.c (the_low_target): Likewise.
4466 * linux-ppc-low.c (the_low_target): Likewise.
4467 * linux-s390-low.c (the_low_target): Likewise.
4468 * linux-sh-low.c (the_low_target): Likewise.
4469 * linux-sparc-low.c (the_low_target): Likewise.
4470 * linux-tic6x-low.c (the_low_target): Likewise.
4471 * linux-x86-low.c (the_low_target): Likewise.
4472 * linux-xtensa-low.c (the_low_target): Likewise.
4473 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4474 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4475 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4476 srv_xmlfiles.
4477 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4478 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4479
c03e6ccc
YQ
44802012-02-29 Yao Qi <yao@codesourcery.com>
4481 Pedro Alves <palves@redhat.com>
4482
4483 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4484 `step_over_finished' is true.
4485
644cebc9
PA
44862012-02-27 Pedro Alves <palves@redhat.com>
4487
4488 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4489 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4490
c14d7ab2
PA
44912012-02-27 Pedro Alves <palves@redhat.com>
4492
4493 PR server/9684
4494 * linux-low.c (pid_is_stopped): New.
4495 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4496
412c89dd
LM
44972012-02-25 Luis Machado <lgustavo@codesourcery.com>
4498
4499 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4500 of conditions.
4501
b745defe
MR
45022012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4503
4504 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4505
9f3a5c85
LM
45062012-02-24 Luis Machado <lgustavo@codesourcery>
4507
4508 * server.c (handle_query): Advertise support for target-side
4509 breakpoint condition evaluation.
4510 (process_point_options): New function.
4511 (process_serial_event): When inserting a breakpoint, check for
4512 a target-side condition that should be evaluated.
4513
4514 * mem-break.c: Include regcache.h and ax.h.
4515 (point_cond_list_t): New data structure.
4516 (breakpoint) <cond_list>: New field.
4517 (find_gdb_breakpoint_at): Make non-static.
4518 (delete_gdb_breakpoint_at): Clear any target-side
4519 conditions.
4520 (clear_gdb_breakpoint_conditions): New function.
4521 (add_condition_to_breakpoint): Likewise.
4522 (add_breakpoint_condition): Likewise.
4523 (gdb_condition_true_at_breakpoint): Likewise.
4524 (gdb_breakpoint_here): Return result directly instead
4525 of going through a local variable.
4526
4527 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4528 (clear_gdb_breakpoint_conditions): Likewise.
4529 (add_breakpoint_condition): Likewise.
4530 (gdb_condition_true_at_breakpoint): Likewise.
4531
4532 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4533 (need_step_over_p): Take target-side breakpoint condition into
4534 consideration.
4535
5e1dc496
LM
45362012-02-24 Luis Machado <lgustavo@codesourcery>
4537
4538 * server.h: Include tracepoint.h.
4539 (agent_mem_read, agent_get_trace_state_variable_value,
4540 agent_set_trace_state_variable_value,
4541 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4542 get_set_tsv_func_addr): New prototypes.
4543
4544 * ax.h: New include file.
4545 * ax.c: New source file.
4546
4547 * tracepoint.c: Include ax.h.
4548 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4549 agent_expr, eval_result_type): Move to ax.h.
4550 (parse_agent_expr): Rename to ...
4551 (gdb_parse_agent_expr): ... this, make it non-static and move
4552 to ax.h.
4553 (unparse_agent_expr) Rename to ...
4554 (gdb_unparse_agent_expr): ... this, make it non-static and move
4555 to ax.h.
4556 (eval_agent_expr): Rename to ...
4557 (eval_tracepoint_agent_expr): ... this.
4558 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4559 forward declarations.
4560 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4561 (agent_get_trace_state_variable_value): New function.
4562 (agent_set_trace_state_variable_value): New function.
4563 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4564 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4565 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4566 (condition_true_at_tracepoint): Likewise.
4567 (parse_agent_expr): Rename to ...
4568 (gdb_parse_agent_expr): ... this and move to ax.c.
4569 (unparse_agent_expr): Rename to ...
4570 (gdb_unparse_agent_expr): ... this and move to ax.c.
4571 (gdb_agent_op_name): Move to ax.c.
4572 (eval_agent_expr): Rename to ...
4573 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4574 and move to ax.c.
4575 (eval_tracepoint_agent_expr): New function.
4576 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4577 non-static.
5e1dc496
LM
4578 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4579 ax.c.
4580 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4581 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4582 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4583 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4584 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4585 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4586 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4587 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4588 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4589 (compile_bytecodes): Remove forward declaration.
4590 (is_goto_target): Move to ax.c.
4591 (compile_bytecodes): Move to ax.c and call
4592 agent_get_trace_state_variable_value (...) and
4593 agent_set_trace_state_variable_value (...).
4594
4595 * Makefile.in: Update ax.c and IPA dependencies.
4596
277e4e52
PA
45972012-02-24 Pedro Alves <palves@redhat.com>
4598
4599 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4600 (cmd_bigqtbuffer_circular): ... this. Only handle
4601 'QTBuffer:circular:'.
4602 (handle_tracepoint_general_set): Adjust.
4603
bf4c19f7
YQ
46042012-02-16 Yao Qi <yao@codesourcery.com>
4605
4606 * inferiors.c: Move code to ...
4607 * dll.c: .... here. New.
4608 * server.h: Declare clear_dlls.
4609 * Makefile.in (SFILES): Add dll.c.
4610 (OBS): Add dll.o
4611 (dll.o): New rule.
4612
d73f2619
YQ
46132012-02-11 Yao Qi <yao@codesourcery.com>
4614
4615 * server.c: (handle_monitor_command): Add a new parameter
4616 `own_buf'.
4617 (handle_query): Update caller.
4618
f8255c2a
JB
46192012-02-09 Joel Brobecker <brobecker@adacore.com>
4620
4621 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4622 * configure, config.in: Regenerate.
4623 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4624 is not defined.
4625
da84f473
PA
46262012-02-02 Pedro Alves <palves@redhat.com>
4627
4628 Try SIGKILL first, then PTRACE_KILL.
4629 * linux-low.c (linux_kill_one_lwp): New.
4630 (linux_kill_one_lwp): Rename to ...
4631 (kill_one_lwp_callback): ... this. Use the new
4632 linux_kill_one_lwp.
4633
e886a173
PA
46342012-02-02 Pedro Alves <palves@redhat.com>
4635
4636 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4637 inferior.
4638
be07f1a2
PA
46392012-01-27 Pedro Alves <palves@redhat.com>
4640
4641 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4642 (elf_64_file_p): Make static.
4643 (linux_pid_exe_is_elf_64_file): New.
4644 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4645 Delete declarations.
4646 (linux_pid_exe_is_elf_64_file): Declare.
4647 * linux-x86-low.c (x86_arch_setup): Use
4648 linux_pid_exe_is_elf_64_file.
4649
d8301ad1
JK
46502012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4651
4652 * linux-low.c (linux_wait_for_event_1): Rename to ...
4653 (linux_wait_for_event): ... here and merge it with former
4654 linux_wait_for_event - new variable wait_ptid, use it.
4655 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4656
01b17894
PA
46572012-01-23 Pedro Alves <palves@redhat.com>
4658
4659 * server.c (main): Avoid yet another case of infinite loop while
4660 detaching/killing after a longjmp.
4661
e825046f
JK
46622012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4663
4664 Code cleanup.
4665 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4666
b9e7b9c3
UW
46672012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4668
4669 * hostio.c (handle_readlink): New function.
4670 (handle_vFile): Call it to handle "vFile:readlink" packets.
4671
901f9912
UW
46722012-01-20 Pedro Alves <palves@redhat.com>
4673 Ulrich Weigand <ulrich.weigand@linaro.org>
4674
4675 * server.c (handle_v_requests): Only support vAttach and vRun to
4676 start multiple processes when in extended protocol mode.
4677
fc1ab1a0
PA
46782012-01-17 Pedro Alves <palves@redhat.com>
4679
4680 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4681 memalign plus mprotect to allocate the scratch buffer.
4682
7d5d4e98
PA
46832012-01-13 Pedro Alves <palves@redhat.com>
4684
4685 * server.c (attach_inferior): Clear `cont_thread'.
4686
f128d5e9
PA
46872012-01-13 Pedro Alves <palves@redhat.com>
4688
4689 * server.c (main): Avoid infinite loop while detaching/killing
4690 after a longjmp.
4691
06db92f0
DE
46922012-01-09 Doug Evans <dje@google.com>
4693
4694 * server.c (start_inferior): Set last_ptid in --wrapper case.
4695
32d92999
YQ
46962012-01-06 Yao Qi <yao@codesourcery.com>
4697
4698 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4699 defined.
4700 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4701
5e0a92a9
YQ
47022012-01-04 Yao Qi <yao@codesourcery.com>
4703
4704 * tracepoint.c (cmd_qtdp): Print debug message
4705 for static tracepoint.
4706
ae639e8c
YQ
47072012-01-04 Yao Qi <yao@codesourcery.com>
4708
4709 * tracepoint.c (trace_vdebug): Differentiate debug message
4710 between gdbserver and IPA.
4711
f72429c5
YQ
47122012-01-03 Yao Qi <yao@codesourcery.com>
4713
4714 * tracepoint.c (tracepoint_was_hit): Don't collect for
4715 static tracepoint.
4716
12c3e59c
JB
47172012-01-02 Joel Brobecker <brobecker@adacore.com>
4718
4719 * terminal.h: Reformat copyright header.
4720
67827812
JB
47212012-01-02 Joel Brobecker <brobecker@adacore.com>
4722
4723 * server.c (gdbserver_version): Update copyright year.
4724 * gdbreplay.c (gdbreplay_version): Likewise.
4725
3e52c33d
JK
47262011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4727
4728 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4729
4730 Revert:
4731 2011-12-18 Hui Zhu <teawater@gmail.com>
4732 * linux-low.c (linux_create_inferior): Save return value to ret.
4733
66f1260e
HZ
47342011-12-18 Hui Zhu <teawater@gmail.com>
4735
4736 * linux-low.c (linux_create_inferior): Save return value to ret.
4737
e77616d7
DE
47382011-12-16 Doug Evans <dje@google.com>
4739
e7b06c57
DE
4740 * linux-low.c (linux_create_inferior): If stdio connection,
4741 redirect stdin from /dev/null, stdout to stderr.
4742 * remote-utils.c (remote_is_stdio): New static global.
4743 (remote_connection_is_stdio): New function.
4744 (remote_prepare): Handle stdio connection.
4745 (remote_open): Ditto.
4746 (remote_close): Don't close stdin for stdio connections.
4747 (read_prim,write_prim): New functions. Replace all calls to
4748 read/write to these.
4749 * server.c (main): Watch for "-" argument. Move call to
4750 remote_prepare before start_inferior.
4751 * server.h (STDIO_CONNECTION_NAME): New macro.
4752 (remote_connection_is_stdio): Declare.
4753
e77616d7
DE
4754 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4755 in debugging output.
4756
82067193
YQ
47572011-12-15 Yao Qi <yao@codesourcery.com>
4758
4759 * tracepoint.c: Include sys/syscall.h.
4760 (gdb_ust_thread): Remove preprocessor conditional.
4761
82bfbe7e
PA
47622011-12-14 Pedro Alves <pedro@codesourcery.com>
4763
4764 * linux-low.c (linux_detach_one_lwp): Call
4765 the_low_target.prepare_to_resume before detaching.
4766
712c6575
YQ
47672011-12-14 Yao Qi <yao@codesourcery.com>
4768
4769 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4770 of write.
4771
d54d1edf
YQ
47722011-12-14 Yao Qi <yao@codesourcery.com>
4773
4774 * i386-low.c (i386_low_stopped_data_address): Initialize local
4775 variable `control'.
4776
6210a125
PA
47772011-12-13 Pedro Alves <pedro@codesourcery.com>
4778
4779 PR remote/13492
4780
4781 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4782 DR_CONTROL unless necessary. Extend comments.
4783 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4784 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4785
2ece8244
YQ
47862011-12-13 Yao Qi <yao@codesourcery.com>
4787
4788 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4789 macros.
4790 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4791
784867a5
JK
47922011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4793
4794 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4795 Print new debug message for such case.
4796
6bf36717
JK
47972011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4798
4799 Fix overlapping memcpy.
4800 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4801 the read_inferior_memory transfer.
4802 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4803 write_inferior_memory transfer.
4804 (set_fast_tracepoint_jump): New variable buf. Use it for the
4805 read_inferior_memory and write_inferior_memory transfers.
4806 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4807 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4808 Use it for the write_inferior_memory transfer.
4809 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4810 buffers.
4811
50275556
MR
48122011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4813
4814 * linux-low.c (fetch_register, store_register): Make code
4815 consistent, fix formatting.
4816
7325beb4
MR
48172011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4818
4819 * linux-low.c (usr_store_inferior_registers): Factor out code
4820 to handle individual registers into...
4821 (store_register): ... this new function.
4822
c642a434
UW
48232011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4824
4825 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4826 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4827 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4828 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4829 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4830 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4831 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4832 (srv_xmlfiles): Add new XML files.
4833
4834 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4835 and <sys/uio.h>.
4836 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4837 (init_registers_s390_linux32v1): Add prototype.
4838 (init_registers_s390_linux32v2): Likewise.
4839 (init_registers_s390_linux64v1): Likewise.
4840 (init_registers_s390_linux64v2): Likewise.
4841 (init_registers_s390x_linux64v1): Likewise.
4842 (init_registers_s390x_linux64v2): Likewise.
4843 (s390_num_regs): Increment to 52.
4844 (s390_regmap): Add orig_r2 register.
4845 (s390_num_regs_3264): Increment to 68.
4846 (s390_regmap_3264): Add orig_r2 register.
4847 (s390_collect_ptrace_register): Handle orig_r2 register.
4848 (s390_supply_ptrace_register): Likewise.
4849 (s390_fill_last_break): New function.
4850 (s390_store_last_break): Likewise.
4851 (s390_fill_system_call): New function.
4852 (s390_store_system_call): Likewise.
4853 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4854 register sets.
4855 (s390_check_regset): New function.
4856 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4857 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4858 Update target_regsets for available register sets.
4859
2268b414
JK
48602011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4861 Jan Kratochvil <jan.kratochvil@redhat.com>
4862
4863 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4864 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4865 New.
4866 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4867 * linux-low.h (struct process_info_private): New member r_debug.
4868 * server.c (handle_qxfer_libraries): Call
4869 the_target->qxfer_libraries_svr4.
4870 (handle_qxfer_libraries_svr4): New function.
4871 (qxfer_packets): New entry "libraries-svr4".
4872 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4873 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4874 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4875 PACKET_qXfer_libraries_svr4.
4876
d6db1fab
UW
48772011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4878
4879 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4880 PSW address/mask between 8-byte and 16-byte formats.
4881 (s390_supply_ptrace_register): Likewise.
4882 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4883 basic addressing mode bit.
4884
242f5f1c
SS
48852011-11-24 Stan Shebs <stan@codesourcery.com>
4886
4887 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4888
f196051f
SS
48892011-11-17 Stan Shebs <stan@codesourcery.com>
4890
4891 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4892 (tracing_start_time): New global.
4893 (tracing_stop_time): New global.
4894 (tracing_user_name): New global.
4895 (tracing_notes): New global.
4896 (tracing_stop_note): New global.
4897 (cmd_qtstart): Set traceframe_usage, start_time.
4898 (stop_tracing): Set stop_time.
4899 (cmd_qtstatus): Report additional status.
4900 (cmd_qtp): New function.
4901 (handle_tracepoint_query): Call it.
4902 (cmd_qtnotes): New function.
4903 (handle_tracepoint_general_set): Call it.
4904 (get_timestamp): Rename from tsv_get_timestamp.
4905
405f8e94
SS
49062011-11-14 Stan Shebs <stan@codesourcery.com>
4907 Kwok Cheung Yeung <kcy@codesourcery.com>
4908
4909 * linux-x86-low.c (small_jump_insn): New.
4910 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4911 trampoline and error message, build a trampoline and issue a small
4912 jump instruction to it.
4913 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4914 trampoline and error message.
4915 (x86_get_min_fast_tracepoint_insn_len): New.
4916 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4917 * linux-low.h (struct linux_target_ops): Add arguments to
4918 install_fast_tracepoint_jump_pad operation, add new operation.
4919 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4920 arguments.
4921 (linux_get_min_fast_tracepoint_insn_len): New function.
4922 (linux_target_op): Add new operation.
4923 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4924 (gdb_trampoline_buffer_end): Ditto.
4925 (gdb_trampoline_buffer_error): Ditto.
4926 (struct ipa_sym_addresses): Add fields for new IPA variables.
4927 (symbol_list): Add entries for new IPA variables.
4928 (struct tracepoint): Add fields to hold the address range of the
4929 trampoline used by the tracepoint.
4930 (trampoline_buffer_head): New static variable.
4931 (trampoline_buffer_tail): Ditto.
4932 (claim_trampoline_space): New function.
4933 (have_fast_tracepoint_trampoline_buffer): New function.
4934 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4935 structure.
4936 (install_fast_tracepoint): Ditto, also add error buffer argument.
4937 (cmd_qtminftpilen): New function.
4938 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4939 (fast_tracepoint_from_trampoline_address): New function.
4940 (fast_tracepoint_collecting): Handle trampoline as part of jump
4941 pad space.
4942 (set_trampoline_buffer_space): New function.
4943 (initialize_tracepoint): Initialize new IPA variables.
4944 * target.h (struct target_ops): Add arguments to
4945 install_fast_tracepoint_jump_pad operation, add new
4946 get_min_fast_tracepoint_insn_len operation.
4947 (target_get_min_fast_tracepoint_insn_len): New.
4948 (install_fast_tracepoint_jump_pad): Add arguments.
4949 * server.h (IPA_BUFSIZ): Define.
4950 * linux-i386-ipa.c: Include extra header files.
4951 (initialize_fast_tracepoint_trampoline_buffer): New function.
4952 (initialize_low_tracepoint): Call it.
4953 * server.h (set_trampoline_buffer_space): Declare.
4954 (claim_trampoline_space): Ditto.
4955 (have_fast_tracepoint_trampoline_buffer): Ditto.
4956
1e4d1764
YQ
49572011-11-14 Yao Qi <yao@codesourcery.com>
4958
4959 * server.c (handle_query): Handle InstallInTrace for qSupported.
4960 * tracepoint.c (add_tracepoint): Sort list.
4961 (install_tracepoint, download_tracepoint): New.
4962 (cmd_qtdp): Call them to install and download tracepoints.
4963 (sort_tracepoints): Removed.
4964 (cmd_qtstart): Update.
4965
5c73ff4e
YQ
49662011-11-14 Yao Qi <yao@codesourcery.com>
4967
4968 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4969 * mem-break.h: Declare.
4970 * tracepoint.c (cmd_qtstart): Move some code to ...
4971 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4972 New.
4973 (download_tracepoints): Move some code to ...
4974 (download_tracepoint_1): ... here. New.
4975
86a30030
YQ
49762011-11-08 Yao Qi <yao@codesourcery.com>
4977
4978 * remote-utils.c (relocate_instruction): A comment fix.
4979
8d26e50c
JB
49802011-11-07 Joel Brobecker <brobecker@adacore.com>
4981
4982 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4983 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4984 dr_status_mirror and dr_control_mirror from debug_reg_state.
4985 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4986 (i386_initial_stuff): Remove use of deleted globals.
4987 (i386_get_thread_context, i386_set_thread_context,
4988 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4989 from debug_reg_state.
4990
a59306a3
YQ
49912011-11-05 Yao Qi <yao@codesourcery.com>
4992
4993 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4994 address as TPOINT's.
4995
3065dfb6
SS
49962011-11-02 Stan Shebs <stan@codesourcery.com>
4997
4998 * tracepoint.c (agent_mem_read_string): New function.
4999 (eval_agent_expr): Call it for tracenz.
5000 * server.c (handle_query): Report support for tracenz.
5001
fd0d8c7c
YQ
50022011-11-02 Yao Qi <yao@codesourcery.com>
5003
5004 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5005
609086b1
YQ
50062011-11-02 Yao Qi <yao@codesourcery.com>
5007
5008 * target.h: Fix a typo in comment.
5009
b9fd1791
PA
50102011-10-31 Pedro Alves <pedro@codesourcery.com>
5011
5012 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5013 clobber the breakpoints' shadows with fast tracepoint jumps.
5014 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5015 * target.c (write_inferior_memory): Also pass MYADDR down to
5016 check_mem_write.
5017
03583c20
UW
50182011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5019
5020 * configure.ac: Check support for personality routine.
5021 * configure: Regenerate.
5022 * config.in: Likewise.
5023 * linux-low.c: Include <sys/personality.h>.
5024 Define ADDR_NO_RANDOMIZE if necessary.
5025 (linux_create_inferior): Disable address space randomization when
5026 forking inferior, if requested.
5027 (linux_supports_disable_randomization): New function.
5028 (linux_target_ops): Install it.
5029 * server.h (disable_randomization): Declare.
5030 * server.c (disable_randomization): New global variable.
5031 (handle_general_set): Handle QDisableRandomization.
5032 (handle_query): Likewise for qSupported.
5033 (main): Support --disable-randomization and --no-disable-randomization
5034 command line arguments.
5035 * target.h (struct target_ops): Add supports_disable_randomization.
5036 (target_supports_disable_randomization): New macro.
5037
723b724b
MF
50382011-09-29 Mike Frysinger <vapier@gentoo.org>
5039
5040 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5041 ifdef check.
5042 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5043 [!PT_GETDSBT] (target_loadmap): New definition.
5044 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5045 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5046 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5047 and PT_GETDSBT to LINUX_LOADMAP.
5048 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5049 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5050
55329a5c 50512011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5052
5053 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5054 (arm_linux_hwbp_cap): New static variable.
5055 (arm_linux_get_hwbp_cap): Replace by ...
5056 (arm_linux_init_hwbp_cap): ... this new function.
5057 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5058 (arm_linux_get_hw_watchpoint_count): Likewise.
5059 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5060 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5061 (arm_prepare_to_resume): Use perror_with_name instead of error.
5062
55329a5c 50632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5064
5065 * linux-arm-low.c: Include <signal.h>.
5066 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5067 (struct arm_linux_hwbp_cap): New data type.
5068 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5069 (struct arm_linux_hw_breakpoint): New data type.
5070 (MAX_BPTS, MAX_WPTS): Define.
5071 (struct arch_process_info, struct arch_lwp_info): New data types.
5072 (arm_linux_get_hwbp_cap): New function.
5073 (arm_linux_get_hw_breakpoint_count): Likewise.
5074 (arm_linux_get_hw_watchpoint_count): Likewise.
5075 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5076 (arm_hwbp_control_initialize): Likewise.
5077 (arm_hwbp_control_is_enabled): Likewise.
5078 (arm_hwbp_control_is_initialized): Likewise.
5079 (arm_hwbp_control_disable): Likewise.
5080 (arm_linux_hw_breakpoint_equal): Likewise.
5081 (arm_linux_hw_point_initialize): Likewise.
5082 (struct update_registers_data): New data structure.
5083 (update_registers_callback: New function.
5084 (arm_insert_point): Likewise.
5085 (arm_remove_point): Likewise.
5086 (arm_stopped_by_watchpoint): Likewise.
5087 (arm_stopped_data_address): Likewise.
5088 (arm_new_process): Likewise.
5089 (arm_new_thread): Likewise.
5090 (arm_prepare_to_resume): Likewise.
5091 (the_low_target): Register arm_insert_point, arm_remove_point,
5092 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5093 arm_new_thread, and arm_prepare_to_resume.
5094
6b9801d4
SS
50952011-09-15 Stan Shebs <stan@codesourcery.com>
5096
5097 * server.h (struct emit_ops): Add compare-goto fields.
5098 * tracepoint.c (gdb_agent_op_sizes): New table.
5099 (emit_eq_goto): New function.
5100 (emit_ne_goto): New function.
5101 (emit_lt_goto): New function.
5102 (emit_le_goto): New function.
5103 (emit_gt_goto): New function.
5104 (emit_ge_goto): New function.
5105 (is_goto_target): New function.
5106 (compile_bytecodes): Recognize special cases of compare-goto
5107 combinations and call specialized emitters for them.
5108 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5109 (amd64_emit_ne_goto): New function.
5110 (amd64_emit_lt_goto): New function.
5111 (amd64_emit_le_goto): New function.
5112 (amd64_emit_gt_goto): New function.
5113 (amd64_emit_ge_goto): New function.
5114 (amd64_emit_ops): Add the new functions.
5115 (i386_emit_eq_goto): New function.
5116 (i386_emit_ne_goto): New function.
5117 (i386_emit_lt_goto): New function.
5118 (i386_emit_le_goto): New function.
5119 (i386_emit_gt_goto): New function.
5120 (i386_emit_ge_goto): New function.
5121 (i386_emit_ops): Add the new functions.
5122
bf15cbda
SS
51232011-09-08 Stan Shebs <stan@codesourcery.com>
5124
5125 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5126 (i386_emit_epilogue): Restore %ebx.
5127
943ca1dd
JZ
51282011-08-31 Jie Zhang <jzhang918@gmail.com>
5129
5130 * server.c (step_thread): Remove definition.
5131 (process_serial_event): Don't handle Hs.
5132 * server.h (step_thread): Remove declaration.
5133 * target.c (set_desired_inferior): Remove use of step_thread.
5134
e3deef73
LM
51352011-08-24 Luis Machado <lgustavo@codesourcery.com>
5136
5137 * linux-low.c: Include linux-procfs.h.
5138 (linux_attach_lwp_1): Update comments.
5139 (linux_attach): Scan for existing threads when attaching to a
5140 process that is the tgid.
5141 * Makefile.in: Update dependencies.
5142
13da1c97
LM
51432011-08-24 Luis Machado <lgustavo@codesourcery.com>
5144
5145 * configure.srv: Add linux-procfs.o dependencies.
5146
881127c9
YQ
51472011-08-14 Yao Qi <yao@codesourcery.com>
5148
5149 * target.h (struct target_ops): Fix indent.
5150 * win32-low.c (win32_target_ops): Fix comment.
5151
58dbd541
YQ
51522011-08-14 Andrew Jenner <andrew@codesourcery.com>
5153 Yao Qi <yao@codesourcery.com>
5154
5155 * Makefile.in (clean): Remove tic6x-*.c files.
5156 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5157 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5158 (tic6x-c64xp-linux.c): Likewise.
5159 * configure.srv: Add support for tic6x-*-uclinux.
5160 * linux-tic6x-low.c: New.
5161 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5162
78d85199
YQ
51632011-08-14 Andrew Stubbs <ams@codesourcery.com>
5164 Yao Qi <yao@codesourcery.com>
5165
5166 * target.h (struct target_ops): Add read_loadmap.
5167 * linux-low.c (struct target_loadseg): New type.
5168 (struct target_loadmap): New type.
5169 (linux_read_loadmap): New function.
5170 (linux_target_ops): Add linux_read_loadmap.
5171 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5172 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5173 to NULL.
78d85199 5174
a959a88d
EZ
51752011-08-05 Eli Zaretskii <eliz@gnu.org>
5176
5177 * win32-low.c: Include <stdint.h>.
5178
1ced966e
PA
51792011-07-22 Pedro Alves <pedro@codesourcery.com>
5180
5181 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5182 to the inferior here.
5183 (i386_remove_aligned_watchpoint): Ditto.
5184 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5185 fit part of the watchpoint in the debug registers.
5186 (i386_update_inferior_debug_regs): New.
5187 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5188 registers, and only update the inferior on success.
5189 (i386_low_remove_watchpoint): Ditto.
5190
d26e3629
KY
51912011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5192
5193 * linux-low.c (compare_ints, unique, list_threads, show_process,
5194 linux_core_of_thread): Delete.
5195 (linux_target_ops): Change linux_core_of_thread to
5196 linux_common_core_of_thread.
5197 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5198 * utils.c (malloc_failure): Change type of argument.
5199 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5200 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5201 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5202 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5203 (IPA_OBJS): Add common-utils-ipa.o.
5204 (ptid_h, linux_osdata_h): New macros.
5205 (server_h): Add common/common-utils.h, common/xml-utils.h,
5206 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5207 common/ptid.h.
5208 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5209 ptid.o, buffer.o): New rules.
5210 (linux-low.o): Add common/linux-osdata.h as a dependency.
5211 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5212 * configure.ac: Add AC_HEADER_DIRENT check.
5213 * config.in: Regenerate.
5214 * configure: Regenerate.
5215 * remote-utils.c (xml_escape_text): Delete.
5216 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5217 buffer_xml_printf): Move to common/buffer.c.
5218 * server.c (main): Remove call to initialize_inferiors.
5219 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5220 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5221 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5222 internal_error, gdb_assert, gdb_assert_fail): Delete.
5223 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5224 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5225 common/buffer.h.
5226 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5227 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5228 initialize_inferiors): Delete.
5229
2275a1a7
PA
52302011-07-20 Pedro Alves <pedro@codesourcery.com>
5231
5232 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5233 symbol error.
5234
0a5b1e09
PA
52352011-05-31 Pedro Alves <pedro@codesourcery.com>
5236
5237 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5238 assertion.
5239 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5240
6938fd34
YQ
52412011-05-26 Yao Qi <yao@codesourcery.com>
5242
5243 * Makefile.in (thread-db.o): Track dependence to
5244 common/gdb_thread_db.h.
5245 * thread-db.c: include gdb_thread_db.h from right place.
5246
b481f9e0
TT
52472011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5248
5249 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5250 __FILE__ and __LINE__ to internal_error.
5251
98a5dd13
DE
52522011-05-13 Doug Evans <dje@google.com>
5253
5254 * thread-db.c (try_thread_db_load_from_sdir): New function.
5255 (try_thread_db_load_from_dir): New function.
5256 (thread_db_load_search): Handle $sdir, ignore $pdir.
5257 Remove trying of system directories if search of
5258 libthread-db-search-path fails, that is now done via $sdir.
5259
d248b706
KY
52602011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5261
5262 * server.c (handle_query): Add EnableDisableTracepoints to the list
5263 of supported features.
43aaf8b6 5264 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5265 tracepoints.
43aaf8b6
PA
5266 (cmd_qtenable_disable): New.
5267 (cmd_qtstart): Install tracepoints even if disabled.
5268 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5269 receiving a QTEnable or QTDisable packet.
5270 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5271 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5272 tracepoints.
5273 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5274
84e578fb
DE
52752011-05-10 Doug Evans <dje@google.com>
5276
5277 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5278
71f55dd8
DE
52792011-05-04 Doug Evans <dje@google.com>
5280
5281 * linux-low.c (linux_join): Skip process lookup.
5282 * spu-low.c (spu_join): Ditto.
5283 * server.c (join_inferiors_callback): Delete.
5284 (process_serial_event): For 'D' packet (detach) call join_inferior
5285 directly.
5286
4d393d60
JM
52872011-05-04 Joseph Myers <joseph@codesourcery.com>
5288
5289 * README: Don't mention xscale*-*-linux*.
5290 * configure.srv (xscale*-*-linux*): Don't handle target.
5291
b00ad6ff
NF
52922011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5293
5294 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5295 casting pointers.
5296 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5297 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5298 (i386_emit_void_call_2): Likewise.
5299
af96c192
YQ
53002011-04-26 Yao Qi <yao@codesourcery.com>
5301
43aaf8b6
PA
5302 * linux-low.c: Move common macros to linux-ptrace.h.
5303 Include linux-ptrace.h.
af96c192
YQ
5304 * Makefile.in (linux_ptrace_h): New.
5305 (linux-low.o): Depends on linux-ptrace.h.
5306
03f2bd59
JK
53072011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5308
5309 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5310 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5311 (remote_prepare): New function with most of the TCP code from ...
5312 (remote_open): ... here. Detect PORT here unconditionally. Move also
5313 setting transport_is_reliable.
5314 * server.c (run_once): New variable.
5315 (gdbserver_usage): Document it.
5316 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5317 the first run if RUN_ONCE.
5318 * server.h (run_once, remote_prepare): New declarations.
5319
7a9dd1b2
TT
53202011-04-19 Tom Tromey <tromey@redhat.com>
5321
5322 * win32-low.c (handle_load_dll): Remove duplicate "the".
5323
81239425
PM
53242011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5325
5326 Remove support for old Cygwin 1.5 versions.
5327 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5328 function to avoid warning.
5329 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5330 warning.
5331
9e0627f1
PM
53322011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5333
5334 * gdbserver/server.h (Macro _): Define it if not available.
5335
588eebee
MS
53362011-03-14 Michael Snyder <msnyder@vmware.com>
5337
348af9f7 5338 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5339
43f70d4c
JB
53402011-03-10 Joel Brobecker <brobecker@adacore.com>
5341
5342 * Makefile.in (maintainer-clean realclean distclean): Remove
5343 "make ... subdir_do" command.
5344
348af9f7
MS
53452011-03-10 Michael Snyder <msnyder@vmware.com>
5346
5347 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5348
5349 * server.c (handle_v_run): Free alloced buffer on early return.
5350
e637a4f5
YQ
53512011-03-09 Yao Qi <yao@codesourcery.com>
5352
5353 Revert:
5354 2011-03-04 Yao Qi <yao@codesourcery.com>
5355
5356 * Makefile.in: Remove GNU make feature --directory.
5357
5358 2011-03-05 Yao Qi <yao@codesourcery.com>
5359
5360 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5361 (subdir_do): New make target. Copied from gdb/Makefile.
5362 (maintainer-clean, realclean, distclean, clean): Call corresponding
5363 make targets in common/Makefile.
5364
5365 2011-02-11 Yao Qi <yao@codesourcery.com>
5366
5367 * configure.ac: Call AC_PROG_RANLIB.
5368 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5369 * configure: Regenerate.
5370
e6edda56
JK
53712011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5372
5373 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5374
e5141119
JB
53752011-03-06 Yao Qi <yao@codesourcery.com>
5376
5377 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5378
64794aa4
JB
53792011-03-05 Yao Qi <yao@codesourcery.com>
5380
5381 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5382 (subdir_do): New make target. Copied from gdb/Makefile.
5383 (maintainer-clean, realclean, distclean, clean): Call corresponding
5384 make targets in common/Makefile.
5385
7a762829
YQ
53862011-03-04 Yao Qi <yao@codesourcery.com>
5387
5388 * Makefile.in: Remove GNU make feature --directory.
5389
348af9f7
MS
53902011-03-04 Michael Snyder <msnyder@vmware.com>
5391
5392 * server.c (queue_stop_reply): Call xmalloc not malloc.
5393
53942011-03-02 Michael Snyder <msnyder@vmware.com>
5395
5396 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5397
9f72fee2
MS
53982011-02-28 Michael Snyder <msnyder@vmware.com>
5399
588eebee
MS
5400 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5401 (cmd_qtframe): Ditto.
5402 (cmd_qtbuffer): Ditto.
5403 (cmd_bigqtbuffer): Ditto.
5404
9f72fee2
MS
5405 * utils.c (decimal2str): Initialize 'width' to nine, then
5406 don't mess with it.
5407
8040bd49
UW
54082011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5409
5410 * hostio.c (require_data): Free *data, not data.
5411
7e52cbd0
JK
54122011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5413
5414 * hostio.c (require_data): Use free, not xfree.
5415
9130f83e
MS
54162011-02-27 Michael Snyder <msnyder@vmware.com>
5417
4b812f4e
MS
5418 * server.c (handle_query): Discard unused value.
5419
9130f83e
MS
5420 * hostio.c (require_data): Free malloc memory before returning
5421 error.
5422
69d37113
MS
54232011-02-26 Michael Snyder <msnyder@vmware.com>
5424
5425 * linux-low.c (list_threads): Call closedir for dirent.
5426
35f5825a
MS
54272011-02-27 Michael Snyder <msnyder@vmware.com>
5428
2a589cef
MS
5429 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5430 a case statement falls through.
5431
0adea5f7
MS
5432 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5433
35f5825a
MS
5434 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5435 in comparison.
5436
238f1c74
MS
54372011-02-26 Michael Snyder <msnyder@vmware.com>
5438
5439 * utils.c (decimal2str): Eliminate dead code and dead param.
5440 (pulongest): Drop dead param from call to decimal2str.
5441 (plongest): Ditto.
5442
633ff500
JB
54432011-02-24 Joel Brobecker <brobecker@adacore.com>
5444
5445 Revert the following patch (not approved yet):
5446 2011-02-21 Hui Zhu <teawater@gmail.com>
5447 * tracepoint.c (tp_printf): New function.
5448 (eval_agent_expr): Handle gdb_agent_op_printf.
5449
f9c6ff72
HZ
54502011-02-21 Hui Zhu <teawater@gmail.com>
5451
5452 * tracepoint.c (tp_printf): New function.
5453 (eval_agent_expr): Handle gdb_agent_op_printf.
5454
94d5e490
TT
54552011-02-18 Tom Tromey <tromey@redhat.com>
5456
5457 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5458 (tracepoint.o): Likewise.
5459 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5460 (gdb_agent_op_names): Likewise.
5461
c7f96d2b
TT
54622011-02-18 Tom Tromey <tromey@redhat.com>
5463
5464 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5465 gdb_agent_op_rot>: New constants.
5466 (gdb_agent_op_names): Add pick and roll.
5467 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5468 cases.
5469
0feedb2c
JK
54702011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5471
5472 * aclocal.m4: Regenerated with aclocal-1.11.1.
5473
b3b9301e
PA
54742011-02-14 Pedro Alves <pedro@codesourcery.com>
5475
5476 * server.c (handle_qxfer_traceframe_info): New.
5477 (qxfer_packets): Register "traceframe-info".
5478 (handle_query): Report support for qXfer:traceframe-info:read+.
5479 * tracepoint.c (match_blocktype): New.
5480 (traceframe_find_block_type): Rename to ...
5481 (traceframe_walk_blocks): ... this. Add callback filter argument,
5482 and use it.
5483 (traceframe_find_block_type): New, reimplemented on top of
5484 traceframe_walk_blocks.
5485 (build_traceframe_info_xml): New.
5486 (traceframe_read_info): New.
5487 * server.h (traceframe_read_info): Declare.
5488
4f3e6fb7
YQ
54892011-02-11 Yao Qi <yao@codesourcery.com>
5490
5491 * configure.ac: Call AC_PROG_RANLIB.
5492 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5493 * configure: Regenerate.
5494
764880b7
PA
54952011-02-07 Pedro Alves <pedro@codesourcery.com>
5496
5497 * server.c (gdb_read_memory): Change return semantics to allow
5498 partial transfers.
5499 (handle_search_memory_1): Adjust.
5500 (process_serial_event) <'m' packet>: Handle partial transfers.
5501 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5502
1c79eb8a
PA
55032011-01-28 Pedro Alves <pedro@codesourcery.com>
5504
5505 * regcache.c (init_register_cache): Initialize
5506 regcache->register_status.
5507 (free_register_cache): Release regcache->register_status.
5508 (regcache_cpy): Copy register_status.
5509 (registers_to_string): Print 'x's for unavailable registers.
5510 (supply_register): Mark the register's status valid or
5511 unavailable, depending on whether a buffer was passed in or not.
5512 (supply_register_zeroed): New.
5513 (supply_regblock): Mark the registers' status valid or
5514 unavailable, depending on whether a buffer was passed in or not.
5515 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5516 (struct regcache): New `register_status' field.
5517 (supply_register_zeroed): Declare.
5518 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5519 supply_register_zeroed, rather than passing a NULL buffer to
5520 supply_register.
5521 * tracepoint.c (fetch_traceframe_registers): Update comment.
5522
85724a0e
PA
55232011-01-28 Pedro Alves <pedro@codesourcery.com>
5524
5525 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5526 buffer explicit.
5527
d08aafef
PA
55282011-01-25 Pedro Alves <pedro@codesourcery.com>
5529
5530 * server.h (decode_xfer_write): Change prototype.
5531 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5532 and don't extract the annex here.
5533 * server.c (decode_xfer_read): Remove `annex' parameter,
5534 and don't extract the annex here.
5535 (decode_xfer): New.
5536 (struct qxfer): New.
5537 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5538 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5539 (handle_qxfer_statictrace): New functions, abstracted out from
5540 handle_query, and made to use the struct qxfer interface.
5541 (handle_threads_qxfer_proper): Rename to ...
5542 (handle_qxfer_threads_proper): ... this.
5543 (handle_threads_qxfer): Rename to ...
5544 (handle_qxfer_threads): ... this. Adjust.
5545 (qxfer_packets): New array.
5546 (handle_qxfer): New function.
5547 (handle_query): Use handle_qxfer.
5548
493e2a69
MS
55492011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5550
5551 * gdbreplay.c: Shorten lines of >= 80 columns.
5552 * linux-low.c: Ditto.
5553 * linux-ppc-low.c: Ditto.
5554 * linux-s390-low.c: Ditto.
5555 * linux-sparc-low.c: Ditto.
5556 * linux-x86-low.c: Ditto.
5557 * linux-xtensa-low.c: Ditto.
5558 * mem-break.c: Ditto.
5559 * nto-low.c: Ditto.
5560 * regcache.h: Ditto.
5561 * remote-utils.c: Ditto.
5562 * server.c: Ditto.
5563 * server.h: Ditto.
5564 * thread-db.c: Ditto.
5565 * tracepoint.c: Ditto.
5566 * utils.c: Ditto.
5567 * win32-low.h: Ditto.
5568
44944448
JB
55692011-01-05 Joel Brobecker <brobecker@adacore.com>
5570
5571 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5572 update.
5573
71ce852c
JB
55742011-01-01 Joel Brobecker <brobecker@adacore.com>
5575
5576 * server.c (gdbserver_version): Update copyright year in version
5577 output.
5578 * gdbreplay.c (gdbreplay_version): Ditto.
5579
eb826dc6
MF
55802010-12-29 Jie Zhang <jie.zhang@analog.com>
5581
5582 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5583 * linux-bfin-low.c: New file.
5584 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5585 PT_DATA_ADDR for BFIN targets.
5586 * Makefile.in (SFILES): Add linux-bfin-low.c.
5587 (clean): Remove reg-bfin.c.
5588 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5589 * README: Mention supported Blackfin targets.
5590
39ab222a
MF
55912010-12-23 Mike Frysinger <vapier@gentoo.org>
5592
5593 * .gitignore: New file.
5594
a1f2ce7d
MF
55952010-11-16 Mike Frysinger <vapier@gentoo.org>
5596
5597 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5598
f474844c
JZ
55992010-10-22 Jie Zhang <jie@codesourcery.com>
5600
5601 * Makefile.in: Add FLAGS_TO_PASS variable.
5602 (install): Remove dependency of install-only and recursively
5603 invoke make for install-only.
5604
f1048712
DE
56052010-10-04 Doug Evans <dje@google.com>
5606
5607 * Makefile.in (uninstall): Use $(DESTDIR).
5608
b53a1623
PA
56092010-09-24 Pedro Alves <pedro@codesourcery.com>
5610
e6ee044d
PA
5611 PR gdb/11842
5612
b53a1623
PA
5613 * linux-x86-low.c (compat_siginfo_from_siginfo)
5614 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5615 si_code is < 0. Check for si_code == SI_TIMER before checking for
5616 si_code < 0.
5617
fa1bd1e4
JB
56182010-09-13 Joel Brobecker <brobecker@adacore.com>
5619
5620 * lynx-i386-low.c: New file.
5621 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5622
47fac8f8
JB
56232010-09-13 Joel Brobecker <brobecker@adacore.com>
5624
5625 * lynx-low.c (ptrace_request_to_str): Remove handling for
5626 request values that have been removed in LynxOS 5.x.
5627
1adfc54d
JB
56282010-09-13 Joel Brobecker <brobecker@adacore.com>
5629
5630 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5631 <ptrace.h>
5632
c2a66c29
NS
56332010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5634
5635 * configure.ac: Add --enable-inprocess-agent option.
5636 * configure: Rebuilt.
5637
32fcada3
YQ
56382010-09-06 Yao Qi <yao@codesourcery.com>
5639
5640 * linux-low.c (linux_kill): Remove unused variable.
5641 (linux_stabilize_threads): Likewise.
5642 * server.c (start_inferior): Likewise.
5643 (queue_stop_reply_callback): Likewise.
5644 * tracepoint.c (do_action_at_tracepoint): Likewise.
5645
0cccb683
YQ
56462010-09-06 Yao Qi <yao@codesourcery.com>
5647
5648 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5649 on return.
5650
423ec54c
JK
56512010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5652
5653 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5654
12ac6819
PA
56552010-09-06 Pedro Alves <pedro@codesourcery.com>
5656
5657 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5658 "$(IPA_DEPFILES)".
5659
8ed54b31
JB
56602010-09-01 Joel Brobecker <brobecker@adacore.com>
5661
5662 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5663 gdbserver/lynx-ppc-low.c: New files.
5664 * Makefile.in (lynx_low_h): New variable.
5665 (lynx-low.o, lynx-ppc-low.o): New rules.
5666 * configure.ac: On LynxOS, link with -lnetinet.
5667 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5668 * configure: regenerate.
5669
bb0116a4
JB
56702010-09-01 Joel Brobecker <brobecker@adacore.com>
5671
5672 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5673 * configure.ac: Add check for vasprintf and vsnprintf.
5674 * configure, config.in: Regenerate.
5675 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5676
a778ab81 56772010-09-01 Joel Brobecker <brobecker@adacore.com>
5678
5679 * gdbreplay.c: Move include of alloca.h up, next to include of
5680 malloc.h.
5681 * server.h: Add include of malloc.h.
5682 * mem-break.c: Remove include of malloc.h.
5683 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5684
8b034a19 56852010-09-01 Joel Brobecker <brobecker@adacore.com>
5686
5687 * Makefile.in (memmem.o): Build with -Wno-error.
5688
56892010-09-01 Joel Brobecker <brobecker@adacore.com>
5690
5691 * utils.c (xsnprintf): Make non-static.
5692 * server.h: Add xsnprintf declaration.
5693 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5694 replace calls to snprintf by calls to xsnprintf throughout.
5695
56962010-09-01 Joel Brobecker <brobecker@adacore.com>
5697
5698 * configure.ac: Add configure check for alloca.
5699 * configure, config.in: Regenerate.
5700 * server.h: Include alloca.h if it exists.
5701 * gdbreplay.c: Include alloca.h if it exists.
5702
1a981360
PA
57032010-08-28 Pedro Alves <pedro@codesourcery.com>
5704
5705 * linux-low.c (__SIGRTMIN): Define if not already defined.
5706 (linux_create_inferior): Check for __ANDROID__ rather than
5707 __SIGRTMIN.
5708 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5709 are already deferred.
5710 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5711 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5712 stopped and already has a pending signal to report.
5713 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5714 a pending signal to report or is moving out of a jump pad.
5715 (linux_init_signals): Check for __ANDROID__ rather than
5716 __SIGRTMIN.
5717
b4d51a55
PA
57182010-08-28 Pedro Alves <pedro@codesourcery.com>
5719
5720 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5721 debug_threads check. Avoid a linear search when not doing debug
5722 output.
5723
ec48365d
PA
57242010-08-27 Pedro Alves <pedro@codesourcery.com>
5725
5726 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5727 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5728 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5729 (process_event): Change local fd's type to gdb_fildes_t.
5730 (create_file_handler): Adjust prototype.
5731 (delete_file_handler): Adjust prototype.
5732 (handle_file_event): Adjust prototype. Use pfildes.
5733 (create_file_event): Adjsut prototype.
5734 * remote-utils.c (remote_desc, listen_desc): Change type to
5735 gdb_fildes_t.
5736 * server.h: New gdb_fildes_t typedef.
5737 [USE_WIN32API]: Include winsock2.h.
5738 (delete_file_handler, add_file_handler): Adjust prototypes.
5739 (pfildes): Declare.
5740 * utils.c (pfildes): New.
5741
854d88f0
PA
57422010-08-27 Pedro Alves <pedro@codesourcery.com>
5743
5744 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5745 * configure: Regenerate.
5746
0146f85b
PA
57472010-08-27 Pedro Alves <pedro@codesourcery.com>
5748
5749 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5750 (linux_done_accessing_memory): ... this.
5751 (linux_target_ops): Adjust.
5752 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5753 * nto-low.c (nto_target_ops): Adjust comment.
5754 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5755 * spu-low.c (spu_target_ops): Adjust comment.
5756 * target.h (target_ops): Rename unprepare_to_access_memory field
5757 to done_accessing_memory.
5758 (unprepare_to_access_memory): Rename to ...
5759 (done_accessing_memory): ... this.
5760
90d74c30
PA
57612010-08-26 Pedro Alves <pedro@codesourcery.com>
5762
5763 * linux-low.c (linux_prepare_to_access_memory): New.
5764 (linux_unprepare_to_access_memory): New.
5765 (linux_target_ops): Install them.
5766 * server.c (read_memory): Rename to ...
5767 (gdb_read_memory): ... this. Use
5768 prepare_to_access_memory/prepare_to_access_memory.
5769 (write_memory): Rename to ...
5770 (gdb_write_memory): ... this. Use
5771 prepare_to_access_memory/prepare_to_access_memory.
5772 (handle_search_memory_1): Adjust.
5773 (process_serial_event): Adjust.
5774 * target.h (struct target_ops): New fields
5775 prepare_to_access_memory and unprepare_to_access_memory.
5776 (prepare_to_access_memory, unprepare_to_access_memory): New.
5777 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5778 prepare_to_access_memory/prepare_to_access_memory.
5779 * nto-low.c (nto_target_ops): Adjust.
5780 * spu-low.c (spu_target_ops): Adjust.
5781 * win32-low.c (win32_target_ops): Adjust.
5782
fd467969
PA
57832010-08-26 Pedro Alves <pedro@codesourcery.com>
5784
5785 * Makefile.in (WARN_CFLAGS): Get it from configure.
5786 (WERROR_CFLAGS): New.
5787 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5788 * configure.ac: Introduce --enable-werror, which adds -Werror to
5789 the compiler command line. Enabled by default. Disable with
5790 --disable-werror. Add -Wdeclaration-after-statement
5791 Wpointer-arith and -Wformat-nonliteral to warning flags.
5792 * configure: Regenerate.
5793
331e2f5f
PA
57942010-08-26 Pedro Alves <pedro@codesourcery.com>
5795
5796 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5797
e581f2b4
PA
57982010-08-26 Pedro Alves <pedro@codesourcery.com>
5799
5800 * gdbreplay.c (remote_error): New.
5801 (gdbchar): New.
5802 (expect): Use gdbchar. Check for error reading from GDB.
5803 Clarify sync error output.
5804 (play): Check for errors writing to GDB.
5805 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5806 * remote-utils.c (getpkt): Check for errors writing to the remote
5807 descriptor.
5808
3c11dd79
PA
58092010-08-25 Pedro Alves <pedro@codesourcery.com>
5810
5811 * linux-low.c (linux_wait_1): Move non-debugging code out of
5812 `debug_threads' control.
5813
d20a8ad9
PA
58142010-08-25 Pedro Alves <pedro@codesourcery.com>
5815
5816 * linux-low.c (linux_wait_1): Don't set last_status here.
5817 * server.c (push_event, queue_stop_reply_callback): Assert we're
5818 not pushing a TARGET_WAITKIND_IGNORE event.
5819 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5820 (myresume, handle_target_event): Set the thread's last_resume_kind
5821 and last_status from the target returned status.
5822
964e4306
PA
58232010-08-25 Pedro Alves <pedro@codesourcery.com>
5824
5825 PR threads/10729
5826
5827 * linux-x86-low.c (update_debug_registers_callback): New.
5828 (i386_dr_low_set_addr): Use it.
5829 (i386_dr_low_get_addr): New.
5830 (i386_dr_low_set_control): Use update_debug_registers_callback.
5831 (i386_dr_low_get_control): New.
5832 (i386_dr_low_get_status): Adjust.
5833 * linux-low.c (linux_stop_lwp): New.
5834 * linux-low.h (linux_stop_lwp): Declare.
5835
5836 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5837 argument instead of a i386_debug_reg_state.
5838 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5839 a i386_debug_reg_state.
5840 (i386_insert_aligned_watchpoint): Adjust.
5841 (i386_remove_aligned_watchpoint): Adjust.
5842 (i386_low_stopped_data_address): Read the debug registers from the
5843 inferior instead of from the mirrors.
5844 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5845 (i386_dr_low_get_addr): Declare.
5846 (i386_dr_low_get_control): Declare.
5847 (i386_dr_low_get_status): Change prototype.
5848
5849 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5850 (i386_dr_low_get_addr): New.
5851 (i386_dr_low_get_control): New.
5852 (i386_dr_low_get_status): Adjust prototype. Return
5853 dr_status_mirror.
5854 (i386_initial_stuff): Clear dr_status_mirror and
5855 dr_control_mirror.
5856 (i386_get_thread_context): Adjust.
5857 (i386_set_thread_context): Adjust.
5858 (i386_thread_added): Adjust.
5859
5f21a75b
PA
58602010-08-24 Pedro Alves <pedro@codesourcery.com>
5861
5862 * linux-low.h (linux_thread_area): Delete declaration.
5863
3e4c1235
TS
58642010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5865
5866 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5867 after its termination.
5868
1971b033
PA
58692010-08-09 Pedro Alves <pedro@codesourcery.com>
5870
5871 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5872 (gdb_wants_all_stopped): Delete.
5873 (linux_wait_1): Don't call them.
5874 * server.c (handle_v_cont): Tag all threads as want-stopped.
5875 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5876 stopped as "client-wants-stopped".
5877
310444ac
PA
58782010-07-31 Pedro Alves <pedro@codesourcery.com>
5879
5880 * Makefile.in (signals_h): New.
5881 (server_h): Depend on it.
5882 (server.o): Don't depend on $(signals_def).
5883 (signals.o): Depend on $(signals_def).
5884
a19cae16
JK
58852010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5886
5887 * Makefile.in (signals_def): New.
5888 (server_h): Append include/gdb/signals.h and signals_def.
5889 (server.o): Append signals_def.
5890
30d50328
JK
58912010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5892
5893 * server.c (handle_target_event): Use target_signal_to_host for
5894 resume_info.sig initialization.
5895 * target.h (struct thread_resume) <sig>: New comment.
5896
5c3216e2
OS
58972010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5898
c6f46ca0
OS
5899 * server.c (handle_query): strcpy() the returned string from paddress()
5900 instead of sprintf().
5c3216e2
OS
5901 * utils.c (paddress): Return phex_nz().
5902
6bd31874
JB
59032010-07-07 Joel Brobecker <brobecker@adacore.com>
5904
5905 * server.c (handle_v_cont): Call mourn_inferior if process
5906 just exited.
5907 (myresume): Likewise.
5908
0fb4aa4b
PA
59092010-07-01 Pedro Alves <pedro@codesourcery.com>
5910
5911 Static tracepoints, and integration with UST.
5912
5913 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5914 * mem-break.c (uninsert_all_breakpoints)
5915 (reinsert_all_breakpoints): New.
5916 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5917 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5918 (gdb_agent_ust_loaded, helper_thread_id)
5919 (gdb_agent_helper_thread_id): New macros.
5920 (struct ipa_sym_addresses): Add addr_ust_loaded,
5921 addr_helper_thread_id, addr_cmd_buf.
5922 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5923 (in_process_agent_loaded_ust): New.
5924 (write_e_ust_not_loaded): New.
5925 (maybe_write_ipa_ust_not_loaded): New.
5926 (struct collect_static_trace_data_action): New.
5927 (enum tracepoint_type) <static_tracepoint>: New.
5928 (struct tracepoint) <handle>: Mention static tracepoints.
5929 (struct static_tracepoint_ctx): New.
5930 (CMD_BUF_SIZE): New.
5931 (add_tracepoint_action): Handle static tracepoint actions.
5932 (unprobe_marker_at): New.
5933 (clear_installed_tracepoints): Handle static tracepoints.
5934 (cmd_qtdp): Handle static tracepoints.
5935 (probe_marker_at): New.
5936 (cmd_qtstart): Handle static tracepoints.
5937 (response_tracepoint): Handle static tracepoints.
5938 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5939 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5940 (get_context_regcache): Handle static tracepoints.
5941 (do_action_at_tracepoint): Handle static tracepoint actions.
5942 (traceframe_find_block_type): Handle static trace data blocks.
5943 (traceframe_read_sdata): New.
5944 (download_tracepoints): Download static tracepoint actions.
5945 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5946 (GDB_PROBE_NAME): New.
5947 (ust_ops): New.
5948 (GET_UST_SYM): New.
5949 (USTF): New.
5950 (dlsym_ust): New.
5951 (ust_marker_to_static_tracepoint): New.
5952 (gdb_probe): New.
5953 (collect_ust_data_at_tracepoint): New.
5954 (gdb_ust_probe): New.
5955 (UNIX_PATH_MAX, SOCK_DIR): New.
5956 (gdb_ust_connect_sync_socket): New.
5957 (resume_thread, stop_thread): New.
5958 (run_inferior_command): New.
5959 (init_named_socket): New.
5960 (gdb_ust_socket_init): New.
5961 (cstr_to_hexstr): New.
5962 (next_st): New.
5963 (first_marker, next_marker): New.
5964 (response_ust_marker): New.
5965 (cmd_qtfstm, cmd_qtsstm): New.
5966 (unprobe_marker_at, probe_marker_at): New.
5967 (cmd_qtstmat, gdb_ust_thread): New.
5968 (gdb_ust_init): New.
5969 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5970 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5971 (ST_REGENTRY): New.
5972 (x86_64_st_collect_regmap): New.
5973 (X86_64_NUM_ST_COLLECT_GREGS): New.
5974 (AMD64_RIP_REGNUM): New.
5975 (supply_static_tracepoint_registers): New.
5976 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5977 (ST_REGENTRY): New.
5978 (i386_st_collect_regmap): New.
5979 (i386_NUM_ST_COLLECT_GREGS): New.
5980 (supply_static_tracepoint_registers): New.
5981 * server.c (handle_query): Handle qXfer:statictrace:read.
5982 <qSupported>: Report support for StaticTracepoints, and
5983 qXfer:statictrace:read features.
5984 * server.h (traceframe_read_sdata)
5985 (supply_static_tracepoint_registers): Declare.
5986 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5987 (unpack_varlen_hex): Include in IPA build.
5988 * Makefile.in (ustlibs, ustinc): New.
5989 (IPA_OBJS): Add remote-utils-ipa.o.
5990 ($(IPA_LIB)): Link -ldl and -lpthread.
5991 (UST_CFLAGS): New.
5992 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5993 * config.in, configure: Regenerate.
5994
9e4344e5
PA
59952010-06-20 Ian Lance Taylor <iant@google.com>
5996 Pedro Alves <pedro@codesourcery.com>
5997
5998 * linux-x86-low.c (always_true): Delete.
5999 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6000 trying to fool the compiler with always_true.
6001
c6beb2cb
PA
60022010-06-20 Pedro Alves <pedro@codesourcery.com>
6003
6004 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6005 conditions in gdbserver.
6006
d2ed6730
UW
60072010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6008
6009 * spu-low.c (spu_read_memory): Wrap around local store limit.
6010 (spu_write_memory): Likewise.
6011
4e29fb54
PA
60122010-06-15 Pedro Alves <pedro@codesourcery.com>
6013
6014 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6015 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6016 LONGEST uses.
6017 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6018 uses.
6019 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6020 uses with LONGEST uses.
6021
6a271cae
PA
60222010-06-14 Stan Shebs <stan@codesourcery.com>
6023 Pedro Alves <pedro@codesourcery.com>
6024
6025 Bytecode compiler.
6026
6027 * linux-x86-low.c: Include limits.h.
6028 (add_insns): New.
6029 (always_true): New.
6030 (EMIT_ASM): New.
6031 (EMIT_ASM32): New.
6032 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6033 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6034 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6035 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6036 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6037 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6038 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6039 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6040 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6041 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6042 (amd64_emit_void_call_2): New.
6043 (amd64_emit_ops): New.
6044 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6045 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6046 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6047 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6048 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6049 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6050 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6051 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6052 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6053 (i386_emit_stack_adjust, i386_emit_int_call_1)
6054 (i386_emit_void_call_2): New.
6055 (i386_emit_ops): New.
6056 (x86_emit_ops): New.
6057 (the_low_target): Install x86_emit_ops.
6058 * server.h (struct emit_ops): New.
6059 (get_raw_reg_func_addr): Declare.
6060 (current_insn_ptr, emit_error): Declare.
6061 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6062 (set_trace_state_variable_value): New defines.
6063 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6064 addr_get_trace_state_variable_value and
6065 addr_set_trace_state_variable_value.
6066 (symbol_list): New fields for get_raw_reg,
6067 get_trace_state_variable_value and set_trace_state_variable_value.
6068 (condfn): New typedef.
6069 (struct tracepoint): New field `compiled_cond'.
6070 (do_action_at_tracepoint): Clear compiled_cond.
6071 (get_trace_state_variable_value, set_trace_state_variable_value):
6072 Export in the IPA.
6073 (condition_true_at_tracepoint): If there's a compiled condition,
6074 run that.
6075 (current_insn_ptr, emit_error): New globals.
6076 (struct bytecode_address): New.
6077 (get_raw_reg_func_addr): New.
6078 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6079 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6080 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6081 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6082 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6083 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6084 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6085 (compile_tracepoint_condition, compile_bytecodes): New.
6086 * target.h (emit_ops): Forward declare.
6087 (struct target_ops): New field emit_ops.
6088 (target_emit_ops): New.
6089 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6090 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6091 * linux-low.c (linux_emit_ops): New.
6092 (linux_target_ops): Install it.
6093 * linux-low.h (struct linux_target_ops): New field emit_ops.
6094
92b72907
UW
60952010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6096
6097 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6098 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6099
fa593d66
PA
61002010-06-01 Pedro Alves <pedro@codesourcery.com>
6101 Stan Shebs <stan@codesourcery.com>
6102
6103 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6104 (all): Depend on $(extra_libraries).
6105 (install-only): Install the IPA.
6106 (IPA_OBJS, IPA_LIB): New.
6107 (clean): Remove the IPA lib.
6108 (IPAGENT_CFLAGS): New.
6109 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6110 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6111 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6112 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6113 * configure.ac: Check for atomic builtins support in the compiler.
6114 (IPA_DEPFILES, extra_libraries): Define.
6115 * configure.srv (ipa_obj): Add description.
6116 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6117 (i[34567]86-*-linux*): Set ipa_obj.
6118 (x86_64-*-linux*): Set ipa_obj.
6119 * linux-low.c (stabilizing_threads): New.
6120 (supports_fast_tracepoints): New.
6121 (linux_detach): Stabilize threads before detaching.
6122 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6123 the lwp is either not stabilizing, or is moving out of a jump pad.
6124 (linux_fast_tracepoint_collecting): New.
6125 (maybe_move_out_of_jump_pad): New.
6126 (enqueue_one_deferred_signal): New.
6127 (dequeue_one_deferred_signal): New.
6128 (linux_wait_for_event_1): If moving out of a jump pad, defer
6129 pending signals to later.
6130 (linux_stabilize_threads): New.
6131 (linux_wait_1): Check if threads need moving out of jump pads, and
6132 do it if so.
6133 (stuck_in_jump_pad_callback): New.
6134 (move_out_of_jump_pad_callback): New.
6135 (lwp_running): New.
6136 (linux_resume_one_lwp): Handle moving out of jump pads.
6137 (linux_set_resume_request): Dequeue deferred signals.
6138 (need_step_over_p): Also step over fast tracepoint jumps.
6139 (start_step_over): Also uninsert fast tracepoint jumps.
6140 (finish_step_over): Also reinsert fast tracepoint jumps.
6141 (linux_install_fast_tracepoint_jump): New.
6142 (linux_target_ops): Install linux_stabilize_threads and
6143 linux_install_fast_tracepoint_jump_pad.
6144 * linux-low.h (linux_target_ops) <get_thread_area,
6145 install_fast_tracepoint_jump_pad>: New fields.
6146 (struct lwp_info) <collecting_fast_tracepoint,
6147 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6148 (linux_get_thread_area): Declare.
6149 * linux-x86-low.c (jump_insn): New.
6150 (x86_get_thread_area): New.
6151 (append_insns): New.
6152 (push_opcode): New.
6153 (amd64_install_fast_tracepoint_jump_pad): New.
6154 (i386_install_fast_tracepoint_jump_pad): New.
6155 (x86_install_fast_tracepoint_jump_pad): New.
6156 (the_low_target): Install x86_get_thread_area and
6157 x86_install_fast_tracepoint_jump_pad.
6158 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6159 (struct fast_tracepoint_jump): New.
6160 (fast_tracepoint_jump_insn): New.
6161 (fast_tracepoint_jump_shadow): New.
6162 (find_fast_tracepoint_jump_at): New.
6163 (fast_tracepoint_jump_here): New.
6164 (delete_fast_tracepoint_jump): New.
6165 (set_fast_tracepoint_jump): New.
6166 (uninsert_fast_tracepoint_jumps_at): New.
6167 (reinsert_fast_tracepoint_jumps_at): New.
6168 (set_breakpoint_at): Use write_inferior_memory.
6169 (uninsert_raw_breakpoint): Use write_inferior_memory.
6170 (check_mem_read): Mask out fast tracepoint jumps.
6171 (check_mem_write): Mask out fast tracepoint jumps.
6172 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6173 (set_fast_tracepoint_jump): Declare.
6174 (delete_fast_tracepoint_jump)
6175 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6176 (reinsert_fast_tracepoint_jumps_at): Declare.
6177 * regcache.c: Don't compile many functions when building the
6178 in-process agent library.
6179 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6180 the register buffer in the heap.
6181 (free_register_cache): If the register buffer isn't owned by the
6182 regcache, don't free it.
6183 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6184 pre-existing register caches.
6185 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6186 type.
6187 (convert_ascii_to_int): : Constify `from' parameter type.
6188 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6189 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6190 the needed buffer in-place.
6191 (relocate_instruction): New.
6192 * server.c (handle_query) <qSymbols>: If the target supports
6193 tracepoints, give it a chance of looking up symbols. Report
6194 support for fast tracepoints.
6195 (handle_status): Stabilize threads.
6196 (process_serial_event): Adjust.
6197 * server.h (struct fast_tracepoint_jump): Forward declare.
6198 (struct process_info) <fast_tracepoint_jumps>: New field.
6199 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6200 (decode_X_packet, decode_M_packet): Adjust.
6201 (relocate_instruction): Declare.
6202 (in_process_agent_loaded): Declare.
6203 (tracepoint_look_up_symbols): Declare.
6204 (struct fast_tpoint_collect_status): Declare.
6205 (fast_tracepoint_collecting): Declare.
6206 (force_unlock_trace_buffer): Declare.
6207 (handle_tracepoint_bkpts): Declare.
6208 (initialize_low_tracepoint)
6209 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6210 * target.h (struct target_ops) <stabilize_threads,
6211 install_fast_tracepoint_jump_pad>: New fields.
6212 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6213 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6214 [HAVE_STDINT_H]: Include stdint.h.
6215 (trace_debug_1): Rename to ...
6216 (trace_vdebug): ... this.
6217 (trace_debug): Rename to ...
6218 (trace_debug_1): ... this. Add `level' parameter.
6219 (trace_debug): New.
6220 (ATTR_USED, ATTR_NOINLINE): New.
6221 (IP_AGENT_EXPORT): New.
6222 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6223 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6224 (about_to_request_buffer_space, trace_buffer_is_full)
6225 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6226 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6227 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6228 (traceframe_write_count, traceframes_created)
6229 (trace_state_variables)
6230 New renaming defines.
6231 (struct ipa_sym_addresses): New.
6232 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6233 (symbol_list): New.
6234 (ipa_sym_addrs): New.
6235 (all_tracepoint_symbols_looked_up): New.
6236 (in_process_agent_loaded): New.
6237 (write_e_ipa_not_loaded): New.
6238 (maybe_write_ipa_not_loaded): New.
6239 (tracepoint_look_up_symbols): New.
6240 (debug_threads) [IN_PROCESS_AGENT]: New.
6241 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6242 (UNKNOWN_SIDE_EFFECTS): New.
6243 (stop_tracing): New.
6244 (flush_trace_buffer): New.
6245 (stop_tracing_bkpt): New.
6246 (flush_trace_buffer_bkpt): New.
6247 (read_inferior_integer): New.
6248 (read_inferior_uinteger): New.
6249 (read_inferior_data_pointer): New.
6250 (write_inferior_data_pointer): New.
6251 (write_inferior_integer): New.
6252 (write_inferior_uinteger): New.
6253 (struct collect_static_trace_data_action): Delete.
6254 (enum tracepoint_type): New.
6255 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6256 <actions_str, step_actions, step_actions_str>: Only include in
6257 GDBserver.
fa593d66
PA
6258 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6259 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6260 (tracepoints): Use IP_AGENT_EXPORT.
6261 (last_tracepoint): Don't include in the IPA.
6262 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6263 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6264 (alloced_trace_state_variables): New.
6265 (trace_state_variables): Use IP_AGENT_EXPORT.
6266 (traceframe_t): Delete unused variable.
6267 (circular_trace_buffer): Don't include in the IPA.
6268 (trace_buffer_start): Delete.
6269 (struct trace_buffer_control): New.
6270 (trace_buffer_free): Delete.
6271 (struct ipa_trace_buffer_control): New.
6272 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6273 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6274 New.
6275 (trace_buffer_ctrl): New.
6276 (TRACE_BUFFER_CTRL_CURR): New.
6277 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6278 Reimplement as macros.
6279 (trace_buffer_wrap): Delete.
6280 (traceframe_write_count, traceframe_read_count)
6281 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6282 (struct tracepoint_hit_ctx) <type>: New field.
6283 (struct fast_tracepoint_ctx): New.
6284 (memory_barrier): New.
6285 (cmpxchg): New.
6286 (record_tracepoint_error): Update atomically in the IPA.
6287 (clear_inferior_trace_buffer): New.
6288 (about_to_request_buffer_space): New.
6289 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6290 updating the same buffer.
6291 (add_tracepoint): Default the tracepoint's type to trap
6292 tracepoint, and orig_size to -1.
6293 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6294 internal variables.
6295 (create_trace_state_variable): New parameter `gdb'. Handle it.
6296 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6297 (cmd_qtdp): Handle fast tracepoints.
6298 (cmd_qtdv): Adjust.
6299 (max_jump_pad_size): New.
6300 (gdb_jump_pad_head): New.
6301 (get_jump_space_head): New.
6302 (claim_jump_space): New.
6303 (sort_tracepoints): New.
6304 (MAX_JUMP_SIZE): New.
6305 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6306 IPA.
6307 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6308 support. Upload fast traceframes, and delete internal IPA
6309 breakpoints.
6310 (stop_tracing_handler): New.
6311 (flush_trace_buffer_handler): New.
6312 (cmd_qtstop): Upload fast tracepoints.
6313 (response_tracepoint): Handle fast tracepoints.
6314 (tracepoint_finished_step): Upload fast traceframes. Set the
6315 tracepoint hit context's tracepoint type.
6316 (handle_tracepoint_bkpts): New.
6317 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6318 type. Add comment about fast tracepoints.
6319 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6320 non-existing action_str field.
6321 (get_context_regcache): Handle fast tracepoints.
6322 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6323 to the regcache.
6324 (fast_tracepoint_from_jump_pad_address): New.
6325 (fast_tracepoint_from_ipa_tpoint_address): New.
6326 (collecting_t): New.
6327 (force_unlock_trace_buffer): New.
6328 (fast_tracepoint_collecting): New.
6329 (collecting): New.
6330 (gdb_collect): New.
6331 (write_inferior_data_ptr): New.
6332 (target_tp_heap): New.
6333 (target_malloc): New.
6334 (download_agent_expr): New.
6335 (UALIGN): New.
6336 (download_tracepoints): New.
6337 (download_trace_state_variables): New.
6338 (upload_fast_traceframes): New.
6339 (IPA_FIRST_TRACEFRAME): New.
6340 (IPA_NEXT_TRACEFRAME_1): New.
6341 (IPA_NEXT_TRACEFRAME): New.
6342 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6343 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6344 (gdb_jump_pad_buffer_end): New.
6345 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6346 (initialize_tracepoint): Adjust.
6347 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6348 buffer. Initialize the low module.
6349 * utils.c (PREFIX, TOOLNAME): New.
6350 (malloc_failure): Use PREFIX.
6351 (error): In the IPA, an error causes an exit.
6352 (fatal, warning): Use PREFIX.
6353 (internal_error): Use TOOLNAME.
6354 (NUMCELLS): Increase to 10.
6355 * configure, config.in: Regenerate.
6356
d149dd1d
PA
63572010-06-01 Pedro Alves <pedro@codesourcery.com>
6358
6359 * server.c (handle_query) <qSupported>: Do two passes over the
6360 qSupported string to avoid nesting strtok.
6361
f6528abd
JK
63622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6363
6364 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6365 (CDEPS): New.
6366 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6367 -Wl,--dynamic-list.
6368 * configure: Regenerate.
6369 * proc-service.list: New.
6370
ca2a87a0
JK
63712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6372
6373 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6374 New comment.
6375
363a6e9f
OS
63762010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6377
6378 * gdbreplay.c (remote_open): Check error return from socket() call by
6379 its equality to -1 not by it being negative.
6380 * remote-utils.c (remote_open): Likewise.
6381
d23b6cb1
PA
63822010-05-23 Pedro Alves <pedro@codesourcery.com>
6383
6384 * config.h: Regenerate.
6385
28d3cf85
MK
63862010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6387
6388 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6389 doesn't provide PTRACE_GET_THREAD_AREA.
6390
fea36a59
MK
63912010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6392
6393 * linux-m68k-low.c: Include <asm/ptrace.h>
6394 (ps_get_thread_area): Implement.
6395
24b066ba
DE
63962010-05-03 Doug Evans <dje@google.com>
6397
6398 * event-loop.c (struct callback_event): New struct.
6399 (callback_list): New global.
6400 (append_callback_event, delete_callback_event): New functions.
6401 (process_callback): New function.
6402 (start_event_loop): Call it.
6403 * remote-utils.c (NOT_SCHEDULED): Define.
6404 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6405 moved out of readchar.
6406 (readchar): Rewrite. Call reschedule before returning.
6407 (reset_readchar): New function.
6408 (remote_close): Call it.
6409 (process_remaining, reschedule): New functions.
6410 * server.h (callback_handler_func): New typedef.
6411 (append_callback_event, delete_callback_event): Declare.
6412
9836d6ea
PA
64132010-05-03 Pedro Alves <pedro@codesourcery.com>
6414
6415 * proc-service.c (ps_pglobal_lookup): Use
6416 thread_db_look_up_one_symbol.
6417 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6418 parameter. Use it instead of all_symbols_looked_up.
6419 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6420 field.
6421 (all_symbols_looked_up): Don't declare.
6422 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6423 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6424 field.
6425 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6426 Set all_symbols_looked_up here.
6427 (thread_db_look_up_one_symbol): New.
6428 (thread_db_get_tls_address): Adjust.
6429 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6430 thread_db object on the heap, and tentatively set it in the
6431 process structure.
6432 (thread_db_init): Don't set all_symbols_looked_up here.
6433 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6434
7984d532
PA
64352010-05-03 Pedro Alves <pedro@codesourcery.com>
6436
6437 * linux-low.c (linux_kill, linux_detach): Adjust.
6438 (status_pending_p_callback): Remove redundant statement. Check
6439 for !TARGET_WAITIKIND_IGNORE, instead of
6440 TARGET_WAITKIND_STOPPED.
6441 (handle_tracepoints): Make sure LWP is locked. Adjust.
6442 (linux_wait_for_event_1): Adjust.
6443 (linux_cancel_breakpoints): New.
6444 (unsuspend_one_lwp): New.
6445 (unsuspend_all_lwps): New.
6446 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6447 (send_sigstop_callback): Change return type to int, add new
6448 `except' parameter and handle it.
6449 (suspend_and_send_sigstop_callback): New.
6450 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6451 pass them down. If SUSPEND, also increment the lwp's suspend
6452 count.
6453 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6454 (need_step_over_p): Don't consider suspended LWPs.
6455 (start_step_over): Adjust.
6456 (proceed_one_lwp): Change return type to int, add new `except'
6457 parameter and handle it.
6458 (unsuspend_and_proceed_one_lwp): New.
6459 (proceed_all_lwps): Use find_inferior instead of
6460 for_each_inferior.
6461 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6462 also decrement the suspend count of LWPs. Pass `except' down,
6463 instead of hacking its suspend count.
6464 (linux_pause_all): Add `freeze' parameter. Adjust.
6465 (linux_unpause_all): New.
6466 (linux_target_ops): Install linux_unpause_all.
6467 * server.c (handle_status): Adjust.
6468 * target.h (struct target_ops): New fields `unpause_all' and
6469 `cancel_breakpoints'. Add new parameter to `pause_all'.
6470 (pause_all): Add new `freeze' parameter.
6471 (unpause_all): New.
6472 (cancel_breakpoints): New.
6473 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6474 cancel breakpoints.
6475 (cmd_qtstart): Pause threads.
6476 (stop_tracing): Pause threads, and cancel breakpoints.
6477 * win32-low.c (win32_target_ops): Adjust.
6478
e471f25b
PA
64792010-05-03 Pedro Alves <pedro@codesourcery.com>
6480
6481 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6482 the inferior right away from here...
6483 (linux_wait_1): ... to here, and adjust to check the thread's
6484 last_resume_kind instead of the lwp's step or stop_expected flags.
6485
1915ef4f
PA
64862010-05-02 Pedro Alves <pedro@codesourcery.com>
6487
6488 * README: Use consistent `GDB' and `GDBserver' spellings.
6489
f9e39928
PA
64902010-05-02 Pedro Alves <pedro@codesourcery.com>
6491
6492 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6493 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6494 (linux_detach_one_lwp): Assume the lwp is stopped.
6495 (any_thread_of): Delete.
6496 (linux_detach): Stop all lwps here. Don't blindly delete all
6497 breakpoints.
6498 (delete_lwp_callback): New.
6499 (linux_mourn): Delete all lwps of the process that is gone.
6500 (linux_wait_1): Don't delete the last lwp of the process here.
6501 * mem-break.h (mark_breakpoints_out): Declare.
6502 * mem-break.c (mark_breakpoints_out): New.
6503 (free_all_breakpoints): Use it.
6504 * server.c (handle_target_event): If the process is gone, mark
6505 breakpoints out.
6506 * thread-db.c (struct thread_db) <create_bp>: New field.
6507 (thread_db_enable_reporting): Fix prototype. Store a thread event
6508 breakpoint reference in the thread_db struct.
6509 (thread_db_load_search): Clear the thread_db object.
6510 (try_thread_db_load_1): Ditto.
6511 (switch_to_process): New.
6512 (disable_thread_event_reporting): Use it.
6513 (remove_thread_event_breakpoints): New.
6514 (thread_db_detach, thread_db_mourn): Use it.
6515
1e7fc18c
PA
65162010-05-01 Pedro Alves <pedro@codesourcery.com>
6517
6518 * linux-low.c (linux_enable_event_reporting): New.
6519 (linux_wait_for_event_1, handle_extended_wait): Use it.
6520
02fc4de7
PA
65212010-04-30 Pedro Alves <pedro@codesourcery.com>
6522
6523 * linux-low.c (linux_kill_one_lwp, linux_kill)
6524 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6525 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6526 SIGSTOP even if the LWP is stopped.
6527 (send_sigstop_callback): New.
6528 (stop_all_lwps): Use send_sigstop_callback instead.
6529 (linux_resume_one_thread): Adjust.
6530 (proceed_one_lwp): Still proceed an LWP that the client has
6531 requested to stop, if we haven't reported it as stopped yet. Make
6532 sure that LWPs the client want stopped, have a pending SIGSTOP.
6533
bc3b5632
DE
65342010-04-26 Doug Evans <dje@google.com>
6535
ae1ada35
DE
6536 * server.c (handle_general_set): Make static.
6537
bc3b5632
DE
6538 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6539 Print received char after testing for error/eof instead of before.
6540 (input_interrupt): Tweak comment.
6541
65730243
DE
65422010-04-23 Doug Evans <dje@google.com>
6543
6544 * server.c (start_inferior): Print inferior argv if --debug.
6545
a8ae7dc0
AR
65462010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6547
6548 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6549 * nto-x86-low.c: Include server.h
6550
1c07cc19
PM
65512010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6552
6553 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6554 be consistent with other sources of this directory.
6555 (init_registers_amd64): Correct name of source file of this function
6556 in the comment.
6557
e0a61e09
PM
65582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6559
6560 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6561 64-bit executables.
6562
54709339
PM
65632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6564
6565 * win32-i386-low.c: Add 64-bit support.
6566 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6567 (init_registers_amd64): Declare.
6568 (mappings): Add 64-bit version of array.
6569 (init_windows_x86): New function.
6570 (the_low_target): Change init_arch field to init_windows_x86.
6571
e8f0053d
PM
65722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6573
6574 * win32-low.c: Adapt to support also 64-bit architecture.
6575 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6576 (get_image_name): Use SIZE_T type for local variable `done'.
6577 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6578 (toolhelp_get_dll_name): Idem.
6579 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6580 Use uintptr_t typecast to avoid warning.
6581 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6582 (handle_exception): Use phex_nz to avoid warning.
6583 (win32_wait): Remove unused local variable `process'.
6584
c481e77e
PM
65852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6586
6587 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6588 `amd64-avx.o'.
6589
12ea4b69
PM
65902010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6591
6592 * configure.ac: Use `ws2_32' library for srv_mingw.
6593 * configure: Regenerate.
6594 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6595 * remote-utils.c: Likewise.
6596
f6d1620c
L
65972010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6598
6599 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6600 if __x86_64__ is defined.
6601
8e642873
PM
66022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6603
6604 * configure: Regenerate.
6605
711e434b
PM
66062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6607
6608 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6609 * target.h (target_ops): New get_tib_address field.
6610 * win32-low.h (win32_thread_info): Add thread_local_base field.
6611 * win32-low.c (child_add_thread): Add tlb argument.
6612 Set thread_local_base field to TLB.
6613 (get_child_debug_event): Adapt to child_add_thread change.
6614 (win32_get_tib_address): New function.
6615 (win32_target_ops): Set get_tib_address field to
6616 win32_get_tib_address.
6617 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6618
505106cd
PA
66192010-04-12 Pedro Alves <pedro@codesourcery.com>
6620
505106cd
PA
6621 * linux-low.c (linux_mourn): Also remove the process.
6622 * server.c (handle_target_event): Don't remove the process here.
6623 * nto-low.c (nto_mourn): New.
6624 (nto_target_ops): Install it.
6625 * spu-low.c (spu_mourn): New.
6626 (spu_target_ops): Install it.
6627 * win32-low.c (win32_mourn): New.
6628 (win32_target_ops): Install it.
6629
e8470a06
PA
66302010-04-12 Pedro Alves <pedro@codesourcery.com>
6631
6632 * server.h (buffer_xml_printf): Remove redundant `;'.
6633
45ba0d02
PA
66342010-04-12 Pedro Alves <pedro@codesourcery.com>
6635
6636 * regcache.c (set_register_cache): Invalidate regcaches before
6637 changing the register cache layout.
6638 (regcache_invalidate_one): Allow a NULL regcache.
6639 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6640 regcaches before changing the register cache layout or the target
6641 regsets.
6642
59e04013
L
66432010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6644
6645 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6646 variable warning on Linux/x86-64.
6647
8336d594
PA
66482010-04-11 Pedro Alves <pedro@codesourcery.com>
6649
6650 GDBserver disconnected tracing support.
6651
6652 * linux-low.c (linux_remove_process): Delete.
6653 (add_lwp): Don't set last_resume_kind here.
6654 (linux_kill): Use `mourn'.
6655 (linux_detach): Use `thread_db_detach', and `mourn'.
6656 (linux_mourn): New.
6657 (linux_attach_lwp_1): Adjust comment.
6658 (linux_attach): last_resume_kind moved the thread_info; adjust.
6659 (status_pending_p_callback): Adjust.
6660 (linux_wait_for_event_1): Adjust.
6661 (count_events_callback, select_singlestep_lwp_callback)
6662 (select_event_lwp_callback, cancel_breakpoints_callback)
6663 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6664 (proceed_one_lwp): Adjust.
6665 (linux_async): Add debug output.
6666 (linux_thread_stopped): New.
6667 (linux_pause_all): New.
6668 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6669 linux_pause_all.
6670 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6671 (thread_db_free): Delete declaration.
6672 (thread_db_detach, thread_db_mourn): Declare.
6673 * thread-db.c (thread_db_init): Use thread_db_mourn.
6674 (thread_db_free): Delete, split in two.
6675 (disable_thread_event_reporting): New.
6676 (thread_db_detach): New.
6677 (thread_db_mourn): New.
6678
6679 * server.h (struct thread_info) <last_resume_kind>: New field.
6680 <attached>: Add comment.
6681 <gdb_detached>: New field.
6682 (handler_func): Change return type to int.
6683 (handle_serial_event, handle_target_event): Ditto.
6684 (gdb_connected): Declare.
6685 (tracing): Delete.
6686 (disconnected_tracing): Declare.
6687 (stop_tracing): Declare.
6688
6689 * server.c (handle_query) <qSupported>: Report support for
6690 disconnected tracing.
6691 (queue_stop_reply_callback): Account for running threads.
6692 (gdb_wants_thread_stopped): New.
6693 (gdb_wants_all_threads_stopped): New.
6694 (gdb_reattached_process): New.
6695 (handle_status): Clear the `gdb_detached' flag of all processes.
6696 In all-stop, stop all threads.
6697 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6698 (process_serial_event): If the remote connection breaks, or if an
6699 exit was forced with "monitor exit", force an event loop exit.
6700 Handle disconnected tracing on detach.
6701 (handle_serial_event): Adjust.
6702 (handle_target_event): If GDB isn't connected, forward events back
6703 to the inferior, unless the last process exited, in which case,
6704 exit gdbserver. Adjust interface.
6705
6706 * remote-utils.c (remote_open): Don't block in accept. Instead
6707 register an event loop source on the listen socket file
6708 descriptor. Refactor bits into ...
6709 (listen_desc): ... this new global.
6710 (gdb_connected): ... this new function.
6711 (enable_async_notification): ... this new function.
6712 (handle_accept_event): ... this new function.
6713 (remote_close): Clear remote_desc.
6714
6715 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6716
6717 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6718 New fields.
6719 (mourn_inferior): Define.
6720 (target_process_qsupported): Avoid the dangling else problem.
6721 (thread_stopped): Define.
6722 (pause_all): Define.
6723 (target_waitstatus_to_string): Declare.
6724 * target.c (target_waitstatus_to_string): New.
6725
6726 * tracepoint.c (tracing): Make extern.
6727 (disconnected_tracing): New.
6728 (stop_tracing): Make extern. Handle tracing stops due to GDB
6729 disconnecting.
6730 (cmd_qtdisconnected): New.
6731 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6732 (handle_tracepoint_general_set): Handle QTDisconnected.
6733
6734 * event-loop.c (event_handler_func): Change return type to int.
6735 (process_event): Bail out if the event handler wants the event
6736 loop to stop.
6737 (handle_file_event): Ditto.
6738 (start_event_loop): Bail out if the event handler wants the event
6739 loop to stop.
6740
6741 * nto-low.c (nto_target_ops): Adjust.
6742 * spu-low.c (spu_wait): Don't remove the process here.
6743 (spu_target_ops): Adjust.
6744 * win32-low.c (win32_wait): Don't remove the process here.
6745 (win32_target_ops): Adjust.
6746
5d267c4c
PA
67472010-04-11 Pedro Alves <pedro@codesourcery.com>
6748
6749 * regcache.c (realloc_register_cache): Invalidate inferior's
6750 regcache before recreating it.
6751
623ccd72
PA
67522010-04-09 Pedro Alves <pedro@codesourcery.com>
6753
6754 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6755
219f2f23
PA
67562010-04-09 Stan Shebs <stan@codesourcery.com>
6757 Pedro Alves <pedro@codesourcery.com>
6758
6759 * server.h (LONGEST): New.
6760 (struct thread_info) <while_stepping>: New field.
6761 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6762 Declare.
6763 (initialize_tracepoint, handle_tracepoint_general_set)
6764 (handle_tracepoint_query, tracepoint_finished_step)
6765 (tracepoint_was_hit, release_while_stepping_state_list):
6766 (current_traceframe): Declare.
6767 * server.c (handle_general_set): Handle tracepoint packets.
6768 (read_memory): New.
6769 (write_memory): New.
6770 (handle_search_memory_1): Use read_memory.
6771 (handle_query): Report support for conditional tracepoints, trace
6772 state variables, and tracepoint sources. Handle tracepoint
6773 queries.
6774 (main): Initialize the tracepoints module.
6775 (process_serial_event): Handle traceframe reads/writes.
6776
6777 * linux-low.c (handle_tracepoints): New.
6778 (linux_wait_1): Call it.
6779 (linux_resume_one_lwp): Handle while-stepping.
6780 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6781 (linux_target_ops): Install them.
6782 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6783 New field.
6784 * linux-x86-low.c (x86_supports_tracepoints): New.
6785 (the_low_target). Install it.
6786
6787 * mem-break.h (delete_breakpoint): Declare.
6788 * mem-break.c (delete_breakpoint): Make external.
6789
6790 * target.h (struct target_ops): Add `supports_tracepoints',
6791 `read_pc', and `write_pc' fields.
6792 (target_supports_tracepoints): Define.
6793 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6794 (phex_nz): New.
6795
6796 * regcache.h (struct regcache) <registers_owned>: New field.
6797 (init_register_cache, regcache_cpy): Declare.
6798 (regcache_read_pc, regcache_write_pc): Declare.
6799 (register_cache_size): Declare.
6800 (supply_regblock): Declare.
6801 * regcache.c (init_register_cache): New.
6802 (new_register_cache): Use it.
6803 (regcache_cpy): New.
6804 (register_cache_size): New.
6805 (supply_regblock): New.
6806 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6807
219f2f23
PA
6808 * tracepoint.c: New.
6809
6810 * Makefile.in (OBS): Add tracepoint.o.
6811 (tracepoint.o): New rule.
6812
3a13a53b
L
68132010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6814
6815 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6816 (i386-mmx.o): New.
6817 (i386-mmx.c): Likewise.
6818 (i386-mmx-linux.o): Likewise.
6819 (i386-mmx-linux.c): Likewise.
6820
6821 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6822 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6823 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6824 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6825
6826 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6827 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6828 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6829
1570b33e
L
68302010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6831
6832 * Makefile.in (clean): Updated.
6833 (i386-avx.o): New.
6834 (i386-avx.c): Likewise.
6835 (i386-avx-linux.o): Likewise.
6836 (i386-avx-linux.c): Likewise.
6837 (amd64-avx.o): Likewise.
6838 (amd64-avx.c): Likewise.
6839 (amd64-avx-linux.o): Likewise.
6840 (amd64-avx-linux.c): Likewise.
6841
6842 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6843 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6844 (srv_amd64_regobj): Add amd64-avx.o.
6845 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6846 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6847 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6848 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6849 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6850 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6851 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6852
6853 * i387-fp.c: Include "i386-xstate.h".
6854 (i387_xsave): New.
6855 (i387_cache_to_xsave): Likewise.
6856 (i387_xsave_to_cache): Likewise.
6857 (x86_xcr0): Likewise.
6858
6859 * i387-fp.h (i387_cache_to_xsave): Likewise.
6860 (i387_xsave_to_cache): Likewise.
6861 (x86_xcr0): Likewise.
6862
6863 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6864 * linux-crisv32-low.c (target_regsets): Likewise.
6865 * linux-m68k-low.c (target_regsets): Likewise.
6866 * linux-mips-low.c (target_regsets): Likewise.
6867 * linux-ppc-low.c (target_regsets): Likewise.
6868 * linux-s390-low.c (target_regsets): Likewise.
6869 * linux-sh-low.c (target_regsets): Likewise.
6870 * linux-sparc-low.c (target_regsets): Likewise.
6871 * linux-xtensa-low.c (target_regsets): Likewise.
6872
6873 * linux-low.c: Include <sys/uio.h>.
6874 (regsets_fetch_inferior_registers): Support nt_type.
6875 (regsets_store_inferior_registers): Likewise.
6876 (linux_process_qsupported): New.
6877 (linux_target_ops): Add linux_process_qsupported.
6878
6879 * linux-low.h (regset_info): Add nt_type.
6880 (linux_target_ops): Add process_qsupported.
6881
6882 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6883 and <sys/uio.h>.
6884 (init_registers_i386_avx_linux): New.
6885 (init_registers_amd64_avx_linux): Likewise.
6886 (xmltarget_i386_linux_no_xml): Likewise.
6887 (xmltarget_amd64_linux_no_xml): Likewise.
6888 (PTRACE_GETREGSET): Likewise.
6889 (PTRACE_SETREGSET): Likewise.
6890 (x86_fill_xstateregset): Likewise.
6891 (x86_store_xstateregset): Likewise.
6892 (use_xml): Likewise.
6893 (x86_linux_update_xmltarget): Likewise.
6894 (x86_linux_process_qsupported): Likewise.
6895 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6896 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6897 init_registers_i386_linux here. Call
6898 x86_linux_update_xmltarget.
6899 (the_low_target): Add x86_linux_process_qsupported.
6900
6901 * server.c (handle_query): Call target_process_qsupported.
6902
6903 * target.h (target_ops): Add process_qsupported.
6904 (target_process_qsupported): New.
6905
fc7238bb
PA
69062010-04-03 Pedro Alves <pedro@codesourcery.com>
6907
6908 * inferiors.c (add_thread): Set last_status kind to
6909 TARGET_WAITKIND_IGNORE.
6910 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6911 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6912 (linux_wait_1): Move `thread' local definition to block that uses
6913 it. Don't NULL initialize `event_child'.
6914 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6915 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6916 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6917
bdabb078
PA
69182010-04-01 Pedro Alves <pedro@codesourcery.com>
6919
6920 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6921 an extended waitstatus, or by a watchpoint.
6922 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6923 thread was stepping or has been stopped by a watchpoint.
6924
d3bbe7a0
PA
69252010-04-01 Pedro Alves <pedro@codesourcery.com>
6926
6927 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6928 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6929 of another, then delete the previous, and validate all
6930 breakpoints.
6931 (validate_inserted_breakpoint): New.
6932 (delete_disabled_breakpoints): New.
6933 (validate_breakpoints): New.
6934 (check_mem_read): Validate breakpoints before trusting their
6935 shadow. Delete disabled breakpoints.
6936 (check_mem_write): Validate breakpoints before trusting they
6937 should be inserted. Delete disabled breakpoints.
6938 * mem-break.h (validate_breakpoints):
6939 * server.c (handle_query): Validate breakpoints when we see a
6940 qSymbol query.
6941
8b07ae33
PA
69422010-04-01 Pedro Alves <pedro@codesourcery.com>
6943
6944 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6945 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6946 if we could tell there's a GDB breakpoint at stop_pc.
6947 (need_step_over_p): Don't do a step over if we find a GDB
6948 breakpoint at the resume PC.
6949
6950 * mem-break.c (struct raw_breakpoint): New.
6951 (enum bkpt_type): New type `gdb_breakpoint'.
6952 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6953 fields. New field `raw'.
6954 (find_raw_breakpoint_at): New.
6955 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6956 breakpoint instead.
6957 (set_breakpoint_at): Adjust.
6958 (delete_raw_breakpoint): New.
6959 (release_breakpoint): New.
6960 (delete_breakpoint): Rename to...
6961 (delete_breakpoint_1): ... this. Add proc parameter. Use
6962 release_breakpoint. Return ENOENT.
6963 (delete_breakpoint): Reimplement.
6964 (find_breakpoint_at): Delete.
6965 (find_gdb_breakpoint_at): New.
6966 (delete_breakpoint_at): Delete.
6967 (set_gdb_breakpoint_at): New.
6968 (delete_gdb_breakpoint_at): New.
6969 (gdb_breakpoint_here): New.
6970 (set_reinsert_breakpoint): Use release_breakpoint.
6971 (uninsert_breakpoint): Rename to ...
6972 (uninsert_raw_breakpoint): ... this.
6973 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6974 (reinsert_raw_breakpoint): Change parameter type to
6975 raw_breakpoint.
6976 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6977 instead.
6978 (check_breakpoints): Adjust. Use release_breakpoint.
6979 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6980 (breakpoint_inserted_here): Ditto.
6981 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6982 Don't trust the breakpoint's shadow if it is not inserted.
6983 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6984 (delete_all_breakpoints): Adjust.
6985 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6986 use delete_breakpoint_1.
6987
6988 * mem-break.h (breakpoints_supported): Delete declaration.
6989 (set_gdb_breakpoint_at): Declare.
6990 (gdb_breakpoint_here): Declare.
6991 (delete_breakpoint_at): Delete.
6992 (delete_gdb_breakpoint_at): Declare.
6993
6994 * server.h (struct raw_breakpoint): Forward declare.
6995 (struct process_info): New field `raw_breakpoints'.
6996
6997 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6998 breakpoints.
6999
6bf5e0ba
PA
70002010-03-24 Pedro Alves <pedro@codesourcery.com>
7001
7002 * linux-low.c (status_pending_p_callback): Fix comment.
7003 (linux_wait_for_event_1): Move most of the internal breakpoint
7004 handling from here...
7005 (linux_wait_1): ... to here.
7006 (count_events_callback): New.
7007 (select_singlestep_lwp_callback): New.
7008 (select_event_lwp_callback): New.
7009 (cancel_breakpoints_callback): New.
7010 (select_event_lwp): New.
7011 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7012 priority to all LWPs that have had events that should be reported
7013 to the client. Cancel breakpoints when about to reporting the
7014 event to the client, not while stopping lwps. No longer cancel
7015 finished single-steps here.
7016 (cancel_finished_single_step): Delete.
7017 (cancel_finished_single_steps): Delete.
7018
414a389f
PA
70192010-03-24 Pedro Alves <pedro@codesourcery.com>
7020
7021 * mem-break.c (enum bkpt_type): New.
7022 (struct breakpoint): New field `type'.
7023 (set_breakpoint_at): Change return type to struct breakpoint
7024 pointer. Set type to `other_breakpoint' by default.
7025 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7026 in the breakpoint list.
7027 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7028 (reinsert_breakpoint): Rename to ...
7029 (reinsert_raw_breakpoint): ... this.
7030 (reinsert_breakpoints_at): Adjust.
7031 * mem-break.h (struct breakpoint): Declare.
7032 (set_breakpoint_at): Change return type to struct breakpoint
7033 pointer.
7034
2280c721
PA
70352010-03-24 Pedro Alves <pedro@codesourcery.com>
7036
7037 * server.c (handle_query): Assign, not compare.
7038
d50171e4
PA
70392010-03-24 Pedro Alves <pedro@codesourcery.com>
7040
7041 Teach linux gdbserver to step-over-breakpoints.
7042
7043 * linux-low.c (can_hardware_single_step): New.
7044 (supports_breakpoints): New.
7045 (handle_extended_wait): If stopping threads, read the stop pc of
7046 the new cloned LWP.
7047 (get_pc): New.
7048 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7049 low target doesn't support retrieving the PC.
7050 (add_lwp): Set last_resume_kind to resume_continue.
7051 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7052 (linux_attach): Don't clear stop_expected. Set the lwp's
7053 last_resume_kind to resume_stop.
7054 (linux_detach_one_lwp): Don't check for removed breakpoints.
7055 (check_removed_breakpoint): Delete.
7056 (status_pending_p): Rename to ...
7057 (status_pending_p_callback): ... this. Don't check for removed
7058 breakpoints. Don't consider threads that are stopped from GDB's
7059 perspective.
7060 (linux_wait_for_lwp): Always read the stop_pc here.
7061 (cancel_breakpoint): New.
7062 (step_over_bkpt): New global.
7063 (linux_wait_for_event_1): Implement stepping over breakpoints.
7064 (gdb_wants_lwp_stopped): New.
7065 (gdb_wants_all_stopped): New.
7066 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7067 single-step traps here. Store the thread's last reported target
7068 wait status.
7069 (send_sigstop): Don't clear stop_expected. Always set it,
7070 instead.
7071 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7072 (cancel_finished_single_step): New.
7073 (cancel_finished_single_steps): New.
7074 (wait_for_sigstop): Don't cancel finished single-step traps here.
7075 (linux_resume_one_lwp): Don't check for removed breakpoints.
7076 Don't set `step' on non-hardware step archs.
7077 (linux_set_resume_request): Ignore resume_stop requests if already
7078 stopping or stopped. Set the lwp's last_resume_kind.
7079 (resume_status_pending_p): Don't check for removed breakpoints.
7080 (need_step_over_p): New.
7081 (start_step_over): New.
7082 (finish_step_over): New.
7083 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7084 requests. Clear the thread's last reported target waitstatus.
7085 Don't use the `suspended' flag. Don't consider pending breakpoints.
7086 (linux_resume): Start a step-over if necessary.
7087 (proceed_one_lwp): New.
7088 (proceed_all_lwps): New.
7089 (unstop_all_lwps): New.
7090 * linux-low.h (struct lwp_info): Rewrite comment for the
7091 `suspended' flag. Add the `stop_pc' field. Delete the
7092 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7093 Add `'last_resume_kind' and `need_step_over' fields.
7094 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7095 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7096 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7097 (set_raw_breakpoint_at): New.
7098 (set_breakpoint_at): Rewrite to use it.
7099 (reinsert_breakpoint_handler): Delete.
7100 (set_reinsert_breakpoint): New.
7101 (reinsert_breakpoint_by_bp): Delete.
7102 (delete_reinsert_breakpoints): New.
7103 (uninsert_breakpoint): Rewrite.
7104 (uninsert_breakpoints_at): New.
7105 (reinsert_breakpoint): Rewrite.
7106 (reinsert_breakpoints_at): New.
7107 (check_breakpoints): Rewrite.
7108 (breakpoint_here): New.
7109 (breakpoint_inserted_here): New.
7110 (check_mem_read): Adjust.
7111 * mem-break.h (breakpoints_supported, breakpoint_here)
7112 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7113 (reinsert_breakpoint_by_bp): Delete declaration.
7114 (delete_reinsert_breakpoints): Declare.
7115 (reinsert_breakpoint): Delete declaration.
7116 (reinsert_breakpoints_at): Declare.
7117 (uninsert_breakpoint): Delete declaration.
7118 (uninsert_breakpoints_at): Declare.
7119 (check_breakpoints): Adjust prototype.
7120 * server.h: Adjust include order.
7121 (struct thread_info): Declare here. Add a `last_status' field.
7122
30ba68cb
MS
71232010-03-23 Michael Snyder <msnyder@vmware.com>
7124
7125 * server.c (crc32): New function.
7126 (handle_query): Add handling for 'qCRC:' request.
7127
b9a881c2
PA
71282010-03-23 Pedro Alves <pedro@codesourcery.com>
7129
7130 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7131 lwp had been stopped by a watchpoint.
7132
e92d13d5
PA
71332010-03-16 Pedro Alves <pedro@codesourcery.com>
7134
7135 * server.h (internal_error): Declare.
7136 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7137 * utils.c (internal_error): New function.
7138
64daa791
AS
71392010-03-15 Andreas Schwab <schwab@redhat.com>
7140
7141 * configure.srv: Fix typo setting srv_regobj.
7142
f52cd8cd
PA
71432010-03-15 Pedro Alves <pedro@codesourcery.com>
7144
7145 * linux-low.c (fetch_register): Avoid passing a non string literal
7146 format to `error'.
7147 (usr_store_inferior_registers): Ditto.
7148
93ae6fdc
PA
71492010-03-14 Pedro Alves <pedro@codesourcery.com>
7150
7151 * linux-low.c (linux_write_memory): Bail out early if peeking
7152 memory failed.
7153
c3adc08c
PA
71542010-03-14 Pedro Alves <pedro@codesourcery.com>
7155
7156 * linux-low.h (struct lwp_info): New fields
7157 `stopped_by_watchpoint' and `stopped_data_address'.
7158 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7159 here, and cache them in the lwp object.
7160 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7161 directly.
7162 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7163 field.
7164 (linux_stopped_by_watchpoint): Rewrite.
7165 (linux_stopped_data_address): Rewrite.
7166
bce522a2
PA
71672010-03-06 Simo Melenius <simo.melenius@iki.fi>
7168
7169 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7170 switching the current inferior, not before.
7171
90884b2b
L
71722010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7173
7174 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7175 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7176 i386-linux.c and amd64-linux.c.
7177 (reg-i386.o): Removed.
7178 (reg-i386.c): Likewise.
7179 (reg-i386-linux.o): Likewise.
7180 (reg-i386-linux.c): Likewise.
7181 (reg-x86-64.o): Likewise.
7182 (reg-x86-64.c): Likewise.
7183 (reg-x86-64-linux.o): Likewise.
7184 (reg-x86-64-linux.c): Likewise.
7185 (i386.o): New.
7186 (i386.c): Likewise.
7187 (i386-linux.o): Likewise.
7188 (i386-linux.c): Likewise.
7189 (amd64.o): Likewise.
7190 (amd64.c): Likewise.
7191 (amd64-linux.o): Likewise.
7192 (amd64-linux.c): Likewise.
7193
7194 * configure.srv (srv_i386_regobj): New.
7195 (srv_i386_linux_regobj): Likewise.
7196 (srv_amd64_regobj): Likewise.
7197 (srv_amd64_linux_regobj): Likewise.
7198 (srv_i386_32bit_xmlfiles): Likewise.
7199 (srv_i386_64bit_xmlfiles): Likewise.
7200 (srv_i386_xmlfiles): Likewise.
7201 (srv_amd64_xmlfiles): Likewise.
7202 (srv_i386_linux_xmlfiles): Likewise.
7203 (srv_amd64_linux_xmlfiles): Likewise.
7204 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7205 srv_xmlfiles to $srv_i386_xmlfiles.
7206 (i[34567]86-*-mingw32ce*): Likewise.
7207 (i[34567]86-*-mingw*): Likewise.
7208 (i[34567]86-*-nto*): Likewise.
7209 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7210 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7211 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7212 (x86_64-*-linux*): Likewise.
7213
7214 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7215 (init_registers_amd64_linux): New.
7216 (x86_arch_setup): Replace init_registers_x86_64_linux with
7217 init_registers_amd64_linux.
7218
193f13e6
MK
72192010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7220
7221 * configure.ac: Check for libdl. If it is not available link against
7222 static libthread_db.
7223 * configure: Regenerate.
7224
85d721b8
PA
72252010-02-22 Pedro Alves <pedro@codesourcery.com>
7226
7227 PR9605
7228
7229 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7230 handing a read watchpoint.
7231 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7232
6076632b
DE
72332010-02-12 Doug Evans <dje@google.com>
7234
7235 * linux-low.c (linux_supports_tracefork_flag): Document.
7236 (linux_look_up_symbols): Add comment.
7237
3327ccf7
L
72382010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7239
7240 * regcache.c (supply_register): Clear regcache if buf is NULL.
7241
0718675c 72422010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7243 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7244
7245 * inferiors.c (find_inferior): Add function documentation.
7246 (unloaded_dll): Handle the case where the unloaded dll has not
7247 been previously registered in the dll list.
7248
177321bd
DJ
72492010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7250
7251 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7252 (thumb2_breakpoint): New.
7253 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7254
2b009048
DJ
72552010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7256
7257 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7258 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7259 breakpoints.
7260
3be029c7
PA
72612010-01-21 Pedro Alves <pedro@codesourcery.com>
7262
7263 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7264
18f5de3b
JK
72652010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7266
7267 * linux-s390-low.c (s390_collect_ptrace_register)
7268 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7269
3743bb4f
DE
72702010-01-21 Doug Evans <dje@google.com>
7271
14ce3065
DE
7272 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7273 (PTRACE_ARG4_TYPE): New macro.
7274 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7275 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7276 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7277 (usr_store_inferior_registers): Ditto.
7278 (linux_read_memory, linux_write_memory): Ditto.
7279 (linux_test_for_tracefork): Ditto.
7280
3743bb4f
DE
7281 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7282 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7283
8b315be5
PA
72842010-01-21 Pedro Alves <pedro@codesourcery.com>
7285
7286 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7287 target.
7288
85492558
PA
72892010-01-21 Pedro Alves <pedro@codesourcery.com>
7290
7291 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7292 prototype to take a regcache. Adjust.
7293
442ea881
PA
72942010-01-20 Pedro Alves <pedro@codesourcery.com>
7295
7296 * regcache.h (struct thread_info): Forward declare.
7297 (struct regcache): New.
7298 (new_register_cache): Adjust prototype.
7299 (get_thread_regcache): Declare.
7300 (free_register_cache): Adjust prototype.
7301 (registers_to_string, registers_from_string): Ditto.
7302 (supply_register, supply_register_by_name, collect_register)
7303 (collect_register_as_string, collect_register_by_name): Ditto.
7304 * regcache.c (struct inferior_regcache_data): Delete.
7305 (get_regcache): Rename to ...
7306 (get_thread_regcache): ... this. Adjust. Switch inferior before
7307 fetching registers.
7308 (regcache_invalidate_one): Adjust.
7309 (regcache_invalidate): Fix prototype.
7310 (new_register_cache): Return the new register cache.
7311 (free_register_cache): Change prototype.
7312 (realloc_register_cache): Adjust.
7313 (registers_to_string): Change prototype to take a regcache. Adjust.
7314 (registers_from_string): Ditto.
7315 (register_data): Ditto.
7316 (supply_register): Ditto.
7317 (supply_register_by_name): Ditto.
7318 (collect_register): Ditto.
7319 (collect_register_as_string): Ditto.
7320 (collect_register_by_name): Ditto.
7321 * server.c (process_serial_event): Adjust.
7322 * linux-low.h (regset_fill_func, regset_store_func): Change
7323 prototype.
7324 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7325 Change prototype.
7326 * linux-low.c (get_stop_pc): Adjust.
7327 (check_removed_breakpoint): Adjust.
7328 (linux_wait_for_event): Adjust.
7329 (linux_resume_one_lwp): Adjust.
7330 (fetch_register): Add regcache parameter. Adjust.
7331 (usr_store_inferior_registers): Ditto.
7332 (regsets_fetch_inferior_registers): Ditto.
7333 (regsets_store_inferior_registers): Ditto.
7334 (linux_fetch_registers, linux_store_registers): Ditto.
7335 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7336 regcache. Adjust.
43aaf8b6
PA
7337 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7338 Ditto.
442ea881
PA
7339 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7340 prototype to take a regcache.
7341 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7342 * remote-utils.c (convert_ascii_to_int, outreg)
7343 (prepare_resume_reply): Change prototype to take a regcache.
7344 Adjust.
7345 * target.h (struct target_ops) <fetch_registers, store_registers>:
7346 Change prototype to take a regcache.
7347 (fetch_inferior_registers, store_inferior_registers): Change
7348 prototype to take a regcache. Adjust.
7349 * proc-service.c (ps_lgetregs): Adjust.
7350 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7351 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7352 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7353 take a regcache. Adjust.
7354 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7355 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7356 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7357 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7358 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7359 (cris_cannot_fetch_register):
7360 (cris_breakpoint_at): Change prototype to take a regcache.
7361 Adjust.
7362 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7363 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7364 to take a regcache. Adjust.
7365 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7366 Adjust.
7367 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7368 take a regcache. Adjust.
7369 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7370 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7371 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7372 * linux-mips-low.c (mips_get_pc):
7373 (mips_set_pc): Change prototype to take a regcache. Adjust.
7374 (mips_reinsert_addr): Adjust.
7375 (mips_collect_register): Change prototype to take a regcache.
7376 Adjust.
7377 (mips_supply_register):
7378 (mips_collect_register_32bit, mips_supply_register_32bit)
7379 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7380 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7381 * linux-ppc-low.c (ppc_supply_ptrace_register)
7382 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7383 (parse_spufs_run): Adjust.
7384 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7385 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7386 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7387 take a regcache. Adjust.
7388 * linux-s390-low.c (s390_collect_ptrace_register)
7389 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7390 (s390_set_pc): Change prototype to take a regcache. Adjust.
7391 (s390_arch_setup): Adjust.
7392 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7393 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7394 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7395 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7396 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7397 regcache. Adjust.
7398 (sparc_breakpoint_at): Adjust.
7399 * linux-xtensa-low.c (xtensa_fill_gregset):
7400 (xtensa_store_gregset):
7401 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7402 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7403 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7404 prototype to take a regcache. Adjust.
7405 * win32-arm-low.c (arm_fetch_inferior_register)
7406 (arm_store_inferior_register): Change prototype to take a
7407 regcache. Adjust.
7408 * win32-i386-low.c (i386_fetch_inferior_register)
7409 (i386_store_inferior_register): Change prototype to take a
7410 regcache. Adjust.
7411 * win32-low.c (child_fetch_inferior_registers)
7412 (child_store_inferior_registers): Change prototype to take a
7413 regcache. Adjust.
7414 (win32_wait): Adjust.
7415 (win32_fetch_inferior_registers): Change prototype to take a
7416 regcache. Adjust.
7417 (win32_store_inferior_registers): Adjust.
7418 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7419 store_inferior_register>: Change prototype to take a regcache.
7420
60c3d7b0
DE
74212010-01-20 Doug Evans <dje@google.com>
7422
7423 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7424 #ifdef.
7425 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7426 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7427
dc146f7c
VP
74282010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7429
7430 * linux-low.c (linux_core_of_thread): New.
7431 (compare_ints, show_process, list_threads): New.
7432 (linux_qxfer_osdata): Report threads and cores.
7433 (linux_target_op): Register linux_core_of_thread.
7434 * remote-utils.c (prepare_resume_reply): Report the core.
7435 (buffer_xml_printf): Support %d specifier.
7436 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7437 New.
7438 (handle_query): Handle qXfer:threads. Announce availability
7439 thereof.
7440 * target.h (struct target_ops): New field core_of_thread.
7441
7803799a
UW
74422010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7443
7444 * Makefile.in (clean): Remove new generated files.
7445 (reg-s390.o, reg-s390.c): Remove rules.
7446 (reg-s390x.o, reg-s390x.c): Likewise.
7447 (s390-linux32.o, s390-linux32.c): Add rules.
7448 (s390-linux64.o, s390-linux64.c): Likewise.
7449 (s390x-linux64.o, s390x-linux64.c): Likewise.
7450 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7451 * linux-s390-low.c: Include <elf.h>.
7452 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7453 (init_registers_s390): Remove prototype.
7454 (init_registers_s390x): Likewise.
7455 (init_registers_s390_linux32): Add prototype.
7456 (init_registers_s390_linux64): Likewise.
7457 (init_registers_s390x_linux64): Likewise.
7458 (s390_num_regs_3264): New define.
7459 (s390_regmap_3264): New global variable.
7460 (s390_cannot_fetch_register): Remove obsolete check.
7461 (s390_cannot_store_register): Likewise.
7462 (s390_collect_ptrace_register): Handle upper/lower register halves.
7463 (s390_supply_ptrace_register): Likewise.
7464 (s390_fill_gregset): Update to register number changes.
7465 (s390_get_hwcap): New routine.
7466 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7467 Install appropriate regmap and register set.
7468
6e7ffa39
JB
74692010-01-01 Joel Brobecker <brobecker@adacore.com>
7470
7471 * server.c (gdbserver_version): Update copyright year to 2010.
7472 * gdbreplay.c (gdbreplay_version): Likewise.
7473
957f3f49
DE
74742009-12-28 Doug Evans <dje@google.com>
7475
7476 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7477 elf/external.h. Include <elf.h> instead but only if necessary.
7478
ca5c370d
PA
74792009-12-28 Pedro Alves <pedro@codesourcery.com>
7480
7481 * linux-low.c (linux_remove_process): Remove `detaching'
7482 parameter. Don't release/detach from thread_db here.
7483 (linux_kill): Release/detach from thread_db here, ...
7484 (linux_detach): ... and here, before actually detaching.
7485 (linux_wait_1): ... and here, when a process exits.
7486 * thread-db.c (any_thread_of): New.
7487 (thread_db_free): Switch the current inferior to a thread of the
7488 passed in process.
7489
4ee62156
DE
74902009-12-21 Doug Evans <dje@google.com>
7491
d90e6a88
DE
7492 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7493
c5f62d5f
DE
7494 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7495 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7496 warning ifndef __NR_tkill. Move setting of errno there too.
7497 Delete unnecessary resetting of errno after syscall.
7498 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7499
10e86dd7
DE
7500 * configure.ac: Check for dladdr.
7501 * config.in: Regenerate.
7502 * configure: Regenerate.
7503 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7504 (try_thread_db_load): Update.
7505
4ee62156
DE
7506 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7507
00f515da
DE
75082009-12-18 Doug Evans <dje@google.com>
7509
e9464885
DE
7510 * event-loop.c: Include unistd.h if it exists.
7511
07d4f67e
DE
7512 * linux-low.c (my_waitpid): Move definition away from being in
7513 between linux_tracefork_child/linux_test_for_tracefork.
7514
00f515da
DE
7515 * gdb_proc_service.h (psaddr_t): Fix type.
7516 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7517 signature to match glibc.
7518
1de1badb
DE
75192009-12-16 Doug Evans <dje@google.com>
7520
7521 * linux-low.c (linux_read_memory): Fix argument to read.
7522
aeeb81d1
PA
75232009-11-26 Pedro Alves <pedro@codesourcery.com>
7524
7525 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7526 events, don't leave current_inferior pointing at null.
7527
10357975
PA
75282009-11-26 Pedro Alves <pedro@codesourcery.com>
7529
7530 * win32-low.c (LOG): Delete.
7531 (OUTMSG): Output to stderr.
7532 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7533 on compile time LOG macro.
7534 (win32_wait): Fix debug output.
7535
cf6e3471
PA
75362009-11-26 Pedro Alves <pedro@codesourcery.com>
7537
7538 * win32-low.c (win32_add_one_solib): If the dll name is
7539 "ntdll.dll", prepend the system directory to the dll path.
7540
0c85e18e
MK
75412009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7542
7543 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7544
9ac544ce 75452009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7546 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7547
7548 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7549 * configure.ac: Check for __mcoldfire__ and set
7550 gdb_cv_m68k_is_coldfire.
7551 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7552 reg-cf.o and reg-m68k.o.
7553 * configure: Regenerated.
7554
fd7dd3e6
PA
75552009-11-16 Pedro Alves <pedro@codesourcery.com>
7556
7557 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7558 Pass it to thread_db_free.
7559 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7560 proper `detaching' argument to linux_remove_process.
7561 * linux-low.h (thread_db_free): Add `detaching' parameter.
7562 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7563 to thread_db_free.
7564 (thread_db_free): Add `detaching' parameter. Only
7565 call td_ta_clear_event if detaching from process.
7566
75aa492e
MK
75672009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7568
7569 * thread-db.c (thread_db_free): Fix typo.
7570
21e1bee4
PP
75712009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7572
7573 PR gdb/10838
7574 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7575
8838b45e
NS
75762009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7577
7578 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7579 with an i686 compiler.
7580 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7581 needed.
7582 * configure: Rebuilt.
7583
8a35fb51
SL
75842009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7585
7586 PR gdb/10783
7587
7588 * server.c (handle_search_memory_1): Correct read_addr initialization
7589 in loop for searching subsequent chunks.
7590
96f15937
PP
75912009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7592
7593 * configure.ac: New --with-libthread-db option.
7594 * thread-db.c: Allow direct dependence on libthread_db.
7595 (thread_db_free): Adjust.
7596 * config.in: Regenerate.
7597 * configure: Likewise.
889bf7c5 7598
5f7d1694
PP
75992009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7600
7601 PR gdb/10757
7602 * thread-db.c (attach_thread): New function.
7603 (maybe_attach_thread): Return success/failure.
7604 (find_new_threads_callback): Adjust.
889bf7c5
PA
7605 (thread_db_find_new_threads): Loop until no new threads.
7606
88e3b899
PA
76072009-10-13 Pedro Alves <pedro@codesourcery.com>
7608
7609 * proc-service.c (ps_lgetregs): Formatting.
7610
cdbfd419
PP
76112009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7612
7613 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7614 * configure.ac: Adjust.
7615 * linux-low.h (struct process_info_private): Move members to struct
7616 thread_db.
7617 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7618 * linux-low.c (linux_remove_process): Adjust.
7619 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7620 * server.c (handle_query): Move code ...
7621 (handle_monitor_command): ... here. New function.
7622 * target.h (struct target_ops): New member.
7623 * thread-db.c (struct thread_db): New.
7624 (libthread_db_search_path): New variable.
7625 (thread_db_create_event, thread_db_enable_reporting)
7626 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7627 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7628 (try_thread_db_load_1, dladdr_to_soname): New functions.
7629 (try_thread_db_load, thread_db_load_search): New functions.
7630 (thread_db_init): Search for libthread_db.
7631 (thread_db_free): New function.
7632 (thread_db_handle_monitor_command): Likewise.
7633 * config.in: Regenerate.
7634 * configure: Regenerate.
889bf7c5 7635
4168d2d6
UW
76362009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7637
7638 * spu-low.c (spu_kill): Wait for inferior to terminate.
7639 Call clear_inferiors.
7640 (spu_detach): Call clear_inferiors.
7641
81ecdfbb
RW
76422009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7643
7644 * aclocal.m4: Regenerate.
7645 * config.in: Likewise.
7646 * configure: Likewise.
7647
0b9ff2c0
UW
76482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7649
7650 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7651 (parse_spufs_run): New function.
7652 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7653 (ppc_breakpoint_at): Handle SPU breakpoints.
7654
efcbbd14
UW
76552009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7656
7657 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7658 (SPUFS_MAGIC): Define.
7659 (spu_enumerate_spu_ids): New function.
7660 (linux_qxfer_spu): New function.
7661 (linux_target_ops): Install linux_qxfer_spu.
7662
f4d9bade
UW
76632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7664
7665 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7666 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7667 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7668 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7669 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7670 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7671 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7672 (init_registers_powerpc_cell32l): Add prototype.
7673 (init_registers_powerpc_cell64l): Likewise.
7674 (ppc_arch_setup): Detect Cell/B.E. architecture.
7675
96e946ca
RW
76762009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7677
7678 * Makefile.in (datarootdir): New variable.
7679
58d6951d
DJ
76802009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7681
7682 * linux-low.c (linux_write_memory): Update debugging output.
7683 * Makefile.in (clean): Add new descriptions.
7684 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7685 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7686 * configure.srv: Add new files for arm*-*-linux*.
7687 * linux-arm-low.c: Add new declarations.
7688 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7689 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7690 (HWCAP_VFPv3D16): New.
7691 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7692 instead of __IWMMXT__.
7693 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7694 (arm_arch_setup): New.
7695 (target_regsets): Remove #ifdef. Add VFP regset.
7696 (the_low_target): Use arm_arch_setup.
7697
12b42a12
DJ
76982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7699
7700 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7701 the main thread again.
7702
ac8c974e
AR
77032009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7704
7705 Adding Neutrino gdbserver.
7706 * configure: Regenerated.
7707 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7708 * configure.srv (i[34567]86-*-nto*): New target.
7709 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7710 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7711 (nto_comctrl) [__QNX__]: New function.
7712 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7713
4424e0c3 77142009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7715
7716 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7717 srv_tgtobj.
7718
912cf4ba
PA
77192009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7720 Pedro Alves <pedro@codesourcery.com>
7721
7722 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7723 don't support CONTEXT_EXTENDED_REGISTERS.
7724 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7725 (the_low_target): Install them.
7726 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7727 failing with ERROR_PIPE_NOT_CONNECTED.
7728
aa5ca48f
DE
77292009-06-30 Doug Evans <dje@google.com>
7730 Pierre Muller <muller@ics.u-strasbg.fr>
7731
7732 Add h/w watchpoint support to x86-linux, win32-i386.
7733 * Makefile.in (SFILES): Add i386-low.c
7734 (i386_low_h): Define.
7735 (i386-low.o): Add dependencies.
7736 (linux-x86-low.o): Add i386-low.h dependency.
7737 (win32-i386-low.o): Ditto.
7738 * i386-low.c: New file.
7739 * i386-low.h: New file.
7740 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7741 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7742 * linux-low.c (linux_add_process): Initialize arch_private.
7743 (linux_remove_process): Free arch_private.
7744 (add_lwp): Initialize arch_private.
7745 (delete_lwp): Free arch_private.
7746 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7747 provided.
7748 * linux-low.h (process_info_private): New member arch_private.
7749 (lwp_info): New member arch_private.
7750 (linux_target_ops): New members new_process, new_thread,
7751 prepare_to_resume.
7752 (ptid_of): New macro.
7753 * linux-x86-low.c: Include stddef.h, i386-low.h.
7754 (arch_process_info): New struct.
7755 (arch_lwp_info): New struct.
7756 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7757 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7758 (i386_dr_low_get_status): New function.
7759 (x86_insert_point, x86_remove_point): New functions.
7760 (x86_stopped_by_watchpoint): New function.
7761 (x86_stopped_data_address): New function.
7762 (x86_linux_new_process, x86_linux_new_thread): New functions.
7763 (x86_linux_prepare_to_resume): New function.
7764 (the_low_target): Add entries for insert_point, remove_point,
7765 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7766 prepare_to_resume.
7767 * server.c (debug_hw_points): New global.
7768 (monitor_show_help): Document set debug-hw-points.
7769 (handle_query): Process "set debug-hw-points".
7770 * server.h (debug_hw_points): Declare.
7771 (paddress): Declare.
7772 * utils.c (NUMCELLS, CELLSIZE): New macros.
7773 (get_sell, xsnprintf, paddress): New functions.
7774 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7775 remove_point, stopped_by_watchpoint, stopped_data_address.
7776 * win32-i386-low.c: Include i386-low.h.
7777 (debug_reg_state): Replaces dr.
7778 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7779 (i386_dr_low_get_status): New function.
7780 (i386_insert_point, i386_remove_point): New functions.
7781 (i386_stopped_by_watchpoint): New function.
7782 (i386_stopped_data_address): New function.
7783 (i386_initial_stuff): Update.
7784 (get_thread_context,set_thread_context,i386_thread_added): Update.
7785 (the_low_target): Add entries for insert_point,
7786 remove_point, stopped_by_watchpoint, stopped_data_address.
7787 * win32-low.c (win32_insert_watchpoint): New function.
7788 (win32_remove_watchpoint): New function.
7789 (win32_stopped_by_watchpoint): New function.
7790 (win32_stopped_data_address): New function.
7791 (win32_target_ops): Add entries for insert_watchpoint,
7792 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7793 * win32-low.h (win32_target_ops): New members insert_point,
7794 remove_point, stopped_by_watchpoint, stopped_data_address.
7795
d993e290
PA
77962009-06-25 Pedro Alves <pedro@codesourcery.com>
7797
7798 * server.c (process_serial_event): Re-return unsupported, not
7799 error, if the type isn't recognized. Re-allow supporting only
7800 insert or remove packets. Also call require_running for
7801 breakpoints. Add missing break statement to default case. Tidy.
7802 * target.h (struct target_ops): Rename insert_watchpoint to
7803 insert_point, and remove_watchpoint to remove_point.
7804
7805 * linux-low.h (struct linux_target_ops): Likewise.
7806 * linux-low.c (linux_insert_watchpoint): Rename to ...
7807 (linux_insert_point): ... this. Adjust.
7808 (linux_remove_watchpoint): Rename to ...
7809 (linux_remove_point): ... this. Adjust.
7810 (linux_target_ops): Adjust.
7811 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7812 (cris_insert_point): ... this.
7813 (cris_remove_watchpoint): Rename to ...
7814 (cris_remove_point): ... this.
7815 (the_low_target): Adjust.
7816
0f54c268
PM
78172009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7818
7819 * server.c (handle_v_kill): Pass signal_pid to
7820 kill_inferior if multi_process is zero.
7821
c6314022
AR
78222009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7823
7824 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7825 * target.h (target_ops): Comment for *_watchpoint to make it clear
7826 the functions can get types '0' and '1'.
7827
4463ce24
AR
78282009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7829
7830 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7831 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7832 * regcache.c (get_regcache): Likewise.
7833 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7834 * win32-low.c (child_fetch_inferior_registers): Remove check for
7835 regno 0.
7836
cf8fd78b
PA
78372009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7838 Pedro Alves <pedro@codesourcery.com>
7839
7840 * target.h (struct target_ops) <supports_multi_process>: New
7841 callback.
7842 (target_supports_multi_process): New.
7843 * server.c (handle_query): Even if GDB reports support, only
7844 enable multi-process if the target also supports it. Report
7845 multi-process support only if the target backend supports it.
7846 * linux-low.c (linux_supports_multi_process): New function.
7847 (linux_target_ops): Install it as target_supports_multi_process
7848 callback.
7849
47c0c975
DE
78502009-05-24 Doug Evans <dje@google.com>
7851
e09875d4
DE
7852 Global renaming of find_thread_pid to find_thread_ptid.
7853 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7854 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7855 All callers updated.
7856
e27d73f6
DE
7857 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7858 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7859 directly.
7860
47c0c975
DE
7861 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7862 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7863 (linux_resume_one_lwp): Ditto.
7864
2acc282a
DE
78652009-05-23 Doug Evans <dje@google.com>
7866
7867 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7868 from struct inferior_list_entry * to struct lwp_info *.
7869 All callers updated.
7870
9f1036c1
DE
78712009-05-13 Doug Evans <dje@google.com>
7872
7873 * linux-x86-low.c: Don't include assert.h.
7874 (x86_siginfo_fixup): Use fatal, not assert.
7875 (x86_arch_setup): Fix comment.
7876
d0722149
DE
78772009-05-12 Doug Evans <dje@google.com>
7878
7879 Biarch support for i386/amd64 gdbserver.
7880 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7881 Add linux-x86-low.c.
7882 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7883 (linux-x86-low.o): Add.
7884 * linux-x86-64-low.c: Delete.
7885 * linux-i386-low.c: Delete.
7886 * linux-x86-low.c: New file.
7887 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7888 linux-x86-low.o.
7889 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7890 linux-x86-low.o.
7891 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7892 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7893 (linux_child_pid_to_exec_file): New function.
7894 (elf_64_header_p, elf_64_file_p): New functions.
7895 (siginfo_fixup): New function.
7896 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7897 give target a chance to convert layout.
7898 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7899 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7900
fdeb2a12
DE
79012009-05-07 Doug Evans <dje@google.com>
7902
7903 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7904 (regsets_store_inferior_registers): Ditto.
7905
a6dbe5df
PA
79062009-05-06 Pedro Alves <pedro@codesourcery.com>
7907
7908 PR server/10048
7909
7910 * linux-low.c (must_set_ptrace_flags): Delete.
7911 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7912 of the global.
7913 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7914 `lwp->must_set_ptrace_flags' instead.
ba42693b 7915 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7916 (linux_wait_1): ... not here.
7917
5091eb23
DE
79182009-04-30 Doug Evans <dje@google.com>
7919
9f767825
DE
7920 * inferiors.c (started_inferior_callback): New function.
7921 (attached_inferior_callback): New function.
7922 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7923 * server.c (print_started_pid, print_attached_pid): New functions.
7924 (detach_or_kill_for_exit): New function.
7925 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7926 * server.h (have_started_inferiors_p): Declare.
7927 (have_attached_inferiors_p): Declare.
7928
5091eb23
DE
7929 * inferiors.c (remove_process): Fix memory leak, free process.
7930 * linux-low.c (linux_remove_process): New function.
7931 (linux_kill): Call it instead of remove_process.
7932 (linux_detach, linux_wait_1): Ditto.
7933
155c8968
PA
79342009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7935
7936 * configure.srv: Add x86 Windows CE target.
7937
7fe519cb
UW
79382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7939
7940 * inferiors.c (get_thread_process): Make global.
7941 * server.h (get_thread_process): Add prototype.
7942 * thread-db.c (find_one_thread): Use get_thread_process
7943 instead of current_process.
7944 (thread_db_get_tls_address): Do not crash if called when
7945 thread layer is not yet initialized.
7946
5472f405
UW
79472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7948
7949 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7950 * spu-low.c (current_tid): Rename to ...
7951 (current_ptid): ... this.
7952 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7953 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7954 ptid_get_lwp (current_ptid) instead of current_tid.
7955 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7956 instead of current_tid. Use find_process_pid to verify pid
7957 argument is valid. Pass proper argument to remove_process.
7958 (spu_thread_alive): Compare current_ptid instead of current_tid.
7959 (spu_resume): Likewise.
7960
55ac2b99
PA
79612009-04-02 Pedro Alves <pedro@codesourcery.com>
7962
7963 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7964 variable.
7965
95954743
PA
79662009-04-01 Pedro Alves <pedro@codesourcery.com>
7967
7968 Implement the multiprocess extensions, and add linux multiprocess
7969 support.
7970
7971 * server.h (ULONGEST): Declare.
7972 (struct ptid, ptid_t): New.
7973 (minus_one_ptid, null_ptid): Declare.
7974 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7975 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7976 (struct inferior_list_entry): Change `id' type from unsigned from
7977 to ptid_t.
7978 (struct sym_cache, struct breakpoint, struct
7979 process_info_private): Forward declare.
7980 (struct process_info): Declare.
7981 (current_process): Declare.
7982 (all_processes): Declare.
7983 (initialize_inferiors): Declare.
7984 (add_thread): Adjust to use ptid_t.
7985 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7986 (add_process, remove_process, find_thread_pid): Declare.
7987 (find_inferior_id): Adjust to use ptid_t.
7988 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7989 (multi_process): Declare.
7990 (push_event): Adjust to use ptid_t.
7991 (read_ptid, write_ptid): Declare.
7992 (prepare_resume_reply): Adjust to use ptid_t.
7993 (clear_symbol_cache): Declare.
7994 * inferiors.c (all_processes): New.
7995 (null_ptid, minus_one_ptid): New.
7996 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7997 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7998 (add_thread): Change unsigned long to ptid. Remove gdb_id
7999 parameter. Adjust.
8000 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8001 (gdb_id_to_thread): Rename to ...
8002 (find_thread_pid): ... this. Change unsigned long to ptid.
8003 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8004 (loaded_dll, pull_pid_from_list): Adjust.
8005 (add_process, remove_process, find_process_pid)
8006 (get_thread_process, current_process, initialize_inferiors): New.
8007 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8008 (struct target_waitstatus) <related_pid>: Ditto.
8009 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8010 return type to int.
8011 (struct target_ops) <join>: Add `pid' argument.
8012 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8013 (struct target_ops) <wait>: Add `ptid' field. Change return type
8014 to ptid.
8015 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8016 (mywait): Add `ptid' argument. Change return type to ptid_t.
8017 (target_pid_to_str): Declare.
8018 * target.c (set_desired_inferior): Adjust to use ptids.
8019 (mywait): Add new `ptid' argument. Adjust.
8020 (target_pid_to_str): New.
8021 * mem-break.h (free_all_breakpoints): Declare.
8022 * mem-break.c (breakpoints): Delelete.
8023 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8024 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8025 to use per-process breakpoint list.
8026 (free_all_breakpoints): New.
8027 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8028 (symbol_cache, all_symbols_looked_up): Delete.
8029 (hexchars): New.
8030 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8031 read_ptid): New.
8032 (prepare_resume_reply): Change ptid argument's type from unsigned
8033 long to ptid_t. Adjust. Implement W;process and X;process.
8034 (free_sym_cache, clear_symbol_cache): New.
8035 (look_up_one_symbol): Adjust to per-process symbol cache. *
8036 * server.c (cont_thread, general_thread, step_thread): Change type
8037 to ptid_t.
8038 (attached): Delete.
8039 (multi_process): New.
8040 (last_ptid): Change type to ptid_t.
8041 (struct vstop_notif) <ptid>: Change type to ptid_t.
8042 (queue_stop_reply, push_event): Change `ptid' argument's type to
8043 ptid_t.
8044 (discard_queued_stop_replies): Add `pid' argument.
8045 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8046 changes. Don't reference the `attached' global.
8047 (attach_inferior): Adjust to mywait interface changes.
8048 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8049 features. Handle and report "multiprocess+". Handle
8050 "qAttached:PID".
8051 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8052 changes.
8053 (handle_v_kill): New.
8054 (handle_v_stopped): Adjust to use target_pid_to_str.
8055 (handle_v_requests): Allow multiple attaches and runs when
8056 multiprocess extensions are in effect. Handle "vKill".
8057 (myresume): Adjust to use ptids.
8058 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8059 (handle_status): Adjust to discard_queued_stop_replies interface
8060 change.
8061 (first_thread_of, kill_inferior_callback)
8062 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8063 (main): Call initialize_inferiors. Adjust to use ptids, killing
8064 and detaching from all inferiors. Handle multiprocess packet
8065 variants.
8066 * linux-low.h: Include gdb_proc_service.h.
8067 (struct process_info_private): New.
8068 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8069 <lwpid_of>: Use ptid_get_lwp.
8070 (get_lwp_thread): Adjust.
8071 (struct lwp_info): Add `dead' member.
8072 (find_lwp_pid): Declare.
8073 * linux-low.c (thread_db_active): Delete.
8074 (new_inferior): Adjust comment.
8075 (inferior_pid): Delete.
8076 (linux_add_process): New.
8077 (handle_extended_wait): Adjust.
8078 (add_lwp): Change unsigned long to ptid.
8079 (linux_create_inferior): Add process to processes table. Adjust
8080 to use ptids. Don't set new_inferior here.
8081 (linux_attach_lwp): Rename to ...
8082 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8083 it. Adjust to use ptids.
8084 (linux_attach_lwp): New.
8085 (linux_attach): Add process to processes table. Don't set
8086 new_inferior here.
8087 (struct counter): New.
8088 (second_thread_of_pid_p, last_thread_of_process_p): New.
8089 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8090 multiple processes.
8091 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8092 processes. Remove process from process table.
8093 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8094 to multiple processes.
8095 (any_thread_of): New.
8096 (linux_detach): Add `pid' argument, and handle it. Remove process
8097 from processes table.
8098 (linux_join): Add `pid' argument. Handle it.
8099 (linux_thread_alive): Change unsighed long argument to ptid_t.
8100 Consider dead lwps as not being alive.
8101 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8102 threads we're not interested in.
8103 (same_lwp, find_lwp_pid): New.
8104 (linux_wait_for_lwp): Change `pid' argument's type from int to
8105 ptid_t. Adjust.
8106 (linux_wait_for_event): Rename to ...
8107 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8108 from int to ptid_t. Adjust.
8109 (linux_wait_for_event): New.
8110 (linux_wait_1): Add `ptid' argument. Change return type to
8111 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8112 that exit from the process table.
8113 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8114 Adjust.
8115 (mark_lwp_dead): New.
8116 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8117 stopping all threads, mark its main lwp as dead.
8118 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8119 ptids.
8120 (fetch_register, usr_store_inferior_registers)
8121 (regsets_fetch_inferior_registers)
8122 (regsets_store_inferior_registers, linux_read_memory)
8123 (linux_write_memory): Inline `inferior_pid'.
8124 (linux_look_up_symbols): Adjust to use per-process
8125 `thread_db_active'.
8126 (linux_request_interrupt): Adjust to use ptids.
8127 (linux_read_auxv): Inline `inferior_pid'.
8128 (initialize_low): Don't reference thread_db_active.
8129 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8130 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8131 (ps_getpid): Return the pid of the current inferior.
8132 * thread-db.c (proc_handle, thread_agent): Delete.
8133 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8134 per-process data.
8135 (find_one_thread): Change argument type to ptid_t. Adjust to
8136 per-process data.
8137 (maybe_attach_thread): Adjust to per-process data and ptids.
8138 (thread_db_find_new_threads): Ditto.
8139 (thread_db_init): Ditto.
8140 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8141 processes table. Adjust to use ptids.
8142 (spu_kill, spu_detach): Adjust interface. Remove process from
8143 processes table.
8144 (spu_join, spu_thread_alive): Adjust interface.
8145 (spu_wait): Adjust interface. Remove process from processes
8146 table. Adjust to use ptids.
8147 * win32-low.c (current_inferior_tid): Delete.
8148 (current_inferior_ptid): New.
8149 (debug_event_ptid): New.
8150 (thread_rec): Take a ptid. Adjust.
8151 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8152 (child_delete_thread): Ditto.
8153 (do_initial_child_stuff): Add `attached' argument. Add process to
8154 processes table.
8155 (child_fetch_inferior_registers, child_store_inferior_registers):
8156 Adjust.
8157 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8158 (win32_attach): Pass 1 to do_initial_child_stuff.
8159 (win32_kill): Adjust interface. Remove process from processes
8160 table.
8161 (win32_detach): Ditto.
8162 (win32_join): Adjust interface.
8163 (win32_thread_alive): Take a ptid.
8164 (win32_resume): Adjust to use ptids.
8165 (get_child_debug_event): Ditto.
8166 (win32_wait): Adjust interface. Remove exiting process from
8167 processes table.
8168
bd99dc85
PA
81692009-04-01 Pedro Alves <pedro@codesourcery.com>
8170
8171 Non-stop mode support.
8172
8173 * server.h (non_stop): Declare.
8174 (gdb_client_data, handler_func): Declare.
8175 (delete_file_handler, add_file_handler, start_event_loop):
8176 Declare.
8177 (handle_serial_event, handle_target_event, push_event)
8178 (putpkt_notif): Declare.
8179 * target.h (enum resume_kind): New.
8180 (struct thread_resume): Replace `step' field by `kind' field.
8181 (TARGET_WNOHANG): Define.
8182 (struct target_ops) <wait>: Add `options' argument.
8183 <supports_non_stop, async, start_non_stop>: New fields.
8184 (target_supports_non_stop, target_async): New.
8185 (start_non_stop): Declare.
8186 (mywait): Add `options' argument.
8187 * target.c (mywait): Add `options' argument. Print child exit
8188 notifications here.
8189 (start_non_stop): New.
8190 * server.c (non_stop, own_buf, mem_buf): New globals.
8191 (struct vstop_notif): New.
8192 (notif_queue): New global.
8193 (queue_stop_reply, push_event, discard_queued_stop_replies)
8194 (send_next_stop_reply): New.
8195 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8196 interface changes.
8197 (attach_inferior): In non-stop mode, don't wait for the target
8198 here.
8199 (handle_general_set): Handle QNonStop.
8200 (handle_query): When handling qC, return the current general
8201 thread, instead of the first thread of the list.
8202 (handle_query): If the backend supports non-stop mode, include
8203 QNonStop+ in the qSupported query response.
8204 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8205 and non-stop mode.
8206 (handle_v_attach, handle_v_run): Handle non-stop mode.
8207 (handle_v_stopped): New.
8208 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8209 (myresume): Adjust to use resume_kind. Handle non-stop.
8210 (queue_stop_reply_callback): New.
8211 (handle_status): Handle non-stop mode.
8212 (main): Clear non_stop flag on reconnection. Use the event-loop.
8213 Refactor serial protocol handling from here ...
8214 (process_serial_event): ... to this new function. When GDB
8215 selects any thread, select one here. In non-stop mode, wait until
8216 GDB acks all pending events before exiting.
8217 (handle_serial_event, handle_target_event): New.
8218 * remote-utils.c (remote_open): Install remote_desc in the event
8219 loop.
8220 (remote_close): Remove remote_desc from the event loop.
8221 (putpkt_binary): Rename to...
8222 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8223 (putpkt_binary): New as wrapper around putpkt_binary_1.
8224 (putpkt_notif): New.
8225 (prepare_resume_reply): In non-stop mode, don't change the
8226 general_thread.
8227 * event-loop.c: New.
8228 * Makefile.in (OBJ): Add event-loop.o.
8229 (event-loop.o): New rule.
8230
8231 * linux-low.h (pid_of): Moved here.
8232 (lwpid_of): New.
8233 (get_lwp_thread): Use lwpid_of.
8234 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8235 * linux-low.c (pid_of): Delete.
8236 (inferior_pid): Use lwpid_of.
8237 (linux_event_pipe): New.
8238 (target_is_async_p): New.
8239 (delete_lwp): New.
8240 (handle_extended_wait): Use lwpid_of.
8241 (add_lwp): Don't set lwpid field.
8242 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8243 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8244 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8245 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8246 first. Adjust to linux_wait_for_event interface changes. Use
8247 lwpid_of.
8248 (linux_detach): Don't delete the main lwp here.
8249 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8250 (status_pending_p): Don't consider explicitly suspended lwps.
8251 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8252 pointer. Add OPTIONS argument. Change return type to int. Use
8253 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8254 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8255 pointer. Add status pointer argument. Return a pid instead of a
8256 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8257 changes. In non-stop mode, don't switch to a random thread.
8258 (linux_wait): Rename to...
8259 (linux_wait_1): ... this. Add target_options argument, and handle
8260 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8261 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8262 clean exit and signal exit code. Don't stop all threads in
8263 non-stop mode. In all-stop mode, only stop all threads when
8264 reporting a stop to GDB. Handle explicit thread stop requests.
8265 (async_file_flush, async_file_mark): New.
8266 (linux_wait): New.
8267 (send_sigstop): Use lwpid_of.
8268 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8269 interface changes. In non-stop mode, don't switch to a random
8270 thread.
8271 (linux_resume_one_lwp): Use lwpid_of.
8272 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8273 (linux_resume_one_thread): ... this. Handle resume_stop. In
8274 non-stop mode, don't look for pending flag in all threads.
8275 (resume_status_pending_p): Don't consider explicitly suspended
8276 threads.
8277 (my_waitpid): Reimplement. Emulate __WALL.
8278 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8279 Use lwpid_of.
8280 (sigchld_handler, linux_supports_non_stop, linux_async)
8281 (linux_start_non_stop): New.
8282 (linux_target_ops): Register linux_supports_non_stop, linux_async
8283 and linux_start_non_stop.
8284 (initialize_low): Install SIGCHLD handler.
8285 * thread-db.c (thread_db_create_event, find_one_thread)
8286 (thread_db_get_tls_address): Use lwpid_of.
8287 * win32-low.c (win32_detach): Adjust to use resume_kind.
8288 (win32_wait): Add `options' argument.
8289 * spu-low.c (spu_resume): Adjust to use resume_kind.
8290 (spu_wait): Add `options' argument.
8291
5b1c542e
PA
82922009-04-01 Pedro Alves <pedro@codesourcery.com>
8293
8294 Decouple target code from remote protocol.
8295
8296 * target.h (enum target_waitkind): New.
8297 (struct target_waitstatus): New.
8298 (struct target_ops) <wait>: Return an unsigned long. Take a
8299 target_waitstatus pointer instead of a char pointer.
8300 (mywait): Likewise.
8301 * target.c (mywait): Change prototype to return an unsigned long.
8302 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8303 * server.h (thread_from_wait, old_thread_from_wait): Delete
8304 declarations.
8305 (prepare_resume_reply): Change prototype to take a
8306 target_waitstatus.
8307 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8308 (last_status, last_ptid): New.
8309 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8310 pid instead of a signal.
8311 (attach_inferior): Remove "status" and "signal" parameters.
8312 Adjust.
8313 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8314 not as an address.
8315 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8316 (handle_v_requests, myresume): Remove "status" and "signal"
8317 parameters. Adjust.
8318 (handle_status): New.
8319 (main): Delete local `status'. Adjust.
8320 * remote-utils.c: Include target.h.
8321 (prepare_resume_reply): Change prototype to take a
8322 target_waitstatus. Adjust.
8323
8324 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8325 interface.
8326 * spu-low.c (spu_wait): Adjust.
8327 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8328 Delete.
8329 (win32_wait): Adjust.
8330
2bd7c093
PA
83312009-04-01 Pedro Alves <pedro@codesourcery.com>
8332
8333 * target.h (struct thread_resume): Delete leave_stopped member.
8334 (struct target_ops): Add a `n' argument to the `resume' callback.
8335 * server.c (start_inferior): Adjust.
8336 (handle_v_cont, myresume): Adjust.
8337 * linux-low.c (check_removed_breakpoint): Adjust to resume
8338 interface change, and to removed leave_stopped field.
8339 (resume_ptr): Delete.
8340 (struct thread_resume_array): New.
8341 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8342 resume interface change.
8343 (linux_continue_one_thread, linux_queue_one_thread)
8344 (resume_status_pending_p): Check if the resume field is NULL
8345 instead of checking the leave_stopped member.
8346 (linux_resume): Adjust to the target resume interface change.
8347 * spu-low.c (spu_resume): Adjust to the target resume interface
8348 change.
8349 * win32-low.c (win32_detach, win32_resume): Ditto.
8350
c35fafde
PA
83512009-04-01 Pedro Alves <pedro@codesourcery.com>
8352
8353 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8354 flag.
8355 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8356 pending.
8357 (linux_continue_one_thread): Only preserve the stepping flag if
8358 there's a pending breakpoint.
8359
0a59d50b
PA
83602009-03-31 Pedro Alves <pedro@codesourcery.com>
8361
8362 * server.c (main): After the inferior having exited, call
8363 remote_close before exiting gdbserver.
8364
f04c6d38
TJB
83652009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8366
8367 Fix size of FPSCR in Power 7 processors.
8368 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8369 (PPC_FEATURE_HAS_DFP): New #define.
8370 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8371 size of the FPSCR.
8372
78e5cee6
PA
83732009-03-23 Pedro Alves <pedro@codesourcery.com>
8374
8375 * server.c (handle_query) Whitespace and formatting.
8376
1b3f6016
PA
83772009-03-22 Pedro Alves <pedro@codesourcery.com>
8378
8379 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8380 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8381 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8382 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8383 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8384 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8385 Makefile.in, configure.ac: Fix whitespace throughout.
8386 * configure: Regenerate.
8387
a07b2135
PA
83882009-03-22 Pedro Alves <pedro@codesourcery.com>
8389
8390 * inferiors.c (find_inferior): Make it safe for the callback
8391 function to delete the currently iterated inferior.
8392
67cc2626
PA
83932009-03-22 Pedro Alves <pedro@codesourcery.com>
8394
8395 * Makefile.in (linuw_low_h): Move higher.
8396 (thread-db.o): Depend on $(linux_low_h).
8397
54a0b537
PA
83982009-03-17 Pedro Alves <pedro@codesourcery.com>
8399
8400 Rename "process" to "lwp" throughout.
8401
8402 * linux-low.c (all_processes): Rename to...
8403 (all_lwps): ... this.
8404 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8405 (add_process): Rename to ...
8406 (add_lwp): ... this. Adjust.
8407 (linux_create_inferior): Adjust.
8408 (linux_attach_lwp): Adjust.
8409 (linux_attach): Adjust.
8410 (linux_kill_one_process): Rename to ...
8411 (linux_kill_one_lwp): ... this. Adjust.
8412 (linux_kill): Adjust.
8413 (linux_detach_one_process): Rename to ...
8414 (linux_detach_one_lwp): ... this. Adjust.
8415 (linux_detach): Adjust.
8416 (check_removed_breakpoint): Adjust.
8417 (status_pending_p): Adjust.
8418 (linux_wait_for_process): Rename to ...
8419 (linux_wait_for_lwp): ... this. Adjust.
8420 (linux_wait_for_event): Adjust.
8421 (send_sigstop): Adjust.
8422 (wait_for_sigstop): Adjust.
8423 (stop_all_processes): Rename to ...
8424 (stop_all_lwps): ... this.
8425 (linux_resume_one_process): Rename to ...
8426 (linux_resume_one_lwp): ... this. Adjust.
8427 (linux_set_resume_request, linux_continue_one_thread)
8428 (linux_queue_one_thread, resume_status_pending_p)
8429 (usr_store_inferior_registers, regsets_store_inferior_registers)
8430 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8431 Adjust.
8432 * linux-low.h (get_process): Rename to ...
8433 (get_lwp): ... this. Adjust.
8434 (get_thread_process): Rename to ...
8435 (get_thread_lwp): ... this. Adjust.
8436 (get_process_thread): Rename to ...
8437 (get_lwp_thread): ... this. Adjust.
8438 (struct process_info): Rename to ...
8439 (struct lwp_info): ... this.
8440 (all_processes): Rename to ...
8441 (all_lwps): ... this.
8442 * proc-service.c (ps_lgetregs): Adjust.
8443 * thread-db.c (thread_db_create_event, find_one_thread)
8444 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8445
0b16c5cf
PA
84462009-03-14 Pedro Alves <pedro@codesourcery.com>
8447
8448 * server.c (handle_query): Handle "qAttached".
8449
32de4b9d
NS
84502009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8451
8452 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8453 GPLv3, update license URL.
8454
2aecd87f
DE
84552009-03-01 Doug Evans <dje@google.com>
8456
93efd302 8457 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8458 (server_h): Add gdb_signals.h.
8459 (signals.o): Update.
8460 * server.h (target_signal_from_host,target_signal_to_host_p)
8461 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8462
86b1f9c5
PM
84632009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8464
8465 * remote-utils.c (getpkt): Also generate remote-debug
8466 information if noack_mode is set.
8467
4aa995e1
PA
84682009-02-06 Pedro Alves <pedro@codesourcery.com>
8469
8470 * server.c (handle_query): Report qXfer:siginfo:read and
8471 qXfer:siginfo:write as supported and handle them.
8472 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8473 * linux-low.c (linux_xfer_siginfo): New.
8474 (linux_target_ops): Set it.
8475
62709adf
PA
84762009-01-26 Pedro Alves <pedro@codesourcery.com>
8477
8478 * server.c (gdbserver_usage): Mention --remote-debug.
8479 (main): Accept '--remote-debug' switch.
8480
aef93bd7
DE
84812009-01-18 Doug Evans <dje@google.com>
8482
8483 * regcache.c (new_register_cache): No need to check result of xcalloc.
8484 * server.c (handle_search_memory): Back out calls to xmalloc,
8485 result is checked and error is returned to user upon failure.
8486 (handle_query): Ditto. Add more checks for result of malloc.
8487 (handle_v_cont): Check result of malloc, report error back to
8488 user upon failure.
8489 (handle_v_run): Ditto. Call freeargv.
8490 * server.h (freeargv): Declare.
8491 * utils.c (freeargv): New fn.
8492
54363045
DE
84932009-01-15 Doug Evans <dje@google.com>
8494
f626972c
DE
8495 * gdbreplay.c (perror_with_name): Make arg const char *.
8496 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8497 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8498 * utils.c (perror_with_name): Make arg const char *.
54363045 8499
18aae699
PA
85002009-01-14 Pedro Alves <pedro@codesourcery.com>
8501
8502 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8503 when handling a EXIT_PROCESS_DEBUG_EVENT.
8504
ff703abe
JB
85052009-01-06 Joel Brobecker <brobecker@adacore.com>
8506
8507 * gdbreplay.c (gdbreplay_version): Update copyright year.
8508 * server.c (gdbserver_version): Likewise.
8509
f21cc1a2 85102009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8511
8512 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8513 (handle_extended_wait): Improve comment.
0e21c1ec 8514
bca929d3
DE
85152008-12-13 Doug Evans <dje@google.com>
8516
8517 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8518 * server.h (ATTR_MALLOC): New macro.
8519 (xmalloc,xcalloc,xstrdup): Declare.
8520 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8521 * inferiors.c: Ditto.
8522 * linux-low.c: Ditto.
8523 * mem-break.c: Ditto.
8524 * regcache.c: Ditto.
8525 * remote-utils.c: Ditto.
8526 * server.c: Ditto.
8527 * target.c: Ditto.
8528 * win32-low.c: Ditto.
8529
97438e3f
DE
85302008-12-12 Doug Evans <dje@google.com>
8531
896c7fbb
DE
8532 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8533 in debugging printf.
8534
97438e3f
DE
8535 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8536
e3b886f8
DE
85372008-12-09 Doug Evans <dje@google.com>
8538
8539 * linux-low.h (struct process_info): Delete member tid, unused.
8540 * thread-db.c (find_one_thread): Update.
8541 (maybe_attach_thread): Update.
8542
07e059b5
VP
85432008-12-02 Pedro Alves <pedro@codesourcery.com>
8544
889bf7c5
PA
8545 * target.h (struct target_ops): Add qxfer_osdata member.
8546 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8547 and dirent.h.
8548 (linux_qxfer_osdata): New functions.
8549 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8550 callback.
8551 * server.c (handle_query): Handle "qXfer:osdata:read:".
8552 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8553 (buffer_xml_printf): New functions.
8554 * server.h (struct buffer): New.
8555 (buffer_grow_str, buffer_grow_str0): New macros.
8556 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8557 (buffer_xml_printf): Declare.
07e059b5 8558
4cab47ab
DE
85592008-11-24 Doug Evans <dje@google.com>
8560
8561 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8562
f142445f
DJ
85632008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8564
8565 * server.c (handle_v_run): Always use the supplied argument list.
8566
d0107bb6 85672008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8568
d0107bb6
BW
8569 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8570 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8571
2c4ad781
TJB
85722008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8573
8574 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8575 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8576 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8577 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8578 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8579 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8580 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8581 XML target descriptions.
8582 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8583 when inferior is running on an ISA 2.05 or later processor. Add
8584 special case to return offset for full 64-bit slot of FPSCR when
8585 in 32-bits.
8586
dfb64f85
DJ
85872008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8588
8589 * Makefile.in (SFILES, clean): Added sparc64 files.
8590 (reg-sparc64.o, reg-sparc64.c): New.
8591 * configure.srv (sparc*-*-linux*): New configuration.
8592 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8593 syscall arguments for SPARC.
8594 (regsets_store_inferior_registers): Likewise.
8595 * linux-sparc-low.c: New file.
8596
66b6e1dd
DE
85972008-10-21 Doug Evans <dje@google.com>
8598
8599 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8600 (READLINE_DIR,READLINE_DEP): Delete.
8601 (INTERNAL_CFLAGS): Update.
8602 (LINTFLAGS): Update.
8603
9b710a42
PA
86042008-10-10 Pedro Alves <pedro@codesourcery.com>
8605
8606 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8607 whole argv from the last run, not just argv[0].
8608
5822d809
PA
86092008-09-08 Pedro Alves <pedro@codesourcery.com>
8610
8611 * regcache.c (new_register_cache): Return NULL if the register
8612 cache size isn't known yet.
8613 (free_register_cache): Avoid dereferencing a NULL regcache.
8614
74aac56f
DJ
86152008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8616
8617 * configure.srv: Merge MIPS and MIPS64.
8618
400b20f5
MR
86192008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8620
8621 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8622
677c5bb1
LM
86232008-08-18 Luis Machado <luisgpm@br.ibm.com>
8624
8625 * Makefile.in: Add required vsx dependencies.
8626
8627 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8628 Declare init_registers_powerpc_vsx32l.
8629 Declare init_registers_powerpc_vsx64l.
8630 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8631 (ppc_arch_setup): Check for VSX in hwcap.
8632 (ppc_fill_vsxregset): New function.
8633 (ppc_store_vsxregset): New function.
8634 Add new VSX entry in regset_info target_regsets.
8635
8636 * configure.srv: Add new VSX dependencies.
8637
a6f3e723
SL
86382008-08-12 Pedro Alves <pedro@codesourcery.com>
8639
8640 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8641 (remote_open): Set or clear transport_is_reliable.
8642 (putpkt_binary): Don't expect acks in noack mode.
8643 (getpkt): Don't send ack/nac in noack mode.
8644 * server.c (handle_general_set): Handle QStartNoAckMode.
8645 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8646 qSupported.
8647 (main): Reset noack_mode on every connection.
8648 * server.h (noack_mode): Declare.
8649
a417dc56
RW
86502008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8651
8652 * Makefile.in (GDBREPLAY_OBS): New variable.
8653 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8654
3221518c
UW
86552008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8656 Daniel Jacobowitz <dan@codesourcery.com>
8657
8658 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8659 (usr_store_inferior_registers): Likewise.
8660 (regsets_store_inferior_registers): Likewise.
8661
ec56be1b
PA
86622008-07-31 Rolf Jansen <rj@surtec.com>
8663 Pedro Alves <pedro@codesourcery.com>
8664
8665 * configure.ac: Check for memmem declaration.
8666 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8667 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8668 (disable_packet_qfThreadInfo): Unconditionally compile.
8669 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8670 * configure, config.in: Regenerate.
8671
2fe5e3ff
DE
86722008-07-28 Doug Kwan <dougkwan@google.com>
8673
8674 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8675 (linux_write_memory): Remove declaration of errno.
8676
836acd6d
UW
86772008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8678
8679 * linux-low.c (handle_extended_wait): Do not use "status"
8680 variable uninitialized.
8681
aeba519e
PA
86822008-07-07 Pedro Alves <pedro@codesourcery.com>
8683
8684 * server.c (handle_v_attach): Inhibit reporting dll changes.
8685
db42f210
PA
86862008-06-27 Pedro Alves <pedro@codesourcery.com>
8687
8688 * remote-utils.c (prepare_resume_reply): If requested, don't
8689 output "thread:TID" in the T stop reply.
8690
8691 * server.c (disable_packet_vCont, disable_packet_Tthread)
8692 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8693 (handle_query): If requested, disable support for qC, qfThreadInfo
8694 and qsThreadInfo.
8695 (handle_v_requests): If requested, disable support for vCont.
8696 (gdbserver_show_disableable): New.
8697 (main): Handle --disable-packet and --disable-packet=LIST.
8698
8699 * server.h (disable_packet_vCont, disable_packet_Tthread)
8700 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8701
8e4c5421
CD
87022008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8703
8704 * server.c (gdbserver_usage): Mention --version.
8705
6e23a804
DJ
87062008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8707
8708 * Makefile.in (gdbreplay.o): New rule.
8709
90aa6a40
JM
87102008-06-06 Joseph Myers <joseph@codesourcery.com>
8711
8712 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8713 message, not gdbserver.
8714
c16158bc 87152008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8716 Nathan Sidwell <nathan@codesourcery.com>
8717 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8718
8719 * acinclude.m4: Include ../../config/acx.m4.
8720 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8721 * configure, config.in: Regenerate.
8722 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8723 * server.c (gdbserver_version): Print PKGVERSION.
8724 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8725 (main): Adjust gdbserver_usage calls.
8726 * gdbreplay.c (version, host_name): Add declarations.
8727 (gdbreplay_version, gdbreplay_usage): New.
8728 (main): Accept --version and --help options.
8729
aeb75bf5
DJ
87302008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8731
8732 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8733 (arm_breakpoint_at): Handle Thumb.
8734 (the_low_target): Add comment.
8735
76b233dd
UW
87362008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8737
8738 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8739
08388c79
DE
87402008-05-09 Doug Evans <dje@google.com>
8741
a3c83fae
DE
8742 * server.h (decode_search_memory_packet): Declare.
8743 * remote-utils.c (decode_search_memory_packet): New fn.
8744 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8745 (handle_search_memory): New fn.
8746 (handle_query): Process qSearch:memory packets.
8747
bb9c3d36
UW
87482008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8749
8750 * regcache.c (registers_length): Remove.
8751 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8752 full register packet.
8753 * regcache.h (registers_length): Remove prototype.
8754 * server.h (PBUFSIZ): Define to 16384.
8755
7284e1be
UW
87562008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8757
8758 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8759 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8760 powerpc-64l.o, and powerpc-altivec64l.o.
8761 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8762 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8763 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8764 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8765 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8766 to srv_xmlfiles.
8767
8768 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8769 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8770 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8771 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8772 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8773 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8774 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8775 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8776 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8777 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8778 (clean): Update.
8779
8780 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8781 (init_registers_powerpc_32l): ... this new prototype.
8782 (init_registers_powerpc_32): Remove, replace by ...
8783 (init_registers_powerpc_altivec32l): ... this new prototype.
8784 (init_registers_powerpc_e500): Remove, replace by ...
8785 (init_registers_powerpc_e500l): ... this new prototype.
8786 (init_registers_ppc64): Remove, replace by ...
8787 (init_registers_powerpc_64l): ... this new prototype.
8788 (init_registers_powerpc_64): Remove, replace by ...
8789 (init_registers_powerpc_altivec64l): ... this new prototype.
8790 (ppc_num_regs): Set to 73.
8791 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8792 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8793 (ppc_cannot_store_register): Handle orig_r3 and trap.
8794 (ppc_arch_setup): Update init_registers_... calls.
8795 (ppc_fill_gregset): Handle orig_r3 and trap.
8796
8797 * inferiors.c (clear_inferiors): Reset current_inferior.
8798
fdc59709
PB
87992008-04-23 Paolo Bonzini <bonzini@gnu.org>
8800
889bf7c5
PA
8801 * acinclude.m4: Add override.m4.
8802 * configure: Regenerate.
fdc59709 8803
c9b2f845
UW
88042008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8805
8806 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8807 initial call to init_register_ppc64.
8808
550512b8
UW
88092008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8810
43aaf8b6
PA
8811 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8812 single powerpc*-*-linux* case.
550512b8
UW
8813 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8814
b6430ec3
UW
88152008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8816
8817 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8818 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8819 from reg_xmlfiles.
8820 * linux-ppc-low.c: Include <elf.h>.
8821 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8822 (ppc_hwcap): New global variable.
8823 (ppc_regmap): Remove __SPE__ #ifdef sections.
8824 (ppc_regmap_e500): New global variable.
8825 (ppc_cannot_store_register): Update __SPE__ special case.
8826 (ppc_get_hwcap): New function.
8827 (ppc_arch_setup): Use it to determine whether inferior supports
8828 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8829 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8830 Do not access registers if target does not support AltiVec.
8831 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8832 Do not access registers if target does not support SPE.
8833 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8834
52fa2412
UW
88352008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8836
8837 * linux-low.c (disabled_regsets, num_regsets): New.
8838 (use_regsets_p): Delete.
8839 (linux_wait_for_process): Clear disabled_regsets.
8840 (regsets_fetch_inferior_registers): Check and set it.
8841 (regsets_store_inferior_registers): Likewise.
8842 (linux_fetch_registers, linux_store_registers): Do not use
8843 use_regsets_p.
8844 (initialize_low): Allocate disabled_regsets.
8845
e28b3332
DJ
88462008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8847
8848 * Makefile.in (LIBOBJS): New.
8849 (OBS): Use LIBOBJS.
8850 (memmem.o): New rule.
8851 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8852 * configure: Regenerated.
8853
4536995d
UW
88542008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8855
8856 * server.c (handle_query): Never return "unsupported" for
8857 qXfer:features:read queries.
8858
221c031f
UW
88592008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8860
8861 * server.c (get_features_xml): Fix inverted condition.
8862 (handle_query): Always support qXfer:feature:read.
8863
ccd213ac
DJ
88642008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8865
8866 * server.c (wrapper_argv): New.
8867 (start_inferior): Handle wrapper_argv. If set, expect an extra
8868 trap.
8869 (gdbserver_usage): Document --wrapper.
8870 (main): Parse --wrapper.
8871
6fe305f7
UW
88722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8873
8874 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8875 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8876 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8877 (ppc_set_pc): Likewise.
8878 (ppc_arch_setup): New function.
8879 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8880 of collect_register.
889bf7c5 8881 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8882
5b0a002e
UW
88832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8884
8885 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8886 instead of linux-ppc64-low.o.
8887 * linux-ppc64-low.c: Remove file.
8888 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8889 (linux-ppc64-low.o): Remove rule.
8890
8891 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8892 (init_registers_powerpc_64): Likewise.
8893 (ppc_regmap): Conditionally define depending on __powerpc64__.
8894 (ppc_cannot_store_register): Do not special-case "fpscr" when
8895 compiled on __powerpc64__.
8896 (ppc_collect_ptrace_register): New function.
8897 (ppc_supply_ptrace_register): New function.
8898 (ppc_breakpoint): Change type to "unsigned int".
8899 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8900 (the_low_target): Conditionally provide initializers for the
889bf7c5 8901 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8902 collect_ptrace_register and supply_ptrace_register members.
8903
9b4b61c8
UW
89042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8905
8906 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8907 * server.c (gdbserver_xmltarget): Define.
8908 (get_features_xml): Use it to replace "target.xml" and arch_string.
8909
8910 * configure.srv: Remove srv_xmltarget. Add XML files that were
8911 mentioned there to srv_xmlfiles instead. Remove conditional tests
8912 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8913 srv_xmlfiles and srv_regobj to include all possible choices.
8914 * configure.ac (srv_xmltarget): Remove.
8915 (srv_xmlfiles): Do not add "target.xml".
8916 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8917 checks for supplementary target information.
8918 * configure: Regenerate.
8919 * Makefile.in (XML_TARGET): Remove.
8920 (target.xml): Remove rule.
8921 (clean): Do not clean up target.xml.
8922 (.PRECIOUS): Do not mention target.xml.
8923
8924 * target.h (struct target_ops): Remove arch_string member.
8925 * linux-low.c (linux_arch_string): Remove.
8926 (linux_target_ops): Remove arch_string initializer.
8927 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8928 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8929 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8930 * spu-low.c (spu_arch_string): Remove.
8931 (spu_target_ops): Remove arch_string initializer.
8932 * win32-low.c (win32_arch_string): Remove.
8933 (win32_target_ops): Remove arch_string initializer.
8934 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8935 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8936 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8937
ee1a7ae4
UW
89382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8939
8940 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8941 by collect_ptrace_register and supply_ptrace_register hooks.
8942 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8943 instead of checking for the_low_target.left_pad_xfer.
8944 (usr_store_inferior_registers): Use collect_ptrace_register callback
8945 instead of checking for the_low_target.left_pad_xfer.
8946
8947 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8948 (s390_supply_ptrace_register): Likewise.
8949 (s390_fill_gregset): Call s390_collect_ptrace_register.
8950 (the_low_target): Update.
8951
8952 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8953 (ppc_supply_ptrace_register): Likewise.
8954 (the_low_target): Update.
8955
8956 * linux-i386-low.c (the_low_target): Update.
8957 * linux-x86-64-low.c (the_low_target): Update.
8958
d61ddec4
UW
89592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8960
8961 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8962 reg-s390.o and reg-s390x.o.
8963
8964 * linux-low.c (new_inferior): New global variable.
8965 (linux_create_inferior, linux_attach): Set it.
8966 (linux_wait_for_process): Call the_low_target.arch_setup after the
8967 target has stopped for the first time.
8968 (initialize_low): Do not call the_low_target.arch_setup.
8969
8970 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8971 (s390_set_pc): Likewise.
8972 (s390_arch_setup): New function.
8973 (the_low_target): Use s390_arch_setup as arch_setup routine.
8974
8975 * regcache.c (realloc_register_cache): New function.
8976 (set_register_cache): Call it for each existing regcache.
8977
d05b4ac3
UW
89782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8979
8980 * server.h (init_registers): Remove prototype.
8981
8982 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8983 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8984 instead of init_registers ().
8985 * linux-arm-low.c (init_registers_arm): Add prototype.
8986 (init_registers_arm_with_iwmmxt): Likewise.
8987 (the_low_target): Add initializer for arch_setup field.
8988 * linux-cris-low.c (init_registers_cris): Add prototype.
8989 (the_low_target): Add initializer for arch_setup field.
8990 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8991 (the_low_target): Add initializer for arch_setup field.
8992 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8993 (the_low_target): Add initializer for arch_setup field.
8994 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8995 (the_low_target): Add initializer for arch_setup field.
8996 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8997 (the_low_target): Add initializer for arch_setup field.
8998 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8999 (the_low_target): Add initializer for arch_setup field.
9000 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9001 (init_registers_mips64_linux): Likewise.
9002 (the_low_target): Add initializer for arch_setup field.
9003 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9004 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9005 (the_low_target): Add initializer for arch_setup field.
9006 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9007 (init_registers_powerpc_64): Likewise.
9008 (the_low_target): Add initializer for arch_setup field.
9009 * linux-s390-low.c (init_registers_s390): Add prototype.
9010 (init_registers_s390x): Likewise.
9011 (the_low_target): Add initializer for arch_setup field.
9012 * linux-sh-low.c (init_registers_sh): Add prototype.
9013 (the_low_target): Add initializer for arch_setup field.
9014 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9015 (the_low_target): Add initializer for arch_setup field.
9016 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9017 (the_low_target): Add initializer for arch_setup field.
9018
9019 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9020 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9021 instead of init_registers ().
9022 * win32-arm-low.c (init_registers_arm): Add prototype.
9023 (the_low_target): Add initializer for arch_setup field.
9024 * win32-i386-low.c (init_registers_i386): Add prototype.
9025 (the_low_target): Add initializer for arch_setup field.
9026
9027 * spu-low.c (init_registers_spu): Add prototype.
9028 (initialize_low): Call initialie_registers_spu () instead of
9029 initialize_registers ().
9030
fd96d250
PA
90312008-02-19 Pedro Alves <pedro@codesourcery.com>
9032
9033 * server.c (handle_v_requests): When handling the vRun and vAttach
9034 packets, if already debugging a process, don't kill it. Return an
9035 error instead.
9036
d41b6bb4
DJ
90372008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9038
9039 * server.c (handle_query): Correct length check.
9040
5ac588cf
PA
90412008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9042
9043 * win32-low.c (do_initial_child_stuff): Add process handle
9044 parameter. Set current_process_handle and current_process_id from the
9045 parameters. Clear globals.
9046 (win32_create_inferior): Don't set current_process_handle and
9047 current_process_id here. Instead pass them on the call to
9048 do_initial_child_stuff.
9049 (win32_attach): Likewise.
9050 (win32_clear_inferiors): New.
9051 (win32_kill): Don't close the current process handle or the
9052 current thread handle here. Instead call win32_clear_inferiors.
9053 (win32_detach): Don't open a new handle to the process. Call
9054 win32_clear_inferiors.
9055 (win32_join): Don't rely on current_process_handle; open a new
9056 handle using the process id.
9057 (win32_wait): Call win32_clear_inferiors when the inferior process
9058 has exited.
9059
ecd7ecbc
DJ
90602008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9061
9062 * server.c (monitor_show_help): Add "exit".
9063
1525d545
MG
90642008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9065
ecd7ecbc 9066 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9067 (clean): Add reg-xtensa.c.
9068 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9069 * configure.srv (xtensa*-*-linux*) New target.
9070 * linux-xtensa-low.c: New.
9071 * xtensa-xtregs.c: New.
1525d545 9072
59a016f0
PA
90732008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9074
9075 * hostio.c: Don't include errno.h.
9076 (errno_to_fileio_errno): Move to hostio-errno.
9077 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9078 error number outputting to the target->hostio_last_error callback.
9079 (hostio_packet_error): Use FILEIO_EINVAL directly.
9080 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9081 calls to hostio_error.
9082 * hostio-errno.c: New.
9083 * server.h (hostio_last_error_from_errno): Declare.
9084 * target.h (target_ops): Add hostio_last_error member.
9085 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9086 as hostio_last_error handler.
889bf7c5 9087 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9088 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9089 (wince_hostio_last_error): New functions.
9090 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9091 as hostio_last_error handler.
9092 (win32_target_ops) [!_WIN32_WCE]: Register
9093 hostio_last_error_from_errno as hostio_last_error handler.
9094 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9095 (hostio-errno.o): New rule.
9096 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9097 * configure.srv (srv_hostio_err_objs): New variable. Default to
9098 hostio-errno.o.
9099 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9100 * configure: Regenerate.
9101
2d717e4f
DJ
91022008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9103
9104 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9105 (linux_kill, linux_detach): Clean up the process list.
9106 * remote-utils.c (remote_open): Improve port number parsing.
9107 (putpkt_binary, input_interrupt): Only send interrupts if the target
9108 is running.
9109 * server.c (extended_protocol): Make static.
9110 (attached): Define earlier.
9111 (exit_requested, response_needed, program_argv): New variables.
9112 (target_running): New.
9113 (start_inferior): Clear attached here.
9114 (attach_inferior): Set attached here.
9115 (require_running): Define.
9116 (handle_query): Use require_running and target_running. Implement
9117 "monitor exit".
9118 (handle_v_attach, handle_v_run): New.
9119 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9120 (gdbserver_usage): Update.
9121 (main): Redo argument parsing. Handle --debug and --multi. Handle
9122 --attach along with other options or after the port. Save
9123 program_argv. Support no initial program. Resynchronize
9124 communication with GDB after an error. Handle "monitor exit".
9125 Use require_running and target_running. Always allow the extended
9126 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9127 restart in extended mode.
9128 * README: Refer to the GDB manual. Update --attach usage.
9129
7407e2de
AS
91302007-12-20 Andreas Schwab <schwab@suse.de>
9131
9132 * linux-low.c (STACK_SIZE): Define.
9133 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9134 (linux_test_for_tracefork): Likewise.
9135
b65d95c5
DJ
91362007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9137
9138 * linux-low.c (linux_wait_for_event): Update messages. Do not
9139 reinsert auto-delete breakpoints.
9140 * mem-break.c (struct breakpoint): Change return type of handler to
9141 int.
9142 (set_breakpoint_at): Update handler type.
9143 (reinsert_breakpoint_handler): Return 1 instead of calling
9144 delete_breakpoint.
9145 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9146 setting a new one.
9147 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9148 * mem-break.h (set_breakpoint_at): Update handler type.
9149 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9150 * win32-low.c (auto_delete_breakpoint): New.
9151 (get_child_debug_event): Use it.
9152
4e799345
DJ
91532007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9154
9155 * configure.ac: Check for pread and pwrite.
9156 * hostio.c (handle_pread): Fall back to lseek and read.
9157 (handle_pwrite): Fall back to lseek and write.
9158 * config.in, configure: Regenerated.
9159
27524b67
DJ
91602007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9161
9162 * server.c (myresume): Add own_buf argument.
9163 (main): Update calls.
9164
a20d5e98
DJ
91652007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9166
9167 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9168 * remote-utils.c (remote_open): Do not call disable_async_io.
9169 (block_async_io): Delete.
9170 (unblock_async_io): Make static.
9171 (initialize_async_io): New.
9172 * server.c (handle_v_cont): Handle async I/O here.
9173 (myresume): Likewise. Move other common resume tasks here...
9174 (main): ... from here. Call initialize_async_io. Disable async
9175 I/O before the main loop.
9176 * server.h (initialize_async_io): Declare.
9177 (block_async_io, unblock_async_io): Delete prototypes.
9178 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9179
b79d787e
DJ
91802007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9181
9182 * remote-utils.c (readchar): Allow binary data in received messages.
9183
d97903b2
PA
91842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9185
9186 * win32-low.c (attaching): New global.
9187 (win32_create_inferior): Clear the `attaching' global.
9188 (win32_attach): Set the `attaching' global.
9189 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9190 attaching. Only set a breakpoint at the entry point if not
9191 attaching.
9192
311de423
PA
91932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9194
9195 * server.c (main): Don't report dll events on the initial
9196 connection on attaches.
9197
6c2d16d2
PA
91982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9199
9200 * server.c (main): Relax numerical bases supported for the pid of
9201 the --attach command line argument.
9202
5ca906e6
PA
92032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9204
9205 * win32-low.c (win32_attach): Call OpenProcess before
9206 DebugActiveProcess, not after. Add last error output to error
9207 call.
9208
9c6c8194
PA
92092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9210
9211 * win32-low.c (win32_get_thread_context)
9212 (win32_set_thread_context): New functions.
9213 (thread_rec): Use win32_get_thread_context.
9214 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9215 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9216 field.
9217
4d5d1aaa
PA
92182007-12-03 Leo Zayas
9219 Pedro Alves <pedro_alves@portugalmail.pt>
9220
9221 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9222 global variables.
9223 (child_add_thread): Minor cleanup.
9224 (child_continue): Resume artificially suspended threads before
9225 calling ContinueDebugEvent.
9226 (suspend_one_thread): New.
9227 (fake_breakpoint_event): New.
9228 (get_child_debug_event): Change return type to int. Check here if
9229 gdb sent an interrupt request. If a soft interrupt was requested,
9230 fake a breakpoint event. Return 0 if there is no event to handle,
9231 and 1 otherwise.
9232 (win32_wait): Don't check here if gdb sent an interrupt request.
9233 Ensure there is a valid event to handle.
9234 (win32_request_interrupt): Add soft interruption method as last
9235 resort.
9236
c436e841
PA
92372007-12-03 Leo Zayas
9238 Pedro Alves <pedro_alves@portugalmail.pt>
9239
9240 * win32-low.h (win32_thread_info): Add descriptions to the
9241 structure members. Replace `suspend_count' counter by a
9242 `suspended' flag.
9243 * win32-low.c (thread_rec): Update condition of when to get the
9244 context from the inferior. Rely on ContextFlags being set if it
9245 has already been retrieved. Only suspend the inferior thread if
9246 we haven't already. Warn if that fails.
9247 (continue_one_thread): s/suspend_count/suspended/. Only call
9248 ResumeThread once. Warn if that fails.
9249
e7b5fa67
PA
92502007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9251
9252 * win32-low.c (win32_wait): Don't read from the inferior when it
9253 has already exited.
9254
a385171d
PA
92552007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9256
9257 * Makefile.in (win32_low_h): New variable.
9258 (win32-low.o): Add dependency on $(win32_low_h).
9259 (win32-arm-low.o, win32-i386-low.o): New rules.
9260
f80c84b3
DJ
92612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9262
9263 * hostio.c: Correct copyright year.
9264
a6b151f1
DJ
92652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9266
9267 * Makefile.in (OBS): Add hostio.o.
9268 (hostio.o): New rule.
9269 * server.h (handle_vFile): Declare.
9270 * hostio.c: New file.
9271 * server.c (handle_v_requests): Take packet_len and new_packet_len
9272 for binary packets. Call handle_vFile.
9273 (main): Update call to handle_v_requests.
9274
f9387fc3
DJ
92752007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9276
9277 * linux-low.c: Include <sched.h>.
9278
51c2684e
DJ
92792007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9280
9281 * linux-low.c (linux_tracefork_grandchild): New.
9282 (linux_tracefork_child): Use clone.
9283 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9284
75f83163
JB
92852007-10-31 Joel Brobecker <brobecker@adacore.com>
9286
9287 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9288
da5898ce
DJ
92892007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9290
9291 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9292
24a09b5f
DJ
92932007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9294
9295 * inferiors.c (change_inferior_id): Delete.
9296 (add_pid_to_list, pull_pid_from_list): New.
9297 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9298 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9299 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9300 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9301 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9302 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9303 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9304 (using_threads): Always set to 1.
9305 (handle_extended_wait): New.
9306 (add_process): Do not set TID.
9307 (linux_create_inferior): Set must_set_ptrace_flags.
9308 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9309 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9310 (linux_thread_alive): Rename TID argument to LWPID.
9311 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9312 (linux_wait_for_event): Do not use TID or check using_threads. Update
9313 call to dead_thread_notify. Call handle_extended_wait.
9314 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9315 (send_sigstop): Delete sigstop_sent.
9316 (wait_for_sigstop): Avoid TID.
9317 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9318 (linux_test_for_tracefork): New.
9319 (linux_lookup_signals): Use thread_db_active and
9320 linux_supports_tracefork_flag.
9321 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9322 * linux-low.h (get_process_thread): Avoid TID.
9323 (struct process_ifo): Move thread_known and tid to the end. Remove
9324 sigstop_sent.
9325 (linux_attach_lwp, thread_db_init): Update prototypes.
9326 * server.h (change_inferior_id): Delete prototype.
9327 (add_pid_to_list, pull_pid_from_list): New prototypes.
9328 * thread-db.c (thread_db_use_events): New.
9329 (find_first_thread): Rename to...
9330 (find_one_thread): ...this. Update callers and messages. Do not
9331 call fatal. Check thread_db_use_events. Do not call
9332 change_inferior_id or new_thread_notify.
9333 (maybe_attach_thread): Update. Do not call new_thread_notify.
9334 (thread_db_init): Set thread_db_use_events. Check use_events.
9335 * utils.c (fatal, warning): Correct message prefix.
9336
30ed0a8f
DJ
93372007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9338
9339 * Makefile.in (clean): Remove new files.
9340 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9341 (powerpc-64.o, powerpc-64.c): New rules.
9342 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9343 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9344 with SPE.
9345 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9346 SPE targets.
9347 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9348 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9349 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9350 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9351 (target_regsets): Add AltiVec and SPE register sets.
9352 * configure.ac: Check for AltiVec and SPE.
9353 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9354 (ppc_fill_vrregset, ppc_store_vrregset): New.
9355 (target_regsets): Add AltiVec register set.
9356 * configure: Regenerated.
9357
fd462a61
DJ
93582007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9359
9360 * linux-low.c (O_LARGEFILE): Define.
9361 (linux_read_memory): Use /proc/PID/mem.
9362 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9363 * configure, config.in: Regenerated.
9364
69f223ed
DJ
93652007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9366
9367 * linux-low.c (linux_wait_for_event): Do not pass signals while
9368 single-stepping.
9369
aec18585
PA
93702007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9371
9372 * win32-low.c (create_process): New.
9373 (win32_create_inferior): Use create_process instead of
9374 CreateProcess. If create_process failed retry appending an ".exe"
9375 suffix. Store the GetLastError result immediatelly after
9376 create_process calls and use it on the call to error.
9377
34d86ddd
PA
93782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9379
9380 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9381
5a0e3bd0
JB
93822007-08-23 Joel Brobecker <brobecker@adacore.com>
9383
9384 * configure.ac: Switch license to GPLv3.
9385
f88c79e6
MS
93862007-08-01 Michael Snyder <msnyder@access-company.com>
9387
9388 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9389
6b3d9b83
PA
93902007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9391
9392 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9393 typedef.
9394 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9395 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9396 CloseToolhelp32Snapshot.
9397 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9398 CloseToolhelp32Snapshot.
9399
c588c53c
MS
94002007-07-27 Michael Snyder <michael.snyder@access-company.com>
9401
9402 * server.c (main): Check for inferior exit before main loop.
9403
aa0403d9
PA
94042007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9405
9406 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9407 instead of on tmp_desc.
9408
255e7678
DJ
94092007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9410 Daniel Jacobowitz <dan@codesourcery.com>
9411
9412 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9413 (add_thread): Minor cleanups.
9414 (clear_inferiors): Move lower in the file. Clear the DLL
9415 list.
9416 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9417 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9418 (xml_escape_text): New.
9419 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9420 for qSupported.
9421 (handle_v_cont): Report errors.
9422 (gdbserver_version): Update.
9423 (main): Correct size of own_buf. Do not report initial DLL events.
9424 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9425 (unloaded_dll, xml_escape_text): New.
9426 * win32-low.c (enum target_waitkind): Update comments.
9427 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9428 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9429 (win32_EnumProcessModules, win32_GetModuleInformation)
9430 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9431 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9432 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9433 (win32_Module32First, win32_Module32Next, load_toolhelp)
9434 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9435 (get_child_debug_event): Handle DLL events.
9436 (win32_wait): Likewise.
9437
0d37add9
DJ
94382007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9439
9440 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9441 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9442
45e2715e
PA
94432007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9444
9445 * win32-low.c (handle_output_debug_string): Ignore event if not
9446 waiting.
9447
c5674cf1
PA
94482007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9449
9450 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9451
2bbe3cc1
DJ
94522007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9453
9454 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9455
ae13219e
DJ
94562007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9457
9458 * inferiors.c (change_inferior_id): Add comment.
9459 * linux-low.c (check_removed_breakpoint): Add an early
9460 prototype. Improve debug output.
9461 (linux_attach): Doc update.
9462 (linux_detach_one_process, linux_detach): Clean up before releasing
9463 each process.
9464 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9465 * linux-low.h (struct process_info): Doc improvement.
9466 * mem-break.c (delete_all_breakpoints): New.
9467 * mem-break.h (delete_all_breakpoints): New prototype.
9468 * thread-db.c (find_first_thread): New.
9469 (thread_db_create_event): Call it instead of
9470 thread_db_find_new_threads. Clean up unused variables.
9471 (maybe_attach_thread): Remove first thread handling.
9472 (thread_db_find_new_threads): Use find_first_thread.
9473 (thread_db_get_tls_address): Likewise.
9474
4105de34
DJ
94752007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9476
9477 * thread-db.c (thread_db_find_new_threads): Add prototype.
9478 (thread_db_create_event): Check for the main thread before adding
9479 a new thread.
9480 (maybe_attach_thread): Only enable event reporting if TID == 0.
9481 (thread_db_get_tls_address): Check for new threads.
9482
2b876972
DJ
94832007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9484
9485 * linux-low.c (linux_create_inferior): Try execv before execvp.
9486 * spu-low.c (spu_create_inferior): Likewise.
9487
7a245884
DJ
94882007-06-13 Mike Frysinger <vapier@gentoo.org>
9489
9490 * linux-low.c (linux_create_inferior): Change execv to execvp.
9491 * spu-low.c (spu_create_inferior): Likewies.
9492
117ce543
DJ
94932007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9494
9495 * Makefile.in (clean): Clean new files instead of deleted ones.
9496 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9497 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9498 rules.
9499 * configure.srv: Specify XML files and new regformats for MIPS and
9500 MIPS64 GNU/Linux.
9501 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9502 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9503 an entry for the restart register.
9504 (mips_cannot_fetch_register, mips_cannot_store_register)
9505 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9506 register names to match the XML descriptions.
9507 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9508 restart register instead of $0.
9509
0e7f50da
UW
95102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9511 Markus Deuling <deuling@de.ibm.com>
9512
9513 * remote-utils.c (decode_xfer_write): New function.
9514 * server.h (decode_xfer_write): Add prototype.
9515 * server.c (handle_query): Add PACKET_LEN argument. Support
9516 qXfer:spu:read and qXfer:spu:write packets.
9517 (main): Pass packet_len to handle_query.
9518 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9519 * target.h (target_ops): Add qxfer_spu.
9520
374c1d38
UW
95212007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9522
9523 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9524 accessing non-seekable spufs files.
9525
bb63802a
UW
95262007-05-16 Markus Deuling <deuling@de.ibm.com>
9527
889bf7c5 9528 * server.c (handle_query): Add reply for qC packet.
bb63802a 9529
7390519e
PA
95302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9531 Leo Zayas <lerele@champenstudios@com>
9532
9533 * server.h (check_remote_input_interrupt_request): New function.
9534 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9535 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9536 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9537 (check_remote_input_interrupt_request): New function.
9538 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9539 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9540 winapi_GenerateConsoleCtrlEvent): New typedefs.
9541 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9542 to 250 ms.
9543 (win32_wait): Check for remote interrupt request
9544 with check_remote_input_interrupt_request.
9545 (win32_request_interrupt): New function.
9546 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9547
34b34921
PA
95482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9549
9550 * win32-low.c (debug_registers_changed,
9551 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9552 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9553 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9554 (thread_rec): Get context using the low target.
9555 (child_add_thread): Call thread_added on the low target,
9556 which does the same thing.
9557 (regptr): Delete.
9558 (do_initial_child_stuff): Remove debug registers references.
9559 Set context using the low target. Resume threads after
9560 setting the contexts.
9561 (child_continue): Remove dead variable. Remove debug
9562 registers references.
9563 (child_fetch_inferior_registers): Go through the low target.
9564 (do_child_store_inferior_registers): Remove.
9565 (child_store_inferior_registers): Go through the low target.
9566 (win32_resume): Remove debug registers references.
9567 Set context using the low target.
9568 (handle_exception): Change return type to void. Don't record
9569 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9570 first chance exception.
889bf7c5 9571 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9572 goto loop. Always return after waiting for debug event.
9573 (win32_wait): Convert to switch statement. Handle spurious
9574 events.
9575
9576 * win32-i386-low.c (debug_registers_changed,
9577 debug_registers_used): New.
9578 (initial_stuff): Rename to ...
9579 (i386_initial_stuff): ... this. Clear debug registers
9580 state variables.
9581 (store_debug_registers): Delete.
9582 (i386_get_thread_context): New.
9583 (load_debug_registers): Delete.
9584 (i386_set_thread_context): New.
9585 (i386_thread_added): New.
9586 (single_step): Rename to ...
9587 (i386_single_step): ... this.
9588 (do_fetch_inferior_registers): Rename to ...
9589 (i386_fetch_inferior_register): ... this.
9590 (i386_store_inferior_register): New.
9591 (the_low_target): Adapt to new interface.
9592
9593 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9594 (arm_get_thread_context): New.
9595 (arm_set_thread_context): New.
9596 (regptr): New.
9597 (do_fetch_inferior_registers): Rename to ...
9598 (arm_fetch_inferior_register): ... this.
9599 (arm_store_inferior_register): New.
9600 (arm_wince_breakpoint): Reimplement as unsigned long.
9601 (arm_wince_breakpoint_len): Define.
9602 (the_low_target): Adapt to new interface.
9603
9604 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9605 load_debug_registers. Add get_thread_context, set_thread_context,
9606 thread_added and store_inferior_register. Rename
9607 fetch_inferior_registers to fetch_inferior_register.
9608 (regptr): Remove declaration.
9609
dd6953e1
PA
96102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9611
9612 * linux-low.c (linux_detach): Change return type to int. Return 0.
9613 * spu-low.c (spu_detach): Likewise.
9614
444d6139
PA
96152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9616
9617 * target.h (target_ops): Change return type of detach to int.
9618 Add join.
9619 (join_inferior): New.
9620 * server.c (main): Don't skip detach support on mingw32.
9621 If the inferior doesn't support detaching return error.
9622 Call join_inferior instead of using waitpid.
9623 * linux-low.c (linux_join): New.
9624 (linux_target_op): Add linux_join.
9625 * spu-low.c (spu_join): New.
9626 (spu_target_ops): Add spu_join.
9627 * win32-low.c (win32_detach): Adapt to new interface.
9628 Reopen current_process_handle before detaching. Issue a child
9629 resume before detaching.
9630 (win32_join): New.
9631 (win32_target_op): Add win32_join.
9632
1d5315fe
PA
96332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9634
9635 * win32-low.c (win32-attach): Fix return value.
9636 * target.h (target_ops): Describe ATTACH return values.
9637
bf914831
PA
96382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9639
9640 * win32-low.c (GETPROCADDRESS): Define.
9641 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9642 (winapi_DebugSetProcessKillOnExit): Likewise.
9643 (win32_create_inferior): Force usage of ansi CreateProcessA.
9644 (win32_attach): Use GETPROCADDRESS.
9645 (win32_detach): Likewise.
9646
f72f3e60
PA
96472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9648
9649 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9650
ed50f18f
PA
96512007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9652
9653 * win32-low.c: Commit leftover changes from 2007-03-29.
9654
0c2ead7e
DJ
96552007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9656
9657 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9658 fields short instead of int. Add explicit padding.
9659 (i387_cache_to_fsave): Remove unnecessary casts.
9660 (i387_fsave_to_cache): Doc fix.
9661 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9662
73725ff3
DJ
96632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9666 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9667
d99f33d8
PA
96682007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9669
9670 * configure.srv (arm*-*-mingw32ce*): Move near the other
9671 arm targets.
9672
68070c10
PA
96732007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9674
2482afc6 9675 * configure.ac: Add errno checking.
68070c10
PA
9676 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9677 sys/file.h and malloc.h.
9678 (AC_CHECK_DECLS): Add perror.
9679 (srv_mingwce): Handle.
2482afc6 9680 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9681 win32-i386-low.o to srv_tgtobj.
9682 (i[34567]86-*-mingw*): Likewise.
9683 (arm*-*-mingw32ce*): Add case.
9684 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9685 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9686 [__MINGW32CE__] (strerror): New function.
9687 [__MINGW32CE__] (errno): Define to GetLastError.
9688 [__MINGW32CE__] (COUNTOF): New macro.
9689 (remote_open): Remove extra close call.
9690 * mem-break.c (delete_breakpoint_at): New function.
9691 * mem-break.h (delete_breakpoint_at): Declare.
9692 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9693 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9694 [USE_WIN32API] (read, write): Add char* casts.
9695 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9696 * server.h: Include wincecompat.h on Windows CE.
9697 [HAVE_ERRNO_H]: Check.
9698 (perror): Declare if not declared.
9699 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9700 (perror_with_name): Remove errno declaration.
9701 * wincecompat.h: New.
9702 * wincecompat.c: New.
9703 * win32-low.h: New.
9704 * win32-arm-low.c: New.
9705 * win32-i386-low.c: New.
9706 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9707 (OUTMSG2): Make it safe.
9708 (_T): New macro.
9709 (COUNTOF): New macro.
9710 (NUM_REGS): Get it from the low target.
9711 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9712 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9713 (thread_rec): Let low target handle debug registers.
9714 (child_add_thread): Likewise.
9715 (child_init_thread_list): Likewise.
9716 (continue_one_thread): Likewise.
9717 (regptr): New.
9718 (do_child_fetch_inferior_registers): Move to ...
9719 * win32-i386-low.c: ... here, and rename to ...
9720 (do_fetch_inferior_registers): ... this.
889bf7c5 9721 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9722 Go through the low target.
9723 (do_child_store_inferior_registers): Use regptr.
9724 (strwinerror): New function.
9725 (win32_create_inferior): Handle Windows CE.
9726 Use strwinerror instead of strerror on Windows error
9727 codes. Add program to the error output.
9728 Don't close the main thread handle on Windows CE.
9729 (win32_attach): Use coredll.dll on Windows CE.
9730 (win32_kill): Close current process and current
9731 thread handles.
9732 (win32_detach): Use coredll.dll on Windows CE.
9733 (win32_resume): Let low target handle debug registers, and
9734 step request.
9735 (handle_exception): Add/Remove initial breakpoint. Avoid
9736 non-existant WSTOPSIG on Windows CE.
9737 (win32_read_inferior_memory): Cast to remove warning.
9738 (win32_arch_string): Go through the low target.
9739 (initialize_low): Call set_breakpoint_data with the low
9740 target's breakpoint.
9741 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9742 FOP_REGNUM, mappings): Move to ...
9743 * win32-i386-low.c: ... here.
9744 * win32-low.c (win32_thread_info): Move to ...
9745 * win32-low.h: ... here.
9746 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9747 win32-arm-low.c and wincecompat.c.
9748 (all:): Add $EXEEXT.
9749 (install-only:): Likewise.
9750 (gdbserver:): Likewise.
9751 (gdbreplay:): Likewise.
9752 * config.in: Regenerate.
9753 * configure: Regenerate.
9754
41093d81
PA
97552007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9756
9757 * win32-low.c: Rename typedef thread_info to
9758 win32_thread_info throughout.
9759
544afa54
PA
97602007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9761
9762 * win32-i386-low.c: Rename to ...
9763 * win32-low.c: ... this.
9764 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9765 * Makefile.in: Likewise.
9766
bce7165d
PA
97672007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9768
9769 * remote-utils.c (monitor_output): Constify msg parameter.
9770 * server.h (monitor_output): Likewise.
9771 * win32-i386-low.c (handle_output_debug_string): New.
9772 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9773 handle_output_debug_string.
9774 (get_child_debug_event): Likewise.
9775
506c7aa0
DJ
97762007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9777
9778 * server.c (main): Correct strtoul check.
9779
42c81e2a
DJ
97802007-03-27 Jon Ringle <jon@ringle.org>
9781
9782 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9783
9453113a
DJ
97842007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9785
9786 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9787
64a69107
DJ
97882007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9789
9790 * terminal.h: Check HAVE_SGTTY_H.
9791
97922007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9793
9794 * remote-utils.c (remote_open): Print out the assigned port number.
9795
c74d0ad8
DJ
97962007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * remote-utils.c (monitor_output): New function.
9799 * server.c (debug_threads): Define here.
9800 (monitor_show_help): New function.
9801 (handle_query): Handle qRcmd.
9802 (main): Do not handle 'd' packet.
9803 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9804 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9805 of debug_threads.
9806
de7c3b4a
PA
98072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9808
9809 * Makefile.in (EXEEXT): New.
9810 (clean): Use $(EXEEXT).
9811
ef57601b
PA
98122007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9813
9814 * target.h (target_ops): Rename send_signal to request_interrupt,
9815 and remove enum target_signal parameter.
9816 * linux-low.c (linux_request_interrupt): Rename from
9817 linux_send_signal, and always send SIGINT.
9818 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9819 and always send SIGINT.
9820 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9821 of send_signal.
9822 (input_interrupt): Likewise.
9823
820f2bda
PA
98242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9825
9826 * server.c (get_features_xml): Check if target implemented
9827 arch_string.
9828 * win32-i386-low.c (win32_arch_string): New.
9829 (win32_target_ops): Add win32_arch_string as arch_string member.
9830
ab39bf24
UW
98312007-02-22 Markus Deuling <deuling@de.ibm.com>
9832
9833 * spu-low.c (spu_arch_string): New.
9834 (spu_target_ops): Add spu_arch_string.
9835
61ff6e04
DJ
98362007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9837
9838 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9839 * configure.ac: Do not check for terminal.h.
9840 * configure, config.in: Regenerated.
9841
fb1e4ffc
DJ
98422007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9843
9844 * Makefile.in (OBS): Add $(XML_BUILTIN).
9845 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9846 (clean): Update.
9847 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9848 (arm-with-iwmmxt.c): New.
9849 * config.in, configure: Regenerate.
9850 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9851 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9852 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9853 (arm*-*-linux*): Add iWMMXt and regset support.
9854 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9855 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9856 (arm_store_wmmxregset, target_regsets): New.
9857 * server.c (get_features_xml): Take annex argument. Check builtin
9858 XML documents.
9859 (handle_query): Handle multiple annexes.
9860
0f48aa01
DJ
98612007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9862
9863 * remote-utils.c [USE_WIN32API] (read, write): Define.
9864 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9865 write.
9866
23181151
DJ
98672007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9868
9869 * linux-i386-low.c (the_low_target): Set arch_string.
9870 * linux-x86-64-low.c (the_low_target): Likewise.
9871 * linux-low.c (linux_arch_string): New.
9872 (linux_target_ops): Add it.
9873 * linux-low.h (struct linux_target_ops): Add arch_string.
9874 * server.c (write_qxfer_response): Use const void * for DATA.
9875 (get_features_xml): New.
9876 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9877 * target.h (struct target_ops): Add arch_string method.
9878
9d606399
DJ
98792007-01-03 Denis Pilat <denis.pilat@st.com>
9880 Daniel Jacobowitz <dan@codesourcery.com>
9881
9882 * linux-low.c (linux_kill): Handle being called with no threads.
9883 * win32-i386-low.c (win32_kill): Likewise.
9884 (get_child_debug_event): Clear current_process_handle.
9885
98862006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9887 Daniel Jacobowitz <dan@codesourcery.com>
9888
9889 * remote-utils.c (remote_open): Check the type of specified
9890 serial port devices before opening them.
9891 * server.c (main): Kill the inferior if an error occurs during
9892 the first remote_open.
9893
a5e13d24
DJ
98942006-12-05 Markus Deuling <deuling@de.ibm.com>
9895
9896 * README: Update supported targets.
9897
186947f7
DJ
98982006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9899
9900 * Makefile.in (clean): Remove reg-mips64.c.
9901 (reg-mips64.c, reg-mips64.o): New rules.
9902 * configure.srv: Handle mips64. Include regset support for mips.
9903 * linux-mips-low.c (union mips_register): New.
9904 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9905 (mips_breakpoint, mips_breakpoint_at): Use int.
9906 (mips_collect_register, mips_supply_register)
9907 (mips_collect_register_32bit, mips_supply_register_32bit)
9908 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9909 (mips_store_fpregset, target_regsets): New.
9910 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9911
a13e2c95
UW
99122006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9913
9914 * configure.srv: Add target "spu*-*-*".
9915 * Makefile.in (clean): Remove reg-spu.c.
9916 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9917 * spu-low.c: New file.
9918
cb7283db
DJ
99192006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9920
9921 * configure.ac: Correct td_thr_tls_get_addr test.
9922 * configure: Regenerated.
9923
89be2091
DJ
99242006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9925
9926 * linux-low.c (linux_wait_for_event): Reformat. Use the
9927 pass_signals array.
9928 * remote-utils.c (decode_address_to_semicolon): New.
9929 * server.c (pass_signals, handle_general_set): New.
9930 (handle_query): Mention QPassSignals for qSupported.
9931 (main): Call handle_general_set.
9932 * server.h (pass_signals, decode_address_to_semicolon): New.
9933
000ef4f0
DJ
99342006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9935
9936 * server.c (handle_query): Correct error handling for read_auxv.
9937
b7149293
UW
99382005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9939
9940 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9941 and srv_linux_thread_db to yes.
9942 * linux-s390-low.c (s390_fill_gregset): New function.
9943 (target_regsets): Define data structure.
9944
dae5f5cf
DJ
99452006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9946
9947 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9948 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9949 * config.in, configure: Regenerated.
9950 * inferiors.c (gdb_id_to_thread): New function.
9951 (gdb_id_to_thread_id): Use it.
9952 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9953 * linux-low.h (struct process_info): Add th member.
9954 (thread_db_get_tls_address): New prototype.
9955 * remote-utils.c (decode_address): Make non-static.
9956 * server.c (handle_query): Handle qGetTLSAddr.
9957 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9958 * target.h (struct target_ops): Add get_tls_address.
9959 * thread-db.c (maybe_attach_thread): Save the thread handle.
9960 (thread_db_get_tls_address): New.
9961
32ca6d61
DJ
99622006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9965 (linux_resume_one_process): Take a siginfo_t *. Update all
9966 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9967 (struct pending_signals): Add a siginfo_t.
9968 (linux_wait_for_process): Always set last_status.
9969 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9970 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9971 * linux-low.h (struct process_info): Add last_status.
9972
5ffff7c1
DJ
99732006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9974
9975 * remote-utils.c (try_rle): New function.
9976 (putpkt_binary): Use it.
9977
8695c747
DJ
99782006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9979
9980 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9981 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9982 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9983 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9984 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9985 point registers.
9986
290fadea
RS
99872006-08-08 Richard Sandiford <richard@codesourcery.com>
9988
9989 * server.c (terminal_fd): New variable.
9990 (old_foreground_pgrp): Likewise.
9991 (restore_old_foreground_pgrp): New function.
9992 (start_inferior): Record the terminal file descriptor in terminal_fd
9993 and its original foreground group in old_foreground_pgrp. Register
9994 restore_old_foreground_pgrp with atexit().
9995
9f2e1e63
DJ
99962006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9997
9998 * server.c (handle_query): Correct qPart to qXfer.
9999
b80864fb
DJ
100002006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10001
10002 * configure.ac: Check for more headers which are missing on
10003 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10004 * configure.srv: Add Cygwin and mingw32.
10005 * remote-utils.c: Don't include headers unconditionally which
10006 are missing on mingw32. Include <winsock.h> for mingw32.
10007 (remote_open): Adjust for mingw32 support. Flush
10008 standard error after writing to it.
10009 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10010 (unblock_async_io, enable_async_io, disable_async_io)
10011 (readchar, getpkt): Update for Winsock support.
10012 (prepare_resume_reply): Expect a protocol signal number.
10013 * server.c: Disable <sys/wait.h> on mingw32.
10014 (start_inferior): Adjust for mingw32 support. Flush
10015 standard error after writing to it.
10016 (attach_inferior): Likewise. Use protocol signal
10017 numbers.
10018 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10019 and names.
10020 * win32-i386-low.c: New file.
10021 * Makefile.in (XM_CLIBS): Set.
10022 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10023 (win32-i386-low.o): New dependency rule.
10024 * linux-low.c (linux_wait): Use target signal numbers.
10025 * target.h (struct target_ops): Doc fix.
10026 * server.h (target_signal_to_name): New prototype.
10027 * gdbreplay.c: Don't include headers unconditionally which
10028 are missing on mingw32. Include <winsock.h> for mingw32.
10029 (remote_close, remote_open): Adjust for Winsock support.
10030 * configure, config.in: Regenerated.
10031
0876f84a
DJ
100322006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10033
10034 * server.c (decode_xfer_read, write_qxfer_response): New.
10035 (handle_query): Take a packet length argument. Handle
10036 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10037 the qSupported response.
10038 (main): Update call to handle_query.
10039
01f9e8fa
DJ
100402006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10041
10042 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10043 (putpkt_binary): Renamed from putpkt and adjusted for binary
10044 data.
10045 (putpkt): New wrapper for putpkt_binary.
10046 (readchar): Don't mask off the high bit.
10047 (decode_X_packet): New function.
10048 * server.c (main): Call putpkt_binary if a handler sets the packet
10049 length. Save the length of the incoming packet. Handle 'X'.
10050 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10051
be2a5f71
DJ
100522006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * server.c (handle_query): Handle qSupported.
10055
ea025f5f
DJ
100562006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10057
10058 * remote-utils.c (all_symbols_looked_up): New variable.
10059 (look_up_one_symbol): Check it.
10060 * server.h (look_up_one_symbol): New declaration.
10061 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10062
9308fc88
DJ
100632006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10064
10065 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10066 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10067 (PTRACE_GET_THREAD_AREA): Define.
10068 (ps_get_thread_area): New function.
10069
52fb6437
NS
100702006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10071
10072 * configure.srv (m68k*-*-uclinux*): New target.
10073 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10074 (linux_resume_one_process): Remove extraneous cast.
10075 (linux_read_offsets): New.
10076 (linux_target_op): Add linux_read_offsets on mmuless systems.
10077 * server.c (handle_query): Add qOffsets logic.
10078 * target.h (struct target_ops): Add read_offsets.
10079
21b0f40c
DJ
100802006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10081
10082 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10083 (PTRACE_GET_THREAD_AREA): Define.
10084 (ps_get_thread_area): New function.
10085 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10086 (linux-x86-64-low.o): Update.
10087
0050a760
DJ
100882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10089
10090 * configure.ac: Remove checks for prfpregset_t.
10091 * gdb_proc_service.h: New file.
10092 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10093 new "gdb_proc_service.h".
10094 * proc-service.c: Likewise.
10095 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10096 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10097 * Makefile.in (gdb_proc_service_h): Updated.
10098 * configure, config.in: Regenerated.
10099
b92a518e
DJ
101002006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10101
10102 * remote-utils.c (prepare_resume_reply): Move declaration
10103 of gdb_id_from_wait to the top of the block.
10104
545587ee
DJ
101052006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10106
10107 * linux-low.c (regsets_store_inferior_registers): Read the regset
10108 from the target before filling it.
10109
9db87ebd
DJ
101102006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * server.c (attach_inferior): Return SIGTRAP for a successful
10113 attach.
10114
dd24457d
DJ
101152006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * Makefile.in (OBS): Add version.o.
10118 (STAGESTUFF): Delete.
10119 (version.o): Add dependencies.
10120 (version.c): Replace rule.
10121 (clean): Remove version.c.
10122 * server.c (gdbserver_version): New.
10123 (gdbserver_usage): Use printf.
10124 (main): Handle --version and --help.
10125 * server.h (version, host_name): Add declarations.
10126
6f0f660e
EZ
101272005-12-23 Eli Zaretskii <eliz@gnu.org>
10128
889bf7c5
PA
10129 * linux-arm-low.c:
10130 * linux-arm-low.c:
10131 * inferiors.c:
10132 * i387-fp.h:
10133 * i387-fp.c:
10134 * gdbreplay.c:
10135 * regcache.c:
10136 * proc-service.c:
10137 * mem-break.h:
10138 * mem-break.c:
10139 * linux-x86-64-low.c:
10140 * linux-sh-low.c:
10141 * linux-s390-low.c:
10142 * linux-ppc64-low.c:
10143 * linux-ppc-low.c:
10144 * linux-mips-low.c:
10145 * linux-m68k-low.c:
10146 * linux-m32r-low.c:
10147 * linux-low.h:
10148 * linux-low.c:
10149 * linux-ia64-low.c:
10150 * linux-i386-low.c:
10151 * linux-crisv32-low.c:
10152 * thread-db.c:
10153 * terminal.h:
10154 * target.h:
10155 * target.c:
10156 * server.h:
10157 * server.c:
10158 * remote-utils.c:
10159 * regcache.h:
10160 * utils.c:
10161 * Makefile.in:
10162 * configure.ac:
6f0f660e
EZ
10163 * gdbserver.1: Add (C) after Copyright. Update the FSF
10164 address.
10165
9d1fb177
DJ
101662005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10169 (arm_breakpoint_at): Recognize both breakpoints.
10170 (the_low_target): Use the correct breakpoint instruction.
10171
011a70c2
DJ
101722005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10173
10174 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10175 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10176 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10177 (the_low_target): Update.
10178
7fb85e41
AS
101792005-10-25 Andreas Schwab <schwab@suse.de>
10180
10181 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10182
10183 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10184 (ia64_num_regs): Reduce to 462.
10185
3db0444b
DJ
101862005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10187
10188 * acinclude.m4: Correct quoting.
10189 * aclocal.m4: Regenerated.
10190
10191 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10192 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10193 (thread_db_init): Call thread_db_err_str.
10194 * configure.ac: Check for TD_VERSION.
10195 * config.in, configure: Regenerated.
10196
bee0189a
DJ
101972005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10198
10199 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10200
e9d25b98
DJ
102012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10202
10203 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10204 is not available. Define HAVE_PTRACE_GETREGS if it is.
10205 * config.in, configure: Regenerated.
10206 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10207 * linux-i386-low.c, linux-m68k-low.c: Update to use
10208 HAVE_PTRACE_GETREGS.
10209 * linux-low.c (regsets_fetch_inferior_registers)
10210 (regsets_store_inferior_registers): Only return 0 if we processed
10211 GENERAL_REGS.
10212 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10213 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10214
a06660f7
DJ
102152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10216
10217 * inferiors.c (struct thread_info): Add gdb_id.
10218 (add_thread): Add gdb_id argument.
10219 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10220 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10221 calls to add_thread.
10222 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10223 * server.c (handle_query): Use thread_to_gdb_id.
10224 (handle_v_cont, main): Use gdb_id_to_thread_id.
10225 * server.h (add_thread): Update prototype.
10226 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10227 prototypes.
10228
5a1f5858
DJ
102292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10230
10231 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10232 left-padded registers.
10233 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10234 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10235
e122f1f5
SE
102362005-07-01 Steve Ellcey <sje@cup.hp.com>
10237
10238 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10239 * configure: Regenerate.
10240 * config.in: Regenerate.
10241 * server.h (NEED_DECLARATION_STRERROR):
10242 Replace with !HAVE_DECL_STRERROR.
10243
d592fa2f
DJ
102442005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10245
10246 * linux-low.c (linux_wait, linux_send_signal): Don't test
10247 an unsigned long variable for > 0 if it could be MAX_ULONG.
10248 * server.c (myresume): Likewise.
10249 * target.c (set_desired_inferior): Likewise.
10250
ccbd4912
MK
102512005-06-13 Mark Kettenis <kettenis@gnu.org>
10252
10253 * configure.ac: Simplify and improve check for socklen_t.
10254 * configure, config.in: Regenerate.
10255
f450004a
DJ
102562005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10257
10258 * acconfig.h: Remove.
10259 * configure.ac: Add a test for socklen_t. Use three-argument
10260 AC_DEFINE throughout.
10261 * config.in: Regenerated using autoheader 2.59.
10262 * configure: Regenerated.
10263
10264 * gdbreplay.c (socklen_t): Provide a default.
10265 (remote_open): Use socklen_t.
10266 * remote-utils.c (socklen_t): Provide a default.
10267 (remote_open): Use socklen_t.
10268 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10269 unsigned char.
10270
10271 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10272 char for buffers.
10273 * linux-low.c (linux_read_memory, linux_write_memory)
10274 (linux_read_auxv): Likewise.
10275 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10276 (check_mem_write): Likewise.
10277 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10278 Likewise.
10279 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10280 (registers_from_string, register_data): Likewise.
10281 * server.c (handle_query, main): Likewise.
10282 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10283 (decode_M_packet): Likewise.
10284 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10285 * target.h (struct target_ops): Update read_memory, write_memory,
10286 and read_auxv.
10287 (read_inferior_memory, write_inferior_memory): Update.
10288 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10289 to unsigned char *.
10290 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10291 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10292 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10293 linux-s390-low.c, linux-sh-low.c: Update for changes in
10294 read_inferior_memory and the_low_target->breakpoint.
10295
eee84df1
DJ
102962005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10299 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10300 * configure.srv: Add powerpc64-*-linux*.
10301 * linux-ppc64-low.c: New file.
10302
45b134e5
OF
103032005-05-23 Orjan Friberg <orjanf@axis.com>
10304
10305 * linux-cris-low.c: New file with support for CRIS.
10306 * linux-crisv32-low.c: Ditto for CRISv32.
10307 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10308 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10309 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10310 reg-crisv32.o, and reg-crisv32.c to make rules.
10311 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10312 recognized targets.
10313
48d93c75
UW
103142005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10315
10316 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10317 of sizeof (PTRACE_XFER_TYPE).
10318 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10319
e013ee27
OF
103202005-05-12 Orjan Friberg <orjanf@axis.com>
10321
889bf7c5 10322 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10323 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10324 pointers for hardware watchpoint support.
10325 * linux-low.h (struct linux_target_ops): Ditto.
10326 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10327 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10328 to linux_target_ops.
10329 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10330 reply packet.
10331 * server.c (main): Recognize 'Z' and 'z' packets.
10332
b0ded00b
UW
103332005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10334
10335 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10336 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10337 (the_low_target): Add new members.
10338
8643e2ad
DJ
103392005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10340
10341 * proc-service.c (ps_lgetregs): Search all_processes instead of
10342 all_threads.
10343
fc620387
DJ
103442005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10345
10346 * server.c (start_inferior): Change return type to int.
10347 (attach_inferior): Change sigptr to int *.
10348 (handle_v_cont, handle_v_requests): Change signal to int *.
10349 (main): Change signal to int.
10350
103512005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10352
10353 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10354 * configure.srv: Add m32r*-*-linux*.
10355 * linux-m32r-low.c: New file.
10356
e0e76420
DJ
103572005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10358
10359 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10360
a1928bad
DJ
103612005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10362
10363 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10364 Take unsigned long arguments for PIDs.
10365 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10366 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10367 (wait_for_sigstop, linux_resume_one_process)
10368 (regsets_fetch_inferior_registers, linux_send_signal)
10369 (linux_read_auxv): Likewise. Update the types of variables holding
10370 PIDs. Update format string specifiers.
10371 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10372 * remote-utils.c (prepare_resume_reply): Likewise.
10373 * server.c (cont_thread, general_thread, step_thread)
10374 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10375 unsigned long.
10376 (handle_query): Update format specifiers.
10377 (handle_v_cont, main): Use strtoul for thread IDs.
10378 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10379 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10380 (general_thread, step_thread, thread_from_wait)
10381 (old_thread_from_wait): Update.
10382 * target.h (struct thread_resume): Use unsigned long for THREAD.
10383 (struct target_ops): Use unsigned long for arguments to attach and
10384 thread_alive.
10385
dcdb98d2
DJ
103862005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10387
10388 * acinclude.m4: Include bfd/bfd.m4 directly.
10389 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10390 <agriffis@toolchain.org>.
10391 * aclocal.m4, configure: Regenerated.
10392
bec39cab
AC
103932005-01-07 Andrew Cagney <cagney@gnu.org>
10394
10395 * configure.ac: Rename configure.in, require autoconf 2.59.
10396 * configure: Re-generate.
10397
434c4c77
DJ
103982004-12-08 Daniel Jacobowitz <dan@debian.org>
10399
10400 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10401 LIBS when finished.
10402 * aclocal.m4: Regenerated.
10403 * configure: Regenerated.
10404
db1d3e1b
AS
104052004-11-21 Andreas Schwab <schwab@suse.de>
10406
10407 * linux-m68k-low.c (m68k_num_gregs): Define.
10408 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10409 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10410 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10411 (m68k_breakpoint_at): New. Add to the_low_target.
10412
10413 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10414 srv_linux_thread_db to yes.
10415
43360365
JB
104162004-10-20 Joel Brobecker <brobecker@gnat.com>
10417
10418 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10419 (ARCH_SET_FS): Likewise.
10420 (ARCH_GET_FS): Likewise.
10421 (ARCH_GET_GS): Likewise.
10422
fd500816
DJ
104232004-10-16 Daniel Jacobowitz <dan@debian.org>
10424
10425 * linux-i386-low.c (ps_get_thread_area): New.
10426 * linux-x86-64-low.c (ps_get_thread_area): New.
10427 * linux-low.c: Include <sys/syscall.h>.
10428 (linux_kill_one_process): Don't kill the first thread here.
10429 (linux_kill): Kill the first thread here.
10430 (kill_lwp): New function.
10431 (send_sigstop, linux_send_signal): Use it.
10432 * proc-service.c: Clean up #ifdefs.
10433 (fpregset_info): Delete.
10434 (ps_lgetregs): Update and enable implementation.
10435 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10436 implementations.
10437 * remote-utils.c (struct sym_cache, symbol_cache): New.
10438 (input_interrupt): Print a clearer message.
10439 (async_io_enabled): New variable.
10440 (enable_async_io, disable_async_io): Use it. Update comments.
10441 (look_up_one_symbol): Use the symbol cache.
10442 * thread-db.c (thread_db_look_up_symbols): New function.
10443 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10444
f6de3c42
DJ
104452004-10-16 Daniel Jacobowitz <dan@debian.org>
10446
10447 * configure.in: Test for -rdynamic.
10448 * configure: Regenerated.
10449 * Makefile (INTERNAL_LDFLAGS): New.
10450 (gdbserver, gdbreplay): Use it.
10451
2c0fc042
AC
104522004-09-02 Andrew Cagney <cagney@gnu.org>
10453
10454 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10455
075b3282
DJ
104562004-03-23 Daniel Jacobowitz <drow@mvista.com>
10457
10458 * linux-low.c (linux_wait): Clear all_processes list also.
10459
fa6a77dc
DJ
104602004-03-12 Daniel Jacobowitz <drow@mvista.com>
10461
10462 * linux-low.c: Include <errno.h>. Remove extern declaration of
10463 errno.
10464
6d782a97
DJ
104652004-03-12 Daniel Jacobowitz <drow@mvista.com>
10466
10467 * gdbreplay.c, server.h, utils.c: Update copyright years.
10468
3a7fb99b
DJ
104692004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10470
10471 * server.c (main): Print child status or termination signal from
10472 variable 'signal', not 'sig'.
10473
c3e735a6
DJ
104742004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10475
10476 * linux-low.c (linux_read_memory): Change return type to
10477 int. Check for and return error from ptrace().
10478 * target.c (read_inferior_memory): Change return type to int. Pass
10479 back return status from the_target->read_memory().
10480 * target.h (struct target_ops): Adapt *read_memory() prototype.
10481 Update comment.
10482 (read_inferior_memory): Adapt prototype.
10483 * server.c (main): Return an error packet if
10484 read_inferior_memory() returns an error.
10485
a59d1c82
DJ
104862004-03-04 Daniel Jacobowitz <drow@mvista.com>
10487
10488 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10489 Unify with other clean targets.
10490
dc3f8883
DJ
104912004-02-29 Daniel Jacobowitz <drow@mvista.com>
10492
10493 * server.c (handle_v_cont): Call set_desired_inferior.
10494
89a208da
DJ
104952004-02-29 Daniel Jacobowitz <drow@mvista.com>
10496
10497 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10498
62ea82f5
DJ
104992004-02-29 Daniel Jacobowitz <drow@mvista.com>
10500
10501 * linux-low.c (linux_wait): Unblock async I/O.
10502 (linux_resume): Block and enable async I/O.
10503 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10504 * server.h (block_async_io, unblock_async_io): Add prototypes.
10505
6910d122
DJ
105062004-02-29 Daniel Jacobowitz <drow@mvista.com>
10507
10508 * remote-utils.c (remote_open): Print a status notice after
10509 opening a TCP port.
10510 * server.c (attach_inferior): Print a status notice after
10511 attaching.
10512
105132004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10514
10515 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10516
c89dc5d4
DJ
105172004-02-26 Daniel Jacobowitz <drow@mvista.com>
10518
10519 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10520 error packet.
10521 * server.c, target.h: Update copyright years.
10522
4b8dad4a
RM
105232004-02-25 Roland McGrath <roland@redhat.com>
10524
10525 * target.h (struct target_ops): New member `read_auxv'.
10526 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10527 * linux-low.c (linux_read_auxv): New function.
10528 (linux_target_ops): Initialize `read_auxv' member to that.
10529
d7446758
JB
105302004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10531
10532 Committed by Jim Blandy <jimb@redhat.com>.
10533
10534 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10535 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10536 instead of GPR_SIZE to distiguish s390 and s390x targets.
10537
5544ad89
DJ
105382004-01-31 Daniel Jacobowitz <drow@mvista.com>
10539
10540 * linux-low.c: Update copyright year.
10541 (check_removed_breakpoint): Clear pending_is_breakpoint.
10542 (linux_set_resume_request, linux_queue_one_thread)
10543 (resume_status_pending_p): New functions.
10544 (linux_continue_one_thread): Use process->resume.
10545 (linux_resume): Only resume threads if there are no pending events.
10546 * linux-low.h (struct process_info): Add resume request
10547 pointer.
10548
2a68b70e
DJ
105492004-01-30 Daniel Jacobowitz <drow@mvista.com>
10550
10551 * regcache.c (new_register_cache): Clear the allocated register
10552 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10553
64386c31
DJ
105542003-10-13 Daniel Jacobowitz <drow@mvista.com>
10555
10556 * linux-low.c (linux_resume): Take a struct thread_resume *
10557 argument.
10558 (linux_wait): Update call.
10559 (resume_ptr): New static variable.
10560 (linux_continue_one_thread): Renamed from
10561 linux_continue_one_process. Use resume_ptr.
10562 (linux_resume): Use linux_continue_one_thread.
10563 * server.c (handle_v_cont, handle_v_requests): New functions.
10564 (myresume): New function.
10565 (main): Handle 'v' case.
10566 * target.h (struct thread_resume): New type.
10567 (struct target_ops): Change argument of "resume" to struct
10568 thread_resume *.
10569 (myresume): Delete macro.
10570
c938e9b0
L
105712003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10572
10573 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10574 (uninstall): Support DESTDIR.
10575
7f313d07
BC
10576Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10577
10578 * configure.srv: Add xscale*linux copy of arm*linux entry.
10579
3b2fc2ea
DJ
105802003-07-24 Daniel Jacobowitz <drow@mvista.com>
10581
10582 * linux-arm-low.c (arm_reinsert_addr): New function.
10583 (the_low_target): Add arm_reinsert_addr.
10584
1c0a559e
MK
105852003-07-08 Mark Kettenis <kettenis@gnu.org>
10586
10587 * mem-break.c: Remove whitespace at end of file.
10588
43d5792c
DJ
105892003-06-28 Daniel Jacobowitz <drow@mvista.com>
10590
10591 * configure.in: Check whether we need to prototype strerror.
10592 * server.h: Optionally prototype strerror.
10593 * gdbreplay.c (perror_with_name): Use strerror.
10594 * linux-low.c (linux_attach_lwp): Use strerror.
10595 * utils.c (perror_with_name): Use strerror.
10596 * config.in, configure: Regenerated.
10597
c8a86edf
DJ
105982003-06-28 Daniel Jacobowitz <drow@mvista.com>
10599
10600 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10601 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10602
73d37363
DJ
106032003-06-20 Daniel Jacobowitz <drow@mvista.com>
10604
10605 * Makefile.in (SFILES): Update.
10606 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10607 low-sun3.c: Remove files.
10608
6ad8ae5c
DJ
106092003-06-17 Daniel Jacobowitz <drow@mvista.com>
10610
10611 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10612 (linux_detach_one_process, linux_detach): New functions.
10613 (linux_target_ops): Add linux_detach.
10614 * server.c (main): Handle 'D' packet.
10615 * target.h (struct target_ops): Add "detach" member.
10616 (detach_inferior): Define.
10617
1581182a
MK
106182003-06-13 Mark Kettenis <kettenis@gnu.org>
10619
10620 From Kelley Cook <kelleycook@wideopenwest.com>:
10621 * configure.srv: Accept i[34567]86 variants.
10622
e5379b03
DJ
106232003-06-05 Daniel Jacobowitz <drow@mvista.com>
10624
10625 * linux-low.c (linux_wait_for_event): Correct comment typos.
10626 (linux_resume_one_process): Call check_removed_breakpoint.
10627 (linux_send_signal): New function.
10628 (linux_target_ops): Add linux_send_signal.
10629 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10630 of kill.
10631 * target.h (struct target_ops): Add send_signal.
10632
2ff29de4
JB
106332003-05-29 Jim Blandy <jimb@redhat.com>
10634
10635 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10636 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10637 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10638 away part of the register's value.
10639
254787d4
DJ
106402003-03-26 Daniel Jacobowitz <drow@mvista.com>
10641
10642 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10643 (linux_wait_for_event, linux_init_signals): Likewise.
10644
94e10508
DJ
106452003-03-17 Daniel Jacobowitz <drow@mvista.com>
10646
10647 * configure.in: Check for stdlib.h.
10648 * configure: Regenerated.
10649 * config.in: Regenerated.
10650
4c0711e0
DJ
106512003-01-04 Andreas Schwab <schwab@suse.de>
10652
10653 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10654
ef66e766
AC
106552003-01-02 Andrew Cagney <ac131313@redhat.com>
10656
10657 * Makefile.in: Remove obsolete code.
10658
a1358604
DJ
106592002-11-20 Daniel Jacobowitz <drow@mvista.com>
10660
10661 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10662 defined(PT_FPR0_HI).
10663
23ce3b1c
DJ
106642002-11-17 Stuart Hughes <seh@zee2.com>
10665
10666 * linux-arm-low.c (arm_num_regs): Increase.
10667 (arm_regmap): Include status register.
10668
106692002-11-17 Daniel Jacobowitz <drow@mvista.com>
10670
10671 * linux-low.c (register_addr): Remove incorrect -1 check.
10672
a9fa9f7d
DJ
106732002-08-29 Daniel Jacobowitz <drow@mvista.com>
10674
10675 * linux-low.c (linux_create_inferior): Call setpgid. Return
10676 the new PID.
10677 (unstopped_p, linux_signal_pid): Remove.
10678 (linux_target_ops): Remove linux_signal_pid.
10679 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10680 global instead of target method.
10681 * target.h (struct target_ops): Remove signal_pid. Update comment
10682 for create_inferior.
10683 * server.c (signal_pid): New variable.
10684 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10685 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10686 (attach_inferior): Set signal_pid.
10687
17574093
DJ
106882002-08-23 Daniel Jacobowitz <drow@mvista.com>
10689
10690 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10691
106922002-08-20 Jim Blandy <jimb@redhat.com>
10693
10694 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10695 default for this.
10696
106972002-08-01 Andrew Cagney <cagney@redhat.com>
10698
10699 * Makefile.in: Make chill references obsolete.
10700
107012002-07-24 Kevin Buettner <kevinb@redhat.com>
10702
10703 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10704 * configure: Regenerate.
10705 * config.in: Regenerate.
10706
107072002-07-09 David O'Brien <obrien@FreeBSD.org>
10708
10709 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10710 (perror_with_name, remote_close, remote_open, expect, play): Static.
10711
107122002-07-04 Michal Ludvig <mludvig@suse.cz>
10713
4b8dad4a 10714 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10715 byte offsets instead of an array of indexes.
10716 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10717
107182002-06-13 Daniel Jacobowitz <drow@mvista.com>
10719
10720 * regcache.c: Add comment.
10721
107222002-06-11 Daniel Jacobowitz <drow@mvista.com>
10723
10724 * thread-db.c: New file.
10725 * proc-service.c: New file.
10726 * acinclude.m4: New file.
10727 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10728 proc-service.o, and thread-db.o.
10729 (linux-low.o): Add USE_THREAD_DB.
10730 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10731 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10732 * aclocal.m4: Regenerated.
10733 * config.in: Regenerated.
10734 * configure: Regenerated.
10735 * configure.in: Check for proc_service.h, sys/procfs.h,
10736 thread_db.h, and linux/elf.h headrs.
10737 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10738 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10739 Check for -lthread_db and thread support.
10740 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10741 PowerPC, and SuperH.
10742 * i387-fp.c: Constify arguments.
10743 * i387-fp.h: Likewise.
10744 * inferiors.c: (struct thread_info): Renamed from
10745 `struct inferior_info'. Remove PID member. Use generic inferior
10746 list header. All uses updated.
10747 (inferiors, signal_pid): Removed.
10748 (all_threads): New variable.
10749 (get_thread): Define.
10750 (add_inferior_to_list): New function.
10751 (for_each_inferior): New function.
10752 (change_inferior_id): New function.
10753 (add_inferior): Removed.
10754 (remove_inferior): New function.
10755 (add_thread): New function.
10756 (free_one_thread): New function.
10757 (remove_thread): New function.
10758 (clear_inferiors): Use for_each_inferior and free_one_thread.
10759 (find_inferior): New function.
10760 (find_inferior_id): New function.
10761 (inferior_target_data): Update argument type.
10762 (set_inferior_target_data): Likewise.
10763 (inferior_regcache_data): Likewise.
10764 (set_inferior_regcache_data): Likewise.
10765 * linux-low.c (linux_bp_reinsert): Remove.
10766 (all_processes, stopping_threads, using_thrads)
10767 (struct pending_signals, debug_threads, pid_of): New.
10768 (inferior_pid): Replace with macro.
10769 (struct inferior_linux_data): Remove.
10770 (get_stop_pc, add_process): New functions.
10771 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10772 Use add_process and add_thread.
10773 (linux_attach_lwp): New function, based on old linux_attach. Use
10774 add_process and add_thread. Set stop_expected for new threads.
10775 (linux_attach): New function.
10776 (linux_kill_one_process): New function.
10777 (linux_kill): Kill all LWPs.
10778 (linux_thread_alive): Use find_inferior_id.
10779 (check_removed_breakpoints, status_pending_p): New functions.
10780 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10781 Update. Use WNOHANG. Wait for cloned processes also. Update process
10782 struct for the found process.
10783 (linux_wait_for_event): New function.
10784 (linux_wait): Use it. Support LWPs.
10785 (send_sigstop, wait_for_sigstop, stop_all_processes)
10786 (linux_resume_one_process, linux_continue_one_process): New functions.
10787 (linux_resume): Support LWPs.
10788 (REGISTER_RAW_SIZE): Remove.
10789 (fetch_register): Use register_size instead. Call supply_register.
10790 (usr_store_inferior_registers): Likewise. Call collect_register.
10791 Fix recursive case.
10792 (regsets_fetch_inferior_registers): Improve error message.
10793 (regsets_store_inferior_registers): Add debugging.
10794 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10795 (unstopped_p, linux_signal_pid): New functions.
10796 (linux_target_ops): Add linux_signal_pid.
10797 (linux_init_signals): New function.
10798 (initialize_low): Call it. Initialize using_threads.
10799 * regcache.c (inferior_regcache_data): Add valid
10800 flag.
10801 (get_regcache): Fetch registers lazily. Add fetch argument
10802 and update all callers.
10803 (regcache_invalidate_one, regcache_invalidate): New
10804 functions.
10805 (new_register_cache): Renamed from create_register_cache.
10806 Return the new regcache.
10807 (free_register_cache): Change argument to a void *.
10808 (registers_to_string, registers_from_string): Call get_regcache
10809 with fetch flag set.
10810 (register_data): Make static. Pass fetch flag to get_regcache.
10811 (supply_register): Call get_regcache with fetch flag clear.
10812 (collect_register): Call get_regcache with fetch flag set.
10813 (collect_register_as_string): New function.
10814 * regcache.h: Update.
10815 * remote-utils.c (putpkt): Flush after debug output and use
10816 stderr.
10817 Handle input interrupts while waiting for an ACK.
10818 (input_interrupt): Use signal_pid method.
10819 (getpkt): Flush after debug output and use stderr.
10820 (outreg): Use collect_register_as_string.
10821 (new_thread_notify, dead_thread_notify): New functions.
10822 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10823 and general_thread.
10824 (look_up_one_symbol): Flush after debug output.
10825 * server.c (step_thread, server_waiting): New variables.
10826 (start_inferior): Don't use signal_pid. Update call to mywait.
10827 (attach_inferior): Update call to mywait.
10828 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10829 (main): Don't fetch/store registers explicitly. Use
10830 set_desired_inferior. Support proposed ``Hs'' packet. Update
10831 calls to mywait.
10832 * server.h: Update.
10833 (struct inferior_list, struct_inferior_list_entry): New.
10834 * target.c (set_desired_inferior): New.
10835 (write_inferior_memory): Constify.
10836 (mywait): New function.
10837 * target.h: Update.
10838 (struct target_ops): New signal_pid method.
10839 (mywait): Removed macro, added prototype.
10840
10841 * linux-low.h (regset_func): Removed.
10842 (regset_fill_func, regset_store_func): New.
10843 (enum regset_type): New.
10844 (struct regset_info): Add type field. Use new operation types.
10845 (struct linux_target_ops): stop_pc renamed to get_pc.
10846 Add decr_pc_after_break and breakpoint_at.
10847 (get_process, get_thread_proess, get_process_thread)
10848 (strut process_info, all_processes, linux_attach_lwp)
10849 (thread_db_init): New.
10850
10851 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10852 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10853 (the_low_target): Add new members.
10854 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10855 (i386_store_fpxregset): Constify.
10856 (target_regsets): Add new kind identifier.
10857 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10858 (i386_set_pc): Add debugging.
10859 (i386_breakpoint_at): New function.
10860 (the_low_target): Add new members.
10861 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10862 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10863 (mips_breakpoint_at): New.
10864 (the_low_target): Add new members.
10865 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10866 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10867 (the_low_target): Add new members.
10868 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10869 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10870 (the_low_target): Add new members.
10871 * linux-x86-64-low.c (target_regsets): Add new kind
10872 identifier.
10873
108742002-05-15 Daniel Jacobowitz <drow@mvista.com>
10875
10876 From Martin Pool <mbp@samba.org>:
10877 * server.c (gdbserver_usage): New function.
10878 (main): Call it.
10879
108802002-05-14 Daniel Jacobowitz <drow@mvista.com>
10881
10882 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10883 stop_at -> stop_pc.
10884
108852002-05-04 Andrew Cagney <ac131313@redhat.com>
10886
10887 * Makefile.in: Remove obsolete code.
10888
108892002-04-24 Michal Ludvig <mludvig@suse.cz>
10890
10891 * linux-low.c (regsets_fetch_inferior_registers),
10892 (regsets_store_inferior_registers): Removed cast to int from
10893 ptrace() calls.
10894 * regcache.h: Added declaration of struct inferior_info.
10895
108962002-04-20 Daniel Jacobowitz <drow@mvista.com>
10897
10898 * inferiors.c (struct inferior_info): Add regcache_data.
10899 (add_inferior): Call create_register_cache.
10900 (clear_inferiors): Call free_register_cache.
10901 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10902 * regcache.c (struct inferior_regcache_data): New.
10903 (registers): Remove.
10904 (get_regcache): New function.
10905 (create_register_cache, free_register_cache): New functions.
10906 (set_register_cache): Don't initialize the register cache here.
10907 (registers_to_string, registers_from_string, register_data): Call
10908 get_regcache.
10909 * regcache.h: Add prototypes.
10910 * server.h: Likewise.
10911
109122002-04-20 Daniel Jacobowitz <drow@mvista.com>
10913
10914 * mem-break.c: New file.
10915 * mem-break.h: New file.
10916 * Makefile.in: Add mem-break.o rule; update server.h
10917 dependencies.
10918 * inferiors.c (struct inferior_info): Add target_data
10919 member.
10920 (clear_inferiors): Free target_data member if set.
10921 (inferior_target_data, set_inferior_target_data): New functions.
10922 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10923 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10924 * linux-low.c (linux_bp_reinsert): New variable.
10925 (struct inferior_linux_data): New.
10926 (linux_create_inferior): Use set_inferior_target_data.
10927 (linux_attach): Likewise. Call add_inferior.
10928 (linux_wait_for_one_inferior): New function.
10929 (linux_wait): Call it.
10930 (linux_write_memory): Add const.
10931 (initialize_low): Call set_breakpoint_data.
10932 * linux-low.h (struct linux_target_ops): Add breakpoint
10933 handling members.
10934 * server.c (attach_inferior): Remove extra add_inferior
10935 call.
10936 * server.h: Include mem-break.h. Update inferior.c
10937 prototypes.
10938 * target.c (read_inferior_memory)
10939 (write_inferior_memory): New functions.
10940 * target.h (read_inferior_memory)
10941 (write_inferior_memory): Change macros to prototypes.
10942 (struct target_ops): Update comments. Add const to write_memory
10943 definition.
10944
109452002-04-11 Daniel Jacobowitz <drow@mvista.com>
10946
10947 * linux-low.c (usr_store_inferior_registers): Support
10948 registers which are allowed to fail to store.
10949 * linux-low.h (linux_target_ops): Likewise.
10950 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10951 (ppc_cannot_store_register): FPSCR may not be storable.
10952
109532002-04-09 Daniel Jacobowitz <drow@mvista.com>
10954
10955 * server.h: Include <string.h> if HAVE_STRING_H.
10956 * ChangeLog: Correct paths in last ChangeLog entry.
10957
109582002-04-09 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * linux-low.h: Remove obsolete prototypes.
10961 (struct linux_target_ops): New.
10962 (extern the_low_target): New.
10963 * linux-low.c (num_regs, regmap): Remove declarations.
10964 (register_addr): Use the_low_target explicitly.
10965 (fetch_register): Likewise.
10966 (usr_fetch_inferior_registers): Likewise.
10967 (usr_store_inferior_registers): Likewise.
10968 * linux-arm-low.c (num_regs): Remove.
10969 (arm_num_regs): Define.
10970 (arm_regmap): Renamed from regmap, made static.
10971 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10972 made static.
10973 (arm_cannot_store_register): Renamed from cannot_store_register,
10974 made static.
10975 (the_low_target): New.
10976 * linux-i386-low.c (num_regs): Remove.
10977 (i386_num_regs): Define.
10978 (i386_regmap): Renamed from regmap, made static.
10979 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10980 made static.
10981 (i386_cannot_store_register): Renamed from cannot_store_register,
10982 made static.
10983 (the_low_target): New.
10984 * linux-ia64-low.c (num_regs): Remove.
10985 (ia64_num_regs): Define.
10986 (ia64_regmap): Renamed from regmap, made static.
10987 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10988 made static.
10989 (ia64_cannot_store_register): Renamed from cannot_store_register,
10990 made static.
10991 (the_low_target): New.
10992 * linux-m68k-low.c (num_regs): Remove.
10993 (m68k_num_regs): Define.
10994 (m68k_regmap): Renamed from regmap, made static.
10995 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10996 made static.
10997 (m68k_cannot_store_register): Renamed from cannot_store_register,
10998 made static.
10999 (the_low_target): New.
11000 * linux-mips-low.c (num_regs): Remove.
11001 (mips_num_regs): Define.
11002 (mips_regmap): Renamed from regmap, made static.
11003 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11004 made static.
11005 (mips_cannot_store_register): Renamed from cannot_store_register,
11006 made static.
11007 (the_low_target): New.
11008 * linux-ppc-low.c (num_regs): Remove.
11009 (ppc_num_regs): Define.
11010 (ppc_regmap): Renamed from regmap, made static.
11011 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11012 made static.
11013 (ppc_cannot_store_register): Renamed from cannot_store_register,
11014 made static.
11015 (the_low_target): New.
11016 * linux-s390-low.c (num_regs): Remove.
11017 (s390_num_regs): Define.
11018 (s390_regmap): Renamed from regmap, made static.
11019 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11020 made static.
11021 (s390_cannot_store_register): Renamed from cannot_store_register,
11022 made static.
11023 (the_low_target): New.
11024 * linux-sh-low.c (num_regs): Remove.
11025 (sh_num_regs): Define.
11026 (sh_regmap): Renamed from regmap, made static.
11027 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11028 made static.
11029 (sh_cannot_store_register): Renamed from cannot_store_register,
11030 made static.
11031 (the_low_target): New.
11032 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11033 (the_low_target): New.
11034
110352002-04-09 Daniel Jacobowitz <drow@mvista.com>
11036
11037 * Makefile.in: Add stamp-h target.
11038 * configure.in: Create stamp-h.
11039 * configure: Regenerated.
11040
110412002-04-09 Daniel Jacobowitz <drow@mvista.com>
11042
11043 * inferiors.c: New file.
11044 * target.c: New file.
11045 * target.h: New file.
11046 * Makefile.in: Add target.o and inferiors.o. Update
11047 dependencies.
11048 * linux-low.c (inferior_pid): New static variable,
11049 moved from server.c.
11050 (linux_create_inferior): Renamed from create_inferior.
11051 Call add_inferior. Return 0 on success instead of a PID.
11052 (linux_attach): Renamed from myattach.
11053 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11054 (linux_thread_alive): Renamed from mythread_alive.
11055 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11056 child dies.
11057 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11058 (regsets_store_inferior_registers): Correct error message.
11059 Add missing ``return 0''.
11060 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11061 (linux_store_registers): Renamed from store_inferior_registers.
11062 (linux_read_memory): Renamed from read_inferior_memory.
11063 (linux_write_memory): Renamed from write_inferior_memory.
11064 (linux_target_ops): New structure.
11065 (initialize_low): Call set_target_ops ().
11066 * remote-utils.c (unhexify): New function.
11067 (hexify): New function.
11068 (input_interrupt): Send signals to ``signal_pid''.
11069 * server.c (inferior_pid): Remove.
11070 (start_inferior): Update create_inferior call.
11071 (attach_inferior): Call add_inferior.
11072 (handle_query): New function.
11073 (main): Call handle_query for `q' packets.
11074 * server.h: Include "target.h". Remove obsolete prototypes.
11075 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11076
110772002-04-09 Daniel Jacobowitz <drow@mvista.com>
11078
11079 * Makefile.in: Add WARN_CFLAGS. Update configury
11080 dependencies.
11081 * configure.in: Check for <string.h>
11082 * configure: Regenerate.
11083 * config.in: Regenerate.
11084 * gdbreplay.c: Include needed system headers.
11085 (remote_open): Remove strchr prototype.
11086 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11087 * regcache.c (supply_register): Change buf argument to const void *.
11088 (supply_register_by_name): Likewise.
11089 (collect_register): Change buf argument to void *.
11090 (collect_register_by_name): Likewise.
11091 * regcache.h: Add missing prototypes.
11092 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11093 * server.c (handle_query): New function.
11094 (attached): New static variable, moved out of main.
11095 (main): Quiet longjmp clobber warnings.
11096 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11097 * utils.c (error): Remove NORETURN.
11098 (fatal): Likewise.