]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Implement multiple-filesystem support for remote targets
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4b8b5e72
GB
12015-06-10 Gary Benson <gbenson@redhat.com>
2
3 * configure.ac (AC_CHECK_FUNCS): Add setns.
4 * config.in: Regenerate.
5 * configure: Likewise.
6 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7 (linux-namespaces.o): New rule.
8 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
9
3ac2e371
GB
102015-06-09 Gary Benson <gbenson@redhat.com>
11
12 * hostio.c (handle_open): Process mode argument with
13 fileio_to_host_mode.
14
ca9b78ce
YQ
152015-06-01 Yao Qi <yao.qi@linaro.org>
16
17 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
18 * linux-x86-low.c: Likewise.
19
bfacd19d
DB
202015-05-28 Don Breazeal <donb@codesourcery.com>
21
22 * linux-low.c (handle_extended_wait): Initialize
23 thread_info.last_resume_kind for new fork children.
24
452003ef
PA
252015-05-15 Pedro Alves <palves@redhat.com>
26
27 * target.h (target_handle_new_gdb_connection): Rewrite using if
28 wrapped in do/while.
29
1041a03c
JB
302015-05-14 Joel Brobecker <brobecker@adacore.com>
31
32 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
33 * configure, config.in: Regenerate.
34 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
35 Declare typedef.
36
c269dbdb
DB
372015-05-12 Don Breazeal <donb@codesourcery.com>
38
39 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
40 PTRACE_EVENT_VFORK_DONE.
41 (linux_low_ptrace_options, extended_event_reported): Add vfork
42 events.
43 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
44 and "vforkdone" for RSP 'T' Stop Reply Packet.
45 * server.h (report_vfork_events): Declare
46 global variable.
47
3a8a0396
DB
482015-05-12 Don Breazeal <donb@codesourcery.com>
49
50 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
51 (the_low_target) <new_fork>: Initialize new member.
52 * linux-arm-low.c (arm_new_fork): New function.
53 (the_low_target) <new_fork>: Initialize new member.
54 * linux-low.c (handle_extended_wait): Call new target function
55 new_fork.
56 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
57 * linux-mips-low.c (mips_add_watchpoint): New function
58 extracted from mips_insert_point.
59 (the_low_target) <new_fork>: Initialize new member.
60 (mips_linux_new_fork): New function.
61 (mips_insert_point): Call mips_add_watchpoint.
62 * linux-x86-low.c (x86_linux_new_fork): New function.
63 (the_low_target) <new_fork>: Initialize new member.
64
de0d863e
DB
652015-05-12 Don Breazeal <donb@codesourcery.com>
66
67 * linux-low.c (handle_extended_wait): Implement return value,
68 rename argument 'event_child' to 'event_lwp', handle
69 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
70 (linux_low_ptrace_options): New function.
71 (linux_low_filter_event): Call linux_low_ptrace_options,
72 use different argument fo linux_enable_event_reporting,
73 use return value from handle_extended_wait.
74 (extended_event_reported): New function.
75 (linux_wait_1): Call extended_event_reported and set
76 status to report fork events.
77 (linux_write_memory): Add pid to debug message.
78 (reset_lwp_ptrace_options_callback): New function.
79 (linux_handle_new_gdb_connection): New function.
80 (linux_target_ops): Initialize new structure member.
81 * linux-low.h (struct lwp_info) <waitstatus>: New member.
82 * lynx-low.c: Initialize new structure member.
83 * remote-utils.c (prepare_resume_reply): Implement stop reason
84 "fork" for "T" stop message.
85 * server.c (handle_query): Call handle_new_gdb_connection.
86 * server.h (report_fork_events): Declare global flag.
87 * target.h (struct target_ops) <handle_new_gdb_connection>:
88 New member.
89 (target_handle_new_gdb_connection): New macro.
90 * win32-low.c: Initialize new structure member.
91
ddcbc397
DB
922015-05-12 Don Breazeal <donb@codesourcery.com>
93
94 * mem-break.c (APPEND_TO_LIST): Define macro.
95 (clone_agent_expr): New function.
96 (clone_one_breakpoint): New function.
97 (clone_all_breakpoints): New function.
98 * mem-break.h: Declare new functions.
99
89245bc0
DB
1002015-05-12 Don Breazeal <donb@codesourcery.com>
101
102 * linux-low.c (linux_supports_fork_events): New function.
103 (linux_supports_vfork_events): New function.
104 (linux_target_ops): Initialize new structure members.
105 (initialize_low): Call linux_check_ptrace_features.
106 * lynx-low.c (lynx_target_ops): Initialize new structure
107 members.
108 * server.c (report_fork_events, report_vfork_events):
109 New global flags.
110 (handle_query): Add new features to qSupported packet and
111 response.
112 (captured_main): Initialize new global variables.
113 * target.h (struct target_ops) <supports_fork_events>:
114 New member.
115 <supports_vfork_events>: New member.
116 (target_supports_fork_events): New macro.
117 (target_supports_vfork_events): New macro.
118 * win32-low.c (win32_target_ops): Initialize new structure
119 members.
120
835205d0
GB
1212015-05-12 Gary Benson <gbenson@redhat.com>
122
123 * server.c (handle_qxfer_exec_file): Use current process
124 if annex is empty.
125
21e94bd9
SL
1262015-05-08 Sandra Loosemore <sandra@codesourcery.com>
127
128 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
129 Remove HAVE_PTRACE_GETREGS conditionals.
130 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
131 instead of PTRACE_GETREGS and PTRACE_SETREGS.
132
45614f15
YQ
1332015-05-08 Yao Qi <yao.qi@linaro.org>
134
135 * linux-low.c (linux_supports_conditional_breakpoints): New
136 function.
137 (linux_target_ops): Install new target method.
138 * lynx-low.c (lynx_target_ops): Install NULL hook for
139 supports_conditional_breakpoints.
140 * nto-low.c (nto_target_ops): Likewise.
141 * spu-low.c (spu_target_ops): Likewise.
142 * win32-low.c (win32_target_ops): Likewise.
143 * server.c (handle_query): Check
144 target_supports_conditional_breakpoints.
145 * target.h (struct target_ops) <supports_conditional_breakpoints>:
146 New field.
147 (target_supports_conditional_breakpoints): New macro.
148
80ad801e
PA
1492015-05-06 Pedro Alves <palves@redhat.com>
150
151 PR server/18081
152 * server.c (start_inferior): If the process exits, mourn it.
153
819843c7
GB
1542015-04-21 Gary Benson <gbenson@redhat.com>
155
156 * hostio.c (fileio_open_flags_to_host): Factored out to
157 fileio_to_host_openflags in common/fileio.c. Single use
158 updated.
159
a2d5a9d7
MF
1602015-04-17 Max Filippov <jcmvbkbc@gmail.com>
161
162 * linux-xtensa-low.c (xtensa_fill_gregset)
163 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
164 XCHAL_HAVE_LOOP.
165
deb44829
MF
1662015-04-17 Max Filippov <jcmvbkbc@gmail.com>
167
168 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
169 (regs_info): Replace usrregs pointer with NULL.
170
e57f1de3
GB
1712015-04-17 Gary Benson <gbenson@redhat.com>
172
173 * target.h (struct target_ops) <pid_to_exec_file>: New field.
174 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
175 * server.c (handle_qxfer_exec_file): New function.
176 (qxfer_packets): Add exec-file entry.
177 (handle_query): Report qXfer:exec-file:read as supported packet.
178
62828379
RN
1792015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
180
181 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
182
b88bb450
GB
1832015-04-09 Gary Benson <gbenson@redhat.com>
184
185 * hostio-errno.c (errno_to_fileio_error): Remove function.
186 Update caller to use remote_fileio_to_fio_error.
187
c8f4bfdd
YQ
1882015-04-09 Yao Qi <yao.qi@linaro.org>
189
190 * linux-low.c (linux_insert_point): Call
191 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
192 (linux_remove_point): Call remove_memory_breakpoint if type is
193 raw_bkpt_type_sw.
194 * linux-x86-low.c (x86_insert_point): Don't call
195 insert_memory_breakpoint.
196 (x86_remove_point): Don't call remove_memory_breakpoint.
197
41f98f02
PA
1982015-04-01 Pedro Alves <palves@redhat.com>
199 Cleber Rosa <crosa@redhat.com>
200
201 * server.c (gdbserver_usage): Reorganize and extend the usage
202 message.
203
2bf6fb9d
PA
2042015-03-24 Pedro Alves <palves@redhat.com>
205
206 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
207 output. Also dump TRAP_TRACE.
208 (linux_low_filter_event): In debug output, distinguish a
209 resume_stop SIGSTOP from a delayed SIGSTOP.
210
369f6daa
GB
2112015-03-24 Gary Benson <gbenson@redhat.com>
212
213 * linux-x86-low.c (x86_linux_new_thread): Moved to
214 nat/x86-linux.c.
215 (x86_linux_prepare_to_resume): Likewise.
216
8e5d4070
GB
2172015-03-24 Gary Benson <gbenson@redhat.com>
218
219 * Makefile.in (x86-linux-dregs.o): New rule.
220 * configure.srv: Add x86-linux-dregs.o to relevant targets.
221 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
222 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
223 (x86_linux_dr_get): Likewise.
224 (x86_linux_dr_set): Likewise.
225 (update_debug_registers_callback): Likewise.
226 (x86_linux_dr_set_addr): Likewise.
227 (x86_linux_dr_get_addr): Likewise.
228 (x86_linux_dr_set_control): Likewise.
229 (x86_linux_dr_get_control): Likewise.
230 (x86_linux_dr_get_status): Likewise.
231 (x86_linux_update_debug_registers): Likewise.
232
2b95d440
GB
2332015-03-24 Gary Benson <gbenson@redhat.com>
234
235 * linux-x86-low.c (x86_linux_update_debug_registers):
236 New function, factored out from...
237 (x86_linux_prepare_to_resume): ...this.
238
14b0bc68
GB
2392015-03-24 Gary Benson <gbenson@redhat.com>
240
241 * linux-x86-low.c (x86_linux_dr_get): Update comments.
242 (x86_linux_dr_set): Likewise.
243 (update_debug_registers_callback): Likewise.
244 (x86_linux_dr_set_addr): Likewise.
245 (x86_linux_dr_get_addr): Likewise.
246 (x86_linux_dr_set_control): Likewise.
247 (x86_linux_dr_get_control): Likewise.
248 (x86_linux_dr_get_status): Likewise.
249 (x86_linux_prepare_to_resume): Likewise.
250
5dfe6ca8
GB
2512015-03-24 Gary Benson <gbenson@redhat.com>
252
253 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
254 Use perror_with_name. Pass string through gettext.
255 (x86_linux_dr_set): Likewise.
256
d33472ad
GB
2572015-03-24 Gary Benson <gbenson@redhat.com>
258
259 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
260 (x86_linux_dr_set_addr): ...this.
261 (x86_dr_low_get_addr): Rename to...
262 (x86_linux_dr_get_addr): ...this.
263 (x86_dr_low_set_control): Rename to...
264 (x86_linux_dr_set_control): ...this.
265 (x86_dr_low_get_control): Rename to...
266 (x86_linux_dr_get_control): ...this.
267 (x86_dr_low_get_status): Rename to...
268 (x86_linux_dr_get_status): ...this.
269 (x86_dr_low): Update with new function names.
270
4b134ca1
GB
2712015-03-24 Gary Benson <gbenson@redhat.com>
272
273 * Makefile.in (x86-linux.o): New rule.
274 * configure.srv: Add x86-linux.o to relevant targets.
275 * linux-low.c (lwp_set_arch_private_info): New function.
276 (lwp_arch_private_info): Likewise.
277 * linux-x86-low.c: Include nat/x86-linux.h.
278 (arch_lwp_info): Removed structure.
279 (update_debug_registers_callback):
280 Use lwp_set_debug_registers_changed.
281 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
282 and lwp_set_debug_registers_changed.
283 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
284
34c703da
GB
2852015-03-24 Gary Benson <gbenson@redhat.com>
286
287 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
288 * linux-arm-low.c (arm_new_thread): Likewise.
289 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
290 * linux-mips-low.c (mips_linux_new_thread): Likewise.
291 * linux-x86-low.c (x86_linux_new_thread): Likewise.
292 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
293
cff068da
GB
2942015-03-24 Gary Benson <gbenson@redhat.com>
295
296 * linux-low.c (ptid_of_lwp): New function.
297 (lwp_is_stopped): Likewise.
298 (lwp_stop_reason): Likewise.
299 * linux-x86-low.c (update_debug_registers_callback):
300 Use lwp_is_stopped.
301 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
302 lwp_stop_reason.
303
b2f7c7e8
GB
3042015-03-24 Gary Benson <gbenson@redhat.com>
305
306 * linux-low.h (linux_stop_lwp): Remove declaration.
307
6d4ee8c6
GB
3082015-03-24 Gary Benson <gbenson@redhat.com>
309
310 * linux-low.h: Include nat/linux-nat.h.
311 * linux-low.c (iterate_over_lwps_args): New structure.
312 (iterate_over_lwps_filter): New function.
313 (iterate_over_lwps): Likewise.
314 * linux-x86-low.c (update_debug_registers_callback):
315 Update signature to what iterate_over_lwps expects.
316 Remove PID check that iterate_over_lwps now performs.
317 (x86_dr_low_set_addr): Use iterate_over_lwps.
318 (x86_dr_low_set_control): Likewise.
319
70a0bb6b
GB
3202015-03-24 Gary Benson <gbenson@redhat.com>
321
322 * linux-x86-low.c (x86_debug_reg_state): New function.
323 (x86_linux_prepare_to_resume): Use the above.
324
7b669087
GB
3252015-03-24 Gary Benson <gbenson@redhat.com>
326
327 * linux-low.c (current_lwp_ptid): New function.
328 * linux-x86-low.c: Include nat/linux-nat.h.
329 (x86_dr_low_get_addr): Use current_lwp_ptid.
330 (x86_dr_low_get_control): Likewise.
331 (x86_dr_low_get_status): Likewise.
332
eef49a3d
PA
3332015-03-20 Pedro Alves <palves@redhat.com>
334
335 * tracepoint.c (cmd_qtstatus): Make "str" const.
336
b2333d22
PA
3372015-03-20 Pedro Alves <palves@redhat.com>
338
339 * server.c (handle_general_set): Make "req_str" const.
340
23f238d3
PA
3412015-03-19 Pedro Alves <palves@redhat.com>
342
343 * linux-low.c (linux_resume_one_lwp): Rename to ...
344 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
345 instead call perror_with_name.
346 (check_ptrace_stopped_lwp_gone): New function.
347 (linux_resume_one_lwp): Reimplement as wrapper around
348 linux_resume_one_lwp_throw that swallows errors if the LWP is
349 gone.
350
91baf43f
PA
3512015-03-19 Pedro Alves <palves@redhat.com>
352
353 * linux-low.c (count_events_callback, select_event_lwp_callback):
354 No longer check whether the thread has resume_stop as last resume
355 kind.
356
8bf3b159
PA
3572015-03-19 Pedro Alves <palves@redhat.com>
358
359 * linux-low.c (count_events_callback, select_event_lwp_callback):
360 Use the lwp's status_pending_p field, not the thread's.
361
b90fc188
PA
3622015-03-19 Pedro Alves <palves@redhat.com>
363
364 * linux-low.c (select_event_lwp_callback): Update comments to
365 no longer mention SIGTRAP.
366
464b0089
GB
3672015-03-18 Gary Benson <gbenson@redhat.com>
368
369 * server.c (handle_query): Do not report vFile:fstat as supported.
370
aa9e327f
GB
3712015-03-11 Gary Benson <gbenson@redhat.com>
372
373 * hostio.c (sys/types.h): New include.
374 (sys/stat.h): Likewise.
375 (common-remote-fileio.h): Likewise.
376 (handle_fstat): New function.
377 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 378
791c0056
GB
3792015-03-11 Gary Benson <gbenson@redhat.com>
380
381 * configure.ac (AC_CHECK_MEMBERS): Add checks for
382 struct stat.st_blocks and struct stat.st_blksize.
383 * configure: Regenerate.
384 * config.in: Likewise.
385 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
386 (OBS): Add common-remote-fileio.o.
387 (common-remote-fileio.o): New rule.
388
9a9df970
PA
3892015-03-09 Pedro Alves <palves@redhat.com>
390
391 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
392 'struct sockaddr' pointer in 'accept' call.
393
9eb1356e
PA
3942015-03-09 Pedro Alves <palves@redhat.com>
395
396 Revert:
397 2015-03-07 Pedro Alves <palves@redhat.com>
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
aac331e4
PA
4092015-03-07 Pedro Alves <palves@redhat.com>
410
411 * configure.ac (build_warnings): Move
412 -Wdeclaration-after-statement to the C-specific set.
413 * configure: Regenerate.
414
366c75fc
PA
4152015-03-07 Pedro Alves <palves@redhat.com>
416
417 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
418 or <winsock2.h> here. Instead include "gdb_socket.h".
419 (remote_open): Use union gdb_sockaddr_u.
420 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
421 or <winsock2.h> here. Instead include "gdb_socket.h".
422 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
423 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
424 or <sys/un.h>.
425 (init_named_socket, gdb_agent_helper_thread): Use union
426 gdb_sockaddr_u.
427
492d29ea
PA
4282015-03-07 Pedro Alves <palves@redhat.com>
429
430 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
431 instead.
432
60a191ed
YQ
4332015-03-06 Yao Qi <yao.qi@linaro.org>
434
435 * linux-aarch64-low.c (aarch64_insert_point): Use
436 show_debug_regs as a boolean.
437 (aarch64_remove_point): Likewise.
438
f5771b1d
PA
4392015-03-05 Pedro Alves <palves@redhat.com>
440
441 * lynx-low.c (lynx_target_ops): Install NULL hooks for
442 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
443 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
444 * nto-low.c (nto_target_ops): Likewise.
445 * spu-low.c (spu_target_ops): Likewise.
446 * win32-low.c (win32_target_ops): Likewise.
447
3e572f71
PA
4482015-03-04 Pedro Alves <palves@redhat.com>
449
450 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
451 Decide whether a breakpoint triggered based on the SIGTRAP's
452 siginfo.si_code.
453 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
454 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
455 (linux_low_filter_event): Check for breakpoints before checking
456 watchpoints.
457 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
458 siginfo.si_code.
459 (linux_stopped_by_sw_breakpoint)
460 (linux_supports_stopped_by_sw_breakpoint)
461 (linux_stopped_by_hw_breakpoint)
462 (linux_supports_stopped_by_hw_breakpoint): New functions.
463 (linux_target_ops): Install new target methods.
464
1ec68e26
PA
4652015-03-04 Pedro Alves <palves@redhat.com>
466
467 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
468 * server.c (swbreak_feature, hwbreak_feature): New globals.
469 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
470 (captured_main): Clear swbreak_feature and hwbreak_feature.
471 * server.h (swbreak_feature, hwbreak_feature): Declare.
472 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
473 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
474 supports_stopped_by_hw_breakpoint>: New fields.
475 (target_supports_stopped_by_sw_breakpoint)
476 (target_stopped_by_sw_breakpoint)
477 (target_supports_stopped_by_hw_breakpoint)
478 (target_stopped_by_hw_breakpoint): Declare.
479
15c66dd6
PA
4802015-03-04 Pedro Alves <palves@redhat.com>
481
482 enum lwp_stop_reason -> enum target_stop_reason
483 * linux-low.c (check_stopped_by_breakpoint): Adjust.
484 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
485 (linux_wait_1, stuck_in_jump_pad_callback)
486 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
487 (linux_stopped_by_watchpoint):
488 * linux-low.h (enum lwp_stop_reason): Delete.
489 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
490 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
491
98fc70d6
YQ
4922015-03-04 Yao Qi <yao.qi@linaro.org>
493
494 * Makefile.in (SFILES): Add linux-aarch64-low.c.
495
dd2ac174
GB
4962015-03-03 Gary Benson <gbenson@redhat.com>
497
498 * hostio.c (handle_vFile): Fix prefix lengths.
499
d68e53f4
MM
5002015-03-03 Markus Metzger <markus.t.metzger@intel.com>
501
502 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
503 ptr_bits.
504
bf2d68ab
AA
5052015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
506
507 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
508 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
509 (clean): Add "rm -f" for above C files.
510 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
511 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
512 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
513 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
514 * linux-s390-low.c (HWCAP_S390_VX): New macro.
515 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
516 (init_registers_s390x_vx_linux64)
517 (init_registers_s390x_tevx_linux64)
518 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
519 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
520 declarations.
521 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
522 (s390_store_vxrs_high): New functions.
523 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
524 NT_S390_VXRS_HIGH.
525 (s390_arch_setup): Add logic for selecting one of the new target
526 descriptions. Activate the new vector regsets if applicable.
527 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
528 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
529 and init_registers_s390x_tevx_linux64.
530
c966a859
PA
5312015-03-01 Pedro Alves <palves@redhat.com>
532
533 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
534 parameter.
535
4180215b
PA
5362015-02-27 Pedro Alves <palves@redhat.com>
537
538 * linux-x86-low.c (u_debugreg_offset): New function.
539 (x86_linux_dr_get, x86_linux_dr_set): Use it.
540
749bab01
PA
5412015-02-27 Pedro Alves <palves@redhat.com>
542
543 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
544 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
545 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
546 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
547 (ps_lsetfpregs, ps_getpid)
548 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
549 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
550 (ps_lsetxregs, ps_plog): Declare.
551
3c14e5a3
PA
5522015-02-27 Pedro Alves <palves@redhat.com>
553
554 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
555 IP_AGENT_EXPORT_FUNC.
556 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
557 IP_AGENT_EXPORT_FUNC.
558 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
559 (IP_AGENT_EXPORT): Delete.
560 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
561 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
562 (gdb_trampoline_buffer_error, collecting, gdb_collect)
563 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
564 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
565 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
566 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
567 (traceframe_read_count, traceframe_write_count)
568 (traceframes_created, trace_state_variables, get_raw_reg)
569 (get_trace_state_variable_value, set_trace_state_variable_value)
570 (ust_loaded, helper_thread_id, cmd_buf): Use
571 IPA_SYM_EXPORTED_NAME.
572 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
573 (tracepoints) Use IP_AGENT_EXPORT_VAR.
574 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
575 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
576 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
577 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
578 EXTERN_C_PUSH/EXTERN_C_POP.
579 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
580 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
581 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
582 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
583 (traceframe_write_count, traceframe_read_count)
584 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
585 (about_to_request_buffer_space, get_trace_state_variable_value)
586 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
587 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
588 EXTERN_C_PUSH/EXTERN_C_POP.
589 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
590 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
591 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
592 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
593 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
594 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
595 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
596 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
597 Define.
598 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
599 (IP_AGENT_EXPORT_VAR_DECL): Define.
600 (tracing): Declare.
601 (gdb_agent_get_raw_reg): Declare.
602
fe978cb0
PA
6032015-02-27 Tom Tromey <tromey@redhat.com>
604 Pedro Alves <palves@redhat.com>
605
606 Rename symbols whose names are reserved C++ keywords throughout.
607
3bc3d82a
PA
6082015-02-27 Pedro Alves <palves@redhat.com>
609
610 * Makefile.in (COMPILER): New, get it from autoconf.
611 (CXX): Get from autoconf instead.
612 (COMPILE.pre): Use COMPILER.
613 (CC-LD): Rename to ...
614 (CC_LD): ... this. Use COMPILER.
615 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
616 (CXX_FOR_TARGET): Default to g++ instead of gcc.
617 * acinclude.m4: Include build-with-cxx.m4.
618 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
619 Disable -Werror by default if building in C++ mode.
620 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
621 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
622 the C++ compiler. Save/restore CXXFLAGS too.
623 * configure: Regenerate.
624
07697489
PA
6252015-02-27 Pedro Alves <palves@redhat.com>
626
627 * acinclude.m4: Include libiberty.m4.
628 * configure.ac: Call libiberty_INIT.
629 * config.in, configure: Regenerate.
630
9beb7c4e
PA
6312015-02-26 Pedro Alves <palves@redhat.com>
632
633 * linux-low.c (linux_wait_1): When incrementing the PC past a
634 program breakpoint always use the_low_target.breakpoint_len as
635 increment, rather than the maximum between that and
636 the_low_target.decr_pc_after_break.
637
8090aef2
PA
6382015-02-23 Pedro Alves <palves@redhat.com>
639
640 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
641 thread was doing a step-over; always adjust the PC if
642 we stepped over a permanent breakpoint.
643 (linux_wait_1): If we stepped over breakpoint that was on top of a
644 permanent breakpoint, manually advance the PC past it.
645
bc9540e8
PA
6462015-02-23 Pedro Alves <palves@redhat.com>
647
648 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
649 modes.
650 (x86_fill_gregset, x86_store_gregset): Use it when handling
651 $orig_eax.
652
2db9a427
PA
6532015-02-20 Pedro Alves <palves@redhat.com>
654
655 * thread-db.c: Include "nat/linux-procfs.h".
656 (thread_db_init): Skip listing new threads if the kernel supports
657 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
658
afa8d396
PA
6592015-02-20 Pedro Alves <palves@redhat.com>
660
661 * linux-low.c (status_pending_p_callback): Use ptid_match.
662
c9587f88
AT
6632015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
664
665 PR breakpoints/16812
666 * linux-low.c (wstatus_maybe_breakpoint): Remove.
667 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
668 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
669
b05ec7a5
AT
6702015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
671
672 PR breakpoints/15956
673 * tracepoint.c (cmd_qtinit): Add check for current_thread.
674
d33501a5
MM
6752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
676
677 * linux-low.c (linux_low_btrace_conf): Print size.
678 * server.c (handle_btrace_conf_general_set): New.
679 (hanle_general_set): Call handle_btrace_conf_general_set.
680 (handle_query): Report Qbtrace-conf:bts:size as supported.
681
f4abbc16
MM
6822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
683
684 * linux-low.c (linux_low_enable_btrace): Update parameters.
685 (linux_low_btrace_conf): New.
686 (linux_target_ops)<to_btrace_conf>: Initialize.
687 * server.c (current_btrace_conf): New.
688 (handle_btrace_enable): Rename to ...
689 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
690 to target_enable_btrace. Update comment. Update users.
691 (handle_qxfer_btrace_conf): New.
692 (qxfer_packets): Add btrace-conf entry.
693 (handle_query): Report qXfer:btrace-conf:read as supported packet.
694 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
695 (target_ops)<read_btrace_conf>: New.
696 (target_enable_btrace): Update parameters.
697 (target_read_btrace_conf): New.
698
043c3577
MM
6992015-02-09 Markus Metzger <markus.t.metzger@intel.com>
700
701 * server.c (handle_btrace_general_set): Remove call to
702 target_supports_btrace.
703 (supported_btrace_packets): New.
704 (handle_query): Call supported_btrace_packets.
705 * target.h: include btrace-common.h.
706 (btrace_target_info): Removed.
707 (supports_btrace, target_supports_btrace): Update parameters.
708
734b0e4b
MM
7092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
710
711 * Makefile.in (SFILES): Add common/btrace-common.c.
712 (OBS): Add common/btrace-common.o.
713 (btrace-common.o): Add build rules.
714 * linux-low: Include btrace-common.h.
715 (linux_low_read_btrace): Use struct btrace_data. Call
716 btrace_data_init and btrace_data_fini.
717
d6c146e9
PA
7182015-02-06 Pedro Alves <palves@redhat.com>
719
720 * thread-db.c (find_new_threads_callback): Add debug output.
721
20ba1ce6
PA
7222015-02-04 Pedro Alves <palves@redhat.com>
723
724 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
725 (resume_stopped_resumed_lwps): New function.
726 (linux_wait_for_event_filtered): Use it.
727
8cc73a39
SDJ
7282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
729
730 * Makefile.in (SFILES): Add linux-personality.c.
731 (linux-personality.o): New rule.
732 * configure.srv (srv_linux_obj): Add linux-personality.o to the
733 list of objects to be built.
734 * linux-low.c: Include nat/linux-personality.h.
735 (linux_create_inferior): Remove code to disable address space
736 randomization (moved to ../nat/linux-personality.c). Create
737 cleanup to disable address space randomization.
738
fb23d554
SDJ
7392015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
740
741 * Makefile.in (posix-strerror.o): New rule.
742 (mingw-strerror.o): Likewise.
743 * configure: Regenerated.
744 * configure.ac: Source file ../common/common.host. Initialize new
745 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
746
cdf43629
YQ
7472015-01-14 Yao Qi <yao@codesourcery.com>
748
749 * Makefile.in (SFILES): Add nat/ppc-linux.c.
750 (ppc-linux.o): New rule.
751 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
752 * configure.ac: AC_CHECK_FUNCS(getauxval).
753 * config.in: Re-generated.
754 * configure: Re-generated.
755 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
756 ppc64_64bit_inferior_p
757
514c5338
YQ
7582015-01-14 Yao Qi <yao@codesourcery.com>
759
760 * linux-ppc-low.c: Include "nat/ppc-linux.h".
761 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
762 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
763 (PT_ORIG_R3, PT_TRAP): Likewise.
764 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
765 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
766 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
767
3368c1e5
JB
7682015-01-10 Joel Brobecker <brobecker@adacore.com>
769
770 * i387-fp.c (i387_cache_to_xsave): In look over
771 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
772 zmmh_low_space field by use of zmmh_high_space.
773
582511be
PA
7742015-01-09 Pedro Alves <palves@redhat.com>
775
776 * linux-low.c (step_over_bkpt): Move higher up in the file.
777 (handle_extended_wait): Don't store the stop_pc here.
778 (get_stop_pc): Adjust comments and rename to ...
779 (check_stopped_by_breakpoint): ... this. Record whether the LWP
780 stopped for a software breakpoint or hardware breakpoint.
781 (thread_still_has_status_pending_p): New function.
782 (status_pending_p_callback): Use
783 thread_still_has_status_pending_p. If the event is no longer
784 interesting, resume the LWP.
785 (handle_tracepoints): Add assert.
786 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
787 (wstatus_maybe_breakpoint): New function.
788 (cancel_breakpoint): Delete function.
789 (check_stopped_by_watchpoint): New function, factored out from
790 linux_low_filter_event.
791 (lp_status_maybe_breakpoint): Delete function.
792 (linux_low_filter_event): Remove filter_ptid argument.
793 Leave thread group exits pending here. Store the LWP's stop PC.
794 Always leave events pending.
795 (linux_wait_for_event_filtered): Pull all events out of the
796 kernel, and leave them all pending.
797 (count_events_callback, select_event_lwp_callback): Consider all
798 events.
799 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
800 (select_event_lwp): Only give preference to the stepping LWP in
801 all-stop mode. Adjust comments.
802 (ignore_event): New function.
803 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
804 references to cancel_breakpoints. Adjust to renames. Also give
805 equal priority to all LWPs that have had events in non-stop mode.
806 If reporting a software breakpoint event, unadjust the LWP's PC.
807 (linux_wait): If linux_wait_1 returned an ignored event, retry.
808 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
809 Adjust.
810 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
811 (resume_status_pending_p): Use thread_still_has_status_pending_p.
812 (linux_stopped_by_watchpoint): Adjust.
813 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
814 * linux-low.h (enum lwp_stop_reason): New.
815 (struct lwp_info) <stop_pc>: Adjust comment.
816 <stopped_by_watchpoint>: Delete field.
817 <stop_reason>: New field.
818 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
819 * mem-break.c (software_breakpoint_inserted_here)
820 (hardware_breakpoint_inserted_here): New function.
821 * mem-break.h (software_breakpoint_inserted_here)
822 (hardware_breakpoint_inserted_here): Declare.
823 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
824 (cancel_breakpoints): Delete.
825 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
826 (upload_fast_traceframes): Remove references to
827 cancel_breakpoints.
828
a33e3959
PA
8292015-01-09 Pedro Alves <palves@redhat.com>
830
831 * thread-db.c (find_new_threads_callback): Ignore thread if the
832 kernel thread ID is -1.
833
8784d563
PA
8342015-01-09 Pedro Alves <palves@redhat.com>
835
836 * linux-low.c (linux_attach_fail_reason_string): Move to
837 nat/linux-ptrace.c, and rename.
838 (linux_attach_lwp): Update comment.
839 (attach_proc_task_lwp_callback): New function.
840 (linux_attach): Adjust to rename and use
841 linux_proc_attach_tgid_threads.
842 (linux_attach_fail_reason_string): Delete declaration.
843
76f2b779
JB
8442015-01-01 Joel Brobecker <brobecker@adacore.com>
845
846 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
847 * server.c (gdbserver_version): Likewise.
848
fafcc06a
SDJ
8492014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
850
851 * remote-utils.c: Include ctype.h.
852 (input_interrupt): Explicitly handle the case when the char
853 received is the NUL byte. Improve the printing of non-ASCII
854 characters.
855
beed38b8
JB
8562014-12-16 Joel Brobecker <brobecker@adacore.com>
857
858 * linux-low.c (linux_low_filter_event): Update call to
859 linux_enable_event_reporting following the addition of
860 a new parameter to that function.
861
bf330350
CU
8622014-12-16 Catalin Udma <catalin.udma@freescale.com>
863
864 PR server/17457
865 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
866 (AARCH64_FPCR_REGNO): Likewise.
867 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
868 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
869 (aarch64_store_fpregset): Likewise.
870
5227d625
JB
8712014-12-15 Joel Brobecker <brobecker@adacore.com>
872
873 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
874 Remove FIXME comment about assumption about N.
875
f93b65a0
JB
8762014-12-13 Joel Brobecker <brobecker@adacore.com>
877
878 * configure.ac: If large-file support is disabled in GDBserver,
879 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
880 * configure: Regenerate.
881
e5a9158d
AA
8822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
883
884 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
885 warning upon ENODATA from ptrace.
886 * linux-s390-low.c (s390_store_tdb): New.
887 (s390_regsets): Add regset for NT_S390_TDB.
888
feea5f36
AA
8892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
890
891 * linux-low.c (regsets_store_inferior_registers): Skip regsets
892 without a fill_function.
893 * linux-s390-low.c (s390_fill_last_break): Remove.
894 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
895 (s390_arch_setup): Use regset's size instead of fill_function for
896 loop end condition.
897
098dbe61
AA
8982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
899
900 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
901 the regset's store function when ptrace returned an error.
902 * regcache.c (get_thread_regcache): Invalidate register cache
903 before fetching inferior's registers.
904
28eef672
AA
9052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
906
907 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
908 while-loop as for-loop.
909 (regsets_store_inferior_registers): Likewise.
910
bdca27a2
YQ
9112014-11-28 Yao Qi <yao@codesourcery.com>
912
913 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
914 * config.in, configure: Re-generate.
915 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
916 is defined.
917
9c232dda
YQ
9182014-11-21 Yao Qi <yao@codesourcery.com>
919
920 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
921 (AC_CHECK_HEADERS): Remove malloc.h.
922 * configure: Re-generated.
923 * config.in: Re-generated.
924 * server.h: Don't include alloca.h and malloc.h.
925 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
926 Don't include malloc.h.
927
43968415
JB
9282014-11-17 Joel Brobecker <brobecker@adacore.com>
929
930 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
931 corresponding ERRNO check in same block.
932
40e91bc7
PA
9332014-11-12 Pedro Alves <palves@redhat.com>
934
935 * server.c (cont_thread): Update comment.
936 (start_inferior, attach_inferior): No longer clear cont_thread.
937 (handle_v_cont): No longer set cont_thread.
938 (captured_main): Clear cont_thread each time a GDB connects.
939
c2c118cf
PA
9402014-11-12 Pedro Alves <palves@redhat.com>
941
942 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
943 thread, and don't resume all threads if the Hc thread has exited.
944
78708b7c
PA
9452014-11-12 Pedro Alves <palves@redhat.com>
946
947 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
948 the process group instead of to a specific LWP.
949
a2abc7de
PA
9502014-10-15 Pedro Alves <palves@redhat.com>
951
952 PR server/17487
953 * win32-arm-low.c (arm_set_thread_context): Remove current_event
954 parameter.
955 (arm_set_thread_context): Delete.
956 (the_low_target): Adjust.
957 * win32-i386-low.c (debug_registers_changed)
958 (debug_registers_used): Delete.
959 (update_debug_registers_callback): New function.
960 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
961 needing to update their debug registers.
962 (win32_get_current_dr): New function.
963 (x86_dr_low_get_addr, x86_dr_low_get_control)
964 (x86_dr_low_get_status): Fetch the debug register from the thread
965 record's context.
966 (i386_initial_stuff): Adjust.
967 (i386_get_thread_context): Remove current_event parameter. Don't
968 clear debug_registers_changed nor copy DR values to
969 debug_reg_state.
970 (i386_set_thread_context): Delete.
971 (i386_prepare_to_resume): New function.
972 (i386_thread_added): Mark the thread as needing to update irs
973 debug registers.
974 (the_low_target): Remove i386_set_thread_context and install
975 i386_prepare_to_resume.
976 * win32-low.c (win32_get_thread_context): Adjust.
977 (win32_set_thread_context): Use SetThreadContext
978 directly.
979 (win32_prepare_to_resume): New function.
980 (win32_require_context): New function, factored out from ...
981 (thread_rec): ... this.
982 (continue_one_thread): Call win32_prepare_to_resume on each thread
983 we're about to continue.
984 (win32_resume): Call win32_prepare_to_resume on the event thread.
985 * win32-low.h (struct win32_thread_info)
986 <debug_registers_changed>: New field.
987 (struct win32_target_ops): Change prototype of set_thread_context,
988 delete set_thread_context and add prepare_to_resume.
989 (win32_require_context): New declaration.
990
a442d071
GB
9912014-10-08 Gary Benson <gbenson@redhat.com>
992
993 * server.h: Do not include common-exceptions.h.
994
6f1947e8
GB
9952014-10-08 Gary Benson <gbenson@redhat.com>
996
997 * server.h: Do not include cleanups.h.
998
63b434a4
JH
9992014-09-30 James Hogan <james.hogan@imgtec.com>
1000
1001 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1002 mips64-dsp-linux.c.
1003
c4d9ceb6
YQ
10042014-09-23 Yao Qi <yao@codesourcery.com>
1005
1006 * linux-low.c (lp_status_maybe_breakpoint): New function.
1007 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1008 (count_events_callback): Likewise.
1009 (select_event_lwp_callback): Likewise.
1010 (cancel_breakpoints_callback): Likewise.
1011
89a5711c
DB
10122014-09-19 Don Breazeal <donb@codesourcery.com>
1013
1014 * linux-low.c (handle_extended_wait): Call
1015 linux_ptrace_get_extended_event.
1016 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1017 linux_is_extended_waitstatus.
1018
bffc0964
JB
10192014-09-16 Joel Brobecker <brobecker@adacore.com>
1020
1021 * Makefile.in (CPPFLAGS): Define.
1022 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1023 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1024
0bfdf32f
GB
10252014-09-16 Gary Benson <gbenson@redhat.com>
1026
1027 * inferiors.h (current_inferior): Renamed as...
1028 (current_thread): New variable. All uses updated.
1029 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1030 (maybe_move_out_of_jump_pad): Likewise.
1031 (cancel_breakpoint): Likewise.
1032 (linux_low_filter_event): Likewise.
1033 (wait_for_sigstop): Likewise.
1034 (linux_resume_one_lwp): Likewise.
1035 (need_step_over_p): Likewise.
1036 (start_step_over): Likewise.
1037 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1038 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1039 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1040 and save_inferior as saved_thread.
1041 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1042 saved_thread.
1043 (regcache_invalidate_thread): Likewise.
1044 * remote-utils.c (prepare_resume_reply): Likewise.
1045 * thread-db.c (thread_db_get_tls_address): Likewise.
1046 (disable_thread_event_reporting): Likewise.
1047 (remove_thread_event_breakpoints): Likewise.
1048 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1049 as saved_thread.
1050 * target.h (set_desired_inferior): Renamed as...
1051 (set_desired_thread): New declaration. All uses updated.
1052 * server.c (myresume): Updated comment to reference thread instead
1053 of inferior.
1054 (handle_serial_event): Likewise.
1055 (handle_target_event): Likewise.
1056
361c8ade
GB
10572014-09-12 Tom Tromey <tromey@redhat.com>
1058 Gary Benson <gbenson@redhat.com>
1059
1060 * regcache.h: Include common-regcache.h.
1061 (regcache_read_pc): Don't declare.
1062 * regcache.c (get_thread_regcache_for_ptid): New function.
1063
bd9269f7
GB
10642014-09-11 Tom Tromey <tromey@redhat.com>
1065 Gary Benson <gbenson@redhat.com>
1066
1067 * symbol.c: New file.
1068 * Makefile.in (SFILES): Add symbol.c.
1069 (OBS): Add symbol.o.
1070
f8c1d06b
GB
10712014-09-11 Gary Benson <gbenson@redhat.com>
1072
1073 * target.c (target_stop_ptid, target_continue_ptid): New
1074 functions.
1075
721ec300
GB
10762014-09-11 Tom Tromey <tromey@redhat.com>
1077 Gary Benson <gbenson@redhat.com>
1078
1079 * target.h: Include target/target.h.
1080 * target.c (target_read_memory, target_read_uint32)
1081 (target_write_memory): New functions.
1082
c5e92cca
GB
10832014-09-11 Gary Benson <gbenson@redhat.com>
1084
1085 * server.h (debug_hw_points): Don't declare.
1086 * server.c (debug_hw_points): Don't define. Replace all uses
1087 with show_debug_regs.
1088 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1089 all uses with show_debug_regs.
1090
2e4bb98a
EBM
10912014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1092
1093 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1094 endianness into account.
1095 (ppc_supply_ptrace_register): Likewise.
1096
ac740bc7
JH
10972014-09-03 James Hogan <james.hogan@imgtec.com>
1098
1099 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1100 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1101
97ea6506
GB
11022014-09-03 Gary Benson <gbenson@redhat.com>
1103
1104 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1105 ALL_DEBUG_ADDRESS_REGISTERS.
1106
df7e5265
GB
11072014-09-02 Gary Benson <gbenson@redhat.com>
1108
1109 * i386-low.h: Renamed as...
1110 * x86-low.h: New file. All type, function and variable name
1111 prefixes changed from "i386_" to "x86_". All references updated.
1112 * i386-low.c: Renamed as...
1113 * x86-low.c: New file. All type, function and variable name
1114 prefixes changed from "i386_" to "x86_". All references updated.
1115
ed859da7
GB
11162014-09-02 Gary Benson <gbenson@redhat.com>
1117
1118 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1119 (x86_linux_new_thread): Likewise.
1120
860789c7
GB
11212014-08-29 Gary Benson <gbenson@redhat.com>
1122
1123 * server.h (setjmp.h): Do not include.
1124 (toplevel): Do not declare.
1125 (common-exceptions.h): Include.
1126 (cleanups.h): Likewise.
1127 * server.c (toplevel): Do not define.
1128 (exit_code): New static global.
1129 (detach_or_kill_for_exit_cleanup): New function.
1130 (main): New function. Original main renamed to...
1131 (captured_main): New function.
1132 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1133
ff55e1b5
GB
11342014-08-29 Gary Benson <gbenson@redhat.com>
1135
1136 * Makefile.in (SFILES): Add common/common-exceptions.c.
1137 (OBS): Add common-exceptions.o.
1138 (common-exceptions.o): New rule.
1139 * utils.c (prepare_to_throw_exception): New function.
1140
e9bcb658
GB
11412014-08-29 Gary Benson <gbenson@redhat.com>
1142
1143 * config.in: Regenerate.
1144 * configure: Likewise.
1145
e3180625
GB
11462014-08-29 Gary Benson <gbenson@redhat.com>
1147
1148 * Makefile.in (SFILES): Add common/cleanups.c.
1149 (OBS): cleanups.o.
1150 (cleanups.o): New rule.
1151
e3d6ba5d
GB
11522014-08-29 Gary Benson <gbenson@redhat.com>
1153
1154 * utils.c (internal_vwarning): New function.
1155
7096e886
GB
11562014-08-28 Gary Benson <gbenson@redhat.com>
1157
1158 * utils.h (fatal): Remove declaration.
1159 * utils.c (fatal): Remove function.
1160
14ce3192
GB
11612014-08-28 Gary Benson <gbenson@redhat.com>
1162
1163 * tracepoint.c (gdb_agent_init): Replace fatal with
1164 perror_with_name.
1165 (initialize_tracepoint): Likewise.
1166
50278d59
GB
11672014-08-28 Gary Benson <gbenson@redhat.com>
1168
1169 * remote-utils.c (remote_prepare): Replace fatal with error.
1170
aa96c426
GB
11712014-08-28 Gary Benson <gbenson@redhat.com>
1172
1173 * linux-low.c (linux_async): Replace fatal with warning.
1174 Tidy up and return.
1175 (linux_start_non_stop): Return -1 if linux_async failed.
1176
f7160e97
GB
11772014-08-28 Gary Benson <gbenson@redhat.com>
1178
1179 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1180 gdb_assert.
1181 (i386_dr_low_get_addr): Remove vague comment.
1182 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1183 gdb_assert.
1184
38e08fca
GB
11852014-08-28 Gary Benson <gbenson@redhat.com>
1186
1187 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1188 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1189 internal_error.
1190 (linux_resume_one_lwp): Likewise.
1191 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1192 gdb_assert.
1193 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1194 with internal_error.
1195 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1196 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1197 (find_register_by_name): Replace fatal with internal_error.
1198 (find_regno): Likewise.
1199 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1200 * thread-db.c (thread_db_create_event): Likewise.
1201 (thread_db_load_search): Likewise.
1202 (try_thread_db_load_1): Likewise.
1203 * tracepoint.c (get_jump_space_head): Replace fatal with
1204 internal_error.
1205 (claim_trampoline_space): Likewise.
1206 (have_fast_tracepoint_trampoline_buffer): Likewise.
1207 (cmd_qtstart): Likewise.
1208 (stop_tracing): Likewise.
1209 (fast_tracepoint_collecting): Likewise.
1210 (target_malloc): Likewise.
1211 (download_tracepoint): Likewise.
1212 (download_trace_state_variables): Replace check with gdb_assert.
1213 (upload_fast_traceframes): Replace fatal with internal_error.
1214
34abf635
GB
12152014-08-19 Tom Tromey <tromey@redhat.com>
1216 Gary Benson <gbenson@redhat.com>
1217
1218 * Makefile.in (SFILES): Add common/common-debug.c.
1219 (OBS): Add common-debug.o.
1220 (common-debug.o): New rule.
1221 * debug.h (debug_printf): Don't declare.
1222 * debug.c (debug_printf): Renamed and rewritten as...
1223 (debug_vprintf): New function.
1224
f6e94d78
GB
12252014-08-19 Gary Benson <gbenson@redhat.com>
1226
1227 * utils.h: Do not include print-utils.h.
1228
9239eeab
GB
12292014-08-19 Tom Tromey <tromey@redhat.com>
1230 Gary Benson <gbenson@redhat.com>
1231
1232 * server.h: Add static assertion.
1233 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1234
ef87c8bb
GB
12352014-08-19 Tom Tromey <tromey@redhat.com>
1236 Gary Benson <gbenson@redhat.com>
1237
1238 * Makefile.in (SFILES): Add common/errors.c.
1239 (OBS): Add errors.o.
1240 (IPA_OBS): Add errors-ipa.o.
1241 (errors.o): New rule.
1242 (errors-ipa.o): Likewise.
1243 * utils.h (perror_with_name, error, warning): Don't declare.
1244 * utils.c (warning): Renamed and rewritten as...
1245 (vwarning): New function.
1246 (error): Renamed and rewritten as...
1247 (verror): New function.
1248 (internal_error): Renamed and rewritten as...
1249 (internal_verror): New function.
1250
bb974a24
GB
12512014-08-07 Gary Benson <gbenson@redhat.com>
1252
1253 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1254 * configure: Regenerate.
1255 * config.in: Likewise.
1256 * server.h: Do not include errno.h.
1257 * event-loop.c: Likewise.
1258 * hostio-errno.c: Likewise.
1259 * linux-low.c: Likewise.
1260 * remote-utils.c: Likewise.
1261 * spu-low.c: Likewise.
1262 * utils.c: Likewise.
1263 * gdbreplay.c: Unconditionally include errno.h.
1264
6d3d12eb
GB
12652014-08-07 Gary Benson <gbenson@redhat.com>
1266
1267 * server.h: Do not include string.h.
1268 * event-loop.c: Likewise.
1269 * linux-low.c: Likewise.
1270 * regcache.c: Likewise.
1271 * remote-utils.c: Likewise.
1272 * spu-low.c: Likewise.
1273 * utils.c: Likewise.
1274
dccbb609
GB
12752014-08-07 Gary Benson <gbenson@redhat.com>
1276
1277 * server.h: Do not include gdb_assert.h.
1278
e76df0d0
GB
12792014-08-07 Gary Benson <gbenson@redhat.com>
1280
1281 * server.h: Do not include common-utils.h.
1282
4cb9c816
GB
12832014-08-07 Gary Benson <gbenson@redhat.com>
1284
1285 * server.h: Do not include ptid.h.
1286 * notif.h: Likewise.
1287
3995eeee
GB
12882014-08-07 Gary Benson <gbenson@redhat.com>
1289
1290 * server.h: Do not include gdb_locale.h.
1291
cb9f1a9b
GB
12922014-08-07 Gary Benson <gbenson@redhat.com>
1293
1294 * server.h: Do not include gdb/signals.h.
1295 * win32-low.c: Likewise.
1296
a5fceff8
GB
12972014-08-07 Gary Benson <gbenson@redhat.com>
1298
1299 * server.h: Do not include pathmax.h.
1300
b9391142
GB
13012014-08-07 Gary Benson <gbenson@redhat.com>
1302
1303 * server.h: Do not include libiberty.h.
1304 * linux-bfin-low.c: Likewise.
1305
0e443c87
GB
13062014-08-07 Gary Benson <gbenson@redhat.com>
1307
1308 * server.h: Do not include ansidecl.h.
1309
8ebb3f56
GB
13102014-08-07 Gary Benson <gbenson@redhat.com>
1311
1312 * linux-x86-low.c: Do not include stddef.h.
1313 * lynx-ppc-low.c: Likewise.
1314 * tracepoint.c: Likewise.
1315
8980bdf6
GB
13162014-08-07 Gary Benson <gbenson@redhat.com>
1317
1318 * server.h: Do not include stdarg.h.
1319 * nto-low.c: Likewise.
1320
d7096f71
GB
13212014-08-07 Gary Benson <gbenson@redhat.com>
1322
1323 * server.h: Do not include stdlib.h.
1324 * inferiors.c: Likewise.
1325 * linux-low.c: Likewise.
1326 * regcache.c: Likewise.
1327 * spu-low.c: Likewise.
1328 * tracepoint.c: Likewise.
1329 * utils.c: Likewise.
1330
d02f550d
GB
13312014-08-07 Gary Benson <gbenson@redhat.com>
1332
1333 * server.h: Do not include stdio.h.
1334 * linux-low.c: Likewise.
1335 * remote-utils.c: Likewise.
1336 * spu-low.c: Likewise.
1337 * utils.c: Likewise.
1338 * wincecompat.c: Likewise.
1339
87f6c4e3
GB
13402014-08-06 Gary Benson <gbenson@redhat.com>
1341
1342 * regcache.c (init_register_cache): Move conditionals inside if.
1343
7089dca4
GB
13442014-08-06 Gary Benson <gbenson@redhat.com>
1345
1346 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1347
462f517e
GB
13482014-07-31 Gary Benson <gbenson@redhat.com>
1349
1350 * ax.h: Do not include server.h.
1351 * gdbthread.h: Likewise.
1352 * lynx-low.h: Likewise.
1353 * notif.h: Likewise.
1354
976411d6
GB
13552014-07-30 Gary Benson <gbenson@redhat.com>
1356
1357 * server.h: Include common-defs.h.
1358 Do not include config.h or build-gnulib-gdbserver/config.h.
1359
d41f6d8e
GB
13602014-07-30 Gary Benson <gbenson@redhat.com>
1361
1362 * hostio-errno.c: Move server.h to top of includes list.
1363 * inferiors.c: Likewise.
1364 * linux-x86-low.c: Likewise.
1365 * notif.c: Include server.h.
1366
314c6a35
TT
13672014-07-24 Tom Tromey <tromey@redhat.com>
1368 Gary Benson <gbenson@redhat.com>
1369
1370 * server.h (CORE_ADDR): Now unsigned.
1371
69ff6be5
PA
13722014-07-16 Pedro Alves <palves@redhat.com>
1373
1374 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1375
ce9e3fe7
PA
13762014-07-15 Pedro Alves <palves@redhat.com>
1377
1378 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1379 copy.
1380
e76126e8
PA
13812014-07-11 Pedro Alves <palves@redhat.com>
1382
1383 * linux-low.c (kill_wait_lwp): New function, based on
1384 kill_one_lwp_callback, but use my_waitpid directly.
1385 (kill_one_lwp_callback, linux_kill): Use it.
1386
8e9db26e
PA
13872014-06-23 Pedro Alves <palves@redhat.com>
1388
1389 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1390 before setting DR0..DR3.
1391
698b3e08
GB
13922014-06-20 Gary Benson <gbenson@redhat.com>
1393
1394 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1395 * configure: Regenerated.
1396 * config.in: Likewise.
1397
125f8a3d
GB
13982014-06-20 Gary Benson <gbenson@redhat.com>
1399
1400 * Makefile.in (SFILES): Update locations for files moved
1401 from common to nat.
1402 (object file files): Reordered.
1403
42995dbd
GB
14042014-06-20 Gary Benson <gbenson@redhat.com>
1405
1406 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1407 (i386_dr_low_set_addr): Likewise.
1408 (i386_dr_low_get_addr): Likewise.
1409 (i386_dr_low_can_set_control): Likewise.
1410 (i386_dr_low_set_control): Likewise.
1411 (i386_dr_low_get_control): Likewise.
1412 (i386_dr_low_get_status): Likewise.
1413 (i386_get_debug_register_length): Likewise.
1414 * linux-x86-low.c (i386_dr_low_set_addr):
1415 Changed signature. Made static.
1416 (i386_dr_low_get_addr): Likewise.
1417 (i386_dr_low_set_control): Likewise.
1418 (i386_dr_low_get_control): Likewise.
1419 (i386_dr_low_get_status): Likewise.
1420 (i386_dr_low): New global variable.
1421 * win32-i386-low.c (i386_dr_low_set_addr):
1422 Changed signature. Made static.
1423 (i386_dr_low_get_addr): Likewise.
1424 (i386_dr_low_set_control): Likewise.
1425 (i386_dr_low_get_control): Likewise.
1426 (i386_dr_low_get_status): Likewise.
1427 (i386_dr_low): New global variable.
1428
e1d2394b
MS
14292014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1430
1431 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1432 * Makefile.in (AR, AR_FLAGS): Define.
1433 * configure: Regenerate.
1434
3a8ee006
GB
14352014-06-19 Gary Benson <gbenson@redhat.com>
1436
1437 * Makefile.in (i386-dregs.o): New rule.
1438 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1439 * i386-low.c (target.h): Remove include.
1440 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1441 (DR_CONTROL_SHIFT): Likewise.
1442 (DR_CONTROL_SIZE): Likewise.
1443 (DR_RW_EXECUTE): Likewise.
1444 (DR_RW_WRITE): Likewise.
1445 (DR_RW_READ): Likewise.
1446 (DR_RW_IORW): Likewise.
1447 (DR_LEN_1): Likewise.
1448 (DR_LEN_2): Likewise.
1449 (DR_LEN_4): Likewise.
1450 (DR_LEN_8): Likewise.
1451 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1452 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1453 (DR_ENABLE_SIZE): Likewise.
1454 (DR_LOCAL_SLOWDOWN): Likewise.
1455 (DR_GLOBAL_SLOWDOWN): Likewise.
1456 (DR_CONTROL_RESERVED): Likewise.
1457 (I386_DR_CONTROL_MASK): Likewise.
1458 (I386_DR_VACANT): Likewise.
1459 (I386_DR_LOCAL_ENABLE): Likewise.
1460 (I386_DR_GLOBAL_ENABLE): Likewise.
1461 (I386_DR_DISABLE): Likewise.
1462 (I386_DR_SET_RW_LEN): Likewise.
1463 (I386_DR_GET_RW_LEN): Likewise.
1464 (I386_DR_WATCH_HIT): Likewise.
1465 (i386_wp_op_t): Likewise.
1466 (i386_show_dr): Likewise.
1467 (i386_length_and_rw_bits): Likewise.
1468 (i386_insert_aligned_watchpoint): Likewise.
1469 (i386_remove_aligned_watchpoint): Likewise.
1470 (i386_handle_nonaligned_watchpoint): Likewise.
1471 i386_update_inferior_debug_regs(): Likewise.
1472 (i386_dr_insert_watchpoint): Likewise.
1473 (i386_dr_remove_watchpoint): Likewise.
1474 (i386_dr_region_ok_for_watchpoint): Likewise.
1475 (i386_dr_stopped_data_address): Likewise.
1476 (i386_dr_stopped_by_watchpoint): Likewise.
1477
8f26655c
GB
14782014-06-19 Gary Benson <gbenson@redhat.com>
1479
1480 * i386-low.c (i386_dr_show): Renamed to
1481 i386_show_dr and made static. All uses updated.
1482 (i386_dr_length_and_rw_bits): Renamed to
1483 i386_length_and_rw_bits and made static.
1484 All uses updated.
1485 (i386_dr_insert_aligned_watchpoint): Renamed to
1486 i386_insert_aligned_watchpoint and made static.
1487 All uses updated.
1488 (i386_dr_remove_aligned_watchpoint): Renamed to
1489 i386_remove_aligned_watchpoint and made static.
1490 All uses updated.
1491 (i386_dr_update_inferior_debug_regs): Renamed to
1492 i386_update_inferior_debug_regs and made static.
1493 All uses updated.
1494
b9228891
GB
14952014-06-18 Gary Benson <gbenson@redhat.com>
1496
5171def3
GB
1497 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1498 (i386_dr_low_can_set_control): Likewise.
1499 (i386_get_debug_register_length): Likewise.
1500 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1501 (i386_dr_low_can_set_control): Likewise.
1502 (i386_get_debug_register_length): Likewise.
1503
15042014-06-17 Gary Benson <gbenson@redhat.com>
1505
b9228891
GB
1506 * i386-low.h (i386-dregs.h): New include.
1507 (DR_FIRSTADDR): Now in i386-dregs.h.
1508 (DR_LASTADDR): Likewise.
1509 (DR_NADDR): Likewise.
1510 (DR_STATUS): Likewise.
1511 (DR_CONTROL): Likewise.
1512 (i386_debug_reg_state): Likewise.
1513 (i386_dr_insert_watchpoint): Likewise.
1514 (i386_dr_remove_watchpoint): Likewise.
1515 (i386_dr_region_ok_for_watchpoint): Likewise.
1516 (i386_dr_stopped_data_address): Likewise.
1517 (i386_dr_stopped_by_watchpoint): Likewise.
1518 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1519
4be83cc2
GB
15202014-06-18 Gary Benson <gbenson@redhat.com>
1521
1522 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1523 i386_dr_insert_watchpoint.
1524 (i386_low_remove_watchpoint): Renamed to
1525 i386_dr_remove_watchpoint.
1526 (i386_low_region_ok_for_watchpoint): Renamed to
1527 i386_dr_region_ok_for_watchpoint.
1528 (i386_low_stopped_data_address): Renamed to
1529 i386_dr_stopped_data_address.
1530 (i386_low_stopped_by_watchpoint): Renamed to
1531 i386_dr_stopped_by_watchpoint.
1532 * i386-low.c (i386_show_dr): Renamed to
1533 i386_dr_show and made nonstatic. All uses updated.
1534 (i386_length_and_rw_bits): Renamed to
1535 i386_dr_length_and_rw_bits and made nonstatic.
1536 All uses updated.
1537 (i386_insert_aligned_watchpoint): Renamed to
1538 i386_dr_insert_aligned_watchpoint and made nonstatic.
1539 All uses updated.
1540 (i386_remove_aligned_watchpoint): Renamed to
1541 i386_dr_remove_aligned_watchpoint and made nonstatic.
1542 All uses updated.
1543 (i386_update_inferior_debug_regs): Renamed to
1544 i386_dr_update_inferior_debug_regs and made nonstatic.
1545 All uses updated.
1546 (i386_low_insert_watchpoint): Renamed to
1547 i386_dr_insert_watchpoint. All uses updated.
1548 (i386_low_remove_watchpoint): Renamed to
1549 i386_dr_remove_watchpoint. All uses updated.
1550 (i386_low_region_ok_for_watchpoint): Renamed to
1551 i386_dr_region_ok_for_watchpoint. All uses updated.
1552 (i386_low_stopped_data_address): Renamed to
1553 i386_dr_stopped_data_address. All uses updated.
1554 (i386_low_stopped_by_watchpoint): Renamed to
1555 i386_dr_stopped_by_watchpoint. All uses updated.
1556
131aa0d4
GB
15572014-06-18 Gary Benson <gbenson@redhat.com>
1558
1559 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1560 (i386_dr_low_can_set_control): Likewise.
1561 (i386_insert_aligned_watchpoint): New check.
1562
d9305f7f
GB
15632014-06-18 Gary Benson <gbenson@redhat.com>
1564
1565 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1566 Renamed to state.
1567
e927c9fc
GB
15682014-06-18 Gary Benson <gbenson@redhat.com>
1569
1570 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1571 instead of fatal and error.
1572 (i386_handle_nonaligned_watchpoint): Likewise.
1573
1b6d4134
GB
15742014-06-18 Gary Benson <gbenson@redhat.com>
1575
1576 * i386-low.c (i386_get_debug_register_length): New macro.
1577 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1578 (i386_show_dr): Use debug_printf instead of fprintf. Use
1579 phex to format values.
1580
6e62758f
GB
15812014-06-18 Gary Benson <gbenson@redhat.com>
1582
1583 * i386-low.h: Comment changes.
1584 * i386-low.c: Likewise.
1585
fc6e2f03
GB
15862014-06-18 Gary Benson <gbenson@redhat.com>
1587
1588 * i386-low.c: Whitespace changes.
1589
f9d1eeed
TT
15902014-06-12 Tom Tromey <tromey@redhat.com>
1591
1592 * utils.c (freeargv): Remove.
1593
0b04e523
TT
15942014-06-12 Tom Tromey <tromey@redhat.com>
1595
1596 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1597 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1598 (parse_debug_format_options): Likewise.
1599 (gdbserver_usage): Likewise.
1600 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1601 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1602 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1603 against libiberty.
1604 ($(LIBGNU)): Depend on libiberty.
1605 (all-lib): Recurse into all subdirs.
1606 (install-only): Invoke "install" target in subdirs.
1607 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1608 targets.
1609 * configure: Rebuild.
1610 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1611 for vasprintf, vsnprintf, or gettimeofday.
1612 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1613 srv_tgtobj.
1614
270c9937
JB
16152014-06-05 Joel Brobecker <brobecker@adacore.com>
1616
1617 * development.sh: Delete.
1618 * Makefile.in (config.status): Adjust dependency on development.sh.
1619 * configure.ac: Adjust development.sh source call.
1620 * configure: Regenerate.
1621
0a261ed8
PA
16222014-06-02 Pedro Alves <palves@redhat.com>
1623
1624 * ax.c (gdb_free_agent_expr): New function.
1625 * ax.h (gdb_free_agent_expr): New declaration.
1626 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1627 list.
1628 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1629 static.
1630 (clear_breakpoint_conditions_and_commands): New function.
1631 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1632 (clear_breakpoint_conditions_and_commands): New declaration.
1633
e9dae05e
RR
16342014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1635
1636 * linux-aarch64-low.c (asm/ptrace.h): Include.
1637
5876f503
JK
16382014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1639
1640 Fix TLS access for -static -pthread.
1641 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1642 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1643 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1644
802e8e6d
PA
16452014-05-20 Pedro Alves <palves@redhat.com>
1646
1647 * linux-aarch64-low.c (aarch64_insert_point)
1648 (aarch64_remove_point): No longer check whether the type is
1649 supported here. Adjust to new interface.
1650 (the_low_target): Install aarch64_supports_z_point_type as
1651 supports_z_point_type method.
1652 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1653 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1654 instead of a Z packet char. Adjust.
1655 (arm_supports_z_point_type): New function.
1656 (arm_insert_point, arm_remove_point): Adjust to new interface.
1657 (the_low_target): Install arm_supports_z_point_type.
1658 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1659 (cris_insert_point, cris_remove_point): Adjust to new interface.
1660 Don't check whether the type is supported here.
1661 (the_low_target): Install cris_supports_z_point_type.
1662 * linux-low.c (linux_supports_z_point_type): New function.
1663 (linux_insert_point, linux_remove_point): Adjust to new interface.
1664 * linux-low.h (struct linux_target_ops) <insert_point,
1665 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1666 raw_breakpoint pointer parameter.
1667 <supports_z_point_type>: New method.
1668 * linux-mips-low.c (mips_supports_z_point_type): New function.
1669 (mips_insert_point, mips_remove_point): Adjust to new interface.
1670 Use mips_supports_z_point_type.
1671 (the_low_target): Install mips_supports_z_point_type.
1672 * linux-ppc-low.c (the_low_target): Install NULL as
1673 supports_z_point_type method.
1674 * linux-s390-low.c (the_low_target): Install NULL as
1675 supports_z_point_type method.
1676 * linux-sparc-low.c (the_low_target): Install NULL as
1677 supports_z_point_type method.
1678 * linux-x86-low.c (x86_supports_z_point_type): New function.
1679 (x86_insert_point): Adjust to new insert_point interface. Use
1680 insert_memory_breakpoint. Adjust to new
1681 i386_low_insert_watchpoint interface.
1682 (x86_remove_point): Adjust to remove_point interface. Use
1683 remove_memory_breakpoint. Adjust to new
1684 i386_low_remove_watchpoint interface.
1685 (the_low_target): Install x86_supports_z_point_type.
1686 * lynx-low.c (lynx_target_ops): Install NULL as
1687 supports_z_point_type callback.
1688 * nto-low.c (nto_supports_z_point_type): New.
1689 (nto_insert_point, nto_remove_point): Adjust to new interface.
1690 (nto_target_ops): Install nto_supports_z_point_type.
1691 * mem-break.c: Adjust intro comment.
1692 (struct raw_breakpoint) <raw_type, size>: New fields.
1693 <inserted>: Update comment.
1694 <shlib_disabled>: Delete field.
1695 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1696 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1697 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1698 (raw_bkpt_type_to_target_hw_bp_type): New function.
1699 (find_enabled_raw_code_breakpoint_at): New function.
1700 (find_raw_breakpoint_at): New type and size parameters. Use them.
1701 (insert_memory_breakpoint): New function, based off
1702 set_raw_breakpoint_at.
1703 (remove_memory_breakpoint): New function.
1704 (set_raw_breakpoint_at): Reimplement.
1705 (set_breakpoint): New, based on set_breakpoint_at.
1706 (set_breakpoint_at): Reimplement.
1707 (delete_raw_breakpoint): Go through the_target->remove_point
1708 instead of assuming memory breakpoints.
1709 (find_gdb_breakpoint_at): Delete.
1710 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1711 (find_gdb_breakpoint): New function.
1712 (set_gdb_breakpoint_at): Delete.
1713 (z_type_supported): New function.
1714 (set_gdb_breakpoint_1): New function, loosely based off
1715 set_gdb_breakpoint_at.
1716 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1717 (delete_gdb_breakpoint_at): Delete.
1718 (delete_gdb_breakpoint_1): New function, loosely based off
1719 delete_gdb_breakpoint_at.
1720 (delete_gdb_breakpoint): New function.
1721 (clear_gdb_breakpoint_conditions): Rename to ...
1722 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1723 breakpoint.
1724 (add_condition_to_breakpoint): Make static.
1725 (add_breakpoint_condition): Take a struct breakpoint pointer
1726 instead of an address. Adjust.
1727 (gdb_condition_true_at_breakpoint): Rename to ...
1728 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1729 z_type parameter.
1730 (gdb_condition_true_at_breakpoint): Reimplement.
1731 (add_breakpoint_commands): Take a struct breakpoint pointer
1732 instead of an address. Adjust.
1733 (gdb_no_commands_at_breakpoint): Rename to ...
1734 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1735 parameter. Return true if no breakpoint was found. Change debug
1736 output.
1737 (gdb_no_commands_at_breakpoint): Reimplement.
1738 (run_breakpoint_commands): Rename to ...
1739 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1740 and change return type to boolean.
1741 (run_breakpoint_commands): New function.
1742 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1743 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1744 breakpoint. Go through the_target->remove_point instead of
1745 assuming memory breakpoint.
1746 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1747 software and hardware breakpoints.
1748 (reinsert_raw_breakpoint): Go through the_target->insert_point
1749 instead of assuming memory breakpoint.
1750 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1751 software and hardware breakpoints.
1752 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1753 Check both software and hardware breakpoints.
1754 (validate_inserted_breakpoint): Assert the breakpoint is a
1755 software breakpoint. Set the inserted flag to -1 instead of
1756 setting shlib_disabled.
1757 (delete_disabled_breakpoints): Adjust.
1758 (validate_breakpoints): Only validate software breakpoints.
1759 Adjust to inserted flag change.
1760 (check_mem_read, check_mem_write): Skip breakpoint types other
1761 than software breakpoints. Adjust to inserted flag change.
1762 * mem-break.h (enum raw_bkpt_type): New enum.
1763 (raw_breakpoint, struct process_info): Forward declare.
1764 (Z_packet_to_target_hw_bp_type): Delete declaration.
1765 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1766 (set_gdb_breakpoint, delete_gdb_breakpoint)
1767 (clear_breakpoint_conditions): New declarations.
1768 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1769 (breakpoint_inserted_here): Update comment.
1770 (add_breakpoint_condition, add_breakpoint_commands): Replace
1771 address parameter with a breakpoint pointer parameter.
1772 (gdb_breakpoint_here): Update comment.
1773 (delete_gdb_breakpoint_at): Delete.
1774 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1775 * server.c (process_point_options): Take a struct breakpoint
1776 pointer instead of an address. Adjust.
1777 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1778 delete_gdb_breakpoint.
1779 * spu-low.c (spu_target_ops): Install NULL as
1780 supports_z_point_type method.
1781 * target.h: Include mem-break.h.
1782 (struct target_ops) <prepare_to_access_memory>: Update comment.
1783 <supports_z_point_type>: New field.
1784 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1785 instead of a char. Also take a raw breakpoint pointer.
1786 * win32-arm-low.c (the_low_target): Install NULL as
1787 supports_z_point_type.
1788 * win32-i386-low.c (i386_supports_z_point_type): New function.
1789 (i386_insert_point, i386_remove_point): Adjust to new interface.
1790 (the_low_target): Install i386_supports_z_point_type.
1791 * win32-low.c (win32_supports_z_point_type): New function.
1792 (win32_insert_point, win32_remove_point): Adjust to new interface.
1793 (win32_target_ops): Install win32_supports_z_point_type.
1794 * win32-low.h (struct win32_target_ops):
1795 <supports_z_point_type>: New method.
1796 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1797 instead of a char. Also take a raw breakpoint pointer.
1798
932539e3
PA
17992014-05-20 Pedro Alves <palves@redhat.com>
1800
1801 * mem-break.h: Include break-common.h.
1802 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1803 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1804 (Z_packet_to_target_hw_bp_type): New declaration.
1805 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1806 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1807 (Z_PACKET_ACCESS_WP): Delete macros.
1808 (Z_packet_to_hw_type): Delete function.
1809 * i386-low.h: Don't include break-common.h here.
1810 (Z_packet_to_hw_type): Delete declaration.
1811 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1812 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1813 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1814 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1815 * linux-aarch64-low.c: Don't include break-common.h here.
1816 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1817 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1818 (Z_packet_to_target_hw_bp_type): Delete function.
1819 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1820 function.
1821 (mips_insert_point, mips_remove_point): Use
1822 Z_packet_to_target_hw_bp_type.
1823
4ff0d3d8
PA
18242014-05-20 Pedro Alves <palves@redhat.com>
1825
1826 * linux-aarch64-low.c: Include break-common.h.
1827 (enum target_point_type): Delete.
1828 (Z_packet_to_point_type): Rename to ...
1829 (Z_packet_to_target_hw_bp_type): ... this, and return a
1830 target_hw_bp_type instead.
1831 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1832 instead of an enum target_point_type.
1833 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1834 breakpoint type.
1835 (aarch64_dr_state_insert_one_point)
1836 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1837 (aarch64_handle_aligned_watchpoint)
1838 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1839 Take an enum target_hw_bp_type instead of an enum
1840 target_point_type.
1841 (aarch64_supports_z_point_type): New function.
1842 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1843 use Z_packet_to_target_hw_bp_type.
1844
786dc519
JB
18452014-05-20 Joel Brobecker <brobecker@adacore.com>
1846
1847 * configure.ac: Only use -Werror by default when DEVELOPMENT
1848 is true.
1849 * configure: Regenerate.
1850
9e0aa64f
JK
18512014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1852
1853 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1854 * linux-x86-low.c (X86_64_USER_REGS): New.
1855 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1856
2b577b92
YQ
18572014-04-28 Yao Qi <yao@codesourcery.com>
1858
1859 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1860 name.
1861
94611da2
PA
18622014-04-25 Pedro Alves <palves@redhat.com>
1863
1864 PR server/16255
1865 * linux-low.c (linux_attach_fail_reason_string): New function.
1866 (linux_attach_lwp): Delete.
1867 (linux_attach_lwp_1): Rename to ...
1868 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1869 argument. Remove "initial" parameter. Return int instead of
1870 void. Don't error or warn here.
1871 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1872 failure to attach to the tgid. Call warning when failing to
1873 attach to an lwp.
1874 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1875 argument. Remove "initial" parameter. Return int instead of
1876 void. Don't error or warn here.
1877 (linux_attach_fail_reason_string): New declaration.
1878 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1879 interface change. Use linux_attach_fail_reason_string.
1880
01f9f808
MS
18812014-04-24 Michael Sturm <michael.sturm@mintel.com>
1882 Walfred Tedeschi <walfred.tedeschi@intel.com>
1883
1884 * Makefile.in: Added rules to handle new files
1885 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1886 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1887 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1888 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1889 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1890 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1891 x32-avx512-linux.o.
1892 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1893 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1894 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1895 i386/x32-avx512.xml.
1896 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1897 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1898 i386/x32-avx512-linux.xml.
1899 * i387-fp.c (num_avx512_k_registers): New constant for number
1900 of K registers.
1901 (num_avx512_zmmh_low_registers): New constant for number of
1902 lower ZMM registers (0-15).
1903 (num_avx512_zmmh_high_registers): New constant for number of
1904 higher ZMM registers (16-31).
1905 (num_avx512_ymmh_registers): New contant for number of higher
1906 YMM registers (ymm16-31 added by avx521 on x86_64).
1907 (num_avx512_xmm_registers): New constant for number of higher
1908 XMM registers (xmm16-31 added by AVX512 on x86_64).
1909 (struct i387_xsave): Add space for AVX512 registers.
1910 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1911 Add code to handle AVX512 registers.
1912 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1913 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1914 prototypei from generated file.
1915 (tdesc_amd64_avx512_linux): Likewise.
1916 (init_registers_x32_avx512_linux): Likewise.
1917 (tdesc_x32_avx512_linux): Likewise.
1918 (init_registers_i386_avx512_linux): Likewise.
1919 (tdesc_i386_avx512_linux): Likewise.
1920 (x86_64_regmap): Add AVX512 registers.
1921 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1922 mask.
1923 (initialize_low_arch): Add code to initialize AVX512 registers.
1924
51aa91f9
PA
19252014-04-23 Pedro Alves <palves@redhat.com>
1926
1927 * mem-break.c (find_gdb_breakpoint_at): Make static.
1928 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1929
a4165e94
PA
19302014-04-23 Pedro Alves <palves@redhat.com>
1931
1932 * i386-low.c: Don't include break-common.h here.
1933 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1934 prototype to take target_hw_bp_type as argument instead of a Z
1935 packet char.
1936 * i386-low.h: Include break-common.h here.
1937 (Z_packet_to_hw_type): Declare.
1938 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1939 prototypes.
1940 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1941 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1942 (x86_remove_point): Convert the packet number to a
1943 target_hw_bp_type before calling i386_low_remove_watchpoint.
1944 * win32-i386-low.c (i386_insert_point): Convert the packet number
1945 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1946 (i386_remove_point): Convert the packet number to a
1947 target_hw_bp_type before calling i386_low_remove_watchpoint.
1948
b8acf843
PA
19492014-04-23 Pedro Alves <palves@redhat.com>
1950
1951 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1952
d708bcd1
PA
19532014-04-10 Pedro Alves <palves@redhat.com>
1954
1955 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1956 Check if the condition or command is NULL before checking if the
1957 breakpoint is known. On success, return true.
1958 * mem-break.h (add_breakpoint_condition): Document return.
1959 (add_breakpoint_commands): Add describing comment.
1960 * server.c (skip_to_semicolon): New function.
1961 (process_point_options): Use it.
1962
2eec7d5b
PA
19632014-04-09 Pedro Alves <palves@redhat.com>
1964
1965 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1966 to lwpid_of.
1967
fa96cb38
PA
19682014-02-27 Pedro Alves <palves@redhat.com>
1969
1970 PR 12702
1971 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1972 macros.
1973 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1974 output.
1975 (last_thread_of_process_p): Take a PID argument instead of a
1976 thread pointer.
1977 (linux_wait_for_lwp): Delete.
1978 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1979 functions.
1980 (linux_low_filter_event): New function, party factored out from
1981 linux_wait_for_event.
1982 (linux_wait_for_event): Rename to ...
1983 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1984 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1985 sigsuspend. Check for zombie leaders.
1986 (linux_wait_for_event): Reimplement as wrapper around
1987 linux_wait_for_event_filtered.
1988 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1989 a normal or signal exit is seen, it's the whole process exiting.
1990 (wait_for_sigstop): No longer a for_each_inferior callback.
1991 Rewrite on top of linux_wait_for_event_filtered.
1992 (stop_all_lwps): Call wait_for_sigstop directly.
1993 * server.c (resume, handle_target_event): Handle
1994 TARGET_WAITKIND_NO_RESUMED.
1995
d763de10
JB
19962014-02-26 Joel Brobecker <brobecker@adacore.com>
1997
1998 * win32-low.c (psapi_get_dll_name,
1999 * win32_CreateToolhelp32Snapshot): Delete.
2000 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2001 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2002 Delete.
2003 (handle_load_dll): Add function description.
2004 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2005
850a0f76
JB
20062014-02-26 Joel Brobecker <brobecker@adacore.com>
2007
2008 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2009 Add comment.
2010 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2011 base address when calling win32_add_one_solib.
2012 (handle_load_dll): Delete local variable load_addr.
2013 Remove 0x1000 offset applied to DLL base address when calling
2014 win32_add_one_solib.
2015 (handle_unload_dll): Add comment.
2016
f25b3fc3
JB
20172014-02-26 Joel Brobecker <brobecker@adacore.com>
2018
2019 * win32-low.c (win32_add_all_dlls): Renames
2020 win32_ensure_ntdll_loaded. Rewrite function documentation.
2021 Adjust implementation to always load all DLLs.
2022 Add 0x1000 offset to DLL base address when calling
2023 win32_add_one_solib.
2024 (child_initialization_done): New static global.
2025 (do_initial_child_stuff): Set child_initialization_done to
2026 zero during child initialization, and 1 after. Replace call
2027 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2028 Add comment.
2029 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2030 (handle_unload_dll): Add function documentation.
2031 (get_child_debug_event): Ignore load and unload DLL events
2032 during child initialization.
2033
d86d4aaf
DE
20342014-02-20 Doug Evans <dje@google.com>
2035
3bc32da3 2036 Remove global all_lwps.
d86d4aaf
DE
2037 * inferiors.h (ptid_of): Move here from linux-low.h.
2038 (pid_of, lwpid_of): Ditto.
2039 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2040 parameter is a struct thread_info * now.
2041 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2042 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2043 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2044 directly.
2045 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2046 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2047 * linux-arm-low.c (update_registers_callback): Update, "entry"
2048 parameter is a struct thread_info * now.
2049 Fetch lwpid from current_inferior directly.
2050 (arm_insert_point): Pass &all_threads to find_inferior instead of
2051 &all_lwps.
2052 (arm_remove_point): Ditto.
2053 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2054 (arm_prepare_to_resume): Fetch pid from thread.
2055 (arm_read_description): Fetch lwpid from current_inferior directly.
2056 * linux-low.c (all_lwps): Delete.
2057 (delete_lwp): Delete call to remove_inferior.
2058 (handle_extended_wait): Fetch lwpid from thread.
2059 (add_lwp): Don't set lwp->entry.id. Remove call to
2060 add_inferior_to_list.
2061 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2062 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2063 (kill_one_lwp_callback): Ditto.
2064 (linux_kill): Don't dereference NULL pointer.
2065 Fetch ptid,lwpid from thread.
2066 (get_detach_signal): Fetch ptid from thread.
2067 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2068 Simplify call to regcache_invalidate_thread.
2069 (delete_lwp_callback): Update, "entry" parameter is a
2070 struct thread_info * now. Fetch pid from thread.
2071 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2072 (status_pending_p_callback): Update, "entry" parameter is a
2073 struct thread_info * now. Fetch ptid from thread.
2074 (find_lwp_pid): Update, "entry" parameter is a
2075 struct thread_info * now.
2076 (linux_wait_for_lwp): Fetch pid from thread.
2077 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2078 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2079 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2080 (dequeue_one_deferred_signal): Ditto.
2081 (cancel_breakpoint): Fetch ptid from current_inferior.
2082 (linux_wait_for_event): Pass &all_threads to find_inferior,
2083 not &all_lwps. Fetch ptid, lwpid from thread.
2084 (count_events_callback): Update, "entry" parameter is a
2085 struct thread_info * now.
2086 (select_singlestep_lwp_callback): Ditto.
2087 (select_event_lwp_callback): Ditto.
2088 (cancel_breakpoints_callback): Ditto.
2089 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2090 not &all_lwps.
2091 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2092 (unsuspend_one_lwp): Update, "entry" parameter is a
2093 struct thread_info * now.
2094 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2095 not &all_lwps.
2096 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2097 Fetch lwpid from thread, not lwp.
2098 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2099 Pass &all_threads to find_inferior, not &all_lwps.
2100 (send_sigstop): Fetch lwpid from thread, not lwp.
2101 (send_sigstop_callback): Update, "entry" parameter is a
2102 struct thread_info * now.
2103 (suspend_and_send_sigstop_callback): Ditto.
2104 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2105 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2106 struct thread_info * now.
2107 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2108 from thread, lwp.
2109 (lwp_running): Update, "entry" parameter is a
2110 struct thread_info * now.
2111 (stop_all_lwps): Fetch ptid from thread.
2112 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2113 (linux_resume_one_lwp): Fetch lwpid from thread.
2114 (linux_set_resume_request): Update, "entry" parameter is a
2115 struct thread_info * now. Fetch pid, lwpid from thread.
2116 (resume_status_pending_p): Update, "entry" parameter is a
2117 struct thread_info * now.
2118 (need_step_over_p): Ditto. Fetch lwpid from thread.
2119 (start_step_over): Fetch lwpid from thread.
2120 (linux_resume_one_thread): Update, "entry" parameter is a
2121 struct thread_info * now. Fetch lwpid from thread.
2122 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2123 (proceed_one_lwp): Update, "entry" parameter is a
2124 struct thread_info * now. Fetch lwpid from thread.
2125 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2126 struct thread_info * now.
2127 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2128 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2129 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2130 directly.
2131 (regsets_store_inferior_registers): Ditto.
2132 (fetch_register, store_register): Ditto.
2133 (linux_read_memory, linux_write_memory): Ditto.
2134 (linux_request_interrupt): Ditto.
2135 (linux_read_auxv): Ditto.
2136 (linux_xfer_siginfo): Ditto.
2137 (linux_qxfer_spu): Ditto.
2138 (linux_qxfer_libraries_svr4): Ditto.
2139 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2140 moved to inferiors.h.
2141 (get_lwp): Delete.
2142 (get_thread_lwp): Update.
2143 (struct lwp_info): Delete member "entry". Simplify comment for
2144 member "thread".
2145 (all_lwps): Delete.
2146 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2147 current_inferior directly.
2148 (update_watch_registers_callback): Update, "entry" parameter is a
2149 struct thread_info * now. Fetch pid from thread.
2150 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2151 (mips_insert_point): Fetch lwpid from current_inferior.
2152 Pass &all_threads to find_inferior, not &all_lwps.
2153 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2154 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2155 directly.
2156 (mips_stopped_data_address): Ditto.
2157 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2158 directly.
2159 * linux-tile-low.c (tile_arch_setup): Ditto.
2160 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2161 (update_debug_registers_callback): Update, "entry" parameter is a
2162 struct thread_info * now. Fetch pid from thread.
2163 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2164 Pass &all_threads to find_inferior, not &all_lwps.
2165 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2166 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2167 Pass &all_threads to find_inferior, not &all_lwps.
2168 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2169 (i386_dr_low_get_status): Ditto.
2170 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2171 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2172 (x86_linux_read_description): Ditto.
2173 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2174
3b8361aa
DE
21752014-02-20 Doug Evans <dje@google.com>
2176
2177 * inferiors.c (get_first_inferior): Fix buglet.
2178
f7667f0d
DE
21792014-02-19 Doug Evans <dje@google.com>
2180
2181 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2182 * inferiors.c (add_thread): Change result type to struct thread_info *.
2183 All callers updated.
2184 (add_lwp): Call add_thread here instead of in callers.
2185 All callers updated.
2186 * linux-low.h (get_lwp_thread): Rewrite.
2187 (struct lwp_info): New member "thread".
2188
b3312d80
DE
21892014-02-19 Doug Evans <dje@google.com>
2190
2191 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2192 All callers updated.
2193
ecc6f45c
DE
21942014-02-19 Doug Evans <dje@google.com>
2195
2196 * inferiors.c (add_thread): Fix whitespace.
2197
649ebbca
DE
21982014-02-19 Doug Evans <dje@google.com>
2199
2200 * dll.c (clear_dlls): Replace accessing list implemention details
2201 with API function.
2202 * gdbthread.h (get_first_thread): Declare.
2203 * inferiors.c (for_each_inferior_with_data): New function.
2204 (get_first_thread): New function.
2205 (find_thread_ptid): Simplify.
2206 (get_first_inferior): New function.
2207 (clear_list): Delete.
2208 (one_inferior_p): New function.
2209 (clear_inferior_list): New function.
2210 (clear_inferiors): Update.
2211 * inferiors.h (for_each_inferior_with_data): Declare.
2212 (clear_inferior_list): Declare.
2213 (one_inferior_p): Declare.
2214 (get_first_inferior): Declare.
2215 * linux-low.c (linux_wait_for_event): Replace accessing list
2216 implemention details with API function.
2217 * server.c (target_running): Ditto.
2218 (accumulate_file_name_length): New function.
2219 (emit_dll_description): New function.
2220 (handle_qxfer_libraries): Replace accessing list implemention
2221 details with API function.
2222 (handle_qxfer_threads_worker): New function.
2223 (handle_qxfer_threads_proper): Replace accessing list implemention
2224 details with API function.
2225 (handle_query): Ditto.
2226 (visit_actioned_threads_callback_ftype): New typedef.
2227 (visit_actioned_threads_data): New struct.
2228 (visit_actioned_threads): Rewrite to be find_inferior callback.
2229 (resume): Call find_inferior.
2230 (handle_status): Replace accessing list implemention
2231 details with API function.
2232 (process_serial_event): Replace accessing list implemention details
2233 with API function.
2234 * target.c (set_desired_inferior): Replace accessing list implemention
2235 details with API function.
2236 * tracepoint.c (same_process_p): New function.
2237 (gdb_agent_about_to_close): Replace accessing list implemention
2238 details with API function.
2239 * win32-low.c (child_delete_thread): Replace accessing list
2240 implemention details with API function.
2241 (match_dll_by_basename): New function.
2242 (dll_is_loaded_by_basename): New function.
2243 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2244 details call to dll_is_loaded_by_basename.
2245
80894984
DE
22462014-02-19 Doug Evans <dje@google.com>
2247
2248 * dll.h (struct dll_info): Add comment.
2249 * gdbthread.h (struct thread_info): Add comment.
2250 (current_ptid): Simplify.
2251 * inferiors.c (add_process): Update.
2252 (remove_process): Update.
2253 * inferiors.h (struct process_info): Rename member "head" to "entry".
2254 * linux-low.c (delete_lwp): Update.
2255 (add_lwp): Update.
2256 (last_thread_of_process_p): Update.
2257 (kill_one_lwp_callback, linux_kill): Update.
2258 (status_pending_p_callback): Update.
2259 (wait_for_sigstop): Update. Simplify read of ptid.
2260 (start_step_over): Update.
2261 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2262 (get_lwp_thread): Update.
2263 (struct lwp_info): Rename member "head" to "entry".
2264 * regcache.h (inferior_list_entry): Delete.
2265 * server.c (kill_inferior_callback): Update.
2266 (detach_or_kill_inferior_callback): Update.
2267 (print_started_pid): Update.
2268 (print_attached_pid): Update.
2269 (process_serial_event): Simplify read of ptid.
2270 * thread-db.c (thread_db_create_event): Update.
2271 (thread_db_get_tls_address): Update.
2272 * win32-low.c (current_inferior_ptid): Simplify.
2273
46917d26
TT
22742014-02-19 Tom Tromey <tromey@redhat.com>
2275
2276 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2277 argument.
2278 (target_supports_btrace): Update.
2279
0759a81e
YQ
22802014-02-14 Yao Qi <yao@codesourcery.com>
2281
2282 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2283 (rsp-low-ipa.o): New target.
2284
a7191e8b
TT
22852014-02-12 Tom Tromey <tromey@redhat.com>
2286
2287 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2288 convert_ascii_to_int.
2289 * regcache.c (registers_to_string): Likewise.
2290 * remote-utils.c (decode_M_packet): Likewise.
2291 * server.c (process_serial_event): Likewise.
2292
ff0e980e
TT
22932014-02-12 Tom Tromey <tromey@redhat.com>
2294
2295 * server.c (handle_query, handle_v_run): Use hex2bin, not
2296 unhexify.
2297 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2298
e9371aff
TT
22992014-02-12 Tom Tromey <tromey@redhat.com>
2300
2301 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2302 convert_int_to_ascii.
2303 * regcache.c (registers_to_string, collect_register_as_string):
2304 Likewise.
2305 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2306 Likewise.
2307 * server.c (process_serial_event): Likewise.
2308 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2309 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2310
971dc0b8
TT
23112014-02-12 Tom Tromey <tromey@redhat.com>
2312
2313 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2314 bin2hex, not hexify.
2315 * tracepoint.c (cmd_qtstatus): Likewise.
2316
0a822afb
TT
23172014-02-12 Tom Tromey <tromey@redhat.com>
2318
2319 * remote-utils.c (monitor_output): Pass explicit length to
2320 hexify.
2321
9c3d6531
TT
23222014-02-12 Tom Tromey <tromey@redhat.com>
2323
2324 * tracepoint.c: Include rsp-low.h.
2325 * server.c: Include rsp-low.h.
2326 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2327 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2328 declare.
2329 * remote-utils.c: Include rsp-low.h.
2330 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2331 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2332 (convert_int_to_ascii, convert_ascii_to_int): Move to
2333 common/rsp-low.c.
2334 * regcache.c: Include rsp-low.h.
2335 * ax.c: Include rsp-low.h.
2336 * Makefile.in (SFILES): Add common/rsp-low.c.
2337 (OBS): Add rsp-low.o.
2338 (rsp-low.o): New target.
2339
01fd3ea5
TT
23402014-02-12 Tom Tromey <tromey@redhat.com>
2341
2342 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2343 Include print-utils.h.
2344 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2345 (plongest, thirty_two, phex_nz): Remove.
2346 * Makefile.in (SFILES): Add common/print-utils.c.
2347 (OBS): Add print-utils.o.
2348 (print-utils-ipa.o): New target.
2349 (print-utils.o): New target.
2350 (IPA_OBJS): Add print-utils-ipa.o.
2351
e99dc820
TT
23522014-02-06 Tom Tromey <tromey@redhat.com>
2353
2354 * Makefile.in (SFILES): Fix indentation.
2355
ee1e2d4f
DE
23562014-02-05 Doug Evans <dje@google.com>
2357
2358 * linux-low.c (linux_wait_for_event): Improve comment.
2359 (linux_wait_1): Keep current_inferior in sync with event_child.
2360
f5a02773
DE
23612014-01-22 Doug Evans <dje@google.com>
2362
2363 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2364
87ce2a04
DE
23652014-01-22 Doug Evans <dje@google.com>
2366
2367 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2368 * configure: Regenerate.
2369 * config.in: Regenerate.
2370 * Makefile.in (SFILES): Add debug.c.
2371 (OBS): Add debug.o.
2372 * debug.c: New file.
2373 * debug.h: New file.
2374 * linux-aarch64-low.c (*): Update all debugging printfs to use
2375 debug_printf instead of fprintf.
2376 * linux-arm-low.c (*): Ditto.
2377 * linux-cris-low.c (*): Ditto.
2378 * linux-crisv32-low.c (*): Ditto.
2379 * linux-m32r-low.c (*): Ditto.
2380 * linux-sparc-low.c (*): Ditto.
2381 * linux-x86.c (*): Ditto.
2382 * linux-low.c (*): Ditto.
2383 (linux_wait_1): Add calls to debug_enter, debug_exit.
2384 (linux_wait): Remove redundant debugging printf.
2385 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2386 (linux_resume, unstop_all_lwps): Ditto.
2387 * mem-break.c (*): Update all debugging printfs to use
2388 debug_printf instead of fprintf.
2389 * remote-utils.c (*): Ditto.
2390 * thread-db.c (*): Ditto.
2391 * server.c #include <ctype.h>, "gdb_vecs.h".
2392 (debug_threads): Moved to debug.c.
2393 (*): Update all debugging printfs to use debug_printf instead of
2394 fprintf.
2395 (start_inferior): Replace call to fflush with call to debug_flush.
2396 (monitor_show_help): Mention set debug-format.
2397 (parse_debug_format_options): New function.
2398 (handle_monitor_command): Handle "monitor set debug-format".
2399 (gdbserver_usage): Mention --debug-format.
2400 (main): Parse --debug-format.
2401 * server.h (debug_threads): Declaration moved to debug.h.
2402 #include "debug.h".
2403 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2404 trace_debug_1 that uses debug_printf.
2405 (tracepoint_look_up_symbols): Update all debugging printfs to use
2406 debug_printf instead of fprintf.
2407
e671835b
BS
24082014-01-20 Baruch Siach <baruch@tkos.co.il>
2409
2410 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2411 sys/ptrace.h.
2412
b5737fa9
PA
24132014-01-17 Pedro Alves <palves@redhat.com>
2414
ea38d2a9 2415 PR build/16445
c7faa97a
PA
2416 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2417 defined after including gdb_proc_service.h.
b5737fa9 2418
40ed484e
DE
24192014-01-16 Doug Evans <dje@google.com>
2420
2421 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2422 (match_dll): Use it.
2423
969c39fb
MM
24242014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2425
2426 * target.h (target_ops) <read_btrace>: Change parameters and
2427 return type to allow error reporting.
2428 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2429 trace reading errors on.
2430 * linux-low.c (linux_low_read_btrace): Pass trace reading
2431 errors on.
2432 (linux_low_disable_btrace): New.
2433
ab7f45ba
DE
24342014-01-15 Doug Evans <dje@google.com>
2435
2436 * inferiors.c (thread_id_to_gdb_id): Delete.
2437 * inferiors.h (thread_id_to_gdb_id): Delete.
2438
66af0f44
EZ
24392014-01-13 Eli Zaretskii <eliz@gnu.org>
2440
2441 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2442 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2443 versions.
2444
9939e131
PA
24452014-01-08 Pedro Alves <palves@redhat.com>
2446
2447 * server.c (handle_status): Don't discard previous queued stop
2448 replies or thread's pending status here.
2449 (main) <disconnection>: Do it here instead.
2450
b7ea362b
PA
24512014-01-08 Pedro Alves <palves@redhat.com>
2452
2453 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2454 * server.c (visit_actioned_threads, handle_pending_status): New
2455 function.
2456 (handle_v_cont): Factor out parts to ...
2457 (resume): ... this new function. If in all-stop, and a thread
2458 being resumed has a pending status, report it without actually
2459 resuming.
2460 (myresume): Adjust to use the new 'resume' function.
2461 (clear_pending_status_callback, set_pending_status_callback)
2462 (find_status_pending_thread_callback): New functions.
2463 (handle_status): Handle the case of multiple threads having
2464 interesting statuses to report. Report threads' real last signal
2465 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2466 with an interesting thread to report the status for, instead of
2467 always reporting the status of the first thread.
2468
28498c42
JB
24692014-01-01 Joel Brobecker <brobecker@adacore.com>
2470
2471 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2472 * gdbreplay.c (gdbreplay_version): Likewise.
2473
f45c82da
YZ
24742013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2475
2476 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2477 iov.iov_len with the real length in use.
2478
379a5e2d
JB
24792013-12-13 Joel Brobecker <brobecker@adacore.com>
2480
2481 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2482 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2483 for all targets that use win32-low.c.
2484 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2485 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2486
4210d83e
PA
24872013-12-13 Pedro Alves <palves@redhat.com>
2488
2489 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2490 if equal to TARGET_WAITKIND_LOADED.
2491 * win32-low.c (cached_status): New static global.
2492 (win32_wait): Add declaration.
2493 (do_initial_child_stuff): Flush all initial pending debug events
2494 up to the initial breakpoint.
2495 (win32_wait): If CACHED_STATUS was set, return that instead
2496 of doing a real wait. Remove the code resuming the execution
2497 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2498 during the initial phase. Also remove the code changing
2499 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2500 TARGET_WAITKIND_STOPPED.
2501
e7f0d979
YQ
25022013-12-11 Yao Qi <yao@codesourcery.com>
2503
2504 * notif.c (handle_notif_ack): Return 0 if no notification
2505 matches.
2506
ebcf782c
DE
25072013-11-20 Doug Evans <dje@google.com>
2508
2509 * linux-low.c (linux_set_resume_request): Fix comment.
2510
20ad9378
DE
25112013-11-20 Doug Evans <dje@google.com>
2512
2513 * linux-low.c (resume_status_pending_p): Tweak comment.
2514
a196ebeb
WT
25152013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2516
2517 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2518 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2519 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2520 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2521 (srv_amd64_regobj): Add amd64-mpx.o.
2522 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2523 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2524 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2525 * i387-fp.c (num_pl_bnd_register) Added constant.
2526 (num_pl_bnd_cfg_registers) Added constant.
2527 (struct i387_xsave) Added reserved area and MPX fields.
2528 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2529 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2530 function.
2531 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2532 (init_registers_amd64_mpx_linux): Declare new function.
2533 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2534 (x86_64_regmap): Add MPX registers.
2535 (x86_linux_read_description): Add MPX case.
2536 (initialize_low_arch): Initialize MPX targets.
2537
0080a2f6
TT
25382013-11-18 Tom Tromey <tromey@redhat.com>
2539
2540 * configure: Rebuild.
2541 * configure.ac: Don't check for stdlib.h.
2542 * gdbreplay.c: Unconditionally include stdlib.h.
2543
2978b111
TT
25442013-11-18 Tom Tromey <tromey@redhat.com>
2545
2546 * config.in: Rebuild.
2547 * configure: Rebuild.
2548 * configure.ac: Don't use AC_HEADER_DIRENT.
2549
a3d08894
TT
25502013-11-18 Tom Tromey <tromey@redhat.com>
2551
2552 * server.h: Don't check HAVE_STRING_H.
2553 * gdbreplay.c: Don't check HAVE_STRING_H.
2554 * configure: Rebuild.
2555
0a5dd17d
TT
25562013-11-18 Tom Tromey <tromey@redhat.com>
2557
2558 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2559 LIBGNU.
2560
1bd2f0ba
TT
25612013-11-08 Tom Tromey <tromey@redhat.com>
2562
2563 * configure, config.in: Rebuild.
2564 * configure.ac: Remove unused configury.
2565
3266f10b
TT
25662013-11-08 Tom Tromey <tromey@redhat.com>
2567
2568 * acinclude.m4: Include common.m4, codeset.m4.
2569 * configure, config.in: Rebuild.
2570 * configure.ac: Use GDB_AC_COMMON.
2571
6682d959
AA
25722013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2573
2574 * linux-s390-low.c (HWCAP_S390_TE): New define.
2575 (s390_arch_setup): Consider the TE field in the HWCAP for
2576 determining 'have_regset_tdb'.
2577
fd0a4d76
SDJ
25782013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2579
2580 PR gdb/16014
2581 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2582 call to sizeof.
2583
1a3d890b
PA
25842013-10-02 Pedro Alves <palves@redhat.com>
2585
2586 * server.c (process_serial_event): Don't output "GDBserver
2587 exiting" if GDB is connected through stdio.
2588 * target.c (mywait): Likewise, be silent if GDB is connected
2589 through stdio.
2590
97ad4581
JB
25912013-10-01 Joel Brobecker <brobecker@adacore.com>
2592
2593 * lynx-low.c (lynx_add_threads_after_attach): New function.
2594 (lynx_attach): Remove call to add_thread. Add call to
2595 lynx_add_threads_after_attach instead.
2596
5b4e221c
MF
25972013-09-28 Mike Frysinger <vapier@gentoo.org>
2598
2599 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2600 * config.in, configure: Regenerated.
2601
ee47b2f8
YQ
26022013-09-18 Yao Qi <yao@codesourcery.com>
2603
2604 PR server/15959
2605 * server.c (start_inferior): Clear 'resume_info'.
2606
d6707650 26072013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2608
d6707650
JW
2609 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2610 for each register.
2611
9243dd0e 26122013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2613
9243dd0e
JW
2614 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2615 linux-tile-low.o to srv_tgtobj.
2616
c623a6ef
WN
26172013-09-16 Will Newton <will.newton@linaro.org>
2618
2619 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2620 out regs.
2621
fb71d39e
PA
26222013-09-06 Pedro Alves <palves@redhat.com>
2623
2624 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2625 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2626 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2627 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2628 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2629 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2630
8e7e9910
PA
26312013-09-06 Pedro Alves <palves@redhat.com>
2632
2633 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2634 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2635
7c3a12ca
PA
26362013-09-06 Pedro Alves <palves@redhat.com>
2637
2638 * linux-amd64-ipa.c: Include tracepoint.h.
2639 * linux-i386-ipa.c: Include tracepoint.h.
2640
8eb3d7b6
RW
26412013-09-06 Ricard Wanderlof <ricardw@axis.com>
2642
2643 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2644 (ps_get_thread_area): New function.
2645
eddddb9d
RW
26462013-09-06 Ricard Wanderlof <ricardw@axis.com>
2647
2648 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2649 (initialize_low_arch): Call init_registers_crisv32 rather than
2650 init_register_crisv32.
2651
533b0600
PA
26522013-09-05 Pedro Alves <palves@redhat.com>
2653
2654 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2655 to ...
2656 * hostio.h: ... this new file.
2657 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2658 win32-low.c: Include hostio.h.
2659
0ce3d3b5
PA
26602013-09-05 Pedro Alves <palves@redhat.com>
2661
2662 * server.h (gdb_client_data, handler_func, callback_handler_func)
2663 (delete_file_handler, add_file_handler, append_callback_event)
2664 (delete_callback_event, start_event_loop, initialize_event_loop):
2665 Move to event-loop.h and include it.
2666 * event-loop.h: New file.
2667
799cdc37
PA
26682013-09-05 Pedro Alves <palves@redhat.com>
2669
2670 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2671 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2672 (loaded_dll, unloaded_dll): Move to ...
2673 * dll.h: ... this new file.
2674 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2675
6a6bbd9d
PA
26762013-09-05 Pedro Alves <palves@redhat.com>
2677
2678 * server.h (current_process, get_thread_process, all_processes)
2679 (add_inferior_to_list, for_each_inferior, current_inferior)
2680 (remove_inferior, add_process, remove_process, find_process_pid)
2681 (have_started_inferiors_p, have_attached_inferiors_p)
2682 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2683 (clear_inferiors, find_inferior, find_inferior_id)
2684 (inferior_target_data, set_inferior_target_data)
2685 (inferior_regcache_data, set_inferior_regcache_data): Move to
2686 inferiors.h, and include it.
2687 * inferiors.h: New file.
2688
f699aaba
PA
26892013-09-05 Pedro Alves <palves@redhat.com>
2690
2691 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2692 Move ...
2693 * ax.h: ... here.
2694
c144c7a0
PA
26952013-09-05 Pedro Alves <palves@redhat.com>
2696
2697 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2698 tracepoint.h.
2699 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2700 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2701 (handle_tracepoint_general_set, handle_tracepoint_query)
2702 (tracepoint_finished_step, tracepoint_was_hit)
2703 (release_while_stepping_state_list, current_traceframe)
2704 (in_readonly_region, traceframe_read_mem)
2705 (fetch_traceframe_registers, traceframe_read_sdata)
2706 (traceframe_read_info, struct fast_tpoint_collect_status)
2707 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2708 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2709 (supply_fast_tracepoint_registers)
2710 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2711 (ipa_tdesc, claim_trampoline_space)
2712 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2713 (agent_mem_read, agent_get_trace_state_variable_value)
2714 (agent_set_trace_state_variable_value, agent_tsv_read)
2715 (agent_mem_read_string, get_raw_reg_func_addr)
2716 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2717 * tracepoint.h: ... this new file.
2718
ff42e6ab
PA
27192013-09-05 Pedro Alves <palves@redhat.com>
2720
2721 * server.h (perror_with_name, error, fatal, warning, paddress)
2722 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2723 include it.
2724 * utils.h: New file.
2725
541af0f4
PA
27262013-09-05 Pedro Alves <palves@redhat.com>
2727
2728 * server.h (remote_debug, noack_mode, transport_is_reliable)
2729 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2730 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2731 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2732 (write_enn, initialize_async_io, enable_async_io)
2733 (disable_async_io, check_remote_input_interrupt_request)
2734 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2735 (dead_thread_notify, prepare_resume_reply)
2736 (decode_address_to_semicolon, decode_address, decode_m_packet)
2737 (decode_M_packet, decode_X_packet, decode_xfer_write)
2738 (decode_search_memory_packet, unhexify, hexify)
2739 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2740 (look_up_one_symbol, relocate_instruction)
2741 (monitor_output): Move to remote-utils.h, and include it.
2742 * remote-utils.h: New file.
2743
eebdf26b
PA
27442013-09-05 Pedro Alves <palves@redhat.com>
2745
2746 * server.h (_): Delete.
2747
3aafd2ff
PA
27482013-09-02 Pedro Alves <palves@redhat.com>
2749
2750 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2751 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2752 allocated.
2753 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2754
cee83bcb
PM
27552013-09-02 Pierre Muller <muller@sourceware.org>
2756
2757 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2758 or WriteProcessMemory complete successfully and handle
2759 ERROR_PARTIAL_COPY error.
2760
9a13b2fa
PA
27612013-09-02 Pedro Alves <palves@redhat.com>
2762
2763 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2764 error instead of EIO.
2765
602e3198
JK
27662013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2767
2768 PR server/15604
2769 * linux-low.c: Include filestuff.h.
2770 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2771 * lynx-low.c: Include filestuff.h.
2772 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2773 * server.c: Include filestuff.h.
2774 (main): Call notice_open_fds.
2775 * spu-low.c: Include filestuff.h.
2776 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2777
96d7229d
LM
27782013-08-22 Luis Machado <lgustavo@codesourcery.com>
2779
2780 * Makefile.in: Explain why ../target and ../nat are not
2781 listed as include file search paths.
2782 (linux-waitpid.o): New object file rule.
2783 * configure.srv (srv_native_linux_obj): New variable.
2784 Replace all occurrences of linux native object files with
2785 $srv_native_linux_obj.
2786 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2787 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2788 (linux_enable_event_reporting): Remove declaration.
2789 (my_waitpid): Moved to common/linux-waitpid.c.
2790 (linux_wait_for_event): Pass ptid when calling
2791 linux_enable_event_reporting.
2792 (linux_supports_tracefork_flag): Remove.
2793 (linux_enable_event_reporting): Likewise.
2794 (linux_tracefork_grandchild): Remove.
2795 (STACK_SIZE): Moved to common/linux-ptrace.c.
2796 (linux_tracefork_child): Remove.
2797 (linux_test_for_tracefork): Remove.
2798 (linux_look_up_symbols): Call linux_supports_traceclone.
2799 (initialize_low): Remove call to linux_test_for_tracefork.
2800 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2801 common/linux-ptrace.h.
2802 (PTRACE_TYPE_ARG4): Likewise.
2803 Include linux-ptrace.h.
2804
32940073
PA
28052013-08-21 Pedro Alves <palves@redhat.com>
2806
2807 * config.in: Renegerate.
2808
33b60d58 28092013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2810
33b60d58
LM
2811 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2812 (SFILES): Remove $(srcdir)/common/target-common.c and
2813 add $(srcdir)/target/waitstatus.c.
2814 (OBS): Remove target-common.o and add waitstatus.o.
2815 (server_h): Remove $(srcdir)/../common/target-common.h and
2816 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2817 and $(srcdir)/../target/waitstatus.h.
2818 (target-common.o): Remove.
2819 (waitstatus.o): New target object file.
2820 * target.h: Do not include target-common.h and
2821 include target/resume.h, target/wait.h and
2822 target/waitstatus.h.
2823
b8e1b30e
LM
28242013-08-13 Luis Machado <lgustavo@codesourcery.com>
2825
2826 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2827 to PTRACE_TYPE_ARG3.
2828 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2829 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2830 PTRACE_TYPE_ARG4.
2831 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2832 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2833
7a60ad40
YQ
28342013-07-27 Jie Zhang <jie@codesourcery.com>
2835 Daniel Jacobowitz <dan@codesourcery.com>
2836 Yao Qi <yao@codesourcery.com>
2837
2838 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2839 (mips-linux-watch.o): New rule.
2840 (mips_linux_watch_h): New variable.
2841 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2842 srv_tgtobj.
2843 * linux-mips-low.c: Include mips-linux-watch.h.
2844 (struct arch_process_info, struct arch_lwp_info): New.
2845 (update_watch_registers_callback): New function.
2846 (mips_linux_new_process, mips_linux_new_thread) New functions.
2847 (mips_linux_prepare_to_resume, mips_insert_point): New
2848 functions.
2849 (mips_remove_point, mips_stopped_by_watchpoint): New
2850 functions.
2851 (rsp_bp_type_to_target_hw_bp_type): New function.
2852 (mips_stopped_data_address): New function.
2853 (the_low_target): Add watchpoint support functions.
2854
de6f69ad
YQ
28552013-07-27 Yao Qi <yao@codesourcery.com>
2856
2857 * i386-low.c: Include break-common.h.
2858 (enum target_hw_bp_type): Remove.
2859
3360c0bf
LM
28602013-07-24 Luis Machado <lgustavo@codesourcery.com>
2861
2862 * Makefile.in (SFILES): /common/target-common.c.
2863 (OBS): Add target-common.o.
2864 (server_h): Add $(srcdir)/../common/target-common.h.
2865 (target-common.o): New target.
2866 * server.c (queue_stop_reply_callback): Free
2867 status string after use.
2868 * target.c (target_waitstatus_to_string): Remove.
2869 * target.h: Include target-common.h.
2870 (resume_kind): Likewise.
2871 (target_waitkind): Likewise.
2872 (target_waitstatus): Likewise.
2873 (TARGET_WNOHANG): Likewise.
2874
bd885420
YQ
28752013-07-04 Yao Qi <yao@codesourcery.com>
2876
2877 * Makefile.in (host_alias): Use @host_noncanonical@.
2878 (target_alias): Use @target_noncanonical@.
2879 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2880 ACX_NONCANONICAL_HOST.
2881 * configure: Regenerated.
2882
2883 Revert:
2884 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2885
2886 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2887 * configure: Rebuild.
2888 * Makefile.in (version_host, version_target): Get from configure.
2889 (version.c): Use $(version_host) and $(version_target).
2890
17ef446e
PA
28912013-07-03 Pedro Alves <palves@redhat.com>
2892
2893 * Makefile.in (config.status): Depend on development.sh.
2894 * acinclude.m4: Include libmcheck.m4.
2895 * configure: Regenerate.
2896
7a9a7487
MG
28972013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2898
2899 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2900 attribute inside the parentheses.
2901 (winapi_DebugSetProcessKillOnExit): Ditto.
2902 (winapi_DebugBreakProcess): Ditto.
2903 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2904
49b64de6
MG
29052013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2906
2907 * notif.h (notif_event): Add a dummy member to avoid compiler
2908 errors.
2909
d5749ee7
PA
29102013-07-01 Pedro Alves <palves@redhat.com>
2911
2912 * hostio.c (HOSTIO_PATH_MAX): Define.
2913 (require_filename, handle_open, handle_unlink, handle_readlink):
2914 Use it.
2915
d8d2a3ee
PA
29162013-07-01 Pedro Alves <palves@redhat.com>
2917
2918 * server.h: Include "pathmax.h".
2919 * linux-low.c: Don't include sys/param.h.
2920 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2921 MAXPATHLEN.
2922 * win32-low.c: Don't include sys/param.h.
2923 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2924
bc7dea8d
PA
29252013-07-01 Pedro Alves <palves@redhat.com>
2926
2927 * event-loop.c: Don't check HAVE_UNISTD_H before including
2928 <unistd.h>.
2929 * gdbreplay.c: Likewise.
2930 * remote-utils.c: Likewise.
2931 * server.c: Likewise.
2932 * configure.ac: Don't check for unistd.h.
2933 * configure: Regenerate.
2934
d6c2da54
TT
29352013-06-28 Tom Tromey <tromey@redhat.com>
2936
2937 * Makefile.in (version.c): Use version.in, not
2938 common/version.in.
2939
257b6bec
MG
29402013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2941
2942 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2943 * configure: Rebuild.
2944 * Makefile.in (version_host, version_target): Get from configure.
2945 (version.c): Use $(version_host) and $(version_target).
2946
86ebe149
DK
29472013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2948
2949 Fix trace-status to output user name without trailing colon.
2950 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2951
f30aa5af
DK
29522013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2953
2954 Fix trace-status to output proper start-time and stop-time.
2955 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2956 output start time and stop time in hex as gdb expects.
2957
28a93511
YQ
29582013-06-26 Pedro Alves <pedro@codesourcery.com>
2959
2960 * tracepoint.c (build_traceframe_info_xml): Output trace state
2961 variables present in the trace buffer.
2962
01208463
TT
29632013-06-24 Tom Tromey <tromey@redhat.com>
2964
2965 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2966 create-version.sh.
2967 (version.o): Remove.
2968 * gdbreplay.c: Include version.h.
2969 (version, host_name): Don't declare.
2970 * server.h: Include version.h.
2971 (version, host_name): Don't declare.
2972
760256f9
PA
29732013-06-12 Pedro Alves <palves@redhat.com>
2974
2975 * linux-x86-low.c (linux_is_elf64): Delete global.
2976 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2977 with local linux_pid_exe_is_elf_64_file use.
2978
030031ee
PA
29792013-06-11 Pedro Alves <palves@redhat.com>
2980
2981 * linux-low.c (regset_disabled, disable_regset): New functions.
2982 (regsets_fetch_inferior_registers)
2983 (regsets_store_inferior_registers): Use them.
2984 (initialize_regsets_info); Don't allocate the disabled_regsets
2985 array here.
2986 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2987 comment.
2988
5da6eb0a
PA
29892013-06-11 Pedro Alves <palves@redhat.com>
2990
2991 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2992 xmalloc.
2993
7e5aaa09
PA
29942013-06-11 Pedro Alves <palves@redhat.com>
2995
2996 * linux-x86-low.c (initialize_low_arch): Call
2997 init_registers_x32_avx_linux.
2998
d878444c
JK
29992013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3000
3001 Fix compatibility with Android Bionic.
3002 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3003 it is not empty.
3004
3aee8918
PA
30052013-06-07 Pedro Alves <palves@redhat.com>
3006
5f2b57b5 3007 PR server/14823
3aee8918
PA
3008 * Makefile.in (OBS): Add tdesc.o.
3009 (IPA_OBJS): Add tdesc-ipa.o.
3010 (tdesc-ipa.o): New rule.
3011 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3012 interface.
3013 * linux-low.c (new_inferior): Delete.
3014 (disabled_regsets, num_regsets): Delete.
3015 (linux_add_process): Adjust to set the new per-process
3016 new_inferior flag.
3017 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3018 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3019 was a stop. When calling arch_setup, switch the current inferior
3020 to the thread that got an event.
3021 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3022 (regsets_fetch_inferior_registers)
3023 (regsets_store_inferior_registers): New regsets_info parameter.
3024 Adjust to use it.
3025 (linux_register_in_regsets): New regs_info parameter. Adjust to
3026 use it.
3027 (register_addr, fetch_register, store_register): New usrregs_info
3028 parameter. Adjust to use it.
3029 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3030 parameter regs_info. Adjust to use it.
3031 (linux_fetch_registers): Get the current inferior's regs_info, and
3032 adjust to use it.
3033 (linux_store_registers): Ditto.
3034 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3035 (initialize_low): Don't initialize the target_regsets here. Call
3036 initialize_low_arch.
3037 * linux-low.h (target_regsets): Delete declaration.
3038 (struct regsets_info): New.
3039 (struct usrregs_info): New.
3040 (struct regs_info): New.
3041 (struct process_info_private) <new_inferior>: New field.
3042 (struct linux_target_ops): Delete the num_regs, regmap, and
3043 regset_bitmap fields. New field regs_info.
3044 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3045 * i387-fp.c (num_xmm_registers): Delete.
3046 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3047 calls to new interface.
3048 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3049 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3050 Infer the number of xmm registers from the regcache's target
3051 description.
3052 * i387-fp.h (num_xmm_registers): Delete.
3053 * inferiors.c (add_thread): Don't install the thread's regcache
3054 here.
3055 * proc-service.c (gregset_info): Fetch the current inferior's
3056 regs_info. Adjust to use it.
3057 * regcache.c: Include tdesc.h.
3058 (register_bytes, reg_defs, num_registers)
3059 (gdbserver_expedite_regs): Delete.
3060 (get_thread_regcache): If the thread doesn't have a regcache yet,
3061 create one, instead of aborting gdbserver.
3062 (regcache_invalidate_one): Rename to ...
3063 (regcache_invalidate_thread): ... this.
3064 (regcache_invalidate_one): New.
3065 (regcache_invalidate): Only invalidate registers of the current
3066 process.
3067 (init_register_cache): Add target_desc parameter, and use it.
3068 (new_register_cache): Ditto. Assert the target description has a
3069 non zero registers_size.
3070 (regcache_cpy): Add assertions. Adjust.
3071 (realloc_register_cache, set_register_cache): Delete.
3072 (registers_to_string, registers_from_string): Adjust.
3073 (find_register_by_name, find_regno, find_register_by_number)
3074 (register_cache_size): Add target_desc parameter, and use it.
3075 (free_register_cache_thread, free_register_cache_thread_one)
3076 (regcache_release, register_cache_size): New.
3077 (register_size): Add target_desc parameter, and use it.
3078 (register_data, supply_register, supply_register_zeroed)
3079 (supply_regblock, supply_register_by_name, collect_register)
3080 (collect_register_as_string, collect_register_by_name): Adjust.
3081 * regcache.h (struct target_desc): Forward declare.
3082 (struct regcache) <tdesc>: New field.
3083 (init_register_cache, new_register_cache): Add target_desc
3084 parameter.
3085 (regcache_invalidate_thread): Declare.
3086 (regcache_invalidate_one): Delete declaration.
3087 (regcache_release): Declare.
3088 (find_register_by_number, register_cache_size, register_size)
3089 (find_regno): Add target_desc parameter.
3090 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3091 declarations.
3092 * remote-utils.c: Include tdesc.h.
3093 (outreg, prepare_resume_reply): Adjust.
3094 * server.c: Include tdesc.h.
3095 (gdbserver_xmltarget): Delete declaration.
3096 (get_features_xml, process_serial_event): Adjust.
3097 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3098 declare.
3099 (struct process_info) <tdesc>: New field.
3100 (ipa_tdesc): Declare.
3101 * tdesc.c: New file.
3102 * tdesc.h: New file.
3103 * tracepoint.c: Include tdesc.h.
3104 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3105 (get_context_regcache): Adjust to pass ipa_tdesc down.
3106 (do_action_at_tracepoint): Adjust to get the register cache size
3107 from the context regcache's description.
3108 (traceframe_walk_blocks): Adjust to get the register cache size
3109 from the current trace frame's description.
3110 (traceframe_get_pc): Adjust to get current trace frame's
3111 description and pass it down.
3112 (gdb_collect): Adjust to get the register cache size from the
3113 IPA's description.
3114 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3115 (gdbserver_xmltarget): Delete.
3116 (initialize_low_tracepoint): Set the ipa's target description.
3117 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3118 (initialize_low_tracepoint): Set the ipa's target description.
3119 * linux-x86-low.c: Include tdesc.h.
3120 [__x86_64__] (is_64bit_tdesc): New.
3121 (ps_get_thread_area, x86_get_thread_area): Use it.
3122 (i386_cannot_store_register): Rename to ...
3123 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3124 (i386_cannot_fetch_register): Rename to ...
3125 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3126 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3127 to new interface.
3128 (target_regsets): Rename to ...
3129 (x86_regsets): ... this.
3130 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3131 interface.
3132 (x86_siginfo_fixup): Use is_64bit_tdesc.
3133 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3134 (tdesc_x32_avx_linux, tdesc_x32_linux)
3135 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3136 Declare.
3137 (x86_linux_update_xmltarget): Delete.
3138 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3139 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3140 (AMD64_LINUX_USER64_CS): New.
3141 (x86_linux_read_description): New, based on
3142 x86_linux_update_xmltarget.
3143 (same_process_callback): New.
3144 (x86_arch_setup_process_callback): New.
3145 (x86_linux_update_xmltarget): New.
3146 (x86_regsets_info): New.
3147 (amd64_linux_regs_info): New.
3148 (i386_linux_usrregs_info): New.
3149 (i386_linux_regs_info): New.
3150 (x86_linux_regs_info): New.
3151 (x86_arch_setup): Reimplement.
3152 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3153 (x86_emit_ops): Ditto.
3154 (the_low_target): Adjust. Install x86_linux_regs_info,
3155 x86_cannot_fetch_register, and x86_cannot_store_register.
3156 (initialize_low_arch): New.
3157 * linux-ia64-low.c (tdesc_ia64): Declare.
3158 (ia64_fetch_register): Adjust.
3159 (ia64_usrregs_info, regs_info): New globals.
3160 (ia64_regs_info): New function.
3161 (the_low_target): Adjust.
3162 (initialize_low_arch): New function.
3163 * linux-sparc-low.c (tdesc_sparc64): Declare.
3164 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3165 Adjust.
3166 (sparc_arch_setup): New function.
3167 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3168 (the_low_target): Adjust.
3169 (initialize_low_arch): New function.
3170 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3171 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3172 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3173 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3174 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3175 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3176 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3177 (tdesc_powerpc_isa205_vsx64l): Declare.
3178 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3179 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3180 (ppc_set_pc, ppc_get_hwcap): Adjust.
3181 (ppc_usrregs_info): Forward declare.
3182 (!__powerpc64__) ppc_regmap_adjusted: New global.
3183 (ppc_arch_setup): Adjust to the current process'es target
3184 description.
3185 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3186 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3187 (ppc_store_evrregset): Adjust.
3188 (target_regsets): Rename to ...
3189 (ppc_regsets): ... this, and make static.
3190 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3191 (ppc_regs_info): New function.
3192 (the_low_target): Adjust.
3193 (initialize_low_arch): New function.
3194 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3195 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3196 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3197 (tdesc_s390x_linux64v2): Declare.
3198 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3199 (s390_fill_gregset, s390_store_last_break): Adjust.
3200 (target_regsets): Rename to ...
3201 (s390_regsets): ... this, and make static.
3202 (s390_get_pc, s390_set_pc): Adjust.
3203 (s390_get_hwcap): New target_desc parameter, and use it.
3204 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3205 (s390_arch_setup): Adjust to set the current process'es target
3206 description. Don't adjust the regmap.
3207 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3208 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3209 (regs_info_3264): New globals.
3210 (s390_regs_info): New function.
3211 (the_low_target): Adjust.
3212 (initialize_low_arch): New function.
3213 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3214 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3215 [__mips64] (init_registers_mips_linux)
3216 (init_registers_mips_dsp_linux): Delete defines.
3217 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3218 (have_dsp): New global.
3219 (mips_read_description): New, based on mips_arch_setup.
3220 (mips_arch_setup): Reimplement.
3221 (get_usrregs_info): New function.
3222 (mips_cannot_fetch_register, mips_cannot_store_register)
3223 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3224 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3225 (target_regsets): Rename to ...
3226 (mips_regsets): ... this, and make static.
3227 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3228 (dsp_regs_info, regs_info): New globals.
3229 (mips_regs_info): New function.
3230 (the_low_target): Adjust.
3231 (initialize_low_arch): New function.
3232 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3233 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3234 Declare.
3235 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3236 (arm_read_description): New, with bits factored from
3237 arm_arch_setup.
3238 (arm_arch_setup): Reimplement.
3239 (target_regsets): Rename to ...
3240 (arm_regsets): ... this, and make static.
3241 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3242 (arm_regs_info): New function.
3243 (the_low_target): Adjust.
3244 (initialize_low_arch): New function.
3245 * linux-m68k-low.c (tdesc_m68k): Declare.
3246 (target_regsets): Rename to ...
3247 (m68k_regsets): ... this, and make static.
3248 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3249 (m68k_regs_info): New function.
3250 (m68k_arch_setup): New function.
3251 (the_low_target): Adjust.
3252 (initialize_low_arch): New function.
3253 * linux-sh-low.c (tdesc_sharch): Declare.
3254 (target_regsets): Rename to ...
3255 (sh_regsets): ... this, and make static.
3256 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3257 (sh_regs_info, sh_arch_setup): New functions.
3258 (the_low_target): Adjust.
3259 (initialize_low_arch): New function.
3260 * linux-bfin-low.c (tdesc_bfin): Declare.
3261 (bfin_arch_setup): New function.
3262 (bfin_usrregs_info, regs_info): New globals.
3263 (bfin_regs_info): New function.
3264 (the_low_target): Adjust.
3265 (initialize_low_arch): New function.
3266 * linux-cris-low.c (tdesc_cris): Declare.
3267 (cris_arch_setup): New function.
3268 (cris_usrregs_info, regs_info): New globals.
3269 (cris_regs_info): New function.
3270 (the_low_target): Adjust.
3271 (initialize_low_arch): New function.
3272 * linux-cris-low.c (tdesc_crisv32): Declare.
3273 (cris_arch_setup): New function.
3274 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3275 (cris_regs_info): New function.
3276 (the_low_target): Adjust.
3277 (initialize_low_arch): New function.
3278 * linux-m32r-low.c (tdesc_m32r): Declare.
3279 (m32r_arch_setup): New function.
3280 (m32r_usrregs_info, regs_info): New globals.
3281 (m32r_regs_info): Adjust.
3282 (initialize_low_arch): New function.
3283 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3284 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3285 (tic6x_usrregs_info): Forward declare.
3286 (tic6x_read_description): New function, based on ...
3287 (tic6x_arch_setup): ... this. Reimplement.
3288 (target_regsets): Rename to ...
3289 (tic6x_regsets): ... this, and make static.
3290 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3291 (tic6x_regs_info): New function.
3292 (the_low_target): Adjust.
3293 (initialize_low_arch): New function.
3294 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3295 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3296 (target_regsets): Rename to ...
3297 (xtensa_regsets): ... this, and make static.
3298 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3299 globals.
3300 (xtensa_arch_setup, xtensa_regs_info): New functions.
3301 (the_low_target): Adjust.
3302 (initialize_low_arch): New function.
3303 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3304 (nios2_arch_setup): Set the current process'es tdesc.
3305 (target_regsets): Rename to ...
3306 (nios2_regsets): ... this.
3307 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3308 (nios2_regs_info): New function.
3309 (the_low_target): Adjust.
3310 (initialize_low_arch): New function.
a261b8f5
PA
3311 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3312 (aarch64_arch_setup): Set the current process'es tdesc.
3313 (target_regsets): Rename to ...
3314 (aarch64_regsets): ... this.
3315 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3316 (aarch64_regs_info): New function.
3317 (the_low_target): Adjust.
3318 (initialize_low_arch): New function.
3aee8918
PA
3319 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3320 globals.
3321 (target_regsets): Rename to ...
3322 (tile_regsets): ... this.
3323 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3324 (tile_regs_info): New function.
3325 (tile_arch_setup): Set the current process'es tdesc.
3326 (the_low_target): Adjust.
3327 (initialize_low_arch): New function.
3328 * spu-low.c (tdesc_spu): Declare.
3329 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3330 * win32-arm-low.c (tdesc_arm): Declare.
3331 (arm_arch_setup): New function.
3332 (the_low_target): Install arm_arch_setup instead of
3333 init_registers_arm.
3334 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3335 (init_windows_x86): Rename to ...
3336 (i386_arch_setup): ... this. Set `win32_tdesc'.
3337 (the_low_target): Adjust.
3338 * win32-low.c (win32_tdesc): New global.
3339 (child_add_thread): Don't create the thread cache here.
3340 (do_initial_child_stuff): Set the new process'es tdesc.
3341 * win32-low.h (struct target_desc): Forward declare.
3342 (win32_tdesc): Declare.
3343 * lynx-i386-low.c (tdesc_i386): Declare global.
3344 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3345 * lynx-low.c (lynx_tdesc): New global.
3346 (lynx_add_process): Set the new process'es tdesc.
3347 * lynx-low.h (struct target_desc): Forward declare.
3348 (lynx_tdesc): Declare global.
3349 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3350 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3351 * nto-low.c (nto_tdesc): New global.
3352 (do_attach): Set the new process'es tdesc.
3353 * nto-low.h (struct target_desc): Forward declare.
3354 (nto_tdesc): Declare.
3355 * nto-x86-low.c (tdesc_i386): Declare.
3356 (nto_x86_arch_setup): Set `nto_tdesc'.
3357
b1fbec62
GB
33582013-06-04 Gary Benson <gbenson@redhat.com>
3359
3360 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3361 to qSupported response when appropriate.
3362 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3363 with nonzero-length annex.
3364 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3365 arguments supplied in annex.
3366
d1ec4ce7
DE
33672013-05-31 Doug Evans <dje@google.com>
3368
ac44adcb 3369 PR server/15594
d1ec4ce7
DE
3370 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3371 64 bits in 64-cross-32 environment.
3372
9b25f2d3
PA
33732013-05-28 Pedro Alves <palves@redhat.com>
3374
3375 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3376 (aarch64-without-fpu.c): Delete rule.
3377 * configure.srv (aarch64*-*-linux*): Remove references to
3378 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3379 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3380 declaration.
3381
6740dc9c
PA
33822013-05-24 Pedro Alves <palves@redhat.com>
3383
3384 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3385 instead of strchr/decode_address. Error if the range isn't split
3386 with a ','. Don't assume there's be a ':' in the action.
3387
c2d6af84
PA
33882013-05-23 Yao Qi <yao@codesourcery.com>
3389 Pedro Alves <palves@redhat.com>
3390
3391 * linux-low.c (lwp_in_step_range): New function.
3392 (linux_wait_1): If the thread was range stepping and stopped
3393 outside the stepping range, report the stop to GDB. Otherwise,
3394 continue stepping. Add range stepping debug output.
3395 (linux_set_resume_request): Copy the step range from the resume
3396 request to the lwp.
3397 (linux_supports_range_stepping): New.
3398 (linux_target_ops) <supports_range_stepping>: Set to
3399 linux_supports_range_stepping.
3400 * linux-low.h (struct linux_target_ops)
3401 <supports_range_stepping>: New field.
3402 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3403 * linux-x86-low.c (x86_supports_range_stepping): New.
3404 (the_low_target) <supports_range_stepping>: Set to
3405 x86_supports_range_stepping.
3406 * server.c (handle_v_cont): Handle 'r' action.
3407 (handle_v_requests): Append ";r" if the target supports range
3408 stepping.
3409 * target.h (struct thread_resume) <step_range_start,
3410 step_range_end>: New fields.
3411 (struct target_ops) <supports_range_stepping>:
3412 New field.
3413 (target_supports_range_stepping): New macro.
3414
58794e1a
JB
34152013-05-17 Joel Brobecker <brobecker@adacore.com>
3416
3417 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3418 confusion in comment.
3419
d631c5a7
JB
34202013-05-17 Joel Brobecker <brobecker@adacore.com>
3421
3422 * lynx-low.c (struct process_info_private): New type.
3423 (lynx_add_process): New function.
3424 (lynx_create_inferior, lynx_attach): Replace calls to
3425 add_process by calls to lynx_add_process.
3426 (lynx_resume): If PTID is null, then try using
3427 current_process()->private->last_wait_event_ptid.
3428 Add comments.
3429 (lynx_clear_inferiors): Delete. The contents of that function
3430 has been inlined in lynx_mourn;
3431 (lynx_wait_1): Save the ptid in the process's private data.
3432 (lynx_mourn): Free the process' private data. Replace call
3433 to lynx_clear_inferiors by call to clear_inferiors.
3434
96f7a20f
YQ
34352013-05-17 Yao Qi <yao@codesourcery.com>
3436
3437 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3438 the right place.
3439
db0dfaa0
LM
34402013-05-16 Luis Machado <lgustavo@codesourcery.com>
3441
3442 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3443 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3444 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3445 PT_TEXT_END_ADDR guards. Update comments.
3446 (linux_target_op) <read_offsets>: Conditionally define to
3447 linux_read_offsets if the target is UCLIBC and if it defines
3448 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3449
68f5f838
SL
34502013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3451 Andrew Jenner <andrew@codesourcery.com>
3452
3453 * Makefile.in (SFILES): Add linux-nios2-low.c.
3454 (clean): Add action to delete nios2-linux.c.
3455 (nios2-linux.c): New rule.
3456 * configure.srv: Add nios2*-*-linux*.
3457 * linux-nios2-low.c: New.
3458
1ebff1fd
HAQ
34592013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3460
3461 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3462
f6150862
HZ
34632013-04-25 Hui Zhu <hui@codesourcery.com>
3464
3465 PR gdb/15186
f6150862
HZ
3466 * ax.c (ax_printf): Add fflush.
3467
614c279d
TT
34682013-04-22 Tom Tromey <tromey@redhat.com>
3469
3470 * Makefile.in (SFILES): Add filestuff.c.
3471 (OBS): Add filestuff.o.
3472 (filestuff.o): New target.
3473 * config.in, configure: Rebuild.
3474 * configure.ac: Check for fdwalk, pipe2.
3475
7d4e5717
PA
34762013-04-17 Pedro Alves <palves@redhat.com>
3477
3478 * configure.ac (USE_THREAD_DB): Delete variable.
3479 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3480 Don't AC_SUBST USE_THREAD_DB.
3481 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3482 * config.in, configure: Regenerate.
3483
d5c93e41
PA
34842013-04-16 Pedro Alves <palves@redhat.com>
3485
3486 * linux-low.h (struct lwp_info) <thread_known>: Move under
3487 the USE_THREAD_DB #ifdef.
3488
04f5fe89
PA
34892013-04-16 Pedro Alves <palves@redhat.com>
3490
3491 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3492 (linux-low.o): Delete rule.
3493 * linux-low.h: Always include "gdb_thread_db.h" instead of
3494 conditionally including thread_db.h.
3495 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3496 HAVE_THREAD_DB_H.
3497
480b27bf
JK
34982013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3499
3500 * Makefile.in (install-only): Fix make install regression.
3501
43662968
JK
35022013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3503
3504 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3505 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3506 installation.
3507 * gdbserver.1: Remove.
3508
3e74e146
PA
35092013-03-22 Pedro Alves <palves@redhat.com>
3510
3511 * linux-low.c (handle_extended_wait): Don't call
3512 linux_enable_event_reporting.
3513
a8347a2a
TT
35142013-03-15 Tony Theodore <tonyt@logyst.com>
3515
3516 PR build/9098:
3517 * Makefile.in (SHELL): Use @SHELL@.
3518
eeb56fa7
SDJ
35192013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3520
3521 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3522 compiler warning.
3523
4fa7e2ff
JB
35242013-03-13 Joel Brobecker <brobecker@adacore.com>
3525
3526 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3527 Remove extraneous NULL element.
3528
8ddb1965
YQ
35292013-03-13 Yao Qi <yao@codesourcery.com>
3530
3531 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3532 'V' block in trace frame.
3533
9accd112
MM
35342013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3535
3536 * target.h (struct target_ops): Add btrace ops.
3537 (target_supports_btrace): New macro.
3538 (target_enable_btrace): New macro.
3539 (target_disable_btrace): New macro.
3540 (target_read_btrace): New macro.
3541 * gdbthread.h (struct thread_info): Add btrace field.
3542 * server.c: Include btrace-common.h.
3543 (handle_btrace_general_set): New function.
3544 (handle_btrace_enable): New function.
3545 (handle_btrace_disable): New function.
3546 (handle_general_set): Call handle_btrace_general_set.
3547 (handle_qxfer_btrace): New function.
3548 (struct qxfer qxfer_packets[]): Add btrace entry.
3549 * inferiors.c (remove_thread): Disable btrace.
3550 * linux-low: Include linux-btrace.h.
3551 (linux_low_enable_btrace): New function.
3552 (linux_low_read_btrace): New function.
3553 (linux_target_ops): Add btrace ops.
3554 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3555 Add srv_linux_btrace=yes.
3556 (x86_64-*-linux*): Add linux-btrace.o.
3557 Add srv_linux_btrace=yes.
3558 * configure.ac: Define HAVE_LINUX_BTRACE.
3559 * config.in: Regenerated.
3560 * configure: Regenerated.
3561
5cc22e4c
MM
35622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3563
3564 * server.c (handle_qxfer): Preserve error message if -3 is
3565 returned.
3566 (qxfer): Document the -3 return value.
3567
7c97f91e
MM
35682013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3569
3570 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3571 (linux_btrace_h): New variable.
3572 (linux-btrace.o): New rule.
3573
be9a119c 35742013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3575 Hafiz Abid Qadeer <abidh@codesourcery.com>
3576
3577 * tracepoint.c (trace_buffer_size): New global.
3578 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3579 (init_trace_buffer): Change to one-argument function. Allocate
3580 trace buffer memory.
3581 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3582 handle QTBuffer:size packet.
3583 (cmd_bigqtbuffer_size): New function.
3584 (initialize_tracepoint): Call init_trace_buffer with
3585 DEFAULT_TRACE_BUFFER_SIZE.
3586 * server.c (handle_query): Add QTBuffer:size in the
3587 supported packets.
3588
e64f7499
YQ
35892013-03-07 Yao Qi <yao@codesourcery.com>
3590
3591 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3592 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3593 of -1.
3594 (cmd_qtsp): Adjust condition. Do post increment.
3595 Set cur_action and cur_step_action back to 0.
3596
f0ae6fc3
PA
35972013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3598
3599 PR server/15236
3600 * linux-low.c (linux_write_memory): Return early success if LEN is
3601 zero.
3602
b5b0b0af
CV
36032013-03-05 Corinna Vinschen <vinschen@redhat.de>
3604
334ad4a8 3605 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3606
589bc927
TT
36072013-02-28 Tom Tromey <tromey@redhat.com>
3608
3609 * configure.ac: Invoke AC_SYS_LARGEFILE.
3610 * configure, config.in: Rebuild.
3611
dfe07582
CV
36122013-02-28 Corinna Vinschen <vinschen@redhat.com>
3613
3614 * win32-low.c: Throughout, fix format strings and casts of
3615 printf-like functions to avoid type related warnings on all
3616 platforms.
3617 (get_child_debug_event): Print dwDebugEventCode as hex since
3618 that's how it's usually documented.
3619
736cd585
YQ
36202013-02-28 Yao Qi <yao@codesourcery.com>
3621
3622 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3623 pulongest.
3624
e1f58301
JW
36252013-02-27 Jiong Wang <jiwang@tilera.com>
3626
3627 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3628 (reg-tilegx32.c): New rule.
3629 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3630 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3631 different register info initializer according to elf class.
3632 (init_registers_tilgx32): New function. The tilegx32 register info
3633 initializer.
3634 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3635 (tile_store_gregset): Likewise.
3636
d171ca78
YQ
36372013-02-27 Yao Qi <yao@codesourcery.com>
3638
3639 * server.c (process_point_options): Print debug message when
3640 debug_threads is true.
3641
282bbdf3
YQ
36422013-02-26 Yao Qi <yao@codesourcery.com>
3643
3644 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3645
aca22551
PA
36462013-02-19 Pedro Alves <palves@redhat.com>
3647 Kai Tietz <ktietz@redhat.com>
3648
3649 PR gdb/15161
3650
3651 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3652 instead of strtoul to extract address from packet.
3653 (process_serial_event) <'z'>: Likewise.
3654
4f3cee1c
YQ
36552013-02-18 Yao Qi <yao@codesourcery.com>
3656
3657 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3658
8e1d55a3
PA
36592013-02-14 Pedro Alves <palves@redhat.com>
3660
3661 Plug memory leak.
3662
3663 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3664 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3665
458820da
PA
36662013-02-14 Pedro Alves <palves@redhat.com>
3667
3668 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3669
baea0dae
PA
36702013-02-14 Pedro Alves <palves@redhat.com>
3671
3672 * tracepoint.c (save_string): Delete.
3673 (add_tracepoint_action): Use savestring instead of save_string.
3674
0b1afbb3
PA
36752013-02-12 Pedro Alves <palves@redhat.com>
3676
3677 * linux-xtensa-low.c: Ditto.
3678 * xtensa-xtregs.c: Ditto.
3679
8a4ac37e
PA
36802013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3681
3682 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3683 thread_db.
3684
148de6bb
MS
36852013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3686
3687 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3688 aarch64_num_wp_regs and aarch64_num_bp_regs to
3689 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3690
55fac6e0
MS
36912013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3692
3693 * linux-aarch64-low.c (ps_get_thread_area): Replace
3694 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3695
176eb98c
MS
36962013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3697 Marcus Shawcroft <marcus.shawcroft@arm.com>
3698 Nigel Stephens <nigel.stephens@arm.com>
3699 Yufeng Zhang <yufeng.zhang@arm.com>
3700
3701 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3702 (aarch64.c, aarch64-without-fpu.c): New targets.
3703 * configure.srv (aarch64*-*-linux*): New.
3704 * linux-aarch64-low.c: New file.
3705
56f7af9c
MS
37062013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3707
43aaf8b6 3708 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3709 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3710 (dequeue_one_deferred_signal, linux_resume_one_thread)
3711 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3712 (linux_tracefork_grandchild, linux_test_for_tracefork)
3713 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3714 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3715 where the argument is 0.
3716
60f662b0
YQ
37172013-01-25 Yao Qi <yao@codesourcery.com>
3718
3719 * event-loop.c: Include "queue.h".
3720 (gdb_event_p): New typedef.
3721 (struct gdb_event) <next_event>: Remove.
3722 (event_queue): Change to QUEUE(gdb_event_p).
3723 (async_queue_event): Remove.
3724 (gdb_event_xfree): New.
3725 (initialize_event_loop): New.
3726 (process_event): Use API from QUEUE.
3727 (wait_for_event): Likewise.
3728 * server.c (main): Call initialize_event_loop.
3729 * server.h (initialize_event_loop): Declare.
3730
5ae4861a
YQ
37312013-01-18 Yao Qi <yao@codesourcery.com>
3732
3733 * ax.h (struct eval_agent_expr_context): New.
3734 (gdb_eval_agent_expr): Update declaration.
3735 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3736 TFRAME. Add new argument CTX.
3737 * server.h (struct eval_agent_expr_context): Declare.
3738 (agent_mem_read, agent_tsv_read): Update declaration.
3739 (agent_mem_read_string): Likewise.
3740 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3741 (add_traceframe_block): Add new argument TPOINT.
3742 Increase TPOINT->traceframe_usage.
3743 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3744 eval_tracepoint_agent_expr.
3745 (condition_true_at_tracepoint): Likewise.
3746 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3747 (agent_mem_read_string, agent_tsv_read): Likewise.
3748
85e00e85
YQ
37492013-01-16 Yao Qi <yao@codesourcery.com>
3750
3751 * linux-low.c (linux_resume_one_lwp): Don't check
3752 'lwp->bp_reinsert != 0'.
3753
4039cf45
JB
37542013-01-07 Joel Brobecker <brobecker@adacore.com>
3755 Pedro Alves <palves@redhat.com>
3756
3757 * lynx-low.c (ptrace_request_to_str): Define a temporary
3758 macro and use it to simplify this function's implementation.
3759
9044dee2
JB
37602013-01-07 Joel Brobecker <brobecker@adacore.com>
3761
3762 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3763 sets errno.
3764
e6352c8f
JB
37652013-01-07 Joel Brobecker <brobecker@adacore.com>
3766
3767 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3768
50681a27
JB
37692013-01-07 Joel Brobecker <brobecker@adacore.com>
3770
3771 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3772
3f6e77ef
JB
37732013-01-07 Joel Brobecker <brobecker@adacore.com>
3774
3775 * lynx-low.c (lynx_resume): Use the resume_info parameter
3776 to determine the ptid for the lynx_ptrace call, unless
3777 it is equal to minus_one_ptid, in which case we use the
3778 ptid of the current_inferior.
3779 (lynx_wait_1): After having received a thread create/exit
3780 event, resume the inferior's execution using the signaling
3781 thread's ptid, rather than the old ptid.
3782
7fda33ae
JB
37832013-01-07 Joel Brobecker <brobecker@adacore.com>
3784
3785 * lynx-low.c (lynx_resume): Delete variable ret.
3786
b9786c74
JB
37872013-01-01 Joel Brobecker <brobecker@adacore.com>
3788
3789 * gdbreplay.c (gdbreplay_version): Update copyright year.
3790 * server.c (gdbserver_version): Likewise.
3791
8b93d60f
JB
37922012-12-17 Joel Brobecker <brobecker@adacore.com>
3793
3794 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3795 new thread.
3796
037335a7
JB
37972012-12-17 Joel Brobecker <brobecker@adacore.com>
3798
3799 * lynx-low.c (ptrace_request_to_str): Add handling for
3800 PTRACE_GETTRACESIG.
3801
52d4cbd8
JB
38022012-12-17 Joel Brobecker <brobecker@adacore.com>
3803
3804 * lynx-low.c (lynx_attach): Delete variable new_process.
3805
ab8f6ca9
JB
38062012-12-17 Joel Brobecker <brobecker@adacore.com>
3807
3808 * lynx-low.c (lynx_create_inferior): Delete variable
3809 new_process.
3810
78cbc024
JB
38112012-12-17 Joel Brobecker <brobecker@adacore.com>
3812
3813 * lynx-low.c (ptrace_request_to_str): Do not handle
3814 PTRACE_GETTHREADLIST if this macro does not exist.
3815
14a00470
YQ
38162012-12-15 Yao Qi <yao@codesourcery.com>
3817
3818 * Makefile.in (OBS): Add notif.o.
3819 * notif.c, notif.h: New.
3820 * server.c: Include "notif.h".
3821 (struct vstop_notif) <next>: Remove.
3822 <base>: New field.
3823 (queue_stop_reply): Update.
3824 (push_event, send_next_stop_reply): Remove.
3825 (discard_queued_stop_replies): Update.
3826 (notif_stop): New variable.
3827 (handle_v_stopped): Remove.
3828 (handle_v_requests): Don't call handle_v_stopped. Call
3829 handle_ack_notif instead.
3830 (queue_stop_reply_callback): Call notif_event_enque instead
3831 of queue_stop_reply.
3832 (handle_status): Don't call send_next_stop_reply, call
3833 notif_write_event instead.
3834 (kill_inferior_callback): Likewise.
3835 (detach_or_kill_inferior_callback): Likewise.
3836 (main): Call initialize_notif.
3837 (process_serial_event): Call QUEUE_is_empty.
3838 (handle_target_event): Call notif_push instead of push event.
3839 * server.h (push_event): Remove declaration.
3840
61c125b9
TT
38412012-12-10 Tom Tromey <tromey@redhat.com>
3842
3843 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3844 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3845 macros.
3846 (.c.o): Rewrite.
3847 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3848 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3849 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3850 (amd64-linux-ipa.o, ax.o): Rewrite.
3851 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3852 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3853 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3854 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3855 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3856 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3857 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3858 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3859 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3860 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3861 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3862 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3863 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3864 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3865 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3866 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3867 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3868 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3869 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3870 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3871 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3872 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3873 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3874 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3875 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3876 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3877 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3878 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3879 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3880 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3881 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3882 (reg-tilegx.o): Remove.
3883 (all_object_files): New macro.
3884 Include .deps files.
3885 * aclocal.m4, configure: Rebuild.
3886 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3887 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3888 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3889
e90e9ad9
TT
38902012-12-05 Tom Tromey <tromey@redhat.com>
3891
3892 PR gdb/14917:
3893 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3894
02d403bf 38952012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3896
3897 * configure.ac: Check for linux/perf_event.h.
3898 * config.in: Regenerated.
3899 * configure: Regenerated.
3900
0270a750
PA
39012012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3902
3903 * hostio.c (handle_readlink): Decrease buffer size
3904 parameter passed to readlink by one byte.
3905
8c29b58e
YQ
39062012-11-26 Yao Qi <yao@codesourcery.com>
3907
3908 * configure.ac (build_warnings): Append '-Wempty-body'.
3909 * configure: Regenerated.
3910 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3911 body.
3912
8bdce1ff
PM
39132012-11-15 Pierre Muller <muller@sourceware.org>
3914
3915 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3916 * config.in: Regenerate.
3917 * configure: Regenerate.
3918 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3919 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3920 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3921 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3922 header.
3923 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3924 instead of <sys/wait.h> header.
3925 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3926
02d403bf 39272012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3928
3929 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3930 (various make rules): Remove -DGDBSERVER
3931
fbd5db48
YQ
39322012-11-09 Yao Qi <yao@codesourcery.com>
3933
3934 * spu-low.c (current_ptid): Move it to ..
3935 * gdbthread.h: ... here. New.
3936 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3937 * server.c (myresume, process_serial_event): Likewise.
3938 * thread-db.c (thread_db_find_new_threads): Likewise.
3939 * tracepoint.c (run_inferior_command): Likewise.
3940
b3dc46ff
AB
39412012-10-01 Andrew Burgess <aburgess@broadcom.com>
3942
3943 * server.c (handle_search_memory_1): Include access length in
3944 warning message.
3945
07c04788
HPN
39462012-09-05 Michael Brandt <michael.brandt@axis.com>
3947
3948 * linux-crisv32-low.c: Fix compile errors.
3949
918d227b
YQ
39502012-09-04 Yao Qi <yao@codesourcery.com>
3951
3952 * tracepoint.c (cmd_qtsv): Adjust debug message.
3953 Don't check CUR_TPOINT.
3954
18c1b81a
YQ
39552012-08-28 Yao Qi <yao@codesourcery.com>
3956
3957 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3958 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3959 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3960 Remove declarations of xmalloc, xreallloc, xstrdup and
3961 freeargv.
3962 * Makefile.in (libiberty_h): New.
3963 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3964 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3965
dc82f37b
YQ
39662012-08-23 Yao Qi <yao@codesourcery.com>
3967
3968 * server.h: Remove declaration of 'xsnprintf'.
3969
406b1477
KS
39702012-08-22 Keith Seitz <keiths@redhat.com>
3971
3972 * server.h: Include build-gnulib-gbserver/config.h.
3973 * gdbreplay.c: Likewise.
3974
e6712ff1
DE
39752012-08-08 Doug Evans <dje@google.com>
3976
3977 * Makefile.in (SFILES): Add gdb_vecs.c.
3978 (OBS): Add gdb_vecs.o.
3979 (gdb_vecs_h, host_defs_h): New variables.
3980 (thread-db.o): Add $(gdb_vecs_h) dependency.
3981 (gdb_vecs.o): New rule.
3982 * thread-db.c: #include "gdb_vecs.h".
3983 (thread_db_load_search): Use a vector to iterate over path elements.
3984 Handle text appearing after "$pdir".
3985
3986 * configure.ac: Add check for strstr.
3987 * config.in: Regenerate.
3988 * configure: Regenerate.
3989
7c3270ae
UW
39902012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3991
3992 * hostio.c (handle_pread): If pread fails, fall back to attempting
3993 lseek/read.
3994 (handle_pwrite): Likewise for pwrite.
3995
b62e2b27
UW
39962012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3997
3998 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3999 between unsupported TYPE and unimplementable ADDR/LEN combination.
4000 (arm_insert_point): Act on new return value.
4001
78a99e91
PA
40022012-07-31 Pedro Alves <palves@redhat.com>
4003
4004 * server.c (process_point_options): Only skip tokens if we find
4005 one that is unrecognized. Don't treat 'X' specially while
4006 skipping unrecognized tokens.
4007
fcf303ab
UW
40082012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4009
4010 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4011 to 4-byte-align HW breakpoint addresses for Thumb.
4012
7255706c
YQ
40132012-07-27 Yao Qi <yao@codesourcery.com>
4014
4015 PR remote/14161.
4016
4017 * server.h: Declare gdb_agent_about_to_close.
4018 * target.c (kill_inferior): Include "agent.h".
4019 New. Send command 'kill'.
4020 * target.h (kill_inferior): Removed macro.
4021 * tracepoint.c (gdb_agent_about_to_close): New.
4022 (gdb_agent_helper_thread): Handle command 'close'.
4023 Wait endlessly until the inferior stops.
4024 Install gdb_agent_remove_socket to atexit hook.
4025 (agent_socket_name): New static variable.
4026 (gdb_agent_socket_init): Replace local variable 'name' with
4027 'agent_socket_name'.
4028 (gdb_agent_remove_socket): New.
4029
5a3f286f
YQ
40302012-07-27 Yao Qi <yao@codesourcery.com>
4031
4032 * server.c (process_point_options): Stop at 'X' when parsing.
4033
961bd387
ME
40342012-07-19 Michael Eager <eager@eagercon.com>
4035
a261b8f5 4036 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4037 to hw_execute.
4038 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4039 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4040 hardware breakpoint.
4041
aa7c7447
JK
40422012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4043
4044 * gdbserver/linux-low.c (initialize_low): Call
4045 linux_ptrace_init_warnings.
4046
7f216e7c
DE
40472012-07-02 Doug Evans <dje@google.com>
4048
4049 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4050 pointer to int.
4051
d3ce09f5
SS
40522012-07-02 Stan Shebs <stan@codesourcery.com>
4053
4054 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4055 (ax.o): Add it to build rule.
4056 (ax-ipa.o): Ditto.
4057 (OBS): Add format.o.
4058 (IPA_OBS): Add format.o.
4059 * server.c (handle_query): Claim support for breakpoint commands.
4060 (process_point_options): Add command case.
4061 (process_serial_event): Leave running if there are printfs in
4062 effect.
4063 * mem-break.h (any_persistent_commands): Declare.
4064 (add_breakpoint_commands): Declare.
4065 (gdb_no_commands_at_breakpoint): Declare.
4066 (run_breakpoint_commands): Declare.
4067 * mem-break.c (struct point_command_list): New struct.
4068 (struct breakpoint): New field command_list.
4069 (any_persistent_commands): New function.
4070 (add_commands_to_breakpoint): New function.
4071 (add_breakpoint_commands): New function.
4072 (gdb_no_commands_at_breakpoint): New function.
4073 (run_breakpoint_commands): New function.
4074 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4075 locally.
4076 * ax.c: Include format.h.
4077 (ax_printf): New function.
4078 (gdb_eval_agent_expr): Add printf opcode.
4079
2f8f6aed
YQ
40802012-06-13 Yao Qi <yao@codesourcery.com>
4081
4082 * server.c (start_inferior): Remove duplicated writes to fields
4083 'last_resume_kind' and 'last_status' of 'current_inferior'.
4084
0c9070b3
YQ
40852012-06-12 Yao Qi <yao@codesourcery.com>
4086 Pedro Alves <palves@redhat.com>
4087
4088 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4089 comment.
4090 * server.c (handle_v_cont): Extend comment.
4091
c52daf70
YQ
40922012-06-11 Yao Qi <yao@codesourcery.com>
4093
4094 * linux-low.c (linux_attach): Add 'static'.
4095
d38bbb0a
YQ
40962012-06-06 Yao Qi <yao@codesourcery.com>
4097
4098 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4099
89dc0afd
JK
41002012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4101
4102 Fix gcc -flto compilation warning.
4103 * server.c (main): Make variable multi_mode and attach volatile.
4104
75f62ce7
TJB
41052012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4106
4107 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4108 if the platform doesn't know about it.
4109
65f479b6
PA
41102012-05-30 Jeff Kenton <jkenton@tilera.com>
4111
4112 * Makefile.in (SFILES): Add linux-tile-low.c.
4113 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4114 * configure.srv: Handle tilegx-*-linux*.
4115 * linux-tile-low.c: New file.
4116
0c5bf5a9
JK
41172012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4118
4119 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4120
a493e3e2
PA
41212012-05-24 Pedro Alves <palves@redhat.com>
4122
4123 PR gdb/7205
4124
43aaf8b6 4125 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4126
2ea28649
PA
41272012-05-24 Pedro Alves <palves@redhat.com>
4128
4129 PR gdb/7205
4130
4131 Replace target_signal with gdb_signal throughout.
4132
8d409d16
MR
41332012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4134
4135 * linux-low.c (linux_store_registers): Avoid the copying sequence
4136 when no data has been retrieved by ptrace.
4137
23512c01
MGD
41382012-05-22 Will Deacon <will.deacon@arm.com>
4139
4140 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4141 Include asm/ptrace.h.
4142 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4143 already defined.
4144
4934b29e
MR
41452012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4146
4147 * linux-low.c (linux_store_registers): Don't re-retrieve data
4148 with ptrace that has already been obtained from /proc. Always
4149 copy any data retrieved with ptrace to the buffer supplied.
4150
bde24c0a
PA
41512012-05-11 Yao Qi <yao@codesourcery.com>
4152 Pedro Alves <palves@redhat.com>
4153
4154 * linux-low.c (enum stopping_threads_kind): New.
4155 (stopping_threads): Change type to `enum stopping_threads_kind'.
4156 (handle_extended_wait): If stopping and suspending threads, leave
4157 the new_lwp suspended too.
4158 (linux_wait_for_event): Adjust.
4159 (stop_all_lwps): Set `stopping_threads' to
4160 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4161 whether we're suspending threads or just stopping them. Assert no
4162 recursion happens.
4163
623b6bdf
YQ
41642012-04-29 Yao Qi <yao@codesourcery.com>
4165
4166 * server.h: Move some code to ...
4167 * gdbthread.h: ... here. New.
4168 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4169 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4170 (nto-low.o, win32-low.o): Likewise.
4171 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4172 * regcache.c, remote-utils.c, server.c: Likewise.
4173 * target.c, tracepoint.c, win32-low.c: Likewise.
4174
f15f9948
TJB
41752012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4176
4177 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4178 (PTRACE_ARG4_TYPE): Likewise.
4179 (PTRACE_XFER_TYPE): Likewise.
4180 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4181 ptrace to PTRACE_ARG3_TYPE.
4182 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4183 (PTRACE_ARG4_TYPE): Likewise.
4184 (PTRACE_XFER_TYPE): Likewise.
4185 (linux_detach_one_lwp): Cast fourth argument of
4186 ptrace to long then PTRACE_ARG4_TYPE.
4187 (regsets_fetch_inferior_registers): Cast third argument of
4188 ptrace to long then PTRACE_ARG3_TYPE.
4189 (regsets_store_inferior_registers): Likewise.
4190
38ea300a
PA
41912012-04-20 Pedro Alves <palves@redhat.com>
4192
4193 * configure: Regenerate.
4194
c971b7fa
PA
41952012-04-19 Pedro Alves <palves@redhat.com>
4196
43aaf8b6 4197 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4198 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4199 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4200 (all, install-only, uninstall, clean-info, all-lib, clean): No
4201 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4202 (maintainer-clean realclean distclean): Use subdir_do.
4203 (subdir_do): New.
4204 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4205 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4206 * acinclude.m4: Include acx_configure_dir.m4.
4207 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4208 calls. Call AC_PROG_RANLIB. Configure gnulib using
4209 ACX_CONFIGURE_DIR.
4210 (GNULIB): New.
4211 (GNULIB_STDINT_H): Adjust.
4212 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4213 * gdbreplay.c: Include build-gnulib/config.h.
4214 * server.h: Likewise.
4215 * aclocal.m4: Regenerate.
4216 * config.in: Regenerate.
4217 * configure: Regenerate.
c971b7fa 4218
809277f8
PA
42192012-04-19 Pedro Alves <palves@redhat.com>
4220
4221 * Makefile.in (LIBGNU, INCGNU): Adjust.
4222 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4223 (all, install-only, uninstall, clean-info, all-lib, clean)
4224 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4225 * configure.ac: Adjust AC_OUTPUT output.
4226 * aclocal.m4: Regenerate.
4227 * configure: Regenerate.
4228
fd9bb8b8
PA
42292012-04-19 Pedro Alves <palves@redhat.com>
4230
4231 * Makefile.in (generated_files): New.
4232 (server_h): Remove the explicit dependency on config.h, and depend
4233 on $generated_files.
4234
1c298c66
PA
42352012-04-19 Pedro Alves <palves@redhat.com>
4236
4237 * Makefile.in (INCGNU): Add -Ignulib.
4238
57c4b50b
PA
42392012-04-19 Pedro Alves <palves@redhat.com>
4240
4241 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4242 (INCGNU): ... this, and spell out -I here.
4243 (GNULIB_LIB): Rename to ...
4244 (LIBGNU): ... this.
4245 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4246
1030e047
PA
42472012-04-19 Pedro Alves <palves@redhat.com>
4248
4249 * config.in: Regenerate.
4250
447d4319
PA
42512012-04-19 Pedro Alves <palves@redhat.com>
4252
4253 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4254 * server.h (memmem): Remove declaration.
4255 * config.in: Regenerate.
4256 * configure: Regenerate.
4257
aad9eab9
YQ
42582012-04-19 Yao Qi <yao@codesourcery.com>
4259
4260 * Makefile.in (SFILES): Add common/vec.c.
4261 (OBS): Add vec.o.
4262 (vec.o): New rule.
4263
3e10640f
YQ
42642012-04-19 Yao Qi <yao@codesourcery.com>
4265
4266 * remote-utils.c (prepare_resume_reply): Replace with macro
4267 target_core_of_thread.
4268 * server.c (handle_qxfer_threads_proper): Likewise.
4269 * target.h (traget_core_of_thread): New macro.
4270
71622373
PA
42712012-04-18 Pedro Alves <palves@redhat.com>
4272
4273 * aclocal.m4: Regenerate.
4274 * configure: Regenerate.
4275
80d26939
YQ
42762012-04-16 Yao Qi <yao@codesourcery.com>
4277
4278 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4279 duplicated on address.
4280
42476b70
YQ
42812012-04-16 Yao Qi <yao@codesourcery.com>
4282
4283 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4284 (struct tracepoint_action_ops) <send>: New field.
4285 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4286 (agent_expr_send, x_tracepoint_action_send): New.
4287 (l_tracepoint_action_send): New.
4288 (cmd_qtdp): Download and install tracepoint
4289 according to `use_agent'.
4290 (run_inferior_command): Add one more parameter `len'.
4291 Update callers.
4292 (tracepoint_send_agent): New.
4293 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4294
7bc83639
YQ
42952012-04-16 Yao Qi <yao@codesourcery.com>
4296
4297 * tracepoint.c (download_tracepoints): Moved to ...
4298 (cmd_qtstart): ... here.
4299
5f18041e
YQ
43002012-04-14 Yao Qi <yao@codesourcery.com>
4301
4302 * tracepoint.c: Include inttypes.h.
4303 (struct collect_memory_action): Use sized types.
4304 (struct tracepoint): Likewise.
4305 (cmd_qtdp, stop_tracing): Update print specifiers.
4306 (cmd_qtp, response_tracepoint): Likewise.
4307 (collect_data_at_tracepoint): Likewise.
4308 (collect_data_at_step): Likewise.
4309
55a8c076
YQ
43102012-04-14 Yao Qi <yao@codesourcery.com>
4311
4312 Import gnulib module inttypes.
4313 * aclocal.m4, config.in, configure: Regenerated.
4314
dc750257
YQ
43152012-04-14 Yao Qi <yao@codesourcery.com>
4316
4317 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4318 Makefile and config.status at last.
4319
0ab5faf9
YQ
43202012-04-13 Yao Qi <yao@codesourcery.com>
4321
4322 * tracepoint.c: Include stdint.h unconditionally.
4323
18f5fd81
TJB
43242012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4325
4326 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4327 on BFD_HAVE_SYS_PROCFS_TYPE.
4328 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4329 * configure: Regenerate.
4330 * config.in: Likewise.
4331
4d47af5c
L
43322012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4333
4334 * Makefile.in (clean): Also remove x32.c x32-linux.c
4335 x32-avx.c x32-avx-linux.c.
4336 (x32.o): New target.
4337 (x32.c): Likewise.
4338 (x32-linux.o): Likewise.
4339 (x32-linux.c): Likewise.
4340 (x32-avx.o): Likewise.
4341 (x32-avx.c): Likewise.
4342 (x32-avx-linux.o): Likewise.
4343 (x32-avx-linux.c): Likewise.
4344
4345 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4346 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4347 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4348 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4349 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4350 i386/x32-avx-linux.xml.
4351
4352 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4353 (init_registers_x32_avx_linux): Likwise.
4354 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4355 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4356
ecedbe58
PA
43572012-04-13 Pedro Alves <palves@redhat.com>
4358
4359 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4360 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4361 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4362 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4363 the sub-make.
4364
c92b5177
L
43652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4366
4367 * linux-x86-low.c (compat_x32_clock_t): New.
4368 (compat_x32_siginfo_t): Likewise.
4369 (compat_x32_siginfo_from_siginfo): Likewise.
4370 (siginfo_from_compat_x32_siginfo): Likewise.
4371 (linux_is_elf64): Likewise.
4372 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4373 and siginfo_from_compat_x32_siginfo for x32.
4374 (x86_arch_setup): Set linux_is_elf64.
4375
214d508e
L
43762012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4377
4378 PR gdb/13969
4379 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4380 e_machine field.
4381 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4382 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4383 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4384 compatible with process.
4385
c9a1864a
YQ
43862012-04-12 Yao Qi <yao@codesourcery.com>
4387
4388 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4389 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4390 (install-only, install-info, clean): Handle sub dir gnulib.
4391 (all-lib, am--refresh): New targets.
4392 (memmem.o): Remove target.
4393 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4394 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4395 (AC_REPLACE_FUNCS): Remove memmem.
4396 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4397 (AC_OUTPUT): Generate Makefile in gnulib/.
4398 * aclocal.m4, config.in, configure: Regenerated.
4399
367ba2c2
MR
44002012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4401
4402 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4403
9d236627
PA
44042012-04-05 Pedro Alves <palves@redhat.com>
4405
4406 -Werror=strict-aliasing
4407
4408 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4409 pointer.
4410
111217b3
PA
44112012-04-04 Pedro Alves <palves@redhat.com>
4412
4413 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4414 (sparc_store_gregset_from_stack, sparc_store_gregset)
4415 (sparc_breakpoint_at): Fix formatting.
4416
8365dcf5
TJB
44172012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4418
4419 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4420 are available.
4421 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4422 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4423 * config.in: Regenerate.
4424 * configure: Likewise.
4425
689cc2ae
PA
44262012-03-29 Pedro Alves <palves@redhat.com>
4427
4428 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4429 Correct ptrace arguments.
4430
c14dfd32
PA
44312012-03-28 Pedro Alves <palves@redhat.com>
4432
4433 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4434 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4435 (IA64_FR1_REGNUM): New defines.
4436 (ia64_fetch_register): New.
4437 (the_low_target): Install it.
4438 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4439 field.
4440 * linux-low.c (linux_fetch_registers): Try the
4441 the_low_target.fetch_register hook first.
4442
4443 * linux-arm-low.c (the_low_target): Adjust.
4444 * linux-bfin-low.c (the_low_target): Adjust.
4445 * linux-cris-low.c (the_low_target): Adjust.
4446 * linux-crisv32-low.c (the_low_target): Adjust.
4447 * linux-m32r-low.c (the_low_target): Adjust.
4448 * linux-m68k-low.c (the_low_target): Adjust.
4449 * linux-mips-low.c (the_low_target): Adjust.
4450 * linux-ppc-low.c (the_low_target): Adjust.
4451 * linux-s390-low.c (the_low_target): Adjust.
4452 * linux-sh-low.c (the_low_target): Adjust.
4453 * linux-sparc-low.c (the_low_target): Adjust.
4454 * linux-tic6x-low.c (the_low_target): Adjust.
4455 * linux-x86-low.c (the_low_target): Adjust.
4456 * linux-xtensa-low.c (the_low_target): Adjust.
4457
63c88e13
PA
44582012-03-26 Pedro Alves <palves@redhat.com>
4459
4460 * server.c (handle_qxfer_libraries): Don't bail early if
4461 the_target->qxfer_libraries_svr4 is not NULL.
4462
fb723180
PA
44632012-03-26 Pedro Alves <palves@redhat.com>
4464
4465 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4466
0afae3cf
PA
44672012-03-23 Pedro Alves <palves@redhat.com>
4468
4469 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4470 "library-list-svr4" element's start tag when the the DSO list is
4471 empty.
4472
485f1ee4
PA
44732012-03-23 Pedro Alves <palves@redhat.com>
4474
4475 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4476 a variable whose type size is the same as the inferior's pointer
4477 size.
4478
a5362b9a
TS
44792012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4480
4481 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4482 struct siginfo.
4483 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4484 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4485 * linux-low.h: Include <signal.h>.
4486 (struct siginfo): Remove forward declaration.
4487 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4488 struct siginfo.
4489
d226c142
MF
44902012-03-21 Mike Frysinger <vapier@gentoo.org>
4491
4492 * .gitignore: Ignore more files.
4493
122f36ef
PA
44942012-03-19 Pedro Alves <palves@redhat.com>
4495 Jan Kratochvil <jan.kratochvil@redhat.com>
4496
4497 * server.c (cont_thread, general_thread): Add describing comments.
4498 (start_inferior): Clear `cont_thread'.
4499 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4500 of a process.
4501
fc3e5175
YQ
45022012-03-15 Yao Qi <yao@codesourcery.com>
4503
4504 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4505 handling to ...
4506 (cmd_qtdp): ... here.
4507
8d0d92cd
YQ
45082012-03-15 Yao Qi <yao@codesourcery.com>
4509
4510 * tracepoint.c (struct tracepoint_action_ops): New.
4511 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4512 (m_tracepoint_action_download): New.
4513 (r_tracepoint_action_download): New.
4514 (x_tracepoint_action_download): New.
4515 (l_tracepoint_action_download): New.
4516 (add_tracepoint_action): Install `action->ops' according type.
4517 (download_tracepoint_1): Move code `download' function pointer
4518 of various tracepoint_action_ops.
4519
87b0bb13
JK
45202012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4521
4522 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4523 linux_ptrace_attach_warnings.
4524
5f572dec
JK
45252012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4526
4527 * Makefile.in (linux-ptrace.o): New.
4528 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4529 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4530 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4531 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4532 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4533 of these targets.
4534 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4535
f4647387
YQ
45362012-03-08 Yao Qi <yao@codesourcery.com>
4537 Pedro Alves <palves@redhat.com>
4538
4539 Fix PR server/13392.
4540 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4541 offset of JMP insn.
4542 * tracepoint.c (remove_tracepoint): New.
4543 (cmd_qtdp): Call remove_tracepoint when failed to install.
4544
9b224c5e
PA
45452012-03-07 Pedro Alves <palves@redhat.com>
4546
4547 * linux-low.c (get_detach_signal): New.
4548 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4549 Pass on pending signals to PTRACE_DETACH. Check the result of the
4550 ptrace call.
4551 * server.c (program_signals, program_signals_p): New.
4552 (handle_general_set): Handle QProgramSignals.
4553 * server.h (program_signals, program_signals_p): Declare.
4554
e237a7e2
JK
45552012-03-05 Pedro Alves <palves@redhat.com>
4556 Jan Kratochvil <jan.kratochvil@redhat.com>
4557
4558 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4559 New comment why.
4560
5808517f
YQ
45612012-03-03 Yao Qi <yao@codesourcery.com>
4562
4563 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4564 agent_look_up_symbols.
4565
58b4daa5
YQ
45662012-03-03 Yao Qi <yao@codesourcery.com>
4567
4568 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4569 (linux-x86-low.o): Likewise.
4570 * server.h: Remove in_process_agent_loaded.
4571 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4572 common/agent.c.
4573 Update callers.
4574
8ffcbaaf
YQ
45752012-03-03 Yao Qi <yao@codesourcery.com>
4576
4577 * tracepoint.c (gdb_agent_capability): New global.
4578 (in_process_agent_loaded_ust): Renamed to
4579 `in_process_agent_supports_ust'.
4580 Update callers.
4581 (in_process_agent_supports_ust): Call agent_capability_check.
4582 (clear_installed_tracepoints): Assert that agent supports
4583 agent.
4584
d1feda86
YQ
45852012-03-03 Yao Qi <yao@codesourcery.com>
4586
4587 * linux-low.c (linux_supports_agent): New.
4588 (linux_target_ops): Initialize field `supports_agent' with
4589 linux_supports_agent.
4590 * target.h (struct target_ops) <supports_agent>: New.
4591 (target_supports_agent): New macro.
4592 * server.c (handle_general_set): Handle packet 'QAgent'.
4593 (handle_query): Send `QAgent+'.
4594 * Makefile.in (server.o): Depends on agent.h.
4595
2fa291ac
YQ
45962012-03-03 Yao Qi <yao@codesourcery.com>
4597
4598 * Makefile.in (OBS): Add agent.o.
4599 Add new rule for agent.o.
4600 Track dependence of tracepoint.c on agent.h.
4601 * tracepoint.c (run_inferior_command_1):
4602 (run_inferior_command): Call agent_run_command.
4603 (gdb_ust_connect_sync_socket): Deleted. Move it to
4604 common/agent.c.
4605 (resume_thread, stop_thread): Likewise.
4606 (gdb_ust_socket_init): Renamed to ...
4607 (gdb_agent_socket_init): ... New.
4608 (gdb_ust_thread): Renamed to ...
4609 (gdb_agent_helper_thread): ... New.
4610 (gdb_ust_init): Move some code to ...
4611 (gdb_agent_init): ... here. New.
4612 [HAVE_UST]: Call gdb_ust_init.
4613 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4614 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4615 * config.in, configure: Regenerated.
4616
05044653
PA
46172012-03-02 Pedro Alves <palves@redhat.com>
4618
4619 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4620 * linux-low.c (struct simple_pid_list): New.
4621 (stopped_pids): New a struct simple_pid_list pointer.
4622 (add_to_pid_list, pull_pid_from_list): New.
4623 (handle_extended_wait): Don't assume the first signal new children
4624 report is SIGSTOP. Adjust call to pull_pid_from_list.
4625 (linux_wait_for_lwp): Adjust.
4626
8d00225b
YQ
46272012-03-02 Yao Qi <yao@codesourcery.com>
4628
4629 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4630 debug log.
4631
19560ba5
YQ
46322012-03-02 Yao Qi <yao@codesourcery.com>
4633
4634 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4635 `stop_pc' and `tpoint'. Update caller.
4636
1faeff08
MR
46372012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4638
4639 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4640 * linux-low.c (use_linux_regsets): New macro.
4641 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4642 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4643 (linux_register_in_regsets): New function.
4644 (usr_fetch_inferior_registers): Skip registers covered by
4645 regsets.
4646 (usr_store_inferior_registers): Likewise.
4647 (usr_fetch_inferior_registers): New macro.
4648 (usr_store_inferior_registers): Likewise.
4649 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4650 (linux_store_registers): Likewise.
4651 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4652 prototype.
4653 (init_registers_mips64_dsp_linux): Likewise.
4654 (init_registers_mips_linux): New macro.
4655 (init_registers_mips_dsp_linux): Likewise.
4656 (mips_dsp_num_regs): Likewise.
4657 (DSP_BASE, DSP_CONTROL): New fallback macros.
4658 (mips_base_regs): New macro.
4659 (mips_regmap): Use it. Fix the size.
4660 (mips_dsp_regmap): New variable.
4661 (mips_dsp_regset_bitmap): Likewise.
4662 (mips_arch_setup): New function.
4663 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4664 than mips_regmap.
4665 (mips_cannot_store_register): Likewise.
4666 (the_low_target): Update .arch_setup, .num_regs and .regmap
4667 initializers. Add .regset_bitmap initializer.
4668 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4669 initializer.
4670 * linux-bfin-low.c (the_low_target): Likewise.
4671 * linux-cris-low.c (the_low_target): Likewise.
4672 * linux-crisv32-low.c (the_low_target): Likewise.
4673 * linux-ia64-low.c (the_low_target): Likewise.
4674 * linux-m32r-low.c (the_low_target): Likewise.
4675 * linux-m68k-low.c (the_low_target): Likewise.
4676 * linux-ppc-low.c (the_low_target): Likewise.
4677 * linux-s390-low.c (the_low_target): Likewise.
4678 * linux-sh-low.c (the_low_target): Likewise.
4679 * linux-sparc-low.c (the_low_target): Likewise.
4680 * linux-tic6x-low.c (the_low_target): Likewise.
4681 * linux-x86-low.c (the_low_target): Likewise.
4682 * linux-xtensa-low.c (the_low_target): Likewise.
4683 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4684 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4685 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4686 srv_xmlfiles.
4687 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4688 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4689
c03e6ccc
YQ
46902012-02-29 Yao Qi <yao@codesourcery.com>
4691 Pedro Alves <palves@redhat.com>
4692
4693 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4694 `step_over_finished' is true.
4695
644cebc9
PA
46962012-02-27 Pedro Alves <palves@redhat.com>
4697
4698 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4699 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4700
c14d7ab2
PA
47012012-02-27 Pedro Alves <palves@redhat.com>
4702
4703 PR server/9684
4704 * linux-low.c (pid_is_stopped): New.
4705 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4706
412c89dd
LM
47072012-02-25 Luis Machado <lgustavo@codesourcery.com>
4708
4709 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4710 of conditions.
4711
b745defe
MR
47122012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4713
4714 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4715
9f3a5c85
LM
47162012-02-24 Luis Machado <lgustavo@codesourcery>
4717
4718 * server.c (handle_query): Advertise support for target-side
4719 breakpoint condition evaluation.
4720 (process_point_options): New function.
4721 (process_serial_event): When inserting a breakpoint, check for
4722 a target-side condition that should be evaluated.
4723
4724 * mem-break.c: Include regcache.h and ax.h.
4725 (point_cond_list_t): New data structure.
4726 (breakpoint) <cond_list>: New field.
4727 (find_gdb_breakpoint_at): Make non-static.
4728 (delete_gdb_breakpoint_at): Clear any target-side
4729 conditions.
4730 (clear_gdb_breakpoint_conditions): New function.
4731 (add_condition_to_breakpoint): Likewise.
4732 (add_breakpoint_condition): Likewise.
4733 (gdb_condition_true_at_breakpoint): Likewise.
4734 (gdb_breakpoint_here): Return result directly instead
4735 of going through a local variable.
4736
4737 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4738 (clear_gdb_breakpoint_conditions): Likewise.
4739 (add_breakpoint_condition): Likewise.
4740 (gdb_condition_true_at_breakpoint): Likewise.
4741
4742 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4743 (need_step_over_p): Take target-side breakpoint condition into
4744 consideration.
4745
5e1dc496
LM
47462012-02-24 Luis Machado <lgustavo@codesourcery>
4747
4748 * server.h: Include tracepoint.h.
4749 (agent_mem_read, agent_get_trace_state_variable_value,
4750 agent_set_trace_state_variable_value,
4751 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4752 get_set_tsv_func_addr): New prototypes.
4753
4754 * ax.h: New include file.
4755 * ax.c: New source file.
4756
4757 * tracepoint.c: Include ax.h.
4758 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4759 agent_expr, eval_result_type): Move to ax.h.
4760 (parse_agent_expr): Rename to ...
4761 (gdb_parse_agent_expr): ... this, make it non-static and move
4762 to ax.h.
4763 (unparse_agent_expr) Rename to ...
4764 (gdb_unparse_agent_expr): ... this, make it non-static and move
4765 to ax.h.
4766 (eval_agent_expr): Rename to ...
4767 (eval_tracepoint_agent_expr): ... this.
4768 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4769 forward declarations.
4770 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4771 (agent_get_trace_state_variable_value): New function.
4772 (agent_set_trace_state_variable_value): New function.
4773 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4774 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4775 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4776 (condition_true_at_tracepoint): Likewise.
4777 (parse_agent_expr): Rename to ...
4778 (gdb_parse_agent_expr): ... this and move to ax.c.
4779 (unparse_agent_expr): Rename to ...
4780 (gdb_unparse_agent_expr): ... this and move to ax.c.
4781 (gdb_agent_op_name): Move to ax.c.
4782 (eval_agent_expr): Rename to ...
4783 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4784 and move to ax.c.
4785 (eval_tracepoint_agent_expr): New function.
4786 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4787 non-static.
5e1dc496
LM
4788 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4789 ax.c.
4790 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4791 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4792 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4793 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4794 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4795 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4796 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4797 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4798 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4799 (compile_bytecodes): Remove forward declaration.
4800 (is_goto_target): Move to ax.c.
4801 (compile_bytecodes): Move to ax.c and call
4802 agent_get_trace_state_variable_value (...) and
4803 agent_set_trace_state_variable_value (...).
4804
4805 * Makefile.in: Update ax.c and IPA dependencies.
4806
277e4e52
PA
48072012-02-24 Pedro Alves <palves@redhat.com>
4808
4809 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4810 (cmd_bigqtbuffer_circular): ... this. Only handle
4811 'QTBuffer:circular:'.
4812 (handle_tracepoint_general_set): Adjust.
4813
bf4c19f7
YQ
48142012-02-16 Yao Qi <yao@codesourcery.com>
4815
4816 * inferiors.c: Move code to ...
4817 * dll.c: .... here. New.
4818 * server.h: Declare clear_dlls.
4819 * Makefile.in (SFILES): Add dll.c.
4820 (OBS): Add dll.o
4821 (dll.o): New rule.
4822
d73f2619
YQ
48232012-02-11 Yao Qi <yao@codesourcery.com>
4824
4825 * server.c: (handle_monitor_command): Add a new parameter
4826 `own_buf'.
4827 (handle_query): Update caller.
4828
f8255c2a
JB
48292012-02-09 Joel Brobecker <brobecker@adacore.com>
4830
4831 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4832 * configure, config.in: Regenerate.
4833 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4834 is not defined.
4835
da84f473
PA
48362012-02-02 Pedro Alves <palves@redhat.com>
4837
4838 Try SIGKILL first, then PTRACE_KILL.
4839 * linux-low.c (linux_kill_one_lwp): New.
4840 (linux_kill_one_lwp): Rename to ...
4841 (kill_one_lwp_callback): ... this. Use the new
4842 linux_kill_one_lwp.
4843
e886a173
PA
48442012-02-02 Pedro Alves <palves@redhat.com>
4845
4846 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4847 inferior.
4848
be07f1a2
PA
48492012-01-27 Pedro Alves <palves@redhat.com>
4850
4851 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4852 (elf_64_file_p): Make static.
4853 (linux_pid_exe_is_elf_64_file): New.
4854 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4855 Delete declarations.
4856 (linux_pid_exe_is_elf_64_file): Declare.
4857 * linux-x86-low.c (x86_arch_setup): Use
4858 linux_pid_exe_is_elf_64_file.
4859
d8301ad1
JK
48602012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4861
4862 * linux-low.c (linux_wait_for_event_1): Rename to ...
4863 (linux_wait_for_event): ... here and merge it with former
4864 linux_wait_for_event - new variable wait_ptid, use it.
4865 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4866
01b17894
PA
48672012-01-23 Pedro Alves <palves@redhat.com>
4868
4869 * server.c (main): Avoid yet another case of infinite loop while
4870 detaching/killing after a longjmp.
4871
e825046f
JK
48722012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4873
4874 Code cleanup.
4875 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4876
b9e7b9c3
UW
48772012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4878
4879 * hostio.c (handle_readlink): New function.
4880 (handle_vFile): Call it to handle "vFile:readlink" packets.
4881
901f9912
UW
48822012-01-20 Pedro Alves <palves@redhat.com>
4883 Ulrich Weigand <ulrich.weigand@linaro.org>
4884
4885 * server.c (handle_v_requests): Only support vAttach and vRun to
4886 start multiple processes when in extended protocol mode.
4887
fc1ab1a0
PA
48882012-01-17 Pedro Alves <palves@redhat.com>
4889
4890 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4891 memalign plus mprotect to allocate the scratch buffer.
4892
7d5d4e98
PA
48932012-01-13 Pedro Alves <palves@redhat.com>
4894
4895 * server.c (attach_inferior): Clear `cont_thread'.
4896
f128d5e9
PA
48972012-01-13 Pedro Alves <palves@redhat.com>
4898
4899 * server.c (main): Avoid infinite loop while detaching/killing
4900 after a longjmp.
4901
06db92f0
DE
49022012-01-09 Doug Evans <dje@google.com>
4903
4904 * server.c (start_inferior): Set last_ptid in --wrapper case.
4905
32d92999
YQ
49062012-01-06 Yao Qi <yao@codesourcery.com>
4907
4908 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4909 defined.
4910 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4911
5e0a92a9
YQ
49122012-01-04 Yao Qi <yao@codesourcery.com>
4913
4914 * tracepoint.c (cmd_qtdp): Print debug message
4915 for static tracepoint.
4916
ae639e8c
YQ
49172012-01-04 Yao Qi <yao@codesourcery.com>
4918
4919 * tracepoint.c (trace_vdebug): Differentiate debug message
4920 between gdbserver and IPA.
4921
f72429c5
YQ
49222012-01-03 Yao Qi <yao@codesourcery.com>
4923
4924 * tracepoint.c (tracepoint_was_hit): Don't collect for
4925 static tracepoint.
4926
12c3e59c
JB
49272012-01-02 Joel Brobecker <brobecker@adacore.com>
4928
4929 * terminal.h: Reformat copyright header.
4930
67827812
JB
49312012-01-02 Joel Brobecker <brobecker@adacore.com>
4932
4933 * server.c (gdbserver_version): Update copyright year.
4934 * gdbreplay.c (gdbreplay_version): Likewise.
4935
3e52c33d
JK
49362011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4937
4938 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4939
4940 Revert:
4941 2011-12-18 Hui Zhu <teawater@gmail.com>
4942 * linux-low.c (linux_create_inferior): Save return value to ret.
4943
66f1260e
HZ
49442011-12-18 Hui Zhu <teawater@gmail.com>
4945
4946 * linux-low.c (linux_create_inferior): Save return value to ret.
4947
e77616d7
DE
49482011-12-16 Doug Evans <dje@google.com>
4949
e7b06c57
DE
4950 * linux-low.c (linux_create_inferior): If stdio connection,
4951 redirect stdin from /dev/null, stdout to stderr.
4952 * remote-utils.c (remote_is_stdio): New static global.
4953 (remote_connection_is_stdio): New function.
4954 (remote_prepare): Handle stdio connection.
4955 (remote_open): Ditto.
4956 (remote_close): Don't close stdin for stdio connections.
4957 (read_prim,write_prim): New functions. Replace all calls to
4958 read/write to these.
4959 * server.c (main): Watch for "-" argument. Move call to
4960 remote_prepare before start_inferior.
4961 * server.h (STDIO_CONNECTION_NAME): New macro.
4962 (remote_connection_is_stdio): Declare.
4963
e77616d7
DE
4964 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4965 in debugging output.
4966
82067193
YQ
49672011-12-15 Yao Qi <yao@codesourcery.com>
4968
4969 * tracepoint.c: Include sys/syscall.h.
4970 (gdb_ust_thread): Remove preprocessor conditional.
4971
82bfbe7e
PA
49722011-12-14 Pedro Alves <pedro@codesourcery.com>
4973
4974 * linux-low.c (linux_detach_one_lwp): Call
4975 the_low_target.prepare_to_resume before detaching.
4976
712c6575
YQ
49772011-12-14 Yao Qi <yao@codesourcery.com>
4978
4979 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4980 of write.
4981
d54d1edf
YQ
49822011-12-14 Yao Qi <yao@codesourcery.com>
4983
4984 * i386-low.c (i386_low_stopped_data_address): Initialize local
4985 variable `control'.
4986
6210a125
PA
49872011-12-13 Pedro Alves <pedro@codesourcery.com>
4988
4989 PR remote/13492
4990
4991 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4992 DR_CONTROL unless necessary. Extend comments.
4993 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4994 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4995
2ece8244
YQ
49962011-12-13 Yao Qi <yao@codesourcery.com>
4997
4998 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4999 macros.
5000 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5001
784867a5
JK
50022011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5003
5004 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5005 Print new debug message for such case.
5006
6bf36717
JK
50072011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5008
5009 Fix overlapping memcpy.
5010 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5011 the read_inferior_memory transfer.
5012 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5013 write_inferior_memory transfer.
5014 (set_fast_tracepoint_jump): New variable buf. Use it for the
5015 read_inferior_memory and write_inferior_memory transfers.
5016 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5017 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5018 Use it for the write_inferior_memory transfer.
5019 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5020 buffers.
5021
50275556
MR
50222011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5023
5024 * linux-low.c (fetch_register, store_register): Make code
5025 consistent, fix formatting.
5026
7325beb4
MR
50272011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5028
5029 * linux-low.c (usr_store_inferior_registers): Factor out code
5030 to handle individual registers into...
5031 (store_register): ... this new function.
5032
c642a434
UW
50332011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5034
5035 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5036 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5037 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5038 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5039 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5040 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5041 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5042 (srv_xmlfiles): Add new XML files.
5043
5044 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5045 and <sys/uio.h>.
5046 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5047 (init_registers_s390_linux32v1): Add prototype.
5048 (init_registers_s390_linux32v2): Likewise.
5049 (init_registers_s390_linux64v1): Likewise.
5050 (init_registers_s390_linux64v2): Likewise.
5051 (init_registers_s390x_linux64v1): Likewise.
5052 (init_registers_s390x_linux64v2): Likewise.
5053 (s390_num_regs): Increment to 52.
5054 (s390_regmap): Add orig_r2 register.
5055 (s390_num_regs_3264): Increment to 68.
5056 (s390_regmap_3264): Add orig_r2 register.
5057 (s390_collect_ptrace_register): Handle orig_r2 register.
5058 (s390_supply_ptrace_register): Likewise.
5059 (s390_fill_last_break): New function.
5060 (s390_store_last_break): Likewise.
5061 (s390_fill_system_call): New function.
5062 (s390_store_system_call): Likewise.
5063 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5064 register sets.
5065 (s390_check_regset): New function.
5066 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5067 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5068 Update target_regsets for available register sets.
5069
2268b414
JK
50702011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5071 Jan Kratochvil <jan.kratochvil@redhat.com>
5072
5073 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5074 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5075 New.
5076 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5077 * linux-low.h (struct process_info_private): New member r_debug.
5078 * server.c (handle_qxfer_libraries): Call
5079 the_target->qxfer_libraries_svr4.
5080 (handle_qxfer_libraries_svr4): New function.
5081 (qxfer_packets): New entry "libraries-svr4".
5082 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5083 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5084 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5085 PACKET_qXfer_libraries_svr4.
5086
d6db1fab
UW
50872011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5088
5089 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5090 PSW address/mask between 8-byte and 16-byte formats.
5091 (s390_supply_ptrace_register): Likewise.
5092 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5093 basic addressing mode bit.
5094
242f5f1c
SS
50952011-11-24 Stan Shebs <stan@codesourcery.com>
5096
5097 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5098
f196051f
SS
50992011-11-17 Stan Shebs <stan@codesourcery.com>
5100
5101 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5102 (tracing_start_time): New global.
5103 (tracing_stop_time): New global.
5104 (tracing_user_name): New global.
5105 (tracing_notes): New global.
5106 (tracing_stop_note): New global.
5107 (cmd_qtstart): Set traceframe_usage, start_time.
5108 (stop_tracing): Set stop_time.
5109 (cmd_qtstatus): Report additional status.
5110 (cmd_qtp): New function.
5111 (handle_tracepoint_query): Call it.
5112 (cmd_qtnotes): New function.
5113 (handle_tracepoint_general_set): Call it.
5114 (get_timestamp): Rename from tsv_get_timestamp.
5115
405f8e94
SS
51162011-11-14 Stan Shebs <stan@codesourcery.com>
5117 Kwok Cheung Yeung <kcy@codesourcery.com>
5118
5119 * linux-x86-low.c (small_jump_insn): New.
5120 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5121 trampoline and error message, build a trampoline and issue a small
5122 jump instruction to it.
5123 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5124 trampoline and error message.
5125 (x86_get_min_fast_tracepoint_insn_len): New.
5126 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5127 * linux-low.h (struct linux_target_ops): Add arguments to
5128 install_fast_tracepoint_jump_pad operation, add new operation.
5129 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5130 arguments.
5131 (linux_get_min_fast_tracepoint_insn_len): New function.
5132 (linux_target_op): Add new operation.
5133 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5134 (gdb_trampoline_buffer_end): Ditto.
5135 (gdb_trampoline_buffer_error): Ditto.
5136 (struct ipa_sym_addresses): Add fields for new IPA variables.
5137 (symbol_list): Add entries for new IPA variables.
5138 (struct tracepoint): Add fields to hold the address range of the
5139 trampoline used by the tracepoint.
5140 (trampoline_buffer_head): New static variable.
5141 (trampoline_buffer_tail): Ditto.
5142 (claim_trampoline_space): New function.
5143 (have_fast_tracepoint_trampoline_buffer): New function.
5144 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5145 structure.
5146 (install_fast_tracepoint): Ditto, also add error buffer argument.
5147 (cmd_qtminftpilen): New function.
5148 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5149 (fast_tracepoint_from_trampoline_address): New function.
5150 (fast_tracepoint_collecting): Handle trampoline as part of jump
5151 pad space.
5152 (set_trampoline_buffer_space): New function.
5153 (initialize_tracepoint): Initialize new IPA variables.
5154 * target.h (struct target_ops): Add arguments to
5155 install_fast_tracepoint_jump_pad operation, add new
5156 get_min_fast_tracepoint_insn_len operation.
5157 (target_get_min_fast_tracepoint_insn_len): New.
5158 (install_fast_tracepoint_jump_pad): Add arguments.
5159 * server.h (IPA_BUFSIZ): Define.
5160 * linux-i386-ipa.c: Include extra header files.
5161 (initialize_fast_tracepoint_trampoline_buffer): New function.
5162 (initialize_low_tracepoint): Call it.
5163 * server.h (set_trampoline_buffer_space): Declare.
5164 (claim_trampoline_space): Ditto.
5165 (have_fast_tracepoint_trampoline_buffer): Ditto.
5166
1e4d1764
YQ
51672011-11-14 Yao Qi <yao@codesourcery.com>
5168
5169 * server.c (handle_query): Handle InstallInTrace for qSupported.
5170 * tracepoint.c (add_tracepoint): Sort list.
5171 (install_tracepoint, download_tracepoint): New.
5172 (cmd_qtdp): Call them to install and download tracepoints.
5173 (sort_tracepoints): Removed.
5174 (cmd_qtstart): Update.
5175
5c73ff4e
YQ
51762011-11-14 Yao Qi <yao@codesourcery.com>
5177
5178 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5179 * mem-break.h: Declare.
5180 * tracepoint.c (cmd_qtstart): Move some code to ...
5181 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5182 New.
5183 (download_tracepoints): Move some code to ...
5184 (download_tracepoint_1): ... here. New.
5185
86a30030
YQ
51862011-11-08 Yao Qi <yao@codesourcery.com>
5187
5188 * remote-utils.c (relocate_instruction): A comment fix.
5189
8d26e50c
JB
51902011-11-07 Joel Brobecker <brobecker@adacore.com>
5191
5192 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5193 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5194 dr_status_mirror and dr_control_mirror from debug_reg_state.
5195 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5196 (i386_initial_stuff): Remove use of deleted globals.
5197 (i386_get_thread_context, i386_set_thread_context,
5198 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5199 from debug_reg_state.
5200
a59306a3
YQ
52012011-11-05 Yao Qi <yao@codesourcery.com>
5202
5203 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5204 address as TPOINT's.
5205
3065dfb6
SS
52062011-11-02 Stan Shebs <stan@codesourcery.com>
5207
5208 * tracepoint.c (agent_mem_read_string): New function.
5209 (eval_agent_expr): Call it for tracenz.
5210 * server.c (handle_query): Report support for tracenz.
5211
fd0d8c7c
YQ
52122011-11-02 Yao Qi <yao@codesourcery.com>
5213
5214 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5215
609086b1
YQ
52162011-11-02 Yao Qi <yao@codesourcery.com>
5217
5218 * target.h: Fix a typo in comment.
5219
b9fd1791
PA
52202011-10-31 Pedro Alves <pedro@codesourcery.com>
5221
5222 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5223 clobber the breakpoints' shadows with fast tracepoint jumps.
5224 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5225 * target.c (write_inferior_memory): Also pass MYADDR down to
5226 check_mem_write.
5227
03583c20
UW
52282011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5229
5230 * configure.ac: Check support for personality routine.
5231 * configure: Regenerate.
5232 * config.in: Likewise.
5233 * linux-low.c: Include <sys/personality.h>.
5234 Define ADDR_NO_RANDOMIZE if necessary.
5235 (linux_create_inferior): Disable address space randomization when
5236 forking inferior, if requested.
5237 (linux_supports_disable_randomization): New function.
5238 (linux_target_ops): Install it.
5239 * server.h (disable_randomization): Declare.
5240 * server.c (disable_randomization): New global variable.
5241 (handle_general_set): Handle QDisableRandomization.
5242 (handle_query): Likewise for qSupported.
5243 (main): Support --disable-randomization and --no-disable-randomization
5244 command line arguments.
5245 * target.h (struct target_ops): Add supports_disable_randomization.
5246 (target_supports_disable_randomization): New macro.
5247
723b724b
MF
52482011-09-29 Mike Frysinger <vapier@gentoo.org>
5249
5250 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5251 ifdef check.
5252 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5253 [!PT_GETDSBT] (target_loadmap): New definition.
5254 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5255 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5256 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5257 and PT_GETDSBT to LINUX_LOADMAP.
5258 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5259 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5260
55329a5c 52612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5262
5263 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5264 (arm_linux_hwbp_cap): New static variable.
5265 (arm_linux_get_hwbp_cap): Replace by ...
5266 (arm_linux_init_hwbp_cap): ... this new function.
5267 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5268 (arm_linux_get_hw_watchpoint_count): Likewise.
5269 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5270 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5271 (arm_prepare_to_resume): Use perror_with_name instead of error.
5272
55329a5c 52732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5274
5275 * linux-arm-low.c: Include <signal.h>.
5276 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5277 (struct arm_linux_hwbp_cap): New data type.
5278 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5279 (struct arm_linux_hw_breakpoint): New data type.
5280 (MAX_BPTS, MAX_WPTS): Define.
5281 (struct arch_process_info, struct arch_lwp_info): New data types.
5282 (arm_linux_get_hwbp_cap): New function.
5283 (arm_linux_get_hw_breakpoint_count): Likewise.
5284 (arm_linux_get_hw_watchpoint_count): Likewise.
5285 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5286 (arm_hwbp_control_initialize): Likewise.
5287 (arm_hwbp_control_is_enabled): Likewise.
5288 (arm_hwbp_control_is_initialized): Likewise.
5289 (arm_hwbp_control_disable): Likewise.
5290 (arm_linux_hw_breakpoint_equal): Likewise.
5291 (arm_linux_hw_point_initialize): Likewise.
5292 (struct update_registers_data): New data structure.
5293 (update_registers_callback: New function.
5294 (arm_insert_point): Likewise.
5295 (arm_remove_point): Likewise.
5296 (arm_stopped_by_watchpoint): Likewise.
5297 (arm_stopped_data_address): Likewise.
5298 (arm_new_process): Likewise.
5299 (arm_new_thread): Likewise.
5300 (arm_prepare_to_resume): Likewise.
5301 (the_low_target): Register arm_insert_point, arm_remove_point,
5302 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5303 arm_new_thread, and arm_prepare_to_resume.
5304
6b9801d4
SS
53052011-09-15 Stan Shebs <stan@codesourcery.com>
5306
5307 * server.h (struct emit_ops): Add compare-goto fields.
5308 * tracepoint.c (gdb_agent_op_sizes): New table.
5309 (emit_eq_goto): New function.
5310 (emit_ne_goto): New function.
5311 (emit_lt_goto): New function.
5312 (emit_le_goto): New function.
5313 (emit_gt_goto): New function.
5314 (emit_ge_goto): New function.
5315 (is_goto_target): New function.
5316 (compile_bytecodes): Recognize special cases of compare-goto
5317 combinations and call specialized emitters for them.
5318 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5319 (amd64_emit_ne_goto): New function.
5320 (amd64_emit_lt_goto): New function.
5321 (amd64_emit_le_goto): New function.
5322 (amd64_emit_gt_goto): New function.
5323 (amd64_emit_ge_goto): New function.
5324 (amd64_emit_ops): Add the new functions.
5325 (i386_emit_eq_goto): New function.
5326 (i386_emit_ne_goto): New function.
5327 (i386_emit_lt_goto): New function.
5328 (i386_emit_le_goto): New function.
5329 (i386_emit_gt_goto): New function.
5330 (i386_emit_ge_goto): New function.
5331 (i386_emit_ops): Add the new functions.
5332
bf15cbda
SS
53332011-09-08 Stan Shebs <stan@codesourcery.com>
5334
5335 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5336 (i386_emit_epilogue): Restore %ebx.
5337
943ca1dd
JZ
53382011-08-31 Jie Zhang <jzhang918@gmail.com>
5339
5340 * server.c (step_thread): Remove definition.
5341 (process_serial_event): Don't handle Hs.
5342 * server.h (step_thread): Remove declaration.
5343 * target.c (set_desired_inferior): Remove use of step_thread.
5344
e3deef73
LM
53452011-08-24 Luis Machado <lgustavo@codesourcery.com>
5346
5347 * linux-low.c: Include linux-procfs.h.
5348 (linux_attach_lwp_1): Update comments.
5349 (linux_attach): Scan for existing threads when attaching to a
5350 process that is the tgid.
5351 * Makefile.in: Update dependencies.
5352
13da1c97
LM
53532011-08-24 Luis Machado <lgustavo@codesourcery.com>
5354
5355 * configure.srv: Add linux-procfs.o dependencies.
5356
881127c9
YQ
53572011-08-14 Yao Qi <yao@codesourcery.com>
5358
5359 * target.h (struct target_ops): Fix indent.
5360 * win32-low.c (win32_target_ops): Fix comment.
5361
58dbd541
YQ
53622011-08-14 Andrew Jenner <andrew@codesourcery.com>
5363 Yao Qi <yao@codesourcery.com>
5364
5365 * Makefile.in (clean): Remove tic6x-*.c files.
5366 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5367 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5368 (tic6x-c64xp-linux.c): Likewise.
5369 * configure.srv: Add support for tic6x-*-uclinux.
5370 * linux-tic6x-low.c: New.
5371 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5372
78d85199
YQ
53732011-08-14 Andrew Stubbs <ams@codesourcery.com>
5374 Yao Qi <yao@codesourcery.com>
5375
5376 * target.h (struct target_ops): Add read_loadmap.
5377 * linux-low.c (struct target_loadseg): New type.
5378 (struct target_loadmap): New type.
5379 (linux_read_loadmap): New function.
5380 (linux_target_ops): Add linux_read_loadmap.
5381 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5382 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5383 to NULL.
78d85199 5384
a959a88d
EZ
53852011-08-05 Eli Zaretskii <eliz@gnu.org>
5386
5387 * win32-low.c: Include <stdint.h>.
5388
1ced966e
PA
53892011-07-22 Pedro Alves <pedro@codesourcery.com>
5390
5391 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5392 to the inferior here.
5393 (i386_remove_aligned_watchpoint): Ditto.
5394 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5395 fit part of the watchpoint in the debug registers.
5396 (i386_update_inferior_debug_regs): New.
5397 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5398 registers, and only update the inferior on success.
5399 (i386_low_remove_watchpoint): Ditto.
5400
d26e3629
KY
54012011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5402
5403 * linux-low.c (compare_ints, unique, list_threads, show_process,
5404 linux_core_of_thread): Delete.
5405 (linux_target_ops): Change linux_core_of_thread to
5406 linux_common_core_of_thread.
5407 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5408 * utils.c (malloc_failure): Change type of argument.
5409 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5410 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5411 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5412 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5413 (IPA_OBJS): Add common-utils-ipa.o.
5414 (ptid_h, linux_osdata_h): New macros.
5415 (server_h): Add common/common-utils.h, common/xml-utils.h,
5416 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5417 common/ptid.h.
5418 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5419 ptid.o, buffer.o): New rules.
5420 (linux-low.o): Add common/linux-osdata.h as a dependency.
5421 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5422 * configure.ac: Add AC_HEADER_DIRENT check.
5423 * config.in: Regenerate.
5424 * configure: Regenerate.
5425 * remote-utils.c (xml_escape_text): Delete.
5426 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5427 buffer_xml_printf): Move to common/buffer.c.
5428 * server.c (main): Remove call to initialize_inferiors.
5429 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5430 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5431 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5432 internal_error, gdb_assert, gdb_assert_fail): Delete.
5433 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5434 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5435 common/buffer.h.
5436 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5437 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5438 initialize_inferiors): Delete.
5439
2275a1a7
PA
54402011-07-20 Pedro Alves <pedro@codesourcery.com>
5441
5442 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5443 symbol error.
5444
0a5b1e09
PA
54452011-05-31 Pedro Alves <pedro@codesourcery.com>
5446
5447 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5448 assertion.
5449 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5450
6938fd34
YQ
54512011-05-26 Yao Qi <yao@codesourcery.com>
5452
5453 * Makefile.in (thread-db.o): Track dependence to
5454 common/gdb_thread_db.h.
5455 * thread-db.c: include gdb_thread_db.h from right place.
5456
b481f9e0
TT
54572011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5458
5459 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5460 __FILE__ and __LINE__ to internal_error.
5461
98a5dd13
DE
54622011-05-13 Doug Evans <dje@google.com>
5463
5464 * thread-db.c (try_thread_db_load_from_sdir): New function.
5465 (try_thread_db_load_from_dir): New function.
5466 (thread_db_load_search): Handle $sdir, ignore $pdir.
5467 Remove trying of system directories if search of
5468 libthread-db-search-path fails, that is now done via $sdir.
5469
d248b706
KY
54702011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5471
5472 * server.c (handle_query): Add EnableDisableTracepoints to the list
5473 of supported features.
43aaf8b6 5474 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5475 tracepoints.
43aaf8b6
PA
5476 (cmd_qtenable_disable): New.
5477 (cmd_qtstart): Install tracepoints even if disabled.
5478 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5479 receiving a QTEnable or QTDisable packet.
5480 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5481 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5482 tracepoints.
5483 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5484
84e578fb
DE
54852011-05-10 Doug Evans <dje@google.com>
5486
5487 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5488
71f55dd8
DE
54892011-05-04 Doug Evans <dje@google.com>
5490
5491 * linux-low.c (linux_join): Skip process lookup.
5492 * spu-low.c (spu_join): Ditto.
5493 * server.c (join_inferiors_callback): Delete.
5494 (process_serial_event): For 'D' packet (detach) call join_inferior
5495 directly.
5496
4d393d60
JM
54972011-05-04 Joseph Myers <joseph@codesourcery.com>
5498
5499 * README: Don't mention xscale*-*-linux*.
5500 * configure.srv (xscale*-*-linux*): Don't handle target.
5501
b00ad6ff
NF
55022011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5503
5504 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5505 casting pointers.
5506 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5507 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5508 (i386_emit_void_call_2): Likewise.
5509
af96c192
YQ
55102011-04-26 Yao Qi <yao@codesourcery.com>
5511
43aaf8b6
PA
5512 * linux-low.c: Move common macros to linux-ptrace.h.
5513 Include linux-ptrace.h.
af96c192
YQ
5514 * Makefile.in (linux_ptrace_h): New.
5515 (linux-low.o): Depends on linux-ptrace.h.
5516
03f2bd59
JK
55172011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5518
5519 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5520 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5521 (remote_prepare): New function with most of the TCP code from ...
5522 (remote_open): ... here. Detect PORT here unconditionally. Move also
5523 setting transport_is_reliable.
5524 * server.c (run_once): New variable.
5525 (gdbserver_usage): Document it.
5526 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5527 the first run if RUN_ONCE.
5528 * server.h (run_once, remote_prepare): New declarations.
5529
7a9dd1b2
TT
55302011-04-19 Tom Tromey <tromey@redhat.com>
5531
5532 * win32-low.c (handle_load_dll): Remove duplicate "the".
5533
81239425
PM
55342011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5535
5536 Remove support for old Cygwin 1.5 versions.
5537 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5538 function to avoid warning.
5539 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5540 warning.
5541
9e0627f1
PM
55422011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5543
5544 * gdbserver/server.h (Macro _): Define it if not available.
5545
588eebee
MS
55462011-03-14 Michael Snyder <msnyder@vmware.com>
5547
348af9f7 5548 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5549
43f70d4c
JB
55502011-03-10 Joel Brobecker <brobecker@adacore.com>
5551
5552 * Makefile.in (maintainer-clean realclean distclean): Remove
5553 "make ... subdir_do" command.
5554
348af9f7
MS
55552011-03-10 Michael Snyder <msnyder@vmware.com>
5556
5557 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5558
5559 * server.c (handle_v_run): Free alloced buffer on early return.
5560
e637a4f5
YQ
55612011-03-09 Yao Qi <yao@codesourcery.com>
5562
5563 Revert:
5564 2011-03-04 Yao Qi <yao@codesourcery.com>
5565
5566 * Makefile.in: Remove GNU make feature --directory.
5567
5568 2011-03-05 Yao Qi <yao@codesourcery.com>
5569
5570 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5571 (subdir_do): New make target. Copied from gdb/Makefile.
5572 (maintainer-clean, realclean, distclean, clean): Call corresponding
5573 make targets in common/Makefile.
5574
5575 2011-02-11 Yao Qi <yao@codesourcery.com>
5576
5577 * configure.ac: Call AC_PROG_RANLIB.
5578 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5579 * configure: Regenerate.
5580
e6edda56
JK
55812011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5582
5583 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5584
e5141119
JB
55852011-03-06 Yao Qi <yao@codesourcery.com>
5586
5587 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5588
64794aa4
JB
55892011-03-05 Yao Qi <yao@codesourcery.com>
5590
5591 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5592 (subdir_do): New make target. Copied from gdb/Makefile.
5593 (maintainer-clean, realclean, distclean, clean): Call corresponding
5594 make targets in common/Makefile.
5595
7a762829
YQ
55962011-03-04 Yao Qi <yao@codesourcery.com>
5597
5598 * Makefile.in: Remove GNU make feature --directory.
5599
348af9f7
MS
56002011-03-04 Michael Snyder <msnyder@vmware.com>
5601
5602 * server.c (queue_stop_reply): Call xmalloc not malloc.
5603
56042011-03-02 Michael Snyder <msnyder@vmware.com>
5605
5606 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5607
9f72fee2
MS
56082011-02-28 Michael Snyder <msnyder@vmware.com>
5609
588eebee
MS
5610 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5611 (cmd_qtframe): Ditto.
5612 (cmd_qtbuffer): Ditto.
5613 (cmd_bigqtbuffer): Ditto.
5614
9f72fee2
MS
5615 * utils.c (decimal2str): Initialize 'width' to nine, then
5616 don't mess with it.
5617
8040bd49
UW
56182011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5619
5620 * hostio.c (require_data): Free *data, not data.
5621
7e52cbd0
JK
56222011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5623
5624 * hostio.c (require_data): Use free, not xfree.
5625
9130f83e
MS
56262011-02-27 Michael Snyder <msnyder@vmware.com>
5627
4b812f4e
MS
5628 * server.c (handle_query): Discard unused value.
5629
9130f83e
MS
5630 * hostio.c (require_data): Free malloc memory before returning
5631 error.
5632
69d37113
MS
56332011-02-26 Michael Snyder <msnyder@vmware.com>
5634
5635 * linux-low.c (list_threads): Call closedir for dirent.
5636
35f5825a
MS
56372011-02-27 Michael Snyder <msnyder@vmware.com>
5638
2a589cef
MS
5639 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5640 a case statement falls through.
5641
0adea5f7
MS
5642 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5643
35f5825a
MS
5644 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5645 in comparison.
5646
238f1c74
MS
56472011-02-26 Michael Snyder <msnyder@vmware.com>
5648
5649 * utils.c (decimal2str): Eliminate dead code and dead param.
5650 (pulongest): Drop dead param from call to decimal2str.
5651 (plongest): Ditto.
5652
633ff500
JB
56532011-02-24 Joel Brobecker <brobecker@adacore.com>
5654
5655 Revert the following patch (not approved yet):
5656 2011-02-21 Hui Zhu <teawater@gmail.com>
5657 * tracepoint.c (tp_printf): New function.
5658 (eval_agent_expr): Handle gdb_agent_op_printf.
5659
f9c6ff72
HZ
56602011-02-21 Hui Zhu <teawater@gmail.com>
5661
5662 * tracepoint.c (tp_printf): New function.
5663 (eval_agent_expr): Handle gdb_agent_op_printf.
5664
94d5e490
TT
56652011-02-18 Tom Tromey <tromey@redhat.com>
5666
5667 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5668 (tracepoint.o): Likewise.
5669 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5670 (gdb_agent_op_names): Likewise.
5671
c7f96d2b
TT
56722011-02-18 Tom Tromey <tromey@redhat.com>
5673
5674 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5675 gdb_agent_op_rot>: New constants.
5676 (gdb_agent_op_names): Add pick and roll.
5677 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5678 cases.
5679
0feedb2c
JK
56802011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5681
5682 * aclocal.m4: Regenerated with aclocal-1.11.1.
5683
b3b9301e
PA
56842011-02-14 Pedro Alves <pedro@codesourcery.com>
5685
5686 * server.c (handle_qxfer_traceframe_info): New.
5687 (qxfer_packets): Register "traceframe-info".
5688 (handle_query): Report support for qXfer:traceframe-info:read+.
5689 * tracepoint.c (match_blocktype): New.
5690 (traceframe_find_block_type): Rename to ...
5691 (traceframe_walk_blocks): ... this. Add callback filter argument,
5692 and use it.
5693 (traceframe_find_block_type): New, reimplemented on top of
5694 traceframe_walk_blocks.
5695 (build_traceframe_info_xml): New.
5696 (traceframe_read_info): New.
5697 * server.h (traceframe_read_info): Declare.
5698
4f3e6fb7
YQ
56992011-02-11 Yao Qi <yao@codesourcery.com>
5700
5701 * configure.ac: Call AC_PROG_RANLIB.
5702 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5703 * configure: Regenerate.
5704
764880b7
PA
57052011-02-07 Pedro Alves <pedro@codesourcery.com>
5706
5707 * server.c (gdb_read_memory): Change return semantics to allow
5708 partial transfers.
5709 (handle_search_memory_1): Adjust.
5710 (process_serial_event) <'m' packet>: Handle partial transfers.
5711 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5712
1c79eb8a
PA
57132011-01-28 Pedro Alves <pedro@codesourcery.com>
5714
5715 * regcache.c (init_register_cache): Initialize
5716 regcache->register_status.
5717 (free_register_cache): Release regcache->register_status.
5718 (regcache_cpy): Copy register_status.
5719 (registers_to_string): Print 'x's for unavailable registers.
5720 (supply_register): Mark the register's status valid or
5721 unavailable, depending on whether a buffer was passed in or not.
5722 (supply_register_zeroed): New.
5723 (supply_regblock): Mark the registers' status valid or
5724 unavailable, depending on whether a buffer was passed in or not.
5725 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5726 (struct regcache): New `register_status' field.
5727 (supply_register_zeroed): Declare.
5728 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5729 supply_register_zeroed, rather than passing a NULL buffer to
5730 supply_register.
5731 * tracepoint.c (fetch_traceframe_registers): Update comment.
5732
85724a0e
PA
57332011-01-28 Pedro Alves <pedro@codesourcery.com>
5734
5735 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5736 buffer explicit.
5737
d08aafef
PA
57382011-01-25 Pedro Alves <pedro@codesourcery.com>
5739
5740 * server.h (decode_xfer_write): Change prototype.
5741 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5742 and don't extract the annex here.
5743 * server.c (decode_xfer_read): Remove `annex' parameter,
5744 and don't extract the annex here.
5745 (decode_xfer): New.
5746 (struct qxfer): New.
5747 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5748 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5749 (handle_qxfer_statictrace): New functions, abstracted out from
5750 handle_query, and made to use the struct qxfer interface.
5751 (handle_threads_qxfer_proper): Rename to ...
5752 (handle_qxfer_threads_proper): ... this.
5753 (handle_threads_qxfer): Rename to ...
5754 (handle_qxfer_threads): ... this. Adjust.
5755 (qxfer_packets): New array.
5756 (handle_qxfer): New function.
5757 (handle_query): Use handle_qxfer.
5758
493e2a69
MS
57592011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5760
5761 * gdbreplay.c: Shorten lines of >= 80 columns.
5762 * linux-low.c: Ditto.
5763 * linux-ppc-low.c: Ditto.
5764 * linux-s390-low.c: Ditto.
5765 * linux-sparc-low.c: Ditto.
5766 * linux-x86-low.c: Ditto.
5767 * linux-xtensa-low.c: Ditto.
5768 * mem-break.c: Ditto.
5769 * nto-low.c: Ditto.
5770 * regcache.h: Ditto.
5771 * remote-utils.c: Ditto.
5772 * server.c: Ditto.
5773 * server.h: Ditto.
5774 * thread-db.c: Ditto.
5775 * tracepoint.c: Ditto.
5776 * utils.c: Ditto.
5777 * win32-low.h: Ditto.
5778
44944448
JB
57792011-01-05 Joel Brobecker <brobecker@adacore.com>
5780
5781 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5782 update.
5783
71ce852c
JB
57842011-01-01 Joel Brobecker <brobecker@adacore.com>
5785
5786 * server.c (gdbserver_version): Update copyright year in version
5787 output.
5788 * gdbreplay.c (gdbreplay_version): Ditto.
5789
eb826dc6
MF
57902010-12-29 Jie Zhang <jie.zhang@analog.com>
5791
5792 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5793 * linux-bfin-low.c: New file.
5794 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5795 PT_DATA_ADDR for BFIN targets.
5796 * Makefile.in (SFILES): Add linux-bfin-low.c.
5797 (clean): Remove reg-bfin.c.
5798 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5799 * README: Mention supported Blackfin targets.
5800
39ab222a
MF
58012010-12-23 Mike Frysinger <vapier@gentoo.org>
5802
5803 * .gitignore: New file.
5804
a1f2ce7d
MF
58052010-11-16 Mike Frysinger <vapier@gentoo.org>
5806
5807 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5808
f474844c
JZ
58092010-10-22 Jie Zhang <jie@codesourcery.com>
5810
5811 * Makefile.in: Add FLAGS_TO_PASS variable.
5812 (install): Remove dependency of install-only and recursively
5813 invoke make for install-only.
5814
f1048712
DE
58152010-10-04 Doug Evans <dje@google.com>
5816
5817 * Makefile.in (uninstall): Use $(DESTDIR).
5818
b53a1623
PA
58192010-09-24 Pedro Alves <pedro@codesourcery.com>
5820
e6ee044d
PA
5821 PR gdb/11842
5822
b53a1623
PA
5823 * linux-x86-low.c (compat_siginfo_from_siginfo)
5824 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5825 si_code is < 0. Check for si_code == SI_TIMER before checking for
5826 si_code < 0.
5827
fa1bd1e4
JB
58282010-09-13 Joel Brobecker <brobecker@adacore.com>
5829
5830 * lynx-i386-low.c: New file.
5831 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5832
47fac8f8
JB
58332010-09-13 Joel Brobecker <brobecker@adacore.com>
5834
5835 * lynx-low.c (ptrace_request_to_str): Remove handling for
5836 request values that have been removed in LynxOS 5.x.
5837
1adfc54d
JB
58382010-09-13 Joel Brobecker <brobecker@adacore.com>
5839
5840 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5841 <ptrace.h>
5842
c2a66c29
NS
58432010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5844
5845 * configure.ac: Add --enable-inprocess-agent option.
5846 * configure: Rebuilt.
5847
32fcada3
YQ
58482010-09-06 Yao Qi <yao@codesourcery.com>
5849
5850 * linux-low.c (linux_kill): Remove unused variable.
5851 (linux_stabilize_threads): Likewise.
5852 * server.c (start_inferior): Likewise.
5853 (queue_stop_reply_callback): Likewise.
5854 * tracepoint.c (do_action_at_tracepoint): Likewise.
5855
0cccb683
YQ
58562010-09-06 Yao Qi <yao@codesourcery.com>
5857
5858 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5859 on return.
5860
423ec54c
JK
58612010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5862
5863 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5864
12ac6819
PA
58652010-09-06 Pedro Alves <pedro@codesourcery.com>
5866
5867 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5868 "$(IPA_DEPFILES)".
5869
8ed54b31
JB
58702010-09-01 Joel Brobecker <brobecker@adacore.com>
5871
5872 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5873 gdbserver/lynx-ppc-low.c: New files.
5874 * Makefile.in (lynx_low_h): New variable.
5875 (lynx-low.o, lynx-ppc-low.o): New rules.
5876 * configure.ac: On LynxOS, link with -lnetinet.
5877 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5878 * configure: regenerate.
5879
bb0116a4
JB
58802010-09-01 Joel Brobecker <brobecker@adacore.com>
5881
5882 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5883 * configure.ac: Add check for vasprintf and vsnprintf.
5884 * configure, config.in: Regenerate.
5885 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5886
a778ab81 58872010-09-01 Joel Brobecker <brobecker@adacore.com>
5888
5889 * gdbreplay.c: Move include of alloca.h up, next to include of
5890 malloc.h.
5891 * server.h: Add include of malloc.h.
5892 * mem-break.c: Remove include of malloc.h.
5893 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5894
8b034a19 58952010-09-01 Joel Brobecker <brobecker@adacore.com>
5896
5897 * Makefile.in (memmem.o): Build with -Wno-error.
5898
58992010-09-01 Joel Brobecker <brobecker@adacore.com>
5900
5901 * utils.c (xsnprintf): Make non-static.
5902 * server.h: Add xsnprintf declaration.
5903 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5904 replace calls to snprintf by calls to xsnprintf throughout.
5905
59062010-09-01 Joel Brobecker <brobecker@adacore.com>
5907
5908 * configure.ac: Add configure check for alloca.
5909 * configure, config.in: Regenerate.
5910 * server.h: Include alloca.h if it exists.
5911 * gdbreplay.c: Include alloca.h if it exists.
5912
1a981360
PA
59132010-08-28 Pedro Alves <pedro@codesourcery.com>
5914
5915 * linux-low.c (__SIGRTMIN): Define if not already defined.
5916 (linux_create_inferior): Check for __ANDROID__ rather than
5917 __SIGRTMIN.
5918 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5919 are already deferred.
5920 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5921 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5922 stopped and already has a pending signal to report.
5923 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5924 a pending signal to report or is moving out of a jump pad.
5925 (linux_init_signals): Check for __ANDROID__ rather than
5926 __SIGRTMIN.
5927
b4d51a55
PA
59282010-08-28 Pedro Alves <pedro@codesourcery.com>
5929
5930 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5931 debug_threads check. Avoid a linear search when not doing debug
5932 output.
5933
ec48365d
PA
59342010-08-27 Pedro Alves <pedro@codesourcery.com>
5935
5936 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5937 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5938 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5939 (process_event): Change local fd's type to gdb_fildes_t.
5940 (create_file_handler): Adjust prototype.
5941 (delete_file_handler): Adjust prototype.
5942 (handle_file_event): Adjust prototype. Use pfildes.
5943 (create_file_event): Adjsut prototype.
5944 * remote-utils.c (remote_desc, listen_desc): Change type to
5945 gdb_fildes_t.
5946 * server.h: New gdb_fildes_t typedef.
5947 [USE_WIN32API]: Include winsock2.h.
5948 (delete_file_handler, add_file_handler): Adjust prototypes.
5949 (pfildes): Declare.
5950 * utils.c (pfildes): New.
5951
854d88f0
PA
59522010-08-27 Pedro Alves <pedro@codesourcery.com>
5953
5954 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5955 * configure: Regenerate.
5956
0146f85b
PA
59572010-08-27 Pedro Alves <pedro@codesourcery.com>
5958
5959 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5960 (linux_done_accessing_memory): ... this.
5961 (linux_target_ops): Adjust.
5962 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5963 * nto-low.c (nto_target_ops): Adjust comment.
5964 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5965 * spu-low.c (spu_target_ops): Adjust comment.
5966 * target.h (target_ops): Rename unprepare_to_access_memory field
5967 to done_accessing_memory.
5968 (unprepare_to_access_memory): Rename to ...
5969 (done_accessing_memory): ... this.
5970
90d74c30
PA
59712010-08-26 Pedro Alves <pedro@codesourcery.com>
5972
5973 * linux-low.c (linux_prepare_to_access_memory): New.
5974 (linux_unprepare_to_access_memory): New.
5975 (linux_target_ops): Install them.
5976 * server.c (read_memory): Rename to ...
5977 (gdb_read_memory): ... this. Use
5978 prepare_to_access_memory/prepare_to_access_memory.
5979 (write_memory): Rename to ...
5980 (gdb_write_memory): ... this. Use
5981 prepare_to_access_memory/prepare_to_access_memory.
5982 (handle_search_memory_1): Adjust.
5983 (process_serial_event): Adjust.
5984 * target.h (struct target_ops): New fields
5985 prepare_to_access_memory and unprepare_to_access_memory.
5986 (prepare_to_access_memory, unprepare_to_access_memory): New.
5987 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5988 prepare_to_access_memory/prepare_to_access_memory.
5989 * nto-low.c (nto_target_ops): Adjust.
5990 * spu-low.c (spu_target_ops): Adjust.
5991 * win32-low.c (win32_target_ops): Adjust.
5992
fd467969
PA
59932010-08-26 Pedro Alves <pedro@codesourcery.com>
5994
5995 * Makefile.in (WARN_CFLAGS): Get it from configure.
5996 (WERROR_CFLAGS): New.
5997 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5998 * configure.ac: Introduce --enable-werror, which adds -Werror to
5999 the compiler command line. Enabled by default. Disable with
6000 --disable-werror. Add -Wdeclaration-after-statement
6001 Wpointer-arith and -Wformat-nonliteral to warning flags.
6002 * configure: Regenerate.
6003
331e2f5f
PA
60042010-08-26 Pedro Alves <pedro@codesourcery.com>
6005
6006 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6007
e581f2b4
PA
60082010-08-26 Pedro Alves <pedro@codesourcery.com>
6009
6010 * gdbreplay.c (remote_error): New.
6011 (gdbchar): New.
6012 (expect): Use gdbchar. Check for error reading from GDB.
6013 Clarify sync error output.
6014 (play): Check for errors writing to GDB.
6015 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6016 * remote-utils.c (getpkt): Check for errors writing to the remote
6017 descriptor.
6018
3c11dd79
PA
60192010-08-25 Pedro Alves <pedro@codesourcery.com>
6020
6021 * linux-low.c (linux_wait_1): Move non-debugging code out of
6022 `debug_threads' control.
6023
d20a8ad9
PA
60242010-08-25 Pedro Alves <pedro@codesourcery.com>
6025
6026 * linux-low.c (linux_wait_1): Don't set last_status here.
6027 * server.c (push_event, queue_stop_reply_callback): Assert we're
6028 not pushing a TARGET_WAITKIND_IGNORE event.
6029 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6030 (myresume, handle_target_event): Set the thread's last_resume_kind
6031 and last_status from the target returned status.
6032
964e4306
PA
60332010-08-25 Pedro Alves <pedro@codesourcery.com>
6034
6035 PR threads/10729
6036
6037 * linux-x86-low.c (update_debug_registers_callback): New.
6038 (i386_dr_low_set_addr): Use it.
6039 (i386_dr_low_get_addr): New.
6040 (i386_dr_low_set_control): Use update_debug_registers_callback.
6041 (i386_dr_low_get_control): New.
6042 (i386_dr_low_get_status): Adjust.
6043 * linux-low.c (linux_stop_lwp): New.
6044 * linux-low.h (linux_stop_lwp): Declare.
6045
6046 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6047 argument instead of a i386_debug_reg_state.
6048 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6049 a i386_debug_reg_state.
6050 (i386_insert_aligned_watchpoint): Adjust.
6051 (i386_remove_aligned_watchpoint): Adjust.
6052 (i386_low_stopped_data_address): Read the debug registers from the
6053 inferior instead of from the mirrors.
6054 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6055 (i386_dr_low_get_addr): Declare.
6056 (i386_dr_low_get_control): Declare.
6057 (i386_dr_low_get_status): Change prototype.
6058
6059 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6060 (i386_dr_low_get_addr): New.
6061 (i386_dr_low_get_control): New.
6062 (i386_dr_low_get_status): Adjust prototype. Return
6063 dr_status_mirror.
6064 (i386_initial_stuff): Clear dr_status_mirror and
6065 dr_control_mirror.
6066 (i386_get_thread_context): Adjust.
6067 (i386_set_thread_context): Adjust.
6068 (i386_thread_added): Adjust.
6069
5f21a75b
PA
60702010-08-24 Pedro Alves <pedro@codesourcery.com>
6071
6072 * linux-low.h (linux_thread_area): Delete declaration.
6073
3e4c1235
TS
60742010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6075
6076 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6077 after its termination.
6078
1971b033
PA
60792010-08-09 Pedro Alves <pedro@codesourcery.com>
6080
6081 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6082 (gdb_wants_all_stopped): Delete.
6083 (linux_wait_1): Don't call them.
6084 * server.c (handle_v_cont): Tag all threads as want-stopped.
6085 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6086 stopped as "client-wants-stopped".
6087
310444ac
PA
60882010-07-31 Pedro Alves <pedro@codesourcery.com>
6089
6090 * Makefile.in (signals_h): New.
6091 (server_h): Depend on it.
6092 (server.o): Don't depend on $(signals_def).
6093 (signals.o): Depend on $(signals_def).
6094
a19cae16
JK
60952010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6096
6097 * Makefile.in (signals_def): New.
6098 (server_h): Append include/gdb/signals.h and signals_def.
6099 (server.o): Append signals_def.
6100
30d50328
JK
61012010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6102
6103 * server.c (handle_target_event): Use target_signal_to_host for
6104 resume_info.sig initialization.
6105 * target.h (struct thread_resume) <sig>: New comment.
6106
5c3216e2
OS
61072010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6108
c6f46ca0
OS
6109 * server.c (handle_query): strcpy() the returned string from paddress()
6110 instead of sprintf().
5c3216e2
OS
6111 * utils.c (paddress): Return phex_nz().
6112
6bd31874
JB
61132010-07-07 Joel Brobecker <brobecker@adacore.com>
6114
6115 * server.c (handle_v_cont): Call mourn_inferior if process
6116 just exited.
6117 (myresume): Likewise.
6118
0fb4aa4b
PA
61192010-07-01 Pedro Alves <pedro@codesourcery.com>
6120
6121 Static tracepoints, and integration with UST.
6122
6123 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6124 * mem-break.c (uninsert_all_breakpoints)
6125 (reinsert_all_breakpoints): New.
6126 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6127 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6128 (gdb_agent_ust_loaded, helper_thread_id)
6129 (gdb_agent_helper_thread_id): New macros.
6130 (struct ipa_sym_addresses): Add addr_ust_loaded,
6131 addr_helper_thread_id, addr_cmd_buf.
6132 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6133 (in_process_agent_loaded_ust): New.
6134 (write_e_ust_not_loaded): New.
6135 (maybe_write_ipa_ust_not_loaded): New.
6136 (struct collect_static_trace_data_action): New.
6137 (enum tracepoint_type) <static_tracepoint>: New.
6138 (struct tracepoint) <handle>: Mention static tracepoints.
6139 (struct static_tracepoint_ctx): New.
6140 (CMD_BUF_SIZE): New.
6141 (add_tracepoint_action): Handle static tracepoint actions.
6142 (unprobe_marker_at): New.
6143 (clear_installed_tracepoints): Handle static tracepoints.
6144 (cmd_qtdp): Handle static tracepoints.
6145 (probe_marker_at): New.
6146 (cmd_qtstart): Handle static tracepoints.
6147 (response_tracepoint): Handle static tracepoints.
6148 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6149 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6150 (get_context_regcache): Handle static tracepoints.
6151 (do_action_at_tracepoint): Handle static tracepoint actions.
6152 (traceframe_find_block_type): Handle static trace data blocks.
6153 (traceframe_read_sdata): New.
6154 (download_tracepoints): Download static tracepoint actions.
6155 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6156 (GDB_PROBE_NAME): New.
6157 (ust_ops): New.
6158 (GET_UST_SYM): New.
6159 (USTF): New.
6160 (dlsym_ust): New.
6161 (ust_marker_to_static_tracepoint): New.
6162 (gdb_probe): New.
6163 (collect_ust_data_at_tracepoint): New.
6164 (gdb_ust_probe): New.
6165 (UNIX_PATH_MAX, SOCK_DIR): New.
6166 (gdb_ust_connect_sync_socket): New.
6167 (resume_thread, stop_thread): New.
6168 (run_inferior_command): New.
6169 (init_named_socket): New.
6170 (gdb_ust_socket_init): New.
6171 (cstr_to_hexstr): New.
6172 (next_st): New.
6173 (first_marker, next_marker): New.
6174 (response_ust_marker): New.
6175 (cmd_qtfstm, cmd_qtsstm): New.
6176 (unprobe_marker_at, probe_marker_at): New.
6177 (cmd_qtstmat, gdb_ust_thread): New.
6178 (gdb_ust_init): New.
6179 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6180 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6181 (ST_REGENTRY): New.
6182 (x86_64_st_collect_regmap): New.
6183 (X86_64_NUM_ST_COLLECT_GREGS): New.
6184 (AMD64_RIP_REGNUM): New.
6185 (supply_static_tracepoint_registers): New.
6186 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6187 (ST_REGENTRY): New.
6188 (i386_st_collect_regmap): New.
6189 (i386_NUM_ST_COLLECT_GREGS): New.
6190 (supply_static_tracepoint_registers): New.
6191 * server.c (handle_query): Handle qXfer:statictrace:read.
6192 <qSupported>: Report support for StaticTracepoints, and
6193 qXfer:statictrace:read features.
6194 * server.h (traceframe_read_sdata)
6195 (supply_static_tracepoint_registers): Declare.
6196 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6197 (unpack_varlen_hex): Include in IPA build.
6198 * Makefile.in (ustlibs, ustinc): New.
6199 (IPA_OBJS): Add remote-utils-ipa.o.
6200 ($(IPA_LIB)): Link -ldl and -lpthread.
6201 (UST_CFLAGS): New.
6202 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6203 * config.in, configure: Regenerate.
6204
9e4344e5
PA
62052010-06-20 Ian Lance Taylor <iant@google.com>
6206 Pedro Alves <pedro@codesourcery.com>
6207
6208 * linux-x86-low.c (always_true): Delete.
6209 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6210 trying to fool the compiler with always_true.
6211
c6beb2cb
PA
62122010-06-20 Pedro Alves <pedro@codesourcery.com>
6213
6214 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6215 conditions in gdbserver.
6216
d2ed6730
UW
62172010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6218
6219 * spu-low.c (spu_read_memory): Wrap around local store limit.
6220 (spu_write_memory): Likewise.
6221
4e29fb54
PA
62222010-06-15 Pedro Alves <pedro@codesourcery.com>
6223
6224 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6225 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6226 LONGEST uses.
6227 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6228 uses.
6229 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6230 uses with LONGEST uses.
6231
6a271cae
PA
62322010-06-14 Stan Shebs <stan@codesourcery.com>
6233 Pedro Alves <pedro@codesourcery.com>
6234
6235 Bytecode compiler.
6236
6237 * linux-x86-low.c: Include limits.h.
6238 (add_insns): New.
6239 (always_true): New.
6240 (EMIT_ASM): New.
6241 (EMIT_ASM32): New.
6242 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6243 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6244 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6245 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6246 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6247 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6248 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6249 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6250 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6251 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6252 (amd64_emit_void_call_2): New.
6253 (amd64_emit_ops): New.
6254 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6255 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6256 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6257 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6258 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6259 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6260 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6261 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6262 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6263 (i386_emit_stack_adjust, i386_emit_int_call_1)
6264 (i386_emit_void_call_2): New.
6265 (i386_emit_ops): New.
6266 (x86_emit_ops): New.
6267 (the_low_target): Install x86_emit_ops.
6268 * server.h (struct emit_ops): New.
6269 (get_raw_reg_func_addr): Declare.
6270 (current_insn_ptr, emit_error): Declare.
6271 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6272 (set_trace_state_variable_value): New defines.
6273 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6274 addr_get_trace_state_variable_value and
6275 addr_set_trace_state_variable_value.
6276 (symbol_list): New fields for get_raw_reg,
6277 get_trace_state_variable_value and set_trace_state_variable_value.
6278 (condfn): New typedef.
6279 (struct tracepoint): New field `compiled_cond'.
6280 (do_action_at_tracepoint): Clear compiled_cond.
6281 (get_trace_state_variable_value, set_trace_state_variable_value):
6282 Export in the IPA.
6283 (condition_true_at_tracepoint): If there's a compiled condition,
6284 run that.
6285 (current_insn_ptr, emit_error): New globals.
6286 (struct bytecode_address): New.
6287 (get_raw_reg_func_addr): New.
6288 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6289 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6290 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6291 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6292 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6293 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6294 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6295 (compile_tracepoint_condition, compile_bytecodes): New.
6296 * target.h (emit_ops): Forward declare.
6297 (struct target_ops): New field emit_ops.
6298 (target_emit_ops): New.
6299 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6300 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6301 * linux-low.c (linux_emit_ops): New.
6302 (linux_target_ops): Install it.
6303 * linux-low.h (struct linux_target_ops): New field emit_ops.
6304
92b72907
UW
63052010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6306
6307 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6308 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6309
fa593d66
PA
63102010-06-01 Pedro Alves <pedro@codesourcery.com>
6311 Stan Shebs <stan@codesourcery.com>
6312
6313 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6314 (all): Depend on $(extra_libraries).
6315 (install-only): Install the IPA.
6316 (IPA_OBJS, IPA_LIB): New.
6317 (clean): Remove the IPA lib.
6318 (IPAGENT_CFLAGS): New.
6319 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6320 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6321 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6322 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6323 * configure.ac: Check for atomic builtins support in the compiler.
6324 (IPA_DEPFILES, extra_libraries): Define.
6325 * configure.srv (ipa_obj): Add description.
6326 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6327 (i[34567]86-*-linux*): Set ipa_obj.
6328 (x86_64-*-linux*): Set ipa_obj.
6329 * linux-low.c (stabilizing_threads): New.
6330 (supports_fast_tracepoints): New.
6331 (linux_detach): Stabilize threads before detaching.
6332 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6333 the lwp is either not stabilizing, or is moving out of a jump pad.
6334 (linux_fast_tracepoint_collecting): New.
6335 (maybe_move_out_of_jump_pad): New.
6336 (enqueue_one_deferred_signal): New.
6337 (dequeue_one_deferred_signal): New.
6338 (linux_wait_for_event_1): If moving out of a jump pad, defer
6339 pending signals to later.
6340 (linux_stabilize_threads): New.
6341 (linux_wait_1): Check if threads need moving out of jump pads, and
6342 do it if so.
6343 (stuck_in_jump_pad_callback): New.
6344 (move_out_of_jump_pad_callback): New.
6345 (lwp_running): New.
6346 (linux_resume_one_lwp): Handle moving out of jump pads.
6347 (linux_set_resume_request): Dequeue deferred signals.
6348 (need_step_over_p): Also step over fast tracepoint jumps.
6349 (start_step_over): Also uninsert fast tracepoint jumps.
6350 (finish_step_over): Also reinsert fast tracepoint jumps.
6351 (linux_install_fast_tracepoint_jump): New.
6352 (linux_target_ops): Install linux_stabilize_threads and
6353 linux_install_fast_tracepoint_jump_pad.
6354 * linux-low.h (linux_target_ops) <get_thread_area,
6355 install_fast_tracepoint_jump_pad>: New fields.
6356 (struct lwp_info) <collecting_fast_tracepoint,
6357 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6358 (linux_get_thread_area): Declare.
6359 * linux-x86-low.c (jump_insn): New.
6360 (x86_get_thread_area): New.
6361 (append_insns): New.
6362 (push_opcode): New.
6363 (amd64_install_fast_tracepoint_jump_pad): New.
6364 (i386_install_fast_tracepoint_jump_pad): New.
6365 (x86_install_fast_tracepoint_jump_pad): New.
6366 (the_low_target): Install x86_get_thread_area and
6367 x86_install_fast_tracepoint_jump_pad.
6368 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6369 (struct fast_tracepoint_jump): New.
6370 (fast_tracepoint_jump_insn): New.
6371 (fast_tracepoint_jump_shadow): New.
6372 (find_fast_tracepoint_jump_at): New.
6373 (fast_tracepoint_jump_here): New.
6374 (delete_fast_tracepoint_jump): New.
6375 (set_fast_tracepoint_jump): New.
6376 (uninsert_fast_tracepoint_jumps_at): New.
6377 (reinsert_fast_tracepoint_jumps_at): New.
6378 (set_breakpoint_at): Use write_inferior_memory.
6379 (uninsert_raw_breakpoint): Use write_inferior_memory.
6380 (check_mem_read): Mask out fast tracepoint jumps.
6381 (check_mem_write): Mask out fast tracepoint jumps.
6382 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6383 (set_fast_tracepoint_jump): Declare.
6384 (delete_fast_tracepoint_jump)
6385 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6386 (reinsert_fast_tracepoint_jumps_at): Declare.
6387 * regcache.c: Don't compile many functions when building the
6388 in-process agent library.
6389 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6390 the register buffer in the heap.
6391 (free_register_cache): If the register buffer isn't owned by the
6392 regcache, don't free it.
6393 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6394 pre-existing register caches.
6395 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6396 type.
6397 (convert_ascii_to_int): : Constify `from' parameter type.
6398 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6399 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6400 the needed buffer in-place.
6401 (relocate_instruction): New.
6402 * server.c (handle_query) <qSymbols>: If the target supports
6403 tracepoints, give it a chance of looking up symbols. Report
6404 support for fast tracepoints.
6405 (handle_status): Stabilize threads.
6406 (process_serial_event): Adjust.
6407 * server.h (struct fast_tracepoint_jump): Forward declare.
6408 (struct process_info) <fast_tracepoint_jumps>: New field.
6409 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6410 (decode_X_packet, decode_M_packet): Adjust.
6411 (relocate_instruction): Declare.
6412 (in_process_agent_loaded): Declare.
6413 (tracepoint_look_up_symbols): Declare.
6414 (struct fast_tpoint_collect_status): Declare.
6415 (fast_tracepoint_collecting): Declare.
6416 (force_unlock_trace_buffer): Declare.
6417 (handle_tracepoint_bkpts): Declare.
6418 (initialize_low_tracepoint)
6419 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6420 * target.h (struct target_ops) <stabilize_threads,
6421 install_fast_tracepoint_jump_pad>: New fields.
6422 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6423 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6424 [HAVE_STDINT_H]: Include stdint.h.
6425 (trace_debug_1): Rename to ...
6426 (trace_vdebug): ... this.
6427 (trace_debug): Rename to ...
6428 (trace_debug_1): ... this. Add `level' parameter.
6429 (trace_debug): New.
6430 (ATTR_USED, ATTR_NOINLINE): New.
6431 (IP_AGENT_EXPORT): New.
6432 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6433 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6434 (about_to_request_buffer_space, trace_buffer_is_full)
6435 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6436 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6437 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6438 (traceframe_write_count, traceframes_created)
6439 (trace_state_variables)
6440 New renaming defines.
6441 (struct ipa_sym_addresses): New.
6442 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6443 (symbol_list): New.
6444 (ipa_sym_addrs): New.
6445 (all_tracepoint_symbols_looked_up): New.
6446 (in_process_agent_loaded): New.
6447 (write_e_ipa_not_loaded): New.
6448 (maybe_write_ipa_not_loaded): New.
6449 (tracepoint_look_up_symbols): New.
6450 (debug_threads) [IN_PROCESS_AGENT]: New.
6451 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6452 (UNKNOWN_SIDE_EFFECTS): New.
6453 (stop_tracing): New.
6454 (flush_trace_buffer): New.
6455 (stop_tracing_bkpt): New.
6456 (flush_trace_buffer_bkpt): New.
6457 (read_inferior_integer): New.
6458 (read_inferior_uinteger): New.
6459 (read_inferior_data_pointer): New.
6460 (write_inferior_data_pointer): New.
6461 (write_inferior_integer): New.
6462 (write_inferior_uinteger): New.
6463 (struct collect_static_trace_data_action): Delete.
6464 (enum tracepoint_type): New.
6465 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6466 <actions_str, step_actions, step_actions_str>: Only include in
6467 GDBserver.
fa593d66
PA
6468 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6469 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6470 (tracepoints): Use IP_AGENT_EXPORT.
6471 (last_tracepoint): Don't include in the IPA.
6472 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6473 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6474 (alloced_trace_state_variables): New.
6475 (trace_state_variables): Use IP_AGENT_EXPORT.
6476 (traceframe_t): Delete unused variable.
6477 (circular_trace_buffer): Don't include in the IPA.
6478 (trace_buffer_start): Delete.
6479 (struct trace_buffer_control): New.
6480 (trace_buffer_free): Delete.
6481 (struct ipa_trace_buffer_control): New.
6482 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6483 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6484 New.
6485 (trace_buffer_ctrl): New.
6486 (TRACE_BUFFER_CTRL_CURR): New.
6487 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6488 Reimplement as macros.
6489 (trace_buffer_wrap): Delete.
6490 (traceframe_write_count, traceframe_read_count)
6491 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6492 (struct tracepoint_hit_ctx) <type>: New field.
6493 (struct fast_tracepoint_ctx): New.
6494 (memory_barrier): New.
6495 (cmpxchg): New.
6496 (record_tracepoint_error): Update atomically in the IPA.
6497 (clear_inferior_trace_buffer): New.
6498 (about_to_request_buffer_space): New.
6499 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6500 updating the same buffer.
6501 (add_tracepoint): Default the tracepoint's type to trap
6502 tracepoint, and orig_size to -1.
6503 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6504 internal variables.
6505 (create_trace_state_variable): New parameter `gdb'. Handle it.
6506 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6507 (cmd_qtdp): Handle fast tracepoints.
6508 (cmd_qtdv): Adjust.
6509 (max_jump_pad_size): New.
6510 (gdb_jump_pad_head): New.
6511 (get_jump_space_head): New.
6512 (claim_jump_space): New.
6513 (sort_tracepoints): New.
6514 (MAX_JUMP_SIZE): New.
6515 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6516 IPA.
6517 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6518 support. Upload fast traceframes, and delete internal IPA
6519 breakpoints.
6520 (stop_tracing_handler): New.
6521 (flush_trace_buffer_handler): New.
6522 (cmd_qtstop): Upload fast tracepoints.
6523 (response_tracepoint): Handle fast tracepoints.
6524 (tracepoint_finished_step): Upload fast traceframes. Set the
6525 tracepoint hit context's tracepoint type.
6526 (handle_tracepoint_bkpts): New.
6527 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6528 type. Add comment about fast tracepoints.
6529 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6530 non-existing action_str field.
6531 (get_context_regcache): Handle fast tracepoints.
6532 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6533 to the regcache.
6534 (fast_tracepoint_from_jump_pad_address): New.
6535 (fast_tracepoint_from_ipa_tpoint_address): New.
6536 (collecting_t): New.
6537 (force_unlock_trace_buffer): New.
6538 (fast_tracepoint_collecting): New.
6539 (collecting): New.
6540 (gdb_collect): New.
6541 (write_inferior_data_ptr): New.
6542 (target_tp_heap): New.
6543 (target_malloc): New.
6544 (download_agent_expr): New.
6545 (UALIGN): New.
6546 (download_tracepoints): New.
6547 (download_trace_state_variables): New.
6548 (upload_fast_traceframes): New.
6549 (IPA_FIRST_TRACEFRAME): New.
6550 (IPA_NEXT_TRACEFRAME_1): New.
6551 (IPA_NEXT_TRACEFRAME): New.
6552 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6553 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6554 (gdb_jump_pad_buffer_end): New.
6555 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6556 (initialize_tracepoint): Adjust.
6557 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6558 buffer. Initialize the low module.
6559 * utils.c (PREFIX, TOOLNAME): New.
6560 (malloc_failure): Use PREFIX.
6561 (error): In the IPA, an error causes an exit.
6562 (fatal, warning): Use PREFIX.
6563 (internal_error): Use TOOLNAME.
6564 (NUMCELLS): Increase to 10.
6565 * configure, config.in: Regenerate.
6566
d149dd1d
PA
65672010-06-01 Pedro Alves <pedro@codesourcery.com>
6568
6569 * server.c (handle_query) <qSupported>: Do two passes over the
6570 qSupported string to avoid nesting strtok.
6571
f6528abd
JK
65722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6573
6574 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6575 (CDEPS): New.
6576 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6577 -Wl,--dynamic-list.
6578 * configure: Regenerate.
6579 * proc-service.list: New.
6580
ca2a87a0
JK
65812010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6582
6583 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6584 New comment.
6585
363a6e9f
OS
65862010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6587
6588 * gdbreplay.c (remote_open): Check error return from socket() call by
6589 its equality to -1 not by it being negative.
6590 * remote-utils.c (remote_open): Likewise.
6591
d23b6cb1
PA
65922010-05-23 Pedro Alves <pedro@codesourcery.com>
6593
6594 * config.h: Regenerate.
6595
28d3cf85
MK
65962010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6597
6598 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6599 doesn't provide PTRACE_GET_THREAD_AREA.
6600
fea36a59
MK
66012010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6602
6603 * linux-m68k-low.c: Include <asm/ptrace.h>
6604 (ps_get_thread_area): Implement.
6605
24b066ba
DE
66062010-05-03 Doug Evans <dje@google.com>
6607
6608 * event-loop.c (struct callback_event): New struct.
6609 (callback_list): New global.
6610 (append_callback_event, delete_callback_event): New functions.
6611 (process_callback): New function.
6612 (start_event_loop): Call it.
6613 * remote-utils.c (NOT_SCHEDULED): Define.
6614 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6615 moved out of readchar.
6616 (readchar): Rewrite. Call reschedule before returning.
6617 (reset_readchar): New function.
6618 (remote_close): Call it.
6619 (process_remaining, reschedule): New functions.
6620 * server.h (callback_handler_func): New typedef.
6621 (append_callback_event, delete_callback_event): Declare.
6622
9836d6ea
PA
66232010-05-03 Pedro Alves <pedro@codesourcery.com>
6624
6625 * proc-service.c (ps_pglobal_lookup): Use
6626 thread_db_look_up_one_symbol.
6627 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6628 parameter. Use it instead of all_symbols_looked_up.
6629 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6630 field.
6631 (all_symbols_looked_up): Don't declare.
6632 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6633 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6634 field.
6635 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6636 Set all_symbols_looked_up here.
6637 (thread_db_look_up_one_symbol): New.
6638 (thread_db_get_tls_address): Adjust.
6639 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6640 thread_db object on the heap, and tentatively set it in the
6641 process structure.
6642 (thread_db_init): Don't set all_symbols_looked_up here.
6643 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6644
7984d532
PA
66452010-05-03 Pedro Alves <pedro@codesourcery.com>
6646
6647 * linux-low.c (linux_kill, linux_detach): Adjust.
6648 (status_pending_p_callback): Remove redundant statement. Check
6649 for !TARGET_WAITIKIND_IGNORE, instead of
6650 TARGET_WAITKIND_STOPPED.
6651 (handle_tracepoints): Make sure LWP is locked. Adjust.
6652 (linux_wait_for_event_1): Adjust.
6653 (linux_cancel_breakpoints): New.
6654 (unsuspend_one_lwp): New.
6655 (unsuspend_all_lwps): New.
6656 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6657 (send_sigstop_callback): Change return type to int, add new
6658 `except' parameter and handle it.
6659 (suspend_and_send_sigstop_callback): New.
6660 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6661 pass them down. If SUSPEND, also increment the lwp's suspend
6662 count.
6663 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6664 (need_step_over_p): Don't consider suspended LWPs.
6665 (start_step_over): Adjust.
6666 (proceed_one_lwp): Change return type to int, add new `except'
6667 parameter and handle it.
6668 (unsuspend_and_proceed_one_lwp): New.
6669 (proceed_all_lwps): Use find_inferior instead of
6670 for_each_inferior.
6671 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6672 also decrement the suspend count of LWPs. Pass `except' down,
6673 instead of hacking its suspend count.
6674 (linux_pause_all): Add `freeze' parameter. Adjust.
6675 (linux_unpause_all): New.
6676 (linux_target_ops): Install linux_unpause_all.
6677 * server.c (handle_status): Adjust.
6678 * target.h (struct target_ops): New fields `unpause_all' and
6679 `cancel_breakpoints'. Add new parameter to `pause_all'.
6680 (pause_all): Add new `freeze' parameter.
6681 (unpause_all): New.
6682 (cancel_breakpoints): New.
6683 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6684 cancel breakpoints.
6685 (cmd_qtstart): Pause threads.
6686 (stop_tracing): Pause threads, and cancel breakpoints.
6687 * win32-low.c (win32_target_ops): Adjust.
6688
e471f25b
PA
66892010-05-03 Pedro Alves <pedro@codesourcery.com>
6690
6691 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6692 the inferior right away from here...
6693 (linux_wait_1): ... to here, and adjust to check the thread's
6694 last_resume_kind instead of the lwp's step or stop_expected flags.
6695
1915ef4f
PA
66962010-05-02 Pedro Alves <pedro@codesourcery.com>
6697
6698 * README: Use consistent `GDB' and `GDBserver' spellings.
6699
f9e39928
PA
67002010-05-02 Pedro Alves <pedro@codesourcery.com>
6701
6702 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6703 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6704 (linux_detach_one_lwp): Assume the lwp is stopped.
6705 (any_thread_of): Delete.
6706 (linux_detach): Stop all lwps here. Don't blindly delete all
6707 breakpoints.
6708 (delete_lwp_callback): New.
6709 (linux_mourn): Delete all lwps of the process that is gone.
6710 (linux_wait_1): Don't delete the last lwp of the process here.
6711 * mem-break.h (mark_breakpoints_out): Declare.
6712 * mem-break.c (mark_breakpoints_out): New.
6713 (free_all_breakpoints): Use it.
6714 * server.c (handle_target_event): If the process is gone, mark
6715 breakpoints out.
6716 * thread-db.c (struct thread_db) <create_bp>: New field.
6717 (thread_db_enable_reporting): Fix prototype. Store a thread event
6718 breakpoint reference in the thread_db struct.
6719 (thread_db_load_search): Clear the thread_db object.
6720 (try_thread_db_load_1): Ditto.
6721 (switch_to_process): New.
6722 (disable_thread_event_reporting): Use it.
6723 (remove_thread_event_breakpoints): New.
6724 (thread_db_detach, thread_db_mourn): Use it.
6725
1e7fc18c
PA
67262010-05-01 Pedro Alves <pedro@codesourcery.com>
6727
6728 * linux-low.c (linux_enable_event_reporting): New.
6729 (linux_wait_for_event_1, handle_extended_wait): Use it.
6730
02fc4de7
PA
67312010-04-30 Pedro Alves <pedro@codesourcery.com>
6732
6733 * linux-low.c (linux_kill_one_lwp, linux_kill)
6734 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6735 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6736 SIGSTOP even if the LWP is stopped.
6737 (send_sigstop_callback): New.
6738 (stop_all_lwps): Use send_sigstop_callback instead.
6739 (linux_resume_one_thread): Adjust.
6740 (proceed_one_lwp): Still proceed an LWP that the client has
6741 requested to stop, if we haven't reported it as stopped yet. Make
6742 sure that LWPs the client want stopped, have a pending SIGSTOP.
6743
bc3b5632
DE
67442010-04-26 Doug Evans <dje@google.com>
6745
ae1ada35
DE
6746 * server.c (handle_general_set): Make static.
6747
bc3b5632
DE
6748 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6749 Print received char after testing for error/eof instead of before.
6750 (input_interrupt): Tweak comment.
6751
65730243
DE
67522010-04-23 Doug Evans <dje@google.com>
6753
6754 * server.c (start_inferior): Print inferior argv if --debug.
6755
a8ae7dc0
AR
67562010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6757
6758 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6759 * nto-x86-low.c: Include server.h
6760
1c07cc19
PM
67612010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6762
6763 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6764 be consistent with other sources of this directory.
6765 (init_registers_amd64): Correct name of source file of this function
6766 in the comment.
6767
e0a61e09
PM
67682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6769
6770 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6771 64-bit executables.
6772
54709339
PM
67732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6774
6775 * win32-i386-low.c: Add 64-bit support.
6776 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6777 (init_registers_amd64): Declare.
6778 (mappings): Add 64-bit version of array.
6779 (init_windows_x86): New function.
6780 (the_low_target): Change init_arch field to init_windows_x86.
6781
e8f0053d
PM
67822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6783
6784 * win32-low.c: Adapt to support also 64-bit architecture.
6785 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6786 (get_image_name): Use SIZE_T type for local variable `done'.
6787 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6788 (toolhelp_get_dll_name): Idem.
6789 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6790 Use uintptr_t typecast to avoid warning.
6791 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6792 (handle_exception): Use phex_nz to avoid warning.
6793 (win32_wait): Remove unused local variable `process'.
6794
c481e77e
PM
67952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6796
6797 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6798 `amd64-avx.o'.
6799
12ea4b69
PM
68002010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6801
6802 * configure.ac: Use `ws2_32' library for srv_mingw.
6803 * configure: Regenerate.
6804 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6805 * remote-utils.c: Likewise.
6806
f6d1620c
L
68072010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6808
6809 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6810 if __x86_64__ is defined.
6811
8e642873
PM
68122010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6813
6814 * configure: Regenerate.
6815
711e434b
PM
68162010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6817
6818 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6819 * target.h (target_ops): New get_tib_address field.
6820 * win32-low.h (win32_thread_info): Add thread_local_base field.
6821 * win32-low.c (child_add_thread): Add tlb argument.
6822 Set thread_local_base field to TLB.
6823 (get_child_debug_event): Adapt to child_add_thread change.
6824 (win32_get_tib_address): New function.
6825 (win32_target_ops): Set get_tib_address field to
6826 win32_get_tib_address.
6827 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6828
505106cd
PA
68292010-04-12 Pedro Alves <pedro@codesourcery.com>
6830
505106cd
PA
6831 * linux-low.c (linux_mourn): Also remove the process.
6832 * server.c (handle_target_event): Don't remove the process here.
6833 * nto-low.c (nto_mourn): New.
6834 (nto_target_ops): Install it.
6835 * spu-low.c (spu_mourn): New.
6836 (spu_target_ops): Install it.
6837 * win32-low.c (win32_mourn): New.
6838 (win32_target_ops): Install it.
6839
e8470a06
PA
68402010-04-12 Pedro Alves <pedro@codesourcery.com>
6841
6842 * server.h (buffer_xml_printf): Remove redundant `;'.
6843
45ba0d02
PA
68442010-04-12 Pedro Alves <pedro@codesourcery.com>
6845
6846 * regcache.c (set_register_cache): Invalidate regcaches before
6847 changing the register cache layout.
6848 (regcache_invalidate_one): Allow a NULL regcache.
6849 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6850 regcaches before changing the register cache layout or the target
6851 regsets.
6852
59e04013
L
68532010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6854
6855 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6856 variable warning on Linux/x86-64.
6857
8336d594
PA
68582010-04-11 Pedro Alves <pedro@codesourcery.com>
6859
6860 GDBserver disconnected tracing support.
6861
6862 * linux-low.c (linux_remove_process): Delete.
6863 (add_lwp): Don't set last_resume_kind here.
6864 (linux_kill): Use `mourn'.
6865 (linux_detach): Use `thread_db_detach', and `mourn'.
6866 (linux_mourn): New.
6867 (linux_attach_lwp_1): Adjust comment.
6868 (linux_attach): last_resume_kind moved the thread_info; adjust.
6869 (status_pending_p_callback): Adjust.
6870 (linux_wait_for_event_1): Adjust.
6871 (count_events_callback, select_singlestep_lwp_callback)
6872 (select_event_lwp_callback, cancel_breakpoints_callback)
6873 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6874 (proceed_one_lwp): Adjust.
6875 (linux_async): Add debug output.
6876 (linux_thread_stopped): New.
6877 (linux_pause_all): New.
6878 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6879 linux_pause_all.
6880 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6881 (thread_db_free): Delete declaration.
6882 (thread_db_detach, thread_db_mourn): Declare.
6883 * thread-db.c (thread_db_init): Use thread_db_mourn.
6884 (thread_db_free): Delete, split in two.
6885 (disable_thread_event_reporting): New.
6886 (thread_db_detach): New.
6887 (thread_db_mourn): New.
6888
6889 * server.h (struct thread_info) <last_resume_kind>: New field.
6890 <attached>: Add comment.
6891 <gdb_detached>: New field.
6892 (handler_func): Change return type to int.
6893 (handle_serial_event, handle_target_event): Ditto.
6894 (gdb_connected): Declare.
6895 (tracing): Delete.
6896 (disconnected_tracing): Declare.
6897 (stop_tracing): Declare.
6898
6899 * server.c (handle_query) <qSupported>: Report support for
6900 disconnected tracing.
6901 (queue_stop_reply_callback): Account for running threads.
6902 (gdb_wants_thread_stopped): New.
6903 (gdb_wants_all_threads_stopped): New.
6904 (gdb_reattached_process): New.
6905 (handle_status): Clear the `gdb_detached' flag of all processes.
6906 In all-stop, stop all threads.
6907 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6908 (process_serial_event): If the remote connection breaks, or if an
6909 exit was forced with "monitor exit", force an event loop exit.
6910 Handle disconnected tracing on detach.
6911 (handle_serial_event): Adjust.
6912 (handle_target_event): If GDB isn't connected, forward events back
6913 to the inferior, unless the last process exited, in which case,
6914 exit gdbserver. Adjust interface.
6915
6916 * remote-utils.c (remote_open): Don't block in accept. Instead
6917 register an event loop source on the listen socket file
6918 descriptor. Refactor bits into ...
6919 (listen_desc): ... this new global.
6920 (gdb_connected): ... this new function.
6921 (enable_async_notification): ... this new function.
6922 (handle_accept_event): ... this new function.
6923 (remote_close): Clear remote_desc.
6924
6925 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6926
6927 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6928 New fields.
6929 (mourn_inferior): Define.
6930 (target_process_qsupported): Avoid the dangling else problem.
6931 (thread_stopped): Define.
6932 (pause_all): Define.
6933 (target_waitstatus_to_string): Declare.
6934 * target.c (target_waitstatus_to_string): New.
6935
6936 * tracepoint.c (tracing): Make extern.
6937 (disconnected_tracing): New.
6938 (stop_tracing): Make extern. Handle tracing stops due to GDB
6939 disconnecting.
6940 (cmd_qtdisconnected): New.
6941 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6942 (handle_tracepoint_general_set): Handle QTDisconnected.
6943
6944 * event-loop.c (event_handler_func): Change return type to int.
6945 (process_event): Bail out if the event handler wants the event
6946 loop to stop.
6947 (handle_file_event): Ditto.
6948 (start_event_loop): Bail out if the event handler wants the event
6949 loop to stop.
6950
6951 * nto-low.c (nto_target_ops): Adjust.
6952 * spu-low.c (spu_wait): Don't remove the process here.
6953 (spu_target_ops): Adjust.
6954 * win32-low.c (win32_wait): Don't remove the process here.
6955 (win32_target_ops): Adjust.
6956
5d267c4c
PA
69572010-04-11 Pedro Alves <pedro@codesourcery.com>
6958
6959 * regcache.c (realloc_register_cache): Invalidate inferior's
6960 regcache before recreating it.
6961
623ccd72
PA
69622010-04-09 Pedro Alves <pedro@codesourcery.com>
6963
6964 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6965
219f2f23
PA
69662010-04-09 Stan Shebs <stan@codesourcery.com>
6967 Pedro Alves <pedro@codesourcery.com>
6968
6969 * server.h (LONGEST): New.
6970 (struct thread_info) <while_stepping>: New field.
6971 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6972 Declare.
6973 (initialize_tracepoint, handle_tracepoint_general_set)
6974 (handle_tracepoint_query, tracepoint_finished_step)
6975 (tracepoint_was_hit, release_while_stepping_state_list):
6976 (current_traceframe): Declare.
6977 * server.c (handle_general_set): Handle tracepoint packets.
6978 (read_memory): New.
6979 (write_memory): New.
6980 (handle_search_memory_1): Use read_memory.
6981 (handle_query): Report support for conditional tracepoints, trace
6982 state variables, and tracepoint sources. Handle tracepoint
6983 queries.
6984 (main): Initialize the tracepoints module.
6985 (process_serial_event): Handle traceframe reads/writes.
6986
6987 * linux-low.c (handle_tracepoints): New.
6988 (linux_wait_1): Call it.
6989 (linux_resume_one_lwp): Handle while-stepping.
6990 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6991 (linux_target_ops): Install them.
6992 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6993 New field.
6994 * linux-x86-low.c (x86_supports_tracepoints): New.
6995 (the_low_target). Install it.
6996
6997 * mem-break.h (delete_breakpoint): Declare.
6998 * mem-break.c (delete_breakpoint): Make external.
6999
7000 * target.h (struct target_ops): Add `supports_tracepoints',
7001 `read_pc', and `write_pc' fields.
7002 (target_supports_tracepoints): Define.
7003 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7004 (phex_nz): New.
7005
7006 * regcache.h (struct regcache) <registers_owned>: New field.
7007 (init_register_cache, regcache_cpy): Declare.
7008 (regcache_read_pc, regcache_write_pc): Declare.
7009 (register_cache_size): Declare.
7010 (supply_regblock): Declare.
7011 * regcache.c (init_register_cache): New.
7012 (new_register_cache): Use it.
7013 (regcache_cpy): New.
7014 (register_cache_size): New.
7015 (supply_regblock): New.
7016 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7017
219f2f23
PA
7018 * tracepoint.c: New.
7019
7020 * Makefile.in (OBS): Add tracepoint.o.
7021 (tracepoint.o): New rule.
7022
3a13a53b
L
70232010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7024
7025 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7026 (i386-mmx.o): New.
7027 (i386-mmx.c): Likewise.
7028 (i386-mmx-linux.o): Likewise.
7029 (i386-mmx-linux.c): Likewise.
7030
7031 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7032 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7033 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7034 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7035
7036 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7037 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7038 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7039
1570b33e
L
70402010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7041
7042 * Makefile.in (clean): Updated.
7043 (i386-avx.o): New.
7044 (i386-avx.c): Likewise.
7045 (i386-avx-linux.o): Likewise.
7046 (i386-avx-linux.c): Likewise.
7047 (amd64-avx.o): Likewise.
7048 (amd64-avx.c): Likewise.
7049 (amd64-avx-linux.o): Likewise.
7050 (amd64-avx-linux.c): Likewise.
7051
7052 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7053 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7054 (srv_amd64_regobj): Add amd64-avx.o.
7055 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7056 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7057 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7058 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7059 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7060 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7061 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7062
7063 * i387-fp.c: Include "i386-xstate.h".
7064 (i387_xsave): New.
7065 (i387_cache_to_xsave): Likewise.
7066 (i387_xsave_to_cache): Likewise.
7067 (x86_xcr0): Likewise.
7068
7069 * i387-fp.h (i387_cache_to_xsave): Likewise.
7070 (i387_xsave_to_cache): Likewise.
7071 (x86_xcr0): Likewise.
7072
7073 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7074 * linux-crisv32-low.c (target_regsets): Likewise.
7075 * linux-m68k-low.c (target_regsets): Likewise.
7076 * linux-mips-low.c (target_regsets): Likewise.
7077 * linux-ppc-low.c (target_regsets): Likewise.
7078 * linux-s390-low.c (target_regsets): Likewise.
7079 * linux-sh-low.c (target_regsets): Likewise.
7080 * linux-sparc-low.c (target_regsets): Likewise.
7081 * linux-xtensa-low.c (target_regsets): Likewise.
7082
7083 * linux-low.c: Include <sys/uio.h>.
7084 (regsets_fetch_inferior_registers): Support nt_type.
7085 (regsets_store_inferior_registers): Likewise.
7086 (linux_process_qsupported): New.
7087 (linux_target_ops): Add linux_process_qsupported.
7088
7089 * linux-low.h (regset_info): Add nt_type.
7090 (linux_target_ops): Add process_qsupported.
7091
7092 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7093 and <sys/uio.h>.
7094 (init_registers_i386_avx_linux): New.
7095 (init_registers_amd64_avx_linux): Likewise.
7096 (xmltarget_i386_linux_no_xml): Likewise.
7097 (xmltarget_amd64_linux_no_xml): Likewise.
7098 (PTRACE_GETREGSET): Likewise.
7099 (PTRACE_SETREGSET): Likewise.
7100 (x86_fill_xstateregset): Likewise.
7101 (x86_store_xstateregset): Likewise.
7102 (use_xml): Likewise.
7103 (x86_linux_update_xmltarget): Likewise.
7104 (x86_linux_process_qsupported): Likewise.
7105 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7106 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7107 init_registers_i386_linux here. Call
7108 x86_linux_update_xmltarget.
7109 (the_low_target): Add x86_linux_process_qsupported.
7110
7111 * server.c (handle_query): Call target_process_qsupported.
7112
7113 * target.h (target_ops): Add process_qsupported.
7114 (target_process_qsupported): New.
7115
fc7238bb
PA
71162010-04-03 Pedro Alves <pedro@codesourcery.com>
7117
7118 * inferiors.c (add_thread): Set last_status kind to
7119 TARGET_WAITKIND_IGNORE.
7120 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7121 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7122 (linux_wait_1): Move `thread' local definition to block that uses
7123 it. Don't NULL initialize `event_child'.
7124 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7125 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7126 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7127
bdabb078
PA
71282010-04-01 Pedro Alves <pedro@codesourcery.com>
7129
7130 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7131 an extended waitstatus, or by a watchpoint.
7132 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7133 thread was stepping or has been stopped by a watchpoint.
7134
d3bbe7a0
PA
71352010-04-01 Pedro Alves <pedro@codesourcery.com>
7136
7137 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7138 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7139 of another, then delete the previous, and validate all
7140 breakpoints.
7141 (validate_inserted_breakpoint): New.
7142 (delete_disabled_breakpoints): New.
7143 (validate_breakpoints): New.
7144 (check_mem_read): Validate breakpoints before trusting their
7145 shadow. Delete disabled breakpoints.
7146 (check_mem_write): Validate breakpoints before trusting they
7147 should be inserted. Delete disabled breakpoints.
7148 * mem-break.h (validate_breakpoints):
7149 * server.c (handle_query): Validate breakpoints when we see a
7150 qSymbol query.
7151
8b07ae33
PA
71522010-04-01 Pedro Alves <pedro@codesourcery.com>
7153
7154 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7155 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7156 if we could tell there's a GDB breakpoint at stop_pc.
7157 (need_step_over_p): Don't do a step over if we find a GDB
7158 breakpoint at the resume PC.
7159
7160 * mem-break.c (struct raw_breakpoint): New.
7161 (enum bkpt_type): New type `gdb_breakpoint'.
7162 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7163 fields. New field `raw'.
7164 (find_raw_breakpoint_at): New.
7165 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7166 breakpoint instead.
7167 (set_breakpoint_at): Adjust.
7168 (delete_raw_breakpoint): New.
7169 (release_breakpoint): New.
7170 (delete_breakpoint): Rename to...
7171 (delete_breakpoint_1): ... this. Add proc parameter. Use
7172 release_breakpoint. Return ENOENT.
7173 (delete_breakpoint): Reimplement.
7174 (find_breakpoint_at): Delete.
7175 (find_gdb_breakpoint_at): New.
7176 (delete_breakpoint_at): Delete.
7177 (set_gdb_breakpoint_at): New.
7178 (delete_gdb_breakpoint_at): New.
7179 (gdb_breakpoint_here): New.
7180 (set_reinsert_breakpoint): Use release_breakpoint.
7181 (uninsert_breakpoint): Rename to ...
7182 (uninsert_raw_breakpoint): ... this.
7183 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7184 (reinsert_raw_breakpoint): Change parameter type to
7185 raw_breakpoint.
7186 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7187 instead.
7188 (check_breakpoints): Adjust. Use release_breakpoint.
7189 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7190 (breakpoint_inserted_here): Ditto.
7191 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7192 Don't trust the breakpoint's shadow if it is not inserted.
7193 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7194 (delete_all_breakpoints): Adjust.
7195 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7196 use delete_breakpoint_1.
7197
7198 * mem-break.h (breakpoints_supported): Delete declaration.
7199 (set_gdb_breakpoint_at): Declare.
7200 (gdb_breakpoint_here): Declare.
7201 (delete_breakpoint_at): Delete.
7202 (delete_gdb_breakpoint_at): Declare.
7203
7204 * server.h (struct raw_breakpoint): Forward declare.
7205 (struct process_info): New field `raw_breakpoints'.
7206
7207 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7208 breakpoints.
7209
6bf5e0ba
PA
72102010-03-24 Pedro Alves <pedro@codesourcery.com>
7211
7212 * linux-low.c (status_pending_p_callback): Fix comment.
7213 (linux_wait_for_event_1): Move most of the internal breakpoint
7214 handling from here...
7215 (linux_wait_1): ... to here.
7216 (count_events_callback): New.
7217 (select_singlestep_lwp_callback): New.
7218 (select_event_lwp_callback): New.
7219 (cancel_breakpoints_callback): New.
7220 (select_event_lwp): New.
7221 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7222 priority to all LWPs that have had events that should be reported
7223 to the client. Cancel breakpoints when about to reporting the
7224 event to the client, not while stopping lwps. No longer cancel
7225 finished single-steps here.
7226 (cancel_finished_single_step): Delete.
7227 (cancel_finished_single_steps): Delete.
7228
414a389f
PA
72292010-03-24 Pedro Alves <pedro@codesourcery.com>
7230
7231 * mem-break.c (enum bkpt_type): New.
7232 (struct breakpoint): New field `type'.
7233 (set_breakpoint_at): Change return type to struct breakpoint
7234 pointer. Set type to `other_breakpoint' by default.
7235 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7236 in the breakpoint list.
7237 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7238 (reinsert_breakpoint): Rename to ...
7239 (reinsert_raw_breakpoint): ... this.
7240 (reinsert_breakpoints_at): Adjust.
7241 * mem-break.h (struct breakpoint): Declare.
7242 (set_breakpoint_at): Change return type to struct breakpoint
7243 pointer.
7244
2280c721
PA
72452010-03-24 Pedro Alves <pedro@codesourcery.com>
7246
7247 * server.c (handle_query): Assign, not compare.
7248
d50171e4
PA
72492010-03-24 Pedro Alves <pedro@codesourcery.com>
7250
7251 Teach linux gdbserver to step-over-breakpoints.
7252
7253 * linux-low.c (can_hardware_single_step): New.
7254 (supports_breakpoints): New.
7255 (handle_extended_wait): If stopping threads, read the stop pc of
7256 the new cloned LWP.
7257 (get_pc): New.
7258 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7259 low target doesn't support retrieving the PC.
7260 (add_lwp): Set last_resume_kind to resume_continue.
7261 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7262 (linux_attach): Don't clear stop_expected. Set the lwp's
7263 last_resume_kind to resume_stop.
7264 (linux_detach_one_lwp): Don't check for removed breakpoints.
7265 (check_removed_breakpoint): Delete.
7266 (status_pending_p): Rename to ...
7267 (status_pending_p_callback): ... this. Don't check for removed
7268 breakpoints. Don't consider threads that are stopped from GDB's
7269 perspective.
7270 (linux_wait_for_lwp): Always read the stop_pc here.
7271 (cancel_breakpoint): New.
7272 (step_over_bkpt): New global.
7273 (linux_wait_for_event_1): Implement stepping over breakpoints.
7274 (gdb_wants_lwp_stopped): New.
7275 (gdb_wants_all_stopped): New.
7276 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7277 single-step traps here. Store the thread's last reported target
7278 wait status.
7279 (send_sigstop): Don't clear stop_expected. Always set it,
7280 instead.
7281 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7282 (cancel_finished_single_step): New.
7283 (cancel_finished_single_steps): New.
7284 (wait_for_sigstop): Don't cancel finished single-step traps here.
7285 (linux_resume_one_lwp): Don't check for removed breakpoints.
7286 Don't set `step' on non-hardware step archs.
7287 (linux_set_resume_request): Ignore resume_stop requests if already
7288 stopping or stopped. Set the lwp's last_resume_kind.
7289 (resume_status_pending_p): Don't check for removed breakpoints.
7290 (need_step_over_p): New.
7291 (start_step_over): New.
7292 (finish_step_over): New.
7293 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7294 requests. Clear the thread's last reported target waitstatus.
7295 Don't use the `suspended' flag. Don't consider pending breakpoints.
7296 (linux_resume): Start a step-over if necessary.
7297 (proceed_one_lwp): New.
7298 (proceed_all_lwps): New.
7299 (unstop_all_lwps): New.
7300 * linux-low.h (struct lwp_info): Rewrite comment for the
7301 `suspended' flag. Add the `stop_pc' field. Delete the
7302 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7303 Add `'last_resume_kind' and `need_step_over' fields.
7304 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7305 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7306 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7307 (set_raw_breakpoint_at): New.
7308 (set_breakpoint_at): Rewrite to use it.
7309 (reinsert_breakpoint_handler): Delete.
7310 (set_reinsert_breakpoint): New.
7311 (reinsert_breakpoint_by_bp): Delete.
7312 (delete_reinsert_breakpoints): New.
7313 (uninsert_breakpoint): Rewrite.
7314 (uninsert_breakpoints_at): New.
7315 (reinsert_breakpoint): Rewrite.
7316 (reinsert_breakpoints_at): New.
7317 (check_breakpoints): Rewrite.
7318 (breakpoint_here): New.
7319 (breakpoint_inserted_here): New.
7320 (check_mem_read): Adjust.
7321 * mem-break.h (breakpoints_supported, breakpoint_here)
7322 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7323 (reinsert_breakpoint_by_bp): Delete declaration.
7324 (delete_reinsert_breakpoints): Declare.
7325 (reinsert_breakpoint): Delete declaration.
7326 (reinsert_breakpoints_at): Declare.
7327 (uninsert_breakpoint): Delete declaration.
7328 (uninsert_breakpoints_at): Declare.
7329 (check_breakpoints): Adjust prototype.
7330 * server.h: Adjust include order.
7331 (struct thread_info): Declare here. Add a `last_status' field.
7332
30ba68cb
MS
73332010-03-23 Michael Snyder <msnyder@vmware.com>
7334
7335 * server.c (crc32): New function.
7336 (handle_query): Add handling for 'qCRC:' request.
7337
b9a881c2
PA
73382010-03-23 Pedro Alves <pedro@codesourcery.com>
7339
7340 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7341 lwp had been stopped by a watchpoint.
7342
e92d13d5
PA
73432010-03-16 Pedro Alves <pedro@codesourcery.com>
7344
7345 * server.h (internal_error): Declare.
7346 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7347 * utils.c (internal_error): New function.
7348
64daa791
AS
73492010-03-15 Andreas Schwab <schwab@redhat.com>
7350
7351 * configure.srv: Fix typo setting srv_regobj.
7352
f52cd8cd
PA
73532010-03-15 Pedro Alves <pedro@codesourcery.com>
7354
7355 * linux-low.c (fetch_register): Avoid passing a non string literal
7356 format to `error'.
7357 (usr_store_inferior_registers): Ditto.
7358
93ae6fdc
PA
73592010-03-14 Pedro Alves <pedro@codesourcery.com>
7360
7361 * linux-low.c (linux_write_memory): Bail out early if peeking
7362 memory failed.
7363
c3adc08c
PA
73642010-03-14 Pedro Alves <pedro@codesourcery.com>
7365
7366 * linux-low.h (struct lwp_info): New fields
7367 `stopped_by_watchpoint' and `stopped_data_address'.
7368 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7369 here, and cache them in the lwp object.
7370 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7371 directly.
7372 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7373 field.
7374 (linux_stopped_by_watchpoint): Rewrite.
7375 (linux_stopped_data_address): Rewrite.
7376
bce522a2
PA
73772010-03-06 Simo Melenius <simo.melenius@iki.fi>
7378
7379 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7380 switching the current inferior, not before.
7381
90884b2b
L
73822010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7383
7384 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7385 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7386 i386-linux.c and amd64-linux.c.
7387 (reg-i386.o): Removed.
7388 (reg-i386.c): Likewise.
7389 (reg-i386-linux.o): Likewise.
7390 (reg-i386-linux.c): Likewise.
7391 (reg-x86-64.o): Likewise.
7392 (reg-x86-64.c): Likewise.
7393 (reg-x86-64-linux.o): Likewise.
7394 (reg-x86-64-linux.c): Likewise.
7395 (i386.o): New.
7396 (i386.c): Likewise.
7397 (i386-linux.o): Likewise.
7398 (i386-linux.c): Likewise.
7399 (amd64.o): Likewise.
7400 (amd64.c): Likewise.
7401 (amd64-linux.o): Likewise.
7402 (amd64-linux.c): Likewise.
7403
7404 * configure.srv (srv_i386_regobj): New.
7405 (srv_i386_linux_regobj): Likewise.
7406 (srv_amd64_regobj): Likewise.
7407 (srv_amd64_linux_regobj): Likewise.
7408 (srv_i386_32bit_xmlfiles): Likewise.
7409 (srv_i386_64bit_xmlfiles): Likewise.
7410 (srv_i386_xmlfiles): Likewise.
7411 (srv_amd64_xmlfiles): Likewise.
7412 (srv_i386_linux_xmlfiles): Likewise.
7413 (srv_amd64_linux_xmlfiles): Likewise.
7414 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7415 srv_xmlfiles to $srv_i386_xmlfiles.
7416 (i[34567]86-*-mingw32ce*): Likewise.
7417 (i[34567]86-*-mingw*): Likewise.
7418 (i[34567]86-*-nto*): Likewise.
7419 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7420 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7421 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7422 (x86_64-*-linux*): Likewise.
7423
7424 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7425 (init_registers_amd64_linux): New.
7426 (x86_arch_setup): Replace init_registers_x86_64_linux with
7427 init_registers_amd64_linux.
7428
193f13e6
MK
74292010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7430
7431 * configure.ac: Check for libdl. If it is not available link against
7432 static libthread_db.
7433 * configure: Regenerate.
7434
85d721b8
PA
74352010-02-22 Pedro Alves <pedro@codesourcery.com>
7436
7437 PR9605
7438
7439 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7440 handing a read watchpoint.
7441 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7442
6076632b
DE
74432010-02-12 Doug Evans <dje@google.com>
7444
7445 * linux-low.c (linux_supports_tracefork_flag): Document.
7446 (linux_look_up_symbols): Add comment.
7447
3327ccf7
L
74482010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7449
7450 * regcache.c (supply_register): Clear regcache if buf is NULL.
7451
0718675c 74522010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7453 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7454
7455 * inferiors.c (find_inferior): Add function documentation.
7456 (unloaded_dll): Handle the case where the unloaded dll has not
7457 been previously registered in the dll list.
7458
177321bd
DJ
74592010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7460
7461 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7462 (thumb2_breakpoint): New.
7463 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7464
2b009048
DJ
74652010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7466
7467 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7468 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7469 breakpoints.
7470
3be029c7
PA
74712010-01-21 Pedro Alves <pedro@codesourcery.com>
7472
7473 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7474
18f5de3b
JK
74752010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7476
7477 * linux-s390-low.c (s390_collect_ptrace_register)
7478 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7479
3743bb4f
DE
74802010-01-21 Doug Evans <dje@google.com>
7481
14ce3065
DE
7482 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7483 (PTRACE_ARG4_TYPE): New macro.
7484 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7485 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7486 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7487 (usr_store_inferior_registers): Ditto.
7488 (linux_read_memory, linux_write_memory): Ditto.
7489 (linux_test_for_tracefork): Ditto.
7490
3743bb4f
DE
7491 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7492 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7493
8b315be5
PA
74942010-01-21 Pedro Alves <pedro@codesourcery.com>
7495
7496 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7497 target.
7498
85492558
PA
74992010-01-21 Pedro Alves <pedro@codesourcery.com>
7500
7501 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7502 prototype to take a regcache. Adjust.
7503
442ea881
PA
75042010-01-20 Pedro Alves <pedro@codesourcery.com>
7505
7506 * regcache.h (struct thread_info): Forward declare.
7507 (struct regcache): New.
7508 (new_register_cache): Adjust prototype.
7509 (get_thread_regcache): Declare.
7510 (free_register_cache): Adjust prototype.
7511 (registers_to_string, registers_from_string): Ditto.
7512 (supply_register, supply_register_by_name, collect_register)
7513 (collect_register_as_string, collect_register_by_name): Ditto.
7514 * regcache.c (struct inferior_regcache_data): Delete.
7515 (get_regcache): Rename to ...
7516 (get_thread_regcache): ... this. Adjust. Switch inferior before
7517 fetching registers.
7518 (regcache_invalidate_one): Adjust.
7519 (regcache_invalidate): Fix prototype.
7520 (new_register_cache): Return the new register cache.
7521 (free_register_cache): Change prototype.
7522 (realloc_register_cache): Adjust.
7523 (registers_to_string): Change prototype to take a regcache. Adjust.
7524 (registers_from_string): Ditto.
7525 (register_data): Ditto.
7526 (supply_register): Ditto.
7527 (supply_register_by_name): Ditto.
7528 (collect_register): Ditto.
7529 (collect_register_as_string): Ditto.
7530 (collect_register_by_name): Ditto.
7531 * server.c (process_serial_event): Adjust.
7532 * linux-low.h (regset_fill_func, regset_store_func): Change
7533 prototype.
7534 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7535 Change prototype.
7536 * linux-low.c (get_stop_pc): Adjust.
7537 (check_removed_breakpoint): Adjust.
7538 (linux_wait_for_event): Adjust.
7539 (linux_resume_one_lwp): Adjust.
7540 (fetch_register): Add regcache parameter. Adjust.
7541 (usr_store_inferior_registers): Ditto.
7542 (regsets_fetch_inferior_registers): Ditto.
7543 (regsets_store_inferior_registers): Ditto.
7544 (linux_fetch_registers, linux_store_registers): Ditto.
7545 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7546 regcache. Adjust.
43aaf8b6
PA
7547 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7548 Ditto.
442ea881
PA
7549 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7550 prototype to take a regcache.
7551 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7552 * remote-utils.c (convert_ascii_to_int, outreg)
7553 (prepare_resume_reply): Change prototype to take a regcache.
7554 Adjust.
7555 * target.h (struct target_ops) <fetch_registers, store_registers>:
7556 Change prototype to take a regcache.
7557 (fetch_inferior_registers, store_inferior_registers): Change
7558 prototype to take a regcache. Adjust.
7559 * proc-service.c (ps_lgetregs): Adjust.
7560 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7561 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7562 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7563 take a regcache. Adjust.
7564 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7565 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7566 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7567 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7568 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7569 (cris_cannot_fetch_register):
7570 (cris_breakpoint_at): Change prototype to take a regcache.
7571 Adjust.
7572 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7573 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7574 to take a regcache. Adjust.
7575 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7576 Adjust.
7577 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7578 take a regcache. Adjust.
7579 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7580 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7581 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7582 * linux-mips-low.c (mips_get_pc):
7583 (mips_set_pc): Change prototype to take a regcache. Adjust.
7584 (mips_reinsert_addr): Adjust.
7585 (mips_collect_register): Change prototype to take a regcache.
7586 Adjust.
7587 (mips_supply_register):
7588 (mips_collect_register_32bit, mips_supply_register_32bit)
7589 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7590 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7591 * linux-ppc-low.c (ppc_supply_ptrace_register)
7592 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7593 (parse_spufs_run): Adjust.
7594 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7595 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7596 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7597 take a regcache. Adjust.
7598 * linux-s390-low.c (s390_collect_ptrace_register)
7599 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7600 (s390_set_pc): Change prototype to take a regcache. Adjust.
7601 (s390_arch_setup): Adjust.
7602 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7603 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7604 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7605 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7606 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7607 regcache. Adjust.
7608 (sparc_breakpoint_at): Adjust.
7609 * linux-xtensa-low.c (xtensa_fill_gregset):
7610 (xtensa_store_gregset):
7611 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7612 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7613 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7614 prototype to take a regcache. Adjust.
7615 * win32-arm-low.c (arm_fetch_inferior_register)
7616 (arm_store_inferior_register): Change prototype to take a
7617 regcache. Adjust.
7618 * win32-i386-low.c (i386_fetch_inferior_register)
7619 (i386_store_inferior_register): Change prototype to take a
7620 regcache. Adjust.
7621 * win32-low.c (child_fetch_inferior_registers)
7622 (child_store_inferior_registers): Change prototype to take a
7623 regcache. Adjust.
7624 (win32_wait): Adjust.
7625 (win32_fetch_inferior_registers): Change prototype to take a
7626 regcache. Adjust.
7627 (win32_store_inferior_registers): Adjust.
7628 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7629 store_inferior_register>: Change prototype to take a regcache.
7630
60c3d7b0
DE
76312010-01-20 Doug Evans <dje@google.com>
7632
7633 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7634 #ifdef.
7635 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7636 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7637
dc146f7c
VP
76382010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7639
7640 * linux-low.c (linux_core_of_thread): New.
7641 (compare_ints, show_process, list_threads): New.
7642 (linux_qxfer_osdata): Report threads and cores.
7643 (linux_target_op): Register linux_core_of_thread.
7644 * remote-utils.c (prepare_resume_reply): Report the core.
7645 (buffer_xml_printf): Support %d specifier.
7646 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7647 New.
7648 (handle_query): Handle qXfer:threads. Announce availability
7649 thereof.
7650 * target.h (struct target_ops): New field core_of_thread.
7651
7803799a
UW
76522010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7653
7654 * Makefile.in (clean): Remove new generated files.
7655 (reg-s390.o, reg-s390.c): Remove rules.
7656 (reg-s390x.o, reg-s390x.c): Likewise.
7657 (s390-linux32.o, s390-linux32.c): Add rules.
7658 (s390-linux64.o, s390-linux64.c): Likewise.
7659 (s390x-linux64.o, s390x-linux64.c): Likewise.
7660 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7661 * linux-s390-low.c: Include <elf.h>.
7662 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7663 (init_registers_s390): Remove prototype.
7664 (init_registers_s390x): Likewise.
7665 (init_registers_s390_linux32): Add prototype.
7666 (init_registers_s390_linux64): Likewise.
7667 (init_registers_s390x_linux64): Likewise.
7668 (s390_num_regs_3264): New define.
7669 (s390_regmap_3264): New global variable.
7670 (s390_cannot_fetch_register): Remove obsolete check.
7671 (s390_cannot_store_register): Likewise.
7672 (s390_collect_ptrace_register): Handle upper/lower register halves.
7673 (s390_supply_ptrace_register): Likewise.
7674 (s390_fill_gregset): Update to register number changes.
7675 (s390_get_hwcap): New routine.
7676 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7677 Install appropriate regmap and register set.
7678
6e7ffa39
JB
76792010-01-01 Joel Brobecker <brobecker@adacore.com>
7680
7681 * server.c (gdbserver_version): Update copyright year to 2010.
7682 * gdbreplay.c (gdbreplay_version): Likewise.
7683
957f3f49
DE
76842009-12-28 Doug Evans <dje@google.com>
7685
7686 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7687 elf/external.h. Include <elf.h> instead but only if necessary.
7688
ca5c370d
PA
76892009-12-28 Pedro Alves <pedro@codesourcery.com>
7690
7691 * linux-low.c (linux_remove_process): Remove `detaching'
7692 parameter. Don't release/detach from thread_db here.
7693 (linux_kill): Release/detach from thread_db here, ...
7694 (linux_detach): ... and here, before actually detaching.
7695 (linux_wait_1): ... and here, when a process exits.
7696 * thread-db.c (any_thread_of): New.
7697 (thread_db_free): Switch the current inferior to a thread of the
7698 passed in process.
7699
4ee62156
DE
77002009-12-21 Doug Evans <dje@google.com>
7701
d90e6a88
DE
7702 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7703
c5f62d5f
DE
7704 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7705 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7706 warning ifndef __NR_tkill. Move setting of errno there too.
7707 Delete unnecessary resetting of errno after syscall.
7708 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7709
10e86dd7
DE
7710 * configure.ac: Check for dladdr.
7711 * config.in: Regenerate.
7712 * configure: Regenerate.
7713 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7714 (try_thread_db_load): Update.
7715
4ee62156
DE
7716 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7717
00f515da
DE
77182009-12-18 Doug Evans <dje@google.com>
7719
e9464885
DE
7720 * event-loop.c: Include unistd.h if it exists.
7721
07d4f67e
DE
7722 * linux-low.c (my_waitpid): Move definition away from being in
7723 between linux_tracefork_child/linux_test_for_tracefork.
7724
00f515da
DE
7725 * gdb_proc_service.h (psaddr_t): Fix type.
7726 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7727 signature to match glibc.
7728
1de1badb
DE
77292009-12-16 Doug Evans <dje@google.com>
7730
7731 * linux-low.c (linux_read_memory): Fix argument to read.
7732
aeeb81d1
PA
77332009-11-26 Pedro Alves <pedro@codesourcery.com>
7734
7735 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7736 events, don't leave current_inferior pointing at null.
7737
10357975
PA
77382009-11-26 Pedro Alves <pedro@codesourcery.com>
7739
7740 * win32-low.c (LOG): Delete.
7741 (OUTMSG): Output to stderr.
7742 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7743 on compile time LOG macro.
7744 (win32_wait): Fix debug output.
7745
cf6e3471
PA
77462009-11-26 Pedro Alves <pedro@codesourcery.com>
7747
7748 * win32-low.c (win32_add_one_solib): If the dll name is
7749 "ntdll.dll", prepend the system directory to the dll path.
7750
0c85e18e
MK
77512009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7752
7753 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7754
9ac544ce 77552009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7756 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7757
7758 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7759 * configure.ac: Check for __mcoldfire__ and set
7760 gdb_cv_m68k_is_coldfire.
7761 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7762 reg-cf.o and reg-m68k.o.
7763 * configure: Regenerated.
7764
fd7dd3e6
PA
77652009-11-16 Pedro Alves <pedro@codesourcery.com>
7766
7767 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7768 Pass it to thread_db_free.
7769 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7770 proper `detaching' argument to linux_remove_process.
7771 * linux-low.h (thread_db_free): Add `detaching' parameter.
7772 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7773 to thread_db_free.
7774 (thread_db_free): Add `detaching' parameter. Only
7775 call td_ta_clear_event if detaching from process.
7776
75aa492e
MK
77772009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7778
7779 * thread-db.c (thread_db_free): Fix typo.
7780
21e1bee4
PP
77812009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7782
7783 PR gdb/10838
7784 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7785
8838b45e
NS
77862009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7787
7788 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7789 with an i686 compiler.
7790 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7791 needed.
7792 * configure: Rebuilt.
7793
8a35fb51
SL
77942009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7795
7796 PR gdb/10783
7797
7798 * server.c (handle_search_memory_1): Correct read_addr initialization
7799 in loop for searching subsequent chunks.
7800
96f15937
PP
78012009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7802
7803 * configure.ac: New --with-libthread-db option.
7804 * thread-db.c: Allow direct dependence on libthread_db.
7805 (thread_db_free): Adjust.
7806 * config.in: Regenerate.
7807 * configure: Likewise.
889bf7c5 7808
5f7d1694
PP
78092009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7810
7811 PR gdb/10757
7812 * thread-db.c (attach_thread): New function.
7813 (maybe_attach_thread): Return success/failure.
7814 (find_new_threads_callback): Adjust.
889bf7c5
PA
7815 (thread_db_find_new_threads): Loop until no new threads.
7816
88e3b899
PA
78172009-10-13 Pedro Alves <pedro@codesourcery.com>
7818
7819 * proc-service.c (ps_lgetregs): Formatting.
7820
cdbfd419
PP
78212009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7822
7823 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7824 * configure.ac: Adjust.
7825 * linux-low.h (struct process_info_private): Move members to struct
7826 thread_db.
7827 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7828 * linux-low.c (linux_remove_process): Adjust.
7829 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7830 * server.c (handle_query): Move code ...
7831 (handle_monitor_command): ... here. New function.
7832 * target.h (struct target_ops): New member.
7833 * thread-db.c (struct thread_db): New.
7834 (libthread_db_search_path): New variable.
7835 (thread_db_create_event, thread_db_enable_reporting)
7836 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7837 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7838 (try_thread_db_load_1, dladdr_to_soname): New functions.
7839 (try_thread_db_load, thread_db_load_search): New functions.
7840 (thread_db_init): Search for libthread_db.
7841 (thread_db_free): New function.
7842 (thread_db_handle_monitor_command): Likewise.
7843 * config.in: Regenerate.
7844 * configure: Regenerate.
889bf7c5 7845
4168d2d6
UW
78462009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7847
7848 * spu-low.c (spu_kill): Wait for inferior to terminate.
7849 Call clear_inferiors.
7850 (spu_detach): Call clear_inferiors.
7851
81ecdfbb
RW
78522009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7853
7854 * aclocal.m4: Regenerate.
7855 * config.in: Likewise.
7856 * configure: Likewise.
7857
0b9ff2c0
UW
78582009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7859
7860 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7861 (parse_spufs_run): New function.
7862 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7863 (ppc_breakpoint_at): Handle SPU breakpoints.
7864
efcbbd14
UW
78652009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7866
7867 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7868 (SPUFS_MAGIC): Define.
7869 (spu_enumerate_spu_ids): New function.
7870 (linux_qxfer_spu): New function.
7871 (linux_target_ops): Install linux_qxfer_spu.
7872
f4d9bade
UW
78732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7874
7875 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7876 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7877 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7878 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7879 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7880 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7881 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7882 (init_registers_powerpc_cell32l): Add prototype.
7883 (init_registers_powerpc_cell64l): Likewise.
7884 (ppc_arch_setup): Detect Cell/B.E. architecture.
7885
96e946ca
RW
78862009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7887
7888 * Makefile.in (datarootdir): New variable.
7889
58d6951d
DJ
78902009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7891
7892 * linux-low.c (linux_write_memory): Update debugging output.
7893 * Makefile.in (clean): Add new descriptions.
7894 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7895 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7896 * configure.srv: Add new files for arm*-*-linux*.
7897 * linux-arm-low.c: Add new declarations.
7898 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7899 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7900 (HWCAP_VFPv3D16): New.
7901 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7902 instead of __IWMMXT__.
7903 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7904 (arm_arch_setup): New.
7905 (target_regsets): Remove #ifdef. Add VFP regset.
7906 (the_low_target): Use arm_arch_setup.
7907
12b42a12
DJ
79082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7909
7910 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7911 the main thread again.
7912
ac8c974e
AR
79132009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7914
7915 Adding Neutrino gdbserver.
7916 * configure: Regenerated.
7917 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7918 * configure.srv (i[34567]86-*-nto*): New target.
7919 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7920 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7921 (nto_comctrl) [__QNX__]: New function.
7922 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7923
4424e0c3 79242009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7925
7926 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7927 srv_tgtobj.
7928
912cf4ba
PA
79292009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7930 Pedro Alves <pedro@codesourcery.com>
7931
7932 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7933 don't support CONTEXT_EXTENDED_REGISTERS.
7934 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7935 (the_low_target): Install them.
7936 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7937 failing with ERROR_PIPE_NOT_CONNECTED.
7938
aa5ca48f
DE
79392009-06-30 Doug Evans <dje@google.com>
7940 Pierre Muller <muller@ics.u-strasbg.fr>
7941
7942 Add h/w watchpoint support to x86-linux, win32-i386.
7943 * Makefile.in (SFILES): Add i386-low.c
7944 (i386_low_h): Define.
7945 (i386-low.o): Add dependencies.
7946 (linux-x86-low.o): Add i386-low.h dependency.
7947 (win32-i386-low.o): Ditto.
7948 * i386-low.c: New file.
7949 * i386-low.h: New file.
7950 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7951 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7952 * linux-low.c (linux_add_process): Initialize arch_private.
7953 (linux_remove_process): Free arch_private.
7954 (add_lwp): Initialize arch_private.
7955 (delete_lwp): Free arch_private.
7956 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7957 provided.
7958 * linux-low.h (process_info_private): New member arch_private.
7959 (lwp_info): New member arch_private.
7960 (linux_target_ops): New members new_process, new_thread,
7961 prepare_to_resume.
7962 (ptid_of): New macro.
7963 * linux-x86-low.c: Include stddef.h, i386-low.h.
7964 (arch_process_info): New struct.
7965 (arch_lwp_info): New struct.
7966 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7967 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7968 (i386_dr_low_get_status): New function.
7969 (x86_insert_point, x86_remove_point): New functions.
7970 (x86_stopped_by_watchpoint): New function.
7971 (x86_stopped_data_address): New function.
7972 (x86_linux_new_process, x86_linux_new_thread): New functions.
7973 (x86_linux_prepare_to_resume): New function.
7974 (the_low_target): Add entries for insert_point, remove_point,
7975 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7976 prepare_to_resume.
7977 * server.c (debug_hw_points): New global.
7978 (monitor_show_help): Document set debug-hw-points.
7979 (handle_query): Process "set debug-hw-points".
7980 * server.h (debug_hw_points): Declare.
7981 (paddress): Declare.
7982 * utils.c (NUMCELLS, CELLSIZE): New macros.
7983 (get_sell, xsnprintf, paddress): New functions.
7984 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7985 remove_point, stopped_by_watchpoint, stopped_data_address.
7986 * win32-i386-low.c: Include i386-low.h.
7987 (debug_reg_state): Replaces dr.
7988 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7989 (i386_dr_low_get_status): New function.
7990 (i386_insert_point, i386_remove_point): New functions.
7991 (i386_stopped_by_watchpoint): New function.
7992 (i386_stopped_data_address): New function.
7993 (i386_initial_stuff): Update.
7994 (get_thread_context,set_thread_context,i386_thread_added): Update.
7995 (the_low_target): Add entries for insert_point,
7996 remove_point, stopped_by_watchpoint, stopped_data_address.
7997 * win32-low.c (win32_insert_watchpoint): New function.
7998 (win32_remove_watchpoint): New function.
7999 (win32_stopped_by_watchpoint): New function.
8000 (win32_stopped_data_address): New function.
8001 (win32_target_ops): Add entries for insert_watchpoint,
8002 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8003 * win32-low.h (win32_target_ops): New members insert_point,
8004 remove_point, stopped_by_watchpoint, stopped_data_address.
8005
d993e290
PA
80062009-06-25 Pedro Alves <pedro@codesourcery.com>
8007
8008 * server.c (process_serial_event): Re-return unsupported, not
8009 error, if the type isn't recognized. Re-allow supporting only
8010 insert or remove packets. Also call require_running for
8011 breakpoints. Add missing break statement to default case. Tidy.
8012 * target.h (struct target_ops): Rename insert_watchpoint to
8013 insert_point, and remove_watchpoint to remove_point.
8014
8015 * linux-low.h (struct linux_target_ops): Likewise.
8016 * linux-low.c (linux_insert_watchpoint): Rename to ...
8017 (linux_insert_point): ... this. Adjust.
8018 (linux_remove_watchpoint): Rename to ...
8019 (linux_remove_point): ... this. Adjust.
8020 (linux_target_ops): Adjust.
8021 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8022 (cris_insert_point): ... this.
8023 (cris_remove_watchpoint): Rename to ...
8024 (cris_remove_point): ... this.
8025 (the_low_target): Adjust.
8026
0f54c268
PM
80272009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8028
8029 * server.c (handle_v_kill): Pass signal_pid to
8030 kill_inferior if multi_process is zero.
8031
c6314022
AR
80322009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8033
8034 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8035 * target.h (target_ops): Comment for *_watchpoint to make it clear
8036 the functions can get types '0' and '1'.
8037
4463ce24
AR
80382009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8039
8040 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8041 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8042 * regcache.c (get_regcache): Likewise.
8043 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8044 * win32-low.c (child_fetch_inferior_registers): Remove check for
8045 regno 0.
8046
cf8fd78b
PA
80472009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8048 Pedro Alves <pedro@codesourcery.com>
8049
8050 * target.h (struct target_ops) <supports_multi_process>: New
8051 callback.
8052 (target_supports_multi_process): New.
8053 * server.c (handle_query): Even if GDB reports support, only
8054 enable multi-process if the target also supports it. Report
8055 multi-process support only if the target backend supports it.
8056 * linux-low.c (linux_supports_multi_process): New function.
8057 (linux_target_ops): Install it as target_supports_multi_process
8058 callback.
8059
47c0c975
DE
80602009-05-24 Doug Evans <dje@google.com>
8061
e09875d4
DE
8062 Global renaming of find_thread_pid to find_thread_ptid.
8063 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8064 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8065 All callers updated.
8066
e27d73f6
DE
8067 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8068 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8069 directly.
8070
47c0c975
DE
8071 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8072 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8073 (linux_resume_one_lwp): Ditto.
8074
2acc282a
DE
80752009-05-23 Doug Evans <dje@google.com>
8076
8077 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8078 from struct inferior_list_entry * to struct lwp_info *.
8079 All callers updated.
8080
9f1036c1
DE
80812009-05-13 Doug Evans <dje@google.com>
8082
8083 * linux-x86-low.c: Don't include assert.h.
8084 (x86_siginfo_fixup): Use fatal, not assert.
8085 (x86_arch_setup): Fix comment.
8086
d0722149
DE
80872009-05-12 Doug Evans <dje@google.com>
8088
8089 Biarch support for i386/amd64 gdbserver.
8090 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8091 Add linux-x86-low.c.
8092 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8093 (linux-x86-low.o): Add.
8094 * linux-x86-64-low.c: Delete.
8095 * linux-i386-low.c: Delete.
8096 * linux-x86-low.c: New file.
8097 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8098 linux-x86-low.o.
8099 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8100 linux-x86-low.o.
8101 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8102 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8103 (linux_child_pid_to_exec_file): New function.
8104 (elf_64_header_p, elf_64_file_p): New functions.
8105 (siginfo_fixup): New function.
8106 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8107 give target a chance to convert layout.
8108 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8109 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8110
fdeb2a12
DE
81112009-05-07 Doug Evans <dje@google.com>
8112
8113 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8114 (regsets_store_inferior_registers): Ditto.
8115
a6dbe5df
PA
81162009-05-06 Pedro Alves <pedro@codesourcery.com>
8117
8118 PR server/10048
8119
8120 * linux-low.c (must_set_ptrace_flags): Delete.
8121 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8122 of the global.
8123 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8124 `lwp->must_set_ptrace_flags' instead.
ba42693b 8125 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8126 (linux_wait_1): ... not here.
8127
5091eb23
DE
81282009-04-30 Doug Evans <dje@google.com>
8129
9f767825
DE
8130 * inferiors.c (started_inferior_callback): New function.
8131 (attached_inferior_callback): New function.
8132 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8133 * server.c (print_started_pid, print_attached_pid): New functions.
8134 (detach_or_kill_for_exit): New function.
8135 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8136 * server.h (have_started_inferiors_p): Declare.
8137 (have_attached_inferiors_p): Declare.
8138
5091eb23
DE
8139 * inferiors.c (remove_process): Fix memory leak, free process.
8140 * linux-low.c (linux_remove_process): New function.
8141 (linux_kill): Call it instead of remove_process.
8142 (linux_detach, linux_wait_1): Ditto.
8143
155c8968
PA
81442009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8145
8146 * configure.srv: Add x86 Windows CE target.
8147
7fe519cb
UW
81482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8149
8150 * inferiors.c (get_thread_process): Make global.
8151 * server.h (get_thread_process): Add prototype.
8152 * thread-db.c (find_one_thread): Use get_thread_process
8153 instead of current_process.
8154 (thread_db_get_tls_address): Do not crash if called when
8155 thread layer is not yet initialized.
8156
5472f405
UW
81572009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8158
8159 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8160 * spu-low.c (current_tid): Rename to ...
8161 (current_ptid): ... this.
8162 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8163 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8164 ptid_get_lwp (current_ptid) instead of current_tid.
8165 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8166 instead of current_tid. Use find_process_pid to verify pid
8167 argument is valid. Pass proper argument to remove_process.
8168 (spu_thread_alive): Compare current_ptid instead of current_tid.
8169 (spu_resume): Likewise.
8170
55ac2b99
PA
81712009-04-02 Pedro Alves <pedro@codesourcery.com>
8172
8173 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8174 variable.
8175
95954743
PA
81762009-04-01 Pedro Alves <pedro@codesourcery.com>
8177
8178 Implement the multiprocess extensions, and add linux multiprocess
8179 support.
8180
8181 * server.h (ULONGEST): Declare.
8182 (struct ptid, ptid_t): New.
8183 (minus_one_ptid, null_ptid): Declare.
8184 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8185 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8186 (struct inferior_list_entry): Change `id' type from unsigned from
8187 to ptid_t.
8188 (struct sym_cache, struct breakpoint, struct
8189 process_info_private): Forward declare.
8190 (struct process_info): Declare.
8191 (current_process): Declare.
8192 (all_processes): Declare.
8193 (initialize_inferiors): Declare.
8194 (add_thread): Adjust to use ptid_t.
8195 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8196 (add_process, remove_process, find_thread_pid): Declare.
8197 (find_inferior_id): Adjust to use ptid_t.
8198 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8199 (multi_process): Declare.
8200 (push_event): Adjust to use ptid_t.
8201 (read_ptid, write_ptid): Declare.
8202 (prepare_resume_reply): Adjust to use ptid_t.
8203 (clear_symbol_cache): Declare.
8204 * inferiors.c (all_processes): New.
8205 (null_ptid, minus_one_ptid): New.
8206 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8207 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8208 (add_thread): Change unsigned long to ptid. Remove gdb_id
8209 parameter. Adjust.
8210 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8211 (gdb_id_to_thread): Rename to ...
8212 (find_thread_pid): ... this. Change unsigned long to ptid.
8213 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8214 (loaded_dll, pull_pid_from_list): Adjust.
8215 (add_process, remove_process, find_process_pid)
8216 (get_thread_process, current_process, initialize_inferiors): New.
8217 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8218 (struct target_waitstatus) <related_pid>: Ditto.
8219 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8220 return type to int.
8221 (struct target_ops) <join>: Add `pid' argument.
8222 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8223 (struct target_ops) <wait>: Add `ptid' field. Change return type
8224 to ptid.
8225 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8226 (mywait): Add `ptid' argument. Change return type to ptid_t.
8227 (target_pid_to_str): Declare.
8228 * target.c (set_desired_inferior): Adjust to use ptids.
8229 (mywait): Add new `ptid' argument. Adjust.
8230 (target_pid_to_str): New.
8231 * mem-break.h (free_all_breakpoints): Declare.
8232 * mem-break.c (breakpoints): Delelete.
8233 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8234 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8235 to use per-process breakpoint list.
8236 (free_all_breakpoints): New.
8237 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8238 (symbol_cache, all_symbols_looked_up): Delete.
8239 (hexchars): New.
8240 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8241 read_ptid): New.
8242 (prepare_resume_reply): Change ptid argument's type from unsigned
8243 long to ptid_t. Adjust. Implement W;process and X;process.
8244 (free_sym_cache, clear_symbol_cache): New.
8245 (look_up_one_symbol): Adjust to per-process symbol cache. *
8246 * server.c (cont_thread, general_thread, step_thread): Change type
8247 to ptid_t.
8248 (attached): Delete.
8249 (multi_process): New.
8250 (last_ptid): Change type to ptid_t.
8251 (struct vstop_notif) <ptid>: Change type to ptid_t.
8252 (queue_stop_reply, push_event): Change `ptid' argument's type to
8253 ptid_t.
8254 (discard_queued_stop_replies): Add `pid' argument.
8255 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8256 changes. Don't reference the `attached' global.
8257 (attach_inferior): Adjust to mywait interface changes.
8258 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8259 features. Handle and report "multiprocess+". Handle
8260 "qAttached:PID".
8261 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8262 changes.
8263 (handle_v_kill): New.
8264 (handle_v_stopped): Adjust to use target_pid_to_str.
8265 (handle_v_requests): Allow multiple attaches and runs when
8266 multiprocess extensions are in effect. Handle "vKill".
8267 (myresume): Adjust to use ptids.
8268 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8269 (handle_status): Adjust to discard_queued_stop_replies interface
8270 change.
8271 (first_thread_of, kill_inferior_callback)
8272 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8273 (main): Call initialize_inferiors. Adjust to use ptids, killing
8274 and detaching from all inferiors. Handle multiprocess packet
8275 variants.
8276 * linux-low.h: Include gdb_proc_service.h.
8277 (struct process_info_private): New.
8278 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8279 <lwpid_of>: Use ptid_get_lwp.
8280 (get_lwp_thread): Adjust.
8281 (struct lwp_info): Add `dead' member.
8282 (find_lwp_pid): Declare.
8283 * linux-low.c (thread_db_active): Delete.
8284 (new_inferior): Adjust comment.
8285 (inferior_pid): Delete.
8286 (linux_add_process): New.
8287 (handle_extended_wait): Adjust.
8288 (add_lwp): Change unsigned long to ptid.
8289 (linux_create_inferior): Add process to processes table. Adjust
8290 to use ptids. Don't set new_inferior here.
8291 (linux_attach_lwp): Rename to ...
8292 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8293 it. Adjust to use ptids.
8294 (linux_attach_lwp): New.
8295 (linux_attach): Add process to processes table. Don't set
8296 new_inferior here.
8297 (struct counter): New.
8298 (second_thread_of_pid_p, last_thread_of_process_p): New.
8299 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8300 multiple processes.
8301 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8302 processes. Remove process from process table.
8303 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8304 to multiple processes.
8305 (any_thread_of): New.
8306 (linux_detach): Add `pid' argument, and handle it. Remove process
8307 from processes table.
8308 (linux_join): Add `pid' argument. Handle it.
8309 (linux_thread_alive): Change unsighed long argument to ptid_t.
8310 Consider dead lwps as not being alive.
8311 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8312 threads we're not interested in.
8313 (same_lwp, find_lwp_pid): New.
8314 (linux_wait_for_lwp): Change `pid' argument's type from int to
8315 ptid_t. Adjust.
8316 (linux_wait_for_event): Rename to ...
8317 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8318 from int to ptid_t. Adjust.
8319 (linux_wait_for_event): New.
8320 (linux_wait_1): Add `ptid' argument. Change return type to
8321 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8322 that exit from the process table.
8323 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8324 Adjust.
8325 (mark_lwp_dead): New.
8326 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8327 stopping all threads, mark its main lwp as dead.
8328 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8329 ptids.
8330 (fetch_register, usr_store_inferior_registers)
8331 (regsets_fetch_inferior_registers)
8332 (regsets_store_inferior_registers, linux_read_memory)
8333 (linux_write_memory): Inline `inferior_pid'.
8334 (linux_look_up_symbols): Adjust to use per-process
8335 `thread_db_active'.
8336 (linux_request_interrupt): Adjust to use ptids.
8337 (linux_read_auxv): Inline `inferior_pid'.
8338 (initialize_low): Don't reference thread_db_active.
8339 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8340 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8341 (ps_getpid): Return the pid of the current inferior.
8342 * thread-db.c (proc_handle, thread_agent): Delete.
8343 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8344 per-process data.
8345 (find_one_thread): Change argument type to ptid_t. Adjust to
8346 per-process data.
8347 (maybe_attach_thread): Adjust to per-process data and ptids.
8348 (thread_db_find_new_threads): Ditto.
8349 (thread_db_init): Ditto.
8350 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8351 processes table. Adjust to use ptids.
8352 (spu_kill, spu_detach): Adjust interface. Remove process from
8353 processes table.
8354 (spu_join, spu_thread_alive): Adjust interface.
8355 (spu_wait): Adjust interface. Remove process from processes
8356 table. Adjust to use ptids.
8357 * win32-low.c (current_inferior_tid): Delete.
8358 (current_inferior_ptid): New.
8359 (debug_event_ptid): New.
8360 (thread_rec): Take a ptid. Adjust.
8361 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8362 (child_delete_thread): Ditto.
8363 (do_initial_child_stuff): Add `attached' argument. Add process to
8364 processes table.
8365 (child_fetch_inferior_registers, child_store_inferior_registers):
8366 Adjust.
8367 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8368 (win32_attach): Pass 1 to do_initial_child_stuff.
8369 (win32_kill): Adjust interface. Remove process from processes
8370 table.
8371 (win32_detach): Ditto.
8372 (win32_join): Adjust interface.
8373 (win32_thread_alive): Take a ptid.
8374 (win32_resume): Adjust to use ptids.
8375 (get_child_debug_event): Ditto.
8376 (win32_wait): Adjust interface. Remove exiting process from
8377 processes table.
8378
bd99dc85
PA
83792009-04-01 Pedro Alves <pedro@codesourcery.com>
8380
8381 Non-stop mode support.
8382
8383 * server.h (non_stop): Declare.
8384 (gdb_client_data, handler_func): Declare.
8385 (delete_file_handler, add_file_handler, start_event_loop):
8386 Declare.
8387 (handle_serial_event, handle_target_event, push_event)
8388 (putpkt_notif): Declare.
8389 * target.h (enum resume_kind): New.
8390 (struct thread_resume): Replace `step' field by `kind' field.
8391 (TARGET_WNOHANG): Define.
8392 (struct target_ops) <wait>: Add `options' argument.
8393 <supports_non_stop, async, start_non_stop>: New fields.
8394 (target_supports_non_stop, target_async): New.
8395 (start_non_stop): Declare.
8396 (mywait): Add `options' argument.
8397 * target.c (mywait): Add `options' argument. Print child exit
8398 notifications here.
8399 (start_non_stop): New.
8400 * server.c (non_stop, own_buf, mem_buf): New globals.
8401 (struct vstop_notif): New.
8402 (notif_queue): New global.
8403 (queue_stop_reply, push_event, discard_queued_stop_replies)
8404 (send_next_stop_reply): New.
8405 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8406 interface changes.
8407 (attach_inferior): In non-stop mode, don't wait for the target
8408 here.
8409 (handle_general_set): Handle QNonStop.
8410 (handle_query): When handling qC, return the current general
8411 thread, instead of the first thread of the list.
8412 (handle_query): If the backend supports non-stop mode, include
8413 QNonStop+ in the qSupported query response.
8414 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8415 and non-stop mode.
8416 (handle_v_attach, handle_v_run): Handle non-stop mode.
8417 (handle_v_stopped): New.
8418 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8419 (myresume): Adjust to use resume_kind. Handle non-stop.
8420 (queue_stop_reply_callback): New.
8421 (handle_status): Handle non-stop mode.
8422 (main): Clear non_stop flag on reconnection. Use the event-loop.
8423 Refactor serial protocol handling from here ...
8424 (process_serial_event): ... to this new function. When GDB
8425 selects any thread, select one here. In non-stop mode, wait until
8426 GDB acks all pending events before exiting.
8427 (handle_serial_event, handle_target_event): New.
8428 * remote-utils.c (remote_open): Install remote_desc in the event
8429 loop.
8430 (remote_close): Remove remote_desc from the event loop.
8431 (putpkt_binary): Rename to...
8432 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8433 (putpkt_binary): New as wrapper around putpkt_binary_1.
8434 (putpkt_notif): New.
8435 (prepare_resume_reply): In non-stop mode, don't change the
8436 general_thread.
8437 * event-loop.c: New.
8438 * Makefile.in (OBJ): Add event-loop.o.
8439 (event-loop.o): New rule.
8440
8441 * linux-low.h (pid_of): Moved here.
8442 (lwpid_of): New.
8443 (get_lwp_thread): Use lwpid_of.
8444 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8445 * linux-low.c (pid_of): Delete.
8446 (inferior_pid): Use lwpid_of.
8447 (linux_event_pipe): New.
8448 (target_is_async_p): New.
8449 (delete_lwp): New.
8450 (handle_extended_wait): Use lwpid_of.
8451 (add_lwp): Don't set lwpid field.
8452 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8453 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8454 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8455 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8456 first. Adjust to linux_wait_for_event interface changes. Use
8457 lwpid_of.
8458 (linux_detach): Don't delete the main lwp here.
8459 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8460 (status_pending_p): Don't consider explicitly suspended lwps.
8461 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8462 pointer. Add OPTIONS argument. Change return type to int. Use
8463 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8464 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8465 pointer. Add status pointer argument. Return a pid instead of a
8466 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8467 changes. In non-stop mode, don't switch to a random thread.
8468 (linux_wait): Rename to...
8469 (linux_wait_1): ... this. Add target_options argument, and handle
8470 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8471 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8472 clean exit and signal exit code. Don't stop all threads in
8473 non-stop mode. In all-stop mode, only stop all threads when
8474 reporting a stop to GDB. Handle explicit thread stop requests.
8475 (async_file_flush, async_file_mark): New.
8476 (linux_wait): New.
8477 (send_sigstop): Use lwpid_of.
8478 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8479 interface changes. In non-stop mode, don't switch to a random
8480 thread.
8481 (linux_resume_one_lwp): Use lwpid_of.
8482 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8483 (linux_resume_one_thread): ... this. Handle resume_stop. In
8484 non-stop mode, don't look for pending flag in all threads.
8485 (resume_status_pending_p): Don't consider explicitly suspended
8486 threads.
8487 (my_waitpid): Reimplement. Emulate __WALL.
8488 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8489 Use lwpid_of.
8490 (sigchld_handler, linux_supports_non_stop, linux_async)
8491 (linux_start_non_stop): New.
8492 (linux_target_ops): Register linux_supports_non_stop, linux_async
8493 and linux_start_non_stop.
8494 (initialize_low): Install SIGCHLD handler.
8495 * thread-db.c (thread_db_create_event, find_one_thread)
8496 (thread_db_get_tls_address): Use lwpid_of.
8497 * win32-low.c (win32_detach): Adjust to use resume_kind.
8498 (win32_wait): Add `options' argument.
8499 * spu-low.c (spu_resume): Adjust to use resume_kind.
8500 (spu_wait): Add `options' argument.
8501
5b1c542e
PA
85022009-04-01 Pedro Alves <pedro@codesourcery.com>
8503
8504 Decouple target code from remote protocol.
8505
8506 * target.h (enum target_waitkind): New.
8507 (struct target_waitstatus): New.
8508 (struct target_ops) <wait>: Return an unsigned long. Take a
8509 target_waitstatus pointer instead of a char pointer.
8510 (mywait): Likewise.
8511 * target.c (mywait): Change prototype to return an unsigned long.
8512 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8513 * server.h (thread_from_wait, old_thread_from_wait): Delete
8514 declarations.
8515 (prepare_resume_reply): Change prototype to take a
8516 target_waitstatus.
8517 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8518 (last_status, last_ptid): New.
8519 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8520 pid instead of a signal.
8521 (attach_inferior): Remove "status" and "signal" parameters.
8522 Adjust.
8523 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8524 not as an address.
8525 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8526 (handle_v_requests, myresume): Remove "status" and "signal"
8527 parameters. Adjust.
8528 (handle_status): New.
8529 (main): Delete local `status'. Adjust.
8530 * remote-utils.c: Include target.h.
8531 (prepare_resume_reply): Change prototype to take a
8532 target_waitstatus. Adjust.
8533
8534 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8535 interface.
8536 * spu-low.c (spu_wait): Adjust.
8537 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8538 Delete.
8539 (win32_wait): Adjust.
8540
2bd7c093
PA
85412009-04-01 Pedro Alves <pedro@codesourcery.com>
8542
8543 * target.h (struct thread_resume): Delete leave_stopped member.
8544 (struct target_ops): Add a `n' argument to the `resume' callback.
8545 * server.c (start_inferior): Adjust.
8546 (handle_v_cont, myresume): Adjust.
8547 * linux-low.c (check_removed_breakpoint): Adjust to resume
8548 interface change, and to removed leave_stopped field.
8549 (resume_ptr): Delete.
8550 (struct thread_resume_array): New.
8551 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8552 resume interface change.
8553 (linux_continue_one_thread, linux_queue_one_thread)
8554 (resume_status_pending_p): Check if the resume field is NULL
8555 instead of checking the leave_stopped member.
8556 (linux_resume): Adjust to the target resume interface change.
8557 * spu-low.c (spu_resume): Adjust to the target resume interface
8558 change.
8559 * win32-low.c (win32_detach, win32_resume): Ditto.
8560
c35fafde
PA
85612009-04-01 Pedro Alves <pedro@codesourcery.com>
8562
8563 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8564 flag.
8565 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8566 pending.
8567 (linux_continue_one_thread): Only preserve the stepping flag if
8568 there's a pending breakpoint.
8569
0a59d50b
PA
85702009-03-31 Pedro Alves <pedro@codesourcery.com>
8571
8572 * server.c (main): After the inferior having exited, call
8573 remote_close before exiting gdbserver.
8574
f04c6d38
TJB
85752009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8576
8577 Fix size of FPSCR in Power 7 processors.
8578 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8579 (PPC_FEATURE_HAS_DFP): New #define.
8580 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8581 size of the FPSCR.
8582
78e5cee6
PA
85832009-03-23 Pedro Alves <pedro@codesourcery.com>
8584
8585 * server.c (handle_query) Whitespace and formatting.
8586
1b3f6016
PA
85872009-03-22 Pedro Alves <pedro@codesourcery.com>
8588
8589 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8590 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8591 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8592 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8593 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8594 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8595 Makefile.in, configure.ac: Fix whitespace throughout.
8596 * configure: Regenerate.
8597
a07b2135
PA
85982009-03-22 Pedro Alves <pedro@codesourcery.com>
8599
8600 * inferiors.c (find_inferior): Make it safe for the callback
8601 function to delete the currently iterated inferior.
8602
67cc2626
PA
86032009-03-22 Pedro Alves <pedro@codesourcery.com>
8604
8605 * Makefile.in (linuw_low_h): Move higher.
8606 (thread-db.o): Depend on $(linux_low_h).
8607
54a0b537
PA
86082009-03-17 Pedro Alves <pedro@codesourcery.com>
8609
8610 Rename "process" to "lwp" throughout.
8611
8612 * linux-low.c (all_processes): Rename to...
8613 (all_lwps): ... this.
8614 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8615 (add_process): Rename to ...
8616 (add_lwp): ... this. Adjust.
8617 (linux_create_inferior): Adjust.
8618 (linux_attach_lwp): Adjust.
8619 (linux_attach): Adjust.
8620 (linux_kill_one_process): Rename to ...
8621 (linux_kill_one_lwp): ... this. Adjust.
8622 (linux_kill): Adjust.
8623 (linux_detach_one_process): Rename to ...
8624 (linux_detach_one_lwp): ... this. Adjust.
8625 (linux_detach): Adjust.
8626 (check_removed_breakpoint): Adjust.
8627 (status_pending_p): Adjust.
8628 (linux_wait_for_process): Rename to ...
8629 (linux_wait_for_lwp): ... this. Adjust.
8630 (linux_wait_for_event): Adjust.
8631 (send_sigstop): Adjust.
8632 (wait_for_sigstop): Adjust.
8633 (stop_all_processes): Rename to ...
8634 (stop_all_lwps): ... this.
8635 (linux_resume_one_process): Rename to ...
8636 (linux_resume_one_lwp): ... this. Adjust.
8637 (linux_set_resume_request, linux_continue_one_thread)
8638 (linux_queue_one_thread, resume_status_pending_p)
8639 (usr_store_inferior_registers, regsets_store_inferior_registers)
8640 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8641 Adjust.
8642 * linux-low.h (get_process): Rename to ...
8643 (get_lwp): ... this. Adjust.
8644 (get_thread_process): Rename to ...
8645 (get_thread_lwp): ... this. Adjust.
8646 (get_process_thread): Rename to ...
8647 (get_lwp_thread): ... this. Adjust.
8648 (struct process_info): Rename to ...
8649 (struct lwp_info): ... this.
8650 (all_processes): Rename to ...
8651 (all_lwps): ... this.
8652 * proc-service.c (ps_lgetregs): Adjust.
8653 * thread-db.c (thread_db_create_event, find_one_thread)
8654 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8655
0b16c5cf
PA
86562009-03-14 Pedro Alves <pedro@codesourcery.com>
8657
8658 * server.c (handle_query): Handle "qAttached".
8659
32de4b9d
NS
86602009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8661
8662 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8663 GPLv3, update license URL.
8664
2aecd87f
DE
86652009-03-01 Doug Evans <dje@google.com>
8666
93efd302 8667 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8668 (server_h): Add gdb_signals.h.
8669 (signals.o): Update.
8670 * server.h (target_signal_from_host,target_signal_to_host_p)
8671 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8672
86b1f9c5
PM
86732009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8674
8675 * remote-utils.c (getpkt): Also generate remote-debug
8676 information if noack_mode is set.
8677
4aa995e1
PA
86782009-02-06 Pedro Alves <pedro@codesourcery.com>
8679
8680 * server.c (handle_query): Report qXfer:siginfo:read and
8681 qXfer:siginfo:write as supported and handle them.
8682 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8683 * linux-low.c (linux_xfer_siginfo): New.
8684 (linux_target_ops): Set it.
8685
62709adf
PA
86862009-01-26 Pedro Alves <pedro@codesourcery.com>
8687
8688 * server.c (gdbserver_usage): Mention --remote-debug.
8689 (main): Accept '--remote-debug' switch.
8690
aef93bd7
DE
86912009-01-18 Doug Evans <dje@google.com>
8692
8693 * regcache.c (new_register_cache): No need to check result of xcalloc.
8694 * server.c (handle_search_memory): Back out calls to xmalloc,
8695 result is checked and error is returned to user upon failure.
8696 (handle_query): Ditto. Add more checks for result of malloc.
8697 (handle_v_cont): Check result of malloc, report error back to
8698 user upon failure.
8699 (handle_v_run): Ditto. Call freeargv.
8700 * server.h (freeargv): Declare.
8701 * utils.c (freeargv): New fn.
8702
54363045
DE
87032009-01-15 Doug Evans <dje@google.com>
8704
f626972c
DE
8705 * gdbreplay.c (perror_with_name): Make arg const char *.
8706 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8707 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8708 * utils.c (perror_with_name): Make arg const char *.
54363045 8709
18aae699
PA
87102009-01-14 Pedro Alves <pedro@codesourcery.com>
8711
8712 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8713 when handling a EXIT_PROCESS_DEBUG_EVENT.
8714
ff703abe
JB
87152009-01-06 Joel Brobecker <brobecker@adacore.com>
8716
8717 * gdbreplay.c (gdbreplay_version): Update copyright year.
8718 * server.c (gdbserver_version): Likewise.
8719
f21cc1a2 87202009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8721
8722 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8723 (handle_extended_wait): Improve comment.
0e21c1ec 8724
bca929d3
DE
87252008-12-13 Doug Evans <dje@google.com>
8726
8727 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8728 * server.h (ATTR_MALLOC): New macro.
8729 (xmalloc,xcalloc,xstrdup): Declare.
8730 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8731 * inferiors.c: Ditto.
8732 * linux-low.c: Ditto.
8733 * mem-break.c: Ditto.
8734 * regcache.c: Ditto.
8735 * remote-utils.c: Ditto.
8736 * server.c: Ditto.
8737 * target.c: Ditto.
8738 * win32-low.c: Ditto.
8739
97438e3f
DE
87402008-12-12 Doug Evans <dje@google.com>
8741
896c7fbb
DE
8742 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8743 in debugging printf.
8744
97438e3f
DE
8745 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8746
e3b886f8
DE
87472008-12-09 Doug Evans <dje@google.com>
8748
8749 * linux-low.h (struct process_info): Delete member tid, unused.
8750 * thread-db.c (find_one_thread): Update.
8751 (maybe_attach_thread): Update.
8752
07e059b5
VP
87532008-12-02 Pedro Alves <pedro@codesourcery.com>
8754
889bf7c5
PA
8755 * target.h (struct target_ops): Add qxfer_osdata member.
8756 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8757 and dirent.h.
8758 (linux_qxfer_osdata): New functions.
8759 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8760 callback.
8761 * server.c (handle_query): Handle "qXfer:osdata:read:".
8762 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8763 (buffer_xml_printf): New functions.
8764 * server.h (struct buffer): New.
8765 (buffer_grow_str, buffer_grow_str0): New macros.
8766 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8767 (buffer_xml_printf): Declare.
07e059b5 8768
4cab47ab
DE
87692008-11-24 Doug Evans <dje@google.com>
8770
8771 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8772
f142445f
DJ
87732008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8774
8775 * server.c (handle_v_run): Always use the supplied argument list.
8776
d0107bb6 87772008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8778
d0107bb6
BW
8779 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8780 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8781
2c4ad781
TJB
87822008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8783
8784 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8785 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8786 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8787 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8788 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8789 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8790 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8791 XML target descriptions.
8792 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8793 when inferior is running on an ISA 2.05 or later processor. Add
8794 special case to return offset for full 64-bit slot of FPSCR when
8795 in 32-bits.
8796
dfb64f85
DJ
87972008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8798
8799 * Makefile.in (SFILES, clean): Added sparc64 files.
8800 (reg-sparc64.o, reg-sparc64.c): New.
8801 * configure.srv (sparc*-*-linux*): New configuration.
8802 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8803 syscall arguments for SPARC.
8804 (regsets_store_inferior_registers): Likewise.
8805 * linux-sparc-low.c: New file.
8806
66b6e1dd
DE
88072008-10-21 Doug Evans <dje@google.com>
8808
8809 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8810 (READLINE_DIR,READLINE_DEP): Delete.
8811 (INTERNAL_CFLAGS): Update.
8812 (LINTFLAGS): Update.
8813
9b710a42
PA
88142008-10-10 Pedro Alves <pedro@codesourcery.com>
8815
8816 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8817 whole argv from the last run, not just argv[0].
8818
5822d809
PA
88192008-09-08 Pedro Alves <pedro@codesourcery.com>
8820
8821 * regcache.c (new_register_cache): Return NULL if the register
8822 cache size isn't known yet.
8823 (free_register_cache): Avoid dereferencing a NULL regcache.
8824
74aac56f
DJ
88252008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8826
8827 * configure.srv: Merge MIPS and MIPS64.
8828
400b20f5
MR
88292008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8830
8831 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8832
677c5bb1
LM
88332008-08-18 Luis Machado <luisgpm@br.ibm.com>
8834
8835 * Makefile.in: Add required vsx dependencies.
8836
8837 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8838 Declare init_registers_powerpc_vsx32l.
8839 Declare init_registers_powerpc_vsx64l.
8840 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8841 (ppc_arch_setup): Check for VSX in hwcap.
8842 (ppc_fill_vsxregset): New function.
8843 (ppc_store_vsxregset): New function.
8844 Add new VSX entry in regset_info target_regsets.
8845
8846 * configure.srv: Add new VSX dependencies.
8847
a6f3e723
SL
88482008-08-12 Pedro Alves <pedro@codesourcery.com>
8849
8850 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8851 (remote_open): Set or clear transport_is_reliable.
8852 (putpkt_binary): Don't expect acks in noack mode.
8853 (getpkt): Don't send ack/nac in noack mode.
8854 * server.c (handle_general_set): Handle QStartNoAckMode.
8855 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8856 qSupported.
8857 (main): Reset noack_mode on every connection.
8858 * server.h (noack_mode): Declare.
8859
a417dc56
RW
88602008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8861
8862 * Makefile.in (GDBREPLAY_OBS): New variable.
8863 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8864
3221518c
UW
88652008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8866 Daniel Jacobowitz <dan@codesourcery.com>
8867
8868 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8869 (usr_store_inferior_registers): Likewise.
8870 (regsets_store_inferior_registers): Likewise.
8871
ec56be1b
PA
88722008-07-31 Rolf Jansen <rj@surtec.com>
8873 Pedro Alves <pedro@codesourcery.com>
8874
8875 * configure.ac: Check for memmem declaration.
8876 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8877 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8878 (disable_packet_qfThreadInfo): Unconditionally compile.
8879 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8880 * configure, config.in: Regenerate.
8881
2fe5e3ff
DE
88822008-07-28 Doug Kwan <dougkwan@google.com>
8883
8884 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8885 (linux_write_memory): Remove declaration of errno.
8886
836acd6d
UW
88872008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8888
8889 * linux-low.c (handle_extended_wait): Do not use "status"
8890 variable uninitialized.
8891
aeba519e
PA
88922008-07-07 Pedro Alves <pedro@codesourcery.com>
8893
8894 * server.c (handle_v_attach): Inhibit reporting dll changes.
8895
db42f210
PA
88962008-06-27 Pedro Alves <pedro@codesourcery.com>
8897
8898 * remote-utils.c (prepare_resume_reply): If requested, don't
8899 output "thread:TID" in the T stop reply.
8900
8901 * server.c (disable_packet_vCont, disable_packet_Tthread)
8902 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8903 (handle_query): If requested, disable support for qC, qfThreadInfo
8904 and qsThreadInfo.
8905 (handle_v_requests): If requested, disable support for vCont.
8906 (gdbserver_show_disableable): New.
8907 (main): Handle --disable-packet and --disable-packet=LIST.
8908
8909 * server.h (disable_packet_vCont, disable_packet_Tthread)
8910 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8911
8e4c5421
CD
89122008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8913
8914 * server.c (gdbserver_usage): Mention --version.
8915
6e23a804
DJ
89162008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8917
8918 * Makefile.in (gdbreplay.o): New rule.
8919
90aa6a40
JM
89202008-06-06 Joseph Myers <joseph@codesourcery.com>
8921
8922 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8923 message, not gdbserver.
8924
c16158bc 89252008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8926 Nathan Sidwell <nathan@codesourcery.com>
8927 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8928
8929 * acinclude.m4: Include ../../config/acx.m4.
8930 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8931 * configure, config.in: Regenerate.
8932 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8933 * server.c (gdbserver_version): Print PKGVERSION.
8934 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8935 (main): Adjust gdbserver_usage calls.
8936 * gdbreplay.c (version, host_name): Add declarations.
8937 (gdbreplay_version, gdbreplay_usage): New.
8938 (main): Accept --version and --help options.
8939
aeb75bf5
DJ
89402008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8941
8942 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8943 (arm_breakpoint_at): Handle Thumb.
8944 (the_low_target): Add comment.
8945
76b233dd
UW
89462008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8947
8948 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8949
08388c79
DE
89502008-05-09 Doug Evans <dje@google.com>
8951
a3c83fae
DE
8952 * server.h (decode_search_memory_packet): Declare.
8953 * remote-utils.c (decode_search_memory_packet): New fn.
8954 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8955 (handle_search_memory): New fn.
8956 (handle_query): Process qSearch:memory packets.
8957
bb9c3d36
UW
89582008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8959
8960 * regcache.c (registers_length): Remove.
8961 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8962 full register packet.
8963 * regcache.h (registers_length): Remove prototype.
8964 * server.h (PBUFSIZ): Define to 16384.
8965
7284e1be
UW
89662008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8967
8968 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8969 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8970 powerpc-64l.o, and powerpc-altivec64l.o.
8971 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8972 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8973 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8974 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8975 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8976 to srv_xmlfiles.
8977
8978 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8979 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8980 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8981 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8982 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8983 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8984 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8985 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8986 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8987 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8988 (clean): Update.
8989
8990 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8991 (init_registers_powerpc_32l): ... this new prototype.
8992 (init_registers_powerpc_32): Remove, replace by ...
8993 (init_registers_powerpc_altivec32l): ... this new prototype.
8994 (init_registers_powerpc_e500): Remove, replace by ...
8995 (init_registers_powerpc_e500l): ... this new prototype.
8996 (init_registers_ppc64): Remove, replace by ...
8997 (init_registers_powerpc_64l): ... this new prototype.
8998 (init_registers_powerpc_64): Remove, replace by ...
8999 (init_registers_powerpc_altivec64l): ... this new prototype.
9000 (ppc_num_regs): Set to 73.
9001 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9002 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9003 (ppc_cannot_store_register): Handle orig_r3 and trap.
9004 (ppc_arch_setup): Update init_registers_... calls.
9005 (ppc_fill_gregset): Handle orig_r3 and trap.
9006
9007 * inferiors.c (clear_inferiors): Reset current_inferior.
9008
fdc59709
PB
90092008-04-23 Paolo Bonzini <bonzini@gnu.org>
9010
889bf7c5
PA
9011 * acinclude.m4: Add override.m4.
9012 * configure: Regenerate.
fdc59709 9013
c9b2f845
UW
90142008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9015
9016 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9017 initial call to init_register_ppc64.
9018
550512b8
UW
90192008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9020
43aaf8b6
PA
9021 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9022 single powerpc*-*-linux* case.
550512b8
UW
9023 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9024
b6430ec3
UW
90252008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9026
9027 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9028 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9029 from reg_xmlfiles.
9030 * linux-ppc-low.c: Include <elf.h>.
9031 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9032 (ppc_hwcap): New global variable.
9033 (ppc_regmap): Remove __SPE__ #ifdef sections.
9034 (ppc_regmap_e500): New global variable.
9035 (ppc_cannot_store_register): Update __SPE__ special case.
9036 (ppc_get_hwcap): New function.
9037 (ppc_arch_setup): Use it to determine whether inferior supports
9038 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9039 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9040 Do not access registers if target does not support AltiVec.
9041 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9042 Do not access registers if target does not support SPE.
9043 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9044
52fa2412
UW
90452008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9046
9047 * linux-low.c (disabled_regsets, num_regsets): New.
9048 (use_regsets_p): Delete.
9049 (linux_wait_for_process): Clear disabled_regsets.
9050 (regsets_fetch_inferior_registers): Check and set it.
9051 (regsets_store_inferior_registers): Likewise.
9052 (linux_fetch_registers, linux_store_registers): Do not use
9053 use_regsets_p.
9054 (initialize_low): Allocate disabled_regsets.
9055
e28b3332
DJ
90562008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9057
9058 * Makefile.in (LIBOBJS): New.
9059 (OBS): Use LIBOBJS.
9060 (memmem.o): New rule.
9061 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9062 * configure: Regenerated.
9063
4536995d
UW
90642008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9065
9066 * server.c (handle_query): Never return "unsupported" for
9067 qXfer:features:read queries.
9068
221c031f
UW
90692008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9070
9071 * server.c (get_features_xml): Fix inverted condition.
9072 (handle_query): Always support qXfer:feature:read.
9073
ccd213ac
DJ
90742008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9075
9076 * server.c (wrapper_argv): New.
9077 (start_inferior): Handle wrapper_argv. If set, expect an extra
9078 trap.
9079 (gdbserver_usage): Document --wrapper.
9080 (main): Parse --wrapper.
9081
6fe305f7
UW
90822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9083
9084 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9085 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9086 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9087 (ppc_set_pc): Likewise.
9088 (ppc_arch_setup): New function.
9089 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9090 of collect_register.
889bf7c5 9091 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9092
5b0a002e
UW
90932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9094
9095 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9096 instead of linux-ppc64-low.o.
9097 * linux-ppc64-low.c: Remove file.
9098 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9099 (linux-ppc64-low.o): Remove rule.
9100
9101 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9102 (init_registers_powerpc_64): Likewise.
9103 (ppc_regmap): Conditionally define depending on __powerpc64__.
9104 (ppc_cannot_store_register): Do not special-case "fpscr" when
9105 compiled on __powerpc64__.
9106 (ppc_collect_ptrace_register): New function.
9107 (ppc_supply_ptrace_register): New function.
9108 (ppc_breakpoint): Change type to "unsigned int".
9109 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9110 (the_low_target): Conditionally provide initializers for the
889bf7c5 9111 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9112 collect_ptrace_register and supply_ptrace_register members.
9113
9b4b61c8
UW
91142008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9115
9116 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9117 * server.c (gdbserver_xmltarget): Define.
9118 (get_features_xml): Use it to replace "target.xml" and arch_string.
9119
9120 * configure.srv: Remove srv_xmltarget. Add XML files that were
9121 mentioned there to srv_xmlfiles instead. Remove conditional tests
9122 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9123 srv_xmlfiles and srv_regobj to include all possible choices.
9124 * configure.ac (srv_xmltarget): Remove.
9125 (srv_xmlfiles): Do not add "target.xml".
9126 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9127 checks for supplementary target information.
9128 * configure: Regenerate.
9129 * Makefile.in (XML_TARGET): Remove.
9130 (target.xml): Remove rule.
9131 (clean): Do not clean up target.xml.
9132 (.PRECIOUS): Do not mention target.xml.
9133
9134 * target.h (struct target_ops): Remove arch_string member.
9135 * linux-low.c (linux_arch_string): Remove.
9136 (linux_target_ops): Remove arch_string initializer.
9137 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9138 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9139 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9140 * spu-low.c (spu_arch_string): Remove.
9141 (spu_target_ops): Remove arch_string initializer.
9142 * win32-low.c (win32_arch_string): Remove.
9143 (win32_target_ops): Remove arch_string initializer.
9144 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9145 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9146 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9147
ee1a7ae4
UW
91482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9149
9150 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9151 by collect_ptrace_register and supply_ptrace_register hooks.
9152 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9153 instead of checking for the_low_target.left_pad_xfer.
9154 (usr_store_inferior_registers): Use collect_ptrace_register callback
9155 instead of checking for the_low_target.left_pad_xfer.
9156
9157 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9158 (s390_supply_ptrace_register): Likewise.
9159 (s390_fill_gregset): Call s390_collect_ptrace_register.
9160 (the_low_target): Update.
9161
9162 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9163 (ppc_supply_ptrace_register): Likewise.
9164 (the_low_target): Update.
9165
9166 * linux-i386-low.c (the_low_target): Update.
9167 * linux-x86-64-low.c (the_low_target): Update.
9168
d61ddec4
UW
91692008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9170
9171 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9172 reg-s390.o and reg-s390x.o.
9173
9174 * linux-low.c (new_inferior): New global variable.
9175 (linux_create_inferior, linux_attach): Set it.
9176 (linux_wait_for_process): Call the_low_target.arch_setup after the
9177 target has stopped for the first time.
9178 (initialize_low): Do not call the_low_target.arch_setup.
9179
9180 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9181 (s390_set_pc): Likewise.
9182 (s390_arch_setup): New function.
9183 (the_low_target): Use s390_arch_setup as arch_setup routine.
9184
9185 * regcache.c (realloc_register_cache): New function.
9186 (set_register_cache): Call it for each existing regcache.
9187
d05b4ac3
UW
91882008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9189
9190 * server.h (init_registers): Remove prototype.
9191
9192 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9193 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9194 instead of init_registers ().
9195 * linux-arm-low.c (init_registers_arm): Add prototype.
9196 (init_registers_arm_with_iwmmxt): Likewise.
9197 (the_low_target): Add initializer for arch_setup field.
9198 * linux-cris-low.c (init_registers_cris): Add prototype.
9199 (the_low_target): Add initializer for arch_setup field.
9200 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9201 (the_low_target): Add initializer for arch_setup field.
9202 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9203 (the_low_target): Add initializer for arch_setup field.
9204 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9205 (the_low_target): Add initializer for arch_setup field.
9206 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9207 (the_low_target): Add initializer for arch_setup field.
9208 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9209 (the_low_target): Add initializer for arch_setup field.
9210 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9211 (init_registers_mips64_linux): Likewise.
9212 (the_low_target): Add initializer for arch_setup field.
9213 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9214 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9215 (the_low_target): Add initializer for arch_setup field.
9216 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9217 (init_registers_powerpc_64): Likewise.
9218 (the_low_target): Add initializer for arch_setup field.
9219 * linux-s390-low.c (init_registers_s390): Add prototype.
9220 (init_registers_s390x): Likewise.
9221 (the_low_target): Add initializer for arch_setup field.
9222 * linux-sh-low.c (init_registers_sh): Add prototype.
9223 (the_low_target): Add initializer for arch_setup field.
9224 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9225 (the_low_target): Add initializer for arch_setup field.
9226 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9227 (the_low_target): Add initializer for arch_setup field.
9228
9229 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9230 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9231 instead of init_registers ().
9232 * win32-arm-low.c (init_registers_arm): Add prototype.
9233 (the_low_target): Add initializer for arch_setup field.
9234 * win32-i386-low.c (init_registers_i386): Add prototype.
9235 (the_low_target): Add initializer for arch_setup field.
9236
9237 * spu-low.c (init_registers_spu): Add prototype.
9238 (initialize_low): Call initialie_registers_spu () instead of
9239 initialize_registers ().
9240
fd96d250
PA
92412008-02-19 Pedro Alves <pedro@codesourcery.com>
9242
9243 * server.c (handle_v_requests): When handling the vRun and vAttach
9244 packets, if already debugging a process, don't kill it. Return an
9245 error instead.
9246
d41b6bb4
DJ
92472008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9248
9249 * server.c (handle_query): Correct length check.
9250
5ac588cf
PA
92512008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9252
9253 * win32-low.c (do_initial_child_stuff): Add process handle
9254 parameter. Set current_process_handle and current_process_id from the
9255 parameters. Clear globals.
9256 (win32_create_inferior): Don't set current_process_handle and
9257 current_process_id here. Instead pass them on the call to
9258 do_initial_child_stuff.
9259 (win32_attach): Likewise.
9260 (win32_clear_inferiors): New.
9261 (win32_kill): Don't close the current process handle or the
9262 current thread handle here. Instead call win32_clear_inferiors.
9263 (win32_detach): Don't open a new handle to the process. Call
9264 win32_clear_inferiors.
9265 (win32_join): Don't rely on current_process_handle; open a new
9266 handle using the process id.
9267 (win32_wait): Call win32_clear_inferiors when the inferior process
9268 has exited.
9269
ecd7ecbc
DJ
92702008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9271
9272 * server.c (monitor_show_help): Add "exit".
9273
1525d545
MG
92742008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9275
ecd7ecbc 9276 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9277 (clean): Add reg-xtensa.c.
9278 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9279 * configure.srv (xtensa*-*-linux*) New target.
9280 * linux-xtensa-low.c: New.
9281 * xtensa-xtregs.c: New.
1525d545 9282
59a016f0
PA
92832008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9284
9285 * hostio.c: Don't include errno.h.
9286 (errno_to_fileio_errno): Move to hostio-errno.
9287 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9288 error number outputting to the target->hostio_last_error callback.
9289 (hostio_packet_error): Use FILEIO_EINVAL directly.
9290 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9291 calls to hostio_error.
9292 * hostio-errno.c: New.
9293 * server.h (hostio_last_error_from_errno): Declare.
9294 * target.h (target_ops): Add hostio_last_error member.
9295 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9296 as hostio_last_error handler.
889bf7c5 9297 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9298 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9299 (wince_hostio_last_error): New functions.
9300 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9301 as hostio_last_error handler.
9302 (win32_target_ops) [!_WIN32_WCE]: Register
9303 hostio_last_error_from_errno as hostio_last_error handler.
9304 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9305 (hostio-errno.o): New rule.
9306 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9307 * configure.srv (srv_hostio_err_objs): New variable. Default to
9308 hostio-errno.o.
9309 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9310 * configure: Regenerate.
9311
2d717e4f
DJ
93122008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9313
9314 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9315 (linux_kill, linux_detach): Clean up the process list.
9316 * remote-utils.c (remote_open): Improve port number parsing.
9317 (putpkt_binary, input_interrupt): Only send interrupts if the target
9318 is running.
9319 * server.c (extended_protocol): Make static.
9320 (attached): Define earlier.
9321 (exit_requested, response_needed, program_argv): New variables.
9322 (target_running): New.
9323 (start_inferior): Clear attached here.
9324 (attach_inferior): Set attached here.
9325 (require_running): Define.
9326 (handle_query): Use require_running and target_running. Implement
9327 "monitor exit".
9328 (handle_v_attach, handle_v_run): New.
9329 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9330 (gdbserver_usage): Update.
9331 (main): Redo argument parsing. Handle --debug and --multi. Handle
9332 --attach along with other options or after the port. Save
9333 program_argv. Support no initial program. Resynchronize
9334 communication with GDB after an error. Handle "monitor exit".
9335 Use require_running and target_running. Always allow the extended
9336 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9337 restart in extended mode.
9338 * README: Refer to the GDB manual. Update --attach usage.
9339
7407e2de
AS
93402007-12-20 Andreas Schwab <schwab@suse.de>
9341
9342 * linux-low.c (STACK_SIZE): Define.
9343 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9344 (linux_test_for_tracefork): Likewise.
9345
b65d95c5
DJ
93462007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9347
9348 * linux-low.c (linux_wait_for_event): Update messages. Do not
9349 reinsert auto-delete breakpoints.
9350 * mem-break.c (struct breakpoint): Change return type of handler to
9351 int.
9352 (set_breakpoint_at): Update handler type.
9353 (reinsert_breakpoint_handler): Return 1 instead of calling
9354 delete_breakpoint.
9355 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9356 setting a new one.
9357 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9358 * mem-break.h (set_breakpoint_at): Update handler type.
9359 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9360 * win32-low.c (auto_delete_breakpoint): New.
9361 (get_child_debug_event): Use it.
9362
4e799345
DJ
93632007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9364
9365 * configure.ac: Check for pread and pwrite.
9366 * hostio.c (handle_pread): Fall back to lseek and read.
9367 (handle_pwrite): Fall back to lseek and write.
9368 * config.in, configure: Regenerated.
9369
27524b67
DJ
93702007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9371
9372 * server.c (myresume): Add own_buf argument.
9373 (main): Update calls.
9374
a20d5e98
DJ
93752007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9376
9377 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9378 * remote-utils.c (remote_open): Do not call disable_async_io.
9379 (block_async_io): Delete.
9380 (unblock_async_io): Make static.
9381 (initialize_async_io): New.
9382 * server.c (handle_v_cont): Handle async I/O here.
9383 (myresume): Likewise. Move other common resume tasks here...
9384 (main): ... from here. Call initialize_async_io. Disable async
9385 I/O before the main loop.
9386 * server.h (initialize_async_io): Declare.
9387 (block_async_io, unblock_async_io): Delete prototypes.
9388 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9389
b79d787e
DJ
93902007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9391
9392 * remote-utils.c (readchar): Allow binary data in received messages.
9393
d97903b2
PA
93942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9395
9396 * win32-low.c (attaching): New global.
9397 (win32_create_inferior): Clear the `attaching' global.
9398 (win32_attach): Set the `attaching' global.
9399 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9400 attaching. Only set a breakpoint at the entry point if not
9401 attaching.
9402
311de423
PA
94032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9404
9405 * server.c (main): Don't report dll events on the initial
9406 connection on attaches.
9407
6c2d16d2
PA
94082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9409
9410 * server.c (main): Relax numerical bases supported for the pid of
9411 the --attach command line argument.
9412
5ca906e6
PA
94132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9414
9415 * win32-low.c (win32_attach): Call OpenProcess before
9416 DebugActiveProcess, not after. Add last error output to error
9417 call.
9418
9c6c8194
PA
94192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9420
9421 * win32-low.c (win32_get_thread_context)
9422 (win32_set_thread_context): New functions.
9423 (thread_rec): Use win32_get_thread_context.
9424 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9425 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9426 field.
9427
4d5d1aaa
PA
94282007-12-03 Leo Zayas
9429 Pedro Alves <pedro_alves@portugalmail.pt>
9430
9431 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9432 global variables.
9433 (child_add_thread): Minor cleanup.
9434 (child_continue): Resume artificially suspended threads before
9435 calling ContinueDebugEvent.
9436 (suspend_one_thread): New.
9437 (fake_breakpoint_event): New.
9438 (get_child_debug_event): Change return type to int. Check here if
9439 gdb sent an interrupt request. If a soft interrupt was requested,
9440 fake a breakpoint event. Return 0 if there is no event to handle,
9441 and 1 otherwise.
9442 (win32_wait): Don't check here if gdb sent an interrupt request.
9443 Ensure there is a valid event to handle.
9444 (win32_request_interrupt): Add soft interruption method as last
9445 resort.
9446
c436e841
PA
94472007-12-03 Leo Zayas
9448 Pedro Alves <pedro_alves@portugalmail.pt>
9449
9450 * win32-low.h (win32_thread_info): Add descriptions to the
9451 structure members. Replace `suspend_count' counter by a
9452 `suspended' flag.
9453 * win32-low.c (thread_rec): Update condition of when to get the
9454 context from the inferior. Rely on ContextFlags being set if it
9455 has already been retrieved. Only suspend the inferior thread if
9456 we haven't already. Warn if that fails.
9457 (continue_one_thread): s/suspend_count/suspended/. Only call
9458 ResumeThread once. Warn if that fails.
9459
e7b5fa67
PA
94602007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9461
9462 * win32-low.c (win32_wait): Don't read from the inferior when it
9463 has already exited.
9464
a385171d
PA
94652007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9466
9467 * Makefile.in (win32_low_h): New variable.
9468 (win32-low.o): Add dependency on $(win32_low_h).
9469 (win32-arm-low.o, win32-i386-low.o): New rules.
9470
f80c84b3
DJ
94712007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9472
9473 * hostio.c: Correct copyright year.
9474
a6b151f1
DJ
94752007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9476
9477 * Makefile.in (OBS): Add hostio.o.
9478 (hostio.o): New rule.
9479 * server.h (handle_vFile): Declare.
9480 * hostio.c: New file.
9481 * server.c (handle_v_requests): Take packet_len and new_packet_len
9482 for binary packets. Call handle_vFile.
9483 (main): Update call to handle_v_requests.
9484
f9387fc3
DJ
94852007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9486
9487 * linux-low.c: Include <sched.h>.
9488
51c2684e
DJ
94892007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9490
9491 * linux-low.c (linux_tracefork_grandchild): New.
9492 (linux_tracefork_child): Use clone.
9493 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9494
75f83163
JB
94952007-10-31 Joel Brobecker <brobecker@adacore.com>
9496
9497 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9498
da5898ce
DJ
94992007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9500
9501 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9502
24a09b5f
DJ
95032007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9504
9505 * inferiors.c (change_inferior_id): Delete.
9506 (add_pid_to_list, pull_pid_from_list): New.
9507 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9508 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9509 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9510 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9511 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9512 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9513 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9514 (using_threads): Always set to 1.
9515 (handle_extended_wait): New.
9516 (add_process): Do not set TID.
9517 (linux_create_inferior): Set must_set_ptrace_flags.
9518 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9519 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9520 (linux_thread_alive): Rename TID argument to LWPID.
9521 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9522 (linux_wait_for_event): Do not use TID or check using_threads. Update
9523 call to dead_thread_notify. Call handle_extended_wait.
9524 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9525 (send_sigstop): Delete sigstop_sent.
9526 (wait_for_sigstop): Avoid TID.
9527 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9528 (linux_test_for_tracefork): New.
9529 (linux_lookup_signals): Use thread_db_active and
9530 linux_supports_tracefork_flag.
9531 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9532 * linux-low.h (get_process_thread): Avoid TID.
9533 (struct process_ifo): Move thread_known and tid to the end. Remove
9534 sigstop_sent.
9535 (linux_attach_lwp, thread_db_init): Update prototypes.
9536 * server.h (change_inferior_id): Delete prototype.
9537 (add_pid_to_list, pull_pid_from_list): New prototypes.
9538 * thread-db.c (thread_db_use_events): New.
9539 (find_first_thread): Rename to...
9540 (find_one_thread): ...this. Update callers and messages. Do not
9541 call fatal. Check thread_db_use_events. Do not call
9542 change_inferior_id or new_thread_notify.
9543 (maybe_attach_thread): Update. Do not call new_thread_notify.
9544 (thread_db_init): Set thread_db_use_events. Check use_events.
9545 * utils.c (fatal, warning): Correct message prefix.
9546
30ed0a8f
DJ
95472007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9548
9549 * Makefile.in (clean): Remove new files.
9550 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9551 (powerpc-64.o, powerpc-64.c): New rules.
9552 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9553 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9554 with SPE.
9555 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9556 SPE targets.
9557 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9558 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9559 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9560 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9561 (target_regsets): Add AltiVec and SPE register sets.
9562 * configure.ac: Check for AltiVec and SPE.
9563 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9564 (ppc_fill_vrregset, ppc_store_vrregset): New.
9565 (target_regsets): Add AltiVec register set.
9566 * configure: Regenerated.
9567
fd462a61
DJ
95682007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9569
9570 * linux-low.c (O_LARGEFILE): Define.
9571 (linux_read_memory): Use /proc/PID/mem.
9572 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9573 * configure, config.in: Regenerated.
9574
69f223ed
DJ
95752007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9576
9577 * linux-low.c (linux_wait_for_event): Do not pass signals while
9578 single-stepping.
9579
aec18585
PA
95802007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9581
9582 * win32-low.c (create_process): New.
9583 (win32_create_inferior): Use create_process instead of
9584 CreateProcess. If create_process failed retry appending an ".exe"
9585 suffix. Store the GetLastError result immediatelly after
9586 create_process calls and use it on the call to error.
9587
34d86ddd
PA
95882007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9589
9590 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9591
5a0e3bd0
JB
95922007-08-23 Joel Brobecker <brobecker@adacore.com>
9593
9594 * configure.ac: Switch license to GPLv3.
9595
f88c79e6
MS
95962007-08-01 Michael Snyder <msnyder@access-company.com>
9597
9598 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9599
6b3d9b83
PA
96002007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9601
9602 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9603 typedef.
9604 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9605 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9606 CloseToolhelp32Snapshot.
9607 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9608 CloseToolhelp32Snapshot.
9609
c588c53c
MS
96102007-07-27 Michael Snyder <michael.snyder@access-company.com>
9611
9612 * server.c (main): Check for inferior exit before main loop.
9613
aa0403d9
PA
96142007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9615
9616 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9617 instead of on tmp_desc.
9618
255e7678
DJ
96192007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9620 Daniel Jacobowitz <dan@codesourcery.com>
9621
9622 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9623 (add_thread): Minor cleanups.
9624 (clear_inferiors): Move lower in the file. Clear the DLL
9625 list.
9626 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9627 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9628 (xml_escape_text): New.
9629 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9630 for qSupported.
9631 (handle_v_cont): Report errors.
9632 (gdbserver_version): Update.
9633 (main): Correct size of own_buf. Do not report initial DLL events.
9634 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9635 (unloaded_dll, xml_escape_text): New.
9636 * win32-low.c (enum target_waitkind): Update comments.
9637 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9638 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9639 (win32_EnumProcessModules, win32_GetModuleInformation)
9640 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9641 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9642 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9643 (win32_Module32First, win32_Module32Next, load_toolhelp)
9644 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9645 (get_child_debug_event): Handle DLL events.
9646 (win32_wait): Likewise.
9647
0d37add9
DJ
96482007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9649
9650 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9651 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9652
45e2715e
PA
96532007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9654
9655 * win32-low.c (handle_output_debug_string): Ignore event if not
9656 waiting.
9657
c5674cf1
PA
96582007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9659
9660 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9661
2bbe3cc1
DJ
96622007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9663
9664 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9665
ae13219e
DJ
96662007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * inferiors.c (change_inferior_id): Add comment.
9669 * linux-low.c (check_removed_breakpoint): Add an early
9670 prototype. Improve debug output.
9671 (linux_attach): Doc update.
9672 (linux_detach_one_process, linux_detach): Clean up before releasing
9673 each process.
9674 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9675 * linux-low.h (struct process_info): Doc improvement.
9676 * mem-break.c (delete_all_breakpoints): New.
9677 * mem-break.h (delete_all_breakpoints): New prototype.
9678 * thread-db.c (find_first_thread): New.
9679 (thread_db_create_event): Call it instead of
9680 thread_db_find_new_threads. Clean up unused variables.
9681 (maybe_attach_thread): Remove first thread handling.
9682 (thread_db_find_new_threads): Use find_first_thread.
9683 (thread_db_get_tls_address): Likewise.
9684
4105de34
DJ
96852007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9686
9687 * thread-db.c (thread_db_find_new_threads): Add prototype.
9688 (thread_db_create_event): Check for the main thread before adding
9689 a new thread.
9690 (maybe_attach_thread): Only enable event reporting if TID == 0.
9691 (thread_db_get_tls_address): Check for new threads.
9692
2b876972
DJ
96932007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9694
9695 * linux-low.c (linux_create_inferior): Try execv before execvp.
9696 * spu-low.c (spu_create_inferior): Likewise.
9697
7a245884
DJ
96982007-06-13 Mike Frysinger <vapier@gentoo.org>
9699
9700 * linux-low.c (linux_create_inferior): Change execv to execvp.
9701 * spu-low.c (spu_create_inferior): Likewies.
9702
117ce543
DJ
97032007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9704
9705 * Makefile.in (clean): Clean new files instead of deleted ones.
9706 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9707 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9708 rules.
9709 * configure.srv: Specify XML files and new regformats for MIPS and
9710 MIPS64 GNU/Linux.
9711 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9712 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9713 an entry for the restart register.
9714 (mips_cannot_fetch_register, mips_cannot_store_register)
9715 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9716 register names to match the XML descriptions.
9717 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9718 restart register instead of $0.
9719
0e7f50da
UW
97202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9721 Markus Deuling <deuling@de.ibm.com>
9722
9723 * remote-utils.c (decode_xfer_write): New function.
9724 * server.h (decode_xfer_write): Add prototype.
9725 * server.c (handle_query): Add PACKET_LEN argument. Support
9726 qXfer:spu:read and qXfer:spu:write packets.
9727 (main): Pass packet_len to handle_query.
9728 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9729 * target.h (target_ops): Add qxfer_spu.
9730
374c1d38
UW
97312007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9732
9733 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9734 accessing non-seekable spufs files.
9735
bb63802a
UW
97362007-05-16 Markus Deuling <deuling@de.ibm.com>
9737
889bf7c5 9738 * server.c (handle_query): Add reply for qC packet.
bb63802a 9739
7390519e
PA
97402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9741 Leo Zayas <lerele@champenstudios@com>
9742
9743 * server.h (check_remote_input_interrupt_request): New function.
9744 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9745 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9746 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9747 (check_remote_input_interrupt_request): New function.
9748 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9749 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9750 winapi_GenerateConsoleCtrlEvent): New typedefs.
9751 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9752 to 250 ms.
9753 (win32_wait): Check for remote interrupt request
9754 with check_remote_input_interrupt_request.
9755 (win32_request_interrupt): New function.
9756 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9757
34b34921
PA
97582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9759
9760 * win32-low.c (debug_registers_changed,
9761 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9762 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9763 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9764 (thread_rec): Get context using the low target.
9765 (child_add_thread): Call thread_added on the low target,
9766 which does the same thing.
9767 (regptr): Delete.
9768 (do_initial_child_stuff): Remove debug registers references.
9769 Set context using the low target. Resume threads after
9770 setting the contexts.
9771 (child_continue): Remove dead variable. Remove debug
9772 registers references.
9773 (child_fetch_inferior_registers): Go through the low target.
9774 (do_child_store_inferior_registers): Remove.
9775 (child_store_inferior_registers): Go through the low target.
9776 (win32_resume): Remove debug registers references.
9777 Set context using the low target.
9778 (handle_exception): Change return type to void. Don't record
9779 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9780 first chance exception.
889bf7c5 9781 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9782 goto loop. Always return after waiting for debug event.
9783 (win32_wait): Convert to switch statement. Handle spurious
9784 events.
9785
9786 * win32-i386-low.c (debug_registers_changed,
9787 debug_registers_used): New.
9788 (initial_stuff): Rename to ...
9789 (i386_initial_stuff): ... this. Clear debug registers
9790 state variables.
9791 (store_debug_registers): Delete.
9792 (i386_get_thread_context): New.
9793 (load_debug_registers): Delete.
9794 (i386_set_thread_context): New.
9795 (i386_thread_added): New.
9796 (single_step): Rename to ...
9797 (i386_single_step): ... this.
9798 (do_fetch_inferior_registers): Rename to ...
9799 (i386_fetch_inferior_register): ... this.
9800 (i386_store_inferior_register): New.
9801 (the_low_target): Adapt to new interface.
9802
9803 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9804 (arm_get_thread_context): New.
9805 (arm_set_thread_context): New.
9806 (regptr): New.
9807 (do_fetch_inferior_registers): Rename to ...
9808 (arm_fetch_inferior_register): ... this.
9809 (arm_store_inferior_register): New.
9810 (arm_wince_breakpoint): Reimplement as unsigned long.
9811 (arm_wince_breakpoint_len): Define.
9812 (the_low_target): Adapt to new interface.
9813
9814 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9815 load_debug_registers. Add get_thread_context, set_thread_context,
9816 thread_added and store_inferior_register. Rename
9817 fetch_inferior_registers to fetch_inferior_register.
9818 (regptr): Remove declaration.
9819
dd6953e1
PA
98202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9821
9822 * linux-low.c (linux_detach): Change return type to int. Return 0.
9823 * spu-low.c (spu_detach): Likewise.
9824
444d6139
PA
98252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9826
9827 * target.h (target_ops): Change return type of detach to int.
9828 Add join.
9829 (join_inferior): New.
9830 * server.c (main): Don't skip detach support on mingw32.
9831 If the inferior doesn't support detaching return error.
9832 Call join_inferior instead of using waitpid.
9833 * linux-low.c (linux_join): New.
9834 (linux_target_op): Add linux_join.
9835 * spu-low.c (spu_join): New.
9836 (spu_target_ops): Add spu_join.
9837 * win32-low.c (win32_detach): Adapt to new interface.
9838 Reopen current_process_handle before detaching. Issue a child
9839 resume before detaching.
9840 (win32_join): New.
9841 (win32_target_op): Add win32_join.
9842
1d5315fe
PA
98432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9844
9845 * win32-low.c (win32-attach): Fix return value.
9846 * target.h (target_ops): Describe ATTACH return values.
9847
bf914831
PA
98482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9849
9850 * win32-low.c (GETPROCADDRESS): Define.
9851 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9852 (winapi_DebugSetProcessKillOnExit): Likewise.
9853 (win32_create_inferior): Force usage of ansi CreateProcessA.
9854 (win32_attach): Use GETPROCADDRESS.
9855 (win32_detach): Likewise.
9856
f72f3e60
PA
98572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9858
9859 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9860
ed50f18f
PA
98612007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9862
9863 * win32-low.c: Commit leftover changes from 2007-03-29.
9864
0c2ead7e
DJ
98652007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9866
9867 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9868 fields short instead of int. Add explicit padding.
9869 (i387_cache_to_fsave): Remove unnecessary casts.
9870 (i387_fsave_to_cache): Doc fix.
9871 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9872
73725ff3
DJ
98732007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9874
9875 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9876 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9877
d99f33d8
PA
98782007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9879
9880 * configure.srv (arm*-*-mingw32ce*): Move near the other
9881 arm targets.
9882
68070c10
PA
98832007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9884
2482afc6 9885 * configure.ac: Add errno checking.
68070c10
PA
9886 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9887 sys/file.h and malloc.h.
9888 (AC_CHECK_DECLS): Add perror.
9889 (srv_mingwce): Handle.
2482afc6 9890 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9891 win32-i386-low.o to srv_tgtobj.
9892 (i[34567]86-*-mingw*): Likewise.
9893 (arm*-*-mingw32ce*): Add case.
9894 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9895 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9896 [__MINGW32CE__] (strerror): New function.
9897 [__MINGW32CE__] (errno): Define to GetLastError.
9898 [__MINGW32CE__] (COUNTOF): New macro.
9899 (remote_open): Remove extra close call.
9900 * mem-break.c (delete_breakpoint_at): New function.
9901 * mem-break.h (delete_breakpoint_at): Declare.
9902 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9903 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9904 [USE_WIN32API] (read, write): Add char* casts.
9905 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9906 * server.h: Include wincecompat.h on Windows CE.
9907 [HAVE_ERRNO_H]: Check.
9908 (perror): Declare if not declared.
9909 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9910 (perror_with_name): Remove errno declaration.
9911 * wincecompat.h: New.
9912 * wincecompat.c: New.
9913 * win32-low.h: New.
9914 * win32-arm-low.c: New.
9915 * win32-i386-low.c: New.
9916 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9917 (OUTMSG2): Make it safe.
9918 (_T): New macro.
9919 (COUNTOF): New macro.
9920 (NUM_REGS): Get it from the low target.
9921 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9922 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9923 (thread_rec): Let low target handle debug registers.
9924 (child_add_thread): Likewise.
9925 (child_init_thread_list): Likewise.
9926 (continue_one_thread): Likewise.
9927 (regptr): New.
9928 (do_child_fetch_inferior_registers): Move to ...
9929 * win32-i386-low.c: ... here, and rename to ...
9930 (do_fetch_inferior_registers): ... this.
889bf7c5 9931 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9932 Go through the low target.
9933 (do_child_store_inferior_registers): Use regptr.
9934 (strwinerror): New function.
9935 (win32_create_inferior): Handle Windows CE.
9936 Use strwinerror instead of strerror on Windows error
9937 codes. Add program to the error output.
9938 Don't close the main thread handle on Windows CE.
9939 (win32_attach): Use coredll.dll on Windows CE.
9940 (win32_kill): Close current process and current
9941 thread handles.
9942 (win32_detach): Use coredll.dll on Windows CE.
9943 (win32_resume): Let low target handle debug registers, and
9944 step request.
9945 (handle_exception): Add/Remove initial breakpoint. Avoid
9946 non-existant WSTOPSIG on Windows CE.
9947 (win32_read_inferior_memory): Cast to remove warning.
9948 (win32_arch_string): Go through the low target.
9949 (initialize_low): Call set_breakpoint_data with the low
9950 target's breakpoint.
9951 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9952 FOP_REGNUM, mappings): Move to ...
9953 * win32-i386-low.c: ... here.
9954 * win32-low.c (win32_thread_info): Move to ...
9955 * win32-low.h: ... here.
9956 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9957 win32-arm-low.c and wincecompat.c.
9958 (all:): Add $EXEEXT.
9959 (install-only:): Likewise.
9960 (gdbserver:): Likewise.
9961 (gdbreplay:): Likewise.
9962 * config.in: Regenerate.
9963 * configure: Regenerate.
9964
41093d81
PA
99652007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9966
9967 * win32-low.c: Rename typedef thread_info to
9968 win32_thread_info throughout.
9969
544afa54
PA
99702007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9971
9972 * win32-i386-low.c: Rename to ...
9973 * win32-low.c: ... this.
9974 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9975 * Makefile.in: Likewise.
9976
bce7165d
PA
99772007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9978
9979 * remote-utils.c (monitor_output): Constify msg parameter.
9980 * server.h (monitor_output): Likewise.
9981 * win32-i386-low.c (handle_output_debug_string): New.
9982 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9983 handle_output_debug_string.
9984 (get_child_debug_event): Likewise.
9985
506c7aa0
DJ
99862007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9987
9988 * server.c (main): Correct strtoul check.
9989
42c81e2a
DJ
99902007-03-27 Jon Ringle <jon@ringle.org>
9991
9992 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9993
9453113a
DJ
99942007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9995
9996 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9997
64a69107
DJ
99982007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9999
10000 * terminal.h: Check HAVE_SGTTY_H.
10001
100022007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10003
10004 * remote-utils.c (remote_open): Print out the assigned port number.
10005
c74d0ad8
DJ
100062007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10007
10008 * remote-utils.c (monitor_output): New function.
10009 * server.c (debug_threads): Define here.
10010 (monitor_show_help): New function.
10011 (handle_query): Handle qRcmd.
10012 (main): Do not handle 'd' packet.
10013 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10014 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10015 of debug_threads.
10016
de7c3b4a
PA
100172007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10018
10019 * Makefile.in (EXEEXT): New.
10020 (clean): Use $(EXEEXT).
10021
ef57601b
PA
100222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10023
10024 * target.h (target_ops): Rename send_signal to request_interrupt,
10025 and remove enum target_signal parameter.
10026 * linux-low.c (linux_request_interrupt): Rename from
10027 linux_send_signal, and always send SIGINT.
10028 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10029 and always send SIGINT.
10030 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10031 of send_signal.
10032 (input_interrupt): Likewise.
10033
820f2bda
PA
100342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10035
10036 * server.c (get_features_xml): Check if target implemented
10037 arch_string.
10038 * win32-i386-low.c (win32_arch_string): New.
10039 (win32_target_ops): Add win32_arch_string as arch_string member.
10040
ab39bf24
UW
100412007-02-22 Markus Deuling <deuling@de.ibm.com>
10042
10043 * spu-low.c (spu_arch_string): New.
10044 (spu_target_ops): Add spu_arch_string.
10045
61ff6e04
DJ
100462007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10047
10048 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10049 * configure.ac: Do not check for terminal.h.
10050 * configure, config.in: Regenerated.
10051
fb1e4ffc
DJ
100522007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * Makefile.in (OBS): Add $(XML_BUILTIN).
10055 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10056 (clean): Update.
10057 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10058 (arm-with-iwmmxt.c): New.
10059 * config.in, configure: Regenerate.
10060 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10061 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10062 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10063 (arm*-*-linux*): Add iWMMXt and regset support.
10064 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10065 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10066 (arm_store_wmmxregset, target_regsets): New.
10067 * server.c (get_features_xml): Take annex argument. Check builtin
10068 XML documents.
10069 (handle_query): Handle multiple annexes.
10070
0f48aa01
DJ
100712007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10072
10073 * remote-utils.c [USE_WIN32API] (read, write): Define.
10074 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10075 write.
10076
23181151
DJ
100772007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10078
10079 * linux-i386-low.c (the_low_target): Set arch_string.
10080 * linux-x86-64-low.c (the_low_target): Likewise.
10081 * linux-low.c (linux_arch_string): New.
10082 (linux_target_ops): Add it.
10083 * linux-low.h (struct linux_target_ops): Add arch_string.
10084 * server.c (write_qxfer_response): Use const void * for DATA.
10085 (get_features_xml): New.
10086 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10087 * target.h (struct target_ops): Add arch_string method.
10088
9d606399
DJ
100892007-01-03 Denis Pilat <denis.pilat@st.com>
10090 Daniel Jacobowitz <dan@codesourcery.com>
10091
10092 * linux-low.c (linux_kill): Handle being called with no threads.
10093 * win32-i386-low.c (win32_kill): Likewise.
10094 (get_child_debug_event): Clear current_process_handle.
10095
100962006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10097 Daniel Jacobowitz <dan@codesourcery.com>
10098
10099 * remote-utils.c (remote_open): Check the type of specified
10100 serial port devices before opening them.
10101 * server.c (main): Kill the inferior if an error occurs during
10102 the first remote_open.
10103
a5e13d24
DJ
101042006-12-05 Markus Deuling <deuling@de.ibm.com>
10105
10106 * README: Update supported targets.
10107
186947f7
DJ
101082006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10109
10110 * Makefile.in (clean): Remove reg-mips64.c.
10111 (reg-mips64.c, reg-mips64.o): New rules.
10112 * configure.srv: Handle mips64. Include regset support for mips.
10113 * linux-mips-low.c (union mips_register): New.
10114 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10115 (mips_breakpoint, mips_breakpoint_at): Use int.
10116 (mips_collect_register, mips_supply_register)
10117 (mips_collect_register_32bit, mips_supply_register_32bit)
10118 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10119 (mips_store_fpregset, target_regsets): New.
10120 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10121
a13e2c95
UW
101222006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10123
10124 * configure.srv: Add target "spu*-*-*".
10125 * Makefile.in (clean): Remove reg-spu.c.
10126 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10127 * spu-low.c: New file.
10128
cb7283db
DJ
101292006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * configure.ac: Correct td_thr_tls_get_addr test.
10132 * configure: Regenerated.
10133
89be2091
DJ
101342006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10135
10136 * linux-low.c (linux_wait_for_event): Reformat. Use the
10137 pass_signals array.
10138 * remote-utils.c (decode_address_to_semicolon): New.
10139 * server.c (pass_signals, handle_general_set): New.
10140 (handle_query): Mention QPassSignals for qSupported.
10141 (main): Call handle_general_set.
10142 * server.h (pass_signals, decode_address_to_semicolon): New.
10143
000ef4f0
DJ
101442006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * server.c (handle_query): Correct error handling for read_auxv.
10147
b7149293
UW
101482005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10149
10150 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10151 and srv_linux_thread_db to yes.
10152 * linux-s390-low.c (s390_fill_gregset): New function.
10153 (target_regsets): Define data structure.
10154
dae5f5cf
DJ
101552006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10158 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10159 * config.in, configure: Regenerated.
10160 * inferiors.c (gdb_id_to_thread): New function.
10161 (gdb_id_to_thread_id): Use it.
10162 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10163 * linux-low.h (struct process_info): Add th member.
10164 (thread_db_get_tls_address): New prototype.
10165 * remote-utils.c (decode_address): Make non-static.
10166 * server.c (handle_query): Handle qGetTLSAddr.
10167 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10168 * target.h (struct target_ops): Add get_tls_address.
10169 * thread-db.c (maybe_attach_thread): Save the thread handle.
10170 (thread_db_get_tls_address): New.
10171
32ca6d61
DJ
101722006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10173
10174 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10175 (linux_resume_one_process): Take a siginfo_t *. Update all
10176 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10177 (struct pending_signals): Add a siginfo_t.
10178 (linux_wait_for_process): Always set last_status.
10179 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10180 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10181 * linux-low.h (struct process_info): Add last_status.
10182
5ffff7c1
DJ
101832006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * remote-utils.c (try_rle): New function.
10186 (putpkt_binary): Use it.
10187
8695c747
DJ
101882006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10189
10190 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10191 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10192 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10193 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10194 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10195 point registers.
10196
290fadea
RS
101972006-08-08 Richard Sandiford <richard@codesourcery.com>
10198
10199 * server.c (terminal_fd): New variable.
10200 (old_foreground_pgrp): Likewise.
10201 (restore_old_foreground_pgrp): New function.
10202 (start_inferior): Record the terminal file descriptor in terminal_fd
10203 and its original foreground group in old_foreground_pgrp. Register
10204 restore_old_foreground_pgrp with atexit().
10205
9f2e1e63
DJ
102062006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10207
10208 * server.c (handle_query): Correct qPart to qXfer.
10209
b80864fb
DJ
102102006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10211
10212 * configure.ac: Check for more headers which are missing on
10213 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10214 * configure.srv: Add Cygwin and mingw32.
10215 * remote-utils.c: Don't include headers unconditionally which
10216 are missing on mingw32. Include <winsock.h> for mingw32.
10217 (remote_open): Adjust for mingw32 support. Flush
10218 standard error after writing to it.
10219 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10220 (unblock_async_io, enable_async_io, disable_async_io)
10221 (readchar, getpkt): Update for Winsock support.
10222 (prepare_resume_reply): Expect a protocol signal number.
10223 * server.c: Disable <sys/wait.h> on mingw32.
10224 (start_inferior): Adjust for mingw32 support. Flush
10225 standard error after writing to it.
10226 (attach_inferior): Likewise. Use protocol signal
10227 numbers.
10228 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10229 and names.
10230 * win32-i386-low.c: New file.
10231 * Makefile.in (XM_CLIBS): Set.
10232 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10233 (win32-i386-low.o): New dependency rule.
10234 * linux-low.c (linux_wait): Use target signal numbers.
10235 * target.h (struct target_ops): Doc fix.
10236 * server.h (target_signal_to_name): New prototype.
10237 * gdbreplay.c: Don't include headers unconditionally which
10238 are missing on mingw32. Include <winsock.h> for mingw32.
10239 (remote_close, remote_open): Adjust for Winsock support.
10240 * configure, config.in: Regenerated.
10241
0876f84a
DJ
102422006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10243
10244 * server.c (decode_xfer_read, write_qxfer_response): New.
10245 (handle_query): Take a packet length argument. Handle
10246 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10247 the qSupported response.
10248 (main): Update call to handle_query.
10249
01f9e8fa
DJ
102502006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10251
10252 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10253 (putpkt_binary): Renamed from putpkt and adjusted for binary
10254 data.
10255 (putpkt): New wrapper for putpkt_binary.
10256 (readchar): Don't mask off the high bit.
10257 (decode_X_packet): New function.
10258 * server.c (main): Call putpkt_binary if a handler sets the packet
10259 length. Save the length of the incoming packet. Handle 'X'.
10260 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10261
be2a5f71
DJ
102622006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10263
10264 * server.c (handle_query): Handle qSupported.
10265
ea025f5f
DJ
102662006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10267
10268 * remote-utils.c (all_symbols_looked_up): New variable.
10269 (look_up_one_symbol): Check it.
10270 * server.h (look_up_one_symbol): New declaration.
10271 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10272
9308fc88
DJ
102732006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10274
10275 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10276 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10277 (PTRACE_GET_THREAD_AREA): Define.
10278 (ps_get_thread_area): New function.
10279
52fb6437
NS
102802006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10281
10282 * configure.srv (m68k*-*-uclinux*): New target.
10283 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10284 (linux_resume_one_process): Remove extraneous cast.
10285 (linux_read_offsets): New.
10286 (linux_target_op): Add linux_read_offsets on mmuless systems.
10287 * server.c (handle_query): Add qOffsets logic.
10288 * target.h (struct target_ops): Add read_offsets.
10289
21b0f40c
DJ
102902006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10291
10292 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10293 (PTRACE_GET_THREAD_AREA): Define.
10294 (ps_get_thread_area): New function.
10295 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10296 (linux-x86-64-low.o): Update.
10297
0050a760
DJ
102982006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * configure.ac: Remove checks for prfpregset_t.
10301 * gdb_proc_service.h: New file.
10302 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10303 new "gdb_proc_service.h".
10304 * proc-service.c: Likewise.
10305 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10306 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10307 * Makefile.in (gdb_proc_service_h): Updated.
10308 * configure, config.in: Regenerated.
10309
b92a518e
DJ
103102006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10311
10312 * remote-utils.c (prepare_resume_reply): Move declaration
10313 of gdb_id_from_wait to the top of the block.
10314
545587ee
DJ
103152006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10316
10317 * linux-low.c (regsets_store_inferior_registers): Read the regset
10318 from the target before filling it.
10319
9db87ebd
DJ
103202006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10321
10322 * server.c (attach_inferior): Return SIGTRAP for a successful
10323 attach.
10324
dd24457d
DJ
103252006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * Makefile.in (OBS): Add version.o.
10328 (STAGESTUFF): Delete.
10329 (version.o): Add dependencies.
10330 (version.c): Replace rule.
10331 (clean): Remove version.c.
10332 * server.c (gdbserver_version): New.
10333 (gdbserver_usage): Use printf.
10334 (main): Handle --version and --help.
10335 * server.h (version, host_name): Add declarations.
10336
6f0f660e
EZ
103372005-12-23 Eli Zaretskii <eliz@gnu.org>
10338
889bf7c5
PA
10339 * linux-arm-low.c:
10340 * linux-arm-low.c:
10341 * inferiors.c:
10342 * i387-fp.h:
10343 * i387-fp.c:
10344 * gdbreplay.c:
10345 * regcache.c:
10346 * proc-service.c:
10347 * mem-break.h:
10348 * mem-break.c:
10349 * linux-x86-64-low.c:
10350 * linux-sh-low.c:
10351 * linux-s390-low.c:
10352 * linux-ppc64-low.c:
10353 * linux-ppc-low.c:
10354 * linux-mips-low.c:
10355 * linux-m68k-low.c:
10356 * linux-m32r-low.c:
10357 * linux-low.h:
10358 * linux-low.c:
10359 * linux-ia64-low.c:
10360 * linux-i386-low.c:
10361 * linux-crisv32-low.c:
10362 * thread-db.c:
10363 * terminal.h:
10364 * target.h:
10365 * target.c:
10366 * server.h:
10367 * server.c:
10368 * remote-utils.c:
10369 * regcache.h:
10370 * utils.c:
10371 * Makefile.in:
10372 * configure.ac:
6f0f660e
EZ
10373 * gdbserver.1: Add (C) after Copyright. Update the FSF
10374 address.
10375
9d1fb177
DJ
103762005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10377
10378 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10379 (arm_breakpoint_at): Recognize both breakpoints.
10380 (the_low_target): Use the correct breakpoint instruction.
10381
011a70c2
DJ
103822005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10383
10384 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10385 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10386 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10387 (the_low_target): Update.
10388
7fb85e41
AS
103892005-10-25 Andreas Schwab <schwab@suse.de>
10390
10391 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10392
10393 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10394 (ia64_num_regs): Reduce to 462.
10395
3db0444b
DJ
103962005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10397
10398 * acinclude.m4: Correct quoting.
10399 * aclocal.m4: Regenerated.
10400
10401 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10402 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10403 (thread_db_init): Call thread_db_err_str.
10404 * configure.ac: Check for TD_VERSION.
10405 * config.in, configure: Regenerated.
10406
bee0189a
DJ
104072005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10408
10409 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10410
e9d25b98
DJ
104112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10412
10413 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10414 is not available. Define HAVE_PTRACE_GETREGS if it is.
10415 * config.in, configure: Regenerated.
10416 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10417 * linux-i386-low.c, linux-m68k-low.c: Update to use
10418 HAVE_PTRACE_GETREGS.
10419 * linux-low.c (regsets_fetch_inferior_registers)
10420 (regsets_store_inferior_registers): Only return 0 if we processed
10421 GENERAL_REGS.
10422 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10423 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10424
a06660f7
DJ
104252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * inferiors.c (struct thread_info): Add gdb_id.
10428 (add_thread): Add gdb_id argument.
10429 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10430 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10431 calls to add_thread.
10432 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10433 * server.c (handle_query): Use thread_to_gdb_id.
10434 (handle_v_cont, main): Use gdb_id_to_thread_id.
10435 * server.h (add_thread): Update prototype.
10436 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10437 prototypes.
10438
5a1f5858
DJ
104392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10442 left-padded registers.
10443 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10444 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10445
e122f1f5
SE
104462005-07-01 Steve Ellcey <sje@cup.hp.com>
10447
10448 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10449 * configure: Regenerate.
10450 * config.in: Regenerate.
10451 * server.h (NEED_DECLARATION_STRERROR):
10452 Replace with !HAVE_DECL_STRERROR.
10453
d592fa2f
DJ
104542005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10455
10456 * linux-low.c (linux_wait, linux_send_signal): Don't test
10457 an unsigned long variable for > 0 if it could be MAX_ULONG.
10458 * server.c (myresume): Likewise.
10459 * target.c (set_desired_inferior): Likewise.
10460
ccbd4912
MK
104612005-06-13 Mark Kettenis <kettenis@gnu.org>
10462
10463 * configure.ac: Simplify and improve check for socklen_t.
10464 * configure, config.in: Regenerate.
10465
f450004a
DJ
104662005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10467
10468 * acconfig.h: Remove.
10469 * configure.ac: Add a test for socklen_t. Use three-argument
10470 AC_DEFINE throughout.
10471 * config.in: Regenerated using autoheader 2.59.
10472 * configure: Regenerated.
10473
10474 * gdbreplay.c (socklen_t): Provide a default.
10475 (remote_open): Use socklen_t.
10476 * remote-utils.c (socklen_t): Provide a default.
10477 (remote_open): Use socklen_t.
10478 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10479 unsigned char.
10480
10481 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10482 char for buffers.
10483 * linux-low.c (linux_read_memory, linux_write_memory)
10484 (linux_read_auxv): Likewise.
10485 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10486 (check_mem_write): Likewise.
10487 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10488 Likewise.
10489 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10490 (registers_from_string, register_data): Likewise.
10491 * server.c (handle_query, main): Likewise.
10492 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10493 (decode_M_packet): Likewise.
10494 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10495 * target.h (struct target_ops): Update read_memory, write_memory,
10496 and read_auxv.
10497 (read_inferior_memory, write_inferior_memory): Update.
10498 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10499 to unsigned char *.
10500 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10501 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10502 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10503 linux-s390-low.c, linux-sh-low.c: Update for changes in
10504 read_inferior_memory and the_low_target->breakpoint.
10505
eee84df1
DJ
105062005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10507
10508 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10509 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10510 * configure.srv: Add powerpc64-*-linux*.
10511 * linux-ppc64-low.c: New file.
10512
45b134e5
OF
105132005-05-23 Orjan Friberg <orjanf@axis.com>
10514
10515 * linux-cris-low.c: New file with support for CRIS.
10516 * linux-crisv32-low.c: Ditto for CRISv32.
10517 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10518 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10519 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10520 reg-crisv32.o, and reg-crisv32.c to make rules.
10521 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10522 recognized targets.
10523
48d93c75
UW
105242005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10525
10526 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10527 of sizeof (PTRACE_XFER_TYPE).
10528 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10529
e013ee27
OF
105302005-05-12 Orjan Friberg <orjanf@axis.com>
10531
889bf7c5 10532 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10533 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10534 pointers for hardware watchpoint support.
10535 * linux-low.h (struct linux_target_ops): Ditto.
10536 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10537 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10538 to linux_target_ops.
10539 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10540 reply packet.
10541 * server.c (main): Recognize 'Z' and 'z' packets.
10542
b0ded00b
UW
105432005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10544
10545 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10546 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10547 (the_low_target): Add new members.
10548
8643e2ad
DJ
105492005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10550
10551 * proc-service.c (ps_lgetregs): Search all_processes instead of
10552 all_threads.
10553
fc620387
DJ
105542005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * server.c (start_inferior): Change return type to int.
10557 (attach_inferior): Change sigptr to int *.
10558 (handle_v_cont, handle_v_requests): Change signal to int *.
10559 (main): Change signal to int.
10560
105612005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10562
10563 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10564 * configure.srv: Add m32r*-*-linux*.
10565 * linux-m32r-low.c: New file.
10566
e0e76420
DJ
105672005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10568
10569 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10570
a1928bad
DJ
105712005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10574 Take unsigned long arguments for PIDs.
10575 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10576 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10577 (wait_for_sigstop, linux_resume_one_process)
10578 (regsets_fetch_inferior_registers, linux_send_signal)
10579 (linux_read_auxv): Likewise. Update the types of variables holding
10580 PIDs. Update format string specifiers.
10581 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10582 * remote-utils.c (prepare_resume_reply): Likewise.
10583 * server.c (cont_thread, general_thread, step_thread)
10584 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10585 unsigned long.
10586 (handle_query): Update format specifiers.
10587 (handle_v_cont, main): Use strtoul for thread IDs.
10588 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10589 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10590 (general_thread, step_thread, thread_from_wait)
10591 (old_thread_from_wait): Update.
10592 * target.h (struct thread_resume): Use unsigned long for THREAD.
10593 (struct target_ops): Use unsigned long for arguments to attach and
10594 thread_alive.
10595
dcdb98d2
DJ
105962005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10597
10598 * acinclude.m4: Include bfd/bfd.m4 directly.
10599 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10600 <agriffis@toolchain.org>.
10601 * aclocal.m4, configure: Regenerated.
10602
bec39cab
AC
106032005-01-07 Andrew Cagney <cagney@gnu.org>
10604
10605 * configure.ac: Rename configure.in, require autoconf 2.59.
10606 * configure: Re-generate.
10607
434c4c77
DJ
106082004-12-08 Daniel Jacobowitz <dan@debian.org>
10609
10610 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10611 LIBS when finished.
10612 * aclocal.m4: Regenerated.
10613 * configure: Regenerated.
10614
db1d3e1b
AS
106152004-11-21 Andreas Schwab <schwab@suse.de>
10616
10617 * linux-m68k-low.c (m68k_num_gregs): Define.
10618 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10619 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10620 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10621 (m68k_breakpoint_at): New. Add to the_low_target.
10622
10623 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10624 srv_linux_thread_db to yes.
10625
43360365
JB
106262004-10-20 Joel Brobecker <brobecker@gnat.com>
10627
10628 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10629 (ARCH_SET_FS): Likewise.
10630 (ARCH_GET_FS): Likewise.
10631 (ARCH_GET_GS): Likewise.
10632
fd500816
DJ
106332004-10-16 Daniel Jacobowitz <dan@debian.org>
10634
10635 * linux-i386-low.c (ps_get_thread_area): New.
10636 * linux-x86-64-low.c (ps_get_thread_area): New.
10637 * linux-low.c: Include <sys/syscall.h>.
10638 (linux_kill_one_process): Don't kill the first thread here.
10639 (linux_kill): Kill the first thread here.
10640 (kill_lwp): New function.
10641 (send_sigstop, linux_send_signal): Use it.
10642 * proc-service.c: Clean up #ifdefs.
10643 (fpregset_info): Delete.
10644 (ps_lgetregs): Update and enable implementation.
10645 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10646 implementations.
10647 * remote-utils.c (struct sym_cache, symbol_cache): New.
10648 (input_interrupt): Print a clearer message.
10649 (async_io_enabled): New variable.
10650 (enable_async_io, disable_async_io): Use it. Update comments.
10651 (look_up_one_symbol): Use the symbol cache.
10652 * thread-db.c (thread_db_look_up_symbols): New function.
10653 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10654
f6de3c42
DJ
106552004-10-16 Daniel Jacobowitz <dan@debian.org>
10656
10657 * configure.in: Test for -rdynamic.
10658 * configure: Regenerated.
10659 * Makefile (INTERNAL_LDFLAGS): New.
10660 (gdbserver, gdbreplay): Use it.
10661
2c0fc042
AC
106622004-09-02 Andrew Cagney <cagney@gnu.org>
10663
10664 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10665
075b3282
DJ
106662004-03-23 Daniel Jacobowitz <drow@mvista.com>
10667
10668 * linux-low.c (linux_wait): Clear all_processes list also.
10669
fa6a77dc
DJ
106702004-03-12 Daniel Jacobowitz <drow@mvista.com>
10671
10672 * linux-low.c: Include <errno.h>. Remove extern declaration of
10673 errno.
10674
6d782a97
DJ
106752004-03-12 Daniel Jacobowitz <drow@mvista.com>
10676
10677 * gdbreplay.c, server.h, utils.c: Update copyright years.
10678
3a7fb99b
DJ
106792004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10680
10681 * server.c (main): Print child status or termination signal from
10682 variable 'signal', not 'sig'.
10683
c3e735a6
DJ
106842004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10685
10686 * linux-low.c (linux_read_memory): Change return type to
10687 int. Check for and return error from ptrace().
10688 * target.c (read_inferior_memory): Change return type to int. Pass
10689 back return status from the_target->read_memory().
10690 * target.h (struct target_ops): Adapt *read_memory() prototype.
10691 Update comment.
10692 (read_inferior_memory): Adapt prototype.
10693 * server.c (main): Return an error packet if
10694 read_inferior_memory() returns an error.
10695
a59d1c82
DJ
106962004-03-04 Daniel Jacobowitz <drow@mvista.com>
10697
10698 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10699 Unify with other clean targets.
10700
dc3f8883
DJ
107012004-02-29 Daniel Jacobowitz <drow@mvista.com>
10702
10703 * server.c (handle_v_cont): Call set_desired_inferior.
10704
89a208da
DJ
107052004-02-29 Daniel Jacobowitz <drow@mvista.com>
10706
10707 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10708
62ea82f5
DJ
107092004-02-29 Daniel Jacobowitz <drow@mvista.com>
10710
10711 * linux-low.c (linux_wait): Unblock async I/O.
10712 (linux_resume): Block and enable async I/O.
10713 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10714 * server.h (block_async_io, unblock_async_io): Add prototypes.
10715
6910d122
DJ
107162004-02-29 Daniel Jacobowitz <drow@mvista.com>
10717
10718 * remote-utils.c (remote_open): Print a status notice after
10719 opening a TCP port.
10720 * server.c (attach_inferior): Print a status notice after
10721 attaching.
10722
107232004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10724
10725 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10726
c89dc5d4
DJ
107272004-02-26 Daniel Jacobowitz <drow@mvista.com>
10728
10729 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10730 error packet.
10731 * server.c, target.h: Update copyright years.
10732
4b8dad4a
RM
107332004-02-25 Roland McGrath <roland@redhat.com>
10734
10735 * target.h (struct target_ops): New member `read_auxv'.
10736 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10737 * linux-low.c (linux_read_auxv): New function.
10738 (linux_target_ops): Initialize `read_auxv' member to that.
10739
d7446758
JB
107402004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10741
10742 Committed by Jim Blandy <jimb@redhat.com>.
10743
10744 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10745 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10746 instead of GPR_SIZE to distiguish s390 and s390x targets.
10747
5544ad89
DJ
107482004-01-31 Daniel Jacobowitz <drow@mvista.com>
10749
10750 * linux-low.c: Update copyright year.
10751 (check_removed_breakpoint): Clear pending_is_breakpoint.
10752 (linux_set_resume_request, linux_queue_one_thread)
10753 (resume_status_pending_p): New functions.
10754 (linux_continue_one_thread): Use process->resume.
10755 (linux_resume): Only resume threads if there are no pending events.
10756 * linux-low.h (struct process_info): Add resume request
10757 pointer.
10758
2a68b70e
DJ
107592004-01-30 Daniel Jacobowitz <drow@mvista.com>
10760
10761 * regcache.c (new_register_cache): Clear the allocated register
10762 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10763
64386c31
DJ
107642003-10-13 Daniel Jacobowitz <drow@mvista.com>
10765
10766 * linux-low.c (linux_resume): Take a struct thread_resume *
10767 argument.
10768 (linux_wait): Update call.
10769 (resume_ptr): New static variable.
10770 (linux_continue_one_thread): Renamed from
10771 linux_continue_one_process. Use resume_ptr.
10772 (linux_resume): Use linux_continue_one_thread.
10773 * server.c (handle_v_cont, handle_v_requests): New functions.
10774 (myresume): New function.
10775 (main): Handle 'v' case.
10776 * target.h (struct thread_resume): New type.
10777 (struct target_ops): Change argument of "resume" to struct
10778 thread_resume *.
10779 (myresume): Delete macro.
10780
c938e9b0
L
107812003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10782
10783 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10784 (uninstall): Support DESTDIR.
10785
7f313d07
BC
10786Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10787
10788 * configure.srv: Add xscale*linux copy of arm*linux entry.
10789
3b2fc2ea
DJ
107902003-07-24 Daniel Jacobowitz <drow@mvista.com>
10791
10792 * linux-arm-low.c (arm_reinsert_addr): New function.
10793 (the_low_target): Add arm_reinsert_addr.
10794
1c0a559e
MK
107952003-07-08 Mark Kettenis <kettenis@gnu.org>
10796
10797 * mem-break.c: Remove whitespace at end of file.
10798
43d5792c
DJ
107992003-06-28 Daniel Jacobowitz <drow@mvista.com>
10800
10801 * configure.in: Check whether we need to prototype strerror.
10802 * server.h: Optionally prototype strerror.
10803 * gdbreplay.c (perror_with_name): Use strerror.
10804 * linux-low.c (linux_attach_lwp): Use strerror.
10805 * utils.c (perror_with_name): Use strerror.
10806 * config.in, configure: Regenerated.
10807
c8a86edf
DJ
108082003-06-28 Daniel Jacobowitz <drow@mvista.com>
10809
10810 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10811 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10812
73d37363
DJ
108132003-06-20 Daniel Jacobowitz <drow@mvista.com>
10814
10815 * Makefile.in (SFILES): Update.
10816 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10817 low-sun3.c: Remove files.
10818
6ad8ae5c
DJ
108192003-06-17 Daniel Jacobowitz <drow@mvista.com>
10820
10821 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10822 (linux_detach_one_process, linux_detach): New functions.
10823 (linux_target_ops): Add linux_detach.
10824 * server.c (main): Handle 'D' packet.
10825 * target.h (struct target_ops): Add "detach" member.
10826 (detach_inferior): Define.
10827
1581182a
MK
108282003-06-13 Mark Kettenis <kettenis@gnu.org>
10829
10830 From Kelley Cook <kelleycook@wideopenwest.com>:
10831 * configure.srv: Accept i[34567]86 variants.
10832
e5379b03
DJ
108332003-06-05 Daniel Jacobowitz <drow@mvista.com>
10834
10835 * linux-low.c (linux_wait_for_event): Correct comment typos.
10836 (linux_resume_one_process): Call check_removed_breakpoint.
10837 (linux_send_signal): New function.
10838 (linux_target_ops): Add linux_send_signal.
10839 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10840 of kill.
10841 * target.h (struct target_ops): Add send_signal.
10842
2ff29de4
JB
108432003-05-29 Jim Blandy <jimb@redhat.com>
10844
10845 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10846 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10847 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10848 away part of the register's value.
10849
254787d4
DJ
108502003-03-26 Daniel Jacobowitz <drow@mvista.com>
10851
10852 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10853 (linux_wait_for_event, linux_init_signals): Likewise.
10854
94e10508
DJ
108552003-03-17 Daniel Jacobowitz <drow@mvista.com>
10856
10857 * configure.in: Check for stdlib.h.
10858 * configure: Regenerated.
10859 * config.in: Regenerated.
10860
4c0711e0
DJ
108612003-01-04 Andreas Schwab <schwab@suse.de>
10862
10863 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10864
ef66e766
AC
108652003-01-02 Andrew Cagney <ac131313@redhat.com>
10866
10867 * Makefile.in: Remove obsolete code.
10868
a1358604
DJ
108692002-11-20 Daniel Jacobowitz <drow@mvista.com>
10870
10871 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10872 defined(PT_FPR0_HI).
10873
23ce3b1c
DJ
108742002-11-17 Stuart Hughes <seh@zee2.com>
10875
10876 * linux-arm-low.c (arm_num_regs): Increase.
10877 (arm_regmap): Include status register.
10878
108792002-11-17 Daniel Jacobowitz <drow@mvista.com>
10880
10881 * linux-low.c (register_addr): Remove incorrect -1 check.
10882
a9fa9f7d
DJ
108832002-08-29 Daniel Jacobowitz <drow@mvista.com>
10884
10885 * linux-low.c (linux_create_inferior): Call setpgid. Return
10886 the new PID.
10887 (unstopped_p, linux_signal_pid): Remove.
10888 (linux_target_ops): Remove linux_signal_pid.
10889 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10890 global instead of target method.
10891 * target.h (struct target_ops): Remove signal_pid. Update comment
10892 for create_inferior.
10893 * server.c (signal_pid): New variable.
10894 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10895 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10896 (attach_inferior): Set signal_pid.
10897
17574093
DJ
108982002-08-23 Daniel Jacobowitz <drow@mvista.com>
10899
10900 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10901
109022002-08-20 Jim Blandy <jimb@redhat.com>
10903
10904 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10905 default for this.
10906
109072002-08-01 Andrew Cagney <cagney@redhat.com>
10908
10909 * Makefile.in: Make chill references obsolete.
10910
109112002-07-24 Kevin Buettner <kevinb@redhat.com>
10912
10913 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10914 * configure: Regenerate.
10915 * config.in: Regenerate.
10916
109172002-07-09 David O'Brien <obrien@FreeBSD.org>
10918
10919 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10920 (perror_with_name, remote_close, remote_open, expect, play): Static.
10921
109222002-07-04 Michal Ludvig <mludvig@suse.cz>
10923
4b8dad4a 10924 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10925 byte offsets instead of an array of indexes.
10926 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10927
109282002-06-13 Daniel Jacobowitz <drow@mvista.com>
10929
10930 * regcache.c: Add comment.
10931
109322002-06-11 Daniel Jacobowitz <drow@mvista.com>
10933
10934 * thread-db.c: New file.
10935 * proc-service.c: New file.
10936 * acinclude.m4: New file.
10937 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10938 proc-service.o, and thread-db.o.
10939 (linux-low.o): Add USE_THREAD_DB.
10940 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10941 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10942 * aclocal.m4: Regenerated.
10943 * config.in: Regenerated.
10944 * configure: Regenerated.
10945 * configure.in: Check for proc_service.h, sys/procfs.h,
10946 thread_db.h, and linux/elf.h headrs.
10947 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10948 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10949 Check for -lthread_db and thread support.
10950 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10951 PowerPC, and SuperH.
10952 * i387-fp.c: Constify arguments.
10953 * i387-fp.h: Likewise.
10954 * inferiors.c: (struct thread_info): Renamed from
10955 `struct inferior_info'. Remove PID member. Use generic inferior
10956 list header. All uses updated.
10957 (inferiors, signal_pid): Removed.
10958 (all_threads): New variable.
10959 (get_thread): Define.
10960 (add_inferior_to_list): New function.
10961 (for_each_inferior): New function.
10962 (change_inferior_id): New function.
10963 (add_inferior): Removed.
10964 (remove_inferior): New function.
10965 (add_thread): New function.
10966 (free_one_thread): New function.
10967 (remove_thread): New function.
10968 (clear_inferiors): Use for_each_inferior and free_one_thread.
10969 (find_inferior): New function.
10970 (find_inferior_id): New function.
10971 (inferior_target_data): Update argument type.
10972 (set_inferior_target_data): Likewise.
10973 (inferior_regcache_data): Likewise.
10974 (set_inferior_regcache_data): Likewise.
10975 * linux-low.c (linux_bp_reinsert): Remove.
10976 (all_processes, stopping_threads, using_thrads)
10977 (struct pending_signals, debug_threads, pid_of): New.
10978 (inferior_pid): Replace with macro.
10979 (struct inferior_linux_data): Remove.
10980 (get_stop_pc, add_process): New functions.
10981 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10982 Use add_process and add_thread.
10983 (linux_attach_lwp): New function, based on old linux_attach. Use
10984 add_process and add_thread. Set stop_expected for new threads.
10985 (linux_attach): New function.
10986 (linux_kill_one_process): New function.
10987 (linux_kill): Kill all LWPs.
10988 (linux_thread_alive): Use find_inferior_id.
10989 (check_removed_breakpoints, status_pending_p): New functions.
10990 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10991 Update. Use WNOHANG. Wait for cloned processes also. Update process
10992 struct for the found process.
10993 (linux_wait_for_event): New function.
10994 (linux_wait): Use it. Support LWPs.
10995 (send_sigstop, wait_for_sigstop, stop_all_processes)
10996 (linux_resume_one_process, linux_continue_one_process): New functions.
10997 (linux_resume): Support LWPs.
10998 (REGISTER_RAW_SIZE): Remove.
10999 (fetch_register): Use register_size instead. Call supply_register.
11000 (usr_store_inferior_registers): Likewise. Call collect_register.
11001 Fix recursive case.
11002 (regsets_fetch_inferior_registers): Improve error message.
11003 (regsets_store_inferior_registers): Add debugging.
11004 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11005 (unstopped_p, linux_signal_pid): New functions.
11006 (linux_target_ops): Add linux_signal_pid.
11007 (linux_init_signals): New function.
11008 (initialize_low): Call it. Initialize using_threads.
11009 * regcache.c (inferior_regcache_data): Add valid
11010 flag.
11011 (get_regcache): Fetch registers lazily. Add fetch argument
11012 and update all callers.
11013 (regcache_invalidate_one, regcache_invalidate): New
11014 functions.
11015 (new_register_cache): Renamed from create_register_cache.
11016 Return the new regcache.
11017 (free_register_cache): Change argument to a void *.
11018 (registers_to_string, registers_from_string): Call get_regcache
11019 with fetch flag set.
11020 (register_data): Make static. Pass fetch flag to get_regcache.
11021 (supply_register): Call get_regcache with fetch flag clear.
11022 (collect_register): Call get_regcache with fetch flag set.
11023 (collect_register_as_string): New function.
11024 * regcache.h: Update.
11025 * remote-utils.c (putpkt): Flush after debug output and use
11026 stderr.
11027 Handle input interrupts while waiting for an ACK.
11028 (input_interrupt): Use signal_pid method.
11029 (getpkt): Flush after debug output and use stderr.
11030 (outreg): Use collect_register_as_string.
11031 (new_thread_notify, dead_thread_notify): New functions.
11032 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11033 and general_thread.
11034 (look_up_one_symbol): Flush after debug output.
11035 * server.c (step_thread, server_waiting): New variables.
11036 (start_inferior): Don't use signal_pid. Update call to mywait.
11037 (attach_inferior): Update call to mywait.
11038 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11039 (main): Don't fetch/store registers explicitly. Use
11040 set_desired_inferior. Support proposed ``Hs'' packet. Update
11041 calls to mywait.
11042 * server.h: Update.
11043 (struct inferior_list, struct_inferior_list_entry): New.
11044 * target.c (set_desired_inferior): New.
11045 (write_inferior_memory): Constify.
11046 (mywait): New function.
11047 * target.h: Update.
11048 (struct target_ops): New signal_pid method.
11049 (mywait): Removed macro, added prototype.
11050
11051 * linux-low.h (regset_func): Removed.
11052 (regset_fill_func, regset_store_func): New.
11053 (enum regset_type): New.
11054 (struct regset_info): Add type field. Use new operation types.
11055 (struct linux_target_ops): stop_pc renamed to get_pc.
11056 Add decr_pc_after_break and breakpoint_at.
11057 (get_process, get_thread_proess, get_process_thread)
11058 (strut process_info, all_processes, linux_attach_lwp)
11059 (thread_db_init): New.
11060
11061 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11062 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11063 (the_low_target): Add new members.
11064 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11065 (i386_store_fpxregset): Constify.
11066 (target_regsets): Add new kind identifier.
11067 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11068 (i386_set_pc): Add debugging.
11069 (i386_breakpoint_at): New function.
11070 (the_low_target): Add new members.
11071 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11072 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11073 (mips_breakpoint_at): New.
11074 (the_low_target): Add new members.
11075 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11076 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11077 (the_low_target): Add new members.
11078 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11079 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11080 (the_low_target): Add new members.
11081 * linux-x86-64-low.c (target_regsets): Add new kind
11082 identifier.
11083
110842002-05-15 Daniel Jacobowitz <drow@mvista.com>
11085
11086 From Martin Pool <mbp@samba.org>:
11087 * server.c (gdbserver_usage): New function.
11088 (main): Call it.
11089
110902002-05-14 Daniel Jacobowitz <drow@mvista.com>
11091
11092 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11093 stop_at -> stop_pc.
11094
110952002-05-04 Andrew Cagney <ac131313@redhat.com>
11096
11097 * Makefile.in: Remove obsolete code.
11098
110992002-04-24 Michal Ludvig <mludvig@suse.cz>
11100
11101 * linux-low.c (regsets_fetch_inferior_registers),
11102 (regsets_store_inferior_registers): Removed cast to int from
11103 ptrace() calls.
11104 * regcache.h: Added declaration of struct inferior_info.
11105
111062002-04-20 Daniel Jacobowitz <drow@mvista.com>
11107
11108 * inferiors.c (struct inferior_info): Add regcache_data.
11109 (add_inferior): Call create_register_cache.
11110 (clear_inferiors): Call free_register_cache.
11111 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11112 * regcache.c (struct inferior_regcache_data): New.
11113 (registers): Remove.
11114 (get_regcache): New function.
11115 (create_register_cache, free_register_cache): New functions.
11116 (set_register_cache): Don't initialize the register cache here.
11117 (registers_to_string, registers_from_string, register_data): Call
11118 get_regcache.
11119 * regcache.h: Add prototypes.
11120 * server.h: Likewise.
11121
111222002-04-20 Daniel Jacobowitz <drow@mvista.com>
11123
11124 * mem-break.c: New file.
11125 * mem-break.h: New file.
11126 * Makefile.in: Add mem-break.o rule; update server.h
11127 dependencies.
11128 * inferiors.c (struct inferior_info): Add target_data
11129 member.
11130 (clear_inferiors): Free target_data member if set.
11131 (inferior_target_data, set_inferior_target_data): New functions.
11132 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11133 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11134 * linux-low.c (linux_bp_reinsert): New variable.
11135 (struct inferior_linux_data): New.
11136 (linux_create_inferior): Use set_inferior_target_data.
11137 (linux_attach): Likewise. Call add_inferior.
11138 (linux_wait_for_one_inferior): New function.
11139 (linux_wait): Call it.
11140 (linux_write_memory): Add const.
11141 (initialize_low): Call set_breakpoint_data.
11142 * linux-low.h (struct linux_target_ops): Add breakpoint
11143 handling members.
11144 * server.c (attach_inferior): Remove extra add_inferior
11145 call.
11146 * server.h: Include mem-break.h. Update inferior.c
11147 prototypes.
11148 * target.c (read_inferior_memory)
11149 (write_inferior_memory): New functions.
11150 * target.h (read_inferior_memory)
11151 (write_inferior_memory): Change macros to prototypes.
11152 (struct target_ops): Update comments. Add const to write_memory
11153 definition.
11154
111552002-04-11 Daniel Jacobowitz <drow@mvista.com>
11156
11157 * linux-low.c (usr_store_inferior_registers): Support
11158 registers which are allowed to fail to store.
11159 * linux-low.h (linux_target_ops): Likewise.
11160 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11161 (ppc_cannot_store_register): FPSCR may not be storable.
11162
111632002-04-09 Daniel Jacobowitz <drow@mvista.com>
11164
11165 * server.h: Include <string.h> if HAVE_STRING_H.
11166 * ChangeLog: Correct paths in last ChangeLog entry.
11167
111682002-04-09 Daniel Jacobowitz <drow@mvista.com>
11169
11170 * linux-low.h: Remove obsolete prototypes.
11171 (struct linux_target_ops): New.
11172 (extern the_low_target): New.
11173 * linux-low.c (num_regs, regmap): Remove declarations.
11174 (register_addr): Use the_low_target explicitly.
11175 (fetch_register): Likewise.
11176 (usr_fetch_inferior_registers): Likewise.
11177 (usr_store_inferior_registers): Likewise.
11178 * linux-arm-low.c (num_regs): Remove.
11179 (arm_num_regs): Define.
11180 (arm_regmap): Renamed from regmap, made static.
11181 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11182 made static.
11183 (arm_cannot_store_register): Renamed from cannot_store_register,
11184 made static.
11185 (the_low_target): New.
11186 * linux-i386-low.c (num_regs): Remove.
11187 (i386_num_regs): Define.
11188 (i386_regmap): Renamed from regmap, made static.
11189 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11190 made static.
11191 (i386_cannot_store_register): Renamed from cannot_store_register,
11192 made static.
11193 (the_low_target): New.
11194 * linux-ia64-low.c (num_regs): Remove.
11195 (ia64_num_regs): Define.
11196 (ia64_regmap): Renamed from regmap, made static.
11197 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11198 made static.
11199 (ia64_cannot_store_register): Renamed from cannot_store_register,
11200 made static.
11201 (the_low_target): New.
11202 * linux-m68k-low.c (num_regs): Remove.
11203 (m68k_num_regs): Define.
11204 (m68k_regmap): Renamed from regmap, made static.
11205 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11206 made static.
11207 (m68k_cannot_store_register): Renamed from cannot_store_register,
11208 made static.
11209 (the_low_target): New.
11210 * linux-mips-low.c (num_regs): Remove.
11211 (mips_num_regs): Define.
11212 (mips_regmap): Renamed from regmap, made static.
11213 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11214 made static.
11215 (mips_cannot_store_register): Renamed from cannot_store_register,
11216 made static.
11217 (the_low_target): New.
11218 * linux-ppc-low.c (num_regs): Remove.
11219 (ppc_num_regs): Define.
11220 (ppc_regmap): Renamed from regmap, made static.
11221 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11222 made static.
11223 (ppc_cannot_store_register): Renamed from cannot_store_register,
11224 made static.
11225 (the_low_target): New.
11226 * linux-s390-low.c (num_regs): Remove.
11227 (s390_num_regs): Define.
11228 (s390_regmap): Renamed from regmap, made static.
11229 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11230 made static.
11231 (s390_cannot_store_register): Renamed from cannot_store_register,
11232 made static.
11233 (the_low_target): New.
11234 * linux-sh-low.c (num_regs): Remove.
11235 (sh_num_regs): Define.
11236 (sh_regmap): Renamed from regmap, made static.
11237 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11238 made static.
11239 (sh_cannot_store_register): Renamed from cannot_store_register,
11240 made static.
11241 (the_low_target): New.
11242 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11243 (the_low_target): New.
11244
112452002-04-09 Daniel Jacobowitz <drow@mvista.com>
11246
11247 * Makefile.in: Add stamp-h target.
11248 * configure.in: Create stamp-h.
11249 * configure: Regenerated.
11250
112512002-04-09 Daniel Jacobowitz <drow@mvista.com>
11252
11253 * inferiors.c: New file.
11254 * target.c: New file.
11255 * target.h: New file.
11256 * Makefile.in: Add target.o and inferiors.o. Update
11257 dependencies.
11258 * linux-low.c (inferior_pid): New static variable,
11259 moved from server.c.
11260 (linux_create_inferior): Renamed from create_inferior.
11261 Call add_inferior. Return 0 on success instead of a PID.
11262 (linux_attach): Renamed from myattach.
11263 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11264 (linux_thread_alive): Renamed from mythread_alive.
11265 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11266 child dies.
11267 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11268 (regsets_store_inferior_registers): Correct error message.
11269 Add missing ``return 0''.
11270 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11271 (linux_store_registers): Renamed from store_inferior_registers.
11272 (linux_read_memory): Renamed from read_inferior_memory.
11273 (linux_write_memory): Renamed from write_inferior_memory.
11274 (linux_target_ops): New structure.
11275 (initialize_low): Call set_target_ops ().
11276 * remote-utils.c (unhexify): New function.
11277 (hexify): New function.
11278 (input_interrupt): Send signals to ``signal_pid''.
11279 * server.c (inferior_pid): Remove.
11280 (start_inferior): Update create_inferior call.
11281 (attach_inferior): Call add_inferior.
11282 (handle_query): New function.
11283 (main): Call handle_query for `q' packets.
11284 * server.h: Include "target.h". Remove obsolete prototypes.
11285 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11286
112872002-04-09 Daniel Jacobowitz <drow@mvista.com>
11288
11289 * Makefile.in: Add WARN_CFLAGS. Update configury
11290 dependencies.
11291 * configure.in: Check for <string.h>
11292 * configure: Regenerate.
11293 * config.in: Regenerate.
11294 * gdbreplay.c: Include needed system headers.
11295 (remote_open): Remove strchr prototype.
11296 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11297 * regcache.c (supply_register): Change buf argument to const void *.
11298 (supply_register_by_name): Likewise.
11299 (collect_register): Change buf argument to void *.
11300 (collect_register_by_name): Likewise.
11301 * regcache.h: Add missing prototypes.
11302 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11303 * server.c (handle_query): New function.
11304 (attached): New static variable, moved out of main.
11305 (main): Quiet longjmp clobber warnings.
11306 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11307 * utils.c (error): Remove NORETURN.
11308 (fatal): Likewise.