x86/Intel: fix i386_optab[] for vcvt{,u}si2s{d,s}
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
bfacd19d
DB
12015-05-28 Don Breazeal <donb@codesourcery.com>
2
3 * linux-low.c (handle_extended_wait): Initialize
4 thread_info.last_resume_kind for new fork children.
5
452003ef
PA
62015-05-15 Pedro Alves <palves@redhat.com>
7
8 * target.h (target_handle_new_gdb_connection): Rewrite using if
9 wrapped in do/while.
10
1041a03c
JB
112015-05-14 Joel Brobecker <brobecker@adacore.com>
12
13 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
14 * configure, config.in: Regenerate.
15 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
16 Declare typedef.
17
c269dbdb
DB
182015-05-12 Don Breazeal <donb@codesourcery.com>
19
20 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
21 PTRACE_EVENT_VFORK_DONE.
22 (linux_low_ptrace_options, extended_event_reported): Add vfork
23 events.
24 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
25 and "vforkdone" for RSP 'T' Stop Reply Packet.
26 * server.h (report_vfork_events): Declare
27 global variable.
28
3a8a0396
DB
292015-05-12 Don Breazeal <donb@codesourcery.com>
30
31 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
32 (the_low_target) <new_fork>: Initialize new member.
33 * linux-arm-low.c (arm_new_fork): New function.
34 (the_low_target) <new_fork>: Initialize new member.
35 * linux-low.c (handle_extended_wait): Call new target function
36 new_fork.
37 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
38 * linux-mips-low.c (mips_add_watchpoint): New function
39 extracted from mips_insert_point.
40 (the_low_target) <new_fork>: Initialize new member.
41 (mips_linux_new_fork): New function.
42 (mips_insert_point): Call mips_add_watchpoint.
43 * linux-x86-low.c (x86_linux_new_fork): New function.
44 (the_low_target) <new_fork>: Initialize new member.
45
de0d863e
DB
462015-05-12 Don Breazeal <donb@codesourcery.com>
47
48 * linux-low.c (handle_extended_wait): Implement return value,
49 rename argument 'event_child' to 'event_lwp', handle
50 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
51 (linux_low_ptrace_options): New function.
52 (linux_low_filter_event): Call linux_low_ptrace_options,
53 use different argument fo linux_enable_event_reporting,
54 use return value from handle_extended_wait.
55 (extended_event_reported): New function.
56 (linux_wait_1): Call extended_event_reported and set
57 status to report fork events.
58 (linux_write_memory): Add pid to debug message.
59 (reset_lwp_ptrace_options_callback): New function.
60 (linux_handle_new_gdb_connection): New function.
61 (linux_target_ops): Initialize new structure member.
62 * linux-low.h (struct lwp_info) <waitstatus>: New member.
63 * lynx-low.c: Initialize new structure member.
64 * remote-utils.c (prepare_resume_reply): Implement stop reason
65 "fork" for "T" stop message.
66 * server.c (handle_query): Call handle_new_gdb_connection.
67 * server.h (report_fork_events): Declare global flag.
68 * target.h (struct target_ops) <handle_new_gdb_connection>:
69 New member.
70 (target_handle_new_gdb_connection): New macro.
71 * win32-low.c: Initialize new structure member.
72
ddcbc397
DB
732015-05-12 Don Breazeal <donb@codesourcery.com>
74
75 * mem-break.c (APPEND_TO_LIST): Define macro.
76 (clone_agent_expr): New function.
77 (clone_one_breakpoint): New function.
78 (clone_all_breakpoints): New function.
79 * mem-break.h: Declare new functions.
80
89245bc0
DB
812015-05-12 Don Breazeal <donb@codesourcery.com>
82
83 * linux-low.c (linux_supports_fork_events): New function.
84 (linux_supports_vfork_events): New function.
85 (linux_target_ops): Initialize new structure members.
86 (initialize_low): Call linux_check_ptrace_features.
87 * lynx-low.c (lynx_target_ops): Initialize new structure
88 members.
89 * server.c (report_fork_events, report_vfork_events):
90 New global flags.
91 (handle_query): Add new features to qSupported packet and
92 response.
93 (captured_main): Initialize new global variables.
94 * target.h (struct target_ops) <supports_fork_events>:
95 New member.
96 <supports_vfork_events>: New member.
97 (target_supports_fork_events): New macro.
98 (target_supports_vfork_events): New macro.
99 * win32-low.c (win32_target_ops): Initialize new structure
100 members.
101
835205d0
GB
1022015-05-12 Gary Benson <gbenson@redhat.com>
103
104 * server.c (handle_qxfer_exec_file): Use current process
105 if annex is empty.
106
21e94bd9
SL
1072015-05-08 Sandra Loosemore <sandra@codesourcery.com>
108
109 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
110 Remove HAVE_PTRACE_GETREGS conditionals.
111 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
112 instead of PTRACE_GETREGS and PTRACE_SETREGS.
113
45614f15
YQ
1142015-05-08 Yao Qi <yao.qi@linaro.org>
115
116 * linux-low.c (linux_supports_conditional_breakpoints): New
117 function.
118 (linux_target_ops): Install new target method.
119 * lynx-low.c (lynx_target_ops): Install NULL hook for
120 supports_conditional_breakpoints.
121 * nto-low.c (nto_target_ops): Likewise.
122 * spu-low.c (spu_target_ops): Likewise.
123 * win32-low.c (win32_target_ops): Likewise.
124 * server.c (handle_query): Check
125 target_supports_conditional_breakpoints.
126 * target.h (struct target_ops) <supports_conditional_breakpoints>:
127 New field.
128 (target_supports_conditional_breakpoints): New macro.
129
80ad801e
PA
1302015-05-06 Pedro Alves <palves@redhat.com>
131
132 PR server/18081
133 * server.c (start_inferior): If the process exits, mourn it.
134
819843c7
GB
1352015-04-21 Gary Benson <gbenson@redhat.com>
136
137 * hostio.c (fileio_open_flags_to_host): Factored out to
138 fileio_to_host_openflags in common/fileio.c. Single use
139 updated.
140
a2d5a9d7
MF
1412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
142
143 * linux-xtensa-low.c (xtensa_fill_gregset)
144 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
145 XCHAL_HAVE_LOOP.
146
deb44829
MF
1472015-04-17 Max Filippov <jcmvbkbc@gmail.com>
148
149 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
150 (regs_info): Replace usrregs pointer with NULL.
151
e57f1de3
GB
1522015-04-17 Gary Benson <gbenson@redhat.com>
153
154 * target.h (struct target_ops) <pid_to_exec_file>: New field.
155 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
156 * server.c (handle_qxfer_exec_file): New function.
157 (qxfer_packets): Add exec-file entry.
158 (handle_query): Report qXfer:exec-file:read as supported packet.
159
62828379
RN
1602015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
161
162 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
163
b88bb450
GB
1642015-04-09 Gary Benson <gbenson@redhat.com>
165
166 * hostio-errno.c (errno_to_fileio_error): Remove function.
167 Update caller to use remote_fileio_to_fio_error.
168
c8f4bfdd
YQ
1692015-04-09 Yao Qi <yao.qi@linaro.org>
170
171 * linux-low.c (linux_insert_point): Call
172 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
173 (linux_remove_point): Call remove_memory_breakpoint if type is
174 raw_bkpt_type_sw.
175 * linux-x86-low.c (x86_insert_point): Don't call
176 insert_memory_breakpoint.
177 (x86_remove_point): Don't call remove_memory_breakpoint.
178
41f98f02
PA
1792015-04-01 Pedro Alves <palves@redhat.com>
180 Cleber Rosa <crosa@redhat.com>
181
182 * server.c (gdbserver_usage): Reorganize and extend the usage
183 message.
184
2bf6fb9d
PA
1852015-03-24 Pedro Alves <palves@redhat.com>
186
187 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
188 output. Also dump TRAP_TRACE.
189 (linux_low_filter_event): In debug output, distinguish a
190 resume_stop SIGSTOP from a delayed SIGSTOP.
191
369f6daa
GB
1922015-03-24 Gary Benson <gbenson@redhat.com>
193
194 * linux-x86-low.c (x86_linux_new_thread): Moved to
195 nat/x86-linux.c.
196 (x86_linux_prepare_to_resume): Likewise.
197
8e5d4070
GB
1982015-03-24 Gary Benson <gbenson@redhat.com>
199
200 * Makefile.in (x86-linux-dregs.o): New rule.
201 * configure.srv: Add x86-linux-dregs.o to relevant targets.
202 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
203 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
204 (x86_linux_dr_get): Likewise.
205 (x86_linux_dr_set): Likewise.
206 (update_debug_registers_callback): Likewise.
207 (x86_linux_dr_set_addr): Likewise.
208 (x86_linux_dr_get_addr): Likewise.
209 (x86_linux_dr_set_control): Likewise.
210 (x86_linux_dr_get_control): Likewise.
211 (x86_linux_dr_get_status): Likewise.
212 (x86_linux_update_debug_registers): Likewise.
213
2b95d440
GB
2142015-03-24 Gary Benson <gbenson@redhat.com>
215
216 * linux-x86-low.c (x86_linux_update_debug_registers):
217 New function, factored out from...
218 (x86_linux_prepare_to_resume): ...this.
219
14b0bc68
GB
2202015-03-24 Gary Benson <gbenson@redhat.com>
221
222 * linux-x86-low.c (x86_linux_dr_get): Update comments.
223 (x86_linux_dr_set): Likewise.
224 (update_debug_registers_callback): Likewise.
225 (x86_linux_dr_set_addr): Likewise.
226 (x86_linux_dr_get_addr): Likewise.
227 (x86_linux_dr_set_control): Likewise.
228 (x86_linux_dr_get_control): Likewise.
229 (x86_linux_dr_get_status): Likewise.
230 (x86_linux_prepare_to_resume): Likewise.
231
5dfe6ca8
GB
2322015-03-24 Gary Benson <gbenson@redhat.com>
233
234 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
235 Use perror_with_name. Pass string through gettext.
236 (x86_linux_dr_set): Likewise.
237
d33472ad
GB
2382015-03-24 Gary Benson <gbenson@redhat.com>
239
240 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
241 (x86_linux_dr_set_addr): ...this.
242 (x86_dr_low_get_addr): Rename to...
243 (x86_linux_dr_get_addr): ...this.
244 (x86_dr_low_set_control): Rename to...
245 (x86_linux_dr_set_control): ...this.
246 (x86_dr_low_get_control): Rename to...
247 (x86_linux_dr_get_control): ...this.
248 (x86_dr_low_get_status): Rename to...
249 (x86_linux_dr_get_status): ...this.
250 (x86_dr_low): Update with new function names.
251
4b134ca1
GB
2522015-03-24 Gary Benson <gbenson@redhat.com>
253
254 * Makefile.in (x86-linux.o): New rule.
255 * configure.srv: Add x86-linux.o to relevant targets.
256 * linux-low.c (lwp_set_arch_private_info): New function.
257 (lwp_arch_private_info): Likewise.
258 * linux-x86-low.c: Include nat/x86-linux.h.
259 (arch_lwp_info): Removed structure.
260 (update_debug_registers_callback):
261 Use lwp_set_debug_registers_changed.
262 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
263 and lwp_set_debug_registers_changed.
264 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
265
34c703da
GB
2662015-03-24 Gary Benson <gbenson@redhat.com>
267
268 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
269 * linux-arm-low.c (arm_new_thread): Likewise.
270 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
271 * linux-mips-low.c (mips_linux_new_thread): Likewise.
272 * linux-x86-low.c (x86_linux_new_thread): Likewise.
273 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
274
cff068da
GB
2752015-03-24 Gary Benson <gbenson@redhat.com>
276
277 * linux-low.c (ptid_of_lwp): New function.
278 (lwp_is_stopped): Likewise.
279 (lwp_stop_reason): Likewise.
280 * linux-x86-low.c (update_debug_registers_callback):
281 Use lwp_is_stopped.
282 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
283 lwp_stop_reason.
284
b2f7c7e8
GB
2852015-03-24 Gary Benson <gbenson@redhat.com>
286
287 * linux-low.h (linux_stop_lwp): Remove declaration.
288
6d4ee8c6
GB
2892015-03-24 Gary Benson <gbenson@redhat.com>
290
291 * linux-low.h: Include nat/linux-nat.h.
292 * linux-low.c (iterate_over_lwps_args): New structure.
293 (iterate_over_lwps_filter): New function.
294 (iterate_over_lwps): Likewise.
295 * linux-x86-low.c (update_debug_registers_callback):
296 Update signature to what iterate_over_lwps expects.
297 Remove PID check that iterate_over_lwps now performs.
298 (x86_dr_low_set_addr): Use iterate_over_lwps.
299 (x86_dr_low_set_control): Likewise.
300
70a0bb6b
GB
3012015-03-24 Gary Benson <gbenson@redhat.com>
302
303 * linux-x86-low.c (x86_debug_reg_state): New function.
304 (x86_linux_prepare_to_resume): Use the above.
305
7b669087
GB
3062015-03-24 Gary Benson <gbenson@redhat.com>
307
308 * linux-low.c (current_lwp_ptid): New function.
309 * linux-x86-low.c: Include nat/linux-nat.h.
310 (x86_dr_low_get_addr): Use current_lwp_ptid.
311 (x86_dr_low_get_control): Likewise.
312 (x86_dr_low_get_status): Likewise.
313
eef49a3d
PA
3142015-03-20 Pedro Alves <palves@redhat.com>
315
316 * tracepoint.c (cmd_qtstatus): Make "str" const.
317
b2333d22
PA
3182015-03-20 Pedro Alves <palves@redhat.com>
319
320 * server.c (handle_general_set): Make "req_str" const.
321
23f238d3
PA
3222015-03-19 Pedro Alves <palves@redhat.com>
323
324 * linux-low.c (linux_resume_one_lwp): Rename to ...
325 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
326 instead call perror_with_name.
327 (check_ptrace_stopped_lwp_gone): New function.
328 (linux_resume_one_lwp): Reimplement as wrapper around
329 linux_resume_one_lwp_throw that swallows errors if the LWP is
330 gone.
331
91baf43f
PA
3322015-03-19 Pedro Alves <palves@redhat.com>
333
334 * linux-low.c (count_events_callback, select_event_lwp_callback):
335 No longer check whether the thread has resume_stop as last resume
336 kind.
337
8bf3b159
PA
3382015-03-19 Pedro Alves <palves@redhat.com>
339
340 * linux-low.c (count_events_callback, select_event_lwp_callback):
341 Use the lwp's status_pending_p field, not the thread's.
342
b90fc188
PA
3432015-03-19 Pedro Alves <palves@redhat.com>
344
345 * linux-low.c (select_event_lwp_callback): Update comments to
346 no longer mention SIGTRAP.
347
464b0089
GB
3482015-03-18 Gary Benson <gbenson@redhat.com>
349
350 * server.c (handle_query): Do not report vFile:fstat as supported.
351
aa9e327f
GB
3522015-03-11 Gary Benson <gbenson@redhat.com>
353
354 * hostio.c (sys/types.h): New include.
355 (sys/stat.h): Likewise.
356 (common-remote-fileio.h): Likewise.
357 (handle_fstat): New function.
358 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 359
791c0056
GB
3602015-03-11 Gary Benson <gbenson@redhat.com>
361
362 * configure.ac (AC_CHECK_MEMBERS): Add checks for
363 struct stat.st_blocks and struct stat.st_blksize.
364 * configure: Regenerate.
365 * config.in: Likewise.
366 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
367 (OBS): Add common-remote-fileio.o.
368 (common-remote-fileio.o): New rule.
369
9a9df970
PA
3702015-03-09 Pedro Alves <palves@redhat.com>
371
372 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
373 'struct sockaddr' pointer in 'accept' call.
374
9eb1356e
PA
3752015-03-09 Pedro Alves <palves@redhat.com>
376
377 Revert:
378 2015-03-07 Pedro Alves <palves@redhat.com>
379 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
380 or <winsock2.h> here. Instead include "gdb_socket.h".
381 (remote_open): Use union gdb_sockaddr_u.
382 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
383 or <winsock2.h> here. Instead include "gdb_socket.h".
384 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
385 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
386 or <sys/un.h>.
387 (init_named_socket, gdb_agent_helper_thread): Use union
388 gdb_sockaddr_u.
389
aac331e4
PA
3902015-03-07 Pedro Alves <palves@redhat.com>
391
392 * configure.ac (build_warnings): Move
393 -Wdeclaration-after-statement to the C-specific set.
394 * configure: Regenerate.
395
366c75fc
PA
3962015-03-07 Pedro Alves <palves@redhat.com>
397
398 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
399 or <winsock2.h> here. Instead include "gdb_socket.h".
400 (remote_open): Use union gdb_sockaddr_u.
401 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
402 or <winsock2.h> here. Instead include "gdb_socket.h".
403 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
404 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
405 or <sys/un.h>.
406 (init_named_socket, gdb_agent_helper_thread): Use union
407 gdb_sockaddr_u.
408
492d29ea
PA
4092015-03-07 Pedro Alves <palves@redhat.com>
410
411 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
412 instead.
413
60a191ed
YQ
4142015-03-06 Yao Qi <yao.qi@linaro.org>
415
416 * linux-aarch64-low.c (aarch64_insert_point): Use
417 show_debug_regs as a boolean.
418 (aarch64_remove_point): Likewise.
419
f5771b1d
PA
4202015-03-05 Pedro Alves <palves@redhat.com>
421
422 * lynx-low.c (lynx_target_ops): Install NULL hooks for
423 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
424 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
425 * nto-low.c (nto_target_ops): Likewise.
426 * spu-low.c (spu_target_ops): Likewise.
427 * win32-low.c (win32_target_ops): Likewise.
428
3e572f71
PA
4292015-03-04 Pedro Alves <palves@redhat.com>
430
431 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
432 Decide whether a breakpoint triggered based on the SIGTRAP's
433 siginfo.si_code.
434 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
435 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
436 (linux_low_filter_event): Check for breakpoints before checking
437 watchpoints.
438 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
439 siginfo.si_code.
440 (linux_stopped_by_sw_breakpoint)
441 (linux_supports_stopped_by_sw_breakpoint)
442 (linux_stopped_by_hw_breakpoint)
443 (linux_supports_stopped_by_hw_breakpoint): New functions.
444 (linux_target_ops): Install new target methods.
445
1ec68e26
PA
4462015-03-04 Pedro Alves <palves@redhat.com>
447
448 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
449 * server.c (swbreak_feature, hwbreak_feature): New globals.
450 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
451 (captured_main): Clear swbreak_feature and hwbreak_feature.
452 * server.h (swbreak_feature, hwbreak_feature): Declare.
453 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
454 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
455 supports_stopped_by_hw_breakpoint>: New fields.
456 (target_supports_stopped_by_sw_breakpoint)
457 (target_stopped_by_sw_breakpoint)
458 (target_supports_stopped_by_hw_breakpoint)
459 (target_stopped_by_hw_breakpoint): Declare.
460
15c66dd6
PA
4612015-03-04 Pedro Alves <palves@redhat.com>
462
463 enum lwp_stop_reason -> enum target_stop_reason
464 * linux-low.c (check_stopped_by_breakpoint): Adjust.
465 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
466 (linux_wait_1, stuck_in_jump_pad_callback)
467 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
468 (linux_stopped_by_watchpoint):
469 * linux-low.h (enum lwp_stop_reason): Delete.
470 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
471 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
472
98fc70d6
YQ
4732015-03-04 Yao Qi <yao.qi@linaro.org>
474
475 * Makefile.in (SFILES): Add linux-aarch64-low.c.
476
dd2ac174
GB
4772015-03-03 Gary Benson <gbenson@redhat.com>
478
479 * hostio.c (handle_vFile): Fix prefix lengths.
480
d68e53f4
MM
4812015-03-03 Markus Metzger <markus.t.metzger@intel.com>
482
483 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
484 ptr_bits.
485
bf2d68ab
AA
4862015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
487
488 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
489 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
490 (clean): Add "rm -f" for above C files.
491 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
492 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
493 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
494 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
495 * linux-s390-low.c (HWCAP_S390_VX): New macro.
496 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
497 (init_registers_s390x_vx_linux64)
498 (init_registers_s390x_tevx_linux64)
499 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
500 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
501 declarations.
502 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
503 (s390_store_vxrs_high): New functions.
504 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
505 NT_S390_VXRS_HIGH.
506 (s390_arch_setup): Add logic for selecting one of the new target
507 descriptions. Activate the new vector regsets if applicable.
508 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
509 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
510 and init_registers_s390x_tevx_linux64.
511
c966a859
PA
5122015-03-01 Pedro Alves <palves@redhat.com>
513
514 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
515 parameter.
516
4180215b
PA
5172015-02-27 Pedro Alves <palves@redhat.com>
518
519 * linux-x86-low.c (u_debugreg_offset): New function.
520 (x86_linux_dr_get, x86_linux_dr_set): Use it.
521
749bab01
PA
5222015-02-27 Pedro Alves <palves@redhat.com>
523
524 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
525 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
526 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
527 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
528 (ps_lsetfpregs, ps_getpid)
529 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
530 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
531 (ps_lsetxregs, ps_plog): Declare.
532
3c14e5a3
PA
5332015-02-27 Pedro Alves <palves@redhat.com>
534
535 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
536 IP_AGENT_EXPORT_FUNC.
537 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
538 IP_AGENT_EXPORT_FUNC.
539 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
540 (IP_AGENT_EXPORT): Delete.
541 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
542 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
543 (gdb_trampoline_buffer_error, collecting, gdb_collect)
544 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
545 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
546 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
547 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
548 (traceframe_read_count, traceframe_write_count)
549 (traceframes_created, trace_state_variables, get_raw_reg)
550 (get_trace_state_variable_value, set_trace_state_variable_value)
551 (ust_loaded, helper_thread_id, cmd_buf): Use
552 IPA_SYM_EXPORTED_NAME.
553 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
554 (tracepoints) Use IP_AGENT_EXPORT_VAR.
555 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
556 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
557 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
558 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
559 EXTERN_C_PUSH/EXTERN_C_POP.
560 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
561 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
562 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
563 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
564 (traceframe_write_count, traceframe_read_count)
565 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
566 (about_to_request_buffer_space, get_trace_state_variable_value)
567 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
568 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
569 EXTERN_C_PUSH/EXTERN_C_POP.
570 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
571 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
572 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
573 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
574 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
575 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
576 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
577 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
578 Define.
579 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
580 (IP_AGENT_EXPORT_VAR_DECL): Define.
581 (tracing): Declare.
582 (gdb_agent_get_raw_reg): Declare.
583
fe978cb0
PA
5842015-02-27 Tom Tromey <tromey@redhat.com>
585 Pedro Alves <palves@redhat.com>
586
587 Rename symbols whose names are reserved C++ keywords throughout.
588
3bc3d82a
PA
5892015-02-27 Pedro Alves <palves@redhat.com>
590
591 * Makefile.in (COMPILER): New, get it from autoconf.
592 (CXX): Get from autoconf instead.
593 (COMPILE.pre): Use COMPILER.
594 (CC-LD): Rename to ...
595 (CC_LD): ... this. Use COMPILER.
596 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
597 (CXX_FOR_TARGET): Default to g++ instead of gcc.
598 * acinclude.m4: Include build-with-cxx.m4.
599 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
600 Disable -Werror by default if building in C++ mode.
601 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
602 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
603 the C++ compiler. Save/restore CXXFLAGS too.
604 * configure: Regenerate.
605
07697489
PA
6062015-02-27 Pedro Alves <palves@redhat.com>
607
608 * acinclude.m4: Include libiberty.m4.
609 * configure.ac: Call libiberty_INIT.
610 * config.in, configure: Regenerate.
611
9beb7c4e
PA
6122015-02-26 Pedro Alves <palves@redhat.com>
613
614 * linux-low.c (linux_wait_1): When incrementing the PC past a
615 program breakpoint always use the_low_target.breakpoint_len as
616 increment, rather than the maximum between that and
617 the_low_target.decr_pc_after_break.
618
8090aef2
PA
6192015-02-23 Pedro Alves <palves@redhat.com>
620
621 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
622 thread was doing a step-over; always adjust the PC if
623 we stepped over a permanent breakpoint.
624 (linux_wait_1): If we stepped over breakpoint that was on top of a
625 permanent breakpoint, manually advance the PC past it.
626
bc9540e8
PA
6272015-02-23 Pedro Alves <palves@redhat.com>
628
629 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
630 modes.
631 (x86_fill_gregset, x86_store_gregset): Use it when handling
632 $orig_eax.
633
2db9a427
PA
6342015-02-20 Pedro Alves <palves@redhat.com>
635
636 * thread-db.c: Include "nat/linux-procfs.h".
637 (thread_db_init): Skip listing new threads if the kernel supports
638 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
639
afa8d396
PA
6402015-02-20 Pedro Alves <palves@redhat.com>
641
642 * linux-low.c (status_pending_p_callback): Use ptid_match.
643
c9587f88
AT
6442015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
645
646 PR breakpoints/16812
647 * linux-low.c (wstatus_maybe_breakpoint): Remove.
648 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
649 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
650
b05ec7a5
AT
6512015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
652
653 PR breakpoints/15956
654 * tracepoint.c (cmd_qtinit): Add check for current_thread.
655
d33501a5
MM
6562015-02-09 Markus Metzger <markus.t.metzger@intel.com>
657
658 * linux-low.c (linux_low_btrace_conf): Print size.
659 * server.c (handle_btrace_conf_general_set): New.
660 (hanle_general_set): Call handle_btrace_conf_general_set.
661 (handle_query): Report Qbtrace-conf:bts:size as supported.
662
f4abbc16
MM
6632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
664
665 * linux-low.c (linux_low_enable_btrace): Update parameters.
666 (linux_low_btrace_conf): New.
667 (linux_target_ops)<to_btrace_conf>: Initialize.
668 * server.c (current_btrace_conf): New.
669 (handle_btrace_enable): Rename to ...
670 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
671 to target_enable_btrace. Update comment. Update users.
672 (handle_qxfer_btrace_conf): New.
673 (qxfer_packets): Add btrace-conf entry.
674 (handle_query): Report qXfer:btrace-conf:read as supported packet.
675 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
676 (target_ops)<read_btrace_conf>: New.
677 (target_enable_btrace): Update parameters.
678 (target_read_btrace_conf): New.
679
043c3577
MM
6802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
681
682 * server.c (handle_btrace_general_set): Remove call to
683 target_supports_btrace.
684 (supported_btrace_packets): New.
685 (handle_query): Call supported_btrace_packets.
686 * target.h: include btrace-common.h.
687 (btrace_target_info): Removed.
688 (supports_btrace, target_supports_btrace): Update parameters.
689
734b0e4b
MM
6902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
691
692 * Makefile.in (SFILES): Add common/btrace-common.c.
693 (OBS): Add common/btrace-common.o.
694 (btrace-common.o): Add build rules.
695 * linux-low: Include btrace-common.h.
696 (linux_low_read_btrace): Use struct btrace_data. Call
697 btrace_data_init and btrace_data_fini.
698
d6c146e9
PA
6992015-02-06 Pedro Alves <palves@redhat.com>
700
701 * thread-db.c (find_new_threads_callback): Add debug output.
702
20ba1ce6
PA
7032015-02-04 Pedro Alves <palves@redhat.com>
704
705 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
706 (resume_stopped_resumed_lwps): New function.
707 (linux_wait_for_event_filtered): Use it.
708
8cc73a39
SDJ
7092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
710
711 * Makefile.in (SFILES): Add linux-personality.c.
712 (linux-personality.o): New rule.
713 * configure.srv (srv_linux_obj): Add linux-personality.o to the
714 list of objects to be built.
715 * linux-low.c: Include nat/linux-personality.h.
716 (linux_create_inferior): Remove code to disable address space
717 randomization (moved to ../nat/linux-personality.c). Create
718 cleanup to disable address space randomization.
719
fb23d554
SDJ
7202015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
721
722 * Makefile.in (posix-strerror.o): New rule.
723 (mingw-strerror.o): Likewise.
724 * configure: Regenerated.
725 * configure.ac: Source file ../common/common.host. Initialize new
726 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
727
cdf43629
YQ
7282015-01-14 Yao Qi <yao@codesourcery.com>
729
730 * Makefile.in (SFILES): Add nat/ppc-linux.c.
731 (ppc-linux.o): New rule.
732 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
733 * configure.ac: AC_CHECK_FUNCS(getauxval).
734 * config.in: Re-generated.
735 * configure: Re-generated.
736 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
737 ppc64_64bit_inferior_p
738
514c5338
YQ
7392015-01-14 Yao Qi <yao@codesourcery.com>
740
741 * linux-ppc-low.c: Include "nat/ppc-linux.h".
742 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
743 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
744 (PT_ORIG_R3, PT_TRAP): Likewise.
745 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
746 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
747 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
748
3368c1e5
JB
7492015-01-10 Joel Brobecker <brobecker@adacore.com>
750
751 * i387-fp.c (i387_cache_to_xsave): In look over
752 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
753 zmmh_low_space field by use of zmmh_high_space.
754
582511be
PA
7552015-01-09 Pedro Alves <palves@redhat.com>
756
757 * linux-low.c (step_over_bkpt): Move higher up in the file.
758 (handle_extended_wait): Don't store the stop_pc here.
759 (get_stop_pc): Adjust comments and rename to ...
760 (check_stopped_by_breakpoint): ... this. Record whether the LWP
761 stopped for a software breakpoint or hardware breakpoint.
762 (thread_still_has_status_pending_p): New function.
763 (status_pending_p_callback): Use
764 thread_still_has_status_pending_p. If the event is no longer
765 interesting, resume the LWP.
766 (handle_tracepoints): Add assert.
767 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
768 (wstatus_maybe_breakpoint): New function.
769 (cancel_breakpoint): Delete function.
770 (check_stopped_by_watchpoint): New function, factored out from
771 linux_low_filter_event.
772 (lp_status_maybe_breakpoint): Delete function.
773 (linux_low_filter_event): Remove filter_ptid argument.
774 Leave thread group exits pending here. Store the LWP's stop PC.
775 Always leave events pending.
776 (linux_wait_for_event_filtered): Pull all events out of the
777 kernel, and leave them all pending.
778 (count_events_callback, select_event_lwp_callback): Consider all
779 events.
780 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
781 (select_event_lwp): Only give preference to the stepping LWP in
782 all-stop mode. Adjust comments.
783 (ignore_event): New function.
784 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
785 references to cancel_breakpoints. Adjust to renames. Also give
786 equal priority to all LWPs that have had events in non-stop mode.
787 If reporting a software breakpoint event, unadjust the LWP's PC.
788 (linux_wait): If linux_wait_1 returned an ignored event, retry.
789 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
790 Adjust.
791 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
792 (resume_status_pending_p): Use thread_still_has_status_pending_p.
793 (linux_stopped_by_watchpoint): Adjust.
794 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
795 * linux-low.h (enum lwp_stop_reason): New.
796 (struct lwp_info) <stop_pc>: Adjust comment.
797 <stopped_by_watchpoint>: Delete field.
798 <stop_reason>: New field.
799 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
800 * mem-break.c (software_breakpoint_inserted_here)
801 (hardware_breakpoint_inserted_here): New function.
802 * mem-break.h (software_breakpoint_inserted_here)
803 (hardware_breakpoint_inserted_here): Declare.
804 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
805 (cancel_breakpoints): Delete.
806 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
807 (upload_fast_traceframes): Remove references to
808 cancel_breakpoints.
809
a33e3959
PA
8102015-01-09 Pedro Alves <palves@redhat.com>
811
812 * thread-db.c (find_new_threads_callback): Ignore thread if the
813 kernel thread ID is -1.
814
8784d563
PA
8152015-01-09 Pedro Alves <palves@redhat.com>
816
817 * linux-low.c (linux_attach_fail_reason_string): Move to
818 nat/linux-ptrace.c, and rename.
819 (linux_attach_lwp): Update comment.
820 (attach_proc_task_lwp_callback): New function.
821 (linux_attach): Adjust to rename and use
822 linux_proc_attach_tgid_threads.
823 (linux_attach_fail_reason_string): Delete declaration.
824
76f2b779
JB
8252015-01-01 Joel Brobecker <brobecker@adacore.com>
826
827 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
828 * server.c (gdbserver_version): Likewise.
829
fafcc06a
SDJ
8302014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
831
832 * remote-utils.c: Include ctype.h.
833 (input_interrupt): Explicitly handle the case when the char
834 received is the NUL byte. Improve the printing of non-ASCII
835 characters.
836
beed38b8
JB
8372014-12-16 Joel Brobecker <brobecker@adacore.com>
838
839 * linux-low.c (linux_low_filter_event): Update call to
840 linux_enable_event_reporting following the addition of
841 a new parameter to that function.
842
bf330350
CU
8432014-12-16 Catalin Udma <catalin.udma@freescale.com>
844
845 PR server/17457
846 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
847 (AARCH64_FPCR_REGNO): Likewise.
848 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
849 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
850 (aarch64_store_fpregset): Likewise.
851
5227d625
JB
8522014-12-15 Joel Brobecker <brobecker@adacore.com>
853
854 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
855 Remove FIXME comment about assumption about N.
856
f93b65a0
JB
8572014-12-13 Joel Brobecker <brobecker@adacore.com>
858
859 * configure.ac: If large-file support is disabled in GDBserver,
860 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
861 * configure: Regenerate.
862
e5a9158d
AA
8632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
864
865 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
866 warning upon ENODATA from ptrace.
867 * linux-s390-low.c (s390_store_tdb): New.
868 (s390_regsets): Add regset for NT_S390_TDB.
869
feea5f36
AA
8702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
871
872 * linux-low.c (regsets_store_inferior_registers): Skip regsets
873 without a fill_function.
874 * linux-s390-low.c (s390_fill_last_break): Remove.
875 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
876 (s390_arch_setup): Use regset's size instead of fill_function for
877 loop end condition.
878
098dbe61
AA
8792014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
880
881 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
882 the regset's store function when ptrace returned an error.
883 * regcache.c (get_thread_regcache): Invalidate register cache
884 before fetching inferior's registers.
885
28eef672
AA
8862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
887
888 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
889 while-loop as for-loop.
890 (regsets_store_inferior_registers): Likewise.
891
bdca27a2
YQ
8922014-11-28 Yao Qi <yao@codesourcery.com>
893
894 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
895 * config.in, configure: Re-generate.
896 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
897 is defined.
898
9c232dda
YQ
8992014-11-21 Yao Qi <yao@codesourcery.com>
900
901 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
902 (AC_CHECK_HEADERS): Remove malloc.h.
903 * configure: Re-generated.
904 * config.in: Re-generated.
905 * server.h: Don't include alloca.h and malloc.h.
906 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
907 Don't include malloc.h.
908
43968415
JB
9092014-11-17 Joel Brobecker <brobecker@adacore.com>
910
911 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
912 corresponding ERRNO check in same block.
913
40e91bc7
PA
9142014-11-12 Pedro Alves <palves@redhat.com>
915
916 * server.c (cont_thread): Update comment.
917 (start_inferior, attach_inferior): No longer clear cont_thread.
918 (handle_v_cont): No longer set cont_thread.
919 (captured_main): Clear cont_thread each time a GDB connects.
920
c2c118cf
PA
9212014-11-12 Pedro Alves <palves@redhat.com>
922
923 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
924 thread, and don't resume all threads if the Hc thread has exited.
925
78708b7c
PA
9262014-11-12 Pedro Alves <palves@redhat.com>
927
928 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
929 the process group instead of to a specific LWP.
930
a2abc7de
PA
9312014-10-15 Pedro Alves <palves@redhat.com>
932
933 PR server/17487
934 * win32-arm-low.c (arm_set_thread_context): Remove current_event
935 parameter.
936 (arm_set_thread_context): Delete.
937 (the_low_target): Adjust.
938 * win32-i386-low.c (debug_registers_changed)
939 (debug_registers_used): Delete.
940 (update_debug_registers_callback): New function.
941 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
942 needing to update their debug registers.
943 (win32_get_current_dr): New function.
944 (x86_dr_low_get_addr, x86_dr_low_get_control)
945 (x86_dr_low_get_status): Fetch the debug register from the thread
946 record's context.
947 (i386_initial_stuff): Adjust.
948 (i386_get_thread_context): Remove current_event parameter. Don't
949 clear debug_registers_changed nor copy DR values to
950 debug_reg_state.
951 (i386_set_thread_context): Delete.
952 (i386_prepare_to_resume): New function.
953 (i386_thread_added): Mark the thread as needing to update irs
954 debug registers.
955 (the_low_target): Remove i386_set_thread_context and install
956 i386_prepare_to_resume.
957 * win32-low.c (win32_get_thread_context): Adjust.
958 (win32_set_thread_context): Use SetThreadContext
959 directly.
960 (win32_prepare_to_resume): New function.
961 (win32_require_context): New function, factored out from ...
962 (thread_rec): ... this.
963 (continue_one_thread): Call win32_prepare_to_resume on each thread
964 we're about to continue.
965 (win32_resume): Call win32_prepare_to_resume on the event thread.
966 * win32-low.h (struct win32_thread_info)
967 <debug_registers_changed>: New field.
968 (struct win32_target_ops): Change prototype of set_thread_context,
969 delete set_thread_context and add prepare_to_resume.
970 (win32_require_context): New declaration.
971
a442d071
GB
9722014-10-08 Gary Benson <gbenson@redhat.com>
973
974 * server.h: Do not include common-exceptions.h.
975
6f1947e8
GB
9762014-10-08 Gary Benson <gbenson@redhat.com>
977
978 * server.h: Do not include cleanups.h.
979
63b434a4
JH
9802014-09-30 James Hogan <james.hogan@imgtec.com>
981
982 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
983 mips64-dsp-linux.c.
984
c4d9ceb6
YQ
9852014-09-23 Yao Qi <yao@codesourcery.com>
986
987 * linux-low.c (lp_status_maybe_breakpoint): New function.
988 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
989 (count_events_callback): Likewise.
990 (select_event_lwp_callback): Likewise.
991 (cancel_breakpoints_callback): Likewise.
992
89a5711c
DB
9932014-09-19 Don Breazeal <donb@codesourcery.com>
994
995 * linux-low.c (handle_extended_wait): Call
996 linux_ptrace_get_extended_event.
997 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
998 linux_is_extended_waitstatus.
999
bffc0964
JB
10002014-09-16 Joel Brobecker <brobecker@adacore.com>
1001
1002 * Makefile.in (CPPFLAGS): Define.
1003 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1004 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1005
0bfdf32f
GB
10062014-09-16 Gary Benson <gbenson@redhat.com>
1007
1008 * inferiors.h (current_inferior): Renamed as...
1009 (current_thread): New variable. All uses updated.
1010 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1011 (maybe_move_out_of_jump_pad): Likewise.
1012 (cancel_breakpoint): Likewise.
1013 (linux_low_filter_event): Likewise.
1014 (wait_for_sigstop): Likewise.
1015 (linux_resume_one_lwp): Likewise.
1016 (need_step_over_p): Likewise.
1017 (start_step_over): Likewise.
1018 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1019 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1020 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1021 and save_inferior as saved_thread.
1022 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1023 saved_thread.
1024 (regcache_invalidate_thread): Likewise.
1025 * remote-utils.c (prepare_resume_reply): Likewise.
1026 * thread-db.c (thread_db_get_tls_address): Likewise.
1027 (disable_thread_event_reporting): Likewise.
1028 (remove_thread_event_breakpoints): Likewise.
1029 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1030 as saved_thread.
1031 * target.h (set_desired_inferior): Renamed as...
1032 (set_desired_thread): New declaration. All uses updated.
1033 * server.c (myresume): Updated comment to reference thread instead
1034 of inferior.
1035 (handle_serial_event): Likewise.
1036 (handle_target_event): Likewise.
1037
361c8ade
GB
10382014-09-12 Tom Tromey <tromey@redhat.com>
1039 Gary Benson <gbenson@redhat.com>
1040
1041 * regcache.h: Include common-regcache.h.
1042 (regcache_read_pc): Don't declare.
1043 * regcache.c (get_thread_regcache_for_ptid): New function.
1044
bd9269f7
GB
10452014-09-11 Tom Tromey <tromey@redhat.com>
1046 Gary Benson <gbenson@redhat.com>
1047
1048 * symbol.c: New file.
1049 * Makefile.in (SFILES): Add symbol.c.
1050 (OBS): Add symbol.o.
1051
f8c1d06b
GB
10522014-09-11 Gary Benson <gbenson@redhat.com>
1053
1054 * target.c (target_stop_ptid, target_continue_ptid): New
1055 functions.
1056
721ec300
GB
10572014-09-11 Tom Tromey <tromey@redhat.com>
1058 Gary Benson <gbenson@redhat.com>
1059
1060 * target.h: Include target/target.h.
1061 * target.c (target_read_memory, target_read_uint32)
1062 (target_write_memory): New functions.
1063
c5e92cca
GB
10642014-09-11 Gary Benson <gbenson@redhat.com>
1065
1066 * server.h (debug_hw_points): Don't declare.
1067 * server.c (debug_hw_points): Don't define. Replace all uses
1068 with show_debug_regs.
1069 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1070 all uses with show_debug_regs.
1071
2e4bb98a
EBM
10722014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1073
1074 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1075 endianness into account.
1076 (ppc_supply_ptrace_register): Likewise.
1077
ac740bc7
JH
10782014-09-03 James Hogan <james.hogan@imgtec.com>
1079
1080 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1081 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1082
97ea6506
GB
10832014-09-03 Gary Benson <gbenson@redhat.com>
1084
1085 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1086 ALL_DEBUG_ADDRESS_REGISTERS.
1087
df7e5265
GB
10882014-09-02 Gary Benson <gbenson@redhat.com>
1089
1090 * i386-low.h: Renamed as...
1091 * x86-low.h: New file. All type, function and variable name
1092 prefixes changed from "i386_" to "x86_". All references updated.
1093 * i386-low.c: Renamed as...
1094 * x86-low.c: New file. All type, function and variable name
1095 prefixes changed from "i386_" to "x86_". All references updated.
1096
ed859da7
GB
10972014-09-02 Gary Benson <gbenson@redhat.com>
1098
1099 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1100 (x86_linux_new_thread): Likewise.
1101
860789c7
GB
11022014-08-29 Gary Benson <gbenson@redhat.com>
1103
1104 * server.h (setjmp.h): Do not include.
1105 (toplevel): Do not declare.
1106 (common-exceptions.h): Include.
1107 (cleanups.h): Likewise.
1108 * server.c (toplevel): Do not define.
1109 (exit_code): New static global.
1110 (detach_or_kill_for_exit_cleanup): New function.
1111 (main): New function. Original main renamed to...
1112 (captured_main): New function.
1113 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1114
ff55e1b5
GB
11152014-08-29 Gary Benson <gbenson@redhat.com>
1116
1117 * Makefile.in (SFILES): Add common/common-exceptions.c.
1118 (OBS): Add common-exceptions.o.
1119 (common-exceptions.o): New rule.
1120 * utils.c (prepare_to_throw_exception): New function.
1121
e9bcb658
GB
11222014-08-29 Gary Benson <gbenson@redhat.com>
1123
1124 * config.in: Regenerate.
1125 * configure: Likewise.
1126
e3180625
GB
11272014-08-29 Gary Benson <gbenson@redhat.com>
1128
1129 * Makefile.in (SFILES): Add common/cleanups.c.
1130 (OBS): cleanups.o.
1131 (cleanups.o): New rule.
1132
e3d6ba5d
GB
11332014-08-29 Gary Benson <gbenson@redhat.com>
1134
1135 * utils.c (internal_vwarning): New function.
1136
7096e886
GB
11372014-08-28 Gary Benson <gbenson@redhat.com>
1138
1139 * utils.h (fatal): Remove declaration.
1140 * utils.c (fatal): Remove function.
1141
14ce3192
GB
11422014-08-28 Gary Benson <gbenson@redhat.com>
1143
1144 * tracepoint.c (gdb_agent_init): Replace fatal with
1145 perror_with_name.
1146 (initialize_tracepoint): Likewise.
1147
50278d59
GB
11482014-08-28 Gary Benson <gbenson@redhat.com>
1149
1150 * remote-utils.c (remote_prepare): Replace fatal with error.
1151
aa96c426
GB
11522014-08-28 Gary Benson <gbenson@redhat.com>
1153
1154 * linux-low.c (linux_async): Replace fatal with warning.
1155 Tidy up and return.
1156 (linux_start_non_stop): Return -1 if linux_async failed.
1157
f7160e97
GB
11582014-08-28 Gary Benson <gbenson@redhat.com>
1159
1160 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1161 gdb_assert.
1162 (i386_dr_low_get_addr): Remove vague comment.
1163 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1164 gdb_assert.
1165
38e08fca
GB
11662014-08-28 Gary Benson <gbenson@redhat.com>
1167
1168 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1169 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1170 internal_error.
1171 (linux_resume_one_lwp): Likewise.
1172 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1173 gdb_assert.
1174 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1175 with internal_error.
1176 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1177 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1178 (find_register_by_name): Replace fatal with internal_error.
1179 (find_regno): Likewise.
1180 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1181 * thread-db.c (thread_db_create_event): Likewise.
1182 (thread_db_load_search): Likewise.
1183 (try_thread_db_load_1): Likewise.
1184 * tracepoint.c (get_jump_space_head): Replace fatal with
1185 internal_error.
1186 (claim_trampoline_space): Likewise.
1187 (have_fast_tracepoint_trampoline_buffer): Likewise.
1188 (cmd_qtstart): Likewise.
1189 (stop_tracing): Likewise.
1190 (fast_tracepoint_collecting): Likewise.
1191 (target_malloc): Likewise.
1192 (download_tracepoint): Likewise.
1193 (download_trace_state_variables): Replace check with gdb_assert.
1194 (upload_fast_traceframes): Replace fatal with internal_error.
1195
34abf635
GB
11962014-08-19 Tom Tromey <tromey@redhat.com>
1197 Gary Benson <gbenson@redhat.com>
1198
1199 * Makefile.in (SFILES): Add common/common-debug.c.
1200 (OBS): Add common-debug.o.
1201 (common-debug.o): New rule.
1202 * debug.h (debug_printf): Don't declare.
1203 * debug.c (debug_printf): Renamed and rewritten as...
1204 (debug_vprintf): New function.
1205
f6e94d78
GB
12062014-08-19 Gary Benson <gbenson@redhat.com>
1207
1208 * utils.h: Do not include print-utils.h.
1209
9239eeab
GB
12102014-08-19 Tom Tromey <tromey@redhat.com>
1211 Gary Benson <gbenson@redhat.com>
1212
1213 * server.h: Add static assertion.
1214 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1215
ef87c8bb
GB
12162014-08-19 Tom Tromey <tromey@redhat.com>
1217 Gary Benson <gbenson@redhat.com>
1218
1219 * Makefile.in (SFILES): Add common/errors.c.
1220 (OBS): Add errors.o.
1221 (IPA_OBS): Add errors-ipa.o.
1222 (errors.o): New rule.
1223 (errors-ipa.o): Likewise.
1224 * utils.h (perror_with_name, error, warning): Don't declare.
1225 * utils.c (warning): Renamed and rewritten as...
1226 (vwarning): New function.
1227 (error): Renamed and rewritten as...
1228 (verror): New function.
1229 (internal_error): Renamed and rewritten as...
1230 (internal_verror): New function.
1231
bb974a24
GB
12322014-08-07 Gary Benson <gbenson@redhat.com>
1233
1234 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1235 * configure: Regenerate.
1236 * config.in: Likewise.
1237 * server.h: Do not include errno.h.
1238 * event-loop.c: Likewise.
1239 * hostio-errno.c: Likewise.
1240 * linux-low.c: Likewise.
1241 * remote-utils.c: Likewise.
1242 * spu-low.c: Likewise.
1243 * utils.c: Likewise.
1244 * gdbreplay.c: Unconditionally include errno.h.
1245
6d3d12eb
GB
12462014-08-07 Gary Benson <gbenson@redhat.com>
1247
1248 * server.h: Do not include string.h.
1249 * event-loop.c: Likewise.
1250 * linux-low.c: Likewise.
1251 * regcache.c: Likewise.
1252 * remote-utils.c: Likewise.
1253 * spu-low.c: Likewise.
1254 * utils.c: Likewise.
1255
dccbb609
GB
12562014-08-07 Gary Benson <gbenson@redhat.com>
1257
1258 * server.h: Do not include gdb_assert.h.
1259
e76df0d0
GB
12602014-08-07 Gary Benson <gbenson@redhat.com>
1261
1262 * server.h: Do not include common-utils.h.
1263
4cb9c816
GB
12642014-08-07 Gary Benson <gbenson@redhat.com>
1265
1266 * server.h: Do not include ptid.h.
1267 * notif.h: Likewise.
1268
3995eeee
GB
12692014-08-07 Gary Benson <gbenson@redhat.com>
1270
1271 * server.h: Do not include gdb_locale.h.
1272
cb9f1a9b
GB
12732014-08-07 Gary Benson <gbenson@redhat.com>
1274
1275 * server.h: Do not include gdb/signals.h.
1276 * win32-low.c: Likewise.
1277
a5fceff8
GB
12782014-08-07 Gary Benson <gbenson@redhat.com>
1279
1280 * server.h: Do not include pathmax.h.
1281
b9391142
GB
12822014-08-07 Gary Benson <gbenson@redhat.com>
1283
1284 * server.h: Do not include libiberty.h.
1285 * linux-bfin-low.c: Likewise.
1286
0e443c87
GB
12872014-08-07 Gary Benson <gbenson@redhat.com>
1288
1289 * server.h: Do not include ansidecl.h.
1290
8ebb3f56
GB
12912014-08-07 Gary Benson <gbenson@redhat.com>
1292
1293 * linux-x86-low.c: Do not include stddef.h.
1294 * lynx-ppc-low.c: Likewise.
1295 * tracepoint.c: Likewise.
1296
8980bdf6
GB
12972014-08-07 Gary Benson <gbenson@redhat.com>
1298
1299 * server.h: Do not include stdarg.h.
1300 * nto-low.c: Likewise.
1301
d7096f71
GB
13022014-08-07 Gary Benson <gbenson@redhat.com>
1303
1304 * server.h: Do not include stdlib.h.
1305 * inferiors.c: Likewise.
1306 * linux-low.c: Likewise.
1307 * regcache.c: Likewise.
1308 * spu-low.c: Likewise.
1309 * tracepoint.c: Likewise.
1310 * utils.c: Likewise.
1311
d02f550d
GB
13122014-08-07 Gary Benson <gbenson@redhat.com>
1313
1314 * server.h: Do not include stdio.h.
1315 * linux-low.c: Likewise.
1316 * remote-utils.c: Likewise.
1317 * spu-low.c: Likewise.
1318 * utils.c: Likewise.
1319 * wincecompat.c: Likewise.
1320
87f6c4e3
GB
13212014-08-06 Gary Benson <gbenson@redhat.com>
1322
1323 * regcache.c (init_register_cache): Move conditionals inside if.
1324
7089dca4
GB
13252014-08-06 Gary Benson <gbenson@redhat.com>
1326
1327 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1328
462f517e
GB
13292014-07-31 Gary Benson <gbenson@redhat.com>
1330
1331 * ax.h: Do not include server.h.
1332 * gdbthread.h: Likewise.
1333 * lynx-low.h: Likewise.
1334 * notif.h: Likewise.
1335
976411d6
GB
13362014-07-30 Gary Benson <gbenson@redhat.com>
1337
1338 * server.h: Include common-defs.h.
1339 Do not include config.h or build-gnulib-gdbserver/config.h.
1340
d41f6d8e
GB
13412014-07-30 Gary Benson <gbenson@redhat.com>
1342
1343 * hostio-errno.c: Move server.h to top of includes list.
1344 * inferiors.c: Likewise.
1345 * linux-x86-low.c: Likewise.
1346 * notif.c: Include server.h.
1347
314c6a35
TT
13482014-07-24 Tom Tromey <tromey@redhat.com>
1349 Gary Benson <gbenson@redhat.com>
1350
1351 * server.h (CORE_ADDR): Now unsigned.
1352
69ff6be5
PA
13532014-07-16 Pedro Alves <palves@redhat.com>
1354
1355 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1356
ce9e3fe7
PA
13572014-07-15 Pedro Alves <palves@redhat.com>
1358
1359 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1360 copy.
1361
e76126e8
PA
13622014-07-11 Pedro Alves <palves@redhat.com>
1363
1364 * linux-low.c (kill_wait_lwp): New function, based on
1365 kill_one_lwp_callback, but use my_waitpid directly.
1366 (kill_one_lwp_callback, linux_kill): Use it.
1367
8e9db26e
PA
13682014-06-23 Pedro Alves <palves@redhat.com>
1369
1370 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1371 before setting DR0..DR3.
1372
698b3e08
GB
13732014-06-20 Gary Benson <gbenson@redhat.com>
1374
1375 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1376 * configure: Regenerated.
1377 * config.in: Likewise.
1378
125f8a3d
GB
13792014-06-20 Gary Benson <gbenson@redhat.com>
1380
1381 * Makefile.in (SFILES): Update locations for files moved
1382 from common to nat.
1383 (object file files): Reordered.
1384
42995dbd
GB
13852014-06-20 Gary Benson <gbenson@redhat.com>
1386
1387 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1388 (i386_dr_low_set_addr): Likewise.
1389 (i386_dr_low_get_addr): Likewise.
1390 (i386_dr_low_can_set_control): Likewise.
1391 (i386_dr_low_set_control): Likewise.
1392 (i386_dr_low_get_control): Likewise.
1393 (i386_dr_low_get_status): Likewise.
1394 (i386_get_debug_register_length): Likewise.
1395 * linux-x86-low.c (i386_dr_low_set_addr):
1396 Changed signature. Made static.
1397 (i386_dr_low_get_addr): Likewise.
1398 (i386_dr_low_set_control): Likewise.
1399 (i386_dr_low_get_control): Likewise.
1400 (i386_dr_low_get_status): Likewise.
1401 (i386_dr_low): New global variable.
1402 * win32-i386-low.c (i386_dr_low_set_addr):
1403 Changed signature. Made static.
1404 (i386_dr_low_get_addr): Likewise.
1405 (i386_dr_low_set_control): Likewise.
1406 (i386_dr_low_get_control): Likewise.
1407 (i386_dr_low_get_status): Likewise.
1408 (i386_dr_low): New global variable.
1409
e1d2394b
MS
14102014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1411
1412 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1413 * Makefile.in (AR, AR_FLAGS): Define.
1414 * configure: Regenerate.
1415
3a8ee006
GB
14162014-06-19 Gary Benson <gbenson@redhat.com>
1417
1418 * Makefile.in (i386-dregs.o): New rule.
1419 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1420 * i386-low.c (target.h): Remove include.
1421 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1422 (DR_CONTROL_SHIFT): Likewise.
1423 (DR_CONTROL_SIZE): Likewise.
1424 (DR_RW_EXECUTE): Likewise.
1425 (DR_RW_WRITE): Likewise.
1426 (DR_RW_READ): Likewise.
1427 (DR_RW_IORW): Likewise.
1428 (DR_LEN_1): Likewise.
1429 (DR_LEN_2): Likewise.
1430 (DR_LEN_4): Likewise.
1431 (DR_LEN_8): Likewise.
1432 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1433 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1434 (DR_ENABLE_SIZE): Likewise.
1435 (DR_LOCAL_SLOWDOWN): Likewise.
1436 (DR_GLOBAL_SLOWDOWN): Likewise.
1437 (DR_CONTROL_RESERVED): Likewise.
1438 (I386_DR_CONTROL_MASK): Likewise.
1439 (I386_DR_VACANT): Likewise.
1440 (I386_DR_LOCAL_ENABLE): Likewise.
1441 (I386_DR_GLOBAL_ENABLE): Likewise.
1442 (I386_DR_DISABLE): Likewise.
1443 (I386_DR_SET_RW_LEN): Likewise.
1444 (I386_DR_GET_RW_LEN): Likewise.
1445 (I386_DR_WATCH_HIT): Likewise.
1446 (i386_wp_op_t): Likewise.
1447 (i386_show_dr): Likewise.
1448 (i386_length_and_rw_bits): Likewise.
1449 (i386_insert_aligned_watchpoint): Likewise.
1450 (i386_remove_aligned_watchpoint): Likewise.
1451 (i386_handle_nonaligned_watchpoint): Likewise.
1452 i386_update_inferior_debug_regs(): Likewise.
1453 (i386_dr_insert_watchpoint): Likewise.
1454 (i386_dr_remove_watchpoint): Likewise.
1455 (i386_dr_region_ok_for_watchpoint): Likewise.
1456 (i386_dr_stopped_data_address): Likewise.
1457 (i386_dr_stopped_by_watchpoint): Likewise.
1458
8f26655c
GB
14592014-06-19 Gary Benson <gbenson@redhat.com>
1460
1461 * i386-low.c (i386_dr_show): Renamed to
1462 i386_show_dr and made static. All uses updated.
1463 (i386_dr_length_and_rw_bits): Renamed to
1464 i386_length_and_rw_bits and made static.
1465 All uses updated.
1466 (i386_dr_insert_aligned_watchpoint): Renamed to
1467 i386_insert_aligned_watchpoint and made static.
1468 All uses updated.
1469 (i386_dr_remove_aligned_watchpoint): Renamed to
1470 i386_remove_aligned_watchpoint and made static.
1471 All uses updated.
1472 (i386_dr_update_inferior_debug_regs): Renamed to
1473 i386_update_inferior_debug_regs and made static.
1474 All uses updated.
1475
b9228891
GB
14762014-06-18 Gary Benson <gbenson@redhat.com>
1477
5171def3
GB
1478 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1479 (i386_dr_low_can_set_control): Likewise.
1480 (i386_get_debug_register_length): Likewise.
1481 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1482 (i386_dr_low_can_set_control): Likewise.
1483 (i386_get_debug_register_length): Likewise.
1484
14852014-06-17 Gary Benson <gbenson@redhat.com>
1486
b9228891
GB
1487 * i386-low.h (i386-dregs.h): New include.
1488 (DR_FIRSTADDR): Now in i386-dregs.h.
1489 (DR_LASTADDR): Likewise.
1490 (DR_NADDR): Likewise.
1491 (DR_STATUS): Likewise.
1492 (DR_CONTROL): Likewise.
1493 (i386_debug_reg_state): Likewise.
1494 (i386_dr_insert_watchpoint): Likewise.
1495 (i386_dr_remove_watchpoint): Likewise.
1496 (i386_dr_region_ok_for_watchpoint): Likewise.
1497 (i386_dr_stopped_data_address): Likewise.
1498 (i386_dr_stopped_by_watchpoint): Likewise.
1499 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1500
4be83cc2
GB
15012014-06-18 Gary Benson <gbenson@redhat.com>
1502
1503 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1504 i386_dr_insert_watchpoint.
1505 (i386_low_remove_watchpoint): Renamed to
1506 i386_dr_remove_watchpoint.
1507 (i386_low_region_ok_for_watchpoint): Renamed to
1508 i386_dr_region_ok_for_watchpoint.
1509 (i386_low_stopped_data_address): Renamed to
1510 i386_dr_stopped_data_address.
1511 (i386_low_stopped_by_watchpoint): Renamed to
1512 i386_dr_stopped_by_watchpoint.
1513 * i386-low.c (i386_show_dr): Renamed to
1514 i386_dr_show and made nonstatic. All uses updated.
1515 (i386_length_and_rw_bits): Renamed to
1516 i386_dr_length_and_rw_bits and made nonstatic.
1517 All uses updated.
1518 (i386_insert_aligned_watchpoint): Renamed to
1519 i386_dr_insert_aligned_watchpoint and made nonstatic.
1520 All uses updated.
1521 (i386_remove_aligned_watchpoint): Renamed to
1522 i386_dr_remove_aligned_watchpoint and made nonstatic.
1523 All uses updated.
1524 (i386_update_inferior_debug_regs): Renamed to
1525 i386_dr_update_inferior_debug_regs and made nonstatic.
1526 All uses updated.
1527 (i386_low_insert_watchpoint): Renamed to
1528 i386_dr_insert_watchpoint. All uses updated.
1529 (i386_low_remove_watchpoint): Renamed to
1530 i386_dr_remove_watchpoint. All uses updated.
1531 (i386_low_region_ok_for_watchpoint): Renamed to
1532 i386_dr_region_ok_for_watchpoint. All uses updated.
1533 (i386_low_stopped_data_address): Renamed to
1534 i386_dr_stopped_data_address. All uses updated.
1535 (i386_low_stopped_by_watchpoint): Renamed to
1536 i386_dr_stopped_by_watchpoint. All uses updated.
1537
131aa0d4
GB
15382014-06-18 Gary Benson <gbenson@redhat.com>
1539
1540 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1541 (i386_dr_low_can_set_control): Likewise.
1542 (i386_insert_aligned_watchpoint): New check.
1543
d9305f7f
GB
15442014-06-18 Gary Benson <gbenson@redhat.com>
1545
1546 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1547 Renamed to state.
1548
e927c9fc
GB
15492014-06-18 Gary Benson <gbenson@redhat.com>
1550
1551 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1552 instead of fatal and error.
1553 (i386_handle_nonaligned_watchpoint): Likewise.
1554
1b6d4134
GB
15552014-06-18 Gary Benson <gbenson@redhat.com>
1556
1557 * i386-low.c (i386_get_debug_register_length): New macro.
1558 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1559 (i386_show_dr): Use debug_printf instead of fprintf. Use
1560 phex to format values.
1561
6e62758f
GB
15622014-06-18 Gary Benson <gbenson@redhat.com>
1563
1564 * i386-low.h: Comment changes.
1565 * i386-low.c: Likewise.
1566
fc6e2f03
GB
15672014-06-18 Gary Benson <gbenson@redhat.com>
1568
1569 * i386-low.c: Whitespace changes.
1570
f9d1eeed
TT
15712014-06-12 Tom Tromey <tromey@redhat.com>
1572
1573 * utils.c (freeargv): Remove.
1574
0b04e523
TT
15752014-06-12 Tom Tromey <tromey@redhat.com>
1576
1577 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1578 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1579 (parse_debug_format_options): Likewise.
1580 (gdbserver_usage): Likewise.
1581 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1582 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1583 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1584 against libiberty.
1585 ($(LIBGNU)): Depend on libiberty.
1586 (all-lib): Recurse into all subdirs.
1587 (install-only): Invoke "install" target in subdirs.
1588 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1589 targets.
1590 * configure: Rebuild.
1591 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1592 for vasprintf, vsnprintf, or gettimeofday.
1593 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1594 srv_tgtobj.
1595
270c9937
JB
15962014-06-05 Joel Brobecker <brobecker@adacore.com>
1597
1598 * development.sh: Delete.
1599 * Makefile.in (config.status): Adjust dependency on development.sh.
1600 * configure.ac: Adjust development.sh source call.
1601 * configure: Regenerate.
1602
0a261ed8
PA
16032014-06-02 Pedro Alves <palves@redhat.com>
1604
1605 * ax.c (gdb_free_agent_expr): New function.
1606 * ax.h (gdb_free_agent_expr): New declaration.
1607 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1608 list.
1609 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1610 static.
1611 (clear_breakpoint_conditions_and_commands): New function.
1612 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1613 (clear_breakpoint_conditions_and_commands): New declaration.
1614
e9dae05e
RR
16152014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1616
1617 * linux-aarch64-low.c (asm/ptrace.h): Include.
1618
5876f503
JK
16192014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1620
1621 Fix TLS access for -static -pthread.
1622 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1623 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1624 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1625
802e8e6d
PA
16262014-05-20 Pedro Alves <palves@redhat.com>
1627
1628 * linux-aarch64-low.c (aarch64_insert_point)
1629 (aarch64_remove_point): No longer check whether the type is
1630 supported here. Adjust to new interface.
1631 (the_low_target): Install aarch64_supports_z_point_type as
1632 supports_z_point_type method.
1633 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1634 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1635 instead of a Z packet char. Adjust.
1636 (arm_supports_z_point_type): New function.
1637 (arm_insert_point, arm_remove_point): Adjust to new interface.
1638 (the_low_target): Install arm_supports_z_point_type.
1639 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1640 (cris_insert_point, cris_remove_point): Adjust to new interface.
1641 Don't check whether the type is supported here.
1642 (the_low_target): Install cris_supports_z_point_type.
1643 * linux-low.c (linux_supports_z_point_type): New function.
1644 (linux_insert_point, linux_remove_point): Adjust to new interface.
1645 * linux-low.h (struct linux_target_ops) <insert_point,
1646 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1647 raw_breakpoint pointer parameter.
1648 <supports_z_point_type>: New method.
1649 * linux-mips-low.c (mips_supports_z_point_type): New function.
1650 (mips_insert_point, mips_remove_point): Adjust to new interface.
1651 Use mips_supports_z_point_type.
1652 (the_low_target): Install mips_supports_z_point_type.
1653 * linux-ppc-low.c (the_low_target): Install NULL as
1654 supports_z_point_type method.
1655 * linux-s390-low.c (the_low_target): Install NULL as
1656 supports_z_point_type method.
1657 * linux-sparc-low.c (the_low_target): Install NULL as
1658 supports_z_point_type method.
1659 * linux-x86-low.c (x86_supports_z_point_type): New function.
1660 (x86_insert_point): Adjust to new insert_point interface. Use
1661 insert_memory_breakpoint. Adjust to new
1662 i386_low_insert_watchpoint interface.
1663 (x86_remove_point): Adjust to remove_point interface. Use
1664 remove_memory_breakpoint. Adjust to new
1665 i386_low_remove_watchpoint interface.
1666 (the_low_target): Install x86_supports_z_point_type.
1667 * lynx-low.c (lynx_target_ops): Install NULL as
1668 supports_z_point_type callback.
1669 * nto-low.c (nto_supports_z_point_type): New.
1670 (nto_insert_point, nto_remove_point): Adjust to new interface.
1671 (nto_target_ops): Install nto_supports_z_point_type.
1672 * mem-break.c: Adjust intro comment.
1673 (struct raw_breakpoint) <raw_type, size>: New fields.
1674 <inserted>: Update comment.
1675 <shlib_disabled>: Delete field.
1676 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1677 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1678 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1679 (raw_bkpt_type_to_target_hw_bp_type): New function.
1680 (find_enabled_raw_code_breakpoint_at): New function.
1681 (find_raw_breakpoint_at): New type and size parameters. Use them.
1682 (insert_memory_breakpoint): New function, based off
1683 set_raw_breakpoint_at.
1684 (remove_memory_breakpoint): New function.
1685 (set_raw_breakpoint_at): Reimplement.
1686 (set_breakpoint): New, based on set_breakpoint_at.
1687 (set_breakpoint_at): Reimplement.
1688 (delete_raw_breakpoint): Go through the_target->remove_point
1689 instead of assuming memory breakpoints.
1690 (find_gdb_breakpoint_at): Delete.
1691 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1692 (find_gdb_breakpoint): New function.
1693 (set_gdb_breakpoint_at): Delete.
1694 (z_type_supported): New function.
1695 (set_gdb_breakpoint_1): New function, loosely based off
1696 set_gdb_breakpoint_at.
1697 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1698 (delete_gdb_breakpoint_at): Delete.
1699 (delete_gdb_breakpoint_1): New function, loosely based off
1700 delete_gdb_breakpoint_at.
1701 (delete_gdb_breakpoint): New function.
1702 (clear_gdb_breakpoint_conditions): Rename to ...
1703 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1704 breakpoint.
1705 (add_condition_to_breakpoint): Make static.
1706 (add_breakpoint_condition): Take a struct breakpoint pointer
1707 instead of an address. Adjust.
1708 (gdb_condition_true_at_breakpoint): Rename to ...
1709 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1710 z_type parameter.
1711 (gdb_condition_true_at_breakpoint): Reimplement.
1712 (add_breakpoint_commands): Take a struct breakpoint pointer
1713 instead of an address. Adjust.
1714 (gdb_no_commands_at_breakpoint): Rename to ...
1715 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1716 parameter. Return true if no breakpoint was found. Change debug
1717 output.
1718 (gdb_no_commands_at_breakpoint): Reimplement.
1719 (run_breakpoint_commands): Rename to ...
1720 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1721 and change return type to boolean.
1722 (run_breakpoint_commands): New function.
1723 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1724 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1725 breakpoint. Go through the_target->remove_point instead of
1726 assuming memory breakpoint.
1727 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1728 software and hardware breakpoints.
1729 (reinsert_raw_breakpoint): Go through the_target->insert_point
1730 instead of assuming memory breakpoint.
1731 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1732 software and hardware breakpoints.
1733 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1734 Check both software and hardware breakpoints.
1735 (validate_inserted_breakpoint): Assert the breakpoint is a
1736 software breakpoint. Set the inserted flag to -1 instead of
1737 setting shlib_disabled.
1738 (delete_disabled_breakpoints): Adjust.
1739 (validate_breakpoints): Only validate software breakpoints.
1740 Adjust to inserted flag change.
1741 (check_mem_read, check_mem_write): Skip breakpoint types other
1742 than software breakpoints. Adjust to inserted flag change.
1743 * mem-break.h (enum raw_bkpt_type): New enum.
1744 (raw_breakpoint, struct process_info): Forward declare.
1745 (Z_packet_to_target_hw_bp_type): Delete declaration.
1746 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1747 (set_gdb_breakpoint, delete_gdb_breakpoint)
1748 (clear_breakpoint_conditions): New declarations.
1749 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1750 (breakpoint_inserted_here): Update comment.
1751 (add_breakpoint_condition, add_breakpoint_commands): Replace
1752 address parameter with a breakpoint pointer parameter.
1753 (gdb_breakpoint_here): Update comment.
1754 (delete_gdb_breakpoint_at): Delete.
1755 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1756 * server.c (process_point_options): Take a struct breakpoint
1757 pointer instead of an address. Adjust.
1758 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1759 delete_gdb_breakpoint.
1760 * spu-low.c (spu_target_ops): Install NULL as
1761 supports_z_point_type method.
1762 * target.h: Include mem-break.h.
1763 (struct target_ops) <prepare_to_access_memory>: Update comment.
1764 <supports_z_point_type>: New field.
1765 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1766 instead of a char. Also take a raw breakpoint pointer.
1767 * win32-arm-low.c (the_low_target): Install NULL as
1768 supports_z_point_type.
1769 * win32-i386-low.c (i386_supports_z_point_type): New function.
1770 (i386_insert_point, i386_remove_point): Adjust to new interface.
1771 (the_low_target): Install i386_supports_z_point_type.
1772 * win32-low.c (win32_supports_z_point_type): New function.
1773 (win32_insert_point, win32_remove_point): Adjust to new interface.
1774 (win32_target_ops): Install win32_supports_z_point_type.
1775 * win32-low.h (struct win32_target_ops):
1776 <supports_z_point_type>: New method.
1777 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1778 instead of a char. Also take a raw breakpoint pointer.
1779
932539e3
PA
17802014-05-20 Pedro Alves <palves@redhat.com>
1781
1782 * mem-break.h: Include break-common.h.
1783 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1784 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1785 (Z_packet_to_target_hw_bp_type): New declaration.
1786 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1787 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1788 (Z_PACKET_ACCESS_WP): Delete macros.
1789 (Z_packet_to_hw_type): Delete function.
1790 * i386-low.h: Don't include break-common.h here.
1791 (Z_packet_to_hw_type): Delete declaration.
1792 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1793 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1794 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1795 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1796 * linux-aarch64-low.c: Don't include break-common.h here.
1797 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1798 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1799 (Z_packet_to_target_hw_bp_type): Delete function.
1800 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1801 function.
1802 (mips_insert_point, mips_remove_point): Use
1803 Z_packet_to_target_hw_bp_type.
1804
4ff0d3d8
PA
18052014-05-20 Pedro Alves <palves@redhat.com>
1806
1807 * linux-aarch64-low.c: Include break-common.h.
1808 (enum target_point_type): Delete.
1809 (Z_packet_to_point_type): Rename to ...
1810 (Z_packet_to_target_hw_bp_type): ... this, and return a
1811 target_hw_bp_type instead.
1812 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1813 instead of an enum target_point_type.
1814 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1815 breakpoint type.
1816 (aarch64_dr_state_insert_one_point)
1817 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1818 (aarch64_handle_aligned_watchpoint)
1819 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1820 Take an enum target_hw_bp_type instead of an enum
1821 target_point_type.
1822 (aarch64_supports_z_point_type): New function.
1823 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1824 use Z_packet_to_target_hw_bp_type.
1825
786dc519
JB
18262014-05-20 Joel Brobecker <brobecker@adacore.com>
1827
1828 * configure.ac: Only use -Werror by default when DEVELOPMENT
1829 is true.
1830 * configure: Regenerate.
1831
9e0aa64f
JK
18322014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1833
1834 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1835 * linux-x86-low.c (X86_64_USER_REGS): New.
1836 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1837
2b577b92
YQ
18382014-04-28 Yao Qi <yao@codesourcery.com>
1839
1840 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1841 name.
1842
94611da2
PA
18432014-04-25 Pedro Alves <palves@redhat.com>
1844
1845 PR server/16255
1846 * linux-low.c (linux_attach_fail_reason_string): New function.
1847 (linux_attach_lwp): Delete.
1848 (linux_attach_lwp_1): Rename to ...
1849 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1850 argument. Remove "initial" parameter. Return int instead of
1851 void. Don't error or warn here.
1852 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1853 failure to attach to the tgid. Call warning when failing to
1854 attach to an lwp.
1855 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1856 argument. Remove "initial" parameter. Return int instead of
1857 void. Don't error or warn here.
1858 (linux_attach_fail_reason_string): New declaration.
1859 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1860 interface change. Use linux_attach_fail_reason_string.
1861
01f9f808
MS
18622014-04-24 Michael Sturm <michael.sturm@mintel.com>
1863 Walfred Tedeschi <walfred.tedeschi@intel.com>
1864
1865 * Makefile.in: Added rules to handle new files
1866 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1867 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1868 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1869 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1870 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1871 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1872 x32-avx512-linux.o.
1873 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1874 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1875 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1876 i386/x32-avx512.xml.
1877 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1878 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1879 i386/x32-avx512-linux.xml.
1880 * i387-fp.c (num_avx512_k_registers): New constant for number
1881 of K registers.
1882 (num_avx512_zmmh_low_registers): New constant for number of
1883 lower ZMM registers (0-15).
1884 (num_avx512_zmmh_high_registers): New constant for number of
1885 higher ZMM registers (16-31).
1886 (num_avx512_ymmh_registers): New contant for number of higher
1887 YMM registers (ymm16-31 added by avx521 on x86_64).
1888 (num_avx512_xmm_registers): New constant for number of higher
1889 XMM registers (xmm16-31 added by AVX512 on x86_64).
1890 (struct i387_xsave): Add space for AVX512 registers.
1891 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1892 Add code to handle AVX512 registers.
1893 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1894 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1895 prototypei from generated file.
1896 (tdesc_amd64_avx512_linux): Likewise.
1897 (init_registers_x32_avx512_linux): Likewise.
1898 (tdesc_x32_avx512_linux): Likewise.
1899 (init_registers_i386_avx512_linux): Likewise.
1900 (tdesc_i386_avx512_linux): Likewise.
1901 (x86_64_regmap): Add AVX512 registers.
1902 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1903 mask.
1904 (initialize_low_arch): Add code to initialize AVX512 registers.
1905
51aa91f9
PA
19062014-04-23 Pedro Alves <palves@redhat.com>
1907
1908 * mem-break.c (find_gdb_breakpoint_at): Make static.
1909 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1910
a4165e94
PA
19112014-04-23 Pedro Alves <palves@redhat.com>
1912
1913 * i386-low.c: Don't include break-common.h here.
1914 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1915 prototype to take target_hw_bp_type as argument instead of a Z
1916 packet char.
1917 * i386-low.h: Include break-common.h here.
1918 (Z_packet_to_hw_type): Declare.
1919 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1920 prototypes.
1921 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1922 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1923 (x86_remove_point): Convert the packet number to a
1924 target_hw_bp_type before calling i386_low_remove_watchpoint.
1925 * win32-i386-low.c (i386_insert_point): Convert the packet number
1926 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1927 (i386_remove_point): Convert the packet number to a
1928 target_hw_bp_type before calling i386_low_remove_watchpoint.
1929
b8acf843
PA
19302014-04-23 Pedro Alves <palves@redhat.com>
1931
1932 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1933
d708bcd1
PA
19342014-04-10 Pedro Alves <palves@redhat.com>
1935
1936 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1937 Check if the condition or command is NULL before checking if the
1938 breakpoint is known. On success, return true.
1939 * mem-break.h (add_breakpoint_condition): Document return.
1940 (add_breakpoint_commands): Add describing comment.
1941 * server.c (skip_to_semicolon): New function.
1942 (process_point_options): Use it.
1943
2eec7d5b
PA
19442014-04-09 Pedro Alves <palves@redhat.com>
1945
1946 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1947 to lwpid_of.
1948
fa96cb38
PA
19492014-02-27 Pedro Alves <palves@redhat.com>
1950
1951 PR 12702
1952 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1953 macros.
1954 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1955 output.
1956 (last_thread_of_process_p): Take a PID argument instead of a
1957 thread pointer.
1958 (linux_wait_for_lwp): Delete.
1959 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1960 functions.
1961 (linux_low_filter_event): New function, party factored out from
1962 linux_wait_for_event.
1963 (linux_wait_for_event): Rename to ...
1964 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1965 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1966 sigsuspend. Check for zombie leaders.
1967 (linux_wait_for_event): Reimplement as wrapper around
1968 linux_wait_for_event_filtered.
1969 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1970 a normal or signal exit is seen, it's the whole process exiting.
1971 (wait_for_sigstop): No longer a for_each_inferior callback.
1972 Rewrite on top of linux_wait_for_event_filtered.
1973 (stop_all_lwps): Call wait_for_sigstop directly.
1974 * server.c (resume, handle_target_event): Handle
1975 TARGET_WAITKIND_NO_RESUMED.
1976
d763de10
JB
19772014-02-26 Joel Brobecker <brobecker@adacore.com>
1978
1979 * win32-low.c (psapi_get_dll_name,
1980 * win32_CreateToolhelp32Snapshot): Delete.
1981 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1982 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1983 Delete.
1984 (handle_load_dll): Add function description.
1985 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1986
850a0f76
JB
19872014-02-26 Joel Brobecker <brobecker@adacore.com>
1988
1989 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1990 Add comment.
1991 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1992 base address when calling win32_add_one_solib.
1993 (handle_load_dll): Delete local variable load_addr.
1994 Remove 0x1000 offset applied to DLL base address when calling
1995 win32_add_one_solib.
1996 (handle_unload_dll): Add comment.
1997
f25b3fc3
JB
19982014-02-26 Joel Brobecker <brobecker@adacore.com>
1999
2000 * win32-low.c (win32_add_all_dlls): Renames
2001 win32_ensure_ntdll_loaded. Rewrite function documentation.
2002 Adjust implementation to always load all DLLs.
2003 Add 0x1000 offset to DLL base address when calling
2004 win32_add_one_solib.
2005 (child_initialization_done): New static global.
2006 (do_initial_child_stuff): Set child_initialization_done to
2007 zero during child initialization, and 1 after. Replace call
2008 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2009 Add comment.
2010 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2011 (handle_unload_dll): Add function documentation.
2012 (get_child_debug_event): Ignore load and unload DLL events
2013 during child initialization.
2014
d86d4aaf
DE
20152014-02-20 Doug Evans <dje@google.com>
2016
3bc32da3 2017 Remove global all_lwps.
d86d4aaf
DE
2018 * inferiors.h (ptid_of): Move here from linux-low.h.
2019 (pid_of, lwpid_of): Ditto.
2020 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2021 parameter is a struct thread_info * now.
2022 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2023 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2024 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2025 directly.
2026 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2027 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2028 * linux-arm-low.c (update_registers_callback): Update, "entry"
2029 parameter is a struct thread_info * now.
2030 Fetch lwpid from current_inferior directly.
2031 (arm_insert_point): Pass &all_threads to find_inferior instead of
2032 &all_lwps.
2033 (arm_remove_point): Ditto.
2034 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2035 (arm_prepare_to_resume): Fetch pid from thread.
2036 (arm_read_description): Fetch lwpid from current_inferior directly.
2037 * linux-low.c (all_lwps): Delete.
2038 (delete_lwp): Delete call to remove_inferior.
2039 (handle_extended_wait): Fetch lwpid from thread.
2040 (add_lwp): Don't set lwp->entry.id. Remove call to
2041 add_inferior_to_list.
2042 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2043 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2044 (kill_one_lwp_callback): Ditto.
2045 (linux_kill): Don't dereference NULL pointer.
2046 Fetch ptid,lwpid from thread.
2047 (get_detach_signal): Fetch ptid from thread.
2048 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2049 Simplify call to regcache_invalidate_thread.
2050 (delete_lwp_callback): Update, "entry" parameter is a
2051 struct thread_info * now. Fetch pid from thread.
2052 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2053 (status_pending_p_callback): Update, "entry" parameter is a
2054 struct thread_info * now. Fetch ptid from thread.
2055 (find_lwp_pid): Update, "entry" parameter is a
2056 struct thread_info * now.
2057 (linux_wait_for_lwp): Fetch pid from thread.
2058 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2059 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2060 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2061 (dequeue_one_deferred_signal): Ditto.
2062 (cancel_breakpoint): Fetch ptid from current_inferior.
2063 (linux_wait_for_event): Pass &all_threads to find_inferior,
2064 not &all_lwps. Fetch ptid, lwpid from thread.
2065 (count_events_callback): Update, "entry" parameter is a
2066 struct thread_info * now.
2067 (select_singlestep_lwp_callback): Ditto.
2068 (select_event_lwp_callback): Ditto.
2069 (cancel_breakpoints_callback): Ditto.
2070 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2071 not &all_lwps.
2072 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2073 (unsuspend_one_lwp): Update, "entry" parameter is a
2074 struct thread_info * now.
2075 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2076 not &all_lwps.
2077 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2078 Fetch lwpid from thread, not lwp.
2079 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2080 Pass &all_threads to find_inferior, not &all_lwps.
2081 (send_sigstop): Fetch lwpid from thread, not lwp.
2082 (send_sigstop_callback): Update, "entry" parameter is a
2083 struct thread_info * now.
2084 (suspend_and_send_sigstop_callback): Ditto.
2085 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2086 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2087 struct thread_info * now.
2088 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2089 from thread, lwp.
2090 (lwp_running): Update, "entry" parameter is a
2091 struct thread_info * now.
2092 (stop_all_lwps): Fetch ptid from thread.
2093 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2094 (linux_resume_one_lwp): Fetch lwpid from thread.
2095 (linux_set_resume_request): Update, "entry" parameter is a
2096 struct thread_info * now. Fetch pid, lwpid from thread.
2097 (resume_status_pending_p): Update, "entry" parameter is a
2098 struct thread_info * now.
2099 (need_step_over_p): Ditto. Fetch lwpid from thread.
2100 (start_step_over): Fetch lwpid from thread.
2101 (linux_resume_one_thread): Update, "entry" parameter is a
2102 struct thread_info * now. Fetch lwpid from thread.
2103 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2104 (proceed_one_lwp): Update, "entry" parameter is a
2105 struct thread_info * now. Fetch lwpid from thread.
2106 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2107 struct thread_info * now.
2108 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2109 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2110 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2111 directly.
2112 (regsets_store_inferior_registers): Ditto.
2113 (fetch_register, store_register): Ditto.
2114 (linux_read_memory, linux_write_memory): Ditto.
2115 (linux_request_interrupt): Ditto.
2116 (linux_read_auxv): Ditto.
2117 (linux_xfer_siginfo): Ditto.
2118 (linux_qxfer_spu): Ditto.
2119 (linux_qxfer_libraries_svr4): Ditto.
2120 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2121 moved to inferiors.h.
2122 (get_lwp): Delete.
2123 (get_thread_lwp): Update.
2124 (struct lwp_info): Delete member "entry". Simplify comment for
2125 member "thread".
2126 (all_lwps): Delete.
2127 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2128 current_inferior directly.
2129 (update_watch_registers_callback): Update, "entry" parameter is a
2130 struct thread_info * now. Fetch pid from thread.
2131 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2132 (mips_insert_point): Fetch lwpid from current_inferior.
2133 Pass &all_threads to find_inferior, not &all_lwps.
2134 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2135 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2136 directly.
2137 (mips_stopped_data_address): Ditto.
2138 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2139 directly.
2140 * linux-tile-low.c (tile_arch_setup): Ditto.
2141 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2142 (update_debug_registers_callback): Update, "entry" parameter is a
2143 struct thread_info * now. Fetch pid from thread.
2144 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2145 Pass &all_threads to find_inferior, not &all_lwps.
2146 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2147 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2148 Pass &all_threads to find_inferior, not &all_lwps.
2149 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2150 (i386_dr_low_get_status): Ditto.
2151 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2152 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2153 (x86_linux_read_description): Ditto.
2154 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2155
3b8361aa
DE
21562014-02-20 Doug Evans <dje@google.com>
2157
2158 * inferiors.c (get_first_inferior): Fix buglet.
2159
f7667f0d
DE
21602014-02-19 Doug Evans <dje@google.com>
2161
2162 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2163 * inferiors.c (add_thread): Change result type to struct thread_info *.
2164 All callers updated.
2165 (add_lwp): Call add_thread here instead of in callers.
2166 All callers updated.
2167 * linux-low.h (get_lwp_thread): Rewrite.
2168 (struct lwp_info): New member "thread".
2169
b3312d80
DE
21702014-02-19 Doug Evans <dje@google.com>
2171
2172 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2173 All callers updated.
2174
ecc6f45c
DE
21752014-02-19 Doug Evans <dje@google.com>
2176
2177 * inferiors.c (add_thread): Fix whitespace.
2178
649ebbca
DE
21792014-02-19 Doug Evans <dje@google.com>
2180
2181 * dll.c (clear_dlls): Replace accessing list implemention details
2182 with API function.
2183 * gdbthread.h (get_first_thread): Declare.
2184 * inferiors.c (for_each_inferior_with_data): New function.
2185 (get_first_thread): New function.
2186 (find_thread_ptid): Simplify.
2187 (get_first_inferior): New function.
2188 (clear_list): Delete.
2189 (one_inferior_p): New function.
2190 (clear_inferior_list): New function.
2191 (clear_inferiors): Update.
2192 * inferiors.h (for_each_inferior_with_data): Declare.
2193 (clear_inferior_list): Declare.
2194 (one_inferior_p): Declare.
2195 (get_first_inferior): Declare.
2196 * linux-low.c (linux_wait_for_event): Replace accessing list
2197 implemention details with API function.
2198 * server.c (target_running): Ditto.
2199 (accumulate_file_name_length): New function.
2200 (emit_dll_description): New function.
2201 (handle_qxfer_libraries): Replace accessing list implemention
2202 details with API function.
2203 (handle_qxfer_threads_worker): New function.
2204 (handle_qxfer_threads_proper): Replace accessing list implemention
2205 details with API function.
2206 (handle_query): Ditto.
2207 (visit_actioned_threads_callback_ftype): New typedef.
2208 (visit_actioned_threads_data): New struct.
2209 (visit_actioned_threads): Rewrite to be find_inferior callback.
2210 (resume): Call find_inferior.
2211 (handle_status): Replace accessing list implemention
2212 details with API function.
2213 (process_serial_event): Replace accessing list implemention details
2214 with API function.
2215 * target.c (set_desired_inferior): Replace accessing list implemention
2216 details with API function.
2217 * tracepoint.c (same_process_p): New function.
2218 (gdb_agent_about_to_close): Replace accessing list implemention
2219 details with API function.
2220 * win32-low.c (child_delete_thread): Replace accessing list
2221 implemention details with API function.
2222 (match_dll_by_basename): New function.
2223 (dll_is_loaded_by_basename): New function.
2224 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2225 details call to dll_is_loaded_by_basename.
2226
80894984
DE
22272014-02-19 Doug Evans <dje@google.com>
2228
2229 * dll.h (struct dll_info): Add comment.
2230 * gdbthread.h (struct thread_info): Add comment.
2231 (current_ptid): Simplify.
2232 * inferiors.c (add_process): Update.
2233 (remove_process): Update.
2234 * inferiors.h (struct process_info): Rename member "head" to "entry".
2235 * linux-low.c (delete_lwp): Update.
2236 (add_lwp): Update.
2237 (last_thread_of_process_p): Update.
2238 (kill_one_lwp_callback, linux_kill): Update.
2239 (status_pending_p_callback): Update.
2240 (wait_for_sigstop): Update. Simplify read of ptid.
2241 (start_step_over): Update.
2242 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2243 (get_lwp_thread): Update.
2244 (struct lwp_info): Rename member "head" to "entry".
2245 * regcache.h (inferior_list_entry): Delete.
2246 * server.c (kill_inferior_callback): Update.
2247 (detach_or_kill_inferior_callback): Update.
2248 (print_started_pid): Update.
2249 (print_attached_pid): Update.
2250 (process_serial_event): Simplify read of ptid.
2251 * thread-db.c (thread_db_create_event): Update.
2252 (thread_db_get_tls_address): Update.
2253 * win32-low.c (current_inferior_ptid): Simplify.
2254
46917d26
TT
22552014-02-19 Tom Tromey <tromey@redhat.com>
2256
2257 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2258 argument.
2259 (target_supports_btrace): Update.
2260
0759a81e
YQ
22612014-02-14 Yao Qi <yao@codesourcery.com>
2262
2263 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2264 (rsp-low-ipa.o): New target.
2265
a7191e8b
TT
22662014-02-12 Tom Tromey <tromey@redhat.com>
2267
2268 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2269 convert_ascii_to_int.
2270 * regcache.c (registers_to_string): Likewise.
2271 * remote-utils.c (decode_M_packet): Likewise.
2272 * server.c (process_serial_event): Likewise.
2273
ff0e980e
TT
22742014-02-12 Tom Tromey <tromey@redhat.com>
2275
2276 * server.c (handle_query, handle_v_run): Use hex2bin, not
2277 unhexify.
2278 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2279
e9371aff
TT
22802014-02-12 Tom Tromey <tromey@redhat.com>
2281
2282 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2283 convert_int_to_ascii.
2284 * regcache.c (registers_to_string, collect_register_as_string):
2285 Likewise.
2286 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2287 Likewise.
2288 * server.c (process_serial_event): Likewise.
2289 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2290 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2291
971dc0b8
TT
22922014-02-12 Tom Tromey <tromey@redhat.com>
2293
2294 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2295 bin2hex, not hexify.
2296 * tracepoint.c (cmd_qtstatus): Likewise.
2297
0a822afb
TT
22982014-02-12 Tom Tromey <tromey@redhat.com>
2299
2300 * remote-utils.c (monitor_output): Pass explicit length to
2301 hexify.
2302
9c3d6531
TT
23032014-02-12 Tom Tromey <tromey@redhat.com>
2304
2305 * tracepoint.c: Include rsp-low.h.
2306 * server.c: Include rsp-low.h.
2307 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2308 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2309 declare.
2310 * remote-utils.c: Include rsp-low.h.
2311 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2312 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2313 (convert_int_to_ascii, convert_ascii_to_int): Move to
2314 common/rsp-low.c.
2315 * regcache.c: Include rsp-low.h.
2316 * ax.c: Include rsp-low.h.
2317 * Makefile.in (SFILES): Add common/rsp-low.c.
2318 (OBS): Add rsp-low.o.
2319 (rsp-low.o): New target.
2320
01fd3ea5
TT
23212014-02-12 Tom Tromey <tromey@redhat.com>
2322
2323 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2324 Include print-utils.h.
2325 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2326 (plongest, thirty_two, phex_nz): Remove.
2327 * Makefile.in (SFILES): Add common/print-utils.c.
2328 (OBS): Add print-utils.o.
2329 (print-utils-ipa.o): New target.
2330 (print-utils.o): New target.
2331 (IPA_OBJS): Add print-utils-ipa.o.
2332
e99dc820
TT
23332014-02-06 Tom Tromey <tromey@redhat.com>
2334
2335 * Makefile.in (SFILES): Fix indentation.
2336
ee1e2d4f
DE
23372014-02-05 Doug Evans <dje@google.com>
2338
2339 * linux-low.c (linux_wait_for_event): Improve comment.
2340 (linux_wait_1): Keep current_inferior in sync with event_child.
2341
f5a02773
DE
23422014-01-22 Doug Evans <dje@google.com>
2343
2344 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2345
87ce2a04
DE
23462014-01-22 Doug Evans <dje@google.com>
2347
2348 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2349 * configure: Regenerate.
2350 * config.in: Regenerate.
2351 * Makefile.in (SFILES): Add debug.c.
2352 (OBS): Add debug.o.
2353 * debug.c: New file.
2354 * debug.h: New file.
2355 * linux-aarch64-low.c (*): Update all debugging printfs to use
2356 debug_printf instead of fprintf.
2357 * linux-arm-low.c (*): Ditto.
2358 * linux-cris-low.c (*): Ditto.
2359 * linux-crisv32-low.c (*): Ditto.
2360 * linux-m32r-low.c (*): Ditto.
2361 * linux-sparc-low.c (*): Ditto.
2362 * linux-x86.c (*): Ditto.
2363 * linux-low.c (*): Ditto.
2364 (linux_wait_1): Add calls to debug_enter, debug_exit.
2365 (linux_wait): Remove redundant debugging printf.
2366 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2367 (linux_resume, unstop_all_lwps): Ditto.
2368 * mem-break.c (*): Update all debugging printfs to use
2369 debug_printf instead of fprintf.
2370 * remote-utils.c (*): Ditto.
2371 * thread-db.c (*): Ditto.
2372 * server.c #include <ctype.h>, "gdb_vecs.h".
2373 (debug_threads): Moved to debug.c.
2374 (*): Update all debugging printfs to use debug_printf instead of
2375 fprintf.
2376 (start_inferior): Replace call to fflush with call to debug_flush.
2377 (monitor_show_help): Mention set debug-format.
2378 (parse_debug_format_options): New function.
2379 (handle_monitor_command): Handle "monitor set debug-format".
2380 (gdbserver_usage): Mention --debug-format.
2381 (main): Parse --debug-format.
2382 * server.h (debug_threads): Declaration moved to debug.h.
2383 #include "debug.h".
2384 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2385 trace_debug_1 that uses debug_printf.
2386 (tracepoint_look_up_symbols): Update all debugging printfs to use
2387 debug_printf instead of fprintf.
2388
e671835b
BS
23892014-01-20 Baruch Siach <baruch@tkos.co.il>
2390
2391 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2392 sys/ptrace.h.
2393
b5737fa9
PA
23942014-01-17 Pedro Alves <palves@redhat.com>
2395
ea38d2a9 2396 PR build/16445
c7faa97a
PA
2397 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2398 defined after including gdb_proc_service.h.
b5737fa9 2399
40ed484e
DE
24002014-01-16 Doug Evans <dje@google.com>
2401
2402 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2403 (match_dll): Use it.
2404
969c39fb
MM
24052014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2406
2407 * target.h (target_ops) <read_btrace>: Change parameters and
2408 return type to allow error reporting.
2409 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2410 trace reading errors on.
2411 * linux-low.c (linux_low_read_btrace): Pass trace reading
2412 errors on.
2413 (linux_low_disable_btrace): New.
2414
ab7f45ba
DE
24152014-01-15 Doug Evans <dje@google.com>
2416
2417 * inferiors.c (thread_id_to_gdb_id): Delete.
2418 * inferiors.h (thread_id_to_gdb_id): Delete.
2419
66af0f44
EZ
24202014-01-13 Eli Zaretskii <eliz@gnu.org>
2421
2422 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2423 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2424 versions.
2425
9939e131
PA
24262014-01-08 Pedro Alves <palves@redhat.com>
2427
2428 * server.c (handle_status): Don't discard previous queued stop
2429 replies or thread's pending status here.
2430 (main) <disconnection>: Do it here instead.
2431
b7ea362b
PA
24322014-01-08 Pedro Alves <palves@redhat.com>
2433
2434 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2435 * server.c (visit_actioned_threads, handle_pending_status): New
2436 function.
2437 (handle_v_cont): Factor out parts to ...
2438 (resume): ... this new function. If in all-stop, and a thread
2439 being resumed has a pending status, report it without actually
2440 resuming.
2441 (myresume): Adjust to use the new 'resume' function.
2442 (clear_pending_status_callback, set_pending_status_callback)
2443 (find_status_pending_thread_callback): New functions.
2444 (handle_status): Handle the case of multiple threads having
2445 interesting statuses to report. Report threads' real last signal
2446 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2447 with an interesting thread to report the status for, instead of
2448 always reporting the status of the first thread.
2449
28498c42
JB
24502014-01-01 Joel Brobecker <brobecker@adacore.com>
2451
2452 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2453 * gdbreplay.c (gdbreplay_version): Likewise.
2454
f45c82da
YZ
24552013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2456
2457 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2458 iov.iov_len with the real length in use.
2459
379a5e2d
JB
24602013-12-13 Joel Brobecker <brobecker@adacore.com>
2461
2462 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2463 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2464 for all targets that use win32-low.c.
2465 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2466 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2467
4210d83e
PA
24682013-12-13 Pedro Alves <palves@redhat.com>
2469
2470 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2471 if equal to TARGET_WAITKIND_LOADED.
2472 * win32-low.c (cached_status): New static global.
2473 (win32_wait): Add declaration.
2474 (do_initial_child_stuff): Flush all initial pending debug events
2475 up to the initial breakpoint.
2476 (win32_wait): If CACHED_STATUS was set, return that instead
2477 of doing a real wait. Remove the code resuming the execution
2478 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2479 during the initial phase. Also remove the code changing
2480 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2481 TARGET_WAITKIND_STOPPED.
2482
e7f0d979
YQ
24832013-12-11 Yao Qi <yao@codesourcery.com>
2484
2485 * notif.c (handle_notif_ack): Return 0 if no notification
2486 matches.
2487
ebcf782c
DE
24882013-11-20 Doug Evans <dje@google.com>
2489
2490 * linux-low.c (linux_set_resume_request): Fix comment.
2491
20ad9378
DE
24922013-11-20 Doug Evans <dje@google.com>
2493
2494 * linux-low.c (resume_status_pending_p): Tweak comment.
2495
a196ebeb
WT
24962013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2497
2498 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2499 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2500 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2501 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2502 (srv_amd64_regobj): Add amd64-mpx.o.
2503 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2504 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2505 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2506 * i387-fp.c (num_pl_bnd_register) Added constant.
2507 (num_pl_bnd_cfg_registers) Added constant.
2508 (struct i387_xsave) Added reserved area and MPX fields.
2509 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2510 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2511 function.
2512 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2513 (init_registers_amd64_mpx_linux): Declare new function.
2514 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2515 (x86_64_regmap): Add MPX registers.
2516 (x86_linux_read_description): Add MPX case.
2517 (initialize_low_arch): Initialize MPX targets.
2518
0080a2f6
TT
25192013-11-18 Tom Tromey <tromey@redhat.com>
2520
2521 * configure: Rebuild.
2522 * configure.ac: Don't check for stdlib.h.
2523 * gdbreplay.c: Unconditionally include stdlib.h.
2524
2978b111
TT
25252013-11-18 Tom Tromey <tromey@redhat.com>
2526
2527 * config.in: Rebuild.
2528 * configure: Rebuild.
2529 * configure.ac: Don't use AC_HEADER_DIRENT.
2530
a3d08894
TT
25312013-11-18 Tom Tromey <tromey@redhat.com>
2532
2533 * server.h: Don't check HAVE_STRING_H.
2534 * gdbreplay.c: Don't check HAVE_STRING_H.
2535 * configure: Rebuild.
2536
0a5dd17d
TT
25372013-11-18 Tom Tromey <tromey@redhat.com>
2538
2539 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2540 LIBGNU.
2541
1bd2f0ba
TT
25422013-11-08 Tom Tromey <tromey@redhat.com>
2543
2544 * configure, config.in: Rebuild.
2545 * configure.ac: Remove unused configury.
2546
3266f10b
TT
25472013-11-08 Tom Tromey <tromey@redhat.com>
2548
2549 * acinclude.m4: Include common.m4, codeset.m4.
2550 * configure, config.in: Rebuild.
2551 * configure.ac: Use GDB_AC_COMMON.
2552
6682d959
AA
25532013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2554
2555 * linux-s390-low.c (HWCAP_S390_TE): New define.
2556 (s390_arch_setup): Consider the TE field in the HWCAP for
2557 determining 'have_regset_tdb'.
2558
fd0a4d76
SDJ
25592013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2560
2561 PR gdb/16014
2562 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2563 call to sizeof.
2564
1a3d890b
PA
25652013-10-02 Pedro Alves <palves@redhat.com>
2566
2567 * server.c (process_serial_event): Don't output "GDBserver
2568 exiting" if GDB is connected through stdio.
2569 * target.c (mywait): Likewise, be silent if GDB is connected
2570 through stdio.
2571
97ad4581
JB
25722013-10-01 Joel Brobecker <brobecker@adacore.com>
2573
2574 * lynx-low.c (lynx_add_threads_after_attach): New function.
2575 (lynx_attach): Remove call to add_thread. Add call to
2576 lynx_add_threads_after_attach instead.
2577
5b4e221c
MF
25782013-09-28 Mike Frysinger <vapier@gentoo.org>
2579
2580 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2581 * config.in, configure: Regenerated.
2582
ee47b2f8
YQ
25832013-09-18 Yao Qi <yao@codesourcery.com>
2584
2585 PR server/15959
2586 * server.c (start_inferior): Clear 'resume_info'.
2587
d6707650 25882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2589
d6707650
JW
2590 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2591 for each register.
2592
9243dd0e 25932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2594
9243dd0e
JW
2595 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2596 linux-tile-low.o to srv_tgtobj.
2597
c623a6ef
WN
25982013-09-16 Will Newton <will.newton@linaro.org>
2599
2600 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2601 out regs.
2602
fb71d39e
PA
26032013-09-06 Pedro Alves <palves@redhat.com>
2604
2605 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2606 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2607 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2608 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2609 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2610 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2611
8e7e9910
PA
26122013-09-06 Pedro Alves <palves@redhat.com>
2613
2614 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2615 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2616
7c3a12ca
PA
26172013-09-06 Pedro Alves <palves@redhat.com>
2618
2619 * linux-amd64-ipa.c: Include tracepoint.h.
2620 * linux-i386-ipa.c: Include tracepoint.h.
2621
8eb3d7b6
RW
26222013-09-06 Ricard Wanderlof <ricardw@axis.com>
2623
2624 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2625 (ps_get_thread_area): New function.
2626
eddddb9d
RW
26272013-09-06 Ricard Wanderlof <ricardw@axis.com>
2628
2629 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2630 (initialize_low_arch): Call init_registers_crisv32 rather than
2631 init_register_crisv32.
2632
533b0600
PA
26332013-09-05 Pedro Alves <palves@redhat.com>
2634
2635 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2636 to ...
2637 * hostio.h: ... this new file.
2638 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2639 win32-low.c: Include hostio.h.
2640
0ce3d3b5
PA
26412013-09-05 Pedro Alves <palves@redhat.com>
2642
2643 * server.h (gdb_client_data, handler_func, callback_handler_func)
2644 (delete_file_handler, add_file_handler, append_callback_event)
2645 (delete_callback_event, start_event_loop, initialize_event_loop):
2646 Move to event-loop.h and include it.
2647 * event-loop.h: New file.
2648
799cdc37
PA
26492013-09-05 Pedro Alves <palves@redhat.com>
2650
2651 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2652 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2653 (loaded_dll, unloaded_dll): Move to ...
2654 * dll.h: ... this new file.
2655 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2656
6a6bbd9d
PA
26572013-09-05 Pedro Alves <palves@redhat.com>
2658
2659 * server.h (current_process, get_thread_process, all_processes)
2660 (add_inferior_to_list, for_each_inferior, current_inferior)
2661 (remove_inferior, add_process, remove_process, find_process_pid)
2662 (have_started_inferiors_p, have_attached_inferiors_p)
2663 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2664 (clear_inferiors, find_inferior, find_inferior_id)
2665 (inferior_target_data, set_inferior_target_data)
2666 (inferior_regcache_data, set_inferior_regcache_data): Move to
2667 inferiors.h, and include it.
2668 * inferiors.h: New file.
2669
f699aaba
PA
26702013-09-05 Pedro Alves <palves@redhat.com>
2671
2672 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2673 Move ...
2674 * ax.h: ... here.
2675
c144c7a0
PA
26762013-09-05 Pedro Alves <palves@redhat.com>
2677
2678 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2679 tracepoint.h.
2680 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2681 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2682 (handle_tracepoint_general_set, handle_tracepoint_query)
2683 (tracepoint_finished_step, tracepoint_was_hit)
2684 (release_while_stepping_state_list, current_traceframe)
2685 (in_readonly_region, traceframe_read_mem)
2686 (fetch_traceframe_registers, traceframe_read_sdata)
2687 (traceframe_read_info, struct fast_tpoint_collect_status)
2688 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2689 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2690 (supply_fast_tracepoint_registers)
2691 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2692 (ipa_tdesc, claim_trampoline_space)
2693 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2694 (agent_mem_read, agent_get_trace_state_variable_value)
2695 (agent_set_trace_state_variable_value, agent_tsv_read)
2696 (agent_mem_read_string, get_raw_reg_func_addr)
2697 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2698 * tracepoint.h: ... this new file.
2699
ff42e6ab
PA
27002013-09-05 Pedro Alves <palves@redhat.com>
2701
2702 * server.h (perror_with_name, error, fatal, warning, paddress)
2703 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2704 include it.
2705 * utils.h: New file.
2706
541af0f4
PA
27072013-09-05 Pedro Alves <palves@redhat.com>
2708
2709 * server.h (remote_debug, noack_mode, transport_is_reliable)
2710 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2711 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2712 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2713 (write_enn, initialize_async_io, enable_async_io)
2714 (disable_async_io, check_remote_input_interrupt_request)
2715 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2716 (dead_thread_notify, prepare_resume_reply)
2717 (decode_address_to_semicolon, decode_address, decode_m_packet)
2718 (decode_M_packet, decode_X_packet, decode_xfer_write)
2719 (decode_search_memory_packet, unhexify, hexify)
2720 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2721 (look_up_one_symbol, relocate_instruction)
2722 (monitor_output): Move to remote-utils.h, and include it.
2723 * remote-utils.h: New file.
2724
eebdf26b
PA
27252013-09-05 Pedro Alves <palves@redhat.com>
2726
2727 * server.h (_): Delete.
2728
3aafd2ff
PA
27292013-09-02 Pedro Alves <palves@redhat.com>
2730
2731 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2732 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2733 allocated.
2734 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2735
cee83bcb
PM
27362013-09-02 Pierre Muller <muller@sourceware.org>
2737
2738 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2739 or WriteProcessMemory complete successfully and handle
2740 ERROR_PARTIAL_COPY error.
2741
9a13b2fa
PA
27422013-09-02 Pedro Alves <palves@redhat.com>
2743
2744 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2745 error instead of EIO.
2746
602e3198
JK
27472013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2748
2749 PR server/15604
2750 * linux-low.c: Include filestuff.h.
2751 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2752 * lynx-low.c: Include filestuff.h.
2753 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2754 * server.c: Include filestuff.h.
2755 (main): Call notice_open_fds.
2756 * spu-low.c: Include filestuff.h.
2757 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2758
96d7229d
LM
27592013-08-22 Luis Machado <lgustavo@codesourcery.com>
2760
2761 * Makefile.in: Explain why ../target and ../nat are not
2762 listed as include file search paths.
2763 (linux-waitpid.o): New object file rule.
2764 * configure.srv (srv_native_linux_obj): New variable.
2765 Replace all occurrences of linux native object files with
2766 $srv_native_linux_obj.
2767 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2768 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2769 (linux_enable_event_reporting): Remove declaration.
2770 (my_waitpid): Moved to common/linux-waitpid.c.
2771 (linux_wait_for_event): Pass ptid when calling
2772 linux_enable_event_reporting.
2773 (linux_supports_tracefork_flag): Remove.
2774 (linux_enable_event_reporting): Likewise.
2775 (linux_tracefork_grandchild): Remove.
2776 (STACK_SIZE): Moved to common/linux-ptrace.c.
2777 (linux_tracefork_child): Remove.
2778 (linux_test_for_tracefork): Remove.
2779 (linux_look_up_symbols): Call linux_supports_traceclone.
2780 (initialize_low): Remove call to linux_test_for_tracefork.
2781 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2782 common/linux-ptrace.h.
2783 (PTRACE_TYPE_ARG4): Likewise.
2784 Include linux-ptrace.h.
2785
32940073
PA
27862013-08-21 Pedro Alves <palves@redhat.com>
2787
2788 * config.in: Renegerate.
2789
33b60d58 27902013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2791
33b60d58
LM
2792 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2793 (SFILES): Remove $(srcdir)/common/target-common.c and
2794 add $(srcdir)/target/waitstatus.c.
2795 (OBS): Remove target-common.o and add waitstatus.o.
2796 (server_h): Remove $(srcdir)/../common/target-common.h and
2797 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2798 and $(srcdir)/../target/waitstatus.h.
2799 (target-common.o): Remove.
2800 (waitstatus.o): New target object file.
2801 * target.h: Do not include target-common.h and
2802 include target/resume.h, target/wait.h and
2803 target/waitstatus.h.
2804
b8e1b30e
LM
28052013-08-13 Luis Machado <lgustavo@codesourcery.com>
2806
2807 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2808 to PTRACE_TYPE_ARG3.
2809 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2810 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2811 PTRACE_TYPE_ARG4.
2812 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2813 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2814
7a60ad40
YQ
28152013-07-27 Jie Zhang <jie@codesourcery.com>
2816 Daniel Jacobowitz <dan@codesourcery.com>
2817 Yao Qi <yao@codesourcery.com>
2818
2819 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2820 (mips-linux-watch.o): New rule.
2821 (mips_linux_watch_h): New variable.
2822 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2823 srv_tgtobj.
2824 * linux-mips-low.c: Include mips-linux-watch.h.
2825 (struct arch_process_info, struct arch_lwp_info): New.
2826 (update_watch_registers_callback): New function.
2827 (mips_linux_new_process, mips_linux_new_thread) New functions.
2828 (mips_linux_prepare_to_resume, mips_insert_point): New
2829 functions.
2830 (mips_remove_point, mips_stopped_by_watchpoint): New
2831 functions.
2832 (rsp_bp_type_to_target_hw_bp_type): New function.
2833 (mips_stopped_data_address): New function.
2834 (the_low_target): Add watchpoint support functions.
2835
de6f69ad
YQ
28362013-07-27 Yao Qi <yao@codesourcery.com>
2837
2838 * i386-low.c: Include break-common.h.
2839 (enum target_hw_bp_type): Remove.
2840
3360c0bf
LM
28412013-07-24 Luis Machado <lgustavo@codesourcery.com>
2842
2843 * Makefile.in (SFILES): /common/target-common.c.
2844 (OBS): Add target-common.o.
2845 (server_h): Add $(srcdir)/../common/target-common.h.
2846 (target-common.o): New target.
2847 * server.c (queue_stop_reply_callback): Free
2848 status string after use.
2849 * target.c (target_waitstatus_to_string): Remove.
2850 * target.h: Include target-common.h.
2851 (resume_kind): Likewise.
2852 (target_waitkind): Likewise.
2853 (target_waitstatus): Likewise.
2854 (TARGET_WNOHANG): Likewise.
2855
bd885420
YQ
28562013-07-04 Yao Qi <yao@codesourcery.com>
2857
2858 * Makefile.in (host_alias): Use @host_noncanonical@.
2859 (target_alias): Use @target_noncanonical@.
2860 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2861 ACX_NONCANONICAL_HOST.
2862 * configure: Regenerated.
2863
2864 Revert:
2865 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2866
2867 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2868 * configure: Rebuild.
2869 * Makefile.in (version_host, version_target): Get from configure.
2870 (version.c): Use $(version_host) and $(version_target).
2871
17ef446e
PA
28722013-07-03 Pedro Alves <palves@redhat.com>
2873
2874 * Makefile.in (config.status): Depend on development.sh.
2875 * acinclude.m4: Include libmcheck.m4.
2876 * configure: Regenerate.
2877
7a9a7487
MG
28782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2879
2880 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2881 attribute inside the parentheses.
2882 (winapi_DebugSetProcessKillOnExit): Ditto.
2883 (winapi_DebugBreakProcess): Ditto.
2884 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2885
49b64de6
MG
28862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2887
2888 * notif.h (notif_event): Add a dummy member to avoid compiler
2889 errors.
2890
d5749ee7
PA
28912013-07-01 Pedro Alves <palves@redhat.com>
2892
2893 * hostio.c (HOSTIO_PATH_MAX): Define.
2894 (require_filename, handle_open, handle_unlink, handle_readlink):
2895 Use it.
2896
d8d2a3ee
PA
28972013-07-01 Pedro Alves <palves@redhat.com>
2898
2899 * server.h: Include "pathmax.h".
2900 * linux-low.c: Don't include sys/param.h.
2901 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2902 MAXPATHLEN.
2903 * win32-low.c: Don't include sys/param.h.
2904 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2905
bc7dea8d
PA
29062013-07-01 Pedro Alves <palves@redhat.com>
2907
2908 * event-loop.c: Don't check HAVE_UNISTD_H before including
2909 <unistd.h>.
2910 * gdbreplay.c: Likewise.
2911 * remote-utils.c: Likewise.
2912 * server.c: Likewise.
2913 * configure.ac: Don't check for unistd.h.
2914 * configure: Regenerate.
2915
d6c2da54
TT
29162013-06-28 Tom Tromey <tromey@redhat.com>
2917
2918 * Makefile.in (version.c): Use version.in, not
2919 common/version.in.
2920
257b6bec
MG
29212013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2922
2923 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2924 * configure: Rebuild.
2925 * Makefile.in (version_host, version_target): Get from configure.
2926 (version.c): Use $(version_host) and $(version_target).
2927
86ebe149
DK
29282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2929
2930 Fix trace-status to output user name without trailing colon.
2931 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2932
f30aa5af
DK
29332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2934
2935 Fix trace-status to output proper start-time and stop-time.
2936 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2937 output start time and stop time in hex as gdb expects.
2938
28a93511
YQ
29392013-06-26 Pedro Alves <pedro@codesourcery.com>
2940
2941 * tracepoint.c (build_traceframe_info_xml): Output trace state
2942 variables present in the trace buffer.
2943
01208463
TT
29442013-06-24 Tom Tromey <tromey@redhat.com>
2945
2946 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2947 create-version.sh.
2948 (version.o): Remove.
2949 * gdbreplay.c: Include version.h.
2950 (version, host_name): Don't declare.
2951 * server.h: Include version.h.
2952 (version, host_name): Don't declare.
2953
760256f9
PA
29542013-06-12 Pedro Alves <palves@redhat.com>
2955
2956 * linux-x86-low.c (linux_is_elf64): Delete global.
2957 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2958 with local linux_pid_exe_is_elf_64_file use.
2959
030031ee
PA
29602013-06-11 Pedro Alves <palves@redhat.com>
2961
2962 * linux-low.c (regset_disabled, disable_regset): New functions.
2963 (regsets_fetch_inferior_registers)
2964 (regsets_store_inferior_registers): Use them.
2965 (initialize_regsets_info); Don't allocate the disabled_regsets
2966 array here.
2967 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2968 comment.
2969
5da6eb0a
PA
29702013-06-11 Pedro Alves <palves@redhat.com>
2971
2972 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2973 xmalloc.
2974
7e5aaa09
PA
29752013-06-11 Pedro Alves <palves@redhat.com>
2976
2977 * linux-x86-low.c (initialize_low_arch): Call
2978 init_registers_x32_avx_linux.
2979
d878444c
JK
29802013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2981
2982 Fix compatibility with Android Bionic.
2983 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2984 it is not empty.
2985
3aee8918
PA
29862013-06-07 Pedro Alves <palves@redhat.com>
2987
5f2b57b5 2988 PR server/14823
3aee8918
PA
2989 * Makefile.in (OBS): Add tdesc.o.
2990 (IPA_OBJS): Add tdesc-ipa.o.
2991 (tdesc-ipa.o): New rule.
2992 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2993 interface.
2994 * linux-low.c (new_inferior): Delete.
2995 (disabled_regsets, num_regsets): Delete.
2996 (linux_add_process): Adjust to set the new per-process
2997 new_inferior flag.
2998 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2999 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3000 was a stop. When calling arch_setup, switch the current inferior
3001 to the thread that got an event.
3002 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3003 (regsets_fetch_inferior_registers)
3004 (regsets_store_inferior_registers): New regsets_info parameter.
3005 Adjust to use it.
3006 (linux_register_in_regsets): New regs_info parameter. Adjust to
3007 use it.
3008 (register_addr, fetch_register, store_register): New usrregs_info
3009 parameter. Adjust to use it.
3010 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3011 parameter regs_info. Adjust to use it.
3012 (linux_fetch_registers): Get the current inferior's regs_info, and
3013 adjust to use it.
3014 (linux_store_registers): Ditto.
3015 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3016 (initialize_low): Don't initialize the target_regsets here. Call
3017 initialize_low_arch.
3018 * linux-low.h (target_regsets): Delete declaration.
3019 (struct regsets_info): New.
3020 (struct usrregs_info): New.
3021 (struct regs_info): New.
3022 (struct process_info_private) <new_inferior>: New field.
3023 (struct linux_target_ops): Delete the num_regs, regmap, and
3024 regset_bitmap fields. New field regs_info.
3025 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3026 * i387-fp.c (num_xmm_registers): Delete.
3027 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3028 calls to new interface.
3029 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3030 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3031 Infer the number of xmm registers from the regcache's target
3032 description.
3033 * i387-fp.h (num_xmm_registers): Delete.
3034 * inferiors.c (add_thread): Don't install the thread's regcache
3035 here.
3036 * proc-service.c (gregset_info): Fetch the current inferior's
3037 regs_info. Adjust to use it.
3038 * regcache.c: Include tdesc.h.
3039 (register_bytes, reg_defs, num_registers)
3040 (gdbserver_expedite_regs): Delete.
3041 (get_thread_regcache): If the thread doesn't have a regcache yet,
3042 create one, instead of aborting gdbserver.
3043 (regcache_invalidate_one): Rename to ...
3044 (regcache_invalidate_thread): ... this.
3045 (regcache_invalidate_one): New.
3046 (regcache_invalidate): Only invalidate registers of the current
3047 process.
3048 (init_register_cache): Add target_desc parameter, and use it.
3049 (new_register_cache): Ditto. Assert the target description has a
3050 non zero registers_size.
3051 (regcache_cpy): Add assertions. Adjust.
3052 (realloc_register_cache, set_register_cache): Delete.
3053 (registers_to_string, registers_from_string): Adjust.
3054 (find_register_by_name, find_regno, find_register_by_number)
3055 (register_cache_size): Add target_desc parameter, and use it.
3056 (free_register_cache_thread, free_register_cache_thread_one)
3057 (regcache_release, register_cache_size): New.
3058 (register_size): Add target_desc parameter, and use it.
3059 (register_data, supply_register, supply_register_zeroed)
3060 (supply_regblock, supply_register_by_name, collect_register)
3061 (collect_register_as_string, collect_register_by_name): Adjust.
3062 * regcache.h (struct target_desc): Forward declare.
3063 (struct regcache) <tdesc>: New field.
3064 (init_register_cache, new_register_cache): Add target_desc
3065 parameter.
3066 (regcache_invalidate_thread): Declare.
3067 (regcache_invalidate_one): Delete declaration.
3068 (regcache_release): Declare.
3069 (find_register_by_number, register_cache_size, register_size)
3070 (find_regno): Add target_desc parameter.
3071 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3072 declarations.
3073 * remote-utils.c: Include tdesc.h.
3074 (outreg, prepare_resume_reply): Adjust.
3075 * server.c: Include tdesc.h.
3076 (gdbserver_xmltarget): Delete declaration.
3077 (get_features_xml, process_serial_event): Adjust.
3078 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3079 declare.
3080 (struct process_info) <tdesc>: New field.
3081 (ipa_tdesc): Declare.
3082 * tdesc.c: New file.
3083 * tdesc.h: New file.
3084 * tracepoint.c: Include tdesc.h.
3085 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3086 (get_context_regcache): Adjust to pass ipa_tdesc down.
3087 (do_action_at_tracepoint): Adjust to get the register cache size
3088 from the context regcache's description.
3089 (traceframe_walk_blocks): Adjust to get the register cache size
3090 from the current trace frame's description.
3091 (traceframe_get_pc): Adjust to get current trace frame's
3092 description and pass it down.
3093 (gdb_collect): Adjust to get the register cache size from the
3094 IPA's description.
3095 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3096 (gdbserver_xmltarget): Delete.
3097 (initialize_low_tracepoint): Set the ipa's target description.
3098 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3099 (initialize_low_tracepoint): Set the ipa's target description.
3100 * linux-x86-low.c: Include tdesc.h.
3101 [__x86_64__] (is_64bit_tdesc): New.
3102 (ps_get_thread_area, x86_get_thread_area): Use it.
3103 (i386_cannot_store_register): Rename to ...
3104 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3105 (i386_cannot_fetch_register): Rename to ...
3106 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3107 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3108 to new interface.
3109 (target_regsets): Rename to ...
3110 (x86_regsets): ... this.
3111 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3112 interface.
3113 (x86_siginfo_fixup): Use is_64bit_tdesc.
3114 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3115 (tdesc_x32_avx_linux, tdesc_x32_linux)
3116 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3117 Declare.
3118 (x86_linux_update_xmltarget): Delete.
3119 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3120 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3121 (AMD64_LINUX_USER64_CS): New.
3122 (x86_linux_read_description): New, based on
3123 x86_linux_update_xmltarget.
3124 (same_process_callback): New.
3125 (x86_arch_setup_process_callback): New.
3126 (x86_linux_update_xmltarget): New.
3127 (x86_regsets_info): New.
3128 (amd64_linux_regs_info): New.
3129 (i386_linux_usrregs_info): New.
3130 (i386_linux_regs_info): New.
3131 (x86_linux_regs_info): New.
3132 (x86_arch_setup): Reimplement.
3133 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3134 (x86_emit_ops): Ditto.
3135 (the_low_target): Adjust. Install x86_linux_regs_info,
3136 x86_cannot_fetch_register, and x86_cannot_store_register.
3137 (initialize_low_arch): New.
3138 * linux-ia64-low.c (tdesc_ia64): Declare.
3139 (ia64_fetch_register): Adjust.
3140 (ia64_usrregs_info, regs_info): New globals.
3141 (ia64_regs_info): New function.
3142 (the_low_target): Adjust.
3143 (initialize_low_arch): New function.
3144 * linux-sparc-low.c (tdesc_sparc64): Declare.
3145 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3146 Adjust.
3147 (sparc_arch_setup): New function.
3148 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3149 (the_low_target): Adjust.
3150 (initialize_low_arch): New function.
3151 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3152 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3153 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3154 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3155 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3156 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3157 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3158 (tdesc_powerpc_isa205_vsx64l): Declare.
3159 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3160 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3161 (ppc_set_pc, ppc_get_hwcap): Adjust.
3162 (ppc_usrregs_info): Forward declare.
3163 (!__powerpc64__) ppc_regmap_adjusted: New global.
3164 (ppc_arch_setup): Adjust to the current process'es target
3165 description.
3166 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3167 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3168 (ppc_store_evrregset): Adjust.
3169 (target_regsets): Rename to ...
3170 (ppc_regsets): ... this, and make static.
3171 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3172 (ppc_regs_info): New function.
3173 (the_low_target): Adjust.
3174 (initialize_low_arch): New function.
3175 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3176 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3177 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3178 (tdesc_s390x_linux64v2): Declare.
3179 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3180 (s390_fill_gregset, s390_store_last_break): Adjust.
3181 (target_regsets): Rename to ...
3182 (s390_regsets): ... this, and make static.
3183 (s390_get_pc, s390_set_pc): Adjust.
3184 (s390_get_hwcap): New target_desc parameter, and use it.
3185 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3186 (s390_arch_setup): Adjust to set the current process'es target
3187 description. Don't adjust the regmap.
3188 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3189 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3190 (regs_info_3264): New globals.
3191 (s390_regs_info): New function.
3192 (the_low_target): Adjust.
3193 (initialize_low_arch): New function.
3194 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3195 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3196 [__mips64] (init_registers_mips_linux)
3197 (init_registers_mips_dsp_linux): Delete defines.
3198 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3199 (have_dsp): New global.
3200 (mips_read_description): New, based on mips_arch_setup.
3201 (mips_arch_setup): Reimplement.
3202 (get_usrregs_info): New function.
3203 (mips_cannot_fetch_register, mips_cannot_store_register)
3204 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3205 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3206 (target_regsets): Rename to ...
3207 (mips_regsets): ... this, and make static.
3208 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3209 (dsp_regs_info, regs_info): New globals.
3210 (mips_regs_info): New function.
3211 (the_low_target): Adjust.
3212 (initialize_low_arch): New function.
3213 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3214 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3215 Declare.
3216 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3217 (arm_read_description): New, with bits factored from
3218 arm_arch_setup.
3219 (arm_arch_setup): Reimplement.
3220 (target_regsets): Rename to ...
3221 (arm_regsets): ... this, and make static.
3222 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3223 (arm_regs_info): New function.
3224 (the_low_target): Adjust.
3225 (initialize_low_arch): New function.
3226 * linux-m68k-low.c (tdesc_m68k): Declare.
3227 (target_regsets): Rename to ...
3228 (m68k_regsets): ... this, and make static.
3229 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3230 (m68k_regs_info): New function.
3231 (m68k_arch_setup): New function.
3232 (the_low_target): Adjust.
3233 (initialize_low_arch): New function.
3234 * linux-sh-low.c (tdesc_sharch): Declare.
3235 (target_regsets): Rename to ...
3236 (sh_regsets): ... this, and make static.
3237 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3238 (sh_regs_info, sh_arch_setup): New functions.
3239 (the_low_target): Adjust.
3240 (initialize_low_arch): New function.
3241 * linux-bfin-low.c (tdesc_bfin): Declare.
3242 (bfin_arch_setup): New function.
3243 (bfin_usrregs_info, regs_info): New globals.
3244 (bfin_regs_info): New function.
3245 (the_low_target): Adjust.
3246 (initialize_low_arch): New function.
3247 * linux-cris-low.c (tdesc_cris): Declare.
3248 (cris_arch_setup): New function.
3249 (cris_usrregs_info, regs_info): New globals.
3250 (cris_regs_info): New function.
3251 (the_low_target): Adjust.
3252 (initialize_low_arch): New function.
3253 * linux-cris-low.c (tdesc_crisv32): Declare.
3254 (cris_arch_setup): New function.
3255 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3256 (cris_regs_info): New function.
3257 (the_low_target): Adjust.
3258 (initialize_low_arch): New function.
3259 * linux-m32r-low.c (tdesc_m32r): Declare.
3260 (m32r_arch_setup): New function.
3261 (m32r_usrregs_info, regs_info): New globals.
3262 (m32r_regs_info): Adjust.
3263 (initialize_low_arch): New function.
3264 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3265 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3266 (tic6x_usrregs_info): Forward declare.
3267 (tic6x_read_description): New function, based on ...
3268 (tic6x_arch_setup): ... this. Reimplement.
3269 (target_regsets): Rename to ...
3270 (tic6x_regsets): ... this, and make static.
3271 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3272 (tic6x_regs_info): New function.
3273 (the_low_target): Adjust.
3274 (initialize_low_arch): New function.
3275 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3276 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3277 (target_regsets): Rename to ...
3278 (xtensa_regsets): ... this, and make static.
3279 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3280 globals.
3281 (xtensa_arch_setup, xtensa_regs_info): New functions.
3282 (the_low_target): Adjust.
3283 (initialize_low_arch): New function.
3284 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3285 (nios2_arch_setup): Set the current process'es tdesc.
3286 (target_regsets): Rename to ...
3287 (nios2_regsets): ... this.
3288 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3289 (nios2_regs_info): New function.
3290 (the_low_target): Adjust.
3291 (initialize_low_arch): New function.
a261b8f5
PA
3292 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3293 (aarch64_arch_setup): Set the current process'es tdesc.
3294 (target_regsets): Rename to ...
3295 (aarch64_regsets): ... this.
3296 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3297 (aarch64_regs_info): New function.
3298 (the_low_target): Adjust.
3299 (initialize_low_arch): New function.
3aee8918
PA
3300 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3301 globals.
3302 (target_regsets): Rename to ...
3303 (tile_regsets): ... this.
3304 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3305 (tile_regs_info): New function.
3306 (tile_arch_setup): Set the current process'es tdesc.
3307 (the_low_target): Adjust.
3308 (initialize_low_arch): New function.
3309 * spu-low.c (tdesc_spu): Declare.
3310 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3311 * win32-arm-low.c (tdesc_arm): Declare.
3312 (arm_arch_setup): New function.
3313 (the_low_target): Install arm_arch_setup instead of
3314 init_registers_arm.
3315 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3316 (init_windows_x86): Rename to ...
3317 (i386_arch_setup): ... this. Set `win32_tdesc'.
3318 (the_low_target): Adjust.
3319 * win32-low.c (win32_tdesc): New global.
3320 (child_add_thread): Don't create the thread cache here.
3321 (do_initial_child_stuff): Set the new process'es tdesc.
3322 * win32-low.h (struct target_desc): Forward declare.
3323 (win32_tdesc): Declare.
3324 * lynx-i386-low.c (tdesc_i386): Declare global.
3325 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3326 * lynx-low.c (lynx_tdesc): New global.
3327 (lynx_add_process): Set the new process'es tdesc.
3328 * lynx-low.h (struct target_desc): Forward declare.
3329 (lynx_tdesc): Declare global.
3330 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3331 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3332 * nto-low.c (nto_tdesc): New global.
3333 (do_attach): Set the new process'es tdesc.
3334 * nto-low.h (struct target_desc): Forward declare.
3335 (nto_tdesc): Declare.
3336 * nto-x86-low.c (tdesc_i386): Declare.
3337 (nto_x86_arch_setup): Set `nto_tdesc'.
3338
b1fbec62
GB
33392013-06-04 Gary Benson <gbenson@redhat.com>
3340
3341 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3342 to qSupported response when appropriate.
3343 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3344 with nonzero-length annex.
3345 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3346 arguments supplied in annex.
3347
d1ec4ce7
DE
33482013-05-31 Doug Evans <dje@google.com>
3349
ac44adcb 3350 PR server/15594
d1ec4ce7
DE
3351 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3352 64 bits in 64-cross-32 environment.
3353
9b25f2d3
PA
33542013-05-28 Pedro Alves <palves@redhat.com>
3355
3356 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3357 (aarch64-without-fpu.c): Delete rule.
3358 * configure.srv (aarch64*-*-linux*): Remove references to
3359 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3360 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3361 declaration.
3362
6740dc9c
PA
33632013-05-24 Pedro Alves <palves@redhat.com>
3364
3365 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3366 instead of strchr/decode_address. Error if the range isn't split
3367 with a ','. Don't assume there's be a ':' in the action.
3368
c2d6af84
PA
33692013-05-23 Yao Qi <yao@codesourcery.com>
3370 Pedro Alves <palves@redhat.com>
3371
3372 * linux-low.c (lwp_in_step_range): New function.
3373 (linux_wait_1): If the thread was range stepping and stopped
3374 outside the stepping range, report the stop to GDB. Otherwise,
3375 continue stepping. Add range stepping debug output.
3376 (linux_set_resume_request): Copy the step range from the resume
3377 request to the lwp.
3378 (linux_supports_range_stepping): New.
3379 (linux_target_ops) <supports_range_stepping>: Set to
3380 linux_supports_range_stepping.
3381 * linux-low.h (struct linux_target_ops)
3382 <supports_range_stepping>: New field.
3383 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3384 * linux-x86-low.c (x86_supports_range_stepping): New.
3385 (the_low_target) <supports_range_stepping>: Set to
3386 x86_supports_range_stepping.
3387 * server.c (handle_v_cont): Handle 'r' action.
3388 (handle_v_requests): Append ";r" if the target supports range
3389 stepping.
3390 * target.h (struct thread_resume) <step_range_start,
3391 step_range_end>: New fields.
3392 (struct target_ops) <supports_range_stepping>:
3393 New field.
3394 (target_supports_range_stepping): New macro.
3395
58794e1a
JB
33962013-05-17 Joel Brobecker <brobecker@adacore.com>
3397
3398 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3399 confusion in comment.
3400
d631c5a7
JB
34012013-05-17 Joel Brobecker <brobecker@adacore.com>
3402
3403 * lynx-low.c (struct process_info_private): New type.
3404 (lynx_add_process): New function.
3405 (lynx_create_inferior, lynx_attach): Replace calls to
3406 add_process by calls to lynx_add_process.
3407 (lynx_resume): If PTID is null, then try using
3408 current_process()->private->last_wait_event_ptid.
3409 Add comments.
3410 (lynx_clear_inferiors): Delete. The contents of that function
3411 has been inlined in lynx_mourn;
3412 (lynx_wait_1): Save the ptid in the process's private data.
3413 (lynx_mourn): Free the process' private data. Replace call
3414 to lynx_clear_inferiors by call to clear_inferiors.
3415
96f7a20f
YQ
34162013-05-17 Yao Qi <yao@codesourcery.com>
3417
3418 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3419 the right place.
3420
db0dfaa0
LM
34212013-05-16 Luis Machado <lgustavo@codesourcery.com>
3422
3423 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3424 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3425 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3426 PT_TEXT_END_ADDR guards. Update comments.
3427 (linux_target_op) <read_offsets>: Conditionally define to
3428 linux_read_offsets if the target is UCLIBC and if it defines
3429 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3430
68f5f838
SL
34312013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3432 Andrew Jenner <andrew@codesourcery.com>
3433
3434 * Makefile.in (SFILES): Add linux-nios2-low.c.
3435 (clean): Add action to delete nios2-linux.c.
3436 (nios2-linux.c): New rule.
3437 * configure.srv: Add nios2*-*-linux*.
3438 * linux-nios2-low.c: New.
3439
1ebff1fd
HAQ
34402013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3441
3442 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3443
f6150862
HZ
34442013-04-25 Hui Zhu <hui@codesourcery.com>
3445
3446 PR gdb/15186
f6150862
HZ
3447 * ax.c (ax_printf): Add fflush.
3448
614c279d
TT
34492013-04-22 Tom Tromey <tromey@redhat.com>
3450
3451 * Makefile.in (SFILES): Add filestuff.c.
3452 (OBS): Add filestuff.o.
3453 (filestuff.o): New target.
3454 * config.in, configure: Rebuild.
3455 * configure.ac: Check for fdwalk, pipe2.
3456
7d4e5717
PA
34572013-04-17 Pedro Alves <palves@redhat.com>
3458
3459 * configure.ac (USE_THREAD_DB): Delete variable.
3460 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3461 Don't AC_SUBST USE_THREAD_DB.
3462 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3463 * config.in, configure: Regenerate.
3464
d5c93e41
PA
34652013-04-16 Pedro Alves <palves@redhat.com>
3466
3467 * linux-low.h (struct lwp_info) <thread_known>: Move under
3468 the USE_THREAD_DB #ifdef.
3469
04f5fe89
PA
34702013-04-16 Pedro Alves <palves@redhat.com>
3471
3472 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3473 (linux-low.o): Delete rule.
3474 * linux-low.h: Always include "gdb_thread_db.h" instead of
3475 conditionally including thread_db.h.
3476 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3477 HAVE_THREAD_DB_H.
3478
480b27bf
JK
34792013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3480
3481 * Makefile.in (install-only): Fix make install regression.
3482
43662968
JK
34832013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3484
3485 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3486 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3487 installation.
3488 * gdbserver.1: Remove.
3489
3e74e146
PA
34902013-03-22 Pedro Alves <palves@redhat.com>
3491
3492 * linux-low.c (handle_extended_wait): Don't call
3493 linux_enable_event_reporting.
3494
a8347a2a
TT
34952013-03-15 Tony Theodore <tonyt@logyst.com>
3496
3497 PR build/9098:
3498 * Makefile.in (SHELL): Use @SHELL@.
3499
eeb56fa7
SDJ
35002013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3501
3502 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3503 compiler warning.
3504
4fa7e2ff
JB
35052013-03-13 Joel Brobecker <brobecker@adacore.com>
3506
3507 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3508 Remove extraneous NULL element.
3509
8ddb1965
YQ
35102013-03-13 Yao Qi <yao@codesourcery.com>
3511
3512 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3513 'V' block in trace frame.
3514
9accd112
MM
35152013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3516
3517 * target.h (struct target_ops): Add btrace ops.
3518 (target_supports_btrace): New macro.
3519 (target_enable_btrace): New macro.
3520 (target_disable_btrace): New macro.
3521 (target_read_btrace): New macro.
3522 * gdbthread.h (struct thread_info): Add btrace field.
3523 * server.c: Include btrace-common.h.
3524 (handle_btrace_general_set): New function.
3525 (handle_btrace_enable): New function.
3526 (handle_btrace_disable): New function.
3527 (handle_general_set): Call handle_btrace_general_set.
3528 (handle_qxfer_btrace): New function.
3529 (struct qxfer qxfer_packets[]): Add btrace entry.
3530 * inferiors.c (remove_thread): Disable btrace.
3531 * linux-low: Include linux-btrace.h.
3532 (linux_low_enable_btrace): New function.
3533 (linux_low_read_btrace): New function.
3534 (linux_target_ops): Add btrace ops.
3535 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3536 Add srv_linux_btrace=yes.
3537 (x86_64-*-linux*): Add linux-btrace.o.
3538 Add srv_linux_btrace=yes.
3539 * configure.ac: Define HAVE_LINUX_BTRACE.
3540 * config.in: Regenerated.
3541 * configure: Regenerated.
3542
5cc22e4c
MM
35432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3544
3545 * server.c (handle_qxfer): Preserve error message if -3 is
3546 returned.
3547 (qxfer): Document the -3 return value.
3548
7c97f91e
MM
35492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3550
3551 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3552 (linux_btrace_h): New variable.
3553 (linux-btrace.o): New rule.
3554
be9a119c 35552013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3556 Hafiz Abid Qadeer <abidh@codesourcery.com>
3557
3558 * tracepoint.c (trace_buffer_size): New global.
3559 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3560 (init_trace_buffer): Change to one-argument function. Allocate
3561 trace buffer memory.
3562 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3563 handle QTBuffer:size packet.
3564 (cmd_bigqtbuffer_size): New function.
3565 (initialize_tracepoint): Call init_trace_buffer with
3566 DEFAULT_TRACE_BUFFER_SIZE.
3567 * server.c (handle_query): Add QTBuffer:size in the
3568 supported packets.
3569
e64f7499
YQ
35702013-03-07 Yao Qi <yao@codesourcery.com>
3571
3572 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3573 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3574 of -1.
3575 (cmd_qtsp): Adjust condition. Do post increment.
3576 Set cur_action and cur_step_action back to 0.
3577
f0ae6fc3
PA
35782013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3579
3580 PR server/15236
3581 * linux-low.c (linux_write_memory): Return early success if LEN is
3582 zero.
3583
b5b0b0af
CV
35842013-03-05 Corinna Vinschen <vinschen@redhat.de>
3585
334ad4a8 3586 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3587
589bc927
TT
35882013-02-28 Tom Tromey <tromey@redhat.com>
3589
3590 * configure.ac: Invoke AC_SYS_LARGEFILE.
3591 * configure, config.in: Rebuild.
3592
dfe07582
CV
35932013-02-28 Corinna Vinschen <vinschen@redhat.com>
3594
3595 * win32-low.c: Throughout, fix format strings and casts of
3596 printf-like functions to avoid type related warnings on all
3597 platforms.
3598 (get_child_debug_event): Print dwDebugEventCode as hex since
3599 that's how it's usually documented.
3600
736cd585
YQ
36012013-02-28 Yao Qi <yao@codesourcery.com>
3602
3603 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3604 pulongest.
3605
e1f58301
JW
36062013-02-27 Jiong Wang <jiwang@tilera.com>
3607
3608 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3609 (reg-tilegx32.c): New rule.
3610 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3611 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3612 different register info initializer according to elf class.
3613 (init_registers_tilgx32): New function. The tilegx32 register info
3614 initializer.
3615 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3616 (tile_store_gregset): Likewise.
3617
d171ca78
YQ
36182013-02-27 Yao Qi <yao@codesourcery.com>
3619
3620 * server.c (process_point_options): Print debug message when
3621 debug_threads is true.
3622
282bbdf3
YQ
36232013-02-26 Yao Qi <yao@codesourcery.com>
3624
3625 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3626
aca22551
PA
36272013-02-19 Pedro Alves <palves@redhat.com>
3628 Kai Tietz <ktietz@redhat.com>
3629
3630 PR gdb/15161
3631
3632 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3633 instead of strtoul to extract address from packet.
3634 (process_serial_event) <'z'>: Likewise.
3635
4f3cee1c
YQ
36362013-02-18 Yao Qi <yao@codesourcery.com>
3637
3638 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3639
8e1d55a3
PA
36402013-02-14 Pedro Alves <palves@redhat.com>
3641
3642 Plug memory leak.
3643
3644 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3645 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3646
458820da
PA
36472013-02-14 Pedro Alves <palves@redhat.com>
3648
3649 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3650
baea0dae
PA
36512013-02-14 Pedro Alves <palves@redhat.com>
3652
3653 * tracepoint.c (save_string): Delete.
3654 (add_tracepoint_action): Use savestring instead of save_string.
3655
0b1afbb3
PA
36562013-02-12 Pedro Alves <palves@redhat.com>
3657
3658 * linux-xtensa-low.c: Ditto.
3659 * xtensa-xtregs.c: Ditto.
3660
8a4ac37e
PA
36612013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3662
3663 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3664 thread_db.
3665
148de6bb
MS
36662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3667
3668 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3669 aarch64_num_wp_regs and aarch64_num_bp_regs to
3670 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3671
55fac6e0
MS
36722013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3673
3674 * linux-aarch64-low.c (ps_get_thread_area): Replace
3675 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3676
176eb98c
MS
36772013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3678 Marcus Shawcroft <marcus.shawcroft@arm.com>
3679 Nigel Stephens <nigel.stephens@arm.com>
3680 Yufeng Zhang <yufeng.zhang@arm.com>
3681
3682 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3683 (aarch64.c, aarch64-without-fpu.c): New targets.
3684 * configure.srv (aarch64*-*-linux*): New.
3685 * linux-aarch64-low.c: New file.
3686
56f7af9c
MS
36872013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3688
43aaf8b6 3689 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3690 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3691 (dequeue_one_deferred_signal, linux_resume_one_thread)
3692 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3693 (linux_tracefork_grandchild, linux_test_for_tracefork)
3694 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3695 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3696 where the argument is 0.
3697
60f662b0
YQ
36982013-01-25 Yao Qi <yao@codesourcery.com>
3699
3700 * event-loop.c: Include "queue.h".
3701 (gdb_event_p): New typedef.
3702 (struct gdb_event) <next_event>: Remove.
3703 (event_queue): Change to QUEUE(gdb_event_p).
3704 (async_queue_event): Remove.
3705 (gdb_event_xfree): New.
3706 (initialize_event_loop): New.
3707 (process_event): Use API from QUEUE.
3708 (wait_for_event): Likewise.
3709 * server.c (main): Call initialize_event_loop.
3710 * server.h (initialize_event_loop): Declare.
3711
5ae4861a
YQ
37122013-01-18 Yao Qi <yao@codesourcery.com>
3713
3714 * ax.h (struct eval_agent_expr_context): New.
3715 (gdb_eval_agent_expr): Update declaration.
3716 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3717 TFRAME. Add new argument CTX.
3718 * server.h (struct eval_agent_expr_context): Declare.
3719 (agent_mem_read, agent_tsv_read): Update declaration.
3720 (agent_mem_read_string): Likewise.
3721 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3722 (add_traceframe_block): Add new argument TPOINT.
3723 Increase TPOINT->traceframe_usage.
3724 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3725 eval_tracepoint_agent_expr.
3726 (condition_true_at_tracepoint): Likewise.
3727 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3728 (agent_mem_read_string, agent_tsv_read): Likewise.
3729
85e00e85
YQ
37302013-01-16 Yao Qi <yao@codesourcery.com>
3731
3732 * linux-low.c (linux_resume_one_lwp): Don't check
3733 'lwp->bp_reinsert != 0'.
3734
4039cf45
JB
37352013-01-07 Joel Brobecker <brobecker@adacore.com>
3736 Pedro Alves <palves@redhat.com>
3737
3738 * lynx-low.c (ptrace_request_to_str): Define a temporary
3739 macro and use it to simplify this function's implementation.
3740
9044dee2
JB
37412013-01-07 Joel Brobecker <brobecker@adacore.com>
3742
3743 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3744 sets errno.
3745
e6352c8f
JB
37462013-01-07 Joel Brobecker <brobecker@adacore.com>
3747
3748 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3749
50681a27
JB
37502013-01-07 Joel Brobecker <brobecker@adacore.com>
3751
3752 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3753
3f6e77ef
JB
37542013-01-07 Joel Brobecker <brobecker@adacore.com>
3755
3756 * lynx-low.c (lynx_resume): Use the resume_info parameter
3757 to determine the ptid for the lynx_ptrace call, unless
3758 it is equal to minus_one_ptid, in which case we use the
3759 ptid of the current_inferior.
3760 (lynx_wait_1): After having received a thread create/exit
3761 event, resume the inferior's execution using the signaling
3762 thread's ptid, rather than the old ptid.
3763
7fda33ae
JB
37642013-01-07 Joel Brobecker <brobecker@adacore.com>
3765
3766 * lynx-low.c (lynx_resume): Delete variable ret.
3767
b9786c74
JB
37682013-01-01 Joel Brobecker <brobecker@adacore.com>
3769
3770 * gdbreplay.c (gdbreplay_version): Update copyright year.
3771 * server.c (gdbserver_version): Likewise.
3772
8b93d60f
JB
37732012-12-17 Joel Brobecker <brobecker@adacore.com>
3774
3775 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3776 new thread.
3777
037335a7
JB
37782012-12-17 Joel Brobecker <brobecker@adacore.com>
3779
3780 * lynx-low.c (ptrace_request_to_str): Add handling for
3781 PTRACE_GETTRACESIG.
3782
52d4cbd8
JB
37832012-12-17 Joel Brobecker <brobecker@adacore.com>
3784
3785 * lynx-low.c (lynx_attach): Delete variable new_process.
3786
ab8f6ca9
JB
37872012-12-17 Joel Brobecker <brobecker@adacore.com>
3788
3789 * lynx-low.c (lynx_create_inferior): Delete variable
3790 new_process.
3791
78cbc024
JB
37922012-12-17 Joel Brobecker <brobecker@adacore.com>
3793
3794 * lynx-low.c (ptrace_request_to_str): Do not handle
3795 PTRACE_GETTHREADLIST if this macro does not exist.
3796
14a00470
YQ
37972012-12-15 Yao Qi <yao@codesourcery.com>
3798
3799 * Makefile.in (OBS): Add notif.o.
3800 * notif.c, notif.h: New.
3801 * server.c: Include "notif.h".
3802 (struct vstop_notif) <next>: Remove.
3803 <base>: New field.
3804 (queue_stop_reply): Update.
3805 (push_event, send_next_stop_reply): Remove.
3806 (discard_queued_stop_replies): Update.
3807 (notif_stop): New variable.
3808 (handle_v_stopped): Remove.
3809 (handle_v_requests): Don't call handle_v_stopped. Call
3810 handle_ack_notif instead.
3811 (queue_stop_reply_callback): Call notif_event_enque instead
3812 of queue_stop_reply.
3813 (handle_status): Don't call send_next_stop_reply, call
3814 notif_write_event instead.
3815 (kill_inferior_callback): Likewise.
3816 (detach_or_kill_inferior_callback): Likewise.
3817 (main): Call initialize_notif.
3818 (process_serial_event): Call QUEUE_is_empty.
3819 (handle_target_event): Call notif_push instead of push event.
3820 * server.h (push_event): Remove declaration.
3821
61c125b9
TT
38222012-12-10 Tom Tromey <tromey@redhat.com>
3823
3824 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3825 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3826 macros.
3827 (.c.o): Rewrite.
3828 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3829 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3830 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3831 (amd64-linux-ipa.o, ax.o): Rewrite.
3832 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3833 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3834 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3835 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3836 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3837 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3838 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3839 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3840 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3841 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3842 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3843 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3844 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3845 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3846 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3847 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3848 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3849 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3850 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3851 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3852 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3853 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3854 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3855 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3856 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3857 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3858 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3859 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3860 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3861 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3862 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3863 (reg-tilegx.o): Remove.
3864 (all_object_files): New macro.
3865 Include .deps files.
3866 * aclocal.m4, configure: Rebuild.
3867 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3868 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3869 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3870
e90e9ad9
TT
38712012-12-05 Tom Tromey <tromey@redhat.com>
3872
3873 PR gdb/14917:
3874 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3875
02d403bf 38762012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3877
3878 * configure.ac: Check for linux/perf_event.h.
3879 * config.in: Regenerated.
3880 * configure: Regenerated.
3881
0270a750
PA
38822012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3883
3884 * hostio.c (handle_readlink): Decrease buffer size
3885 parameter passed to readlink by one byte.
3886
8c29b58e
YQ
38872012-11-26 Yao Qi <yao@codesourcery.com>
3888
3889 * configure.ac (build_warnings): Append '-Wempty-body'.
3890 * configure: Regenerated.
3891 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3892 body.
3893
8bdce1ff
PM
38942012-11-15 Pierre Muller <muller@sourceware.org>
3895
3896 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3897 * config.in: Regenerate.
3898 * configure: Regenerate.
3899 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3900 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3901 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3902 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3903 header.
3904 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3905 instead of <sys/wait.h> header.
3906 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3907
02d403bf 39082012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3909
3910 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3911 (various make rules): Remove -DGDBSERVER
3912
fbd5db48
YQ
39132012-11-09 Yao Qi <yao@codesourcery.com>
3914
3915 * spu-low.c (current_ptid): Move it to ..
3916 * gdbthread.h: ... here. New.
3917 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3918 * server.c (myresume, process_serial_event): Likewise.
3919 * thread-db.c (thread_db_find_new_threads): Likewise.
3920 * tracepoint.c (run_inferior_command): Likewise.
3921
b3dc46ff
AB
39222012-10-01 Andrew Burgess <aburgess@broadcom.com>
3923
3924 * server.c (handle_search_memory_1): Include access length in
3925 warning message.
3926
07c04788
HPN
39272012-09-05 Michael Brandt <michael.brandt@axis.com>
3928
3929 * linux-crisv32-low.c: Fix compile errors.
3930
918d227b
YQ
39312012-09-04 Yao Qi <yao@codesourcery.com>
3932
3933 * tracepoint.c (cmd_qtsv): Adjust debug message.
3934 Don't check CUR_TPOINT.
3935
18c1b81a
YQ
39362012-08-28 Yao Qi <yao@codesourcery.com>
3937
3938 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3939 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3940 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3941 Remove declarations of xmalloc, xreallloc, xstrdup and
3942 freeargv.
3943 * Makefile.in (libiberty_h): New.
3944 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3945 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3946
dc82f37b
YQ
39472012-08-23 Yao Qi <yao@codesourcery.com>
3948
3949 * server.h: Remove declaration of 'xsnprintf'.
3950
406b1477
KS
39512012-08-22 Keith Seitz <keiths@redhat.com>
3952
3953 * server.h: Include build-gnulib-gbserver/config.h.
3954 * gdbreplay.c: Likewise.
3955
e6712ff1
DE
39562012-08-08 Doug Evans <dje@google.com>
3957
3958 * Makefile.in (SFILES): Add gdb_vecs.c.
3959 (OBS): Add gdb_vecs.o.
3960 (gdb_vecs_h, host_defs_h): New variables.
3961 (thread-db.o): Add $(gdb_vecs_h) dependency.
3962 (gdb_vecs.o): New rule.
3963 * thread-db.c: #include "gdb_vecs.h".
3964 (thread_db_load_search): Use a vector to iterate over path elements.
3965 Handle text appearing after "$pdir".
3966
3967 * configure.ac: Add check for strstr.
3968 * config.in: Regenerate.
3969 * configure: Regenerate.
3970
7c3270ae
UW
39712012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3972
3973 * hostio.c (handle_pread): If pread fails, fall back to attempting
3974 lseek/read.
3975 (handle_pwrite): Likewise for pwrite.
3976
b62e2b27
UW
39772012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3978
3979 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3980 between unsupported TYPE and unimplementable ADDR/LEN combination.
3981 (arm_insert_point): Act on new return value.
3982
78a99e91
PA
39832012-07-31 Pedro Alves <palves@redhat.com>
3984
3985 * server.c (process_point_options): Only skip tokens if we find
3986 one that is unrecognized. Don't treat 'X' specially while
3987 skipping unrecognized tokens.
3988
fcf303ab
UW
39892012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3990
3991 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3992 to 4-byte-align HW breakpoint addresses for Thumb.
3993
7255706c
YQ
39942012-07-27 Yao Qi <yao@codesourcery.com>
3995
3996 PR remote/14161.
3997
3998 * server.h: Declare gdb_agent_about_to_close.
3999 * target.c (kill_inferior): Include "agent.h".
4000 New. Send command 'kill'.
4001 * target.h (kill_inferior): Removed macro.
4002 * tracepoint.c (gdb_agent_about_to_close): New.
4003 (gdb_agent_helper_thread): Handle command 'close'.
4004 Wait endlessly until the inferior stops.
4005 Install gdb_agent_remove_socket to atexit hook.
4006 (agent_socket_name): New static variable.
4007 (gdb_agent_socket_init): Replace local variable 'name' with
4008 'agent_socket_name'.
4009 (gdb_agent_remove_socket): New.
4010
5a3f286f
YQ
40112012-07-27 Yao Qi <yao@codesourcery.com>
4012
4013 * server.c (process_point_options): Stop at 'X' when parsing.
4014
961bd387
ME
40152012-07-19 Michael Eager <eager@eagercon.com>
4016
a261b8f5 4017 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4018 to hw_execute.
4019 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4020 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4021 hardware breakpoint.
4022
aa7c7447
JK
40232012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4024
4025 * gdbserver/linux-low.c (initialize_low): Call
4026 linux_ptrace_init_warnings.
4027
7f216e7c
DE
40282012-07-02 Doug Evans <dje@google.com>
4029
4030 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4031 pointer to int.
4032
d3ce09f5
SS
40332012-07-02 Stan Shebs <stan@codesourcery.com>
4034
4035 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4036 (ax.o): Add it to build rule.
4037 (ax-ipa.o): Ditto.
4038 (OBS): Add format.o.
4039 (IPA_OBS): Add format.o.
4040 * server.c (handle_query): Claim support for breakpoint commands.
4041 (process_point_options): Add command case.
4042 (process_serial_event): Leave running if there are printfs in
4043 effect.
4044 * mem-break.h (any_persistent_commands): Declare.
4045 (add_breakpoint_commands): Declare.
4046 (gdb_no_commands_at_breakpoint): Declare.
4047 (run_breakpoint_commands): Declare.
4048 * mem-break.c (struct point_command_list): New struct.
4049 (struct breakpoint): New field command_list.
4050 (any_persistent_commands): New function.
4051 (add_commands_to_breakpoint): New function.
4052 (add_breakpoint_commands): New function.
4053 (gdb_no_commands_at_breakpoint): New function.
4054 (run_breakpoint_commands): New function.
4055 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4056 locally.
4057 * ax.c: Include format.h.
4058 (ax_printf): New function.
4059 (gdb_eval_agent_expr): Add printf opcode.
4060
2f8f6aed
YQ
40612012-06-13 Yao Qi <yao@codesourcery.com>
4062
4063 * server.c (start_inferior): Remove duplicated writes to fields
4064 'last_resume_kind' and 'last_status' of 'current_inferior'.
4065
0c9070b3
YQ
40662012-06-12 Yao Qi <yao@codesourcery.com>
4067 Pedro Alves <palves@redhat.com>
4068
4069 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4070 comment.
4071 * server.c (handle_v_cont): Extend comment.
4072
c52daf70
YQ
40732012-06-11 Yao Qi <yao@codesourcery.com>
4074
4075 * linux-low.c (linux_attach): Add 'static'.
4076
d38bbb0a
YQ
40772012-06-06 Yao Qi <yao@codesourcery.com>
4078
4079 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4080
89dc0afd
JK
40812012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4082
4083 Fix gcc -flto compilation warning.
4084 * server.c (main): Make variable multi_mode and attach volatile.
4085
75f62ce7
TJB
40862012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4087
4088 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4089 if the platform doesn't know about it.
4090
65f479b6
PA
40912012-05-30 Jeff Kenton <jkenton@tilera.com>
4092
4093 * Makefile.in (SFILES): Add linux-tile-low.c.
4094 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4095 * configure.srv: Handle tilegx-*-linux*.
4096 * linux-tile-low.c: New file.
4097
0c5bf5a9
JK
40982012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4099
4100 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4101
a493e3e2
PA
41022012-05-24 Pedro Alves <palves@redhat.com>
4103
4104 PR gdb/7205
4105
43aaf8b6 4106 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4107
2ea28649
PA
41082012-05-24 Pedro Alves <palves@redhat.com>
4109
4110 PR gdb/7205
4111
4112 Replace target_signal with gdb_signal throughout.
4113
8d409d16
MR
41142012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4115
4116 * linux-low.c (linux_store_registers): Avoid the copying sequence
4117 when no data has been retrieved by ptrace.
4118
23512c01
MGD
41192012-05-22 Will Deacon <will.deacon@arm.com>
4120
4121 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4122 Include asm/ptrace.h.
4123 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4124 already defined.
4125
4934b29e
MR
41262012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4127
4128 * linux-low.c (linux_store_registers): Don't re-retrieve data
4129 with ptrace that has already been obtained from /proc. Always
4130 copy any data retrieved with ptrace to the buffer supplied.
4131
bde24c0a
PA
41322012-05-11 Yao Qi <yao@codesourcery.com>
4133 Pedro Alves <palves@redhat.com>
4134
4135 * linux-low.c (enum stopping_threads_kind): New.
4136 (stopping_threads): Change type to `enum stopping_threads_kind'.
4137 (handle_extended_wait): If stopping and suspending threads, leave
4138 the new_lwp suspended too.
4139 (linux_wait_for_event): Adjust.
4140 (stop_all_lwps): Set `stopping_threads' to
4141 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4142 whether we're suspending threads or just stopping them. Assert no
4143 recursion happens.
4144
623b6bdf
YQ
41452012-04-29 Yao Qi <yao@codesourcery.com>
4146
4147 * server.h: Move some code to ...
4148 * gdbthread.h: ... here. New.
4149 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4150 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4151 (nto-low.o, win32-low.o): Likewise.
4152 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4153 * regcache.c, remote-utils.c, server.c: Likewise.
4154 * target.c, tracepoint.c, win32-low.c: Likewise.
4155
f15f9948
TJB
41562012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4157
4158 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4159 (PTRACE_ARG4_TYPE): Likewise.
4160 (PTRACE_XFER_TYPE): Likewise.
4161 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4162 ptrace to PTRACE_ARG3_TYPE.
4163 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4164 (PTRACE_ARG4_TYPE): Likewise.
4165 (PTRACE_XFER_TYPE): Likewise.
4166 (linux_detach_one_lwp): Cast fourth argument of
4167 ptrace to long then PTRACE_ARG4_TYPE.
4168 (regsets_fetch_inferior_registers): Cast third argument of
4169 ptrace to long then PTRACE_ARG3_TYPE.
4170 (regsets_store_inferior_registers): Likewise.
4171
38ea300a
PA
41722012-04-20 Pedro Alves <palves@redhat.com>
4173
4174 * configure: Regenerate.
4175
c971b7fa
PA
41762012-04-19 Pedro Alves <palves@redhat.com>
4177
43aaf8b6 4178 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4179 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4180 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4181 (all, install-only, uninstall, clean-info, all-lib, clean): No
4182 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4183 (maintainer-clean realclean distclean): Use subdir_do.
4184 (subdir_do): New.
4185 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4186 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4187 * acinclude.m4: Include acx_configure_dir.m4.
4188 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4189 calls. Call AC_PROG_RANLIB. Configure gnulib using
4190 ACX_CONFIGURE_DIR.
4191 (GNULIB): New.
4192 (GNULIB_STDINT_H): Adjust.
4193 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4194 * gdbreplay.c: Include build-gnulib/config.h.
4195 * server.h: Likewise.
4196 * aclocal.m4: Regenerate.
4197 * config.in: Regenerate.
4198 * configure: Regenerate.
c971b7fa 4199
809277f8
PA
42002012-04-19 Pedro Alves <palves@redhat.com>
4201
4202 * Makefile.in (LIBGNU, INCGNU): Adjust.
4203 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4204 (all, install-only, uninstall, clean-info, all-lib, clean)
4205 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4206 * configure.ac: Adjust AC_OUTPUT output.
4207 * aclocal.m4: Regenerate.
4208 * configure: Regenerate.
4209
fd9bb8b8
PA
42102012-04-19 Pedro Alves <palves@redhat.com>
4211
4212 * Makefile.in (generated_files): New.
4213 (server_h): Remove the explicit dependency on config.h, and depend
4214 on $generated_files.
4215
1c298c66
PA
42162012-04-19 Pedro Alves <palves@redhat.com>
4217
4218 * Makefile.in (INCGNU): Add -Ignulib.
4219
57c4b50b
PA
42202012-04-19 Pedro Alves <palves@redhat.com>
4221
4222 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4223 (INCGNU): ... this, and spell out -I here.
4224 (GNULIB_LIB): Rename to ...
4225 (LIBGNU): ... this.
4226 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4227
1030e047
PA
42282012-04-19 Pedro Alves <palves@redhat.com>
4229
4230 * config.in: Regenerate.
4231
447d4319
PA
42322012-04-19 Pedro Alves <palves@redhat.com>
4233
4234 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4235 * server.h (memmem): Remove declaration.
4236 * config.in: Regenerate.
4237 * configure: Regenerate.
4238
aad9eab9
YQ
42392012-04-19 Yao Qi <yao@codesourcery.com>
4240
4241 * Makefile.in (SFILES): Add common/vec.c.
4242 (OBS): Add vec.o.
4243 (vec.o): New rule.
4244
3e10640f
YQ
42452012-04-19 Yao Qi <yao@codesourcery.com>
4246
4247 * remote-utils.c (prepare_resume_reply): Replace with macro
4248 target_core_of_thread.
4249 * server.c (handle_qxfer_threads_proper): Likewise.
4250 * target.h (traget_core_of_thread): New macro.
4251
71622373
PA
42522012-04-18 Pedro Alves <palves@redhat.com>
4253
4254 * aclocal.m4: Regenerate.
4255 * configure: Regenerate.
4256
80d26939
YQ
42572012-04-16 Yao Qi <yao@codesourcery.com>
4258
4259 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4260 duplicated on address.
4261
42476b70
YQ
42622012-04-16 Yao Qi <yao@codesourcery.com>
4263
4264 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4265 (struct tracepoint_action_ops) <send>: New field.
4266 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4267 (agent_expr_send, x_tracepoint_action_send): New.
4268 (l_tracepoint_action_send): New.
4269 (cmd_qtdp): Download and install tracepoint
4270 according to `use_agent'.
4271 (run_inferior_command): Add one more parameter `len'.
4272 Update callers.
4273 (tracepoint_send_agent): New.
4274 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4275
7bc83639
YQ
42762012-04-16 Yao Qi <yao@codesourcery.com>
4277
4278 * tracepoint.c (download_tracepoints): Moved to ...
4279 (cmd_qtstart): ... here.
4280
5f18041e
YQ
42812012-04-14 Yao Qi <yao@codesourcery.com>
4282
4283 * tracepoint.c: Include inttypes.h.
4284 (struct collect_memory_action): Use sized types.
4285 (struct tracepoint): Likewise.
4286 (cmd_qtdp, stop_tracing): Update print specifiers.
4287 (cmd_qtp, response_tracepoint): Likewise.
4288 (collect_data_at_tracepoint): Likewise.
4289 (collect_data_at_step): Likewise.
4290
55a8c076
YQ
42912012-04-14 Yao Qi <yao@codesourcery.com>
4292
4293 Import gnulib module inttypes.
4294 * aclocal.m4, config.in, configure: Regenerated.
4295
dc750257
YQ
42962012-04-14 Yao Qi <yao@codesourcery.com>
4297
4298 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4299 Makefile and config.status at last.
4300
0ab5faf9
YQ
43012012-04-13 Yao Qi <yao@codesourcery.com>
4302
4303 * tracepoint.c: Include stdint.h unconditionally.
4304
18f5fd81
TJB
43052012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4306
4307 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4308 on BFD_HAVE_SYS_PROCFS_TYPE.
4309 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4310 * configure: Regenerate.
4311 * config.in: Likewise.
4312
4d47af5c
L
43132012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4314
4315 * Makefile.in (clean): Also remove x32.c x32-linux.c
4316 x32-avx.c x32-avx-linux.c.
4317 (x32.o): New target.
4318 (x32.c): Likewise.
4319 (x32-linux.o): Likewise.
4320 (x32-linux.c): Likewise.
4321 (x32-avx.o): Likewise.
4322 (x32-avx.c): Likewise.
4323 (x32-avx-linux.o): Likewise.
4324 (x32-avx-linux.c): Likewise.
4325
4326 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4327 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4328 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4329 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4330 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4331 i386/x32-avx-linux.xml.
4332
4333 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4334 (init_registers_x32_avx_linux): Likwise.
4335 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4336 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4337
ecedbe58
PA
43382012-04-13 Pedro Alves <palves@redhat.com>
4339
4340 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4341 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4342 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4343 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4344 the sub-make.
4345
c92b5177
L
43462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4347
4348 * linux-x86-low.c (compat_x32_clock_t): New.
4349 (compat_x32_siginfo_t): Likewise.
4350 (compat_x32_siginfo_from_siginfo): Likewise.
4351 (siginfo_from_compat_x32_siginfo): Likewise.
4352 (linux_is_elf64): Likewise.
4353 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4354 and siginfo_from_compat_x32_siginfo for x32.
4355 (x86_arch_setup): Set linux_is_elf64.
4356
214d508e
L
43572012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4358
4359 PR gdb/13969
4360 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4361 e_machine field.
4362 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4363 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4364 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4365 compatible with process.
4366
c9a1864a
YQ
43672012-04-12 Yao Qi <yao@codesourcery.com>
4368
4369 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4370 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4371 (install-only, install-info, clean): Handle sub dir gnulib.
4372 (all-lib, am--refresh): New targets.
4373 (memmem.o): Remove target.
4374 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4375 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4376 (AC_REPLACE_FUNCS): Remove memmem.
4377 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4378 (AC_OUTPUT): Generate Makefile in gnulib/.
4379 * aclocal.m4, config.in, configure: Regenerated.
4380
367ba2c2
MR
43812012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4382
4383 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4384
9d236627
PA
43852012-04-05 Pedro Alves <palves@redhat.com>
4386
4387 -Werror=strict-aliasing
4388
4389 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4390 pointer.
4391
111217b3
PA
43922012-04-04 Pedro Alves <palves@redhat.com>
4393
4394 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4395 (sparc_store_gregset_from_stack, sparc_store_gregset)
4396 (sparc_breakpoint_at): Fix formatting.
4397
8365dcf5
TJB
43982012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4399
4400 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4401 are available.
4402 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4403 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4404 * config.in: Regenerate.
4405 * configure: Likewise.
4406
689cc2ae
PA
44072012-03-29 Pedro Alves <palves@redhat.com>
4408
4409 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4410 Correct ptrace arguments.
4411
c14dfd32
PA
44122012-03-28 Pedro Alves <palves@redhat.com>
4413
4414 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4415 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4416 (IA64_FR1_REGNUM): New defines.
4417 (ia64_fetch_register): New.
4418 (the_low_target): Install it.
4419 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4420 field.
4421 * linux-low.c (linux_fetch_registers): Try the
4422 the_low_target.fetch_register hook first.
4423
4424 * linux-arm-low.c (the_low_target): Adjust.
4425 * linux-bfin-low.c (the_low_target): Adjust.
4426 * linux-cris-low.c (the_low_target): Adjust.
4427 * linux-crisv32-low.c (the_low_target): Adjust.
4428 * linux-m32r-low.c (the_low_target): Adjust.
4429 * linux-m68k-low.c (the_low_target): Adjust.
4430 * linux-mips-low.c (the_low_target): Adjust.
4431 * linux-ppc-low.c (the_low_target): Adjust.
4432 * linux-s390-low.c (the_low_target): Adjust.
4433 * linux-sh-low.c (the_low_target): Adjust.
4434 * linux-sparc-low.c (the_low_target): Adjust.
4435 * linux-tic6x-low.c (the_low_target): Adjust.
4436 * linux-x86-low.c (the_low_target): Adjust.
4437 * linux-xtensa-low.c (the_low_target): Adjust.
4438
63c88e13
PA
44392012-03-26 Pedro Alves <palves@redhat.com>
4440
4441 * server.c (handle_qxfer_libraries): Don't bail early if
4442 the_target->qxfer_libraries_svr4 is not NULL.
4443
fb723180
PA
44442012-03-26 Pedro Alves <palves@redhat.com>
4445
4446 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4447
0afae3cf
PA
44482012-03-23 Pedro Alves <palves@redhat.com>
4449
4450 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4451 "library-list-svr4" element's start tag when the the DSO list is
4452 empty.
4453
485f1ee4
PA
44542012-03-23 Pedro Alves <palves@redhat.com>
4455
4456 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4457 a variable whose type size is the same as the inferior's pointer
4458 size.
4459
a5362b9a
TS
44602012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4461
4462 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4463 struct siginfo.
4464 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4465 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4466 * linux-low.h: Include <signal.h>.
4467 (struct siginfo): Remove forward declaration.
4468 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4469 struct siginfo.
4470
d226c142
MF
44712012-03-21 Mike Frysinger <vapier@gentoo.org>
4472
4473 * .gitignore: Ignore more files.
4474
122f36ef
PA
44752012-03-19 Pedro Alves <palves@redhat.com>
4476 Jan Kratochvil <jan.kratochvil@redhat.com>
4477
4478 * server.c (cont_thread, general_thread): Add describing comments.
4479 (start_inferior): Clear `cont_thread'.
4480 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4481 of a process.
4482
fc3e5175
YQ
44832012-03-15 Yao Qi <yao@codesourcery.com>
4484
4485 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4486 handling to ...
4487 (cmd_qtdp): ... here.
4488
8d0d92cd
YQ
44892012-03-15 Yao Qi <yao@codesourcery.com>
4490
4491 * tracepoint.c (struct tracepoint_action_ops): New.
4492 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4493 (m_tracepoint_action_download): New.
4494 (r_tracepoint_action_download): New.
4495 (x_tracepoint_action_download): New.
4496 (l_tracepoint_action_download): New.
4497 (add_tracepoint_action): Install `action->ops' according type.
4498 (download_tracepoint_1): Move code `download' function pointer
4499 of various tracepoint_action_ops.
4500
87b0bb13
JK
45012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4502
4503 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4504 linux_ptrace_attach_warnings.
4505
5f572dec
JK
45062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4507
4508 * Makefile.in (linux-ptrace.o): New.
4509 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4510 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4511 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4512 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4513 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4514 of these targets.
4515 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4516
f4647387
YQ
45172012-03-08 Yao Qi <yao@codesourcery.com>
4518 Pedro Alves <palves@redhat.com>
4519
4520 Fix PR server/13392.
4521 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4522 offset of JMP insn.
4523 * tracepoint.c (remove_tracepoint): New.
4524 (cmd_qtdp): Call remove_tracepoint when failed to install.
4525
9b224c5e
PA
45262012-03-07 Pedro Alves <palves@redhat.com>
4527
4528 * linux-low.c (get_detach_signal): New.
4529 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4530 Pass on pending signals to PTRACE_DETACH. Check the result of the
4531 ptrace call.
4532 * server.c (program_signals, program_signals_p): New.
4533 (handle_general_set): Handle QProgramSignals.
4534 * server.h (program_signals, program_signals_p): Declare.
4535
e237a7e2
JK
45362012-03-05 Pedro Alves <palves@redhat.com>
4537 Jan Kratochvil <jan.kratochvil@redhat.com>
4538
4539 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4540 New comment why.
4541
5808517f
YQ
45422012-03-03 Yao Qi <yao@codesourcery.com>
4543
4544 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4545 agent_look_up_symbols.
4546
58b4daa5
YQ
45472012-03-03 Yao Qi <yao@codesourcery.com>
4548
4549 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4550 (linux-x86-low.o): Likewise.
4551 * server.h: Remove in_process_agent_loaded.
4552 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4553 common/agent.c.
4554 Update callers.
4555
8ffcbaaf
YQ
45562012-03-03 Yao Qi <yao@codesourcery.com>
4557
4558 * tracepoint.c (gdb_agent_capability): New global.
4559 (in_process_agent_loaded_ust): Renamed to
4560 `in_process_agent_supports_ust'.
4561 Update callers.
4562 (in_process_agent_supports_ust): Call agent_capability_check.
4563 (clear_installed_tracepoints): Assert that agent supports
4564 agent.
4565
d1feda86
YQ
45662012-03-03 Yao Qi <yao@codesourcery.com>
4567
4568 * linux-low.c (linux_supports_agent): New.
4569 (linux_target_ops): Initialize field `supports_agent' with
4570 linux_supports_agent.
4571 * target.h (struct target_ops) <supports_agent>: New.
4572 (target_supports_agent): New macro.
4573 * server.c (handle_general_set): Handle packet 'QAgent'.
4574 (handle_query): Send `QAgent+'.
4575 * Makefile.in (server.o): Depends on agent.h.
4576
2fa291ac
YQ
45772012-03-03 Yao Qi <yao@codesourcery.com>
4578
4579 * Makefile.in (OBS): Add agent.o.
4580 Add new rule for agent.o.
4581 Track dependence of tracepoint.c on agent.h.
4582 * tracepoint.c (run_inferior_command_1):
4583 (run_inferior_command): Call agent_run_command.
4584 (gdb_ust_connect_sync_socket): Deleted. Move it to
4585 common/agent.c.
4586 (resume_thread, stop_thread): Likewise.
4587 (gdb_ust_socket_init): Renamed to ...
4588 (gdb_agent_socket_init): ... New.
4589 (gdb_ust_thread): Renamed to ...
4590 (gdb_agent_helper_thread): ... New.
4591 (gdb_ust_init): Move some code to ...
4592 (gdb_agent_init): ... here. New.
4593 [HAVE_UST]: Call gdb_ust_init.
4594 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4595 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4596 * config.in, configure: Regenerated.
4597
05044653
PA
45982012-03-02 Pedro Alves <palves@redhat.com>
4599
4600 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4601 * linux-low.c (struct simple_pid_list): New.
4602 (stopped_pids): New a struct simple_pid_list pointer.
4603 (add_to_pid_list, pull_pid_from_list): New.
4604 (handle_extended_wait): Don't assume the first signal new children
4605 report is SIGSTOP. Adjust call to pull_pid_from_list.
4606 (linux_wait_for_lwp): Adjust.
4607
8d00225b
YQ
46082012-03-02 Yao Qi <yao@codesourcery.com>
4609
4610 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4611 debug log.
4612
19560ba5
YQ
46132012-03-02 Yao Qi <yao@codesourcery.com>
4614
4615 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4616 `stop_pc' and `tpoint'. Update caller.
4617
1faeff08
MR
46182012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4619
4620 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4621 * linux-low.c (use_linux_regsets): New macro.
4622 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4623 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4624 (linux_register_in_regsets): New function.
4625 (usr_fetch_inferior_registers): Skip registers covered by
4626 regsets.
4627 (usr_store_inferior_registers): Likewise.
4628 (usr_fetch_inferior_registers): New macro.
4629 (usr_store_inferior_registers): Likewise.
4630 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4631 (linux_store_registers): Likewise.
4632 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4633 prototype.
4634 (init_registers_mips64_dsp_linux): Likewise.
4635 (init_registers_mips_linux): New macro.
4636 (init_registers_mips_dsp_linux): Likewise.
4637 (mips_dsp_num_regs): Likewise.
4638 (DSP_BASE, DSP_CONTROL): New fallback macros.
4639 (mips_base_regs): New macro.
4640 (mips_regmap): Use it. Fix the size.
4641 (mips_dsp_regmap): New variable.
4642 (mips_dsp_regset_bitmap): Likewise.
4643 (mips_arch_setup): New function.
4644 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4645 than mips_regmap.
4646 (mips_cannot_store_register): Likewise.
4647 (the_low_target): Update .arch_setup, .num_regs and .regmap
4648 initializers. Add .regset_bitmap initializer.
4649 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4650 initializer.
4651 * linux-bfin-low.c (the_low_target): Likewise.
4652 * linux-cris-low.c (the_low_target): Likewise.
4653 * linux-crisv32-low.c (the_low_target): Likewise.
4654 * linux-ia64-low.c (the_low_target): Likewise.
4655 * linux-m32r-low.c (the_low_target): Likewise.
4656 * linux-m68k-low.c (the_low_target): Likewise.
4657 * linux-ppc-low.c (the_low_target): Likewise.
4658 * linux-s390-low.c (the_low_target): Likewise.
4659 * linux-sh-low.c (the_low_target): Likewise.
4660 * linux-sparc-low.c (the_low_target): Likewise.
4661 * linux-tic6x-low.c (the_low_target): Likewise.
4662 * linux-x86-low.c (the_low_target): Likewise.
4663 * linux-xtensa-low.c (the_low_target): Likewise.
4664 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4665 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4666 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4667 srv_xmlfiles.
4668 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4669 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4670
c03e6ccc
YQ
46712012-02-29 Yao Qi <yao@codesourcery.com>
4672 Pedro Alves <palves@redhat.com>
4673
4674 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4675 `step_over_finished' is true.
4676
644cebc9
PA
46772012-02-27 Pedro Alves <palves@redhat.com>
4678
4679 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4680 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4681
c14d7ab2
PA
46822012-02-27 Pedro Alves <palves@redhat.com>
4683
4684 PR server/9684
4685 * linux-low.c (pid_is_stopped): New.
4686 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4687
412c89dd
LM
46882012-02-25 Luis Machado <lgustavo@codesourcery.com>
4689
4690 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4691 of conditions.
4692
b745defe
MR
46932012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4694
4695 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4696
9f3a5c85
LM
46972012-02-24 Luis Machado <lgustavo@codesourcery>
4698
4699 * server.c (handle_query): Advertise support for target-side
4700 breakpoint condition evaluation.
4701 (process_point_options): New function.
4702 (process_serial_event): When inserting a breakpoint, check for
4703 a target-side condition that should be evaluated.
4704
4705 * mem-break.c: Include regcache.h and ax.h.
4706 (point_cond_list_t): New data structure.
4707 (breakpoint) <cond_list>: New field.
4708 (find_gdb_breakpoint_at): Make non-static.
4709 (delete_gdb_breakpoint_at): Clear any target-side
4710 conditions.
4711 (clear_gdb_breakpoint_conditions): New function.
4712 (add_condition_to_breakpoint): Likewise.
4713 (add_breakpoint_condition): Likewise.
4714 (gdb_condition_true_at_breakpoint): Likewise.
4715 (gdb_breakpoint_here): Return result directly instead
4716 of going through a local variable.
4717
4718 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4719 (clear_gdb_breakpoint_conditions): Likewise.
4720 (add_breakpoint_condition): Likewise.
4721 (gdb_condition_true_at_breakpoint): Likewise.
4722
4723 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4724 (need_step_over_p): Take target-side breakpoint condition into
4725 consideration.
4726
5e1dc496
LM
47272012-02-24 Luis Machado <lgustavo@codesourcery>
4728
4729 * server.h: Include tracepoint.h.
4730 (agent_mem_read, agent_get_trace_state_variable_value,
4731 agent_set_trace_state_variable_value,
4732 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4733 get_set_tsv_func_addr): New prototypes.
4734
4735 * ax.h: New include file.
4736 * ax.c: New source file.
4737
4738 * tracepoint.c: Include ax.h.
4739 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4740 agent_expr, eval_result_type): Move to ax.h.
4741 (parse_agent_expr): Rename to ...
4742 (gdb_parse_agent_expr): ... this, make it non-static and move
4743 to ax.h.
4744 (unparse_agent_expr) Rename to ...
4745 (gdb_unparse_agent_expr): ... this, make it non-static and move
4746 to ax.h.
4747 (eval_agent_expr): Rename to ...
4748 (eval_tracepoint_agent_expr): ... this.
4749 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4750 forward declarations.
4751 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4752 (agent_get_trace_state_variable_value): New function.
4753 (agent_set_trace_state_variable_value): New function.
4754 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4755 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4756 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4757 (condition_true_at_tracepoint): Likewise.
4758 (parse_agent_expr): Rename to ...
4759 (gdb_parse_agent_expr): ... this and move to ax.c.
4760 (unparse_agent_expr): Rename to ...
4761 (gdb_unparse_agent_expr): ... this and move to ax.c.
4762 (gdb_agent_op_name): Move to ax.c.
4763 (eval_agent_expr): Rename to ...
4764 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4765 and move to ax.c.
4766 (eval_tracepoint_agent_expr): New function.
4767 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4768 non-static.
5e1dc496
LM
4769 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4770 ax.c.
4771 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4772 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4773 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4774 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4775 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4776 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4777 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4778 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4779 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4780 (compile_bytecodes): Remove forward declaration.
4781 (is_goto_target): Move to ax.c.
4782 (compile_bytecodes): Move to ax.c and call
4783 agent_get_trace_state_variable_value (...) and
4784 agent_set_trace_state_variable_value (...).
4785
4786 * Makefile.in: Update ax.c and IPA dependencies.
4787
277e4e52
PA
47882012-02-24 Pedro Alves <palves@redhat.com>
4789
4790 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4791 (cmd_bigqtbuffer_circular): ... this. Only handle
4792 'QTBuffer:circular:'.
4793 (handle_tracepoint_general_set): Adjust.
4794
bf4c19f7
YQ
47952012-02-16 Yao Qi <yao@codesourcery.com>
4796
4797 * inferiors.c: Move code to ...
4798 * dll.c: .... here. New.
4799 * server.h: Declare clear_dlls.
4800 * Makefile.in (SFILES): Add dll.c.
4801 (OBS): Add dll.o
4802 (dll.o): New rule.
4803
d73f2619
YQ
48042012-02-11 Yao Qi <yao@codesourcery.com>
4805
4806 * server.c: (handle_monitor_command): Add a new parameter
4807 `own_buf'.
4808 (handle_query): Update caller.
4809
f8255c2a
JB
48102012-02-09 Joel Brobecker <brobecker@adacore.com>
4811
4812 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4813 * configure, config.in: Regenerate.
4814 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4815 is not defined.
4816
da84f473
PA
48172012-02-02 Pedro Alves <palves@redhat.com>
4818
4819 Try SIGKILL first, then PTRACE_KILL.
4820 * linux-low.c (linux_kill_one_lwp): New.
4821 (linux_kill_one_lwp): Rename to ...
4822 (kill_one_lwp_callback): ... this. Use the new
4823 linux_kill_one_lwp.
4824
e886a173
PA
48252012-02-02 Pedro Alves <palves@redhat.com>
4826
4827 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4828 inferior.
4829
be07f1a2
PA
48302012-01-27 Pedro Alves <palves@redhat.com>
4831
4832 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4833 (elf_64_file_p): Make static.
4834 (linux_pid_exe_is_elf_64_file): New.
4835 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4836 Delete declarations.
4837 (linux_pid_exe_is_elf_64_file): Declare.
4838 * linux-x86-low.c (x86_arch_setup): Use
4839 linux_pid_exe_is_elf_64_file.
4840
d8301ad1
JK
48412012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4842
4843 * linux-low.c (linux_wait_for_event_1): Rename to ...
4844 (linux_wait_for_event): ... here and merge it with former
4845 linux_wait_for_event - new variable wait_ptid, use it.
4846 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4847
01b17894
PA
48482012-01-23 Pedro Alves <palves@redhat.com>
4849
4850 * server.c (main): Avoid yet another case of infinite loop while
4851 detaching/killing after a longjmp.
4852
e825046f
JK
48532012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4854
4855 Code cleanup.
4856 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4857
b9e7b9c3
UW
48582012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4859
4860 * hostio.c (handle_readlink): New function.
4861 (handle_vFile): Call it to handle "vFile:readlink" packets.
4862
901f9912
UW
48632012-01-20 Pedro Alves <palves@redhat.com>
4864 Ulrich Weigand <ulrich.weigand@linaro.org>
4865
4866 * server.c (handle_v_requests): Only support vAttach and vRun to
4867 start multiple processes when in extended protocol mode.
4868
fc1ab1a0
PA
48692012-01-17 Pedro Alves <palves@redhat.com>
4870
4871 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4872 memalign plus mprotect to allocate the scratch buffer.
4873
7d5d4e98
PA
48742012-01-13 Pedro Alves <palves@redhat.com>
4875
4876 * server.c (attach_inferior): Clear `cont_thread'.
4877
f128d5e9
PA
48782012-01-13 Pedro Alves <palves@redhat.com>
4879
4880 * server.c (main): Avoid infinite loop while detaching/killing
4881 after a longjmp.
4882
06db92f0
DE
48832012-01-09 Doug Evans <dje@google.com>
4884
4885 * server.c (start_inferior): Set last_ptid in --wrapper case.
4886
32d92999
YQ
48872012-01-06 Yao Qi <yao@codesourcery.com>
4888
4889 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4890 defined.
4891 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4892
5e0a92a9
YQ
48932012-01-04 Yao Qi <yao@codesourcery.com>
4894
4895 * tracepoint.c (cmd_qtdp): Print debug message
4896 for static tracepoint.
4897
ae639e8c
YQ
48982012-01-04 Yao Qi <yao@codesourcery.com>
4899
4900 * tracepoint.c (trace_vdebug): Differentiate debug message
4901 between gdbserver and IPA.
4902
f72429c5
YQ
49032012-01-03 Yao Qi <yao@codesourcery.com>
4904
4905 * tracepoint.c (tracepoint_was_hit): Don't collect for
4906 static tracepoint.
4907
12c3e59c
JB
49082012-01-02 Joel Brobecker <brobecker@adacore.com>
4909
4910 * terminal.h: Reformat copyright header.
4911
67827812
JB
49122012-01-02 Joel Brobecker <brobecker@adacore.com>
4913
4914 * server.c (gdbserver_version): Update copyright year.
4915 * gdbreplay.c (gdbreplay_version): Likewise.
4916
3e52c33d
JK
49172011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4918
4919 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4920
4921 Revert:
4922 2011-12-18 Hui Zhu <teawater@gmail.com>
4923 * linux-low.c (linux_create_inferior): Save return value to ret.
4924
66f1260e
HZ
49252011-12-18 Hui Zhu <teawater@gmail.com>
4926
4927 * linux-low.c (linux_create_inferior): Save return value to ret.
4928
e77616d7
DE
49292011-12-16 Doug Evans <dje@google.com>
4930
e7b06c57
DE
4931 * linux-low.c (linux_create_inferior): If stdio connection,
4932 redirect stdin from /dev/null, stdout to stderr.
4933 * remote-utils.c (remote_is_stdio): New static global.
4934 (remote_connection_is_stdio): New function.
4935 (remote_prepare): Handle stdio connection.
4936 (remote_open): Ditto.
4937 (remote_close): Don't close stdin for stdio connections.
4938 (read_prim,write_prim): New functions. Replace all calls to
4939 read/write to these.
4940 * server.c (main): Watch for "-" argument. Move call to
4941 remote_prepare before start_inferior.
4942 * server.h (STDIO_CONNECTION_NAME): New macro.
4943 (remote_connection_is_stdio): Declare.
4944
e77616d7
DE
4945 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4946 in debugging output.
4947
82067193
YQ
49482011-12-15 Yao Qi <yao@codesourcery.com>
4949
4950 * tracepoint.c: Include sys/syscall.h.
4951 (gdb_ust_thread): Remove preprocessor conditional.
4952
82bfbe7e
PA
49532011-12-14 Pedro Alves <pedro@codesourcery.com>
4954
4955 * linux-low.c (linux_detach_one_lwp): Call
4956 the_low_target.prepare_to_resume before detaching.
4957
712c6575
YQ
49582011-12-14 Yao Qi <yao@codesourcery.com>
4959
4960 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4961 of write.
4962
d54d1edf
YQ
49632011-12-14 Yao Qi <yao@codesourcery.com>
4964
4965 * i386-low.c (i386_low_stopped_data_address): Initialize local
4966 variable `control'.
4967
6210a125
PA
49682011-12-13 Pedro Alves <pedro@codesourcery.com>
4969
4970 PR remote/13492
4971
4972 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4973 DR_CONTROL unless necessary. Extend comments.
4974 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4975 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4976
2ece8244
YQ
49772011-12-13 Yao Qi <yao@codesourcery.com>
4978
4979 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4980 macros.
4981 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4982
784867a5
JK
49832011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4984
4985 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4986 Print new debug message for such case.
4987
6bf36717
JK
49882011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4989
4990 Fix overlapping memcpy.
4991 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4992 the read_inferior_memory transfer.
4993 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4994 write_inferior_memory transfer.
4995 (set_fast_tracepoint_jump): New variable buf. Use it for the
4996 read_inferior_memory and write_inferior_memory transfers.
4997 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4998 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4999 Use it for the write_inferior_memory transfer.
5000 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5001 buffers.
5002
50275556
MR
50032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5004
5005 * linux-low.c (fetch_register, store_register): Make code
5006 consistent, fix formatting.
5007
7325beb4
MR
50082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5009
5010 * linux-low.c (usr_store_inferior_registers): Factor out code
5011 to handle individual registers into...
5012 (store_register): ... this new function.
5013
c642a434
UW
50142011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5015
5016 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5017 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5018 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5019 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5020 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5021 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5022 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5023 (srv_xmlfiles): Add new XML files.
5024
5025 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5026 and <sys/uio.h>.
5027 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5028 (init_registers_s390_linux32v1): Add prototype.
5029 (init_registers_s390_linux32v2): Likewise.
5030 (init_registers_s390_linux64v1): Likewise.
5031 (init_registers_s390_linux64v2): Likewise.
5032 (init_registers_s390x_linux64v1): Likewise.
5033 (init_registers_s390x_linux64v2): Likewise.
5034 (s390_num_regs): Increment to 52.
5035 (s390_regmap): Add orig_r2 register.
5036 (s390_num_regs_3264): Increment to 68.
5037 (s390_regmap_3264): Add orig_r2 register.
5038 (s390_collect_ptrace_register): Handle orig_r2 register.
5039 (s390_supply_ptrace_register): Likewise.
5040 (s390_fill_last_break): New function.
5041 (s390_store_last_break): Likewise.
5042 (s390_fill_system_call): New function.
5043 (s390_store_system_call): Likewise.
5044 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5045 register sets.
5046 (s390_check_regset): New function.
5047 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5048 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5049 Update target_regsets for available register sets.
5050
2268b414
JK
50512011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5052 Jan Kratochvil <jan.kratochvil@redhat.com>
5053
5054 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5055 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5056 New.
5057 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5058 * linux-low.h (struct process_info_private): New member r_debug.
5059 * server.c (handle_qxfer_libraries): Call
5060 the_target->qxfer_libraries_svr4.
5061 (handle_qxfer_libraries_svr4): New function.
5062 (qxfer_packets): New entry "libraries-svr4".
5063 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5064 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5065 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5066 PACKET_qXfer_libraries_svr4.
5067
d6db1fab
UW
50682011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5069
5070 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5071 PSW address/mask between 8-byte and 16-byte formats.
5072 (s390_supply_ptrace_register): Likewise.
5073 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5074 basic addressing mode bit.
5075
242f5f1c
SS
50762011-11-24 Stan Shebs <stan@codesourcery.com>
5077
5078 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5079
f196051f
SS
50802011-11-17 Stan Shebs <stan@codesourcery.com>
5081
5082 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5083 (tracing_start_time): New global.
5084 (tracing_stop_time): New global.
5085 (tracing_user_name): New global.
5086 (tracing_notes): New global.
5087 (tracing_stop_note): New global.
5088 (cmd_qtstart): Set traceframe_usage, start_time.
5089 (stop_tracing): Set stop_time.
5090 (cmd_qtstatus): Report additional status.
5091 (cmd_qtp): New function.
5092 (handle_tracepoint_query): Call it.
5093 (cmd_qtnotes): New function.
5094 (handle_tracepoint_general_set): Call it.
5095 (get_timestamp): Rename from tsv_get_timestamp.
5096
405f8e94
SS
50972011-11-14 Stan Shebs <stan@codesourcery.com>
5098 Kwok Cheung Yeung <kcy@codesourcery.com>
5099
5100 * linux-x86-low.c (small_jump_insn): New.
5101 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5102 trampoline and error message, build a trampoline and issue a small
5103 jump instruction to it.
5104 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5105 trampoline and error message.
5106 (x86_get_min_fast_tracepoint_insn_len): New.
5107 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5108 * linux-low.h (struct linux_target_ops): Add arguments to
5109 install_fast_tracepoint_jump_pad operation, add new operation.
5110 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5111 arguments.
5112 (linux_get_min_fast_tracepoint_insn_len): New function.
5113 (linux_target_op): Add new operation.
5114 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5115 (gdb_trampoline_buffer_end): Ditto.
5116 (gdb_trampoline_buffer_error): Ditto.
5117 (struct ipa_sym_addresses): Add fields for new IPA variables.
5118 (symbol_list): Add entries for new IPA variables.
5119 (struct tracepoint): Add fields to hold the address range of the
5120 trampoline used by the tracepoint.
5121 (trampoline_buffer_head): New static variable.
5122 (trampoline_buffer_tail): Ditto.
5123 (claim_trampoline_space): New function.
5124 (have_fast_tracepoint_trampoline_buffer): New function.
5125 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5126 structure.
5127 (install_fast_tracepoint): Ditto, also add error buffer argument.
5128 (cmd_qtminftpilen): New function.
5129 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5130 (fast_tracepoint_from_trampoline_address): New function.
5131 (fast_tracepoint_collecting): Handle trampoline as part of jump
5132 pad space.
5133 (set_trampoline_buffer_space): New function.
5134 (initialize_tracepoint): Initialize new IPA variables.
5135 * target.h (struct target_ops): Add arguments to
5136 install_fast_tracepoint_jump_pad operation, add new
5137 get_min_fast_tracepoint_insn_len operation.
5138 (target_get_min_fast_tracepoint_insn_len): New.
5139 (install_fast_tracepoint_jump_pad): Add arguments.
5140 * server.h (IPA_BUFSIZ): Define.
5141 * linux-i386-ipa.c: Include extra header files.
5142 (initialize_fast_tracepoint_trampoline_buffer): New function.
5143 (initialize_low_tracepoint): Call it.
5144 * server.h (set_trampoline_buffer_space): Declare.
5145 (claim_trampoline_space): Ditto.
5146 (have_fast_tracepoint_trampoline_buffer): Ditto.
5147
1e4d1764
YQ
51482011-11-14 Yao Qi <yao@codesourcery.com>
5149
5150 * server.c (handle_query): Handle InstallInTrace for qSupported.
5151 * tracepoint.c (add_tracepoint): Sort list.
5152 (install_tracepoint, download_tracepoint): New.
5153 (cmd_qtdp): Call them to install and download tracepoints.
5154 (sort_tracepoints): Removed.
5155 (cmd_qtstart): Update.
5156
5c73ff4e
YQ
51572011-11-14 Yao Qi <yao@codesourcery.com>
5158
5159 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5160 * mem-break.h: Declare.
5161 * tracepoint.c (cmd_qtstart): Move some code to ...
5162 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5163 New.
5164 (download_tracepoints): Move some code to ...
5165 (download_tracepoint_1): ... here. New.
5166
86a30030
YQ
51672011-11-08 Yao Qi <yao@codesourcery.com>
5168
5169 * remote-utils.c (relocate_instruction): A comment fix.
5170
8d26e50c
JB
51712011-11-07 Joel Brobecker <brobecker@adacore.com>
5172
5173 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5174 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5175 dr_status_mirror and dr_control_mirror from debug_reg_state.
5176 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5177 (i386_initial_stuff): Remove use of deleted globals.
5178 (i386_get_thread_context, i386_set_thread_context,
5179 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5180 from debug_reg_state.
5181
a59306a3
YQ
51822011-11-05 Yao Qi <yao@codesourcery.com>
5183
5184 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5185 address as TPOINT's.
5186
3065dfb6
SS
51872011-11-02 Stan Shebs <stan@codesourcery.com>
5188
5189 * tracepoint.c (agent_mem_read_string): New function.
5190 (eval_agent_expr): Call it for tracenz.
5191 * server.c (handle_query): Report support for tracenz.
5192
fd0d8c7c
YQ
51932011-11-02 Yao Qi <yao@codesourcery.com>
5194
5195 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5196
609086b1
YQ
51972011-11-02 Yao Qi <yao@codesourcery.com>
5198
5199 * target.h: Fix a typo in comment.
5200
b9fd1791
PA
52012011-10-31 Pedro Alves <pedro@codesourcery.com>
5202
5203 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5204 clobber the breakpoints' shadows with fast tracepoint jumps.
5205 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5206 * target.c (write_inferior_memory): Also pass MYADDR down to
5207 check_mem_write.
5208
03583c20
UW
52092011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5210
5211 * configure.ac: Check support for personality routine.
5212 * configure: Regenerate.
5213 * config.in: Likewise.
5214 * linux-low.c: Include <sys/personality.h>.
5215 Define ADDR_NO_RANDOMIZE if necessary.
5216 (linux_create_inferior): Disable address space randomization when
5217 forking inferior, if requested.
5218 (linux_supports_disable_randomization): New function.
5219 (linux_target_ops): Install it.
5220 * server.h (disable_randomization): Declare.
5221 * server.c (disable_randomization): New global variable.
5222 (handle_general_set): Handle QDisableRandomization.
5223 (handle_query): Likewise for qSupported.
5224 (main): Support --disable-randomization and --no-disable-randomization
5225 command line arguments.
5226 * target.h (struct target_ops): Add supports_disable_randomization.
5227 (target_supports_disable_randomization): New macro.
5228
723b724b
MF
52292011-09-29 Mike Frysinger <vapier@gentoo.org>
5230
5231 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5232 ifdef check.
5233 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5234 [!PT_GETDSBT] (target_loadmap): New definition.
5235 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5236 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5237 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5238 and PT_GETDSBT to LINUX_LOADMAP.
5239 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5240 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5241
55329a5c 52422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5243
5244 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5245 (arm_linux_hwbp_cap): New static variable.
5246 (arm_linux_get_hwbp_cap): Replace by ...
5247 (arm_linux_init_hwbp_cap): ... this new function.
5248 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5249 (arm_linux_get_hw_watchpoint_count): Likewise.
5250 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5251 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5252 (arm_prepare_to_resume): Use perror_with_name instead of error.
5253
55329a5c 52542011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5255
5256 * linux-arm-low.c: Include <signal.h>.
5257 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5258 (struct arm_linux_hwbp_cap): New data type.
5259 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5260 (struct arm_linux_hw_breakpoint): New data type.
5261 (MAX_BPTS, MAX_WPTS): Define.
5262 (struct arch_process_info, struct arch_lwp_info): New data types.
5263 (arm_linux_get_hwbp_cap): New function.
5264 (arm_linux_get_hw_breakpoint_count): Likewise.
5265 (arm_linux_get_hw_watchpoint_count): Likewise.
5266 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5267 (arm_hwbp_control_initialize): Likewise.
5268 (arm_hwbp_control_is_enabled): Likewise.
5269 (arm_hwbp_control_is_initialized): Likewise.
5270 (arm_hwbp_control_disable): Likewise.
5271 (arm_linux_hw_breakpoint_equal): Likewise.
5272 (arm_linux_hw_point_initialize): Likewise.
5273 (struct update_registers_data): New data structure.
5274 (update_registers_callback: New function.
5275 (arm_insert_point): Likewise.
5276 (arm_remove_point): Likewise.
5277 (arm_stopped_by_watchpoint): Likewise.
5278 (arm_stopped_data_address): Likewise.
5279 (arm_new_process): Likewise.
5280 (arm_new_thread): Likewise.
5281 (arm_prepare_to_resume): Likewise.
5282 (the_low_target): Register arm_insert_point, arm_remove_point,
5283 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5284 arm_new_thread, and arm_prepare_to_resume.
5285
6b9801d4
SS
52862011-09-15 Stan Shebs <stan@codesourcery.com>
5287
5288 * server.h (struct emit_ops): Add compare-goto fields.
5289 * tracepoint.c (gdb_agent_op_sizes): New table.
5290 (emit_eq_goto): New function.
5291 (emit_ne_goto): New function.
5292 (emit_lt_goto): New function.
5293 (emit_le_goto): New function.
5294 (emit_gt_goto): New function.
5295 (emit_ge_goto): New function.
5296 (is_goto_target): New function.
5297 (compile_bytecodes): Recognize special cases of compare-goto
5298 combinations and call specialized emitters for them.
5299 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5300 (amd64_emit_ne_goto): New function.
5301 (amd64_emit_lt_goto): New function.
5302 (amd64_emit_le_goto): New function.
5303 (amd64_emit_gt_goto): New function.
5304 (amd64_emit_ge_goto): New function.
5305 (amd64_emit_ops): Add the new functions.
5306 (i386_emit_eq_goto): New function.
5307 (i386_emit_ne_goto): New function.
5308 (i386_emit_lt_goto): New function.
5309 (i386_emit_le_goto): New function.
5310 (i386_emit_gt_goto): New function.
5311 (i386_emit_ge_goto): New function.
5312 (i386_emit_ops): Add the new functions.
5313
bf15cbda
SS
53142011-09-08 Stan Shebs <stan@codesourcery.com>
5315
5316 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5317 (i386_emit_epilogue): Restore %ebx.
5318
943ca1dd
JZ
53192011-08-31 Jie Zhang <jzhang918@gmail.com>
5320
5321 * server.c (step_thread): Remove definition.
5322 (process_serial_event): Don't handle Hs.
5323 * server.h (step_thread): Remove declaration.
5324 * target.c (set_desired_inferior): Remove use of step_thread.
5325
e3deef73
LM
53262011-08-24 Luis Machado <lgustavo@codesourcery.com>
5327
5328 * linux-low.c: Include linux-procfs.h.
5329 (linux_attach_lwp_1): Update comments.
5330 (linux_attach): Scan for existing threads when attaching to a
5331 process that is the tgid.
5332 * Makefile.in: Update dependencies.
5333
13da1c97
LM
53342011-08-24 Luis Machado <lgustavo@codesourcery.com>
5335
5336 * configure.srv: Add linux-procfs.o dependencies.
5337
881127c9
YQ
53382011-08-14 Yao Qi <yao@codesourcery.com>
5339
5340 * target.h (struct target_ops): Fix indent.
5341 * win32-low.c (win32_target_ops): Fix comment.
5342
58dbd541
YQ
53432011-08-14 Andrew Jenner <andrew@codesourcery.com>
5344 Yao Qi <yao@codesourcery.com>
5345
5346 * Makefile.in (clean): Remove tic6x-*.c files.
5347 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5348 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5349 (tic6x-c64xp-linux.c): Likewise.
5350 * configure.srv: Add support for tic6x-*-uclinux.
5351 * linux-tic6x-low.c: New.
5352 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5353
78d85199
YQ
53542011-08-14 Andrew Stubbs <ams@codesourcery.com>
5355 Yao Qi <yao@codesourcery.com>
5356
5357 * target.h (struct target_ops): Add read_loadmap.
5358 * linux-low.c (struct target_loadseg): New type.
5359 (struct target_loadmap): New type.
5360 (linux_read_loadmap): New function.
5361 (linux_target_ops): Add linux_read_loadmap.
5362 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5363 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5364 to NULL.
78d85199 5365
a959a88d
EZ
53662011-08-05 Eli Zaretskii <eliz@gnu.org>
5367
5368 * win32-low.c: Include <stdint.h>.
5369
1ced966e
PA
53702011-07-22 Pedro Alves <pedro@codesourcery.com>
5371
5372 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5373 to the inferior here.
5374 (i386_remove_aligned_watchpoint): Ditto.
5375 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5376 fit part of the watchpoint in the debug registers.
5377 (i386_update_inferior_debug_regs): New.
5378 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5379 registers, and only update the inferior on success.
5380 (i386_low_remove_watchpoint): Ditto.
5381
d26e3629
KY
53822011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5383
5384 * linux-low.c (compare_ints, unique, list_threads, show_process,
5385 linux_core_of_thread): Delete.
5386 (linux_target_ops): Change linux_core_of_thread to
5387 linux_common_core_of_thread.
5388 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5389 * utils.c (malloc_failure): Change type of argument.
5390 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5391 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5392 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5393 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5394 (IPA_OBJS): Add common-utils-ipa.o.
5395 (ptid_h, linux_osdata_h): New macros.
5396 (server_h): Add common/common-utils.h, common/xml-utils.h,
5397 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5398 common/ptid.h.
5399 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5400 ptid.o, buffer.o): New rules.
5401 (linux-low.o): Add common/linux-osdata.h as a dependency.
5402 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5403 * configure.ac: Add AC_HEADER_DIRENT check.
5404 * config.in: Regenerate.
5405 * configure: Regenerate.
5406 * remote-utils.c (xml_escape_text): Delete.
5407 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5408 buffer_xml_printf): Move to common/buffer.c.
5409 * server.c (main): Remove call to initialize_inferiors.
5410 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5411 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5412 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5413 internal_error, gdb_assert, gdb_assert_fail): Delete.
5414 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5415 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5416 common/buffer.h.
5417 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5418 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5419 initialize_inferiors): Delete.
5420
2275a1a7
PA
54212011-07-20 Pedro Alves <pedro@codesourcery.com>
5422
5423 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5424 symbol error.
5425
0a5b1e09
PA
54262011-05-31 Pedro Alves <pedro@codesourcery.com>
5427
5428 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5429 assertion.
5430 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5431
6938fd34
YQ
54322011-05-26 Yao Qi <yao@codesourcery.com>
5433
5434 * Makefile.in (thread-db.o): Track dependence to
5435 common/gdb_thread_db.h.
5436 * thread-db.c: include gdb_thread_db.h from right place.
5437
b481f9e0
TT
54382011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5439
5440 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5441 __FILE__ and __LINE__ to internal_error.
5442
98a5dd13
DE
54432011-05-13 Doug Evans <dje@google.com>
5444
5445 * thread-db.c (try_thread_db_load_from_sdir): New function.
5446 (try_thread_db_load_from_dir): New function.
5447 (thread_db_load_search): Handle $sdir, ignore $pdir.
5448 Remove trying of system directories if search of
5449 libthread-db-search-path fails, that is now done via $sdir.
5450
d248b706
KY
54512011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5452
5453 * server.c (handle_query): Add EnableDisableTracepoints to the list
5454 of supported features.
43aaf8b6 5455 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5456 tracepoints.
43aaf8b6
PA
5457 (cmd_qtenable_disable): New.
5458 (cmd_qtstart): Install tracepoints even if disabled.
5459 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5460 receiving a QTEnable or QTDisable packet.
5461 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5462 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5463 tracepoints.
5464 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5465
84e578fb
DE
54662011-05-10 Doug Evans <dje@google.com>
5467
5468 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5469
71f55dd8
DE
54702011-05-04 Doug Evans <dje@google.com>
5471
5472 * linux-low.c (linux_join): Skip process lookup.
5473 * spu-low.c (spu_join): Ditto.
5474 * server.c (join_inferiors_callback): Delete.
5475 (process_serial_event): For 'D' packet (detach) call join_inferior
5476 directly.
5477
4d393d60
JM
54782011-05-04 Joseph Myers <joseph@codesourcery.com>
5479
5480 * README: Don't mention xscale*-*-linux*.
5481 * configure.srv (xscale*-*-linux*): Don't handle target.
5482
b00ad6ff
NF
54832011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5484
5485 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5486 casting pointers.
5487 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5488 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5489 (i386_emit_void_call_2): Likewise.
5490
af96c192
YQ
54912011-04-26 Yao Qi <yao@codesourcery.com>
5492
43aaf8b6
PA
5493 * linux-low.c: Move common macros to linux-ptrace.h.
5494 Include linux-ptrace.h.
af96c192
YQ
5495 * Makefile.in (linux_ptrace_h): New.
5496 (linux-low.o): Depends on linux-ptrace.h.
5497
03f2bd59
JK
54982011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5499
5500 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5501 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5502 (remote_prepare): New function with most of the TCP code from ...
5503 (remote_open): ... here. Detect PORT here unconditionally. Move also
5504 setting transport_is_reliable.
5505 * server.c (run_once): New variable.
5506 (gdbserver_usage): Document it.
5507 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5508 the first run if RUN_ONCE.
5509 * server.h (run_once, remote_prepare): New declarations.
5510
7a9dd1b2
TT
55112011-04-19 Tom Tromey <tromey@redhat.com>
5512
5513 * win32-low.c (handle_load_dll): Remove duplicate "the".
5514
81239425
PM
55152011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5516
5517 Remove support for old Cygwin 1.5 versions.
5518 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5519 function to avoid warning.
5520 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5521 warning.
5522
9e0627f1
PM
55232011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5524
5525 * gdbserver/server.h (Macro _): Define it if not available.
5526
588eebee
MS
55272011-03-14 Michael Snyder <msnyder@vmware.com>
5528
348af9f7 5529 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5530
43f70d4c
JB
55312011-03-10 Joel Brobecker <brobecker@adacore.com>
5532
5533 * Makefile.in (maintainer-clean realclean distclean): Remove
5534 "make ... subdir_do" command.
5535
348af9f7
MS
55362011-03-10 Michael Snyder <msnyder@vmware.com>
5537
5538 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5539
5540 * server.c (handle_v_run): Free alloced buffer on early return.
5541
e637a4f5
YQ
55422011-03-09 Yao Qi <yao@codesourcery.com>
5543
5544 Revert:
5545 2011-03-04 Yao Qi <yao@codesourcery.com>
5546
5547 * Makefile.in: Remove GNU make feature --directory.
5548
5549 2011-03-05 Yao Qi <yao@codesourcery.com>
5550
5551 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5552 (subdir_do): New make target. Copied from gdb/Makefile.
5553 (maintainer-clean, realclean, distclean, clean): Call corresponding
5554 make targets in common/Makefile.
5555
5556 2011-02-11 Yao Qi <yao@codesourcery.com>
5557
5558 * configure.ac: Call AC_PROG_RANLIB.
5559 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5560 * configure: Regenerate.
5561
e6edda56
JK
55622011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5563
5564 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5565
e5141119
JB
55662011-03-06 Yao Qi <yao@codesourcery.com>
5567
5568 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5569
64794aa4
JB
55702011-03-05 Yao Qi <yao@codesourcery.com>
5571
5572 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5573 (subdir_do): New make target. Copied from gdb/Makefile.
5574 (maintainer-clean, realclean, distclean, clean): Call corresponding
5575 make targets in common/Makefile.
5576
7a762829
YQ
55772011-03-04 Yao Qi <yao@codesourcery.com>
5578
5579 * Makefile.in: Remove GNU make feature --directory.
5580
348af9f7
MS
55812011-03-04 Michael Snyder <msnyder@vmware.com>
5582
5583 * server.c (queue_stop_reply): Call xmalloc not malloc.
5584
55852011-03-02 Michael Snyder <msnyder@vmware.com>
5586
5587 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5588
9f72fee2
MS
55892011-02-28 Michael Snyder <msnyder@vmware.com>
5590
588eebee
MS
5591 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5592 (cmd_qtframe): Ditto.
5593 (cmd_qtbuffer): Ditto.
5594 (cmd_bigqtbuffer): Ditto.
5595
9f72fee2
MS
5596 * utils.c (decimal2str): Initialize 'width' to nine, then
5597 don't mess with it.
5598
8040bd49
UW
55992011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5600
5601 * hostio.c (require_data): Free *data, not data.
5602
7e52cbd0
JK
56032011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5604
5605 * hostio.c (require_data): Use free, not xfree.
5606
9130f83e
MS
56072011-02-27 Michael Snyder <msnyder@vmware.com>
5608
4b812f4e
MS
5609 * server.c (handle_query): Discard unused value.
5610
9130f83e
MS
5611 * hostio.c (require_data): Free malloc memory before returning
5612 error.
5613
69d37113
MS
56142011-02-26 Michael Snyder <msnyder@vmware.com>
5615
5616 * linux-low.c (list_threads): Call closedir for dirent.
5617
35f5825a
MS
56182011-02-27 Michael Snyder <msnyder@vmware.com>
5619
2a589cef
MS
5620 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5621 a case statement falls through.
5622
0adea5f7
MS
5623 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5624
35f5825a
MS
5625 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5626 in comparison.
5627
238f1c74
MS
56282011-02-26 Michael Snyder <msnyder@vmware.com>
5629
5630 * utils.c (decimal2str): Eliminate dead code and dead param.
5631 (pulongest): Drop dead param from call to decimal2str.
5632 (plongest): Ditto.
5633
633ff500
JB
56342011-02-24 Joel Brobecker <brobecker@adacore.com>
5635
5636 Revert the following patch (not approved yet):
5637 2011-02-21 Hui Zhu <teawater@gmail.com>
5638 * tracepoint.c (tp_printf): New function.
5639 (eval_agent_expr): Handle gdb_agent_op_printf.
5640
f9c6ff72
HZ
56412011-02-21 Hui Zhu <teawater@gmail.com>
5642
5643 * tracepoint.c (tp_printf): New function.
5644 (eval_agent_expr): Handle gdb_agent_op_printf.
5645
94d5e490
TT
56462011-02-18 Tom Tromey <tromey@redhat.com>
5647
5648 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5649 (tracepoint.o): Likewise.
5650 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5651 (gdb_agent_op_names): Likewise.
5652
c7f96d2b
TT
56532011-02-18 Tom Tromey <tromey@redhat.com>
5654
5655 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5656 gdb_agent_op_rot>: New constants.
5657 (gdb_agent_op_names): Add pick and roll.
5658 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5659 cases.
5660
0feedb2c
JK
56612011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5662
5663 * aclocal.m4: Regenerated with aclocal-1.11.1.
5664
b3b9301e
PA
56652011-02-14 Pedro Alves <pedro@codesourcery.com>
5666
5667 * server.c (handle_qxfer_traceframe_info): New.
5668 (qxfer_packets): Register "traceframe-info".
5669 (handle_query): Report support for qXfer:traceframe-info:read+.
5670 * tracepoint.c (match_blocktype): New.
5671 (traceframe_find_block_type): Rename to ...
5672 (traceframe_walk_blocks): ... this. Add callback filter argument,
5673 and use it.
5674 (traceframe_find_block_type): New, reimplemented on top of
5675 traceframe_walk_blocks.
5676 (build_traceframe_info_xml): New.
5677 (traceframe_read_info): New.
5678 * server.h (traceframe_read_info): Declare.
5679
4f3e6fb7
YQ
56802011-02-11 Yao Qi <yao@codesourcery.com>
5681
5682 * configure.ac: Call AC_PROG_RANLIB.
5683 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5684 * configure: Regenerate.
5685
764880b7
PA
56862011-02-07 Pedro Alves <pedro@codesourcery.com>
5687
5688 * server.c (gdb_read_memory): Change return semantics to allow
5689 partial transfers.
5690 (handle_search_memory_1): Adjust.
5691 (process_serial_event) <'m' packet>: Handle partial transfers.
5692 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5693
1c79eb8a
PA
56942011-01-28 Pedro Alves <pedro@codesourcery.com>
5695
5696 * regcache.c (init_register_cache): Initialize
5697 regcache->register_status.
5698 (free_register_cache): Release regcache->register_status.
5699 (regcache_cpy): Copy register_status.
5700 (registers_to_string): Print 'x's for unavailable registers.
5701 (supply_register): Mark the register's status valid or
5702 unavailable, depending on whether a buffer was passed in or not.
5703 (supply_register_zeroed): New.
5704 (supply_regblock): Mark the registers' status valid or
5705 unavailable, depending on whether a buffer was passed in or not.
5706 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5707 (struct regcache): New `register_status' field.
5708 (supply_register_zeroed): Declare.
5709 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5710 supply_register_zeroed, rather than passing a NULL buffer to
5711 supply_register.
5712 * tracepoint.c (fetch_traceframe_registers): Update comment.
5713
85724a0e
PA
57142011-01-28 Pedro Alves <pedro@codesourcery.com>
5715
5716 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5717 buffer explicit.
5718
d08aafef
PA
57192011-01-25 Pedro Alves <pedro@codesourcery.com>
5720
5721 * server.h (decode_xfer_write): Change prototype.
5722 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5723 and don't extract the annex here.
5724 * server.c (decode_xfer_read): Remove `annex' parameter,
5725 and don't extract the annex here.
5726 (decode_xfer): New.
5727 (struct qxfer): New.
5728 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5729 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5730 (handle_qxfer_statictrace): New functions, abstracted out from
5731 handle_query, and made to use the struct qxfer interface.
5732 (handle_threads_qxfer_proper): Rename to ...
5733 (handle_qxfer_threads_proper): ... this.
5734 (handle_threads_qxfer): Rename to ...
5735 (handle_qxfer_threads): ... this. Adjust.
5736 (qxfer_packets): New array.
5737 (handle_qxfer): New function.
5738 (handle_query): Use handle_qxfer.
5739
493e2a69
MS
57402011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5741
5742 * gdbreplay.c: Shorten lines of >= 80 columns.
5743 * linux-low.c: Ditto.
5744 * linux-ppc-low.c: Ditto.
5745 * linux-s390-low.c: Ditto.
5746 * linux-sparc-low.c: Ditto.
5747 * linux-x86-low.c: Ditto.
5748 * linux-xtensa-low.c: Ditto.
5749 * mem-break.c: Ditto.
5750 * nto-low.c: Ditto.
5751 * regcache.h: Ditto.
5752 * remote-utils.c: Ditto.
5753 * server.c: Ditto.
5754 * server.h: Ditto.
5755 * thread-db.c: Ditto.
5756 * tracepoint.c: Ditto.
5757 * utils.c: Ditto.
5758 * win32-low.h: Ditto.
5759
44944448
JB
57602011-01-05 Joel Brobecker <brobecker@adacore.com>
5761
5762 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5763 update.
5764
71ce852c
JB
57652011-01-01 Joel Brobecker <brobecker@adacore.com>
5766
5767 * server.c (gdbserver_version): Update copyright year in version
5768 output.
5769 * gdbreplay.c (gdbreplay_version): Ditto.
5770
eb826dc6
MF
57712010-12-29 Jie Zhang <jie.zhang@analog.com>
5772
5773 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5774 * linux-bfin-low.c: New file.
5775 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5776 PT_DATA_ADDR for BFIN targets.
5777 * Makefile.in (SFILES): Add linux-bfin-low.c.
5778 (clean): Remove reg-bfin.c.
5779 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5780 * README: Mention supported Blackfin targets.
5781
39ab222a
MF
57822010-12-23 Mike Frysinger <vapier@gentoo.org>
5783
5784 * .gitignore: New file.
5785
a1f2ce7d
MF
57862010-11-16 Mike Frysinger <vapier@gentoo.org>
5787
5788 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5789
f474844c
JZ
57902010-10-22 Jie Zhang <jie@codesourcery.com>
5791
5792 * Makefile.in: Add FLAGS_TO_PASS variable.
5793 (install): Remove dependency of install-only and recursively
5794 invoke make for install-only.
5795
f1048712
DE
57962010-10-04 Doug Evans <dje@google.com>
5797
5798 * Makefile.in (uninstall): Use $(DESTDIR).
5799
b53a1623
PA
58002010-09-24 Pedro Alves <pedro@codesourcery.com>
5801
e6ee044d
PA
5802 PR gdb/11842
5803
b53a1623
PA
5804 * linux-x86-low.c (compat_siginfo_from_siginfo)
5805 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5806 si_code is < 0. Check for si_code == SI_TIMER before checking for
5807 si_code < 0.
5808
fa1bd1e4
JB
58092010-09-13 Joel Brobecker <brobecker@adacore.com>
5810
5811 * lynx-i386-low.c: New file.
5812 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5813
47fac8f8
JB
58142010-09-13 Joel Brobecker <brobecker@adacore.com>
5815
5816 * lynx-low.c (ptrace_request_to_str): Remove handling for
5817 request values that have been removed in LynxOS 5.x.
5818
1adfc54d
JB
58192010-09-13 Joel Brobecker <brobecker@adacore.com>
5820
5821 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5822 <ptrace.h>
5823
c2a66c29
NS
58242010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5825
5826 * configure.ac: Add --enable-inprocess-agent option.
5827 * configure: Rebuilt.
5828
32fcada3
YQ
58292010-09-06 Yao Qi <yao@codesourcery.com>
5830
5831 * linux-low.c (linux_kill): Remove unused variable.
5832 (linux_stabilize_threads): Likewise.
5833 * server.c (start_inferior): Likewise.
5834 (queue_stop_reply_callback): Likewise.
5835 * tracepoint.c (do_action_at_tracepoint): Likewise.
5836
0cccb683
YQ
58372010-09-06 Yao Qi <yao@codesourcery.com>
5838
5839 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5840 on return.
5841
423ec54c
JK
58422010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5843
5844 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5845
12ac6819
PA
58462010-09-06 Pedro Alves <pedro@codesourcery.com>
5847
5848 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5849 "$(IPA_DEPFILES)".
5850
8ed54b31
JB
58512010-09-01 Joel Brobecker <brobecker@adacore.com>
5852
5853 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5854 gdbserver/lynx-ppc-low.c: New files.
5855 * Makefile.in (lynx_low_h): New variable.
5856 (lynx-low.o, lynx-ppc-low.o): New rules.
5857 * configure.ac: On LynxOS, link with -lnetinet.
5858 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5859 * configure: regenerate.
5860
bb0116a4
JB
58612010-09-01 Joel Brobecker <brobecker@adacore.com>
5862
5863 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5864 * configure.ac: Add check for vasprintf and vsnprintf.
5865 * configure, config.in: Regenerate.
5866 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5867
a778ab81 58682010-09-01 Joel Brobecker <brobecker@adacore.com>
5869
5870 * gdbreplay.c: Move include of alloca.h up, next to include of
5871 malloc.h.
5872 * server.h: Add include of malloc.h.
5873 * mem-break.c: Remove include of malloc.h.
5874 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5875
8b034a19 58762010-09-01 Joel Brobecker <brobecker@adacore.com>
5877
5878 * Makefile.in (memmem.o): Build with -Wno-error.
5879
58802010-09-01 Joel Brobecker <brobecker@adacore.com>
5881
5882 * utils.c (xsnprintf): Make non-static.
5883 * server.h: Add xsnprintf declaration.
5884 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5885 replace calls to snprintf by calls to xsnprintf throughout.
5886
58872010-09-01 Joel Brobecker <brobecker@adacore.com>
5888
5889 * configure.ac: Add configure check for alloca.
5890 * configure, config.in: Regenerate.
5891 * server.h: Include alloca.h if it exists.
5892 * gdbreplay.c: Include alloca.h if it exists.
5893
1a981360
PA
58942010-08-28 Pedro Alves <pedro@codesourcery.com>
5895
5896 * linux-low.c (__SIGRTMIN): Define if not already defined.
5897 (linux_create_inferior): Check for __ANDROID__ rather than
5898 __SIGRTMIN.
5899 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5900 are already deferred.
5901 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5902 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5903 stopped and already has a pending signal to report.
5904 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5905 a pending signal to report or is moving out of a jump pad.
5906 (linux_init_signals): Check for __ANDROID__ rather than
5907 __SIGRTMIN.
5908
b4d51a55
PA
59092010-08-28 Pedro Alves <pedro@codesourcery.com>
5910
5911 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5912 debug_threads check. Avoid a linear search when not doing debug
5913 output.
5914
ec48365d
PA
59152010-08-27 Pedro Alves <pedro@codesourcery.com>
5916
5917 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5918 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5919 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5920 (process_event): Change local fd's type to gdb_fildes_t.
5921 (create_file_handler): Adjust prototype.
5922 (delete_file_handler): Adjust prototype.
5923 (handle_file_event): Adjust prototype. Use pfildes.
5924 (create_file_event): Adjsut prototype.
5925 * remote-utils.c (remote_desc, listen_desc): Change type to
5926 gdb_fildes_t.
5927 * server.h: New gdb_fildes_t typedef.
5928 [USE_WIN32API]: Include winsock2.h.
5929 (delete_file_handler, add_file_handler): Adjust prototypes.
5930 (pfildes): Declare.
5931 * utils.c (pfildes): New.
5932
854d88f0
PA
59332010-08-27 Pedro Alves <pedro@codesourcery.com>
5934
5935 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5936 * configure: Regenerate.
5937
0146f85b
PA
59382010-08-27 Pedro Alves <pedro@codesourcery.com>
5939
5940 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5941 (linux_done_accessing_memory): ... this.
5942 (linux_target_ops): Adjust.
5943 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5944 * nto-low.c (nto_target_ops): Adjust comment.
5945 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5946 * spu-low.c (spu_target_ops): Adjust comment.
5947 * target.h (target_ops): Rename unprepare_to_access_memory field
5948 to done_accessing_memory.
5949 (unprepare_to_access_memory): Rename to ...
5950 (done_accessing_memory): ... this.
5951
90d74c30
PA
59522010-08-26 Pedro Alves <pedro@codesourcery.com>
5953
5954 * linux-low.c (linux_prepare_to_access_memory): New.
5955 (linux_unprepare_to_access_memory): New.
5956 (linux_target_ops): Install them.
5957 * server.c (read_memory): Rename to ...
5958 (gdb_read_memory): ... this. Use
5959 prepare_to_access_memory/prepare_to_access_memory.
5960 (write_memory): Rename to ...
5961 (gdb_write_memory): ... this. Use
5962 prepare_to_access_memory/prepare_to_access_memory.
5963 (handle_search_memory_1): Adjust.
5964 (process_serial_event): Adjust.
5965 * target.h (struct target_ops): New fields
5966 prepare_to_access_memory and unprepare_to_access_memory.
5967 (prepare_to_access_memory, unprepare_to_access_memory): New.
5968 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5969 prepare_to_access_memory/prepare_to_access_memory.
5970 * nto-low.c (nto_target_ops): Adjust.
5971 * spu-low.c (spu_target_ops): Adjust.
5972 * win32-low.c (win32_target_ops): Adjust.
5973
fd467969
PA
59742010-08-26 Pedro Alves <pedro@codesourcery.com>
5975
5976 * Makefile.in (WARN_CFLAGS): Get it from configure.
5977 (WERROR_CFLAGS): New.
5978 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5979 * configure.ac: Introduce --enable-werror, which adds -Werror to
5980 the compiler command line. Enabled by default. Disable with
5981 --disable-werror. Add -Wdeclaration-after-statement
5982 Wpointer-arith and -Wformat-nonliteral to warning flags.
5983 * configure: Regenerate.
5984
331e2f5f
PA
59852010-08-26 Pedro Alves <pedro@codesourcery.com>
5986
5987 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5988
e581f2b4
PA
59892010-08-26 Pedro Alves <pedro@codesourcery.com>
5990
5991 * gdbreplay.c (remote_error): New.
5992 (gdbchar): New.
5993 (expect): Use gdbchar. Check for error reading from GDB.
5994 Clarify sync error output.
5995 (play): Check for errors writing to GDB.
5996 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5997 * remote-utils.c (getpkt): Check for errors writing to the remote
5998 descriptor.
5999
3c11dd79
PA
60002010-08-25 Pedro Alves <pedro@codesourcery.com>
6001
6002 * linux-low.c (linux_wait_1): Move non-debugging code out of
6003 `debug_threads' control.
6004
d20a8ad9
PA
60052010-08-25 Pedro Alves <pedro@codesourcery.com>
6006
6007 * linux-low.c (linux_wait_1): Don't set last_status here.
6008 * server.c (push_event, queue_stop_reply_callback): Assert we're
6009 not pushing a TARGET_WAITKIND_IGNORE event.
6010 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6011 (myresume, handle_target_event): Set the thread's last_resume_kind
6012 and last_status from the target returned status.
6013
964e4306
PA
60142010-08-25 Pedro Alves <pedro@codesourcery.com>
6015
6016 PR threads/10729
6017
6018 * linux-x86-low.c (update_debug_registers_callback): New.
6019 (i386_dr_low_set_addr): Use it.
6020 (i386_dr_low_get_addr): New.
6021 (i386_dr_low_set_control): Use update_debug_registers_callback.
6022 (i386_dr_low_get_control): New.
6023 (i386_dr_low_get_status): Adjust.
6024 * linux-low.c (linux_stop_lwp): New.
6025 * linux-low.h (linux_stop_lwp): Declare.
6026
6027 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6028 argument instead of a i386_debug_reg_state.
6029 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6030 a i386_debug_reg_state.
6031 (i386_insert_aligned_watchpoint): Adjust.
6032 (i386_remove_aligned_watchpoint): Adjust.
6033 (i386_low_stopped_data_address): Read the debug registers from the
6034 inferior instead of from the mirrors.
6035 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6036 (i386_dr_low_get_addr): Declare.
6037 (i386_dr_low_get_control): Declare.
6038 (i386_dr_low_get_status): Change prototype.
6039
6040 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6041 (i386_dr_low_get_addr): New.
6042 (i386_dr_low_get_control): New.
6043 (i386_dr_low_get_status): Adjust prototype. Return
6044 dr_status_mirror.
6045 (i386_initial_stuff): Clear dr_status_mirror and
6046 dr_control_mirror.
6047 (i386_get_thread_context): Adjust.
6048 (i386_set_thread_context): Adjust.
6049 (i386_thread_added): Adjust.
6050
5f21a75b
PA
60512010-08-24 Pedro Alves <pedro@codesourcery.com>
6052
6053 * linux-low.h (linux_thread_area): Delete declaration.
6054
3e4c1235
TS
60552010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6056
6057 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6058 after its termination.
6059
1971b033
PA
60602010-08-09 Pedro Alves <pedro@codesourcery.com>
6061
6062 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6063 (gdb_wants_all_stopped): Delete.
6064 (linux_wait_1): Don't call them.
6065 * server.c (handle_v_cont): Tag all threads as want-stopped.
6066 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6067 stopped as "client-wants-stopped".
6068
310444ac
PA
60692010-07-31 Pedro Alves <pedro@codesourcery.com>
6070
6071 * Makefile.in (signals_h): New.
6072 (server_h): Depend on it.
6073 (server.o): Don't depend on $(signals_def).
6074 (signals.o): Depend on $(signals_def).
6075
a19cae16
JK
60762010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6077
6078 * Makefile.in (signals_def): New.
6079 (server_h): Append include/gdb/signals.h and signals_def.
6080 (server.o): Append signals_def.
6081
30d50328
JK
60822010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6083
6084 * server.c (handle_target_event): Use target_signal_to_host for
6085 resume_info.sig initialization.
6086 * target.h (struct thread_resume) <sig>: New comment.
6087
5c3216e2
OS
60882010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6089
c6f46ca0
OS
6090 * server.c (handle_query): strcpy() the returned string from paddress()
6091 instead of sprintf().
5c3216e2
OS
6092 * utils.c (paddress): Return phex_nz().
6093
6bd31874
JB
60942010-07-07 Joel Brobecker <brobecker@adacore.com>
6095
6096 * server.c (handle_v_cont): Call mourn_inferior if process
6097 just exited.
6098 (myresume): Likewise.
6099
0fb4aa4b
PA
61002010-07-01 Pedro Alves <pedro@codesourcery.com>
6101
6102 Static tracepoints, and integration with UST.
6103
6104 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6105 * mem-break.c (uninsert_all_breakpoints)
6106 (reinsert_all_breakpoints): New.
6107 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6108 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6109 (gdb_agent_ust_loaded, helper_thread_id)
6110 (gdb_agent_helper_thread_id): New macros.
6111 (struct ipa_sym_addresses): Add addr_ust_loaded,
6112 addr_helper_thread_id, addr_cmd_buf.
6113 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6114 (in_process_agent_loaded_ust): New.
6115 (write_e_ust_not_loaded): New.
6116 (maybe_write_ipa_ust_not_loaded): New.
6117 (struct collect_static_trace_data_action): New.
6118 (enum tracepoint_type) <static_tracepoint>: New.
6119 (struct tracepoint) <handle>: Mention static tracepoints.
6120 (struct static_tracepoint_ctx): New.
6121 (CMD_BUF_SIZE): New.
6122 (add_tracepoint_action): Handle static tracepoint actions.
6123 (unprobe_marker_at): New.
6124 (clear_installed_tracepoints): Handle static tracepoints.
6125 (cmd_qtdp): Handle static tracepoints.
6126 (probe_marker_at): New.
6127 (cmd_qtstart): Handle static tracepoints.
6128 (response_tracepoint): Handle static tracepoints.
6129 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6130 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6131 (get_context_regcache): Handle static tracepoints.
6132 (do_action_at_tracepoint): Handle static tracepoint actions.
6133 (traceframe_find_block_type): Handle static trace data blocks.
6134 (traceframe_read_sdata): New.
6135 (download_tracepoints): Download static tracepoint actions.
6136 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6137 (GDB_PROBE_NAME): New.
6138 (ust_ops): New.
6139 (GET_UST_SYM): New.
6140 (USTF): New.
6141 (dlsym_ust): New.
6142 (ust_marker_to_static_tracepoint): New.
6143 (gdb_probe): New.
6144 (collect_ust_data_at_tracepoint): New.
6145 (gdb_ust_probe): New.
6146 (UNIX_PATH_MAX, SOCK_DIR): New.
6147 (gdb_ust_connect_sync_socket): New.
6148 (resume_thread, stop_thread): New.
6149 (run_inferior_command): New.
6150 (init_named_socket): New.
6151 (gdb_ust_socket_init): New.
6152 (cstr_to_hexstr): New.
6153 (next_st): New.
6154 (first_marker, next_marker): New.
6155 (response_ust_marker): New.
6156 (cmd_qtfstm, cmd_qtsstm): New.
6157 (unprobe_marker_at, probe_marker_at): New.
6158 (cmd_qtstmat, gdb_ust_thread): New.
6159 (gdb_ust_init): New.
6160 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6161 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6162 (ST_REGENTRY): New.
6163 (x86_64_st_collect_regmap): New.
6164 (X86_64_NUM_ST_COLLECT_GREGS): New.
6165 (AMD64_RIP_REGNUM): New.
6166 (supply_static_tracepoint_registers): New.
6167 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6168 (ST_REGENTRY): New.
6169 (i386_st_collect_regmap): New.
6170 (i386_NUM_ST_COLLECT_GREGS): New.
6171 (supply_static_tracepoint_registers): New.
6172 * server.c (handle_query): Handle qXfer:statictrace:read.
6173 <qSupported>: Report support for StaticTracepoints, and
6174 qXfer:statictrace:read features.
6175 * server.h (traceframe_read_sdata)
6176 (supply_static_tracepoint_registers): Declare.
6177 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6178 (unpack_varlen_hex): Include in IPA build.
6179 * Makefile.in (ustlibs, ustinc): New.
6180 (IPA_OBJS): Add remote-utils-ipa.o.
6181 ($(IPA_LIB)): Link -ldl and -lpthread.
6182 (UST_CFLAGS): New.
6183 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6184 * config.in, configure: Regenerate.
6185
9e4344e5
PA
61862010-06-20 Ian Lance Taylor <iant@google.com>
6187 Pedro Alves <pedro@codesourcery.com>
6188
6189 * linux-x86-low.c (always_true): Delete.
6190 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6191 trying to fool the compiler with always_true.
6192
c6beb2cb
PA
61932010-06-20 Pedro Alves <pedro@codesourcery.com>
6194
6195 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6196 conditions in gdbserver.
6197
d2ed6730
UW
61982010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6199
6200 * spu-low.c (spu_read_memory): Wrap around local store limit.
6201 (spu_write_memory): Likewise.
6202
4e29fb54
PA
62032010-06-15 Pedro Alves <pedro@codesourcery.com>
6204
6205 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6206 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6207 LONGEST uses.
6208 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6209 uses.
6210 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6211 uses with LONGEST uses.
6212
6a271cae
PA
62132010-06-14 Stan Shebs <stan@codesourcery.com>
6214 Pedro Alves <pedro@codesourcery.com>
6215
6216 Bytecode compiler.
6217
6218 * linux-x86-low.c: Include limits.h.
6219 (add_insns): New.
6220 (always_true): New.
6221 (EMIT_ASM): New.
6222 (EMIT_ASM32): New.
6223 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6224 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6225 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6226 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6227 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6228 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6229 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6230 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6231 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6232 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6233 (amd64_emit_void_call_2): New.
6234 (amd64_emit_ops): New.
6235 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6236 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6237 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6238 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6239 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6240 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6241 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6242 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6243 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6244 (i386_emit_stack_adjust, i386_emit_int_call_1)
6245 (i386_emit_void_call_2): New.
6246 (i386_emit_ops): New.
6247 (x86_emit_ops): New.
6248 (the_low_target): Install x86_emit_ops.
6249 * server.h (struct emit_ops): New.
6250 (get_raw_reg_func_addr): Declare.
6251 (current_insn_ptr, emit_error): Declare.
6252 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6253 (set_trace_state_variable_value): New defines.
6254 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6255 addr_get_trace_state_variable_value and
6256 addr_set_trace_state_variable_value.
6257 (symbol_list): New fields for get_raw_reg,
6258 get_trace_state_variable_value and set_trace_state_variable_value.
6259 (condfn): New typedef.
6260 (struct tracepoint): New field `compiled_cond'.
6261 (do_action_at_tracepoint): Clear compiled_cond.
6262 (get_trace_state_variable_value, set_trace_state_variable_value):
6263 Export in the IPA.
6264 (condition_true_at_tracepoint): If there's a compiled condition,
6265 run that.
6266 (current_insn_ptr, emit_error): New globals.
6267 (struct bytecode_address): New.
6268 (get_raw_reg_func_addr): New.
6269 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6270 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6271 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6272 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6273 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6274 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6275 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6276 (compile_tracepoint_condition, compile_bytecodes): New.
6277 * target.h (emit_ops): Forward declare.
6278 (struct target_ops): New field emit_ops.
6279 (target_emit_ops): New.
6280 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6281 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6282 * linux-low.c (linux_emit_ops): New.
6283 (linux_target_ops): Install it.
6284 * linux-low.h (struct linux_target_ops): New field emit_ops.
6285
92b72907
UW
62862010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6287
6288 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6289 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6290
fa593d66
PA
62912010-06-01 Pedro Alves <pedro@codesourcery.com>
6292 Stan Shebs <stan@codesourcery.com>
6293
6294 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6295 (all): Depend on $(extra_libraries).
6296 (install-only): Install the IPA.
6297 (IPA_OBJS, IPA_LIB): New.
6298 (clean): Remove the IPA lib.
6299 (IPAGENT_CFLAGS): New.
6300 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6301 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6302 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6303 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6304 * configure.ac: Check for atomic builtins support in the compiler.
6305 (IPA_DEPFILES, extra_libraries): Define.
6306 * configure.srv (ipa_obj): Add description.
6307 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6308 (i[34567]86-*-linux*): Set ipa_obj.
6309 (x86_64-*-linux*): Set ipa_obj.
6310 * linux-low.c (stabilizing_threads): New.
6311 (supports_fast_tracepoints): New.
6312 (linux_detach): Stabilize threads before detaching.
6313 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6314 the lwp is either not stabilizing, or is moving out of a jump pad.
6315 (linux_fast_tracepoint_collecting): New.
6316 (maybe_move_out_of_jump_pad): New.
6317 (enqueue_one_deferred_signal): New.
6318 (dequeue_one_deferred_signal): New.
6319 (linux_wait_for_event_1): If moving out of a jump pad, defer
6320 pending signals to later.
6321 (linux_stabilize_threads): New.
6322 (linux_wait_1): Check if threads need moving out of jump pads, and
6323 do it if so.
6324 (stuck_in_jump_pad_callback): New.
6325 (move_out_of_jump_pad_callback): New.
6326 (lwp_running): New.
6327 (linux_resume_one_lwp): Handle moving out of jump pads.
6328 (linux_set_resume_request): Dequeue deferred signals.
6329 (need_step_over_p): Also step over fast tracepoint jumps.
6330 (start_step_over): Also uninsert fast tracepoint jumps.
6331 (finish_step_over): Also reinsert fast tracepoint jumps.
6332 (linux_install_fast_tracepoint_jump): New.
6333 (linux_target_ops): Install linux_stabilize_threads and
6334 linux_install_fast_tracepoint_jump_pad.
6335 * linux-low.h (linux_target_ops) <get_thread_area,
6336 install_fast_tracepoint_jump_pad>: New fields.
6337 (struct lwp_info) <collecting_fast_tracepoint,
6338 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6339 (linux_get_thread_area): Declare.
6340 * linux-x86-low.c (jump_insn): New.
6341 (x86_get_thread_area): New.
6342 (append_insns): New.
6343 (push_opcode): New.
6344 (amd64_install_fast_tracepoint_jump_pad): New.
6345 (i386_install_fast_tracepoint_jump_pad): New.
6346 (x86_install_fast_tracepoint_jump_pad): New.
6347 (the_low_target): Install x86_get_thread_area and
6348 x86_install_fast_tracepoint_jump_pad.
6349 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6350 (struct fast_tracepoint_jump): New.
6351 (fast_tracepoint_jump_insn): New.
6352 (fast_tracepoint_jump_shadow): New.
6353 (find_fast_tracepoint_jump_at): New.
6354 (fast_tracepoint_jump_here): New.
6355 (delete_fast_tracepoint_jump): New.
6356 (set_fast_tracepoint_jump): New.
6357 (uninsert_fast_tracepoint_jumps_at): New.
6358 (reinsert_fast_tracepoint_jumps_at): New.
6359 (set_breakpoint_at): Use write_inferior_memory.
6360 (uninsert_raw_breakpoint): Use write_inferior_memory.
6361 (check_mem_read): Mask out fast tracepoint jumps.
6362 (check_mem_write): Mask out fast tracepoint jumps.
6363 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6364 (set_fast_tracepoint_jump): Declare.
6365 (delete_fast_tracepoint_jump)
6366 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6367 (reinsert_fast_tracepoint_jumps_at): Declare.
6368 * regcache.c: Don't compile many functions when building the
6369 in-process agent library.
6370 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6371 the register buffer in the heap.
6372 (free_register_cache): If the register buffer isn't owned by the
6373 regcache, don't free it.
6374 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6375 pre-existing register caches.
6376 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6377 type.
6378 (convert_ascii_to_int): : Constify `from' parameter type.
6379 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6380 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6381 the needed buffer in-place.
6382 (relocate_instruction): New.
6383 * server.c (handle_query) <qSymbols>: If the target supports
6384 tracepoints, give it a chance of looking up symbols. Report
6385 support for fast tracepoints.
6386 (handle_status): Stabilize threads.
6387 (process_serial_event): Adjust.
6388 * server.h (struct fast_tracepoint_jump): Forward declare.
6389 (struct process_info) <fast_tracepoint_jumps>: New field.
6390 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6391 (decode_X_packet, decode_M_packet): Adjust.
6392 (relocate_instruction): Declare.
6393 (in_process_agent_loaded): Declare.
6394 (tracepoint_look_up_symbols): Declare.
6395 (struct fast_tpoint_collect_status): Declare.
6396 (fast_tracepoint_collecting): Declare.
6397 (force_unlock_trace_buffer): Declare.
6398 (handle_tracepoint_bkpts): Declare.
6399 (initialize_low_tracepoint)
6400 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6401 * target.h (struct target_ops) <stabilize_threads,
6402 install_fast_tracepoint_jump_pad>: New fields.
6403 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6404 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6405 [HAVE_STDINT_H]: Include stdint.h.
6406 (trace_debug_1): Rename to ...
6407 (trace_vdebug): ... this.
6408 (trace_debug): Rename to ...
6409 (trace_debug_1): ... this. Add `level' parameter.
6410 (trace_debug): New.
6411 (ATTR_USED, ATTR_NOINLINE): New.
6412 (IP_AGENT_EXPORT): New.
6413 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6414 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6415 (about_to_request_buffer_space, trace_buffer_is_full)
6416 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6417 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6418 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6419 (traceframe_write_count, traceframes_created)
6420 (trace_state_variables)
6421 New renaming defines.
6422 (struct ipa_sym_addresses): New.
6423 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6424 (symbol_list): New.
6425 (ipa_sym_addrs): New.
6426 (all_tracepoint_symbols_looked_up): New.
6427 (in_process_agent_loaded): New.
6428 (write_e_ipa_not_loaded): New.
6429 (maybe_write_ipa_not_loaded): New.
6430 (tracepoint_look_up_symbols): New.
6431 (debug_threads) [IN_PROCESS_AGENT]: New.
6432 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6433 (UNKNOWN_SIDE_EFFECTS): New.
6434 (stop_tracing): New.
6435 (flush_trace_buffer): New.
6436 (stop_tracing_bkpt): New.
6437 (flush_trace_buffer_bkpt): New.
6438 (read_inferior_integer): New.
6439 (read_inferior_uinteger): New.
6440 (read_inferior_data_pointer): New.
6441 (write_inferior_data_pointer): New.
6442 (write_inferior_integer): New.
6443 (write_inferior_uinteger): New.
6444 (struct collect_static_trace_data_action): Delete.
6445 (enum tracepoint_type): New.
6446 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6447 <actions_str, step_actions, step_actions_str>: Only include in
6448 GDBserver.
fa593d66
PA
6449 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6450 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6451 (tracepoints): Use IP_AGENT_EXPORT.
6452 (last_tracepoint): Don't include in the IPA.
6453 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6454 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6455 (alloced_trace_state_variables): New.
6456 (trace_state_variables): Use IP_AGENT_EXPORT.
6457 (traceframe_t): Delete unused variable.
6458 (circular_trace_buffer): Don't include in the IPA.
6459 (trace_buffer_start): Delete.
6460 (struct trace_buffer_control): New.
6461 (trace_buffer_free): Delete.
6462 (struct ipa_trace_buffer_control): New.
6463 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6464 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6465 New.
6466 (trace_buffer_ctrl): New.
6467 (TRACE_BUFFER_CTRL_CURR): New.
6468 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6469 Reimplement as macros.
6470 (trace_buffer_wrap): Delete.
6471 (traceframe_write_count, traceframe_read_count)
6472 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6473 (struct tracepoint_hit_ctx) <type>: New field.
6474 (struct fast_tracepoint_ctx): New.
6475 (memory_barrier): New.
6476 (cmpxchg): New.
6477 (record_tracepoint_error): Update atomically in the IPA.
6478 (clear_inferior_trace_buffer): New.
6479 (about_to_request_buffer_space): New.
6480 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6481 updating the same buffer.
6482 (add_tracepoint): Default the tracepoint's type to trap
6483 tracepoint, and orig_size to -1.
6484 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6485 internal variables.
6486 (create_trace_state_variable): New parameter `gdb'. Handle it.
6487 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6488 (cmd_qtdp): Handle fast tracepoints.
6489 (cmd_qtdv): Adjust.
6490 (max_jump_pad_size): New.
6491 (gdb_jump_pad_head): New.
6492 (get_jump_space_head): New.
6493 (claim_jump_space): New.
6494 (sort_tracepoints): New.
6495 (MAX_JUMP_SIZE): New.
6496 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6497 IPA.
6498 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6499 support. Upload fast traceframes, and delete internal IPA
6500 breakpoints.
6501 (stop_tracing_handler): New.
6502 (flush_trace_buffer_handler): New.
6503 (cmd_qtstop): Upload fast tracepoints.
6504 (response_tracepoint): Handle fast tracepoints.
6505 (tracepoint_finished_step): Upload fast traceframes. Set the
6506 tracepoint hit context's tracepoint type.
6507 (handle_tracepoint_bkpts): New.
6508 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6509 type. Add comment about fast tracepoints.
6510 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6511 non-existing action_str field.
6512 (get_context_regcache): Handle fast tracepoints.
6513 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6514 to the regcache.
6515 (fast_tracepoint_from_jump_pad_address): New.
6516 (fast_tracepoint_from_ipa_tpoint_address): New.
6517 (collecting_t): New.
6518 (force_unlock_trace_buffer): New.
6519 (fast_tracepoint_collecting): New.
6520 (collecting): New.
6521 (gdb_collect): New.
6522 (write_inferior_data_ptr): New.
6523 (target_tp_heap): New.
6524 (target_malloc): New.
6525 (download_agent_expr): New.
6526 (UALIGN): New.
6527 (download_tracepoints): New.
6528 (download_trace_state_variables): New.
6529 (upload_fast_traceframes): New.
6530 (IPA_FIRST_TRACEFRAME): New.
6531 (IPA_NEXT_TRACEFRAME_1): New.
6532 (IPA_NEXT_TRACEFRAME): New.
6533 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6534 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6535 (gdb_jump_pad_buffer_end): New.
6536 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6537 (initialize_tracepoint): Adjust.
6538 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6539 buffer. Initialize the low module.
6540 * utils.c (PREFIX, TOOLNAME): New.
6541 (malloc_failure): Use PREFIX.
6542 (error): In the IPA, an error causes an exit.
6543 (fatal, warning): Use PREFIX.
6544 (internal_error): Use TOOLNAME.
6545 (NUMCELLS): Increase to 10.
6546 * configure, config.in: Regenerate.
6547
d149dd1d
PA
65482010-06-01 Pedro Alves <pedro@codesourcery.com>
6549
6550 * server.c (handle_query) <qSupported>: Do two passes over the
6551 qSupported string to avoid nesting strtok.
6552
f6528abd
JK
65532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6554
6555 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6556 (CDEPS): New.
6557 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6558 -Wl,--dynamic-list.
6559 * configure: Regenerate.
6560 * proc-service.list: New.
6561
ca2a87a0
JK
65622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6563
6564 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6565 New comment.
6566
363a6e9f
OS
65672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6568
6569 * gdbreplay.c (remote_open): Check error return from socket() call by
6570 its equality to -1 not by it being negative.
6571 * remote-utils.c (remote_open): Likewise.
6572
d23b6cb1
PA
65732010-05-23 Pedro Alves <pedro@codesourcery.com>
6574
6575 * config.h: Regenerate.
6576
28d3cf85
MK
65772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6578
6579 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6580 doesn't provide PTRACE_GET_THREAD_AREA.
6581
fea36a59
MK
65822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6583
6584 * linux-m68k-low.c: Include <asm/ptrace.h>
6585 (ps_get_thread_area): Implement.
6586
24b066ba
DE
65872010-05-03 Doug Evans <dje@google.com>
6588
6589 * event-loop.c (struct callback_event): New struct.
6590 (callback_list): New global.
6591 (append_callback_event, delete_callback_event): New functions.
6592 (process_callback): New function.
6593 (start_event_loop): Call it.
6594 * remote-utils.c (NOT_SCHEDULED): Define.
6595 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6596 moved out of readchar.
6597 (readchar): Rewrite. Call reschedule before returning.
6598 (reset_readchar): New function.
6599 (remote_close): Call it.
6600 (process_remaining, reschedule): New functions.
6601 * server.h (callback_handler_func): New typedef.
6602 (append_callback_event, delete_callback_event): Declare.
6603
9836d6ea
PA
66042010-05-03 Pedro Alves <pedro@codesourcery.com>
6605
6606 * proc-service.c (ps_pglobal_lookup): Use
6607 thread_db_look_up_one_symbol.
6608 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6609 parameter. Use it instead of all_symbols_looked_up.
6610 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6611 field.
6612 (all_symbols_looked_up): Don't declare.
6613 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6614 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6615 field.
6616 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6617 Set all_symbols_looked_up here.
6618 (thread_db_look_up_one_symbol): New.
6619 (thread_db_get_tls_address): Adjust.
6620 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6621 thread_db object on the heap, and tentatively set it in the
6622 process structure.
6623 (thread_db_init): Don't set all_symbols_looked_up here.
6624 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6625
7984d532
PA
66262010-05-03 Pedro Alves <pedro@codesourcery.com>
6627
6628 * linux-low.c (linux_kill, linux_detach): Adjust.
6629 (status_pending_p_callback): Remove redundant statement. Check
6630 for !TARGET_WAITIKIND_IGNORE, instead of
6631 TARGET_WAITKIND_STOPPED.
6632 (handle_tracepoints): Make sure LWP is locked. Adjust.
6633 (linux_wait_for_event_1): Adjust.
6634 (linux_cancel_breakpoints): New.
6635 (unsuspend_one_lwp): New.
6636 (unsuspend_all_lwps): New.
6637 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6638 (send_sigstop_callback): Change return type to int, add new
6639 `except' parameter and handle it.
6640 (suspend_and_send_sigstop_callback): New.
6641 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6642 pass them down. If SUSPEND, also increment the lwp's suspend
6643 count.
6644 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6645 (need_step_over_p): Don't consider suspended LWPs.
6646 (start_step_over): Adjust.
6647 (proceed_one_lwp): Change return type to int, add new `except'
6648 parameter and handle it.
6649 (unsuspend_and_proceed_one_lwp): New.
6650 (proceed_all_lwps): Use find_inferior instead of
6651 for_each_inferior.
6652 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6653 also decrement the suspend count of LWPs. Pass `except' down,
6654 instead of hacking its suspend count.
6655 (linux_pause_all): Add `freeze' parameter. Adjust.
6656 (linux_unpause_all): New.
6657 (linux_target_ops): Install linux_unpause_all.
6658 * server.c (handle_status): Adjust.
6659 * target.h (struct target_ops): New fields `unpause_all' and
6660 `cancel_breakpoints'. Add new parameter to `pause_all'.
6661 (pause_all): Add new `freeze' parameter.
6662 (unpause_all): New.
6663 (cancel_breakpoints): New.
6664 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6665 cancel breakpoints.
6666 (cmd_qtstart): Pause threads.
6667 (stop_tracing): Pause threads, and cancel breakpoints.
6668 * win32-low.c (win32_target_ops): Adjust.
6669
e471f25b
PA
66702010-05-03 Pedro Alves <pedro@codesourcery.com>
6671
6672 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6673 the inferior right away from here...
6674 (linux_wait_1): ... to here, and adjust to check the thread's
6675 last_resume_kind instead of the lwp's step or stop_expected flags.
6676
1915ef4f
PA
66772010-05-02 Pedro Alves <pedro@codesourcery.com>
6678
6679 * README: Use consistent `GDB' and `GDBserver' spellings.
6680
f9e39928
PA
66812010-05-02 Pedro Alves <pedro@codesourcery.com>
6682
6683 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6684 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6685 (linux_detach_one_lwp): Assume the lwp is stopped.
6686 (any_thread_of): Delete.
6687 (linux_detach): Stop all lwps here. Don't blindly delete all
6688 breakpoints.
6689 (delete_lwp_callback): New.
6690 (linux_mourn): Delete all lwps of the process that is gone.
6691 (linux_wait_1): Don't delete the last lwp of the process here.
6692 * mem-break.h (mark_breakpoints_out): Declare.
6693 * mem-break.c (mark_breakpoints_out): New.
6694 (free_all_breakpoints): Use it.
6695 * server.c (handle_target_event): If the process is gone, mark
6696 breakpoints out.
6697 * thread-db.c (struct thread_db) <create_bp>: New field.
6698 (thread_db_enable_reporting): Fix prototype. Store a thread event
6699 breakpoint reference in the thread_db struct.
6700 (thread_db_load_search): Clear the thread_db object.
6701 (try_thread_db_load_1): Ditto.
6702 (switch_to_process): New.
6703 (disable_thread_event_reporting): Use it.
6704 (remove_thread_event_breakpoints): New.
6705 (thread_db_detach, thread_db_mourn): Use it.
6706
1e7fc18c
PA
67072010-05-01 Pedro Alves <pedro@codesourcery.com>
6708
6709 * linux-low.c (linux_enable_event_reporting): New.
6710 (linux_wait_for_event_1, handle_extended_wait): Use it.
6711
02fc4de7
PA
67122010-04-30 Pedro Alves <pedro@codesourcery.com>
6713
6714 * linux-low.c (linux_kill_one_lwp, linux_kill)
6715 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6716 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6717 SIGSTOP even if the LWP is stopped.
6718 (send_sigstop_callback): New.
6719 (stop_all_lwps): Use send_sigstop_callback instead.
6720 (linux_resume_one_thread): Adjust.
6721 (proceed_one_lwp): Still proceed an LWP that the client has
6722 requested to stop, if we haven't reported it as stopped yet. Make
6723 sure that LWPs the client want stopped, have a pending SIGSTOP.
6724
bc3b5632
DE
67252010-04-26 Doug Evans <dje@google.com>
6726
ae1ada35
DE
6727 * server.c (handle_general_set): Make static.
6728
bc3b5632
DE
6729 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6730 Print received char after testing for error/eof instead of before.
6731 (input_interrupt): Tweak comment.
6732
65730243
DE
67332010-04-23 Doug Evans <dje@google.com>
6734
6735 * server.c (start_inferior): Print inferior argv if --debug.
6736
a8ae7dc0
AR
67372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6738
6739 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6740 * nto-x86-low.c: Include server.h
6741
1c07cc19
PM
67422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6743
6744 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6745 be consistent with other sources of this directory.
6746 (init_registers_amd64): Correct name of source file of this function
6747 in the comment.
6748
e0a61e09
PM
67492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6750
6751 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6752 64-bit executables.
6753
54709339
PM
67542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6755
6756 * win32-i386-low.c: Add 64-bit support.
6757 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6758 (init_registers_amd64): Declare.
6759 (mappings): Add 64-bit version of array.
6760 (init_windows_x86): New function.
6761 (the_low_target): Change init_arch field to init_windows_x86.
6762
e8f0053d
PM
67632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6764
6765 * win32-low.c: Adapt to support also 64-bit architecture.
6766 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6767 (get_image_name): Use SIZE_T type for local variable `done'.
6768 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6769 (toolhelp_get_dll_name): Idem.
6770 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6771 Use uintptr_t typecast to avoid warning.
6772 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6773 (handle_exception): Use phex_nz to avoid warning.
6774 (win32_wait): Remove unused local variable `process'.
6775
c481e77e
PM
67762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6777
6778 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6779 `amd64-avx.o'.
6780
12ea4b69
PM
67812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6782
6783 * configure.ac: Use `ws2_32' library for srv_mingw.
6784 * configure: Regenerate.
6785 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6786 * remote-utils.c: Likewise.
6787
f6d1620c
L
67882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6789
6790 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6791 if __x86_64__ is defined.
6792
8e642873
PM
67932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6794
6795 * configure: Regenerate.
6796
711e434b
PM
67972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6798
6799 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6800 * target.h (target_ops): New get_tib_address field.
6801 * win32-low.h (win32_thread_info): Add thread_local_base field.
6802 * win32-low.c (child_add_thread): Add tlb argument.
6803 Set thread_local_base field to TLB.
6804 (get_child_debug_event): Adapt to child_add_thread change.
6805 (win32_get_tib_address): New function.
6806 (win32_target_ops): Set get_tib_address field to
6807 win32_get_tib_address.
6808 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6809
505106cd
PA
68102010-04-12 Pedro Alves <pedro@codesourcery.com>
6811
505106cd
PA
6812 * linux-low.c (linux_mourn): Also remove the process.
6813 * server.c (handle_target_event): Don't remove the process here.
6814 * nto-low.c (nto_mourn): New.
6815 (nto_target_ops): Install it.
6816 * spu-low.c (spu_mourn): New.
6817 (spu_target_ops): Install it.
6818 * win32-low.c (win32_mourn): New.
6819 (win32_target_ops): Install it.
6820
e8470a06
PA
68212010-04-12 Pedro Alves <pedro@codesourcery.com>
6822
6823 * server.h (buffer_xml_printf): Remove redundant `;'.
6824
45ba0d02
PA
68252010-04-12 Pedro Alves <pedro@codesourcery.com>
6826
6827 * regcache.c (set_register_cache): Invalidate regcaches before
6828 changing the register cache layout.
6829 (regcache_invalidate_one): Allow a NULL regcache.
6830 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6831 regcaches before changing the register cache layout or the target
6832 regsets.
6833
59e04013
L
68342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6835
6836 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6837 variable warning on Linux/x86-64.
6838
8336d594
PA
68392010-04-11 Pedro Alves <pedro@codesourcery.com>
6840
6841 GDBserver disconnected tracing support.
6842
6843 * linux-low.c (linux_remove_process): Delete.
6844 (add_lwp): Don't set last_resume_kind here.
6845 (linux_kill): Use `mourn'.
6846 (linux_detach): Use `thread_db_detach', and `mourn'.
6847 (linux_mourn): New.
6848 (linux_attach_lwp_1): Adjust comment.
6849 (linux_attach): last_resume_kind moved the thread_info; adjust.
6850 (status_pending_p_callback): Adjust.
6851 (linux_wait_for_event_1): Adjust.
6852 (count_events_callback, select_singlestep_lwp_callback)
6853 (select_event_lwp_callback, cancel_breakpoints_callback)
6854 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6855 (proceed_one_lwp): Adjust.
6856 (linux_async): Add debug output.
6857 (linux_thread_stopped): New.
6858 (linux_pause_all): New.
6859 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6860 linux_pause_all.
6861 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6862 (thread_db_free): Delete declaration.
6863 (thread_db_detach, thread_db_mourn): Declare.
6864 * thread-db.c (thread_db_init): Use thread_db_mourn.
6865 (thread_db_free): Delete, split in two.
6866 (disable_thread_event_reporting): New.
6867 (thread_db_detach): New.
6868 (thread_db_mourn): New.
6869
6870 * server.h (struct thread_info) <last_resume_kind>: New field.
6871 <attached>: Add comment.
6872 <gdb_detached>: New field.
6873 (handler_func): Change return type to int.
6874 (handle_serial_event, handle_target_event): Ditto.
6875 (gdb_connected): Declare.
6876 (tracing): Delete.
6877 (disconnected_tracing): Declare.
6878 (stop_tracing): Declare.
6879
6880 * server.c (handle_query) <qSupported>: Report support for
6881 disconnected tracing.
6882 (queue_stop_reply_callback): Account for running threads.
6883 (gdb_wants_thread_stopped): New.
6884 (gdb_wants_all_threads_stopped): New.
6885 (gdb_reattached_process): New.
6886 (handle_status): Clear the `gdb_detached' flag of all processes.
6887 In all-stop, stop all threads.
6888 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6889 (process_serial_event): If the remote connection breaks, or if an
6890 exit was forced with "monitor exit", force an event loop exit.
6891 Handle disconnected tracing on detach.
6892 (handle_serial_event): Adjust.
6893 (handle_target_event): If GDB isn't connected, forward events back
6894 to the inferior, unless the last process exited, in which case,
6895 exit gdbserver. Adjust interface.
6896
6897 * remote-utils.c (remote_open): Don't block in accept. Instead
6898 register an event loop source on the listen socket file
6899 descriptor. Refactor bits into ...
6900 (listen_desc): ... this new global.
6901 (gdb_connected): ... this new function.
6902 (enable_async_notification): ... this new function.
6903 (handle_accept_event): ... this new function.
6904 (remote_close): Clear remote_desc.
6905
6906 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6907
6908 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6909 New fields.
6910 (mourn_inferior): Define.
6911 (target_process_qsupported): Avoid the dangling else problem.
6912 (thread_stopped): Define.
6913 (pause_all): Define.
6914 (target_waitstatus_to_string): Declare.
6915 * target.c (target_waitstatus_to_string): New.
6916
6917 * tracepoint.c (tracing): Make extern.
6918 (disconnected_tracing): New.
6919 (stop_tracing): Make extern. Handle tracing stops due to GDB
6920 disconnecting.
6921 (cmd_qtdisconnected): New.
6922 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6923 (handle_tracepoint_general_set): Handle QTDisconnected.
6924
6925 * event-loop.c (event_handler_func): Change return type to int.
6926 (process_event): Bail out if the event handler wants the event
6927 loop to stop.
6928 (handle_file_event): Ditto.
6929 (start_event_loop): Bail out if the event handler wants the event
6930 loop to stop.
6931
6932 * nto-low.c (nto_target_ops): Adjust.
6933 * spu-low.c (spu_wait): Don't remove the process here.
6934 (spu_target_ops): Adjust.
6935 * win32-low.c (win32_wait): Don't remove the process here.
6936 (win32_target_ops): Adjust.
6937
5d267c4c
PA
69382010-04-11 Pedro Alves <pedro@codesourcery.com>
6939
6940 * regcache.c (realloc_register_cache): Invalidate inferior's
6941 regcache before recreating it.
6942
623ccd72
PA
69432010-04-09 Pedro Alves <pedro@codesourcery.com>
6944
6945 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6946
219f2f23
PA
69472010-04-09 Stan Shebs <stan@codesourcery.com>
6948 Pedro Alves <pedro@codesourcery.com>
6949
6950 * server.h (LONGEST): New.
6951 (struct thread_info) <while_stepping>: New field.
6952 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6953 Declare.
6954 (initialize_tracepoint, handle_tracepoint_general_set)
6955 (handle_tracepoint_query, tracepoint_finished_step)
6956 (tracepoint_was_hit, release_while_stepping_state_list):
6957 (current_traceframe): Declare.
6958 * server.c (handle_general_set): Handle tracepoint packets.
6959 (read_memory): New.
6960 (write_memory): New.
6961 (handle_search_memory_1): Use read_memory.
6962 (handle_query): Report support for conditional tracepoints, trace
6963 state variables, and tracepoint sources. Handle tracepoint
6964 queries.
6965 (main): Initialize the tracepoints module.
6966 (process_serial_event): Handle traceframe reads/writes.
6967
6968 * linux-low.c (handle_tracepoints): New.
6969 (linux_wait_1): Call it.
6970 (linux_resume_one_lwp): Handle while-stepping.
6971 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6972 (linux_target_ops): Install them.
6973 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6974 New field.
6975 * linux-x86-low.c (x86_supports_tracepoints): New.
6976 (the_low_target). Install it.
6977
6978 * mem-break.h (delete_breakpoint): Declare.
6979 * mem-break.c (delete_breakpoint): Make external.
6980
6981 * target.h (struct target_ops): Add `supports_tracepoints',
6982 `read_pc', and `write_pc' fields.
6983 (target_supports_tracepoints): Define.
6984 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6985 (phex_nz): New.
6986
6987 * regcache.h (struct regcache) <registers_owned>: New field.
6988 (init_register_cache, regcache_cpy): Declare.
6989 (regcache_read_pc, regcache_write_pc): Declare.
6990 (register_cache_size): Declare.
6991 (supply_regblock): Declare.
6992 * regcache.c (init_register_cache): New.
6993 (new_register_cache): Use it.
6994 (regcache_cpy): New.
6995 (register_cache_size): New.
6996 (supply_regblock): New.
6997 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6998
219f2f23
PA
6999 * tracepoint.c: New.
7000
7001 * Makefile.in (OBS): Add tracepoint.o.
7002 (tracepoint.o): New rule.
7003
3a13a53b
L
70042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7005
7006 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7007 (i386-mmx.o): New.
7008 (i386-mmx.c): Likewise.
7009 (i386-mmx-linux.o): Likewise.
7010 (i386-mmx-linux.c): Likewise.
7011
7012 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7013 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7014 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7015 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7016
7017 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7018 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7019 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7020
1570b33e
L
70212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7022
7023 * Makefile.in (clean): Updated.
7024 (i386-avx.o): New.
7025 (i386-avx.c): Likewise.
7026 (i386-avx-linux.o): Likewise.
7027 (i386-avx-linux.c): Likewise.
7028 (amd64-avx.o): Likewise.
7029 (amd64-avx.c): Likewise.
7030 (amd64-avx-linux.o): Likewise.
7031 (amd64-avx-linux.c): Likewise.
7032
7033 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7034 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7035 (srv_amd64_regobj): Add amd64-avx.o.
7036 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7037 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7038 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7039 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7040 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7041 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7042 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7043
7044 * i387-fp.c: Include "i386-xstate.h".
7045 (i387_xsave): New.
7046 (i387_cache_to_xsave): Likewise.
7047 (i387_xsave_to_cache): Likewise.
7048 (x86_xcr0): Likewise.
7049
7050 * i387-fp.h (i387_cache_to_xsave): Likewise.
7051 (i387_xsave_to_cache): Likewise.
7052 (x86_xcr0): Likewise.
7053
7054 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7055 * linux-crisv32-low.c (target_regsets): Likewise.
7056 * linux-m68k-low.c (target_regsets): Likewise.
7057 * linux-mips-low.c (target_regsets): Likewise.
7058 * linux-ppc-low.c (target_regsets): Likewise.
7059 * linux-s390-low.c (target_regsets): Likewise.
7060 * linux-sh-low.c (target_regsets): Likewise.
7061 * linux-sparc-low.c (target_regsets): Likewise.
7062 * linux-xtensa-low.c (target_regsets): Likewise.
7063
7064 * linux-low.c: Include <sys/uio.h>.
7065 (regsets_fetch_inferior_registers): Support nt_type.
7066 (regsets_store_inferior_registers): Likewise.
7067 (linux_process_qsupported): New.
7068 (linux_target_ops): Add linux_process_qsupported.
7069
7070 * linux-low.h (regset_info): Add nt_type.
7071 (linux_target_ops): Add process_qsupported.
7072
7073 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7074 and <sys/uio.h>.
7075 (init_registers_i386_avx_linux): New.
7076 (init_registers_amd64_avx_linux): Likewise.
7077 (xmltarget_i386_linux_no_xml): Likewise.
7078 (xmltarget_amd64_linux_no_xml): Likewise.
7079 (PTRACE_GETREGSET): Likewise.
7080 (PTRACE_SETREGSET): Likewise.
7081 (x86_fill_xstateregset): Likewise.
7082 (x86_store_xstateregset): Likewise.
7083 (use_xml): Likewise.
7084 (x86_linux_update_xmltarget): Likewise.
7085 (x86_linux_process_qsupported): Likewise.
7086 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7087 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7088 init_registers_i386_linux here. Call
7089 x86_linux_update_xmltarget.
7090 (the_low_target): Add x86_linux_process_qsupported.
7091
7092 * server.c (handle_query): Call target_process_qsupported.
7093
7094 * target.h (target_ops): Add process_qsupported.
7095 (target_process_qsupported): New.
7096
fc7238bb
PA
70972010-04-03 Pedro Alves <pedro@codesourcery.com>
7098
7099 * inferiors.c (add_thread): Set last_status kind to
7100 TARGET_WAITKIND_IGNORE.
7101 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7102 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7103 (linux_wait_1): Move `thread' local definition to block that uses
7104 it. Don't NULL initialize `event_child'.
7105 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7106 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7107 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7108
bdabb078
PA
71092010-04-01 Pedro Alves <pedro@codesourcery.com>
7110
7111 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7112 an extended waitstatus, or by a watchpoint.
7113 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7114 thread was stepping or has been stopped by a watchpoint.
7115
d3bbe7a0
PA
71162010-04-01 Pedro Alves <pedro@codesourcery.com>
7117
7118 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7119 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7120 of another, then delete the previous, and validate all
7121 breakpoints.
7122 (validate_inserted_breakpoint): New.
7123 (delete_disabled_breakpoints): New.
7124 (validate_breakpoints): New.
7125 (check_mem_read): Validate breakpoints before trusting their
7126 shadow. Delete disabled breakpoints.
7127 (check_mem_write): Validate breakpoints before trusting they
7128 should be inserted. Delete disabled breakpoints.
7129 * mem-break.h (validate_breakpoints):
7130 * server.c (handle_query): Validate breakpoints when we see a
7131 qSymbol query.
7132
8b07ae33
PA
71332010-04-01 Pedro Alves <pedro@codesourcery.com>
7134
7135 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7136 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7137 if we could tell there's a GDB breakpoint at stop_pc.
7138 (need_step_over_p): Don't do a step over if we find a GDB
7139 breakpoint at the resume PC.
7140
7141 * mem-break.c (struct raw_breakpoint): New.
7142 (enum bkpt_type): New type `gdb_breakpoint'.
7143 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7144 fields. New field `raw'.
7145 (find_raw_breakpoint_at): New.
7146 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7147 breakpoint instead.
7148 (set_breakpoint_at): Adjust.
7149 (delete_raw_breakpoint): New.
7150 (release_breakpoint): New.
7151 (delete_breakpoint): Rename to...
7152 (delete_breakpoint_1): ... this. Add proc parameter. Use
7153 release_breakpoint. Return ENOENT.
7154 (delete_breakpoint): Reimplement.
7155 (find_breakpoint_at): Delete.
7156 (find_gdb_breakpoint_at): New.
7157 (delete_breakpoint_at): Delete.
7158 (set_gdb_breakpoint_at): New.
7159 (delete_gdb_breakpoint_at): New.
7160 (gdb_breakpoint_here): New.
7161 (set_reinsert_breakpoint): Use release_breakpoint.
7162 (uninsert_breakpoint): Rename to ...
7163 (uninsert_raw_breakpoint): ... this.
7164 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7165 (reinsert_raw_breakpoint): Change parameter type to
7166 raw_breakpoint.
7167 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7168 instead.
7169 (check_breakpoints): Adjust. Use release_breakpoint.
7170 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7171 (breakpoint_inserted_here): Ditto.
7172 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7173 Don't trust the breakpoint's shadow if it is not inserted.
7174 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7175 (delete_all_breakpoints): Adjust.
7176 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7177 use delete_breakpoint_1.
7178
7179 * mem-break.h (breakpoints_supported): Delete declaration.
7180 (set_gdb_breakpoint_at): Declare.
7181 (gdb_breakpoint_here): Declare.
7182 (delete_breakpoint_at): Delete.
7183 (delete_gdb_breakpoint_at): Declare.
7184
7185 * server.h (struct raw_breakpoint): Forward declare.
7186 (struct process_info): New field `raw_breakpoints'.
7187
7188 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7189 breakpoints.
7190
6bf5e0ba
PA
71912010-03-24 Pedro Alves <pedro@codesourcery.com>
7192
7193 * linux-low.c (status_pending_p_callback): Fix comment.
7194 (linux_wait_for_event_1): Move most of the internal breakpoint
7195 handling from here...
7196 (linux_wait_1): ... to here.
7197 (count_events_callback): New.
7198 (select_singlestep_lwp_callback): New.
7199 (select_event_lwp_callback): New.
7200 (cancel_breakpoints_callback): New.
7201 (select_event_lwp): New.
7202 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7203 priority to all LWPs that have had events that should be reported
7204 to the client. Cancel breakpoints when about to reporting the
7205 event to the client, not while stopping lwps. No longer cancel
7206 finished single-steps here.
7207 (cancel_finished_single_step): Delete.
7208 (cancel_finished_single_steps): Delete.
7209
414a389f
PA
72102010-03-24 Pedro Alves <pedro@codesourcery.com>
7211
7212 * mem-break.c (enum bkpt_type): New.
7213 (struct breakpoint): New field `type'.
7214 (set_breakpoint_at): Change return type to struct breakpoint
7215 pointer. Set type to `other_breakpoint' by default.
7216 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7217 in the breakpoint list.
7218 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7219 (reinsert_breakpoint): Rename to ...
7220 (reinsert_raw_breakpoint): ... this.
7221 (reinsert_breakpoints_at): Adjust.
7222 * mem-break.h (struct breakpoint): Declare.
7223 (set_breakpoint_at): Change return type to struct breakpoint
7224 pointer.
7225
2280c721
PA
72262010-03-24 Pedro Alves <pedro@codesourcery.com>
7227
7228 * server.c (handle_query): Assign, not compare.
7229
d50171e4
PA
72302010-03-24 Pedro Alves <pedro@codesourcery.com>
7231
7232 Teach linux gdbserver to step-over-breakpoints.
7233
7234 * linux-low.c (can_hardware_single_step): New.
7235 (supports_breakpoints): New.
7236 (handle_extended_wait): If stopping threads, read the stop pc of
7237 the new cloned LWP.
7238 (get_pc): New.
7239 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7240 low target doesn't support retrieving the PC.
7241 (add_lwp): Set last_resume_kind to resume_continue.
7242 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7243 (linux_attach): Don't clear stop_expected. Set the lwp's
7244 last_resume_kind to resume_stop.
7245 (linux_detach_one_lwp): Don't check for removed breakpoints.
7246 (check_removed_breakpoint): Delete.
7247 (status_pending_p): Rename to ...
7248 (status_pending_p_callback): ... this. Don't check for removed
7249 breakpoints. Don't consider threads that are stopped from GDB's
7250 perspective.
7251 (linux_wait_for_lwp): Always read the stop_pc here.
7252 (cancel_breakpoint): New.
7253 (step_over_bkpt): New global.
7254 (linux_wait_for_event_1): Implement stepping over breakpoints.
7255 (gdb_wants_lwp_stopped): New.
7256 (gdb_wants_all_stopped): New.
7257 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7258 single-step traps here. Store the thread's last reported target
7259 wait status.
7260 (send_sigstop): Don't clear stop_expected. Always set it,
7261 instead.
7262 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7263 (cancel_finished_single_step): New.
7264 (cancel_finished_single_steps): New.
7265 (wait_for_sigstop): Don't cancel finished single-step traps here.
7266 (linux_resume_one_lwp): Don't check for removed breakpoints.
7267 Don't set `step' on non-hardware step archs.
7268 (linux_set_resume_request): Ignore resume_stop requests if already
7269 stopping or stopped. Set the lwp's last_resume_kind.
7270 (resume_status_pending_p): Don't check for removed breakpoints.
7271 (need_step_over_p): New.
7272 (start_step_over): New.
7273 (finish_step_over): New.
7274 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7275 requests. Clear the thread's last reported target waitstatus.
7276 Don't use the `suspended' flag. Don't consider pending breakpoints.
7277 (linux_resume): Start a step-over if necessary.
7278 (proceed_one_lwp): New.
7279 (proceed_all_lwps): New.
7280 (unstop_all_lwps): New.
7281 * linux-low.h (struct lwp_info): Rewrite comment for the
7282 `suspended' flag. Add the `stop_pc' field. Delete the
7283 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7284 Add `'last_resume_kind' and `need_step_over' fields.
7285 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7286 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7287 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7288 (set_raw_breakpoint_at): New.
7289 (set_breakpoint_at): Rewrite to use it.
7290 (reinsert_breakpoint_handler): Delete.
7291 (set_reinsert_breakpoint): New.
7292 (reinsert_breakpoint_by_bp): Delete.
7293 (delete_reinsert_breakpoints): New.
7294 (uninsert_breakpoint): Rewrite.
7295 (uninsert_breakpoints_at): New.
7296 (reinsert_breakpoint): Rewrite.
7297 (reinsert_breakpoints_at): New.
7298 (check_breakpoints): Rewrite.
7299 (breakpoint_here): New.
7300 (breakpoint_inserted_here): New.
7301 (check_mem_read): Adjust.
7302 * mem-break.h (breakpoints_supported, breakpoint_here)
7303 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7304 (reinsert_breakpoint_by_bp): Delete declaration.
7305 (delete_reinsert_breakpoints): Declare.
7306 (reinsert_breakpoint): Delete declaration.
7307 (reinsert_breakpoints_at): Declare.
7308 (uninsert_breakpoint): Delete declaration.
7309 (uninsert_breakpoints_at): Declare.
7310 (check_breakpoints): Adjust prototype.
7311 * server.h: Adjust include order.
7312 (struct thread_info): Declare here. Add a `last_status' field.
7313
30ba68cb
MS
73142010-03-23 Michael Snyder <msnyder@vmware.com>
7315
7316 * server.c (crc32): New function.
7317 (handle_query): Add handling for 'qCRC:' request.
7318
b9a881c2
PA
73192010-03-23 Pedro Alves <pedro@codesourcery.com>
7320
7321 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7322 lwp had been stopped by a watchpoint.
7323
e92d13d5
PA
73242010-03-16 Pedro Alves <pedro@codesourcery.com>
7325
7326 * server.h (internal_error): Declare.
7327 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7328 * utils.c (internal_error): New function.
7329
64daa791
AS
73302010-03-15 Andreas Schwab <schwab@redhat.com>
7331
7332 * configure.srv: Fix typo setting srv_regobj.
7333
f52cd8cd
PA
73342010-03-15 Pedro Alves <pedro@codesourcery.com>
7335
7336 * linux-low.c (fetch_register): Avoid passing a non string literal
7337 format to `error'.
7338 (usr_store_inferior_registers): Ditto.
7339
93ae6fdc
PA
73402010-03-14 Pedro Alves <pedro@codesourcery.com>
7341
7342 * linux-low.c (linux_write_memory): Bail out early if peeking
7343 memory failed.
7344
c3adc08c
PA
73452010-03-14 Pedro Alves <pedro@codesourcery.com>
7346
7347 * linux-low.h (struct lwp_info): New fields
7348 `stopped_by_watchpoint' and `stopped_data_address'.
7349 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7350 here, and cache them in the lwp object.
7351 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7352 directly.
7353 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7354 field.
7355 (linux_stopped_by_watchpoint): Rewrite.
7356 (linux_stopped_data_address): Rewrite.
7357
bce522a2
PA
73582010-03-06 Simo Melenius <simo.melenius@iki.fi>
7359
7360 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7361 switching the current inferior, not before.
7362
90884b2b
L
73632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7364
7365 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7366 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7367 i386-linux.c and amd64-linux.c.
7368 (reg-i386.o): Removed.
7369 (reg-i386.c): Likewise.
7370 (reg-i386-linux.o): Likewise.
7371 (reg-i386-linux.c): Likewise.
7372 (reg-x86-64.o): Likewise.
7373 (reg-x86-64.c): Likewise.
7374 (reg-x86-64-linux.o): Likewise.
7375 (reg-x86-64-linux.c): Likewise.
7376 (i386.o): New.
7377 (i386.c): Likewise.
7378 (i386-linux.o): Likewise.
7379 (i386-linux.c): Likewise.
7380 (amd64.o): Likewise.
7381 (amd64.c): Likewise.
7382 (amd64-linux.o): Likewise.
7383 (amd64-linux.c): Likewise.
7384
7385 * configure.srv (srv_i386_regobj): New.
7386 (srv_i386_linux_regobj): Likewise.
7387 (srv_amd64_regobj): Likewise.
7388 (srv_amd64_linux_regobj): Likewise.
7389 (srv_i386_32bit_xmlfiles): Likewise.
7390 (srv_i386_64bit_xmlfiles): Likewise.
7391 (srv_i386_xmlfiles): Likewise.
7392 (srv_amd64_xmlfiles): Likewise.
7393 (srv_i386_linux_xmlfiles): Likewise.
7394 (srv_amd64_linux_xmlfiles): Likewise.
7395 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7396 srv_xmlfiles to $srv_i386_xmlfiles.
7397 (i[34567]86-*-mingw32ce*): Likewise.
7398 (i[34567]86-*-mingw*): Likewise.
7399 (i[34567]86-*-nto*): Likewise.
7400 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7401 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7402 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7403 (x86_64-*-linux*): Likewise.
7404
7405 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7406 (init_registers_amd64_linux): New.
7407 (x86_arch_setup): Replace init_registers_x86_64_linux with
7408 init_registers_amd64_linux.
7409
193f13e6
MK
74102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7411
7412 * configure.ac: Check for libdl. If it is not available link against
7413 static libthread_db.
7414 * configure: Regenerate.
7415
85d721b8
PA
74162010-02-22 Pedro Alves <pedro@codesourcery.com>
7417
7418 PR9605
7419
7420 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7421 handing a read watchpoint.
7422 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7423
6076632b
DE
74242010-02-12 Doug Evans <dje@google.com>
7425
7426 * linux-low.c (linux_supports_tracefork_flag): Document.
7427 (linux_look_up_symbols): Add comment.
7428
3327ccf7
L
74292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7430
7431 * regcache.c (supply_register): Clear regcache if buf is NULL.
7432
0718675c 74332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7434 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7435
7436 * inferiors.c (find_inferior): Add function documentation.
7437 (unloaded_dll): Handle the case where the unloaded dll has not
7438 been previously registered in the dll list.
7439
177321bd
DJ
74402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7441
7442 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7443 (thumb2_breakpoint): New.
7444 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7445
2b009048
DJ
74462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7447
7448 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7449 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7450 breakpoints.
7451
3be029c7
PA
74522010-01-21 Pedro Alves <pedro@codesourcery.com>
7453
7454 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7455
18f5de3b
JK
74562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7457
7458 * linux-s390-low.c (s390_collect_ptrace_register)
7459 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7460
3743bb4f
DE
74612010-01-21 Doug Evans <dje@google.com>
7462
14ce3065
DE
7463 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7464 (PTRACE_ARG4_TYPE): New macro.
7465 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7466 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7467 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7468 (usr_store_inferior_registers): Ditto.
7469 (linux_read_memory, linux_write_memory): Ditto.
7470 (linux_test_for_tracefork): Ditto.
7471
3743bb4f
DE
7472 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7473 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7474
8b315be5
PA
74752010-01-21 Pedro Alves <pedro@codesourcery.com>
7476
7477 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7478 target.
7479
85492558
PA
74802010-01-21 Pedro Alves <pedro@codesourcery.com>
7481
7482 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7483 prototype to take a regcache. Adjust.
7484
442ea881
PA
74852010-01-20 Pedro Alves <pedro@codesourcery.com>
7486
7487 * regcache.h (struct thread_info): Forward declare.
7488 (struct regcache): New.
7489 (new_register_cache): Adjust prototype.
7490 (get_thread_regcache): Declare.
7491 (free_register_cache): Adjust prototype.
7492 (registers_to_string, registers_from_string): Ditto.
7493 (supply_register, supply_register_by_name, collect_register)
7494 (collect_register_as_string, collect_register_by_name): Ditto.
7495 * regcache.c (struct inferior_regcache_data): Delete.
7496 (get_regcache): Rename to ...
7497 (get_thread_regcache): ... this. Adjust. Switch inferior before
7498 fetching registers.
7499 (regcache_invalidate_one): Adjust.
7500 (regcache_invalidate): Fix prototype.
7501 (new_register_cache): Return the new register cache.
7502 (free_register_cache): Change prototype.
7503 (realloc_register_cache): Adjust.
7504 (registers_to_string): Change prototype to take a regcache. Adjust.
7505 (registers_from_string): Ditto.
7506 (register_data): Ditto.
7507 (supply_register): Ditto.
7508 (supply_register_by_name): Ditto.
7509 (collect_register): Ditto.
7510 (collect_register_as_string): Ditto.
7511 (collect_register_by_name): Ditto.
7512 * server.c (process_serial_event): Adjust.
7513 * linux-low.h (regset_fill_func, regset_store_func): Change
7514 prototype.
7515 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7516 Change prototype.
7517 * linux-low.c (get_stop_pc): Adjust.
7518 (check_removed_breakpoint): Adjust.
7519 (linux_wait_for_event): Adjust.
7520 (linux_resume_one_lwp): Adjust.
7521 (fetch_register): Add regcache parameter. Adjust.
7522 (usr_store_inferior_registers): Ditto.
7523 (regsets_fetch_inferior_registers): Ditto.
7524 (regsets_store_inferior_registers): Ditto.
7525 (linux_fetch_registers, linux_store_registers): Ditto.
7526 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7527 regcache. Adjust.
43aaf8b6
PA
7528 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7529 Ditto.
442ea881
PA
7530 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7531 prototype to take a regcache.
7532 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7533 * remote-utils.c (convert_ascii_to_int, outreg)
7534 (prepare_resume_reply): Change prototype to take a regcache.
7535 Adjust.
7536 * target.h (struct target_ops) <fetch_registers, store_registers>:
7537 Change prototype to take a regcache.
7538 (fetch_inferior_registers, store_inferior_registers): Change
7539 prototype to take a regcache. Adjust.
7540 * proc-service.c (ps_lgetregs): Adjust.
7541 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7542 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7543 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7544 take a regcache. Adjust.
7545 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7546 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7547 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7548 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7549 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7550 (cris_cannot_fetch_register):
7551 (cris_breakpoint_at): Change prototype to take a regcache.
7552 Adjust.
7553 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7554 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7555 to take a regcache. Adjust.
7556 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7557 Adjust.
7558 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7559 take a regcache. Adjust.
7560 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7561 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7562 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7563 * linux-mips-low.c (mips_get_pc):
7564 (mips_set_pc): Change prototype to take a regcache. Adjust.
7565 (mips_reinsert_addr): Adjust.
7566 (mips_collect_register): Change prototype to take a regcache.
7567 Adjust.
7568 (mips_supply_register):
7569 (mips_collect_register_32bit, mips_supply_register_32bit)
7570 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7571 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7572 * linux-ppc-low.c (ppc_supply_ptrace_register)
7573 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7574 (parse_spufs_run): Adjust.
7575 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7576 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7577 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7578 take a regcache. Adjust.
7579 * linux-s390-low.c (s390_collect_ptrace_register)
7580 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7581 (s390_set_pc): Change prototype to take a regcache. Adjust.
7582 (s390_arch_setup): Adjust.
7583 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7584 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7585 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7586 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7587 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7588 regcache. Adjust.
7589 (sparc_breakpoint_at): Adjust.
7590 * linux-xtensa-low.c (xtensa_fill_gregset):
7591 (xtensa_store_gregset):
7592 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7593 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7594 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7595 prototype to take a regcache. Adjust.
7596 * win32-arm-low.c (arm_fetch_inferior_register)
7597 (arm_store_inferior_register): Change prototype to take a
7598 regcache. Adjust.
7599 * win32-i386-low.c (i386_fetch_inferior_register)
7600 (i386_store_inferior_register): Change prototype to take a
7601 regcache. Adjust.
7602 * win32-low.c (child_fetch_inferior_registers)
7603 (child_store_inferior_registers): Change prototype to take a
7604 regcache. Adjust.
7605 (win32_wait): Adjust.
7606 (win32_fetch_inferior_registers): Change prototype to take a
7607 regcache. Adjust.
7608 (win32_store_inferior_registers): Adjust.
7609 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7610 store_inferior_register>: Change prototype to take a regcache.
7611
60c3d7b0
DE
76122010-01-20 Doug Evans <dje@google.com>
7613
7614 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7615 #ifdef.
7616 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7617 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7618
dc146f7c
VP
76192010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7620
7621 * linux-low.c (linux_core_of_thread): New.
7622 (compare_ints, show_process, list_threads): New.
7623 (linux_qxfer_osdata): Report threads and cores.
7624 (linux_target_op): Register linux_core_of_thread.
7625 * remote-utils.c (prepare_resume_reply): Report the core.
7626 (buffer_xml_printf): Support %d specifier.
7627 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7628 New.
7629 (handle_query): Handle qXfer:threads. Announce availability
7630 thereof.
7631 * target.h (struct target_ops): New field core_of_thread.
7632
7803799a
UW
76332010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7634
7635 * Makefile.in (clean): Remove new generated files.
7636 (reg-s390.o, reg-s390.c): Remove rules.
7637 (reg-s390x.o, reg-s390x.c): Likewise.
7638 (s390-linux32.o, s390-linux32.c): Add rules.
7639 (s390-linux64.o, s390-linux64.c): Likewise.
7640 (s390x-linux64.o, s390x-linux64.c): Likewise.
7641 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7642 * linux-s390-low.c: Include <elf.h>.
7643 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7644 (init_registers_s390): Remove prototype.
7645 (init_registers_s390x): Likewise.
7646 (init_registers_s390_linux32): Add prototype.
7647 (init_registers_s390_linux64): Likewise.
7648 (init_registers_s390x_linux64): Likewise.
7649 (s390_num_regs_3264): New define.
7650 (s390_regmap_3264): New global variable.
7651 (s390_cannot_fetch_register): Remove obsolete check.
7652 (s390_cannot_store_register): Likewise.
7653 (s390_collect_ptrace_register): Handle upper/lower register halves.
7654 (s390_supply_ptrace_register): Likewise.
7655 (s390_fill_gregset): Update to register number changes.
7656 (s390_get_hwcap): New routine.
7657 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7658 Install appropriate regmap and register set.
7659
6e7ffa39
JB
76602010-01-01 Joel Brobecker <brobecker@adacore.com>
7661
7662 * server.c (gdbserver_version): Update copyright year to 2010.
7663 * gdbreplay.c (gdbreplay_version): Likewise.
7664
957f3f49
DE
76652009-12-28 Doug Evans <dje@google.com>
7666
7667 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7668 elf/external.h. Include <elf.h> instead but only if necessary.
7669
ca5c370d
PA
76702009-12-28 Pedro Alves <pedro@codesourcery.com>
7671
7672 * linux-low.c (linux_remove_process): Remove `detaching'
7673 parameter. Don't release/detach from thread_db here.
7674 (linux_kill): Release/detach from thread_db here, ...
7675 (linux_detach): ... and here, before actually detaching.
7676 (linux_wait_1): ... and here, when a process exits.
7677 * thread-db.c (any_thread_of): New.
7678 (thread_db_free): Switch the current inferior to a thread of the
7679 passed in process.
7680
4ee62156
DE
76812009-12-21 Doug Evans <dje@google.com>
7682
d90e6a88
DE
7683 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7684
c5f62d5f
DE
7685 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7686 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7687 warning ifndef __NR_tkill. Move setting of errno there too.
7688 Delete unnecessary resetting of errno after syscall.
7689 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7690
10e86dd7
DE
7691 * configure.ac: Check for dladdr.
7692 * config.in: Regenerate.
7693 * configure: Regenerate.
7694 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7695 (try_thread_db_load): Update.
7696
4ee62156
DE
7697 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7698
00f515da
DE
76992009-12-18 Doug Evans <dje@google.com>
7700
e9464885
DE
7701 * event-loop.c: Include unistd.h if it exists.
7702
07d4f67e
DE
7703 * linux-low.c (my_waitpid): Move definition away from being in
7704 between linux_tracefork_child/linux_test_for_tracefork.
7705
00f515da
DE
7706 * gdb_proc_service.h (psaddr_t): Fix type.
7707 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7708 signature to match glibc.
7709
1de1badb
DE
77102009-12-16 Doug Evans <dje@google.com>
7711
7712 * linux-low.c (linux_read_memory): Fix argument to read.
7713
aeeb81d1
PA
77142009-11-26 Pedro Alves <pedro@codesourcery.com>
7715
7716 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7717 events, don't leave current_inferior pointing at null.
7718
10357975
PA
77192009-11-26 Pedro Alves <pedro@codesourcery.com>
7720
7721 * win32-low.c (LOG): Delete.
7722 (OUTMSG): Output to stderr.
7723 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7724 on compile time LOG macro.
7725 (win32_wait): Fix debug output.
7726
cf6e3471
PA
77272009-11-26 Pedro Alves <pedro@codesourcery.com>
7728
7729 * win32-low.c (win32_add_one_solib): If the dll name is
7730 "ntdll.dll", prepend the system directory to the dll path.
7731
0c85e18e
MK
77322009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7733
7734 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7735
9ac544ce 77362009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7737 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7738
7739 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7740 * configure.ac: Check for __mcoldfire__ and set
7741 gdb_cv_m68k_is_coldfire.
7742 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7743 reg-cf.o and reg-m68k.o.
7744 * configure: Regenerated.
7745
fd7dd3e6
PA
77462009-11-16 Pedro Alves <pedro@codesourcery.com>
7747
7748 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7749 Pass it to thread_db_free.
7750 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7751 proper `detaching' argument to linux_remove_process.
7752 * linux-low.h (thread_db_free): Add `detaching' parameter.
7753 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7754 to thread_db_free.
7755 (thread_db_free): Add `detaching' parameter. Only
7756 call td_ta_clear_event if detaching from process.
7757
75aa492e
MK
77582009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7759
7760 * thread-db.c (thread_db_free): Fix typo.
7761
21e1bee4
PP
77622009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7763
7764 PR gdb/10838
7765 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7766
8838b45e
NS
77672009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7768
7769 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7770 with an i686 compiler.
7771 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7772 needed.
7773 * configure: Rebuilt.
7774
8a35fb51
SL
77752009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7776
7777 PR gdb/10783
7778
7779 * server.c (handle_search_memory_1): Correct read_addr initialization
7780 in loop for searching subsequent chunks.
7781
96f15937
PP
77822009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7783
7784 * configure.ac: New --with-libthread-db option.
7785 * thread-db.c: Allow direct dependence on libthread_db.
7786 (thread_db_free): Adjust.
7787 * config.in: Regenerate.
7788 * configure: Likewise.
889bf7c5 7789
5f7d1694
PP
77902009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7791
7792 PR gdb/10757
7793 * thread-db.c (attach_thread): New function.
7794 (maybe_attach_thread): Return success/failure.
7795 (find_new_threads_callback): Adjust.
889bf7c5
PA
7796 (thread_db_find_new_threads): Loop until no new threads.
7797
88e3b899
PA
77982009-10-13 Pedro Alves <pedro@codesourcery.com>
7799
7800 * proc-service.c (ps_lgetregs): Formatting.
7801
cdbfd419
PP
78022009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7803
7804 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7805 * configure.ac: Adjust.
7806 * linux-low.h (struct process_info_private): Move members to struct
7807 thread_db.
7808 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7809 * linux-low.c (linux_remove_process): Adjust.
7810 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7811 * server.c (handle_query): Move code ...
7812 (handle_monitor_command): ... here. New function.
7813 * target.h (struct target_ops): New member.
7814 * thread-db.c (struct thread_db): New.
7815 (libthread_db_search_path): New variable.
7816 (thread_db_create_event, thread_db_enable_reporting)
7817 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7818 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7819 (try_thread_db_load_1, dladdr_to_soname): New functions.
7820 (try_thread_db_load, thread_db_load_search): New functions.
7821 (thread_db_init): Search for libthread_db.
7822 (thread_db_free): New function.
7823 (thread_db_handle_monitor_command): Likewise.
7824 * config.in: Regenerate.
7825 * configure: Regenerate.
889bf7c5 7826
4168d2d6
UW
78272009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7828
7829 * spu-low.c (spu_kill): Wait for inferior to terminate.
7830 Call clear_inferiors.
7831 (spu_detach): Call clear_inferiors.
7832
81ecdfbb
RW
78332009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7834
7835 * aclocal.m4: Regenerate.
7836 * config.in: Likewise.
7837 * configure: Likewise.
7838
0b9ff2c0
UW
78392009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7840
7841 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7842 (parse_spufs_run): New function.
7843 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7844 (ppc_breakpoint_at): Handle SPU breakpoints.
7845
efcbbd14
UW
78462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7847
7848 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7849 (SPUFS_MAGIC): Define.
7850 (spu_enumerate_spu_ids): New function.
7851 (linux_qxfer_spu): New function.
7852 (linux_target_ops): Install linux_qxfer_spu.
7853
f4d9bade
UW
78542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7855
7856 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7857 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7858 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7859 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7860 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7861 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7862 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7863 (init_registers_powerpc_cell32l): Add prototype.
7864 (init_registers_powerpc_cell64l): Likewise.
7865 (ppc_arch_setup): Detect Cell/B.E. architecture.
7866
96e946ca
RW
78672009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7868
7869 * Makefile.in (datarootdir): New variable.
7870
58d6951d
DJ
78712009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7872
7873 * linux-low.c (linux_write_memory): Update debugging output.
7874 * Makefile.in (clean): Add new descriptions.
7875 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7876 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7877 * configure.srv: Add new files for arm*-*-linux*.
7878 * linux-arm-low.c: Add new declarations.
7879 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7880 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7881 (HWCAP_VFPv3D16): New.
7882 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7883 instead of __IWMMXT__.
7884 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7885 (arm_arch_setup): New.
7886 (target_regsets): Remove #ifdef. Add VFP regset.
7887 (the_low_target): Use arm_arch_setup.
7888
12b42a12
DJ
78892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7890
7891 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7892 the main thread again.
7893
ac8c974e
AR
78942009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7895
7896 Adding Neutrino gdbserver.
7897 * configure: Regenerated.
7898 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7899 * configure.srv (i[34567]86-*-nto*): New target.
7900 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7901 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7902 (nto_comctrl) [__QNX__]: New function.
7903 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7904
4424e0c3 79052009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7906
7907 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7908 srv_tgtobj.
7909
912cf4ba
PA
79102009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7911 Pedro Alves <pedro@codesourcery.com>
7912
7913 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7914 don't support CONTEXT_EXTENDED_REGISTERS.
7915 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7916 (the_low_target): Install them.
7917 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7918 failing with ERROR_PIPE_NOT_CONNECTED.
7919
aa5ca48f
DE
79202009-06-30 Doug Evans <dje@google.com>
7921 Pierre Muller <muller@ics.u-strasbg.fr>
7922
7923 Add h/w watchpoint support to x86-linux, win32-i386.
7924 * Makefile.in (SFILES): Add i386-low.c
7925 (i386_low_h): Define.
7926 (i386-low.o): Add dependencies.
7927 (linux-x86-low.o): Add i386-low.h dependency.
7928 (win32-i386-low.o): Ditto.
7929 * i386-low.c: New file.
7930 * i386-low.h: New file.
7931 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7932 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7933 * linux-low.c (linux_add_process): Initialize arch_private.
7934 (linux_remove_process): Free arch_private.
7935 (add_lwp): Initialize arch_private.
7936 (delete_lwp): Free arch_private.
7937 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7938 provided.
7939 * linux-low.h (process_info_private): New member arch_private.
7940 (lwp_info): New member arch_private.
7941 (linux_target_ops): New members new_process, new_thread,
7942 prepare_to_resume.
7943 (ptid_of): New macro.
7944 * linux-x86-low.c: Include stddef.h, i386-low.h.
7945 (arch_process_info): New struct.
7946 (arch_lwp_info): New struct.
7947 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7948 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7949 (i386_dr_low_get_status): New function.
7950 (x86_insert_point, x86_remove_point): New functions.
7951 (x86_stopped_by_watchpoint): New function.
7952 (x86_stopped_data_address): New function.
7953 (x86_linux_new_process, x86_linux_new_thread): New functions.
7954 (x86_linux_prepare_to_resume): New function.
7955 (the_low_target): Add entries for insert_point, remove_point,
7956 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7957 prepare_to_resume.
7958 * server.c (debug_hw_points): New global.
7959 (monitor_show_help): Document set debug-hw-points.
7960 (handle_query): Process "set debug-hw-points".
7961 * server.h (debug_hw_points): Declare.
7962 (paddress): Declare.
7963 * utils.c (NUMCELLS, CELLSIZE): New macros.
7964 (get_sell, xsnprintf, paddress): New functions.
7965 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7966 remove_point, stopped_by_watchpoint, stopped_data_address.
7967 * win32-i386-low.c: Include i386-low.h.
7968 (debug_reg_state): Replaces dr.
7969 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7970 (i386_dr_low_get_status): New function.
7971 (i386_insert_point, i386_remove_point): New functions.
7972 (i386_stopped_by_watchpoint): New function.
7973 (i386_stopped_data_address): New function.
7974 (i386_initial_stuff): Update.
7975 (get_thread_context,set_thread_context,i386_thread_added): Update.
7976 (the_low_target): Add entries for insert_point,
7977 remove_point, stopped_by_watchpoint, stopped_data_address.
7978 * win32-low.c (win32_insert_watchpoint): New function.
7979 (win32_remove_watchpoint): New function.
7980 (win32_stopped_by_watchpoint): New function.
7981 (win32_stopped_data_address): New function.
7982 (win32_target_ops): Add entries for insert_watchpoint,
7983 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7984 * win32-low.h (win32_target_ops): New members insert_point,
7985 remove_point, stopped_by_watchpoint, stopped_data_address.
7986
d993e290
PA
79872009-06-25 Pedro Alves <pedro@codesourcery.com>
7988
7989 * server.c (process_serial_event): Re-return unsupported, not
7990 error, if the type isn't recognized. Re-allow supporting only
7991 insert or remove packets. Also call require_running for
7992 breakpoints. Add missing break statement to default case. Tidy.
7993 * target.h (struct target_ops): Rename insert_watchpoint to
7994 insert_point, and remove_watchpoint to remove_point.
7995
7996 * linux-low.h (struct linux_target_ops): Likewise.
7997 * linux-low.c (linux_insert_watchpoint): Rename to ...
7998 (linux_insert_point): ... this. Adjust.
7999 (linux_remove_watchpoint): Rename to ...
8000 (linux_remove_point): ... this. Adjust.
8001 (linux_target_ops): Adjust.
8002 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8003 (cris_insert_point): ... this.
8004 (cris_remove_watchpoint): Rename to ...
8005 (cris_remove_point): ... this.
8006 (the_low_target): Adjust.
8007
0f54c268
PM
80082009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8009
8010 * server.c (handle_v_kill): Pass signal_pid to
8011 kill_inferior if multi_process is zero.
8012
c6314022
AR
80132009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8014
8015 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8016 * target.h (target_ops): Comment for *_watchpoint to make it clear
8017 the functions can get types '0' and '1'.
8018
4463ce24
AR
80192009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8020
8021 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8022 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8023 * regcache.c (get_regcache): Likewise.
8024 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8025 * win32-low.c (child_fetch_inferior_registers): Remove check for
8026 regno 0.
8027
cf8fd78b
PA
80282009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8029 Pedro Alves <pedro@codesourcery.com>
8030
8031 * target.h (struct target_ops) <supports_multi_process>: New
8032 callback.
8033 (target_supports_multi_process): New.
8034 * server.c (handle_query): Even if GDB reports support, only
8035 enable multi-process if the target also supports it. Report
8036 multi-process support only if the target backend supports it.
8037 * linux-low.c (linux_supports_multi_process): New function.
8038 (linux_target_ops): Install it as target_supports_multi_process
8039 callback.
8040
47c0c975
DE
80412009-05-24 Doug Evans <dje@google.com>
8042
e09875d4
DE
8043 Global renaming of find_thread_pid to find_thread_ptid.
8044 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8045 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8046 All callers updated.
8047
e27d73f6
DE
8048 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8049 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8050 directly.
8051
47c0c975
DE
8052 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8053 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8054 (linux_resume_one_lwp): Ditto.
8055
2acc282a
DE
80562009-05-23 Doug Evans <dje@google.com>
8057
8058 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8059 from struct inferior_list_entry * to struct lwp_info *.
8060 All callers updated.
8061
9f1036c1
DE
80622009-05-13 Doug Evans <dje@google.com>
8063
8064 * linux-x86-low.c: Don't include assert.h.
8065 (x86_siginfo_fixup): Use fatal, not assert.
8066 (x86_arch_setup): Fix comment.
8067
d0722149
DE
80682009-05-12 Doug Evans <dje@google.com>
8069
8070 Biarch support for i386/amd64 gdbserver.
8071 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8072 Add linux-x86-low.c.
8073 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8074 (linux-x86-low.o): Add.
8075 * linux-x86-64-low.c: Delete.
8076 * linux-i386-low.c: Delete.
8077 * linux-x86-low.c: New file.
8078 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8079 linux-x86-low.o.
8080 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8081 linux-x86-low.o.
8082 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8083 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8084 (linux_child_pid_to_exec_file): New function.
8085 (elf_64_header_p, elf_64_file_p): New functions.
8086 (siginfo_fixup): New function.
8087 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8088 give target a chance to convert layout.
8089 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8090 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8091
fdeb2a12
DE
80922009-05-07 Doug Evans <dje@google.com>
8093
8094 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8095 (regsets_store_inferior_registers): Ditto.
8096
a6dbe5df
PA
80972009-05-06 Pedro Alves <pedro@codesourcery.com>
8098
8099 PR server/10048
8100
8101 * linux-low.c (must_set_ptrace_flags): Delete.
8102 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8103 of the global.
8104 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8105 `lwp->must_set_ptrace_flags' instead.
ba42693b 8106 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8107 (linux_wait_1): ... not here.
8108
5091eb23
DE
81092009-04-30 Doug Evans <dje@google.com>
8110
9f767825
DE
8111 * inferiors.c (started_inferior_callback): New function.
8112 (attached_inferior_callback): New function.
8113 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8114 * server.c (print_started_pid, print_attached_pid): New functions.
8115 (detach_or_kill_for_exit): New function.
8116 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8117 * server.h (have_started_inferiors_p): Declare.
8118 (have_attached_inferiors_p): Declare.
8119
5091eb23
DE
8120 * inferiors.c (remove_process): Fix memory leak, free process.
8121 * linux-low.c (linux_remove_process): New function.
8122 (linux_kill): Call it instead of remove_process.
8123 (linux_detach, linux_wait_1): Ditto.
8124
155c8968
PA
81252009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8126
8127 * configure.srv: Add x86 Windows CE target.
8128
7fe519cb
UW
81292009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8130
8131 * inferiors.c (get_thread_process): Make global.
8132 * server.h (get_thread_process): Add prototype.
8133 * thread-db.c (find_one_thread): Use get_thread_process
8134 instead of current_process.
8135 (thread_db_get_tls_address): Do not crash if called when
8136 thread layer is not yet initialized.
8137
5472f405
UW
81382009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8139
8140 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8141 * spu-low.c (current_tid): Rename to ...
8142 (current_ptid): ... this.
8143 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8144 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8145 ptid_get_lwp (current_ptid) instead of current_tid.
8146 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8147 instead of current_tid. Use find_process_pid to verify pid
8148 argument is valid. Pass proper argument to remove_process.
8149 (spu_thread_alive): Compare current_ptid instead of current_tid.
8150 (spu_resume): Likewise.
8151
55ac2b99
PA
81522009-04-02 Pedro Alves <pedro@codesourcery.com>
8153
8154 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8155 variable.
8156
95954743
PA
81572009-04-01 Pedro Alves <pedro@codesourcery.com>
8158
8159 Implement the multiprocess extensions, and add linux multiprocess
8160 support.
8161
8162 * server.h (ULONGEST): Declare.
8163 (struct ptid, ptid_t): New.
8164 (minus_one_ptid, null_ptid): Declare.
8165 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8166 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8167 (struct inferior_list_entry): Change `id' type from unsigned from
8168 to ptid_t.
8169 (struct sym_cache, struct breakpoint, struct
8170 process_info_private): Forward declare.
8171 (struct process_info): Declare.
8172 (current_process): Declare.
8173 (all_processes): Declare.
8174 (initialize_inferiors): Declare.
8175 (add_thread): Adjust to use ptid_t.
8176 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8177 (add_process, remove_process, find_thread_pid): Declare.
8178 (find_inferior_id): Adjust to use ptid_t.
8179 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8180 (multi_process): Declare.
8181 (push_event): Adjust to use ptid_t.
8182 (read_ptid, write_ptid): Declare.
8183 (prepare_resume_reply): Adjust to use ptid_t.
8184 (clear_symbol_cache): Declare.
8185 * inferiors.c (all_processes): New.
8186 (null_ptid, minus_one_ptid): New.
8187 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8188 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8189 (add_thread): Change unsigned long to ptid. Remove gdb_id
8190 parameter. Adjust.
8191 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8192 (gdb_id_to_thread): Rename to ...
8193 (find_thread_pid): ... this. Change unsigned long to ptid.
8194 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8195 (loaded_dll, pull_pid_from_list): Adjust.
8196 (add_process, remove_process, find_process_pid)
8197 (get_thread_process, current_process, initialize_inferiors): New.
8198 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8199 (struct target_waitstatus) <related_pid>: Ditto.
8200 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8201 return type to int.
8202 (struct target_ops) <join>: Add `pid' argument.
8203 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8204 (struct target_ops) <wait>: Add `ptid' field. Change return type
8205 to ptid.
8206 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8207 (mywait): Add `ptid' argument. Change return type to ptid_t.
8208 (target_pid_to_str): Declare.
8209 * target.c (set_desired_inferior): Adjust to use ptids.
8210 (mywait): Add new `ptid' argument. Adjust.
8211 (target_pid_to_str): New.
8212 * mem-break.h (free_all_breakpoints): Declare.
8213 * mem-break.c (breakpoints): Delelete.
8214 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8215 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8216 to use per-process breakpoint list.
8217 (free_all_breakpoints): New.
8218 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8219 (symbol_cache, all_symbols_looked_up): Delete.
8220 (hexchars): New.
8221 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8222 read_ptid): New.
8223 (prepare_resume_reply): Change ptid argument's type from unsigned
8224 long to ptid_t. Adjust. Implement W;process and X;process.
8225 (free_sym_cache, clear_symbol_cache): New.
8226 (look_up_one_symbol): Adjust to per-process symbol cache. *
8227 * server.c (cont_thread, general_thread, step_thread): Change type
8228 to ptid_t.
8229 (attached): Delete.
8230 (multi_process): New.
8231 (last_ptid): Change type to ptid_t.
8232 (struct vstop_notif) <ptid>: Change type to ptid_t.
8233 (queue_stop_reply, push_event): Change `ptid' argument's type to
8234 ptid_t.
8235 (discard_queued_stop_replies): Add `pid' argument.
8236 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8237 changes. Don't reference the `attached' global.
8238 (attach_inferior): Adjust to mywait interface changes.
8239 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8240 features. Handle and report "multiprocess+". Handle
8241 "qAttached:PID".
8242 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8243 changes.
8244 (handle_v_kill): New.
8245 (handle_v_stopped): Adjust to use target_pid_to_str.
8246 (handle_v_requests): Allow multiple attaches and runs when
8247 multiprocess extensions are in effect. Handle "vKill".
8248 (myresume): Adjust to use ptids.
8249 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8250 (handle_status): Adjust to discard_queued_stop_replies interface
8251 change.
8252 (first_thread_of, kill_inferior_callback)
8253 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8254 (main): Call initialize_inferiors. Adjust to use ptids, killing
8255 and detaching from all inferiors. Handle multiprocess packet
8256 variants.
8257 * linux-low.h: Include gdb_proc_service.h.
8258 (struct process_info_private): New.
8259 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8260 <lwpid_of>: Use ptid_get_lwp.
8261 (get_lwp_thread): Adjust.
8262 (struct lwp_info): Add `dead' member.
8263 (find_lwp_pid): Declare.
8264 * linux-low.c (thread_db_active): Delete.
8265 (new_inferior): Adjust comment.
8266 (inferior_pid): Delete.
8267 (linux_add_process): New.
8268 (handle_extended_wait): Adjust.
8269 (add_lwp): Change unsigned long to ptid.
8270 (linux_create_inferior): Add process to processes table. Adjust
8271 to use ptids. Don't set new_inferior here.
8272 (linux_attach_lwp): Rename to ...
8273 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8274 it. Adjust to use ptids.
8275 (linux_attach_lwp): New.
8276 (linux_attach): Add process to processes table. Don't set
8277 new_inferior here.
8278 (struct counter): New.
8279 (second_thread_of_pid_p, last_thread_of_process_p): New.
8280 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8281 multiple processes.
8282 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8283 processes. Remove process from process table.
8284 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8285 to multiple processes.
8286 (any_thread_of): New.
8287 (linux_detach): Add `pid' argument, and handle it. Remove process
8288 from processes table.
8289 (linux_join): Add `pid' argument. Handle it.
8290 (linux_thread_alive): Change unsighed long argument to ptid_t.
8291 Consider dead lwps as not being alive.
8292 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8293 threads we're not interested in.
8294 (same_lwp, find_lwp_pid): New.
8295 (linux_wait_for_lwp): Change `pid' argument's type from int to
8296 ptid_t. Adjust.
8297 (linux_wait_for_event): Rename to ...
8298 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8299 from int to ptid_t. Adjust.
8300 (linux_wait_for_event): New.
8301 (linux_wait_1): Add `ptid' argument. Change return type to
8302 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8303 that exit from the process table.
8304 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8305 Adjust.
8306 (mark_lwp_dead): New.
8307 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8308 stopping all threads, mark its main lwp as dead.
8309 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8310 ptids.
8311 (fetch_register, usr_store_inferior_registers)
8312 (regsets_fetch_inferior_registers)
8313 (regsets_store_inferior_registers, linux_read_memory)
8314 (linux_write_memory): Inline `inferior_pid'.
8315 (linux_look_up_symbols): Adjust to use per-process
8316 `thread_db_active'.
8317 (linux_request_interrupt): Adjust to use ptids.
8318 (linux_read_auxv): Inline `inferior_pid'.
8319 (initialize_low): Don't reference thread_db_active.
8320 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8321 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8322 (ps_getpid): Return the pid of the current inferior.
8323 * thread-db.c (proc_handle, thread_agent): Delete.
8324 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8325 per-process data.
8326 (find_one_thread): Change argument type to ptid_t. Adjust to
8327 per-process data.
8328 (maybe_attach_thread): Adjust to per-process data and ptids.
8329 (thread_db_find_new_threads): Ditto.
8330 (thread_db_init): Ditto.
8331 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8332 processes table. Adjust to use ptids.
8333 (spu_kill, spu_detach): Adjust interface. Remove process from
8334 processes table.
8335 (spu_join, spu_thread_alive): Adjust interface.
8336 (spu_wait): Adjust interface. Remove process from processes
8337 table. Adjust to use ptids.
8338 * win32-low.c (current_inferior_tid): Delete.
8339 (current_inferior_ptid): New.
8340 (debug_event_ptid): New.
8341 (thread_rec): Take a ptid. Adjust.
8342 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8343 (child_delete_thread): Ditto.
8344 (do_initial_child_stuff): Add `attached' argument. Add process to
8345 processes table.
8346 (child_fetch_inferior_registers, child_store_inferior_registers):
8347 Adjust.
8348 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8349 (win32_attach): Pass 1 to do_initial_child_stuff.
8350 (win32_kill): Adjust interface. Remove process from processes
8351 table.
8352 (win32_detach): Ditto.
8353 (win32_join): Adjust interface.
8354 (win32_thread_alive): Take a ptid.
8355 (win32_resume): Adjust to use ptids.
8356 (get_child_debug_event): Ditto.
8357 (win32_wait): Adjust interface. Remove exiting process from
8358 processes table.
8359
bd99dc85
PA
83602009-04-01 Pedro Alves <pedro@codesourcery.com>
8361
8362 Non-stop mode support.
8363
8364 * server.h (non_stop): Declare.
8365 (gdb_client_data, handler_func): Declare.
8366 (delete_file_handler, add_file_handler, start_event_loop):
8367 Declare.
8368 (handle_serial_event, handle_target_event, push_event)
8369 (putpkt_notif): Declare.
8370 * target.h (enum resume_kind): New.
8371 (struct thread_resume): Replace `step' field by `kind' field.
8372 (TARGET_WNOHANG): Define.
8373 (struct target_ops) <wait>: Add `options' argument.
8374 <supports_non_stop, async, start_non_stop>: New fields.
8375 (target_supports_non_stop, target_async): New.
8376 (start_non_stop): Declare.
8377 (mywait): Add `options' argument.
8378 * target.c (mywait): Add `options' argument. Print child exit
8379 notifications here.
8380 (start_non_stop): New.
8381 * server.c (non_stop, own_buf, mem_buf): New globals.
8382 (struct vstop_notif): New.
8383 (notif_queue): New global.
8384 (queue_stop_reply, push_event, discard_queued_stop_replies)
8385 (send_next_stop_reply): New.
8386 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8387 interface changes.
8388 (attach_inferior): In non-stop mode, don't wait for the target
8389 here.
8390 (handle_general_set): Handle QNonStop.
8391 (handle_query): When handling qC, return the current general
8392 thread, instead of the first thread of the list.
8393 (handle_query): If the backend supports non-stop mode, include
8394 QNonStop+ in the qSupported query response.
8395 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8396 and non-stop mode.
8397 (handle_v_attach, handle_v_run): Handle non-stop mode.
8398 (handle_v_stopped): New.
8399 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8400 (myresume): Adjust to use resume_kind. Handle non-stop.
8401 (queue_stop_reply_callback): New.
8402 (handle_status): Handle non-stop mode.
8403 (main): Clear non_stop flag on reconnection. Use the event-loop.
8404 Refactor serial protocol handling from here ...
8405 (process_serial_event): ... to this new function. When GDB
8406 selects any thread, select one here. In non-stop mode, wait until
8407 GDB acks all pending events before exiting.
8408 (handle_serial_event, handle_target_event): New.
8409 * remote-utils.c (remote_open): Install remote_desc in the event
8410 loop.
8411 (remote_close): Remove remote_desc from the event loop.
8412 (putpkt_binary): Rename to...
8413 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8414 (putpkt_binary): New as wrapper around putpkt_binary_1.
8415 (putpkt_notif): New.
8416 (prepare_resume_reply): In non-stop mode, don't change the
8417 general_thread.
8418 * event-loop.c: New.
8419 * Makefile.in (OBJ): Add event-loop.o.
8420 (event-loop.o): New rule.
8421
8422 * linux-low.h (pid_of): Moved here.
8423 (lwpid_of): New.
8424 (get_lwp_thread): Use lwpid_of.
8425 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8426 * linux-low.c (pid_of): Delete.
8427 (inferior_pid): Use lwpid_of.
8428 (linux_event_pipe): New.
8429 (target_is_async_p): New.
8430 (delete_lwp): New.
8431 (handle_extended_wait): Use lwpid_of.
8432 (add_lwp): Don't set lwpid field.
8433 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8434 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8435 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8436 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8437 first. Adjust to linux_wait_for_event interface changes. Use
8438 lwpid_of.
8439 (linux_detach): Don't delete the main lwp here.
8440 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8441 (status_pending_p): Don't consider explicitly suspended lwps.
8442 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8443 pointer. Add OPTIONS argument. Change return type to int. Use
8444 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8445 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8446 pointer. Add status pointer argument. Return a pid instead of a
8447 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8448 changes. In non-stop mode, don't switch to a random thread.
8449 (linux_wait): Rename to...
8450 (linux_wait_1): ... this. Add target_options argument, and handle
8451 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8452 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8453 clean exit and signal exit code. Don't stop all threads in
8454 non-stop mode. In all-stop mode, only stop all threads when
8455 reporting a stop to GDB. Handle explicit thread stop requests.
8456 (async_file_flush, async_file_mark): New.
8457 (linux_wait): New.
8458 (send_sigstop): Use lwpid_of.
8459 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8460 interface changes. In non-stop mode, don't switch to a random
8461 thread.
8462 (linux_resume_one_lwp): Use lwpid_of.
8463 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8464 (linux_resume_one_thread): ... this. Handle resume_stop. In
8465 non-stop mode, don't look for pending flag in all threads.
8466 (resume_status_pending_p): Don't consider explicitly suspended
8467 threads.
8468 (my_waitpid): Reimplement. Emulate __WALL.
8469 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8470 Use lwpid_of.
8471 (sigchld_handler, linux_supports_non_stop, linux_async)
8472 (linux_start_non_stop): New.
8473 (linux_target_ops): Register linux_supports_non_stop, linux_async
8474 and linux_start_non_stop.
8475 (initialize_low): Install SIGCHLD handler.
8476 * thread-db.c (thread_db_create_event, find_one_thread)
8477 (thread_db_get_tls_address): Use lwpid_of.
8478 * win32-low.c (win32_detach): Adjust to use resume_kind.
8479 (win32_wait): Add `options' argument.
8480 * spu-low.c (spu_resume): Adjust to use resume_kind.
8481 (spu_wait): Add `options' argument.
8482
5b1c542e
PA
84832009-04-01 Pedro Alves <pedro@codesourcery.com>
8484
8485 Decouple target code from remote protocol.
8486
8487 * target.h (enum target_waitkind): New.
8488 (struct target_waitstatus): New.
8489 (struct target_ops) <wait>: Return an unsigned long. Take a
8490 target_waitstatus pointer instead of a char pointer.
8491 (mywait): Likewise.
8492 * target.c (mywait): Change prototype to return an unsigned long.
8493 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8494 * server.h (thread_from_wait, old_thread_from_wait): Delete
8495 declarations.
8496 (prepare_resume_reply): Change prototype to take a
8497 target_waitstatus.
8498 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8499 (last_status, last_ptid): New.
8500 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8501 pid instead of a signal.
8502 (attach_inferior): Remove "status" and "signal" parameters.
8503 Adjust.
8504 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8505 not as an address.
8506 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8507 (handle_v_requests, myresume): Remove "status" and "signal"
8508 parameters. Adjust.
8509 (handle_status): New.
8510 (main): Delete local `status'. Adjust.
8511 * remote-utils.c: Include target.h.
8512 (prepare_resume_reply): Change prototype to take a
8513 target_waitstatus. Adjust.
8514
8515 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8516 interface.
8517 * spu-low.c (spu_wait): Adjust.
8518 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8519 Delete.
8520 (win32_wait): Adjust.
8521
2bd7c093
PA
85222009-04-01 Pedro Alves <pedro@codesourcery.com>
8523
8524 * target.h (struct thread_resume): Delete leave_stopped member.
8525 (struct target_ops): Add a `n' argument to the `resume' callback.
8526 * server.c (start_inferior): Adjust.
8527 (handle_v_cont, myresume): Adjust.
8528 * linux-low.c (check_removed_breakpoint): Adjust to resume
8529 interface change, and to removed leave_stopped field.
8530 (resume_ptr): Delete.
8531 (struct thread_resume_array): New.
8532 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8533 resume interface change.
8534 (linux_continue_one_thread, linux_queue_one_thread)
8535 (resume_status_pending_p): Check if the resume field is NULL
8536 instead of checking the leave_stopped member.
8537 (linux_resume): Adjust to the target resume interface change.
8538 * spu-low.c (spu_resume): Adjust to the target resume interface
8539 change.
8540 * win32-low.c (win32_detach, win32_resume): Ditto.
8541
c35fafde
PA
85422009-04-01 Pedro Alves <pedro@codesourcery.com>
8543
8544 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8545 flag.
8546 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8547 pending.
8548 (linux_continue_one_thread): Only preserve the stepping flag if
8549 there's a pending breakpoint.
8550
0a59d50b
PA
85512009-03-31 Pedro Alves <pedro@codesourcery.com>
8552
8553 * server.c (main): After the inferior having exited, call
8554 remote_close before exiting gdbserver.
8555
f04c6d38
TJB
85562009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8557
8558 Fix size of FPSCR in Power 7 processors.
8559 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8560 (PPC_FEATURE_HAS_DFP): New #define.
8561 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8562 size of the FPSCR.
8563
78e5cee6
PA
85642009-03-23 Pedro Alves <pedro@codesourcery.com>
8565
8566 * server.c (handle_query) Whitespace and formatting.
8567
1b3f6016
PA
85682009-03-22 Pedro Alves <pedro@codesourcery.com>
8569
8570 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8571 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8572 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8573 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8574 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8575 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8576 Makefile.in, configure.ac: Fix whitespace throughout.
8577 * configure: Regenerate.
8578
a07b2135
PA
85792009-03-22 Pedro Alves <pedro@codesourcery.com>
8580
8581 * inferiors.c (find_inferior): Make it safe for the callback
8582 function to delete the currently iterated inferior.
8583
67cc2626
PA
85842009-03-22 Pedro Alves <pedro@codesourcery.com>
8585
8586 * Makefile.in (linuw_low_h): Move higher.
8587 (thread-db.o): Depend on $(linux_low_h).
8588
54a0b537
PA
85892009-03-17 Pedro Alves <pedro@codesourcery.com>
8590
8591 Rename "process" to "lwp" throughout.
8592
8593 * linux-low.c (all_processes): Rename to...
8594 (all_lwps): ... this.
8595 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8596 (add_process): Rename to ...
8597 (add_lwp): ... this. Adjust.
8598 (linux_create_inferior): Adjust.
8599 (linux_attach_lwp): Adjust.
8600 (linux_attach): Adjust.
8601 (linux_kill_one_process): Rename to ...
8602 (linux_kill_one_lwp): ... this. Adjust.
8603 (linux_kill): Adjust.
8604 (linux_detach_one_process): Rename to ...
8605 (linux_detach_one_lwp): ... this. Adjust.
8606 (linux_detach): Adjust.
8607 (check_removed_breakpoint): Adjust.
8608 (status_pending_p): Adjust.
8609 (linux_wait_for_process): Rename to ...
8610 (linux_wait_for_lwp): ... this. Adjust.
8611 (linux_wait_for_event): Adjust.
8612 (send_sigstop): Adjust.
8613 (wait_for_sigstop): Adjust.
8614 (stop_all_processes): Rename to ...
8615 (stop_all_lwps): ... this.
8616 (linux_resume_one_process): Rename to ...
8617 (linux_resume_one_lwp): ... this. Adjust.
8618 (linux_set_resume_request, linux_continue_one_thread)
8619 (linux_queue_one_thread, resume_status_pending_p)
8620 (usr_store_inferior_registers, regsets_store_inferior_registers)
8621 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8622 Adjust.
8623 * linux-low.h (get_process): Rename to ...
8624 (get_lwp): ... this. Adjust.
8625 (get_thread_process): Rename to ...
8626 (get_thread_lwp): ... this. Adjust.
8627 (get_process_thread): Rename to ...
8628 (get_lwp_thread): ... this. Adjust.
8629 (struct process_info): Rename to ...
8630 (struct lwp_info): ... this.
8631 (all_processes): Rename to ...
8632 (all_lwps): ... this.
8633 * proc-service.c (ps_lgetregs): Adjust.
8634 * thread-db.c (thread_db_create_event, find_one_thread)
8635 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8636
0b16c5cf
PA
86372009-03-14 Pedro Alves <pedro@codesourcery.com>
8638
8639 * server.c (handle_query): Handle "qAttached".
8640
32de4b9d
NS
86412009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8642
8643 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8644 GPLv3, update license URL.
8645
2aecd87f
DE
86462009-03-01 Doug Evans <dje@google.com>
8647
93efd302 8648 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8649 (server_h): Add gdb_signals.h.
8650 (signals.o): Update.
8651 * server.h (target_signal_from_host,target_signal_to_host_p)
8652 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8653
86b1f9c5
PM
86542009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8655
8656 * remote-utils.c (getpkt): Also generate remote-debug
8657 information if noack_mode is set.
8658
4aa995e1
PA
86592009-02-06 Pedro Alves <pedro@codesourcery.com>
8660
8661 * server.c (handle_query): Report qXfer:siginfo:read and
8662 qXfer:siginfo:write as supported and handle them.
8663 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8664 * linux-low.c (linux_xfer_siginfo): New.
8665 (linux_target_ops): Set it.
8666
62709adf
PA
86672009-01-26 Pedro Alves <pedro@codesourcery.com>
8668
8669 * server.c (gdbserver_usage): Mention --remote-debug.
8670 (main): Accept '--remote-debug' switch.
8671
aef93bd7
DE
86722009-01-18 Doug Evans <dje@google.com>
8673
8674 * regcache.c (new_register_cache): No need to check result of xcalloc.
8675 * server.c (handle_search_memory): Back out calls to xmalloc,
8676 result is checked and error is returned to user upon failure.
8677 (handle_query): Ditto. Add more checks for result of malloc.
8678 (handle_v_cont): Check result of malloc, report error back to
8679 user upon failure.
8680 (handle_v_run): Ditto. Call freeargv.
8681 * server.h (freeargv): Declare.
8682 * utils.c (freeargv): New fn.
8683
54363045
DE
86842009-01-15 Doug Evans <dje@google.com>
8685
f626972c
DE
8686 * gdbreplay.c (perror_with_name): Make arg const char *.
8687 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8688 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8689 * utils.c (perror_with_name): Make arg const char *.
54363045 8690
18aae699
PA
86912009-01-14 Pedro Alves <pedro@codesourcery.com>
8692
8693 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8694 when handling a EXIT_PROCESS_DEBUG_EVENT.
8695
ff703abe
JB
86962009-01-06 Joel Brobecker <brobecker@adacore.com>
8697
8698 * gdbreplay.c (gdbreplay_version): Update copyright year.
8699 * server.c (gdbserver_version): Likewise.
8700
f21cc1a2 87012009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8702
8703 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8704 (handle_extended_wait): Improve comment.
0e21c1ec 8705
bca929d3
DE
87062008-12-13 Doug Evans <dje@google.com>
8707
8708 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8709 * server.h (ATTR_MALLOC): New macro.
8710 (xmalloc,xcalloc,xstrdup): Declare.
8711 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8712 * inferiors.c: Ditto.
8713 * linux-low.c: Ditto.
8714 * mem-break.c: Ditto.
8715 * regcache.c: Ditto.
8716 * remote-utils.c: Ditto.
8717 * server.c: Ditto.
8718 * target.c: Ditto.
8719 * win32-low.c: Ditto.
8720
97438e3f
DE
87212008-12-12 Doug Evans <dje@google.com>
8722
896c7fbb
DE
8723 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8724 in debugging printf.
8725
97438e3f
DE
8726 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8727
e3b886f8
DE
87282008-12-09 Doug Evans <dje@google.com>
8729
8730 * linux-low.h (struct process_info): Delete member tid, unused.
8731 * thread-db.c (find_one_thread): Update.
8732 (maybe_attach_thread): Update.
8733
07e059b5
VP
87342008-12-02 Pedro Alves <pedro@codesourcery.com>
8735
889bf7c5
PA
8736 * target.h (struct target_ops): Add qxfer_osdata member.
8737 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8738 and dirent.h.
8739 (linux_qxfer_osdata): New functions.
8740 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8741 callback.
8742 * server.c (handle_query): Handle "qXfer:osdata:read:".
8743 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8744 (buffer_xml_printf): New functions.
8745 * server.h (struct buffer): New.
8746 (buffer_grow_str, buffer_grow_str0): New macros.
8747 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8748 (buffer_xml_printf): Declare.
07e059b5 8749
4cab47ab
DE
87502008-11-24 Doug Evans <dje@google.com>
8751
8752 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8753
f142445f
DJ
87542008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8755
8756 * server.c (handle_v_run): Always use the supplied argument list.
8757
d0107bb6 87582008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8759
d0107bb6
BW
8760 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8761 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8762
2c4ad781
TJB
87632008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8764
8765 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8766 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8767 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8768 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8769 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8770 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8771 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8772 XML target descriptions.
8773 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8774 when inferior is running on an ISA 2.05 or later processor. Add
8775 special case to return offset for full 64-bit slot of FPSCR when
8776 in 32-bits.
8777
dfb64f85
DJ
87782008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8779
8780 * Makefile.in (SFILES, clean): Added sparc64 files.
8781 (reg-sparc64.o, reg-sparc64.c): New.
8782 * configure.srv (sparc*-*-linux*): New configuration.
8783 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8784 syscall arguments for SPARC.
8785 (regsets_store_inferior_registers): Likewise.
8786 * linux-sparc-low.c: New file.
8787
66b6e1dd
DE
87882008-10-21 Doug Evans <dje@google.com>
8789
8790 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8791 (READLINE_DIR,READLINE_DEP): Delete.
8792 (INTERNAL_CFLAGS): Update.
8793 (LINTFLAGS): Update.
8794
9b710a42
PA
87952008-10-10 Pedro Alves <pedro@codesourcery.com>
8796
8797 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8798 whole argv from the last run, not just argv[0].
8799
5822d809
PA
88002008-09-08 Pedro Alves <pedro@codesourcery.com>
8801
8802 * regcache.c (new_register_cache): Return NULL if the register
8803 cache size isn't known yet.
8804 (free_register_cache): Avoid dereferencing a NULL regcache.
8805
74aac56f
DJ
88062008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8807
8808 * configure.srv: Merge MIPS and MIPS64.
8809
400b20f5
MR
88102008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8811
8812 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8813
677c5bb1
LM
88142008-08-18 Luis Machado <luisgpm@br.ibm.com>
8815
8816 * Makefile.in: Add required vsx dependencies.
8817
8818 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8819 Declare init_registers_powerpc_vsx32l.
8820 Declare init_registers_powerpc_vsx64l.
8821 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8822 (ppc_arch_setup): Check for VSX in hwcap.
8823 (ppc_fill_vsxregset): New function.
8824 (ppc_store_vsxregset): New function.
8825 Add new VSX entry in regset_info target_regsets.
8826
8827 * configure.srv: Add new VSX dependencies.
8828
a6f3e723
SL
88292008-08-12 Pedro Alves <pedro@codesourcery.com>
8830
8831 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8832 (remote_open): Set or clear transport_is_reliable.
8833 (putpkt_binary): Don't expect acks in noack mode.
8834 (getpkt): Don't send ack/nac in noack mode.
8835 * server.c (handle_general_set): Handle QStartNoAckMode.
8836 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8837 qSupported.
8838 (main): Reset noack_mode on every connection.
8839 * server.h (noack_mode): Declare.
8840
a417dc56
RW
88412008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8842
8843 * Makefile.in (GDBREPLAY_OBS): New variable.
8844 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8845
3221518c
UW
88462008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8847 Daniel Jacobowitz <dan@codesourcery.com>
8848
8849 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8850 (usr_store_inferior_registers): Likewise.
8851 (regsets_store_inferior_registers): Likewise.
8852
ec56be1b
PA
88532008-07-31 Rolf Jansen <rj@surtec.com>
8854 Pedro Alves <pedro@codesourcery.com>
8855
8856 * configure.ac: Check for memmem declaration.
8857 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8858 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8859 (disable_packet_qfThreadInfo): Unconditionally compile.
8860 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8861 * configure, config.in: Regenerate.
8862
2fe5e3ff
DE
88632008-07-28 Doug Kwan <dougkwan@google.com>
8864
8865 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8866 (linux_write_memory): Remove declaration of errno.
8867
836acd6d
UW
88682008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8869
8870 * linux-low.c (handle_extended_wait): Do not use "status"
8871 variable uninitialized.
8872
aeba519e
PA
88732008-07-07 Pedro Alves <pedro@codesourcery.com>
8874
8875 * server.c (handle_v_attach): Inhibit reporting dll changes.
8876
db42f210
PA
88772008-06-27 Pedro Alves <pedro@codesourcery.com>
8878
8879 * remote-utils.c (prepare_resume_reply): If requested, don't
8880 output "thread:TID" in the T stop reply.
8881
8882 * server.c (disable_packet_vCont, disable_packet_Tthread)
8883 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8884 (handle_query): If requested, disable support for qC, qfThreadInfo
8885 and qsThreadInfo.
8886 (handle_v_requests): If requested, disable support for vCont.
8887 (gdbserver_show_disableable): New.
8888 (main): Handle --disable-packet and --disable-packet=LIST.
8889
8890 * server.h (disable_packet_vCont, disable_packet_Tthread)
8891 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8892
8e4c5421
CD
88932008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8894
8895 * server.c (gdbserver_usage): Mention --version.
8896
6e23a804
DJ
88972008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8898
8899 * Makefile.in (gdbreplay.o): New rule.
8900
90aa6a40
JM
89012008-06-06 Joseph Myers <joseph@codesourcery.com>
8902
8903 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8904 message, not gdbserver.
8905
c16158bc 89062008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8907 Nathan Sidwell <nathan@codesourcery.com>
8908 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8909
8910 * acinclude.m4: Include ../../config/acx.m4.
8911 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8912 * configure, config.in: Regenerate.
8913 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8914 * server.c (gdbserver_version): Print PKGVERSION.
8915 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8916 (main): Adjust gdbserver_usage calls.
8917 * gdbreplay.c (version, host_name): Add declarations.
8918 (gdbreplay_version, gdbreplay_usage): New.
8919 (main): Accept --version and --help options.
8920
aeb75bf5
DJ
89212008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8922
8923 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8924 (arm_breakpoint_at): Handle Thumb.
8925 (the_low_target): Add comment.
8926
76b233dd
UW
89272008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8928
8929 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8930
08388c79
DE
89312008-05-09 Doug Evans <dje@google.com>
8932
a3c83fae
DE
8933 * server.h (decode_search_memory_packet): Declare.
8934 * remote-utils.c (decode_search_memory_packet): New fn.
8935 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8936 (handle_search_memory): New fn.
8937 (handle_query): Process qSearch:memory packets.
8938
bb9c3d36
UW
89392008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8940
8941 * regcache.c (registers_length): Remove.
8942 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8943 full register packet.
8944 * regcache.h (registers_length): Remove prototype.
8945 * server.h (PBUFSIZ): Define to 16384.
8946
7284e1be
UW
89472008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8948
8949 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8950 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8951 powerpc-64l.o, and powerpc-altivec64l.o.
8952 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8953 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8954 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8955 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8956 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8957 to srv_xmlfiles.
8958
8959 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8960 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8961 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8962 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8963 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8964 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8965 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8966 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8967 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8968 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8969 (clean): Update.
8970
8971 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8972 (init_registers_powerpc_32l): ... this new prototype.
8973 (init_registers_powerpc_32): Remove, replace by ...
8974 (init_registers_powerpc_altivec32l): ... this new prototype.
8975 (init_registers_powerpc_e500): Remove, replace by ...
8976 (init_registers_powerpc_e500l): ... this new prototype.
8977 (init_registers_ppc64): Remove, replace by ...
8978 (init_registers_powerpc_64l): ... this new prototype.
8979 (init_registers_powerpc_64): Remove, replace by ...
8980 (init_registers_powerpc_altivec64l): ... this new prototype.
8981 (ppc_num_regs): Set to 73.
8982 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8983 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8984 (ppc_cannot_store_register): Handle orig_r3 and trap.
8985 (ppc_arch_setup): Update init_registers_... calls.
8986 (ppc_fill_gregset): Handle orig_r3 and trap.
8987
8988 * inferiors.c (clear_inferiors): Reset current_inferior.
8989
fdc59709
PB
89902008-04-23 Paolo Bonzini <bonzini@gnu.org>
8991
889bf7c5
PA
8992 * acinclude.m4: Add override.m4.
8993 * configure: Regenerate.
fdc59709 8994
c9b2f845
UW
89952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8996
8997 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8998 initial call to init_register_ppc64.
8999
550512b8
UW
90002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9001
43aaf8b6
PA
9002 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9003 single powerpc*-*-linux* case.
550512b8
UW
9004 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9005
b6430ec3
UW
90062008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9007
9008 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9009 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9010 from reg_xmlfiles.
9011 * linux-ppc-low.c: Include <elf.h>.
9012 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9013 (ppc_hwcap): New global variable.
9014 (ppc_regmap): Remove __SPE__ #ifdef sections.
9015 (ppc_regmap_e500): New global variable.
9016 (ppc_cannot_store_register): Update __SPE__ special case.
9017 (ppc_get_hwcap): New function.
9018 (ppc_arch_setup): Use it to determine whether inferior supports
9019 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9020 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9021 Do not access registers if target does not support AltiVec.
9022 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9023 Do not access registers if target does not support SPE.
9024 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9025
52fa2412
UW
90262008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9027
9028 * linux-low.c (disabled_regsets, num_regsets): New.
9029 (use_regsets_p): Delete.
9030 (linux_wait_for_process): Clear disabled_regsets.
9031 (regsets_fetch_inferior_registers): Check and set it.
9032 (regsets_store_inferior_registers): Likewise.
9033 (linux_fetch_registers, linux_store_registers): Do not use
9034 use_regsets_p.
9035 (initialize_low): Allocate disabled_regsets.
9036
e28b3332
DJ
90372008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9038
9039 * Makefile.in (LIBOBJS): New.
9040 (OBS): Use LIBOBJS.
9041 (memmem.o): New rule.
9042 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9043 * configure: Regenerated.
9044
4536995d
UW
90452008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9046
9047 * server.c (handle_query): Never return "unsupported" for
9048 qXfer:features:read queries.
9049
221c031f
UW
90502008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9051
9052 * server.c (get_features_xml): Fix inverted condition.
9053 (handle_query): Always support qXfer:feature:read.
9054
ccd213ac
DJ
90552008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9056
9057 * server.c (wrapper_argv): New.
9058 (start_inferior): Handle wrapper_argv. If set, expect an extra
9059 trap.
9060 (gdbserver_usage): Document --wrapper.
9061 (main): Parse --wrapper.
9062
6fe305f7
UW
90632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9064
9065 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9066 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9067 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9068 (ppc_set_pc): Likewise.
9069 (ppc_arch_setup): New function.
9070 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9071 of collect_register.
889bf7c5 9072 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9073
5b0a002e
UW
90742008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9075
9076 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9077 instead of linux-ppc64-low.o.
9078 * linux-ppc64-low.c: Remove file.
9079 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9080 (linux-ppc64-low.o): Remove rule.
9081
9082 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9083 (init_registers_powerpc_64): Likewise.
9084 (ppc_regmap): Conditionally define depending on __powerpc64__.
9085 (ppc_cannot_store_register): Do not special-case "fpscr" when
9086 compiled on __powerpc64__.
9087 (ppc_collect_ptrace_register): New function.
9088 (ppc_supply_ptrace_register): New function.
9089 (ppc_breakpoint): Change type to "unsigned int".
9090 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9091 (the_low_target): Conditionally provide initializers for the
889bf7c5 9092 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9093 collect_ptrace_register and supply_ptrace_register members.
9094
9b4b61c8
UW
90952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9096
9097 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9098 * server.c (gdbserver_xmltarget): Define.
9099 (get_features_xml): Use it to replace "target.xml" and arch_string.
9100
9101 * configure.srv: Remove srv_xmltarget. Add XML files that were
9102 mentioned there to srv_xmlfiles instead. Remove conditional tests
9103 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9104 srv_xmlfiles and srv_regobj to include all possible choices.
9105 * configure.ac (srv_xmltarget): Remove.
9106 (srv_xmlfiles): Do not add "target.xml".
9107 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9108 checks for supplementary target information.
9109 * configure: Regenerate.
9110 * Makefile.in (XML_TARGET): Remove.
9111 (target.xml): Remove rule.
9112 (clean): Do not clean up target.xml.
9113 (.PRECIOUS): Do not mention target.xml.
9114
9115 * target.h (struct target_ops): Remove arch_string member.
9116 * linux-low.c (linux_arch_string): Remove.
9117 (linux_target_ops): Remove arch_string initializer.
9118 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9119 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9120 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9121 * spu-low.c (spu_arch_string): Remove.
9122 (spu_target_ops): Remove arch_string initializer.
9123 * win32-low.c (win32_arch_string): Remove.
9124 (win32_target_ops): Remove arch_string initializer.
9125 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9126 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9127 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9128
ee1a7ae4
UW
91292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9130
9131 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9132 by collect_ptrace_register and supply_ptrace_register hooks.
9133 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9134 instead of checking for the_low_target.left_pad_xfer.
9135 (usr_store_inferior_registers): Use collect_ptrace_register callback
9136 instead of checking for the_low_target.left_pad_xfer.
9137
9138 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9139 (s390_supply_ptrace_register): Likewise.
9140 (s390_fill_gregset): Call s390_collect_ptrace_register.
9141 (the_low_target): Update.
9142
9143 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9144 (ppc_supply_ptrace_register): Likewise.
9145 (the_low_target): Update.
9146
9147 * linux-i386-low.c (the_low_target): Update.
9148 * linux-x86-64-low.c (the_low_target): Update.
9149
d61ddec4
UW
91502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9151
9152 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9153 reg-s390.o and reg-s390x.o.
9154
9155 * linux-low.c (new_inferior): New global variable.
9156 (linux_create_inferior, linux_attach): Set it.
9157 (linux_wait_for_process): Call the_low_target.arch_setup after the
9158 target has stopped for the first time.
9159 (initialize_low): Do not call the_low_target.arch_setup.
9160
9161 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9162 (s390_set_pc): Likewise.
9163 (s390_arch_setup): New function.
9164 (the_low_target): Use s390_arch_setup as arch_setup routine.
9165
9166 * regcache.c (realloc_register_cache): New function.
9167 (set_register_cache): Call it for each existing regcache.
9168
d05b4ac3
UW
91692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9170
9171 * server.h (init_registers): Remove prototype.
9172
9173 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9174 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9175 instead of init_registers ().
9176 * linux-arm-low.c (init_registers_arm): Add prototype.
9177 (init_registers_arm_with_iwmmxt): Likewise.
9178 (the_low_target): Add initializer for arch_setup field.
9179 * linux-cris-low.c (init_registers_cris): Add prototype.
9180 (the_low_target): Add initializer for arch_setup field.
9181 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9182 (the_low_target): Add initializer for arch_setup field.
9183 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9184 (the_low_target): Add initializer for arch_setup field.
9185 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9186 (the_low_target): Add initializer for arch_setup field.
9187 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9188 (the_low_target): Add initializer for arch_setup field.
9189 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9190 (the_low_target): Add initializer for arch_setup field.
9191 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9192 (init_registers_mips64_linux): Likewise.
9193 (the_low_target): Add initializer for arch_setup field.
9194 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9195 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9196 (the_low_target): Add initializer for arch_setup field.
9197 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9198 (init_registers_powerpc_64): Likewise.
9199 (the_low_target): Add initializer for arch_setup field.
9200 * linux-s390-low.c (init_registers_s390): Add prototype.
9201 (init_registers_s390x): Likewise.
9202 (the_low_target): Add initializer for arch_setup field.
9203 * linux-sh-low.c (init_registers_sh): Add prototype.
9204 (the_low_target): Add initializer for arch_setup field.
9205 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9206 (the_low_target): Add initializer for arch_setup field.
9207 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9208 (the_low_target): Add initializer for arch_setup field.
9209
9210 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9211 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9212 instead of init_registers ().
9213 * win32-arm-low.c (init_registers_arm): Add prototype.
9214 (the_low_target): Add initializer for arch_setup field.
9215 * win32-i386-low.c (init_registers_i386): Add prototype.
9216 (the_low_target): Add initializer for arch_setup field.
9217
9218 * spu-low.c (init_registers_spu): Add prototype.
9219 (initialize_low): Call initialie_registers_spu () instead of
9220 initialize_registers ().
9221
fd96d250
PA
92222008-02-19 Pedro Alves <pedro@codesourcery.com>
9223
9224 * server.c (handle_v_requests): When handling the vRun and vAttach
9225 packets, if already debugging a process, don't kill it. Return an
9226 error instead.
9227
d41b6bb4
DJ
92282008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9229
9230 * server.c (handle_query): Correct length check.
9231
5ac588cf
PA
92322008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9233
9234 * win32-low.c (do_initial_child_stuff): Add process handle
9235 parameter. Set current_process_handle and current_process_id from the
9236 parameters. Clear globals.
9237 (win32_create_inferior): Don't set current_process_handle and
9238 current_process_id here. Instead pass them on the call to
9239 do_initial_child_stuff.
9240 (win32_attach): Likewise.
9241 (win32_clear_inferiors): New.
9242 (win32_kill): Don't close the current process handle or the
9243 current thread handle here. Instead call win32_clear_inferiors.
9244 (win32_detach): Don't open a new handle to the process. Call
9245 win32_clear_inferiors.
9246 (win32_join): Don't rely on current_process_handle; open a new
9247 handle using the process id.
9248 (win32_wait): Call win32_clear_inferiors when the inferior process
9249 has exited.
9250
ecd7ecbc
DJ
92512008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9252
9253 * server.c (monitor_show_help): Add "exit".
9254
1525d545
MG
92552008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9256
ecd7ecbc 9257 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9258 (clean): Add reg-xtensa.c.
9259 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9260 * configure.srv (xtensa*-*-linux*) New target.
9261 * linux-xtensa-low.c: New.
9262 * xtensa-xtregs.c: New.
1525d545 9263
59a016f0
PA
92642008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9265
9266 * hostio.c: Don't include errno.h.
9267 (errno_to_fileio_errno): Move to hostio-errno.
9268 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9269 error number outputting to the target->hostio_last_error callback.
9270 (hostio_packet_error): Use FILEIO_EINVAL directly.
9271 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9272 calls to hostio_error.
9273 * hostio-errno.c: New.
9274 * server.h (hostio_last_error_from_errno): Declare.
9275 * target.h (target_ops): Add hostio_last_error member.
9276 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9277 as hostio_last_error handler.
889bf7c5 9278 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9279 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9280 (wince_hostio_last_error): New functions.
9281 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9282 as hostio_last_error handler.
9283 (win32_target_ops) [!_WIN32_WCE]: Register
9284 hostio_last_error_from_errno as hostio_last_error handler.
9285 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9286 (hostio-errno.o): New rule.
9287 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9288 * configure.srv (srv_hostio_err_objs): New variable. Default to
9289 hostio-errno.o.
9290 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9291 * configure: Regenerate.
9292
2d717e4f
DJ
92932008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9294
9295 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9296 (linux_kill, linux_detach): Clean up the process list.
9297 * remote-utils.c (remote_open): Improve port number parsing.
9298 (putpkt_binary, input_interrupt): Only send interrupts if the target
9299 is running.
9300 * server.c (extended_protocol): Make static.
9301 (attached): Define earlier.
9302 (exit_requested, response_needed, program_argv): New variables.
9303 (target_running): New.
9304 (start_inferior): Clear attached here.
9305 (attach_inferior): Set attached here.
9306 (require_running): Define.
9307 (handle_query): Use require_running and target_running. Implement
9308 "monitor exit".
9309 (handle_v_attach, handle_v_run): New.
9310 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9311 (gdbserver_usage): Update.
9312 (main): Redo argument parsing. Handle --debug and --multi. Handle
9313 --attach along with other options or after the port. Save
9314 program_argv. Support no initial program. Resynchronize
9315 communication with GDB after an error. Handle "monitor exit".
9316 Use require_running and target_running. Always allow the extended
9317 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9318 restart in extended mode.
9319 * README: Refer to the GDB manual. Update --attach usage.
9320
7407e2de
AS
93212007-12-20 Andreas Schwab <schwab@suse.de>
9322
9323 * linux-low.c (STACK_SIZE): Define.
9324 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9325 (linux_test_for_tracefork): Likewise.
9326
b65d95c5
DJ
93272007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9328
9329 * linux-low.c (linux_wait_for_event): Update messages. Do not
9330 reinsert auto-delete breakpoints.
9331 * mem-break.c (struct breakpoint): Change return type of handler to
9332 int.
9333 (set_breakpoint_at): Update handler type.
9334 (reinsert_breakpoint_handler): Return 1 instead of calling
9335 delete_breakpoint.
9336 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9337 setting a new one.
9338 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9339 * mem-break.h (set_breakpoint_at): Update handler type.
9340 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9341 * win32-low.c (auto_delete_breakpoint): New.
9342 (get_child_debug_event): Use it.
9343
4e799345
DJ
93442007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * configure.ac: Check for pread and pwrite.
9347 * hostio.c (handle_pread): Fall back to lseek and read.
9348 (handle_pwrite): Fall back to lseek and write.
9349 * config.in, configure: Regenerated.
9350
27524b67
DJ
93512007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9352
9353 * server.c (myresume): Add own_buf argument.
9354 (main): Update calls.
9355
a20d5e98
DJ
93562007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9357
9358 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9359 * remote-utils.c (remote_open): Do not call disable_async_io.
9360 (block_async_io): Delete.
9361 (unblock_async_io): Make static.
9362 (initialize_async_io): New.
9363 * server.c (handle_v_cont): Handle async I/O here.
9364 (myresume): Likewise. Move other common resume tasks here...
9365 (main): ... from here. Call initialize_async_io. Disable async
9366 I/O before the main loop.
9367 * server.h (initialize_async_io): Declare.
9368 (block_async_io, unblock_async_io): Delete prototypes.
9369 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9370
b79d787e
DJ
93712007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9372
9373 * remote-utils.c (readchar): Allow binary data in received messages.
9374
d97903b2
PA
93752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9376
9377 * win32-low.c (attaching): New global.
9378 (win32_create_inferior): Clear the `attaching' global.
9379 (win32_attach): Set the `attaching' global.
9380 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9381 attaching. Only set a breakpoint at the entry point if not
9382 attaching.
9383
311de423
PA
93842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9385
9386 * server.c (main): Don't report dll events on the initial
9387 connection on attaches.
9388
6c2d16d2
PA
93892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9390
9391 * server.c (main): Relax numerical bases supported for the pid of
9392 the --attach command line argument.
9393
5ca906e6
PA
93942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9395
9396 * win32-low.c (win32_attach): Call OpenProcess before
9397 DebugActiveProcess, not after. Add last error output to error
9398 call.
9399
9c6c8194
PA
94002007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9401
9402 * win32-low.c (win32_get_thread_context)
9403 (win32_set_thread_context): New functions.
9404 (thread_rec): Use win32_get_thread_context.
9405 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9406 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9407 field.
9408
4d5d1aaa
PA
94092007-12-03 Leo Zayas
9410 Pedro Alves <pedro_alves@portugalmail.pt>
9411
9412 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9413 global variables.
9414 (child_add_thread): Minor cleanup.
9415 (child_continue): Resume artificially suspended threads before
9416 calling ContinueDebugEvent.
9417 (suspend_one_thread): New.
9418 (fake_breakpoint_event): New.
9419 (get_child_debug_event): Change return type to int. Check here if
9420 gdb sent an interrupt request. If a soft interrupt was requested,
9421 fake a breakpoint event. Return 0 if there is no event to handle,
9422 and 1 otherwise.
9423 (win32_wait): Don't check here if gdb sent an interrupt request.
9424 Ensure there is a valid event to handle.
9425 (win32_request_interrupt): Add soft interruption method as last
9426 resort.
9427
c436e841
PA
94282007-12-03 Leo Zayas
9429 Pedro Alves <pedro_alves@portugalmail.pt>
9430
9431 * win32-low.h (win32_thread_info): Add descriptions to the
9432 structure members. Replace `suspend_count' counter by a
9433 `suspended' flag.
9434 * win32-low.c (thread_rec): Update condition of when to get the
9435 context from the inferior. Rely on ContextFlags being set if it
9436 has already been retrieved. Only suspend the inferior thread if
9437 we haven't already. Warn if that fails.
9438 (continue_one_thread): s/suspend_count/suspended/. Only call
9439 ResumeThread once. Warn if that fails.
9440
e7b5fa67
PA
94412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9442
9443 * win32-low.c (win32_wait): Don't read from the inferior when it
9444 has already exited.
9445
a385171d
PA
94462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9447
9448 * Makefile.in (win32_low_h): New variable.
9449 (win32-low.o): Add dependency on $(win32_low_h).
9450 (win32-arm-low.o, win32-i386-low.o): New rules.
9451
f80c84b3
DJ
94522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9453
9454 * hostio.c: Correct copyright year.
9455
a6b151f1
DJ
94562007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9457
9458 * Makefile.in (OBS): Add hostio.o.
9459 (hostio.o): New rule.
9460 * server.h (handle_vFile): Declare.
9461 * hostio.c: New file.
9462 * server.c (handle_v_requests): Take packet_len and new_packet_len
9463 for binary packets. Call handle_vFile.
9464 (main): Update call to handle_v_requests.
9465
f9387fc3
DJ
94662007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9467
9468 * linux-low.c: Include <sched.h>.
9469
51c2684e
DJ
94702007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9471
9472 * linux-low.c (linux_tracefork_grandchild): New.
9473 (linux_tracefork_child): Use clone.
9474 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9475
75f83163
JB
94762007-10-31 Joel Brobecker <brobecker@adacore.com>
9477
9478 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9479
da5898ce
DJ
94802007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9481
9482 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9483
24a09b5f
DJ
94842007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * inferiors.c (change_inferior_id): Delete.
9487 (add_pid_to_list, pull_pid_from_list): New.
9488 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9489 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9490 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9491 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9492 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9493 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9494 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9495 (using_threads): Always set to 1.
9496 (handle_extended_wait): New.
9497 (add_process): Do not set TID.
9498 (linux_create_inferior): Set must_set_ptrace_flags.
9499 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9500 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9501 (linux_thread_alive): Rename TID argument to LWPID.
9502 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9503 (linux_wait_for_event): Do not use TID or check using_threads. Update
9504 call to dead_thread_notify. Call handle_extended_wait.
9505 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9506 (send_sigstop): Delete sigstop_sent.
9507 (wait_for_sigstop): Avoid TID.
9508 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9509 (linux_test_for_tracefork): New.
9510 (linux_lookup_signals): Use thread_db_active and
9511 linux_supports_tracefork_flag.
9512 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9513 * linux-low.h (get_process_thread): Avoid TID.
9514 (struct process_ifo): Move thread_known and tid to the end. Remove
9515 sigstop_sent.
9516 (linux_attach_lwp, thread_db_init): Update prototypes.
9517 * server.h (change_inferior_id): Delete prototype.
9518 (add_pid_to_list, pull_pid_from_list): New prototypes.
9519 * thread-db.c (thread_db_use_events): New.
9520 (find_first_thread): Rename to...
9521 (find_one_thread): ...this. Update callers and messages. Do not
9522 call fatal. Check thread_db_use_events. Do not call
9523 change_inferior_id or new_thread_notify.
9524 (maybe_attach_thread): Update. Do not call new_thread_notify.
9525 (thread_db_init): Set thread_db_use_events. Check use_events.
9526 * utils.c (fatal, warning): Correct message prefix.
9527
30ed0a8f
DJ
95282007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9529
9530 * Makefile.in (clean): Remove new files.
9531 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9532 (powerpc-64.o, powerpc-64.c): New rules.
9533 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9534 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9535 with SPE.
9536 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9537 SPE targets.
9538 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9539 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9540 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9541 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9542 (target_regsets): Add AltiVec and SPE register sets.
9543 * configure.ac: Check for AltiVec and SPE.
9544 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9545 (ppc_fill_vrregset, ppc_store_vrregset): New.
9546 (target_regsets): Add AltiVec register set.
9547 * configure: Regenerated.
9548
fd462a61
DJ
95492007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9550
9551 * linux-low.c (O_LARGEFILE): Define.
9552 (linux_read_memory): Use /proc/PID/mem.
9553 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9554 * configure, config.in: Regenerated.
9555
69f223ed
DJ
95562007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9557
9558 * linux-low.c (linux_wait_for_event): Do not pass signals while
9559 single-stepping.
9560
aec18585
PA
95612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9562
9563 * win32-low.c (create_process): New.
9564 (win32_create_inferior): Use create_process instead of
9565 CreateProcess. If create_process failed retry appending an ".exe"
9566 suffix. Store the GetLastError result immediatelly after
9567 create_process calls and use it on the call to error.
9568
34d86ddd
PA
95692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9570
9571 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9572
5a0e3bd0
JB
95732007-08-23 Joel Brobecker <brobecker@adacore.com>
9574
9575 * configure.ac: Switch license to GPLv3.
9576
f88c79e6
MS
95772007-08-01 Michael Snyder <msnyder@access-company.com>
9578
9579 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9580
6b3d9b83
PA
95812007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9582
9583 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9584 typedef.
9585 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9586 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9587 CloseToolhelp32Snapshot.
9588 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9589 CloseToolhelp32Snapshot.
9590
c588c53c
MS
95912007-07-27 Michael Snyder <michael.snyder@access-company.com>
9592
9593 * server.c (main): Check for inferior exit before main loop.
9594
aa0403d9
PA
95952007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9596
9597 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9598 instead of on tmp_desc.
9599
255e7678
DJ
96002007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9601 Daniel Jacobowitz <dan@codesourcery.com>
9602
9603 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9604 (add_thread): Minor cleanups.
9605 (clear_inferiors): Move lower in the file. Clear the DLL
9606 list.
9607 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9608 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9609 (xml_escape_text): New.
9610 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9611 for qSupported.
9612 (handle_v_cont): Report errors.
9613 (gdbserver_version): Update.
9614 (main): Correct size of own_buf. Do not report initial DLL events.
9615 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9616 (unloaded_dll, xml_escape_text): New.
9617 * win32-low.c (enum target_waitkind): Update comments.
9618 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9619 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9620 (win32_EnumProcessModules, win32_GetModuleInformation)
9621 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9622 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9623 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9624 (win32_Module32First, win32_Module32Next, load_toolhelp)
9625 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9626 (get_child_debug_event): Handle DLL events.
9627 (win32_wait): Likewise.
9628
0d37add9
DJ
96292007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9630
9631 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9632 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9633
45e2715e
PA
96342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9635
9636 * win32-low.c (handle_output_debug_string): Ignore event if not
9637 waiting.
9638
c5674cf1
PA
96392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9640
9641 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9642
2bbe3cc1
DJ
96432007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9644
9645 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9646
ae13219e
DJ
96472007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9648
9649 * inferiors.c (change_inferior_id): Add comment.
9650 * linux-low.c (check_removed_breakpoint): Add an early
9651 prototype. Improve debug output.
9652 (linux_attach): Doc update.
9653 (linux_detach_one_process, linux_detach): Clean up before releasing
9654 each process.
9655 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9656 * linux-low.h (struct process_info): Doc improvement.
9657 * mem-break.c (delete_all_breakpoints): New.
9658 * mem-break.h (delete_all_breakpoints): New prototype.
9659 * thread-db.c (find_first_thread): New.
9660 (thread_db_create_event): Call it instead of
9661 thread_db_find_new_threads. Clean up unused variables.
9662 (maybe_attach_thread): Remove first thread handling.
9663 (thread_db_find_new_threads): Use find_first_thread.
9664 (thread_db_get_tls_address): Likewise.
9665
4105de34
DJ
96662007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * thread-db.c (thread_db_find_new_threads): Add prototype.
9669 (thread_db_create_event): Check for the main thread before adding
9670 a new thread.
9671 (maybe_attach_thread): Only enable event reporting if TID == 0.
9672 (thread_db_get_tls_address): Check for new threads.
9673
2b876972
DJ
96742007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * linux-low.c (linux_create_inferior): Try execv before execvp.
9677 * spu-low.c (spu_create_inferior): Likewise.
9678
7a245884
DJ
96792007-06-13 Mike Frysinger <vapier@gentoo.org>
9680
9681 * linux-low.c (linux_create_inferior): Change execv to execvp.
9682 * spu-low.c (spu_create_inferior): Likewies.
9683
117ce543
DJ
96842007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * Makefile.in (clean): Clean new files instead of deleted ones.
9687 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9688 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9689 rules.
9690 * configure.srv: Specify XML files and new regformats for MIPS and
9691 MIPS64 GNU/Linux.
9692 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9693 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9694 an entry for the restart register.
9695 (mips_cannot_fetch_register, mips_cannot_store_register)
9696 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9697 register names to match the XML descriptions.
9698 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9699 restart register instead of $0.
9700
0e7f50da
UW
97012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9702 Markus Deuling <deuling@de.ibm.com>
9703
9704 * remote-utils.c (decode_xfer_write): New function.
9705 * server.h (decode_xfer_write): Add prototype.
9706 * server.c (handle_query): Add PACKET_LEN argument. Support
9707 qXfer:spu:read and qXfer:spu:write packets.
9708 (main): Pass packet_len to handle_query.
9709 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9710 * target.h (target_ops): Add qxfer_spu.
9711
374c1d38
UW
97122007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9713
9714 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9715 accessing non-seekable spufs files.
9716
bb63802a
UW
97172007-05-16 Markus Deuling <deuling@de.ibm.com>
9718
889bf7c5 9719 * server.c (handle_query): Add reply for qC packet.
bb63802a 9720
7390519e
PA
97212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9722 Leo Zayas <lerele@champenstudios@com>
9723
9724 * server.h (check_remote_input_interrupt_request): New function.
9725 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9726 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9727 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9728 (check_remote_input_interrupt_request): New function.
9729 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9730 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9731 winapi_GenerateConsoleCtrlEvent): New typedefs.
9732 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9733 to 250 ms.
9734 (win32_wait): Check for remote interrupt request
9735 with check_remote_input_interrupt_request.
9736 (win32_request_interrupt): New function.
9737 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9738
34b34921
PA
97392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9740
9741 * win32-low.c (debug_registers_changed,
9742 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9743 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9744 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9745 (thread_rec): Get context using the low target.
9746 (child_add_thread): Call thread_added on the low target,
9747 which does the same thing.
9748 (regptr): Delete.
9749 (do_initial_child_stuff): Remove debug registers references.
9750 Set context using the low target. Resume threads after
9751 setting the contexts.
9752 (child_continue): Remove dead variable. Remove debug
9753 registers references.
9754 (child_fetch_inferior_registers): Go through the low target.
9755 (do_child_store_inferior_registers): Remove.
9756 (child_store_inferior_registers): Go through the low target.
9757 (win32_resume): Remove debug registers references.
9758 Set context using the low target.
9759 (handle_exception): Change return type to void. Don't record
9760 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9761 first chance exception.
889bf7c5 9762 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9763 goto loop. Always return after waiting for debug event.
9764 (win32_wait): Convert to switch statement. Handle spurious
9765 events.
9766
9767 * win32-i386-low.c (debug_registers_changed,
9768 debug_registers_used): New.
9769 (initial_stuff): Rename to ...
9770 (i386_initial_stuff): ... this. Clear debug registers
9771 state variables.
9772 (store_debug_registers): Delete.
9773 (i386_get_thread_context): New.
9774 (load_debug_registers): Delete.
9775 (i386_set_thread_context): New.
9776 (i386_thread_added): New.
9777 (single_step): Rename to ...
9778 (i386_single_step): ... this.
9779 (do_fetch_inferior_registers): Rename to ...
9780 (i386_fetch_inferior_register): ... this.
9781 (i386_store_inferior_register): New.
9782 (the_low_target): Adapt to new interface.
9783
9784 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9785 (arm_get_thread_context): New.
9786 (arm_set_thread_context): New.
9787 (regptr): New.
9788 (do_fetch_inferior_registers): Rename to ...
9789 (arm_fetch_inferior_register): ... this.
9790 (arm_store_inferior_register): New.
9791 (arm_wince_breakpoint): Reimplement as unsigned long.
9792 (arm_wince_breakpoint_len): Define.
9793 (the_low_target): Adapt to new interface.
9794
9795 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9796 load_debug_registers. Add get_thread_context, set_thread_context,
9797 thread_added and store_inferior_register. Rename
9798 fetch_inferior_registers to fetch_inferior_register.
9799 (regptr): Remove declaration.
9800
dd6953e1
PA
98012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9802
9803 * linux-low.c (linux_detach): Change return type to int. Return 0.
9804 * spu-low.c (spu_detach): Likewise.
9805
444d6139
PA
98062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9807
9808 * target.h (target_ops): Change return type of detach to int.
9809 Add join.
9810 (join_inferior): New.
9811 * server.c (main): Don't skip detach support on mingw32.
9812 If the inferior doesn't support detaching return error.
9813 Call join_inferior instead of using waitpid.
9814 * linux-low.c (linux_join): New.
9815 (linux_target_op): Add linux_join.
9816 * spu-low.c (spu_join): New.
9817 (spu_target_ops): Add spu_join.
9818 * win32-low.c (win32_detach): Adapt to new interface.
9819 Reopen current_process_handle before detaching. Issue a child
9820 resume before detaching.
9821 (win32_join): New.
9822 (win32_target_op): Add win32_join.
9823
1d5315fe
PA
98242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9825
9826 * win32-low.c (win32-attach): Fix return value.
9827 * target.h (target_ops): Describe ATTACH return values.
9828
bf914831
PA
98292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9830
9831 * win32-low.c (GETPROCADDRESS): Define.
9832 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9833 (winapi_DebugSetProcessKillOnExit): Likewise.
9834 (win32_create_inferior): Force usage of ansi CreateProcessA.
9835 (win32_attach): Use GETPROCADDRESS.
9836 (win32_detach): Likewise.
9837
f72f3e60
PA
98382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9839
9840 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9841
ed50f18f
PA
98422007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9843
9844 * win32-low.c: Commit leftover changes from 2007-03-29.
9845
0c2ead7e
DJ
98462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9847
9848 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9849 fields short instead of int. Add explicit padding.
9850 (i387_cache_to_fsave): Remove unnecessary casts.
9851 (i387_fsave_to_cache): Doc fix.
9852 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9853
73725ff3
DJ
98542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9855
9856 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9857 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9858
d99f33d8
PA
98592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9860
9861 * configure.srv (arm*-*-mingw32ce*): Move near the other
9862 arm targets.
9863
68070c10
PA
98642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9865
2482afc6 9866 * configure.ac: Add errno checking.
68070c10
PA
9867 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9868 sys/file.h and malloc.h.
9869 (AC_CHECK_DECLS): Add perror.
9870 (srv_mingwce): Handle.
2482afc6 9871 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9872 win32-i386-low.o to srv_tgtobj.
9873 (i[34567]86-*-mingw*): Likewise.
9874 (arm*-*-mingw32ce*): Add case.
9875 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9876 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9877 [__MINGW32CE__] (strerror): New function.
9878 [__MINGW32CE__] (errno): Define to GetLastError.
9879 [__MINGW32CE__] (COUNTOF): New macro.
9880 (remote_open): Remove extra close call.
9881 * mem-break.c (delete_breakpoint_at): New function.
9882 * mem-break.h (delete_breakpoint_at): Declare.
9883 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9884 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9885 [USE_WIN32API] (read, write): Add char* casts.
9886 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9887 * server.h: Include wincecompat.h on Windows CE.
9888 [HAVE_ERRNO_H]: Check.
9889 (perror): Declare if not declared.
9890 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9891 (perror_with_name): Remove errno declaration.
9892 * wincecompat.h: New.
9893 * wincecompat.c: New.
9894 * win32-low.h: New.
9895 * win32-arm-low.c: New.
9896 * win32-i386-low.c: New.
9897 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9898 (OUTMSG2): Make it safe.
9899 (_T): New macro.
9900 (COUNTOF): New macro.
9901 (NUM_REGS): Get it from the low target.
9902 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9903 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9904 (thread_rec): Let low target handle debug registers.
9905 (child_add_thread): Likewise.
9906 (child_init_thread_list): Likewise.
9907 (continue_one_thread): Likewise.
9908 (regptr): New.
9909 (do_child_fetch_inferior_registers): Move to ...
9910 * win32-i386-low.c: ... here, and rename to ...
9911 (do_fetch_inferior_registers): ... this.
889bf7c5 9912 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9913 Go through the low target.
9914 (do_child_store_inferior_registers): Use regptr.
9915 (strwinerror): New function.
9916 (win32_create_inferior): Handle Windows CE.
9917 Use strwinerror instead of strerror on Windows error
9918 codes. Add program to the error output.
9919 Don't close the main thread handle on Windows CE.
9920 (win32_attach): Use coredll.dll on Windows CE.
9921 (win32_kill): Close current process and current
9922 thread handles.
9923 (win32_detach): Use coredll.dll on Windows CE.
9924 (win32_resume): Let low target handle debug registers, and
9925 step request.
9926 (handle_exception): Add/Remove initial breakpoint. Avoid
9927 non-existant WSTOPSIG on Windows CE.
9928 (win32_read_inferior_memory): Cast to remove warning.
9929 (win32_arch_string): Go through the low target.
9930 (initialize_low): Call set_breakpoint_data with the low
9931 target's breakpoint.
9932 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9933 FOP_REGNUM, mappings): Move to ...
9934 * win32-i386-low.c: ... here.
9935 * win32-low.c (win32_thread_info): Move to ...
9936 * win32-low.h: ... here.
9937 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9938 win32-arm-low.c and wincecompat.c.
9939 (all:): Add $EXEEXT.
9940 (install-only:): Likewise.
9941 (gdbserver:): Likewise.
9942 (gdbreplay:): Likewise.
9943 * config.in: Regenerate.
9944 * configure: Regenerate.
9945
41093d81
PA
99462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9947
9948 * win32-low.c: Rename typedef thread_info to
9949 win32_thread_info throughout.
9950
544afa54
PA
99512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9952
9953 * win32-i386-low.c: Rename to ...
9954 * win32-low.c: ... this.
9955 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9956 * Makefile.in: Likewise.
9957
bce7165d
PA
99582007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9959
9960 * remote-utils.c (monitor_output): Constify msg parameter.
9961 * server.h (monitor_output): Likewise.
9962 * win32-i386-low.c (handle_output_debug_string): New.
9963 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9964 handle_output_debug_string.
9965 (get_child_debug_event): Likewise.
9966
506c7aa0
DJ
99672007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9968
9969 * server.c (main): Correct strtoul check.
9970
42c81e2a
DJ
99712007-03-27 Jon Ringle <jon@ringle.org>
9972
9973 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9974
9453113a
DJ
99752007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9976
9977 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9978
64a69107
DJ
99792007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9980
9981 * terminal.h: Check HAVE_SGTTY_H.
9982
99832007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9984
9985 * remote-utils.c (remote_open): Print out the assigned port number.
9986
c74d0ad8
DJ
99872007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9988
9989 * remote-utils.c (monitor_output): New function.
9990 * server.c (debug_threads): Define here.
9991 (monitor_show_help): New function.
9992 (handle_query): Handle qRcmd.
9993 (main): Do not handle 'd' packet.
9994 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9995 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9996 of debug_threads.
9997
de7c3b4a
PA
99982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9999
10000 * Makefile.in (EXEEXT): New.
10001 (clean): Use $(EXEEXT).
10002
ef57601b
PA
100032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10004
10005 * target.h (target_ops): Rename send_signal to request_interrupt,
10006 and remove enum target_signal parameter.
10007 * linux-low.c (linux_request_interrupt): Rename from
10008 linux_send_signal, and always send SIGINT.
10009 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10010 and always send SIGINT.
10011 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10012 of send_signal.
10013 (input_interrupt): Likewise.
10014
820f2bda
PA
100152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10016
10017 * server.c (get_features_xml): Check if target implemented
10018 arch_string.
10019 * win32-i386-low.c (win32_arch_string): New.
10020 (win32_target_ops): Add win32_arch_string as arch_string member.
10021
ab39bf24
UW
100222007-02-22 Markus Deuling <deuling@de.ibm.com>
10023
10024 * spu-low.c (spu_arch_string): New.
10025 (spu_target_ops): Add spu_arch_string.
10026
61ff6e04
DJ
100272007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10028
10029 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10030 * configure.ac: Do not check for terminal.h.
10031 * configure, config.in: Regenerated.
10032
fb1e4ffc
DJ
100332007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10034
10035 * Makefile.in (OBS): Add $(XML_BUILTIN).
10036 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10037 (clean): Update.
10038 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10039 (arm-with-iwmmxt.c): New.
10040 * config.in, configure: Regenerate.
10041 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10042 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10043 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10044 (arm*-*-linux*): Add iWMMXt and regset support.
10045 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10046 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10047 (arm_store_wmmxregset, target_regsets): New.
10048 * server.c (get_features_xml): Take annex argument. Check builtin
10049 XML documents.
10050 (handle_query): Handle multiple annexes.
10051
0f48aa01
DJ
100522007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * remote-utils.c [USE_WIN32API] (read, write): Define.
10055 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10056 write.
10057
23181151
DJ
100582007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10059
10060 * linux-i386-low.c (the_low_target): Set arch_string.
10061 * linux-x86-64-low.c (the_low_target): Likewise.
10062 * linux-low.c (linux_arch_string): New.
10063 (linux_target_ops): Add it.
10064 * linux-low.h (struct linux_target_ops): Add arch_string.
10065 * server.c (write_qxfer_response): Use const void * for DATA.
10066 (get_features_xml): New.
10067 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10068 * target.h (struct target_ops): Add arch_string method.
10069
9d606399
DJ
100702007-01-03 Denis Pilat <denis.pilat@st.com>
10071 Daniel Jacobowitz <dan@codesourcery.com>
10072
10073 * linux-low.c (linux_kill): Handle being called with no threads.
10074 * win32-i386-low.c (win32_kill): Likewise.
10075 (get_child_debug_event): Clear current_process_handle.
10076
100772006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10078 Daniel Jacobowitz <dan@codesourcery.com>
10079
10080 * remote-utils.c (remote_open): Check the type of specified
10081 serial port devices before opening them.
10082 * server.c (main): Kill the inferior if an error occurs during
10083 the first remote_open.
10084
a5e13d24
DJ
100852006-12-05 Markus Deuling <deuling@de.ibm.com>
10086
10087 * README: Update supported targets.
10088
186947f7
DJ
100892006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10090
10091 * Makefile.in (clean): Remove reg-mips64.c.
10092 (reg-mips64.c, reg-mips64.o): New rules.
10093 * configure.srv: Handle mips64. Include regset support for mips.
10094 * linux-mips-low.c (union mips_register): New.
10095 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10096 (mips_breakpoint, mips_breakpoint_at): Use int.
10097 (mips_collect_register, mips_supply_register)
10098 (mips_collect_register_32bit, mips_supply_register_32bit)
10099 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10100 (mips_store_fpregset, target_regsets): New.
10101 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10102
a13e2c95
UW
101032006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10104
10105 * configure.srv: Add target "spu*-*-*".
10106 * Makefile.in (clean): Remove reg-spu.c.
10107 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10108 * spu-low.c: New file.
10109
cb7283db
DJ
101102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * configure.ac: Correct td_thr_tls_get_addr test.
10113 * configure: Regenerated.
10114
89be2091
DJ
101152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * linux-low.c (linux_wait_for_event): Reformat. Use the
10118 pass_signals array.
10119 * remote-utils.c (decode_address_to_semicolon): New.
10120 * server.c (pass_signals, handle_general_set): New.
10121 (handle_query): Mention QPassSignals for qSupported.
10122 (main): Call handle_general_set.
10123 * server.h (pass_signals, decode_address_to_semicolon): New.
10124
000ef4f0
DJ
101252006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10126
10127 * server.c (handle_query): Correct error handling for read_auxv.
10128
b7149293
UW
101292005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10130
10131 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10132 and srv_linux_thread_db to yes.
10133 * linux-s390-low.c (s390_fill_gregset): New function.
10134 (target_regsets): Define data structure.
10135
dae5f5cf
DJ
101362006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10137
10138 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10139 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10140 * config.in, configure: Regenerated.
10141 * inferiors.c (gdb_id_to_thread): New function.
10142 (gdb_id_to_thread_id): Use it.
10143 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10144 * linux-low.h (struct process_info): Add th member.
10145 (thread_db_get_tls_address): New prototype.
10146 * remote-utils.c (decode_address): Make non-static.
10147 * server.c (handle_query): Handle qGetTLSAddr.
10148 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10149 * target.h (struct target_ops): Add get_tls_address.
10150 * thread-db.c (maybe_attach_thread): Save the thread handle.
10151 (thread_db_get_tls_address): New.
10152
32ca6d61
DJ
101532006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10154
10155 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10156 (linux_resume_one_process): Take a siginfo_t *. Update all
10157 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10158 (struct pending_signals): Add a siginfo_t.
10159 (linux_wait_for_process): Always set last_status.
10160 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10161 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10162 * linux-low.h (struct process_info): Add last_status.
10163
5ffff7c1
DJ
101642006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10165
10166 * remote-utils.c (try_rle): New function.
10167 (putpkt_binary): Use it.
10168
8695c747
DJ
101692006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10170
10171 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10172 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10173 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10174 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10175 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10176 point registers.
10177
290fadea
RS
101782006-08-08 Richard Sandiford <richard@codesourcery.com>
10179
10180 * server.c (terminal_fd): New variable.
10181 (old_foreground_pgrp): Likewise.
10182 (restore_old_foreground_pgrp): New function.
10183 (start_inferior): Record the terminal file descriptor in terminal_fd
10184 and its original foreground group in old_foreground_pgrp. Register
10185 restore_old_foreground_pgrp with atexit().
10186
9f2e1e63
DJ
101872006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10188
10189 * server.c (handle_query): Correct qPart to qXfer.
10190
b80864fb
DJ
101912006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10192
10193 * configure.ac: Check for more headers which are missing on
10194 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10195 * configure.srv: Add Cygwin and mingw32.
10196 * remote-utils.c: Don't include headers unconditionally which
10197 are missing on mingw32. Include <winsock.h> for mingw32.
10198 (remote_open): Adjust for mingw32 support. Flush
10199 standard error after writing to it.
10200 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10201 (unblock_async_io, enable_async_io, disable_async_io)
10202 (readchar, getpkt): Update for Winsock support.
10203 (prepare_resume_reply): Expect a protocol signal number.
10204 * server.c: Disable <sys/wait.h> on mingw32.
10205 (start_inferior): Adjust for mingw32 support. Flush
10206 standard error after writing to it.
10207 (attach_inferior): Likewise. Use protocol signal
10208 numbers.
10209 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10210 and names.
10211 * win32-i386-low.c: New file.
10212 * Makefile.in (XM_CLIBS): Set.
10213 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10214 (win32-i386-low.o): New dependency rule.
10215 * linux-low.c (linux_wait): Use target signal numbers.
10216 * target.h (struct target_ops): Doc fix.
10217 * server.h (target_signal_to_name): New prototype.
10218 * gdbreplay.c: Don't include headers unconditionally which
10219 are missing on mingw32. Include <winsock.h> for mingw32.
10220 (remote_close, remote_open): Adjust for Winsock support.
10221 * configure, config.in: Regenerated.
10222
0876f84a
DJ
102232006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10224
10225 * server.c (decode_xfer_read, write_qxfer_response): New.
10226 (handle_query): Take a packet length argument. Handle
10227 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10228 the qSupported response.
10229 (main): Update call to handle_query.
10230
01f9e8fa
DJ
102312006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10232
10233 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10234 (putpkt_binary): Renamed from putpkt and adjusted for binary
10235 data.
10236 (putpkt): New wrapper for putpkt_binary.
10237 (readchar): Don't mask off the high bit.
10238 (decode_X_packet): New function.
10239 * server.c (main): Call putpkt_binary if a handler sets the packet
10240 length. Save the length of the incoming packet. Handle 'X'.
10241 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10242
be2a5f71
DJ
102432006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * server.c (handle_query): Handle qSupported.
10246
ea025f5f
DJ
102472006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * remote-utils.c (all_symbols_looked_up): New variable.
10250 (look_up_one_symbol): Check it.
10251 * server.h (look_up_one_symbol): New declaration.
10252 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10253
9308fc88
DJ
102542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10255
10256 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10257 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10258 (PTRACE_GET_THREAD_AREA): Define.
10259 (ps_get_thread_area): New function.
10260
52fb6437
NS
102612006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10262
10263 * configure.srv (m68k*-*-uclinux*): New target.
10264 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10265 (linux_resume_one_process): Remove extraneous cast.
10266 (linux_read_offsets): New.
10267 (linux_target_op): Add linux_read_offsets on mmuless systems.
10268 * server.c (handle_query): Add qOffsets logic.
10269 * target.h (struct target_ops): Add read_offsets.
10270
21b0f40c
DJ
102712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10272
10273 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10274 (PTRACE_GET_THREAD_AREA): Define.
10275 (ps_get_thread_area): New function.
10276 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10277 (linux-x86-64-low.o): Update.
10278
0050a760
DJ
102792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * configure.ac: Remove checks for prfpregset_t.
10282 * gdb_proc_service.h: New file.
10283 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10284 new "gdb_proc_service.h".
10285 * proc-service.c: Likewise.
10286 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10287 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10288 * Makefile.in (gdb_proc_service_h): Updated.
10289 * configure, config.in: Regenerated.
10290
b92a518e
DJ
102912006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * remote-utils.c (prepare_resume_reply): Move declaration
10294 of gdb_id_from_wait to the top of the block.
10295
545587ee
DJ
102962006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * linux-low.c (regsets_store_inferior_registers): Read the regset
10299 from the target before filling it.
10300
9db87ebd
DJ
103012006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * server.c (attach_inferior): Return SIGTRAP for a successful
10304 attach.
10305
dd24457d
DJ
103062006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10307
10308 * Makefile.in (OBS): Add version.o.
10309 (STAGESTUFF): Delete.
10310 (version.o): Add dependencies.
10311 (version.c): Replace rule.
10312 (clean): Remove version.c.
10313 * server.c (gdbserver_version): New.
10314 (gdbserver_usage): Use printf.
10315 (main): Handle --version and --help.
10316 * server.h (version, host_name): Add declarations.
10317
6f0f660e
EZ
103182005-12-23 Eli Zaretskii <eliz@gnu.org>
10319
889bf7c5
PA
10320 * linux-arm-low.c:
10321 * linux-arm-low.c:
10322 * inferiors.c:
10323 * i387-fp.h:
10324 * i387-fp.c:
10325 * gdbreplay.c:
10326 * regcache.c:
10327 * proc-service.c:
10328 * mem-break.h:
10329 * mem-break.c:
10330 * linux-x86-64-low.c:
10331 * linux-sh-low.c:
10332 * linux-s390-low.c:
10333 * linux-ppc64-low.c:
10334 * linux-ppc-low.c:
10335 * linux-mips-low.c:
10336 * linux-m68k-low.c:
10337 * linux-m32r-low.c:
10338 * linux-low.h:
10339 * linux-low.c:
10340 * linux-ia64-low.c:
10341 * linux-i386-low.c:
10342 * linux-crisv32-low.c:
10343 * thread-db.c:
10344 * terminal.h:
10345 * target.h:
10346 * target.c:
10347 * server.h:
10348 * server.c:
10349 * remote-utils.c:
10350 * regcache.h:
10351 * utils.c:
10352 * Makefile.in:
10353 * configure.ac:
6f0f660e
EZ
10354 * gdbserver.1: Add (C) after Copyright. Update the FSF
10355 address.
10356
9d1fb177
DJ
103572005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10358
10359 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10360 (arm_breakpoint_at): Recognize both breakpoints.
10361 (the_low_target): Use the correct breakpoint instruction.
10362
011a70c2
DJ
103632005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10364
10365 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10366 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10367 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10368 (the_low_target): Update.
10369
7fb85e41
AS
103702005-10-25 Andreas Schwab <schwab@suse.de>
10371
10372 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10373
10374 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10375 (ia64_num_regs): Reduce to 462.
10376
3db0444b
DJ
103772005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10378
10379 * acinclude.m4: Correct quoting.
10380 * aclocal.m4: Regenerated.
10381
10382 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10383 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10384 (thread_db_init): Call thread_db_err_str.
10385 * configure.ac: Check for TD_VERSION.
10386 * config.in, configure: Regenerated.
10387
bee0189a
DJ
103882005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10389
10390 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10391
e9d25b98
DJ
103922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10393
10394 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10395 is not available. Define HAVE_PTRACE_GETREGS if it is.
10396 * config.in, configure: Regenerated.
10397 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10398 * linux-i386-low.c, linux-m68k-low.c: Update to use
10399 HAVE_PTRACE_GETREGS.
10400 * linux-low.c (regsets_fetch_inferior_registers)
10401 (regsets_store_inferior_registers): Only return 0 if we processed
10402 GENERAL_REGS.
10403 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10404 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10405
a06660f7
DJ
104062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10407
10408 * inferiors.c (struct thread_info): Add gdb_id.
10409 (add_thread): Add gdb_id argument.
10410 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10411 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10412 calls to add_thread.
10413 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10414 * server.c (handle_query): Use thread_to_gdb_id.
10415 (handle_v_cont, main): Use gdb_id_to_thread_id.
10416 * server.h (add_thread): Update prototype.
10417 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10418 prototypes.
10419
5a1f5858
DJ
104202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10421
10422 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10423 left-padded registers.
10424 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10425 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10426
e122f1f5
SE
104272005-07-01 Steve Ellcey <sje@cup.hp.com>
10428
10429 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10430 * configure: Regenerate.
10431 * config.in: Regenerate.
10432 * server.h (NEED_DECLARATION_STRERROR):
10433 Replace with !HAVE_DECL_STRERROR.
10434
d592fa2f
DJ
104352005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * linux-low.c (linux_wait, linux_send_signal): Don't test
10438 an unsigned long variable for > 0 if it could be MAX_ULONG.
10439 * server.c (myresume): Likewise.
10440 * target.c (set_desired_inferior): Likewise.
10441
ccbd4912
MK
104422005-06-13 Mark Kettenis <kettenis@gnu.org>
10443
10444 * configure.ac: Simplify and improve check for socklen_t.
10445 * configure, config.in: Regenerate.
10446
f450004a
DJ
104472005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * acconfig.h: Remove.
10450 * configure.ac: Add a test for socklen_t. Use three-argument
10451 AC_DEFINE throughout.
10452 * config.in: Regenerated using autoheader 2.59.
10453 * configure: Regenerated.
10454
10455 * gdbreplay.c (socklen_t): Provide a default.
10456 (remote_open): Use socklen_t.
10457 * remote-utils.c (socklen_t): Provide a default.
10458 (remote_open): Use socklen_t.
10459 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10460 unsigned char.
10461
10462 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10463 char for buffers.
10464 * linux-low.c (linux_read_memory, linux_write_memory)
10465 (linux_read_auxv): Likewise.
10466 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10467 (check_mem_write): Likewise.
10468 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10469 Likewise.
10470 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10471 (registers_from_string, register_data): Likewise.
10472 * server.c (handle_query, main): Likewise.
10473 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10474 (decode_M_packet): Likewise.
10475 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10476 * target.h (struct target_ops): Update read_memory, write_memory,
10477 and read_auxv.
10478 (read_inferior_memory, write_inferior_memory): Update.
10479 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10480 to unsigned char *.
10481 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10482 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10483 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10484 linux-s390-low.c, linux-sh-low.c: Update for changes in
10485 read_inferior_memory and the_low_target->breakpoint.
10486
eee84df1
DJ
104872005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10488
10489 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10490 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10491 * configure.srv: Add powerpc64-*-linux*.
10492 * linux-ppc64-low.c: New file.
10493
45b134e5
OF
104942005-05-23 Orjan Friberg <orjanf@axis.com>
10495
10496 * linux-cris-low.c: New file with support for CRIS.
10497 * linux-crisv32-low.c: Ditto for CRISv32.
10498 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10499 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10500 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10501 reg-crisv32.o, and reg-crisv32.c to make rules.
10502 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10503 recognized targets.
10504
48d93c75
UW
105052005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10506
10507 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10508 of sizeof (PTRACE_XFER_TYPE).
10509 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10510
e013ee27
OF
105112005-05-12 Orjan Friberg <orjanf@axis.com>
10512
889bf7c5 10513 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10514 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10515 pointers for hardware watchpoint support.
10516 * linux-low.h (struct linux_target_ops): Ditto.
10517 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10518 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10519 to linux_target_ops.
10520 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10521 reply packet.
10522 * server.c (main): Recognize 'Z' and 'z' packets.
10523
b0ded00b
UW
105242005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10525
10526 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10527 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10528 (the_low_target): Add new members.
10529
8643e2ad
DJ
105302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10531
10532 * proc-service.c (ps_lgetregs): Search all_processes instead of
10533 all_threads.
10534
fc620387
DJ
105352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10536
10537 * server.c (start_inferior): Change return type to int.
10538 (attach_inferior): Change sigptr to int *.
10539 (handle_v_cont, handle_v_requests): Change signal to int *.
10540 (main): Change signal to int.
10541
105422005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10543
10544 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10545 * configure.srv: Add m32r*-*-linux*.
10546 * linux-m32r-low.c: New file.
10547
e0e76420
DJ
105482005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10549
10550 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10551
a1928bad
DJ
105522005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10555 Take unsigned long arguments for PIDs.
10556 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10557 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10558 (wait_for_sigstop, linux_resume_one_process)
10559 (regsets_fetch_inferior_registers, linux_send_signal)
10560 (linux_read_auxv): Likewise. Update the types of variables holding
10561 PIDs. Update format string specifiers.
10562 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10563 * remote-utils.c (prepare_resume_reply): Likewise.
10564 * server.c (cont_thread, general_thread, step_thread)
10565 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10566 unsigned long.
10567 (handle_query): Update format specifiers.
10568 (handle_v_cont, main): Use strtoul for thread IDs.
10569 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10570 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10571 (general_thread, step_thread, thread_from_wait)
10572 (old_thread_from_wait): Update.
10573 * target.h (struct thread_resume): Use unsigned long for THREAD.
10574 (struct target_ops): Use unsigned long for arguments to attach and
10575 thread_alive.
10576
dcdb98d2
DJ
105772005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10578
10579 * acinclude.m4: Include bfd/bfd.m4 directly.
10580 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10581 <agriffis@toolchain.org>.
10582 * aclocal.m4, configure: Regenerated.
10583
bec39cab
AC
105842005-01-07 Andrew Cagney <cagney@gnu.org>
10585
10586 * configure.ac: Rename configure.in, require autoconf 2.59.
10587 * configure: Re-generate.
10588
434c4c77
DJ
105892004-12-08 Daniel Jacobowitz <dan@debian.org>
10590
10591 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10592 LIBS when finished.
10593 * aclocal.m4: Regenerated.
10594 * configure: Regenerated.
10595
db1d3e1b
AS
105962004-11-21 Andreas Schwab <schwab@suse.de>
10597
10598 * linux-m68k-low.c (m68k_num_gregs): Define.
10599 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10600 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10601 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10602 (m68k_breakpoint_at): New. Add to the_low_target.
10603
10604 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10605 srv_linux_thread_db to yes.
10606
43360365
JB
106072004-10-20 Joel Brobecker <brobecker@gnat.com>
10608
10609 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10610 (ARCH_SET_FS): Likewise.
10611 (ARCH_GET_FS): Likewise.
10612 (ARCH_GET_GS): Likewise.
10613
fd500816
DJ
106142004-10-16 Daniel Jacobowitz <dan@debian.org>
10615
10616 * linux-i386-low.c (ps_get_thread_area): New.
10617 * linux-x86-64-low.c (ps_get_thread_area): New.
10618 * linux-low.c: Include <sys/syscall.h>.
10619 (linux_kill_one_process): Don't kill the first thread here.
10620 (linux_kill): Kill the first thread here.
10621 (kill_lwp): New function.
10622 (send_sigstop, linux_send_signal): Use it.
10623 * proc-service.c: Clean up #ifdefs.
10624 (fpregset_info): Delete.
10625 (ps_lgetregs): Update and enable implementation.
10626 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10627 implementations.
10628 * remote-utils.c (struct sym_cache, symbol_cache): New.
10629 (input_interrupt): Print a clearer message.
10630 (async_io_enabled): New variable.
10631 (enable_async_io, disable_async_io): Use it. Update comments.
10632 (look_up_one_symbol): Use the symbol cache.
10633 * thread-db.c (thread_db_look_up_symbols): New function.
10634 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10635
f6de3c42
DJ
106362004-10-16 Daniel Jacobowitz <dan@debian.org>
10637
10638 * configure.in: Test for -rdynamic.
10639 * configure: Regenerated.
10640 * Makefile (INTERNAL_LDFLAGS): New.
10641 (gdbserver, gdbreplay): Use it.
10642
2c0fc042
AC
106432004-09-02 Andrew Cagney <cagney@gnu.org>
10644
10645 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10646
075b3282
DJ
106472004-03-23 Daniel Jacobowitz <drow@mvista.com>
10648
10649 * linux-low.c (linux_wait): Clear all_processes list also.
10650
fa6a77dc
DJ
106512004-03-12 Daniel Jacobowitz <drow@mvista.com>
10652
10653 * linux-low.c: Include <errno.h>. Remove extern declaration of
10654 errno.
10655
6d782a97
DJ
106562004-03-12 Daniel Jacobowitz <drow@mvista.com>
10657
10658 * gdbreplay.c, server.h, utils.c: Update copyright years.
10659
3a7fb99b
DJ
106602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10661
10662 * server.c (main): Print child status or termination signal from
10663 variable 'signal', not 'sig'.
10664
c3e735a6
DJ
106652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10666
10667 * linux-low.c (linux_read_memory): Change return type to
10668 int. Check for and return error from ptrace().
10669 * target.c (read_inferior_memory): Change return type to int. Pass
10670 back return status from the_target->read_memory().
10671 * target.h (struct target_ops): Adapt *read_memory() prototype.
10672 Update comment.
10673 (read_inferior_memory): Adapt prototype.
10674 * server.c (main): Return an error packet if
10675 read_inferior_memory() returns an error.
10676
a59d1c82
DJ
106772004-03-04 Daniel Jacobowitz <drow@mvista.com>
10678
10679 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10680 Unify with other clean targets.
10681
dc3f8883
DJ
106822004-02-29 Daniel Jacobowitz <drow@mvista.com>
10683
10684 * server.c (handle_v_cont): Call set_desired_inferior.
10685
89a208da
DJ
106862004-02-29 Daniel Jacobowitz <drow@mvista.com>
10687
10688 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10689
62ea82f5
DJ
106902004-02-29 Daniel Jacobowitz <drow@mvista.com>
10691
10692 * linux-low.c (linux_wait): Unblock async I/O.
10693 (linux_resume): Block and enable async I/O.
10694 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10695 * server.h (block_async_io, unblock_async_io): Add prototypes.
10696
6910d122
DJ
106972004-02-29 Daniel Jacobowitz <drow@mvista.com>
10698
10699 * remote-utils.c (remote_open): Print a status notice after
10700 opening a TCP port.
10701 * server.c (attach_inferior): Print a status notice after
10702 attaching.
10703
107042004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10705
10706 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10707
c89dc5d4
DJ
107082004-02-26 Daniel Jacobowitz <drow@mvista.com>
10709
10710 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10711 error packet.
10712 * server.c, target.h: Update copyright years.
10713
4b8dad4a
RM
107142004-02-25 Roland McGrath <roland@redhat.com>
10715
10716 * target.h (struct target_ops): New member `read_auxv'.
10717 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10718 * linux-low.c (linux_read_auxv): New function.
10719 (linux_target_ops): Initialize `read_auxv' member to that.
10720
d7446758
JB
107212004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10722
10723 Committed by Jim Blandy <jimb@redhat.com>.
10724
10725 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10726 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10727 instead of GPR_SIZE to distiguish s390 and s390x targets.
10728
5544ad89
DJ
107292004-01-31 Daniel Jacobowitz <drow@mvista.com>
10730
10731 * linux-low.c: Update copyright year.
10732 (check_removed_breakpoint): Clear pending_is_breakpoint.
10733 (linux_set_resume_request, linux_queue_one_thread)
10734 (resume_status_pending_p): New functions.
10735 (linux_continue_one_thread): Use process->resume.
10736 (linux_resume): Only resume threads if there are no pending events.
10737 * linux-low.h (struct process_info): Add resume request
10738 pointer.
10739
2a68b70e
DJ
107402004-01-30 Daniel Jacobowitz <drow@mvista.com>
10741
10742 * regcache.c (new_register_cache): Clear the allocated register
10743 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10744
64386c31
DJ
107452003-10-13 Daniel Jacobowitz <drow@mvista.com>
10746
10747 * linux-low.c (linux_resume): Take a struct thread_resume *
10748 argument.
10749 (linux_wait): Update call.
10750 (resume_ptr): New static variable.
10751 (linux_continue_one_thread): Renamed from
10752 linux_continue_one_process. Use resume_ptr.
10753 (linux_resume): Use linux_continue_one_thread.
10754 * server.c (handle_v_cont, handle_v_requests): New functions.
10755 (myresume): New function.
10756 (main): Handle 'v' case.
10757 * target.h (struct thread_resume): New type.
10758 (struct target_ops): Change argument of "resume" to struct
10759 thread_resume *.
10760 (myresume): Delete macro.
10761
c938e9b0
L
107622003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10763
10764 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10765 (uninstall): Support DESTDIR.
10766
7f313d07
BC
10767Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10768
10769 * configure.srv: Add xscale*linux copy of arm*linux entry.
10770
3b2fc2ea
DJ
107712003-07-24 Daniel Jacobowitz <drow@mvista.com>
10772
10773 * linux-arm-low.c (arm_reinsert_addr): New function.
10774 (the_low_target): Add arm_reinsert_addr.
10775
1c0a559e
MK
107762003-07-08 Mark Kettenis <kettenis@gnu.org>
10777
10778 * mem-break.c: Remove whitespace at end of file.
10779
43d5792c
DJ
107802003-06-28 Daniel Jacobowitz <drow@mvista.com>
10781
10782 * configure.in: Check whether we need to prototype strerror.
10783 * server.h: Optionally prototype strerror.
10784 * gdbreplay.c (perror_with_name): Use strerror.
10785 * linux-low.c (linux_attach_lwp): Use strerror.
10786 * utils.c (perror_with_name): Use strerror.
10787 * config.in, configure: Regenerated.
10788
c8a86edf
DJ
107892003-06-28 Daniel Jacobowitz <drow@mvista.com>
10790
10791 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10792 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10793
73d37363
DJ
107942003-06-20 Daniel Jacobowitz <drow@mvista.com>
10795
10796 * Makefile.in (SFILES): Update.
10797 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10798 low-sun3.c: Remove files.
10799
6ad8ae5c
DJ
108002003-06-17 Daniel Jacobowitz <drow@mvista.com>
10801
10802 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10803 (linux_detach_one_process, linux_detach): New functions.
10804 (linux_target_ops): Add linux_detach.
10805 * server.c (main): Handle 'D' packet.
10806 * target.h (struct target_ops): Add "detach" member.
10807 (detach_inferior): Define.
10808
1581182a
MK
108092003-06-13 Mark Kettenis <kettenis@gnu.org>
10810
10811 From Kelley Cook <kelleycook@wideopenwest.com>:
10812 * configure.srv: Accept i[34567]86 variants.
10813
e5379b03
DJ
108142003-06-05 Daniel Jacobowitz <drow@mvista.com>
10815
10816 * linux-low.c (linux_wait_for_event): Correct comment typos.
10817 (linux_resume_one_process): Call check_removed_breakpoint.
10818 (linux_send_signal): New function.
10819 (linux_target_ops): Add linux_send_signal.
10820 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10821 of kill.
10822 * target.h (struct target_ops): Add send_signal.
10823
2ff29de4
JB
108242003-05-29 Jim Blandy <jimb@redhat.com>
10825
10826 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10827 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10828 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10829 away part of the register's value.
10830
254787d4
DJ
108312003-03-26 Daniel Jacobowitz <drow@mvista.com>
10832
10833 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10834 (linux_wait_for_event, linux_init_signals): Likewise.
10835
94e10508
DJ
108362003-03-17 Daniel Jacobowitz <drow@mvista.com>
10837
10838 * configure.in: Check for stdlib.h.
10839 * configure: Regenerated.
10840 * config.in: Regenerated.
10841
4c0711e0
DJ
108422003-01-04 Andreas Schwab <schwab@suse.de>
10843
10844 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10845
ef66e766
AC
108462003-01-02 Andrew Cagney <ac131313@redhat.com>
10847
10848 * Makefile.in: Remove obsolete code.
10849
a1358604
DJ
108502002-11-20 Daniel Jacobowitz <drow@mvista.com>
10851
10852 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10853 defined(PT_FPR0_HI).
10854
23ce3b1c
DJ
108552002-11-17 Stuart Hughes <seh@zee2.com>
10856
10857 * linux-arm-low.c (arm_num_regs): Increase.
10858 (arm_regmap): Include status register.
10859
108602002-11-17 Daniel Jacobowitz <drow@mvista.com>
10861
10862 * linux-low.c (register_addr): Remove incorrect -1 check.
10863
a9fa9f7d
DJ
108642002-08-29 Daniel Jacobowitz <drow@mvista.com>
10865
10866 * linux-low.c (linux_create_inferior): Call setpgid. Return
10867 the new PID.
10868 (unstopped_p, linux_signal_pid): Remove.
10869 (linux_target_ops): Remove linux_signal_pid.
10870 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10871 global instead of target method.
10872 * target.h (struct target_ops): Remove signal_pid. Update comment
10873 for create_inferior.
10874 * server.c (signal_pid): New variable.
10875 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10876 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10877 (attach_inferior): Set signal_pid.
10878
17574093
DJ
108792002-08-23 Daniel Jacobowitz <drow@mvista.com>
10880
10881 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10882
108832002-08-20 Jim Blandy <jimb@redhat.com>
10884
10885 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10886 default for this.
10887
108882002-08-01 Andrew Cagney <cagney@redhat.com>
10889
10890 * Makefile.in: Make chill references obsolete.
10891
108922002-07-24 Kevin Buettner <kevinb@redhat.com>
10893
10894 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10895 * configure: Regenerate.
10896 * config.in: Regenerate.
10897
108982002-07-09 David O'Brien <obrien@FreeBSD.org>
10899
10900 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10901 (perror_with_name, remote_close, remote_open, expect, play): Static.
10902
109032002-07-04 Michal Ludvig <mludvig@suse.cz>
10904
4b8dad4a 10905 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10906 byte offsets instead of an array of indexes.
10907 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10908
109092002-06-13 Daniel Jacobowitz <drow@mvista.com>
10910
10911 * regcache.c: Add comment.
10912
109132002-06-11 Daniel Jacobowitz <drow@mvista.com>
10914
10915 * thread-db.c: New file.
10916 * proc-service.c: New file.
10917 * acinclude.m4: New file.
10918 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10919 proc-service.o, and thread-db.o.
10920 (linux-low.o): Add USE_THREAD_DB.
10921 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10922 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10923 * aclocal.m4: Regenerated.
10924 * config.in: Regenerated.
10925 * configure: Regenerated.
10926 * configure.in: Check for proc_service.h, sys/procfs.h,
10927 thread_db.h, and linux/elf.h headrs.
10928 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10929 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10930 Check for -lthread_db and thread support.
10931 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10932 PowerPC, and SuperH.
10933 * i387-fp.c: Constify arguments.
10934 * i387-fp.h: Likewise.
10935 * inferiors.c: (struct thread_info): Renamed from
10936 `struct inferior_info'. Remove PID member. Use generic inferior
10937 list header. All uses updated.
10938 (inferiors, signal_pid): Removed.
10939 (all_threads): New variable.
10940 (get_thread): Define.
10941 (add_inferior_to_list): New function.
10942 (for_each_inferior): New function.
10943 (change_inferior_id): New function.
10944 (add_inferior): Removed.
10945 (remove_inferior): New function.
10946 (add_thread): New function.
10947 (free_one_thread): New function.
10948 (remove_thread): New function.
10949 (clear_inferiors): Use for_each_inferior and free_one_thread.
10950 (find_inferior): New function.
10951 (find_inferior_id): New function.
10952 (inferior_target_data): Update argument type.
10953 (set_inferior_target_data): Likewise.
10954 (inferior_regcache_data): Likewise.
10955 (set_inferior_regcache_data): Likewise.
10956 * linux-low.c (linux_bp_reinsert): Remove.
10957 (all_processes, stopping_threads, using_thrads)
10958 (struct pending_signals, debug_threads, pid_of): New.
10959 (inferior_pid): Replace with macro.
10960 (struct inferior_linux_data): Remove.
10961 (get_stop_pc, add_process): New functions.
10962 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10963 Use add_process and add_thread.
10964 (linux_attach_lwp): New function, based on old linux_attach. Use
10965 add_process and add_thread. Set stop_expected for new threads.
10966 (linux_attach): New function.
10967 (linux_kill_one_process): New function.
10968 (linux_kill): Kill all LWPs.
10969 (linux_thread_alive): Use find_inferior_id.
10970 (check_removed_breakpoints, status_pending_p): New functions.
10971 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10972 Update. Use WNOHANG. Wait for cloned processes also. Update process
10973 struct for the found process.
10974 (linux_wait_for_event): New function.
10975 (linux_wait): Use it. Support LWPs.
10976 (send_sigstop, wait_for_sigstop, stop_all_processes)
10977 (linux_resume_one_process, linux_continue_one_process): New functions.
10978 (linux_resume): Support LWPs.
10979 (REGISTER_RAW_SIZE): Remove.
10980 (fetch_register): Use register_size instead. Call supply_register.
10981 (usr_store_inferior_registers): Likewise. Call collect_register.
10982 Fix recursive case.
10983 (regsets_fetch_inferior_registers): Improve error message.
10984 (regsets_store_inferior_registers): Add debugging.
10985 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10986 (unstopped_p, linux_signal_pid): New functions.
10987 (linux_target_ops): Add linux_signal_pid.
10988 (linux_init_signals): New function.
10989 (initialize_low): Call it. Initialize using_threads.
10990 * regcache.c (inferior_regcache_data): Add valid
10991 flag.
10992 (get_regcache): Fetch registers lazily. Add fetch argument
10993 and update all callers.
10994 (regcache_invalidate_one, regcache_invalidate): New
10995 functions.
10996 (new_register_cache): Renamed from create_register_cache.
10997 Return the new regcache.
10998 (free_register_cache): Change argument to a void *.
10999 (registers_to_string, registers_from_string): Call get_regcache
11000 with fetch flag set.
11001 (register_data): Make static. Pass fetch flag to get_regcache.
11002 (supply_register): Call get_regcache with fetch flag clear.
11003 (collect_register): Call get_regcache with fetch flag set.
11004 (collect_register_as_string): New function.
11005 * regcache.h: Update.
11006 * remote-utils.c (putpkt): Flush after debug output and use
11007 stderr.
11008 Handle input interrupts while waiting for an ACK.
11009 (input_interrupt): Use signal_pid method.
11010 (getpkt): Flush after debug output and use stderr.
11011 (outreg): Use collect_register_as_string.
11012 (new_thread_notify, dead_thread_notify): New functions.
11013 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11014 and general_thread.
11015 (look_up_one_symbol): Flush after debug output.
11016 * server.c (step_thread, server_waiting): New variables.
11017 (start_inferior): Don't use signal_pid. Update call to mywait.
11018 (attach_inferior): Update call to mywait.
11019 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11020 (main): Don't fetch/store registers explicitly. Use
11021 set_desired_inferior. Support proposed ``Hs'' packet. Update
11022 calls to mywait.
11023 * server.h: Update.
11024 (struct inferior_list, struct_inferior_list_entry): New.
11025 * target.c (set_desired_inferior): New.
11026 (write_inferior_memory): Constify.
11027 (mywait): New function.
11028 * target.h: Update.
11029 (struct target_ops): New signal_pid method.
11030 (mywait): Removed macro, added prototype.
11031
11032 * linux-low.h (regset_func): Removed.
11033 (regset_fill_func, regset_store_func): New.
11034 (enum regset_type): New.
11035 (struct regset_info): Add type field. Use new operation types.
11036 (struct linux_target_ops): stop_pc renamed to get_pc.
11037 Add decr_pc_after_break and breakpoint_at.
11038 (get_process, get_thread_proess, get_process_thread)
11039 (strut process_info, all_processes, linux_attach_lwp)
11040 (thread_db_init): New.
11041
11042 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11043 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11044 (the_low_target): Add new members.
11045 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11046 (i386_store_fpxregset): Constify.
11047 (target_regsets): Add new kind identifier.
11048 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11049 (i386_set_pc): Add debugging.
11050 (i386_breakpoint_at): New function.
11051 (the_low_target): Add new members.
11052 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11053 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11054 (mips_breakpoint_at): New.
11055 (the_low_target): Add new members.
11056 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11057 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11058 (the_low_target): Add new members.
11059 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11060 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11061 (the_low_target): Add new members.
11062 * linux-x86-64-low.c (target_regsets): Add new kind
11063 identifier.
11064
110652002-05-15 Daniel Jacobowitz <drow@mvista.com>
11066
11067 From Martin Pool <mbp@samba.org>:
11068 * server.c (gdbserver_usage): New function.
11069 (main): Call it.
11070
110712002-05-14 Daniel Jacobowitz <drow@mvista.com>
11072
11073 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11074 stop_at -> stop_pc.
11075
110762002-05-04 Andrew Cagney <ac131313@redhat.com>
11077
11078 * Makefile.in: Remove obsolete code.
11079
110802002-04-24 Michal Ludvig <mludvig@suse.cz>
11081
11082 * linux-low.c (regsets_fetch_inferior_registers),
11083 (regsets_store_inferior_registers): Removed cast to int from
11084 ptrace() calls.
11085 * regcache.h: Added declaration of struct inferior_info.
11086
110872002-04-20 Daniel Jacobowitz <drow@mvista.com>
11088
11089 * inferiors.c (struct inferior_info): Add regcache_data.
11090 (add_inferior): Call create_register_cache.
11091 (clear_inferiors): Call free_register_cache.
11092 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11093 * regcache.c (struct inferior_regcache_data): New.
11094 (registers): Remove.
11095 (get_regcache): New function.
11096 (create_register_cache, free_register_cache): New functions.
11097 (set_register_cache): Don't initialize the register cache here.
11098 (registers_to_string, registers_from_string, register_data): Call
11099 get_regcache.
11100 * regcache.h: Add prototypes.
11101 * server.h: Likewise.
11102
111032002-04-20 Daniel Jacobowitz <drow@mvista.com>
11104
11105 * mem-break.c: New file.
11106 * mem-break.h: New file.
11107 * Makefile.in: Add mem-break.o rule; update server.h
11108 dependencies.
11109 * inferiors.c (struct inferior_info): Add target_data
11110 member.
11111 (clear_inferiors): Free target_data member if set.
11112 (inferior_target_data, set_inferior_target_data): New functions.
11113 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11114 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11115 * linux-low.c (linux_bp_reinsert): New variable.
11116 (struct inferior_linux_data): New.
11117 (linux_create_inferior): Use set_inferior_target_data.
11118 (linux_attach): Likewise. Call add_inferior.
11119 (linux_wait_for_one_inferior): New function.
11120 (linux_wait): Call it.
11121 (linux_write_memory): Add const.
11122 (initialize_low): Call set_breakpoint_data.
11123 * linux-low.h (struct linux_target_ops): Add breakpoint
11124 handling members.
11125 * server.c (attach_inferior): Remove extra add_inferior
11126 call.
11127 * server.h: Include mem-break.h. Update inferior.c
11128 prototypes.
11129 * target.c (read_inferior_memory)
11130 (write_inferior_memory): New functions.
11131 * target.h (read_inferior_memory)
11132 (write_inferior_memory): Change macros to prototypes.
11133 (struct target_ops): Update comments. Add const to write_memory
11134 definition.
11135
111362002-04-11 Daniel Jacobowitz <drow@mvista.com>
11137
11138 * linux-low.c (usr_store_inferior_registers): Support
11139 registers which are allowed to fail to store.
11140 * linux-low.h (linux_target_ops): Likewise.
11141 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11142 (ppc_cannot_store_register): FPSCR may not be storable.
11143
111442002-04-09 Daniel Jacobowitz <drow@mvista.com>
11145
11146 * server.h: Include <string.h> if HAVE_STRING_H.
11147 * ChangeLog: Correct paths in last ChangeLog entry.
11148
111492002-04-09 Daniel Jacobowitz <drow@mvista.com>
11150
11151 * linux-low.h: Remove obsolete prototypes.
11152 (struct linux_target_ops): New.
11153 (extern the_low_target): New.
11154 * linux-low.c (num_regs, regmap): Remove declarations.
11155 (register_addr): Use the_low_target explicitly.
11156 (fetch_register): Likewise.
11157 (usr_fetch_inferior_registers): Likewise.
11158 (usr_store_inferior_registers): Likewise.
11159 * linux-arm-low.c (num_regs): Remove.
11160 (arm_num_regs): Define.
11161 (arm_regmap): Renamed from regmap, made static.
11162 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11163 made static.
11164 (arm_cannot_store_register): Renamed from cannot_store_register,
11165 made static.
11166 (the_low_target): New.
11167 * linux-i386-low.c (num_regs): Remove.
11168 (i386_num_regs): Define.
11169 (i386_regmap): Renamed from regmap, made static.
11170 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11171 made static.
11172 (i386_cannot_store_register): Renamed from cannot_store_register,
11173 made static.
11174 (the_low_target): New.
11175 * linux-ia64-low.c (num_regs): Remove.
11176 (ia64_num_regs): Define.
11177 (ia64_regmap): Renamed from regmap, made static.
11178 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11179 made static.
11180 (ia64_cannot_store_register): Renamed from cannot_store_register,
11181 made static.
11182 (the_low_target): New.
11183 * linux-m68k-low.c (num_regs): Remove.
11184 (m68k_num_regs): Define.
11185 (m68k_regmap): Renamed from regmap, made static.
11186 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11187 made static.
11188 (m68k_cannot_store_register): Renamed from cannot_store_register,
11189 made static.
11190 (the_low_target): New.
11191 * linux-mips-low.c (num_regs): Remove.
11192 (mips_num_regs): Define.
11193 (mips_regmap): Renamed from regmap, made static.
11194 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11195 made static.
11196 (mips_cannot_store_register): Renamed from cannot_store_register,
11197 made static.
11198 (the_low_target): New.
11199 * linux-ppc-low.c (num_regs): Remove.
11200 (ppc_num_regs): Define.
11201 (ppc_regmap): Renamed from regmap, made static.
11202 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11203 made static.
11204 (ppc_cannot_store_register): Renamed from cannot_store_register,
11205 made static.
11206 (the_low_target): New.
11207 * linux-s390-low.c (num_regs): Remove.
11208 (s390_num_regs): Define.
11209 (s390_regmap): Renamed from regmap, made static.
11210 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11211 made static.
11212 (s390_cannot_store_register): Renamed from cannot_store_register,
11213 made static.
11214 (the_low_target): New.
11215 * linux-sh-low.c (num_regs): Remove.
11216 (sh_num_regs): Define.
11217 (sh_regmap): Renamed from regmap, made static.
11218 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11219 made static.
11220 (sh_cannot_store_register): Renamed from cannot_store_register,
11221 made static.
11222 (the_low_target): New.
11223 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11224 (the_low_target): New.
11225
112262002-04-09 Daniel Jacobowitz <drow@mvista.com>
11227
11228 * Makefile.in: Add stamp-h target.
11229 * configure.in: Create stamp-h.
11230 * configure: Regenerated.
11231
112322002-04-09 Daniel Jacobowitz <drow@mvista.com>
11233
11234 * inferiors.c: New file.
11235 * target.c: New file.
11236 * target.h: New file.
11237 * Makefile.in: Add target.o and inferiors.o. Update
11238 dependencies.
11239 * linux-low.c (inferior_pid): New static variable,
11240 moved from server.c.
11241 (linux_create_inferior): Renamed from create_inferior.
11242 Call add_inferior. Return 0 on success instead of a PID.
11243 (linux_attach): Renamed from myattach.
11244 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11245 (linux_thread_alive): Renamed from mythread_alive.
11246 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11247 child dies.
11248 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11249 (regsets_store_inferior_registers): Correct error message.
11250 Add missing ``return 0''.
11251 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11252 (linux_store_registers): Renamed from store_inferior_registers.
11253 (linux_read_memory): Renamed from read_inferior_memory.
11254 (linux_write_memory): Renamed from write_inferior_memory.
11255 (linux_target_ops): New structure.
11256 (initialize_low): Call set_target_ops ().
11257 * remote-utils.c (unhexify): New function.
11258 (hexify): New function.
11259 (input_interrupt): Send signals to ``signal_pid''.
11260 * server.c (inferior_pid): Remove.
11261 (start_inferior): Update create_inferior call.
11262 (attach_inferior): Call add_inferior.
11263 (handle_query): New function.
11264 (main): Call handle_query for `q' packets.
11265 * server.h: Include "target.h". Remove obsolete prototypes.
11266 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11267
112682002-04-09 Daniel Jacobowitz <drow@mvista.com>
11269
11270 * Makefile.in: Add WARN_CFLAGS. Update configury
11271 dependencies.
11272 * configure.in: Check for <string.h>
11273 * configure: Regenerate.
11274 * config.in: Regenerate.
11275 * gdbreplay.c: Include needed system headers.
11276 (remote_open): Remove strchr prototype.
11277 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11278 * regcache.c (supply_register): Change buf argument to const void *.
11279 (supply_register_by_name): Likewise.
11280 (collect_register): Change buf argument to void *.
11281 (collect_register_by_name): Likewise.
11282 * regcache.h: Add missing prototypes.
11283 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11284 * server.c (handle_query): New function.
11285 (attached): New static variable, moved out of main.
11286 (main): Quiet longjmp clobber warnings.
11287 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11288 * utils.c (error): Remove NORETURN.
11289 (fatal): Likewise.
This page took 1.464244 seconds and 4 git commands to generate.