]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Move make_cleanup_close to common code
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3ac2e371
GB
12015-06-09 Gary Benson <gbenson@redhat.com>
2
3 * hostio.c (handle_open): Process mode argument with
4 fileio_to_host_mode.
5
ca9b78ce
YQ
62015-06-01 Yao Qi <yao.qi@linaro.org>
7
8 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
9 * linux-x86-low.c: Likewise.
10
bfacd19d
DB
112015-05-28 Don Breazeal <donb@codesourcery.com>
12
13 * linux-low.c (handle_extended_wait): Initialize
14 thread_info.last_resume_kind for new fork children.
15
452003ef
PA
162015-05-15 Pedro Alves <palves@redhat.com>
17
18 * target.h (target_handle_new_gdb_connection): Rewrite using if
19 wrapped in do/while.
20
1041a03c
JB
212015-05-14 Joel Brobecker <brobecker@adacore.com>
22
23 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
24 * configure, config.in: Regenerate.
25 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
26 Declare typedef.
27
c269dbdb
DB
282015-05-12 Don Breazeal <donb@codesourcery.com>
29
30 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
31 PTRACE_EVENT_VFORK_DONE.
32 (linux_low_ptrace_options, extended_event_reported): Add vfork
33 events.
34 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
35 and "vforkdone" for RSP 'T' Stop Reply Packet.
36 * server.h (report_vfork_events): Declare
37 global variable.
38
3a8a0396
DB
392015-05-12 Don Breazeal <donb@codesourcery.com>
40
41 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
42 (the_low_target) <new_fork>: Initialize new member.
43 * linux-arm-low.c (arm_new_fork): New function.
44 (the_low_target) <new_fork>: Initialize new member.
45 * linux-low.c (handle_extended_wait): Call new target function
46 new_fork.
47 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
48 * linux-mips-low.c (mips_add_watchpoint): New function
49 extracted from mips_insert_point.
50 (the_low_target) <new_fork>: Initialize new member.
51 (mips_linux_new_fork): New function.
52 (mips_insert_point): Call mips_add_watchpoint.
53 * linux-x86-low.c (x86_linux_new_fork): New function.
54 (the_low_target) <new_fork>: Initialize new member.
55
de0d863e
DB
562015-05-12 Don Breazeal <donb@codesourcery.com>
57
58 * linux-low.c (handle_extended_wait): Implement return value,
59 rename argument 'event_child' to 'event_lwp', handle
60 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
61 (linux_low_ptrace_options): New function.
62 (linux_low_filter_event): Call linux_low_ptrace_options,
63 use different argument fo linux_enable_event_reporting,
64 use return value from handle_extended_wait.
65 (extended_event_reported): New function.
66 (linux_wait_1): Call extended_event_reported and set
67 status to report fork events.
68 (linux_write_memory): Add pid to debug message.
69 (reset_lwp_ptrace_options_callback): New function.
70 (linux_handle_new_gdb_connection): New function.
71 (linux_target_ops): Initialize new structure member.
72 * linux-low.h (struct lwp_info) <waitstatus>: New member.
73 * lynx-low.c: Initialize new structure member.
74 * remote-utils.c (prepare_resume_reply): Implement stop reason
75 "fork" for "T" stop message.
76 * server.c (handle_query): Call handle_new_gdb_connection.
77 * server.h (report_fork_events): Declare global flag.
78 * target.h (struct target_ops) <handle_new_gdb_connection>:
79 New member.
80 (target_handle_new_gdb_connection): New macro.
81 * win32-low.c: Initialize new structure member.
82
ddcbc397
DB
832015-05-12 Don Breazeal <donb@codesourcery.com>
84
85 * mem-break.c (APPEND_TO_LIST): Define macro.
86 (clone_agent_expr): New function.
87 (clone_one_breakpoint): New function.
88 (clone_all_breakpoints): New function.
89 * mem-break.h: Declare new functions.
90
89245bc0
DB
912015-05-12 Don Breazeal <donb@codesourcery.com>
92
93 * linux-low.c (linux_supports_fork_events): New function.
94 (linux_supports_vfork_events): New function.
95 (linux_target_ops): Initialize new structure members.
96 (initialize_low): Call linux_check_ptrace_features.
97 * lynx-low.c (lynx_target_ops): Initialize new structure
98 members.
99 * server.c (report_fork_events, report_vfork_events):
100 New global flags.
101 (handle_query): Add new features to qSupported packet and
102 response.
103 (captured_main): Initialize new global variables.
104 * target.h (struct target_ops) <supports_fork_events>:
105 New member.
106 <supports_vfork_events>: New member.
107 (target_supports_fork_events): New macro.
108 (target_supports_vfork_events): New macro.
109 * win32-low.c (win32_target_ops): Initialize new structure
110 members.
111
835205d0
GB
1122015-05-12 Gary Benson <gbenson@redhat.com>
113
114 * server.c (handle_qxfer_exec_file): Use current process
115 if annex is empty.
116
21e94bd9
SL
1172015-05-08 Sandra Loosemore <sandra@codesourcery.com>
118
119 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
120 Remove HAVE_PTRACE_GETREGS conditionals.
121 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
122 instead of PTRACE_GETREGS and PTRACE_SETREGS.
123
45614f15
YQ
1242015-05-08 Yao Qi <yao.qi@linaro.org>
125
126 * linux-low.c (linux_supports_conditional_breakpoints): New
127 function.
128 (linux_target_ops): Install new target method.
129 * lynx-low.c (lynx_target_ops): Install NULL hook for
130 supports_conditional_breakpoints.
131 * nto-low.c (nto_target_ops): Likewise.
132 * spu-low.c (spu_target_ops): Likewise.
133 * win32-low.c (win32_target_ops): Likewise.
134 * server.c (handle_query): Check
135 target_supports_conditional_breakpoints.
136 * target.h (struct target_ops) <supports_conditional_breakpoints>:
137 New field.
138 (target_supports_conditional_breakpoints): New macro.
139
80ad801e
PA
1402015-05-06 Pedro Alves <palves@redhat.com>
141
142 PR server/18081
143 * server.c (start_inferior): If the process exits, mourn it.
144
819843c7
GB
1452015-04-21 Gary Benson <gbenson@redhat.com>
146
147 * hostio.c (fileio_open_flags_to_host): Factored out to
148 fileio_to_host_openflags in common/fileio.c. Single use
149 updated.
150
a2d5a9d7
MF
1512015-04-17 Max Filippov <jcmvbkbc@gmail.com>
152
153 * linux-xtensa-low.c (xtensa_fill_gregset)
154 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
155 XCHAL_HAVE_LOOP.
156
deb44829
MF
1572015-04-17 Max Filippov <jcmvbkbc@gmail.com>
158
159 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
160 (regs_info): Replace usrregs pointer with NULL.
161
e57f1de3
GB
1622015-04-17 Gary Benson <gbenson@redhat.com>
163
164 * target.h (struct target_ops) <pid_to_exec_file>: New field.
165 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
166 * server.c (handle_qxfer_exec_file): New function.
167 (qxfer_packets): Add exec-file entry.
168 (handle_query): Report qXfer:exec-file:read as supported packet.
169
62828379
RN
1702015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
171
172 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
173
b88bb450
GB
1742015-04-09 Gary Benson <gbenson@redhat.com>
175
176 * hostio-errno.c (errno_to_fileio_error): Remove function.
177 Update caller to use remote_fileio_to_fio_error.
178
c8f4bfdd
YQ
1792015-04-09 Yao Qi <yao.qi@linaro.org>
180
181 * linux-low.c (linux_insert_point): Call
182 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
183 (linux_remove_point): Call remove_memory_breakpoint if type is
184 raw_bkpt_type_sw.
185 * linux-x86-low.c (x86_insert_point): Don't call
186 insert_memory_breakpoint.
187 (x86_remove_point): Don't call remove_memory_breakpoint.
188
41f98f02
PA
1892015-04-01 Pedro Alves <palves@redhat.com>
190 Cleber Rosa <crosa@redhat.com>
191
192 * server.c (gdbserver_usage): Reorganize and extend the usage
193 message.
194
2bf6fb9d
PA
1952015-03-24 Pedro Alves <palves@redhat.com>
196
197 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
198 output. Also dump TRAP_TRACE.
199 (linux_low_filter_event): In debug output, distinguish a
200 resume_stop SIGSTOP from a delayed SIGSTOP.
201
369f6daa
GB
2022015-03-24 Gary Benson <gbenson@redhat.com>
203
204 * linux-x86-low.c (x86_linux_new_thread): Moved to
205 nat/x86-linux.c.
206 (x86_linux_prepare_to_resume): Likewise.
207
8e5d4070
GB
2082015-03-24 Gary Benson <gbenson@redhat.com>
209
210 * Makefile.in (x86-linux-dregs.o): New rule.
211 * configure.srv: Add x86-linux-dregs.o to relevant targets.
212 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
213 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
214 (x86_linux_dr_get): Likewise.
215 (x86_linux_dr_set): Likewise.
216 (update_debug_registers_callback): Likewise.
217 (x86_linux_dr_set_addr): Likewise.
218 (x86_linux_dr_get_addr): Likewise.
219 (x86_linux_dr_set_control): Likewise.
220 (x86_linux_dr_get_control): Likewise.
221 (x86_linux_dr_get_status): Likewise.
222 (x86_linux_update_debug_registers): Likewise.
223
2b95d440
GB
2242015-03-24 Gary Benson <gbenson@redhat.com>
225
226 * linux-x86-low.c (x86_linux_update_debug_registers):
227 New function, factored out from...
228 (x86_linux_prepare_to_resume): ...this.
229
14b0bc68
GB
2302015-03-24 Gary Benson <gbenson@redhat.com>
231
232 * linux-x86-low.c (x86_linux_dr_get): Update comments.
233 (x86_linux_dr_set): Likewise.
234 (update_debug_registers_callback): Likewise.
235 (x86_linux_dr_set_addr): Likewise.
236 (x86_linux_dr_get_addr): Likewise.
237 (x86_linux_dr_set_control): Likewise.
238 (x86_linux_dr_get_control): Likewise.
239 (x86_linux_dr_get_status): Likewise.
240 (x86_linux_prepare_to_resume): Likewise.
241
5dfe6ca8
GB
2422015-03-24 Gary Benson <gbenson@redhat.com>
243
244 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
245 Use perror_with_name. Pass string through gettext.
246 (x86_linux_dr_set): Likewise.
247
d33472ad
GB
2482015-03-24 Gary Benson <gbenson@redhat.com>
249
250 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
251 (x86_linux_dr_set_addr): ...this.
252 (x86_dr_low_get_addr): Rename to...
253 (x86_linux_dr_get_addr): ...this.
254 (x86_dr_low_set_control): Rename to...
255 (x86_linux_dr_set_control): ...this.
256 (x86_dr_low_get_control): Rename to...
257 (x86_linux_dr_get_control): ...this.
258 (x86_dr_low_get_status): Rename to...
259 (x86_linux_dr_get_status): ...this.
260 (x86_dr_low): Update with new function names.
261
4b134ca1
GB
2622015-03-24 Gary Benson <gbenson@redhat.com>
263
264 * Makefile.in (x86-linux.o): New rule.
265 * configure.srv: Add x86-linux.o to relevant targets.
266 * linux-low.c (lwp_set_arch_private_info): New function.
267 (lwp_arch_private_info): Likewise.
268 * linux-x86-low.c: Include nat/x86-linux.h.
269 (arch_lwp_info): Removed structure.
270 (update_debug_registers_callback):
271 Use lwp_set_debug_registers_changed.
272 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
273 and lwp_set_debug_registers_changed.
274 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
275
34c703da
GB
2762015-03-24 Gary Benson <gbenson@redhat.com>
277
278 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
279 * linux-arm-low.c (arm_new_thread): Likewise.
280 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
281 * linux-mips-low.c (mips_linux_new_thread): Likewise.
282 * linux-x86-low.c (x86_linux_new_thread): Likewise.
283 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
284
cff068da
GB
2852015-03-24 Gary Benson <gbenson@redhat.com>
286
287 * linux-low.c (ptid_of_lwp): New function.
288 (lwp_is_stopped): Likewise.
289 (lwp_stop_reason): Likewise.
290 * linux-x86-low.c (update_debug_registers_callback):
291 Use lwp_is_stopped.
292 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
293 lwp_stop_reason.
294
b2f7c7e8
GB
2952015-03-24 Gary Benson <gbenson@redhat.com>
296
297 * linux-low.h (linux_stop_lwp): Remove declaration.
298
6d4ee8c6
GB
2992015-03-24 Gary Benson <gbenson@redhat.com>
300
301 * linux-low.h: Include nat/linux-nat.h.
302 * linux-low.c (iterate_over_lwps_args): New structure.
303 (iterate_over_lwps_filter): New function.
304 (iterate_over_lwps): Likewise.
305 * linux-x86-low.c (update_debug_registers_callback):
306 Update signature to what iterate_over_lwps expects.
307 Remove PID check that iterate_over_lwps now performs.
308 (x86_dr_low_set_addr): Use iterate_over_lwps.
309 (x86_dr_low_set_control): Likewise.
310
70a0bb6b
GB
3112015-03-24 Gary Benson <gbenson@redhat.com>
312
313 * linux-x86-low.c (x86_debug_reg_state): New function.
314 (x86_linux_prepare_to_resume): Use the above.
315
7b669087
GB
3162015-03-24 Gary Benson <gbenson@redhat.com>
317
318 * linux-low.c (current_lwp_ptid): New function.
319 * linux-x86-low.c: Include nat/linux-nat.h.
320 (x86_dr_low_get_addr): Use current_lwp_ptid.
321 (x86_dr_low_get_control): Likewise.
322 (x86_dr_low_get_status): Likewise.
323
eef49a3d
PA
3242015-03-20 Pedro Alves <palves@redhat.com>
325
326 * tracepoint.c (cmd_qtstatus): Make "str" const.
327
b2333d22
PA
3282015-03-20 Pedro Alves <palves@redhat.com>
329
330 * server.c (handle_general_set): Make "req_str" const.
331
23f238d3
PA
3322015-03-19 Pedro Alves <palves@redhat.com>
333
334 * linux-low.c (linux_resume_one_lwp): Rename to ...
335 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
336 instead call perror_with_name.
337 (check_ptrace_stopped_lwp_gone): New function.
338 (linux_resume_one_lwp): Reimplement as wrapper around
339 linux_resume_one_lwp_throw that swallows errors if the LWP is
340 gone.
341
91baf43f
PA
3422015-03-19 Pedro Alves <palves@redhat.com>
343
344 * linux-low.c (count_events_callback, select_event_lwp_callback):
345 No longer check whether the thread has resume_stop as last resume
346 kind.
347
8bf3b159
PA
3482015-03-19 Pedro Alves <palves@redhat.com>
349
350 * linux-low.c (count_events_callback, select_event_lwp_callback):
351 Use the lwp's status_pending_p field, not the thread's.
352
b90fc188
PA
3532015-03-19 Pedro Alves <palves@redhat.com>
354
355 * linux-low.c (select_event_lwp_callback): Update comments to
356 no longer mention SIGTRAP.
357
464b0089
GB
3582015-03-18 Gary Benson <gbenson@redhat.com>
359
360 * server.c (handle_query): Do not report vFile:fstat as supported.
361
aa9e327f
GB
3622015-03-11 Gary Benson <gbenson@redhat.com>
363
364 * hostio.c (sys/types.h): New include.
365 (sys/stat.h): Likewise.
366 (common-remote-fileio.h): Likewise.
367 (handle_fstat): New function.
368 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 369
791c0056
GB
3702015-03-11 Gary Benson <gbenson@redhat.com>
371
372 * configure.ac (AC_CHECK_MEMBERS): Add checks for
373 struct stat.st_blocks and struct stat.st_blksize.
374 * configure: Regenerate.
375 * config.in: Likewise.
376 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
377 (OBS): Add common-remote-fileio.o.
378 (common-remote-fileio.o): New rule.
379
9a9df970
PA
3802015-03-09 Pedro Alves <palves@redhat.com>
381
382 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
383 'struct sockaddr' pointer in 'accept' call.
384
9eb1356e
PA
3852015-03-09 Pedro Alves <palves@redhat.com>
386
387 Revert:
388 2015-03-07 Pedro Alves <palves@redhat.com>
389 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
390 or <winsock2.h> here. Instead include "gdb_socket.h".
391 (remote_open): Use union gdb_sockaddr_u.
392 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
393 or <winsock2.h> here. Instead include "gdb_socket.h".
394 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
395 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
396 or <sys/un.h>.
397 (init_named_socket, gdb_agent_helper_thread): Use union
398 gdb_sockaddr_u.
399
aac331e4
PA
4002015-03-07 Pedro Alves <palves@redhat.com>
401
402 * configure.ac (build_warnings): Move
403 -Wdeclaration-after-statement to the C-specific set.
404 * configure: Regenerate.
405
366c75fc
PA
4062015-03-07 Pedro Alves <palves@redhat.com>
407
408 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
409 or <winsock2.h> here. Instead include "gdb_socket.h".
410 (remote_open): Use union gdb_sockaddr_u.
411 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
412 or <winsock2.h> here. Instead include "gdb_socket.h".
413 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
414 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
415 or <sys/un.h>.
416 (init_named_socket, gdb_agent_helper_thread): Use union
417 gdb_sockaddr_u.
418
492d29ea
PA
4192015-03-07 Pedro Alves <palves@redhat.com>
420
421 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
422 instead.
423
60a191ed
YQ
4242015-03-06 Yao Qi <yao.qi@linaro.org>
425
426 * linux-aarch64-low.c (aarch64_insert_point): Use
427 show_debug_regs as a boolean.
428 (aarch64_remove_point): Likewise.
429
f5771b1d
PA
4302015-03-05 Pedro Alves <palves@redhat.com>
431
432 * lynx-low.c (lynx_target_ops): Install NULL hooks for
433 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
434 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
435 * nto-low.c (nto_target_ops): Likewise.
436 * spu-low.c (spu_target_ops): Likewise.
437 * win32-low.c (win32_target_ops): Likewise.
438
3e572f71
PA
4392015-03-04 Pedro Alves <palves@redhat.com>
440
441 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
442 Decide whether a breakpoint triggered based on the SIGTRAP's
443 siginfo.si_code.
444 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
445 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
446 (linux_low_filter_event): Check for breakpoints before checking
447 watchpoints.
448 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
449 siginfo.si_code.
450 (linux_stopped_by_sw_breakpoint)
451 (linux_supports_stopped_by_sw_breakpoint)
452 (linux_stopped_by_hw_breakpoint)
453 (linux_supports_stopped_by_hw_breakpoint): New functions.
454 (linux_target_ops): Install new target methods.
455
1ec68e26
PA
4562015-03-04 Pedro Alves <palves@redhat.com>
457
458 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
459 * server.c (swbreak_feature, hwbreak_feature): New globals.
460 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
461 (captured_main): Clear swbreak_feature and hwbreak_feature.
462 * server.h (swbreak_feature, hwbreak_feature): Declare.
463 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
464 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
465 supports_stopped_by_hw_breakpoint>: New fields.
466 (target_supports_stopped_by_sw_breakpoint)
467 (target_stopped_by_sw_breakpoint)
468 (target_supports_stopped_by_hw_breakpoint)
469 (target_stopped_by_hw_breakpoint): Declare.
470
15c66dd6
PA
4712015-03-04 Pedro Alves <palves@redhat.com>
472
473 enum lwp_stop_reason -> enum target_stop_reason
474 * linux-low.c (check_stopped_by_breakpoint): Adjust.
475 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
476 (linux_wait_1, stuck_in_jump_pad_callback)
477 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
478 (linux_stopped_by_watchpoint):
479 * linux-low.h (enum lwp_stop_reason): Delete.
480 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
481 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
482
98fc70d6
YQ
4832015-03-04 Yao Qi <yao.qi@linaro.org>
484
485 * Makefile.in (SFILES): Add linux-aarch64-low.c.
486
dd2ac174
GB
4872015-03-03 Gary Benson <gbenson@redhat.com>
488
489 * hostio.c (handle_vFile): Fix prefix lengths.
490
d68e53f4
MM
4912015-03-03 Markus Metzger <markus.t.metzger@intel.com>
492
493 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
494 ptr_bits.
495
bf2d68ab
AA
4962015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
497
498 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
499 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
500 (clean): Add "rm -f" for above C files.
501 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
502 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
503 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
504 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
505 * linux-s390-low.c (HWCAP_S390_VX): New macro.
506 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
507 (init_registers_s390x_vx_linux64)
508 (init_registers_s390x_tevx_linux64)
509 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
510 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
511 declarations.
512 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
513 (s390_store_vxrs_high): New functions.
514 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
515 NT_S390_VXRS_HIGH.
516 (s390_arch_setup): Add logic for selecting one of the new target
517 descriptions. Activate the new vector regsets if applicable.
518 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
519 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
520 and init_registers_s390x_tevx_linux64.
521
c966a859
PA
5222015-03-01 Pedro Alves <palves@redhat.com>
523
524 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
525 parameter.
526
4180215b
PA
5272015-02-27 Pedro Alves <palves@redhat.com>
528
529 * linux-x86-low.c (u_debugreg_offset): New function.
530 (x86_linux_dr_get, x86_linux_dr_set): Use it.
531
749bab01
PA
5322015-02-27 Pedro Alves <palves@redhat.com>
533
534 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
535 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
536 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
537 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
538 (ps_lsetfpregs, ps_getpid)
539 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
540 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
541 (ps_lsetxregs, ps_plog): Declare.
542
3c14e5a3
PA
5432015-02-27 Pedro Alves <palves@redhat.com>
544
545 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
546 IP_AGENT_EXPORT_FUNC.
547 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
548 IP_AGENT_EXPORT_FUNC.
549 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
550 (IP_AGENT_EXPORT): Delete.
551 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
552 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
553 (gdb_trampoline_buffer_error, collecting, gdb_collect)
554 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
555 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
556 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
557 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
558 (traceframe_read_count, traceframe_write_count)
559 (traceframes_created, trace_state_variables, get_raw_reg)
560 (get_trace_state_variable_value, set_trace_state_variable_value)
561 (ust_loaded, helper_thread_id, cmd_buf): Use
562 IPA_SYM_EXPORTED_NAME.
563 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
564 (tracepoints) Use IP_AGENT_EXPORT_VAR.
565 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
566 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
567 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
568 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
569 EXTERN_C_PUSH/EXTERN_C_POP.
570 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
571 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
572 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
573 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
574 (traceframe_write_count, traceframe_read_count)
575 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
576 (about_to_request_buffer_space, get_trace_state_variable_value)
577 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
578 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
579 EXTERN_C_PUSH/EXTERN_C_POP.
580 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
581 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
582 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
583 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
584 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
585 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
586 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
587 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
588 Define.
589 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
590 (IP_AGENT_EXPORT_VAR_DECL): Define.
591 (tracing): Declare.
592 (gdb_agent_get_raw_reg): Declare.
593
fe978cb0
PA
5942015-02-27 Tom Tromey <tromey@redhat.com>
595 Pedro Alves <palves@redhat.com>
596
597 Rename symbols whose names are reserved C++ keywords throughout.
598
3bc3d82a
PA
5992015-02-27 Pedro Alves <palves@redhat.com>
600
601 * Makefile.in (COMPILER): New, get it from autoconf.
602 (CXX): Get from autoconf instead.
603 (COMPILE.pre): Use COMPILER.
604 (CC-LD): Rename to ...
605 (CC_LD): ... this. Use COMPILER.
606 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
607 (CXX_FOR_TARGET): Default to g++ instead of gcc.
608 * acinclude.m4: Include build-with-cxx.m4.
609 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
610 Disable -Werror by default if building in C++ mode.
611 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
612 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
613 the C++ compiler. Save/restore CXXFLAGS too.
614 * configure: Regenerate.
615
07697489
PA
6162015-02-27 Pedro Alves <palves@redhat.com>
617
618 * acinclude.m4: Include libiberty.m4.
619 * configure.ac: Call libiberty_INIT.
620 * config.in, configure: Regenerate.
621
9beb7c4e
PA
6222015-02-26 Pedro Alves <palves@redhat.com>
623
624 * linux-low.c (linux_wait_1): When incrementing the PC past a
625 program breakpoint always use the_low_target.breakpoint_len as
626 increment, rather than the maximum between that and
627 the_low_target.decr_pc_after_break.
628
8090aef2
PA
6292015-02-23 Pedro Alves <palves@redhat.com>
630
631 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
632 thread was doing a step-over; always adjust the PC if
633 we stepped over a permanent breakpoint.
634 (linux_wait_1): If we stepped over breakpoint that was on top of a
635 permanent breakpoint, manually advance the PC past it.
636
bc9540e8
PA
6372015-02-23 Pedro Alves <palves@redhat.com>
638
639 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
640 modes.
641 (x86_fill_gregset, x86_store_gregset): Use it when handling
642 $orig_eax.
643
2db9a427
PA
6442015-02-20 Pedro Alves <palves@redhat.com>
645
646 * thread-db.c: Include "nat/linux-procfs.h".
647 (thread_db_init): Skip listing new threads if the kernel supports
648 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
649
afa8d396
PA
6502015-02-20 Pedro Alves <palves@redhat.com>
651
652 * linux-low.c (status_pending_p_callback): Use ptid_match.
653
c9587f88
AT
6542015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
655
656 PR breakpoints/16812
657 * linux-low.c (wstatus_maybe_breakpoint): Remove.
658 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
659 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
660
b05ec7a5
AT
6612015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
662
663 PR breakpoints/15956
664 * tracepoint.c (cmd_qtinit): Add check for current_thread.
665
d33501a5
MM
6662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
667
668 * linux-low.c (linux_low_btrace_conf): Print size.
669 * server.c (handle_btrace_conf_general_set): New.
670 (hanle_general_set): Call handle_btrace_conf_general_set.
671 (handle_query): Report Qbtrace-conf:bts:size as supported.
672
f4abbc16
MM
6732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
674
675 * linux-low.c (linux_low_enable_btrace): Update parameters.
676 (linux_low_btrace_conf): New.
677 (linux_target_ops)<to_btrace_conf>: Initialize.
678 * server.c (current_btrace_conf): New.
679 (handle_btrace_enable): Rename to ...
680 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
681 to target_enable_btrace. Update comment. Update users.
682 (handle_qxfer_btrace_conf): New.
683 (qxfer_packets): Add btrace-conf entry.
684 (handle_query): Report qXfer:btrace-conf:read as supported packet.
685 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
686 (target_ops)<read_btrace_conf>: New.
687 (target_enable_btrace): Update parameters.
688 (target_read_btrace_conf): New.
689
043c3577
MM
6902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
691
692 * server.c (handle_btrace_general_set): Remove call to
693 target_supports_btrace.
694 (supported_btrace_packets): New.
695 (handle_query): Call supported_btrace_packets.
696 * target.h: include btrace-common.h.
697 (btrace_target_info): Removed.
698 (supports_btrace, target_supports_btrace): Update parameters.
699
734b0e4b
MM
7002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
701
702 * Makefile.in (SFILES): Add common/btrace-common.c.
703 (OBS): Add common/btrace-common.o.
704 (btrace-common.o): Add build rules.
705 * linux-low: Include btrace-common.h.
706 (linux_low_read_btrace): Use struct btrace_data. Call
707 btrace_data_init and btrace_data_fini.
708
d6c146e9
PA
7092015-02-06 Pedro Alves <palves@redhat.com>
710
711 * thread-db.c (find_new_threads_callback): Add debug output.
712
20ba1ce6
PA
7132015-02-04 Pedro Alves <palves@redhat.com>
714
715 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
716 (resume_stopped_resumed_lwps): New function.
717 (linux_wait_for_event_filtered): Use it.
718
8cc73a39
SDJ
7192015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
720
721 * Makefile.in (SFILES): Add linux-personality.c.
722 (linux-personality.o): New rule.
723 * configure.srv (srv_linux_obj): Add linux-personality.o to the
724 list of objects to be built.
725 * linux-low.c: Include nat/linux-personality.h.
726 (linux_create_inferior): Remove code to disable address space
727 randomization (moved to ../nat/linux-personality.c). Create
728 cleanup to disable address space randomization.
729
fb23d554
SDJ
7302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
731
732 * Makefile.in (posix-strerror.o): New rule.
733 (mingw-strerror.o): Likewise.
734 * configure: Regenerated.
735 * configure.ac: Source file ../common/common.host. Initialize new
736 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
737
cdf43629
YQ
7382015-01-14 Yao Qi <yao@codesourcery.com>
739
740 * Makefile.in (SFILES): Add nat/ppc-linux.c.
741 (ppc-linux.o): New rule.
742 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
743 * configure.ac: AC_CHECK_FUNCS(getauxval).
744 * config.in: Re-generated.
745 * configure: Re-generated.
746 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
747 ppc64_64bit_inferior_p
748
514c5338
YQ
7492015-01-14 Yao Qi <yao@codesourcery.com>
750
751 * linux-ppc-low.c: Include "nat/ppc-linux.h".
752 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
753 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
754 (PT_ORIG_R3, PT_TRAP): Likewise.
755 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
756 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
757 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
758
3368c1e5
JB
7592015-01-10 Joel Brobecker <brobecker@adacore.com>
760
761 * i387-fp.c (i387_cache_to_xsave): In look over
762 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
763 zmmh_low_space field by use of zmmh_high_space.
764
582511be
PA
7652015-01-09 Pedro Alves <palves@redhat.com>
766
767 * linux-low.c (step_over_bkpt): Move higher up in the file.
768 (handle_extended_wait): Don't store the stop_pc here.
769 (get_stop_pc): Adjust comments and rename to ...
770 (check_stopped_by_breakpoint): ... this. Record whether the LWP
771 stopped for a software breakpoint or hardware breakpoint.
772 (thread_still_has_status_pending_p): New function.
773 (status_pending_p_callback): Use
774 thread_still_has_status_pending_p. If the event is no longer
775 interesting, resume the LWP.
776 (handle_tracepoints): Add assert.
777 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
778 (wstatus_maybe_breakpoint): New function.
779 (cancel_breakpoint): Delete function.
780 (check_stopped_by_watchpoint): New function, factored out from
781 linux_low_filter_event.
782 (lp_status_maybe_breakpoint): Delete function.
783 (linux_low_filter_event): Remove filter_ptid argument.
784 Leave thread group exits pending here. Store the LWP's stop PC.
785 Always leave events pending.
786 (linux_wait_for_event_filtered): Pull all events out of the
787 kernel, and leave them all pending.
788 (count_events_callback, select_event_lwp_callback): Consider all
789 events.
790 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
791 (select_event_lwp): Only give preference to the stepping LWP in
792 all-stop mode. Adjust comments.
793 (ignore_event): New function.
794 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
795 references to cancel_breakpoints. Adjust to renames. Also give
796 equal priority to all LWPs that have had events in non-stop mode.
797 If reporting a software breakpoint event, unadjust the LWP's PC.
798 (linux_wait): If linux_wait_1 returned an ignored event, retry.
799 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
800 Adjust.
801 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
802 (resume_status_pending_p): Use thread_still_has_status_pending_p.
803 (linux_stopped_by_watchpoint): Adjust.
804 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
805 * linux-low.h (enum lwp_stop_reason): New.
806 (struct lwp_info) <stop_pc>: Adjust comment.
807 <stopped_by_watchpoint>: Delete field.
808 <stop_reason>: New field.
809 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
810 * mem-break.c (software_breakpoint_inserted_here)
811 (hardware_breakpoint_inserted_here): New function.
812 * mem-break.h (software_breakpoint_inserted_here)
813 (hardware_breakpoint_inserted_here): Declare.
814 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
815 (cancel_breakpoints): Delete.
816 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
817 (upload_fast_traceframes): Remove references to
818 cancel_breakpoints.
819
a33e3959
PA
8202015-01-09 Pedro Alves <palves@redhat.com>
821
822 * thread-db.c (find_new_threads_callback): Ignore thread if the
823 kernel thread ID is -1.
824
8784d563
PA
8252015-01-09 Pedro Alves <palves@redhat.com>
826
827 * linux-low.c (linux_attach_fail_reason_string): Move to
828 nat/linux-ptrace.c, and rename.
829 (linux_attach_lwp): Update comment.
830 (attach_proc_task_lwp_callback): New function.
831 (linux_attach): Adjust to rename and use
832 linux_proc_attach_tgid_threads.
833 (linux_attach_fail_reason_string): Delete declaration.
834
76f2b779
JB
8352015-01-01 Joel Brobecker <brobecker@adacore.com>
836
837 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
838 * server.c (gdbserver_version): Likewise.
839
fafcc06a
SDJ
8402014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
841
842 * remote-utils.c: Include ctype.h.
843 (input_interrupt): Explicitly handle the case when the char
844 received is the NUL byte. Improve the printing of non-ASCII
845 characters.
846
beed38b8
JB
8472014-12-16 Joel Brobecker <brobecker@adacore.com>
848
849 * linux-low.c (linux_low_filter_event): Update call to
850 linux_enable_event_reporting following the addition of
851 a new parameter to that function.
852
bf330350
CU
8532014-12-16 Catalin Udma <catalin.udma@freescale.com>
854
855 PR server/17457
856 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
857 (AARCH64_FPCR_REGNO): Likewise.
858 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
859 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
860 (aarch64_store_fpregset): Likewise.
861
5227d625
JB
8622014-12-15 Joel Brobecker <brobecker@adacore.com>
863
864 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
865 Remove FIXME comment about assumption about N.
866
f93b65a0
JB
8672014-12-13 Joel Brobecker <brobecker@adacore.com>
868
869 * configure.ac: If large-file support is disabled in GDBserver,
870 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
871 * configure: Regenerate.
872
e5a9158d
AA
8732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
874
875 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
876 warning upon ENODATA from ptrace.
877 * linux-s390-low.c (s390_store_tdb): New.
878 (s390_regsets): Add regset for NT_S390_TDB.
879
feea5f36
AA
8802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
881
882 * linux-low.c (regsets_store_inferior_registers): Skip regsets
883 without a fill_function.
884 * linux-s390-low.c (s390_fill_last_break): Remove.
885 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
886 (s390_arch_setup): Use regset's size instead of fill_function for
887 loop end condition.
888
098dbe61
AA
8892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
890
891 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
892 the regset's store function when ptrace returned an error.
893 * regcache.c (get_thread_regcache): Invalidate register cache
894 before fetching inferior's registers.
895
28eef672
AA
8962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
897
898 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
899 while-loop as for-loop.
900 (regsets_store_inferior_registers): Likewise.
901
bdca27a2
YQ
9022014-11-28 Yao Qi <yao@codesourcery.com>
903
904 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
905 * config.in, configure: Re-generate.
906 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
907 is defined.
908
9c232dda
YQ
9092014-11-21 Yao Qi <yao@codesourcery.com>
910
911 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
912 (AC_CHECK_HEADERS): Remove malloc.h.
913 * configure: Re-generated.
914 * config.in: Re-generated.
915 * server.h: Don't include alloca.h and malloc.h.
916 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
917 Don't include malloc.h.
918
43968415
JB
9192014-11-17 Joel Brobecker <brobecker@adacore.com>
920
921 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
922 corresponding ERRNO check in same block.
923
40e91bc7
PA
9242014-11-12 Pedro Alves <palves@redhat.com>
925
926 * server.c (cont_thread): Update comment.
927 (start_inferior, attach_inferior): No longer clear cont_thread.
928 (handle_v_cont): No longer set cont_thread.
929 (captured_main): Clear cont_thread each time a GDB connects.
930
c2c118cf
PA
9312014-11-12 Pedro Alves <palves@redhat.com>
932
933 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
934 thread, and don't resume all threads if the Hc thread has exited.
935
78708b7c
PA
9362014-11-12 Pedro Alves <palves@redhat.com>
937
938 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
939 the process group instead of to a specific LWP.
940
a2abc7de
PA
9412014-10-15 Pedro Alves <palves@redhat.com>
942
943 PR server/17487
944 * win32-arm-low.c (arm_set_thread_context): Remove current_event
945 parameter.
946 (arm_set_thread_context): Delete.
947 (the_low_target): Adjust.
948 * win32-i386-low.c (debug_registers_changed)
949 (debug_registers_used): Delete.
950 (update_debug_registers_callback): New function.
951 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
952 needing to update their debug registers.
953 (win32_get_current_dr): New function.
954 (x86_dr_low_get_addr, x86_dr_low_get_control)
955 (x86_dr_low_get_status): Fetch the debug register from the thread
956 record's context.
957 (i386_initial_stuff): Adjust.
958 (i386_get_thread_context): Remove current_event parameter. Don't
959 clear debug_registers_changed nor copy DR values to
960 debug_reg_state.
961 (i386_set_thread_context): Delete.
962 (i386_prepare_to_resume): New function.
963 (i386_thread_added): Mark the thread as needing to update irs
964 debug registers.
965 (the_low_target): Remove i386_set_thread_context and install
966 i386_prepare_to_resume.
967 * win32-low.c (win32_get_thread_context): Adjust.
968 (win32_set_thread_context): Use SetThreadContext
969 directly.
970 (win32_prepare_to_resume): New function.
971 (win32_require_context): New function, factored out from ...
972 (thread_rec): ... this.
973 (continue_one_thread): Call win32_prepare_to_resume on each thread
974 we're about to continue.
975 (win32_resume): Call win32_prepare_to_resume on the event thread.
976 * win32-low.h (struct win32_thread_info)
977 <debug_registers_changed>: New field.
978 (struct win32_target_ops): Change prototype of set_thread_context,
979 delete set_thread_context and add prepare_to_resume.
980 (win32_require_context): New declaration.
981
a442d071
GB
9822014-10-08 Gary Benson <gbenson@redhat.com>
983
984 * server.h: Do not include common-exceptions.h.
985
6f1947e8
GB
9862014-10-08 Gary Benson <gbenson@redhat.com>
987
988 * server.h: Do not include cleanups.h.
989
63b434a4
JH
9902014-09-30 James Hogan <james.hogan@imgtec.com>
991
992 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
993 mips64-dsp-linux.c.
994
c4d9ceb6
YQ
9952014-09-23 Yao Qi <yao@codesourcery.com>
996
997 * linux-low.c (lp_status_maybe_breakpoint): New function.
998 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
999 (count_events_callback): Likewise.
1000 (select_event_lwp_callback): Likewise.
1001 (cancel_breakpoints_callback): Likewise.
1002
89a5711c
DB
10032014-09-19 Don Breazeal <donb@codesourcery.com>
1004
1005 * linux-low.c (handle_extended_wait): Call
1006 linux_ptrace_get_extended_event.
1007 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1008 linux_is_extended_waitstatus.
1009
bffc0964
JB
10102014-09-16 Joel Brobecker <brobecker@adacore.com>
1011
1012 * Makefile.in (CPPFLAGS): Define.
1013 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1014 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1015
0bfdf32f
GB
10162014-09-16 Gary Benson <gbenson@redhat.com>
1017
1018 * inferiors.h (current_inferior): Renamed as...
1019 (current_thread): New variable. All uses updated.
1020 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1021 (maybe_move_out_of_jump_pad): Likewise.
1022 (cancel_breakpoint): Likewise.
1023 (linux_low_filter_event): Likewise.
1024 (wait_for_sigstop): Likewise.
1025 (linux_resume_one_lwp): Likewise.
1026 (need_step_over_p): Likewise.
1027 (start_step_over): Likewise.
1028 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1029 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1030 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1031 and save_inferior as saved_thread.
1032 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1033 saved_thread.
1034 (regcache_invalidate_thread): Likewise.
1035 * remote-utils.c (prepare_resume_reply): Likewise.
1036 * thread-db.c (thread_db_get_tls_address): Likewise.
1037 (disable_thread_event_reporting): Likewise.
1038 (remove_thread_event_breakpoints): Likewise.
1039 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1040 as saved_thread.
1041 * target.h (set_desired_inferior): Renamed as...
1042 (set_desired_thread): New declaration. All uses updated.
1043 * server.c (myresume): Updated comment to reference thread instead
1044 of inferior.
1045 (handle_serial_event): Likewise.
1046 (handle_target_event): Likewise.
1047
361c8ade
GB
10482014-09-12 Tom Tromey <tromey@redhat.com>
1049 Gary Benson <gbenson@redhat.com>
1050
1051 * regcache.h: Include common-regcache.h.
1052 (regcache_read_pc): Don't declare.
1053 * regcache.c (get_thread_regcache_for_ptid): New function.
1054
bd9269f7
GB
10552014-09-11 Tom Tromey <tromey@redhat.com>
1056 Gary Benson <gbenson@redhat.com>
1057
1058 * symbol.c: New file.
1059 * Makefile.in (SFILES): Add symbol.c.
1060 (OBS): Add symbol.o.
1061
f8c1d06b
GB
10622014-09-11 Gary Benson <gbenson@redhat.com>
1063
1064 * target.c (target_stop_ptid, target_continue_ptid): New
1065 functions.
1066
721ec300
GB
10672014-09-11 Tom Tromey <tromey@redhat.com>
1068 Gary Benson <gbenson@redhat.com>
1069
1070 * target.h: Include target/target.h.
1071 * target.c (target_read_memory, target_read_uint32)
1072 (target_write_memory): New functions.
1073
c5e92cca
GB
10742014-09-11 Gary Benson <gbenson@redhat.com>
1075
1076 * server.h (debug_hw_points): Don't declare.
1077 * server.c (debug_hw_points): Don't define. Replace all uses
1078 with show_debug_regs.
1079 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1080 all uses with show_debug_regs.
1081
2e4bb98a
EBM
10822014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1083
1084 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1085 endianness into account.
1086 (ppc_supply_ptrace_register): Likewise.
1087
ac740bc7
JH
10882014-09-03 James Hogan <james.hogan@imgtec.com>
1089
1090 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1091 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1092
97ea6506
GB
10932014-09-03 Gary Benson <gbenson@redhat.com>
1094
1095 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1096 ALL_DEBUG_ADDRESS_REGISTERS.
1097
df7e5265
GB
10982014-09-02 Gary Benson <gbenson@redhat.com>
1099
1100 * i386-low.h: Renamed as...
1101 * x86-low.h: New file. All type, function and variable name
1102 prefixes changed from "i386_" to "x86_". All references updated.
1103 * i386-low.c: Renamed as...
1104 * x86-low.c: New file. All type, function and variable name
1105 prefixes changed from "i386_" to "x86_". All references updated.
1106
ed859da7
GB
11072014-09-02 Gary Benson <gbenson@redhat.com>
1108
1109 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1110 (x86_linux_new_thread): Likewise.
1111
860789c7
GB
11122014-08-29 Gary Benson <gbenson@redhat.com>
1113
1114 * server.h (setjmp.h): Do not include.
1115 (toplevel): Do not declare.
1116 (common-exceptions.h): Include.
1117 (cleanups.h): Likewise.
1118 * server.c (toplevel): Do not define.
1119 (exit_code): New static global.
1120 (detach_or_kill_for_exit_cleanup): New function.
1121 (main): New function. Original main renamed to...
1122 (captured_main): New function.
1123 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1124
ff55e1b5
GB
11252014-08-29 Gary Benson <gbenson@redhat.com>
1126
1127 * Makefile.in (SFILES): Add common/common-exceptions.c.
1128 (OBS): Add common-exceptions.o.
1129 (common-exceptions.o): New rule.
1130 * utils.c (prepare_to_throw_exception): New function.
1131
e9bcb658
GB
11322014-08-29 Gary Benson <gbenson@redhat.com>
1133
1134 * config.in: Regenerate.
1135 * configure: Likewise.
1136
e3180625
GB
11372014-08-29 Gary Benson <gbenson@redhat.com>
1138
1139 * Makefile.in (SFILES): Add common/cleanups.c.
1140 (OBS): cleanups.o.
1141 (cleanups.o): New rule.
1142
e3d6ba5d
GB
11432014-08-29 Gary Benson <gbenson@redhat.com>
1144
1145 * utils.c (internal_vwarning): New function.
1146
7096e886
GB
11472014-08-28 Gary Benson <gbenson@redhat.com>
1148
1149 * utils.h (fatal): Remove declaration.
1150 * utils.c (fatal): Remove function.
1151
14ce3192
GB
11522014-08-28 Gary Benson <gbenson@redhat.com>
1153
1154 * tracepoint.c (gdb_agent_init): Replace fatal with
1155 perror_with_name.
1156 (initialize_tracepoint): Likewise.
1157
50278d59
GB
11582014-08-28 Gary Benson <gbenson@redhat.com>
1159
1160 * remote-utils.c (remote_prepare): Replace fatal with error.
1161
aa96c426
GB
11622014-08-28 Gary Benson <gbenson@redhat.com>
1163
1164 * linux-low.c (linux_async): Replace fatal with warning.
1165 Tidy up and return.
1166 (linux_start_non_stop): Return -1 if linux_async failed.
1167
f7160e97
GB
11682014-08-28 Gary Benson <gbenson@redhat.com>
1169
1170 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1171 gdb_assert.
1172 (i386_dr_low_get_addr): Remove vague comment.
1173 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1174 gdb_assert.
1175
38e08fca
GB
11762014-08-28 Gary Benson <gbenson@redhat.com>
1177
1178 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1179 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1180 internal_error.
1181 (linux_resume_one_lwp): Likewise.
1182 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1183 gdb_assert.
1184 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1185 with internal_error.
1186 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1187 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1188 (find_register_by_name): Replace fatal with internal_error.
1189 (find_regno): Likewise.
1190 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1191 * thread-db.c (thread_db_create_event): Likewise.
1192 (thread_db_load_search): Likewise.
1193 (try_thread_db_load_1): Likewise.
1194 * tracepoint.c (get_jump_space_head): Replace fatal with
1195 internal_error.
1196 (claim_trampoline_space): Likewise.
1197 (have_fast_tracepoint_trampoline_buffer): Likewise.
1198 (cmd_qtstart): Likewise.
1199 (stop_tracing): Likewise.
1200 (fast_tracepoint_collecting): Likewise.
1201 (target_malloc): Likewise.
1202 (download_tracepoint): Likewise.
1203 (download_trace_state_variables): Replace check with gdb_assert.
1204 (upload_fast_traceframes): Replace fatal with internal_error.
1205
34abf635
GB
12062014-08-19 Tom Tromey <tromey@redhat.com>
1207 Gary Benson <gbenson@redhat.com>
1208
1209 * Makefile.in (SFILES): Add common/common-debug.c.
1210 (OBS): Add common-debug.o.
1211 (common-debug.o): New rule.
1212 * debug.h (debug_printf): Don't declare.
1213 * debug.c (debug_printf): Renamed and rewritten as...
1214 (debug_vprintf): New function.
1215
f6e94d78
GB
12162014-08-19 Gary Benson <gbenson@redhat.com>
1217
1218 * utils.h: Do not include print-utils.h.
1219
9239eeab
GB
12202014-08-19 Tom Tromey <tromey@redhat.com>
1221 Gary Benson <gbenson@redhat.com>
1222
1223 * server.h: Add static assertion.
1224 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1225
ef87c8bb
GB
12262014-08-19 Tom Tromey <tromey@redhat.com>
1227 Gary Benson <gbenson@redhat.com>
1228
1229 * Makefile.in (SFILES): Add common/errors.c.
1230 (OBS): Add errors.o.
1231 (IPA_OBS): Add errors-ipa.o.
1232 (errors.o): New rule.
1233 (errors-ipa.o): Likewise.
1234 * utils.h (perror_with_name, error, warning): Don't declare.
1235 * utils.c (warning): Renamed and rewritten as...
1236 (vwarning): New function.
1237 (error): Renamed and rewritten as...
1238 (verror): New function.
1239 (internal_error): Renamed and rewritten as...
1240 (internal_verror): New function.
1241
bb974a24
GB
12422014-08-07 Gary Benson <gbenson@redhat.com>
1243
1244 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1245 * configure: Regenerate.
1246 * config.in: Likewise.
1247 * server.h: Do not include errno.h.
1248 * event-loop.c: Likewise.
1249 * hostio-errno.c: Likewise.
1250 * linux-low.c: Likewise.
1251 * remote-utils.c: Likewise.
1252 * spu-low.c: Likewise.
1253 * utils.c: Likewise.
1254 * gdbreplay.c: Unconditionally include errno.h.
1255
6d3d12eb
GB
12562014-08-07 Gary Benson <gbenson@redhat.com>
1257
1258 * server.h: Do not include string.h.
1259 * event-loop.c: Likewise.
1260 * linux-low.c: Likewise.
1261 * regcache.c: Likewise.
1262 * remote-utils.c: Likewise.
1263 * spu-low.c: Likewise.
1264 * utils.c: Likewise.
1265
dccbb609
GB
12662014-08-07 Gary Benson <gbenson@redhat.com>
1267
1268 * server.h: Do not include gdb_assert.h.
1269
e76df0d0
GB
12702014-08-07 Gary Benson <gbenson@redhat.com>
1271
1272 * server.h: Do not include common-utils.h.
1273
4cb9c816
GB
12742014-08-07 Gary Benson <gbenson@redhat.com>
1275
1276 * server.h: Do not include ptid.h.
1277 * notif.h: Likewise.
1278
3995eeee
GB
12792014-08-07 Gary Benson <gbenson@redhat.com>
1280
1281 * server.h: Do not include gdb_locale.h.
1282
cb9f1a9b
GB
12832014-08-07 Gary Benson <gbenson@redhat.com>
1284
1285 * server.h: Do not include gdb/signals.h.
1286 * win32-low.c: Likewise.
1287
a5fceff8
GB
12882014-08-07 Gary Benson <gbenson@redhat.com>
1289
1290 * server.h: Do not include pathmax.h.
1291
b9391142
GB
12922014-08-07 Gary Benson <gbenson@redhat.com>
1293
1294 * server.h: Do not include libiberty.h.
1295 * linux-bfin-low.c: Likewise.
1296
0e443c87
GB
12972014-08-07 Gary Benson <gbenson@redhat.com>
1298
1299 * server.h: Do not include ansidecl.h.
1300
8ebb3f56
GB
13012014-08-07 Gary Benson <gbenson@redhat.com>
1302
1303 * linux-x86-low.c: Do not include stddef.h.
1304 * lynx-ppc-low.c: Likewise.
1305 * tracepoint.c: Likewise.
1306
8980bdf6
GB
13072014-08-07 Gary Benson <gbenson@redhat.com>
1308
1309 * server.h: Do not include stdarg.h.
1310 * nto-low.c: Likewise.
1311
d7096f71
GB
13122014-08-07 Gary Benson <gbenson@redhat.com>
1313
1314 * server.h: Do not include stdlib.h.
1315 * inferiors.c: Likewise.
1316 * linux-low.c: Likewise.
1317 * regcache.c: Likewise.
1318 * spu-low.c: Likewise.
1319 * tracepoint.c: Likewise.
1320 * utils.c: Likewise.
1321
d02f550d
GB
13222014-08-07 Gary Benson <gbenson@redhat.com>
1323
1324 * server.h: Do not include stdio.h.
1325 * linux-low.c: Likewise.
1326 * remote-utils.c: Likewise.
1327 * spu-low.c: Likewise.
1328 * utils.c: Likewise.
1329 * wincecompat.c: Likewise.
1330
87f6c4e3
GB
13312014-08-06 Gary Benson <gbenson@redhat.com>
1332
1333 * regcache.c (init_register_cache): Move conditionals inside if.
1334
7089dca4
GB
13352014-08-06 Gary Benson <gbenson@redhat.com>
1336
1337 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1338
462f517e
GB
13392014-07-31 Gary Benson <gbenson@redhat.com>
1340
1341 * ax.h: Do not include server.h.
1342 * gdbthread.h: Likewise.
1343 * lynx-low.h: Likewise.
1344 * notif.h: Likewise.
1345
976411d6
GB
13462014-07-30 Gary Benson <gbenson@redhat.com>
1347
1348 * server.h: Include common-defs.h.
1349 Do not include config.h or build-gnulib-gdbserver/config.h.
1350
d41f6d8e
GB
13512014-07-30 Gary Benson <gbenson@redhat.com>
1352
1353 * hostio-errno.c: Move server.h to top of includes list.
1354 * inferiors.c: Likewise.
1355 * linux-x86-low.c: Likewise.
1356 * notif.c: Include server.h.
1357
314c6a35
TT
13582014-07-24 Tom Tromey <tromey@redhat.com>
1359 Gary Benson <gbenson@redhat.com>
1360
1361 * server.h (CORE_ADDR): Now unsigned.
1362
69ff6be5
PA
13632014-07-16 Pedro Alves <palves@redhat.com>
1364
1365 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1366
ce9e3fe7
PA
13672014-07-15 Pedro Alves <palves@redhat.com>
1368
1369 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1370 copy.
1371
e76126e8
PA
13722014-07-11 Pedro Alves <palves@redhat.com>
1373
1374 * linux-low.c (kill_wait_lwp): New function, based on
1375 kill_one_lwp_callback, but use my_waitpid directly.
1376 (kill_one_lwp_callback, linux_kill): Use it.
1377
8e9db26e
PA
13782014-06-23 Pedro Alves <palves@redhat.com>
1379
1380 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1381 before setting DR0..DR3.
1382
698b3e08
GB
13832014-06-20 Gary Benson <gbenson@redhat.com>
1384
1385 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1386 * configure: Regenerated.
1387 * config.in: Likewise.
1388
125f8a3d
GB
13892014-06-20 Gary Benson <gbenson@redhat.com>
1390
1391 * Makefile.in (SFILES): Update locations for files moved
1392 from common to nat.
1393 (object file files): Reordered.
1394
42995dbd
GB
13952014-06-20 Gary Benson <gbenson@redhat.com>
1396
1397 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1398 (i386_dr_low_set_addr): Likewise.
1399 (i386_dr_low_get_addr): Likewise.
1400 (i386_dr_low_can_set_control): Likewise.
1401 (i386_dr_low_set_control): Likewise.
1402 (i386_dr_low_get_control): Likewise.
1403 (i386_dr_low_get_status): Likewise.
1404 (i386_get_debug_register_length): Likewise.
1405 * linux-x86-low.c (i386_dr_low_set_addr):
1406 Changed signature. Made static.
1407 (i386_dr_low_get_addr): Likewise.
1408 (i386_dr_low_set_control): Likewise.
1409 (i386_dr_low_get_control): Likewise.
1410 (i386_dr_low_get_status): Likewise.
1411 (i386_dr_low): New global variable.
1412 * win32-i386-low.c (i386_dr_low_set_addr):
1413 Changed signature. Made static.
1414 (i386_dr_low_get_addr): Likewise.
1415 (i386_dr_low_set_control): Likewise.
1416 (i386_dr_low_get_control): Likewise.
1417 (i386_dr_low_get_status): Likewise.
1418 (i386_dr_low): New global variable.
1419
e1d2394b
MS
14202014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1421
1422 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1423 * Makefile.in (AR, AR_FLAGS): Define.
1424 * configure: Regenerate.
1425
3a8ee006
GB
14262014-06-19 Gary Benson <gbenson@redhat.com>
1427
1428 * Makefile.in (i386-dregs.o): New rule.
1429 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1430 * i386-low.c (target.h): Remove include.
1431 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1432 (DR_CONTROL_SHIFT): Likewise.
1433 (DR_CONTROL_SIZE): Likewise.
1434 (DR_RW_EXECUTE): Likewise.
1435 (DR_RW_WRITE): Likewise.
1436 (DR_RW_READ): Likewise.
1437 (DR_RW_IORW): Likewise.
1438 (DR_LEN_1): Likewise.
1439 (DR_LEN_2): Likewise.
1440 (DR_LEN_4): Likewise.
1441 (DR_LEN_8): Likewise.
1442 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1443 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1444 (DR_ENABLE_SIZE): Likewise.
1445 (DR_LOCAL_SLOWDOWN): Likewise.
1446 (DR_GLOBAL_SLOWDOWN): Likewise.
1447 (DR_CONTROL_RESERVED): Likewise.
1448 (I386_DR_CONTROL_MASK): Likewise.
1449 (I386_DR_VACANT): Likewise.
1450 (I386_DR_LOCAL_ENABLE): Likewise.
1451 (I386_DR_GLOBAL_ENABLE): Likewise.
1452 (I386_DR_DISABLE): Likewise.
1453 (I386_DR_SET_RW_LEN): Likewise.
1454 (I386_DR_GET_RW_LEN): Likewise.
1455 (I386_DR_WATCH_HIT): Likewise.
1456 (i386_wp_op_t): Likewise.
1457 (i386_show_dr): Likewise.
1458 (i386_length_and_rw_bits): Likewise.
1459 (i386_insert_aligned_watchpoint): Likewise.
1460 (i386_remove_aligned_watchpoint): Likewise.
1461 (i386_handle_nonaligned_watchpoint): Likewise.
1462 i386_update_inferior_debug_regs(): Likewise.
1463 (i386_dr_insert_watchpoint): Likewise.
1464 (i386_dr_remove_watchpoint): Likewise.
1465 (i386_dr_region_ok_for_watchpoint): Likewise.
1466 (i386_dr_stopped_data_address): Likewise.
1467 (i386_dr_stopped_by_watchpoint): Likewise.
1468
8f26655c
GB
14692014-06-19 Gary Benson <gbenson@redhat.com>
1470
1471 * i386-low.c (i386_dr_show): Renamed to
1472 i386_show_dr and made static. All uses updated.
1473 (i386_dr_length_and_rw_bits): Renamed to
1474 i386_length_and_rw_bits and made static.
1475 All uses updated.
1476 (i386_dr_insert_aligned_watchpoint): Renamed to
1477 i386_insert_aligned_watchpoint and made static.
1478 All uses updated.
1479 (i386_dr_remove_aligned_watchpoint): Renamed to
1480 i386_remove_aligned_watchpoint and made static.
1481 All uses updated.
1482 (i386_dr_update_inferior_debug_regs): Renamed to
1483 i386_update_inferior_debug_regs and made static.
1484 All uses updated.
1485
b9228891
GB
14862014-06-18 Gary Benson <gbenson@redhat.com>
1487
5171def3
GB
1488 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1489 (i386_dr_low_can_set_control): Likewise.
1490 (i386_get_debug_register_length): Likewise.
1491 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1492 (i386_dr_low_can_set_control): Likewise.
1493 (i386_get_debug_register_length): Likewise.
1494
14952014-06-17 Gary Benson <gbenson@redhat.com>
1496
b9228891
GB
1497 * i386-low.h (i386-dregs.h): New include.
1498 (DR_FIRSTADDR): Now in i386-dregs.h.
1499 (DR_LASTADDR): Likewise.
1500 (DR_NADDR): Likewise.
1501 (DR_STATUS): Likewise.
1502 (DR_CONTROL): Likewise.
1503 (i386_debug_reg_state): Likewise.
1504 (i386_dr_insert_watchpoint): Likewise.
1505 (i386_dr_remove_watchpoint): Likewise.
1506 (i386_dr_region_ok_for_watchpoint): Likewise.
1507 (i386_dr_stopped_data_address): Likewise.
1508 (i386_dr_stopped_by_watchpoint): Likewise.
1509 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1510
4be83cc2
GB
15112014-06-18 Gary Benson <gbenson@redhat.com>
1512
1513 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1514 i386_dr_insert_watchpoint.
1515 (i386_low_remove_watchpoint): Renamed to
1516 i386_dr_remove_watchpoint.
1517 (i386_low_region_ok_for_watchpoint): Renamed to
1518 i386_dr_region_ok_for_watchpoint.
1519 (i386_low_stopped_data_address): Renamed to
1520 i386_dr_stopped_data_address.
1521 (i386_low_stopped_by_watchpoint): Renamed to
1522 i386_dr_stopped_by_watchpoint.
1523 * i386-low.c (i386_show_dr): Renamed to
1524 i386_dr_show and made nonstatic. All uses updated.
1525 (i386_length_and_rw_bits): Renamed to
1526 i386_dr_length_and_rw_bits and made nonstatic.
1527 All uses updated.
1528 (i386_insert_aligned_watchpoint): Renamed to
1529 i386_dr_insert_aligned_watchpoint and made nonstatic.
1530 All uses updated.
1531 (i386_remove_aligned_watchpoint): Renamed to
1532 i386_dr_remove_aligned_watchpoint and made nonstatic.
1533 All uses updated.
1534 (i386_update_inferior_debug_regs): Renamed to
1535 i386_dr_update_inferior_debug_regs and made nonstatic.
1536 All uses updated.
1537 (i386_low_insert_watchpoint): Renamed to
1538 i386_dr_insert_watchpoint. All uses updated.
1539 (i386_low_remove_watchpoint): Renamed to
1540 i386_dr_remove_watchpoint. All uses updated.
1541 (i386_low_region_ok_for_watchpoint): Renamed to
1542 i386_dr_region_ok_for_watchpoint. All uses updated.
1543 (i386_low_stopped_data_address): Renamed to
1544 i386_dr_stopped_data_address. All uses updated.
1545 (i386_low_stopped_by_watchpoint): Renamed to
1546 i386_dr_stopped_by_watchpoint. All uses updated.
1547
131aa0d4
GB
15482014-06-18 Gary Benson <gbenson@redhat.com>
1549
1550 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1551 (i386_dr_low_can_set_control): Likewise.
1552 (i386_insert_aligned_watchpoint): New check.
1553
d9305f7f
GB
15542014-06-18 Gary Benson <gbenson@redhat.com>
1555
1556 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1557 Renamed to state.
1558
e927c9fc
GB
15592014-06-18 Gary Benson <gbenson@redhat.com>
1560
1561 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1562 instead of fatal and error.
1563 (i386_handle_nonaligned_watchpoint): Likewise.
1564
1b6d4134
GB
15652014-06-18 Gary Benson <gbenson@redhat.com>
1566
1567 * i386-low.c (i386_get_debug_register_length): New macro.
1568 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1569 (i386_show_dr): Use debug_printf instead of fprintf. Use
1570 phex to format values.
1571
6e62758f
GB
15722014-06-18 Gary Benson <gbenson@redhat.com>
1573
1574 * i386-low.h: Comment changes.
1575 * i386-low.c: Likewise.
1576
fc6e2f03
GB
15772014-06-18 Gary Benson <gbenson@redhat.com>
1578
1579 * i386-low.c: Whitespace changes.
1580
f9d1eeed
TT
15812014-06-12 Tom Tromey <tromey@redhat.com>
1582
1583 * utils.c (freeargv): Remove.
1584
0b04e523
TT
15852014-06-12 Tom Tromey <tromey@redhat.com>
1586
1587 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1588 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1589 (parse_debug_format_options): Likewise.
1590 (gdbserver_usage): Likewise.
1591 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1592 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1593 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1594 against libiberty.
1595 ($(LIBGNU)): Depend on libiberty.
1596 (all-lib): Recurse into all subdirs.
1597 (install-only): Invoke "install" target in subdirs.
1598 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1599 targets.
1600 * configure: Rebuild.
1601 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1602 for vasprintf, vsnprintf, or gettimeofday.
1603 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1604 srv_tgtobj.
1605
270c9937
JB
16062014-06-05 Joel Brobecker <brobecker@adacore.com>
1607
1608 * development.sh: Delete.
1609 * Makefile.in (config.status): Adjust dependency on development.sh.
1610 * configure.ac: Adjust development.sh source call.
1611 * configure: Regenerate.
1612
0a261ed8
PA
16132014-06-02 Pedro Alves <palves@redhat.com>
1614
1615 * ax.c (gdb_free_agent_expr): New function.
1616 * ax.h (gdb_free_agent_expr): New declaration.
1617 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1618 list.
1619 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1620 static.
1621 (clear_breakpoint_conditions_and_commands): New function.
1622 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1623 (clear_breakpoint_conditions_and_commands): New declaration.
1624
e9dae05e
RR
16252014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1626
1627 * linux-aarch64-low.c (asm/ptrace.h): Include.
1628
5876f503
JK
16292014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1630
1631 Fix TLS access for -static -pthread.
1632 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1633 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1634 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1635
802e8e6d
PA
16362014-05-20 Pedro Alves <palves@redhat.com>
1637
1638 * linux-aarch64-low.c (aarch64_insert_point)
1639 (aarch64_remove_point): No longer check whether the type is
1640 supported here. Adjust to new interface.
1641 (the_low_target): Install aarch64_supports_z_point_type as
1642 supports_z_point_type method.
1643 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1644 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1645 instead of a Z packet char. Adjust.
1646 (arm_supports_z_point_type): New function.
1647 (arm_insert_point, arm_remove_point): Adjust to new interface.
1648 (the_low_target): Install arm_supports_z_point_type.
1649 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1650 (cris_insert_point, cris_remove_point): Adjust to new interface.
1651 Don't check whether the type is supported here.
1652 (the_low_target): Install cris_supports_z_point_type.
1653 * linux-low.c (linux_supports_z_point_type): New function.
1654 (linux_insert_point, linux_remove_point): Adjust to new interface.
1655 * linux-low.h (struct linux_target_ops) <insert_point,
1656 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1657 raw_breakpoint pointer parameter.
1658 <supports_z_point_type>: New method.
1659 * linux-mips-low.c (mips_supports_z_point_type): New function.
1660 (mips_insert_point, mips_remove_point): Adjust to new interface.
1661 Use mips_supports_z_point_type.
1662 (the_low_target): Install mips_supports_z_point_type.
1663 * linux-ppc-low.c (the_low_target): Install NULL as
1664 supports_z_point_type method.
1665 * linux-s390-low.c (the_low_target): Install NULL as
1666 supports_z_point_type method.
1667 * linux-sparc-low.c (the_low_target): Install NULL as
1668 supports_z_point_type method.
1669 * linux-x86-low.c (x86_supports_z_point_type): New function.
1670 (x86_insert_point): Adjust to new insert_point interface. Use
1671 insert_memory_breakpoint. Adjust to new
1672 i386_low_insert_watchpoint interface.
1673 (x86_remove_point): Adjust to remove_point interface. Use
1674 remove_memory_breakpoint. Adjust to new
1675 i386_low_remove_watchpoint interface.
1676 (the_low_target): Install x86_supports_z_point_type.
1677 * lynx-low.c (lynx_target_ops): Install NULL as
1678 supports_z_point_type callback.
1679 * nto-low.c (nto_supports_z_point_type): New.
1680 (nto_insert_point, nto_remove_point): Adjust to new interface.
1681 (nto_target_ops): Install nto_supports_z_point_type.
1682 * mem-break.c: Adjust intro comment.
1683 (struct raw_breakpoint) <raw_type, size>: New fields.
1684 <inserted>: Update comment.
1685 <shlib_disabled>: Delete field.
1686 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1687 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1688 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1689 (raw_bkpt_type_to_target_hw_bp_type): New function.
1690 (find_enabled_raw_code_breakpoint_at): New function.
1691 (find_raw_breakpoint_at): New type and size parameters. Use them.
1692 (insert_memory_breakpoint): New function, based off
1693 set_raw_breakpoint_at.
1694 (remove_memory_breakpoint): New function.
1695 (set_raw_breakpoint_at): Reimplement.
1696 (set_breakpoint): New, based on set_breakpoint_at.
1697 (set_breakpoint_at): Reimplement.
1698 (delete_raw_breakpoint): Go through the_target->remove_point
1699 instead of assuming memory breakpoints.
1700 (find_gdb_breakpoint_at): Delete.
1701 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1702 (find_gdb_breakpoint): New function.
1703 (set_gdb_breakpoint_at): Delete.
1704 (z_type_supported): New function.
1705 (set_gdb_breakpoint_1): New function, loosely based off
1706 set_gdb_breakpoint_at.
1707 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1708 (delete_gdb_breakpoint_at): Delete.
1709 (delete_gdb_breakpoint_1): New function, loosely based off
1710 delete_gdb_breakpoint_at.
1711 (delete_gdb_breakpoint): New function.
1712 (clear_gdb_breakpoint_conditions): Rename to ...
1713 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1714 breakpoint.
1715 (add_condition_to_breakpoint): Make static.
1716 (add_breakpoint_condition): Take a struct breakpoint pointer
1717 instead of an address. Adjust.
1718 (gdb_condition_true_at_breakpoint): Rename to ...
1719 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1720 z_type parameter.
1721 (gdb_condition_true_at_breakpoint): Reimplement.
1722 (add_breakpoint_commands): Take a struct breakpoint pointer
1723 instead of an address. Adjust.
1724 (gdb_no_commands_at_breakpoint): Rename to ...
1725 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1726 parameter. Return true if no breakpoint was found. Change debug
1727 output.
1728 (gdb_no_commands_at_breakpoint): Reimplement.
1729 (run_breakpoint_commands): Rename to ...
1730 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1731 and change return type to boolean.
1732 (run_breakpoint_commands): New function.
1733 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1734 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1735 breakpoint. Go through the_target->remove_point instead of
1736 assuming memory breakpoint.
1737 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1738 software and hardware breakpoints.
1739 (reinsert_raw_breakpoint): Go through the_target->insert_point
1740 instead of assuming memory breakpoint.
1741 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1742 software and hardware breakpoints.
1743 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1744 Check both software and hardware breakpoints.
1745 (validate_inserted_breakpoint): Assert the breakpoint is a
1746 software breakpoint. Set the inserted flag to -1 instead of
1747 setting shlib_disabled.
1748 (delete_disabled_breakpoints): Adjust.
1749 (validate_breakpoints): Only validate software breakpoints.
1750 Adjust to inserted flag change.
1751 (check_mem_read, check_mem_write): Skip breakpoint types other
1752 than software breakpoints. Adjust to inserted flag change.
1753 * mem-break.h (enum raw_bkpt_type): New enum.
1754 (raw_breakpoint, struct process_info): Forward declare.
1755 (Z_packet_to_target_hw_bp_type): Delete declaration.
1756 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1757 (set_gdb_breakpoint, delete_gdb_breakpoint)
1758 (clear_breakpoint_conditions): New declarations.
1759 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1760 (breakpoint_inserted_here): Update comment.
1761 (add_breakpoint_condition, add_breakpoint_commands): Replace
1762 address parameter with a breakpoint pointer parameter.
1763 (gdb_breakpoint_here): Update comment.
1764 (delete_gdb_breakpoint_at): Delete.
1765 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1766 * server.c (process_point_options): Take a struct breakpoint
1767 pointer instead of an address. Adjust.
1768 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1769 delete_gdb_breakpoint.
1770 * spu-low.c (spu_target_ops): Install NULL as
1771 supports_z_point_type method.
1772 * target.h: Include mem-break.h.
1773 (struct target_ops) <prepare_to_access_memory>: Update comment.
1774 <supports_z_point_type>: New field.
1775 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1776 instead of a char. Also take a raw breakpoint pointer.
1777 * win32-arm-low.c (the_low_target): Install NULL as
1778 supports_z_point_type.
1779 * win32-i386-low.c (i386_supports_z_point_type): New function.
1780 (i386_insert_point, i386_remove_point): Adjust to new interface.
1781 (the_low_target): Install i386_supports_z_point_type.
1782 * win32-low.c (win32_supports_z_point_type): New function.
1783 (win32_insert_point, win32_remove_point): Adjust to new interface.
1784 (win32_target_ops): Install win32_supports_z_point_type.
1785 * win32-low.h (struct win32_target_ops):
1786 <supports_z_point_type>: New method.
1787 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1788 instead of a char. Also take a raw breakpoint pointer.
1789
932539e3
PA
17902014-05-20 Pedro Alves <palves@redhat.com>
1791
1792 * mem-break.h: Include break-common.h.
1793 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1794 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1795 (Z_packet_to_target_hw_bp_type): New declaration.
1796 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1797 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1798 (Z_PACKET_ACCESS_WP): Delete macros.
1799 (Z_packet_to_hw_type): Delete function.
1800 * i386-low.h: Don't include break-common.h here.
1801 (Z_packet_to_hw_type): Delete declaration.
1802 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1803 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1804 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1805 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1806 * linux-aarch64-low.c: Don't include break-common.h here.
1807 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1808 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1809 (Z_packet_to_target_hw_bp_type): Delete function.
1810 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1811 function.
1812 (mips_insert_point, mips_remove_point): Use
1813 Z_packet_to_target_hw_bp_type.
1814
4ff0d3d8
PA
18152014-05-20 Pedro Alves <palves@redhat.com>
1816
1817 * linux-aarch64-low.c: Include break-common.h.
1818 (enum target_point_type): Delete.
1819 (Z_packet_to_point_type): Rename to ...
1820 (Z_packet_to_target_hw_bp_type): ... this, and return a
1821 target_hw_bp_type instead.
1822 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1823 instead of an enum target_point_type.
1824 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1825 breakpoint type.
1826 (aarch64_dr_state_insert_one_point)
1827 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1828 (aarch64_handle_aligned_watchpoint)
1829 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1830 Take an enum target_hw_bp_type instead of an enum
1831 target_point_type.
1832 (aarch64_supports_z_point_type): New function.
1833 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1834 use Z_packet_to_target_hw_bp_type.
1835
786dc519
JB
18362014-05-20 Joel Brobecker <brobecker@adacore.com>
1837
1838 * configure.ac: Only use -Werror by default when DEVELOPMENT
1839 is true.
1840 * configure: Regenerate.
1841
9e0aa64f
JK
18422014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1843
1844 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1845 * linux-x86-low.c (X86_64_USER_REGS): New.
1846 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1847
2b577b92
YQ
18482014-04-28 Yao Qi <yao@codesourcery.com>
1849
1850 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1851 name.
1852
94611da2
PA
18532014-04-25 Pedro Alves <palves@redhat.com>
1854
1855 PR server/16255
1856 * linux-low.c (linux_attach_fail_reason_string): New function.
1857 (linux_attach_lwp): Delete.
1858 (linux_attach_lwp_1): Rename to ...
1859 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1860 argument. Remove "initial" parameter. Return int instead of
1861 void. Don't error or warn here.
1862 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1863 failure to attach to the tgid. Call warning when failing to
1864 attach to an lwp.
1865 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1866 argument. Remove "initial" parameter. Return int instead of
1867 void. Don't error or warn here.
1868 (linux_attach_fail_reason_string): New declaration.
1869 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1870 interface change. Use linux_attach_fail_reason_string.
1871
01f9f808
MS
18722014-04-24 Michael Sturm <michael.sturm@mintel.com>
1873 Walfred Tedeschi <walfred.tedeschi@intel.com>
1874
1875 * Makefile.in: Added rules to handle new files
1876 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1877 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1878 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1879 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1880 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1881 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1882 x32-avx512-linux.o.
1883 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1884 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1885 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1886 i386/x32-avx512.xml.
1887 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1888 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1889 i386/x32-avx512-linux.xml.
1890 * i387-fp.c (num_avx512_k_registers): New constant for number
1891 of K registers.
1892 (num_avx512_zmmh_low_registers): New constant for number of
1893 lower ZMM registers (0-15).
1894 (num_avx512_zmmh_high_registers): New constant for number of
1895 higher ZMM registers (16-31).
1896 (num_avx512_ymmh_registers): New contant for number of higher
1897 YMM registers (ymm16-31 added by avx521 on x86_64).
1898 (num_avx512_xmm_registers): New constant for number of higher
1899 XMM registers (xmm16-31 added by AVX512 on x86_64).
1900 (struct i387_xsave): Add space for AVX512 registers.
1901 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1902 Add code to handle AVX512 registers.
1903 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1904 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1905 prototypei from generated file.
1906 (tdesc_amd64_avx512_linux): Likewise.
1907 (init_registers_x32_avx512_linux): Likewise.
1908 (tdesc_x32_avx512_linux): Likewise.
1909 (init_registers_i386_avx512_linux): Likewise.
1910 (tdesc_i386_avx512_linux): Likewise.
1911 (x86_64_regmap): Add AVX512 registers.
1912 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1913 mask.
1914 (initialize_low_arch): Add code to initialize AVX512 registers.
1915
51aa91f9
PA
19162014-04-23 Pedro Alves <palves@redhat.com>
1917
1918 * mem-break.c (find_gdb_breakpoint_at): Make static.
1919 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1920
a4165e94
PA
19212014-04-23 Pedro Alves <palves@redhat.com>
1922
1923 * i386-low.c: Don't include break-common.h here.
1924 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1925 prototype to take target_hw_bp_type as argument instead of a Z
1926 packet char.
1927 * i386-low.h: Include break-common.h here.
1928 (Z_packet_to_hw_type): Declare.
1929 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1930 prototypes.
1931 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1932 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1933 (x86_remove_point): Convert the packet number to a
1934 target_hw_bp_type before calling i386_low_remove_watchpoint.
1935 * win32-i386-low.c (i386_insert_point): Convert the packet number
1936 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1937 (i386_remove_point): Convert the packet number to a
1938 target_hw_bp_type before calling i386_low_remove_watchpoint.
1939
b8acf843
PA
19402014-04-23 Pedro Alves <palves@redhat.com>
1941
1942 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1943
d708bcd1
PA
19442014-04-10 Pedro Alves <palves@redhat.com>
1945
1946 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1947 Check if the condition or command is NULL before checking if the
1948 breakpoint is known. On success, return true.
1949 * mem-break.h (add_breakpoint_condition): Document return.
1950 (add_breakpoint_commands): Add describing comment.
1951 * server.c (skip_to_semicolon): New function.
1952 (process_point_options): Use it.
1953
2eec7d5b
PA
19542014-04-09 Pedro Alves <palves@redhat.com>
1955
1956 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1957 to lwpid_of.
1958
fa96cb38
PA
19592014-02-27 Pedro Alves <palves@redhat.com>
1960
1961 PR 12702
1962 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1963 macros.
1964 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1965 output.
1966 (last_thread_of_process_p): Take a PID argument instead of a
1967 thread pointer.
1968 (linux_wait_for_lwp): Delete.
1969 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1970 functions.
1971 (linux_low_filter_event): New function, party factored out from
1972 linux_wait_for_event.
1973 (linux_wait_for_event): Rename to ...
1974 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1975 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1976 sigsuspend. Check for zombie leaders.
1977 (linux_wait_for_event): Reimplement as wrapper around
1978 linux_wait_for_event_filtered.
1979 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1980 a normal or signal exit is seen, it's the whole process exiting.
1981 (wait_for_sigstop): No longer a for_each_inferior callback.
1982 Rewrite on top of linux_wait_for_event_filtered.
1983 (stop_all_lwps): Call wait_for_sigstop directly.
1984 * server.c (resume, handle_target_event): Handle
1985 TARGET_WAITKIND_NO_RESUMED.
1986
d763de10
JB
19872014-02-26 Joel Brobecker <brobecker@adacore.com>
1988
1989 * win32-low.c (psapi_get_dll_name,
1990 * win32_CreateToolhelp32Snapshot): Delete.
1991 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1992 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1993 Delete.
1994 (handle_load_dll): Add function description.
1995 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1996
850a0f76
JB
19972014-02-26 Joel Brobecker <brobecker@adacore.com>
1998
1999 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2000 Add comment.
2001 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2002 base address when calling win32_add_one_solib.
2003 (handle_load_dll): Delete local variable load_addr.
2004 Remove 0x1000 offset applied to DLL base address when calling
2005 win32_add_one_solib.
2006 (handle_unload_dll): Add comment.
2007
f25b3fc3
JB
20082014-02-26 Joel Brobecker <brobecker@adacore.com>
2009
2010 * win32-low.c (win32_add_all_dlls): Renames
2011 win32_ensure_ntdll_loaded. Rewrite function documentation.
2012 Adjust implementation to always load all DLLs.
2013 Add 0x1000 offset to DLL base address when calling
2014 win32_add_one_solib.
2015 (child_initialization_done): New static global.
2016 (do_initial_child_stuff): Set child_initialization_done to
2017 zero during child initialization, and 1 after. Replace call
2018 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2019 Add comment.
2020 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2021 (handle_unload_dll): Add function documentation.
2022 (get_child_debug_event): Ignore load and unload DLL events
2023 during child initialization.
2024
d86d4aaf
DE
20252014-02-20 Doug Evans <dje@google.com>
2026
3bc32da3 2027 Remove global all_lwps.
d86d4aaf
DE
2028 * inferiors.h (ptid_of): Move here from linux-low.h.
2029 (pid_of, lwpid_of): Ditto.
2030 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2031 parameter is a struct thread_info * now.
2032 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2033 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2034 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2035 directly.
2036 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2037 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2038 * linux-arm-low.c (update_registers_callback): Update, "entry"
2039 parameter is a struct thread_info * now.
2040 Fetch lwpid from current_inferior directly.
2041 (arm_insert_point): Pass &all_threads to find_inferior instead of
2042 &all_lwps.
2043 (arm_remove_point): Ditto.
2044 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2045 (arm_prepare_to_resume): Fetch pid from thread.
2046 (arm_read_description): Fetch lwpid from current_inferior directly.
2047 * linux-low.c (all_lwps): Delete.
2048 (delete_lwp): Delete call to remove_inferior.
2049 (handle_extended_wait): Fetch lwpid from thread.
2050 (add_lwp): Don't set lwp->entry.id. Remove call to
2051 add_inferior_to_list.
2052 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2053 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2054 (kill_one_lwp_callback): Ditto.
2055 (linux_kill): Don't dereference NULL pointer.
2056 Fetch ptid,lwpid from thread.
2057 (get_detach_signal): Fetch ptid from thread.
2058 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2059 Simplify call to regcache_invalidate_thread.
2060 (delete_lwp_callback): Update, "entry" parameter is a
2061 struct thread_info * now. Fetch pid from thread.
2062 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2063 (status_pending_p_callback): Update, "entry" parameter is a
2064 struct thread_info * now. Fetch ptid from thread.
2065 (find_lwp_pid): Update, "entry" parameter is a
2066 struct thread_info * now.
2067 (linux_wait_for_lwp): Fetch pid from thread.
2068 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2069 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2070 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2071 (dequeue_one_deferred_signal): Ditto.
2072 (cancel_breakpoint): Fetch ptid from current_inferior.
2073 (linux_wait_for_event): Pass &all_threads to find_inferior,
2074 not &all_lwps. Fetch ptid, lwpid from thread.
2075 (count_events_callback): Update, "entry" parameter is a
2076 struct thread_info * now.
2077 (select_singlestep_lwp_callback): Ditto.
2078 (select_event_lwp_callback): Ditto.
2079 (cancel_breakpoints_callback): Ditto.
2080 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2081 not &all_lwps.
2082 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2083 (unsuspend_one_lwp): Update, "entry" parameter is a
2084 struct thread_info * now.
2085 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2086 not &all_lwps.
2087 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2088 Fetch lwpid from thread, not lwp.
2089 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2090 Pass &all_threads to find_inferior, not &all_lwps.
2091 (send_sigstop): Fetch lwpid from thread, not lwp.
2092 (send_sigstop_callback): Update, "entry" parameter is a
2093 struct thread_info * now.
2094 (suspend_and_send_sigstop_callback): Ditto.
2095 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2096 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2097 struct thread_info * now.
2098 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2099 from thread, lwp.
2100 (lwp_running): Update, "entry" parameter is a
2101 struct thread_info * now.
2102 (stop_all_lwps): Fetch ptid from thread.
2103 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2104 (linux_resume_one_lwp): Fetch lwpid from thread.
2105 (linux_set_resume_request): Update, "entry" parameter is a
2106 struct thread_info * now. Fetch pid, lwpid from thread.
2107 (resume_status_pending_p): Update, "entry" parameter is a
2108 struct thread_info * now.
2109 (need_step_over_p): Ditto. Fetch lwpid from thread.
2110 (start_step_over): Fetch lwpid from thread.
2111 (linux_resume_one_thread): Update, "entry" parameter is a
2112 struct thread_info * now. Fetch lwpid from thread.
2113 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2114 (proceed_one_lwp): Update, "entry" parameter is a
2115 struct thread_info * now. Fetch lwpid from thread.
2116 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2117 struct thread_info * now.
2118 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2119 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2120 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2121 directly.
2122 (regsets_store_inferior_registers): Ditto.
2123 (fetch_register, store_register): Ditto.
2124 (linux_read_memory, linux_write_memory): Ditto.
2125 (linux_request_interrupt): Ditto.
2126 (linux_read_auxv): Ditto.
2127 (linux_xfer_siginfo): Ditto.
2128 (linux_qxfer_spu): Ditto.
2129 (linux_qxfer_libraries_svr4): Ditto.
2130 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2131 moved to inferiors.h.
2132 (get_lwp): Delete.
2133 (get_thread_lwp): Update.
2134 (struct lwp_info): Delete member "entry". Simplify comment for
2135 member "thread".
2136 (all_lwps): Delete.
2137 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2138 current_inferior directly.
2139 (update_watch_registers_callback): Update, "entry" parameter is a
2140 struct thread_info * now. Fetch pid from thread.
2141 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2142 (mips_insert_point): Fetch lwpid from current_inferior.
2143 Pass &all_threads to find_inferior, not &all_lwps.
2144 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2145 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2146 directly.
2147 (mips_stopped_data_address): Ditto.
2148 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2149 directly.
2150 * linux-tile-low.c (tile_arch_setup): Ditto.
2151 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2152 (update_debug_registers_callback): Update, "entry" parameter is a
2153 struct thread_info * now. Fetch pid from thread.
2154 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2155 Pass &all_threads to find_inferior, not &all_lwps.
2156 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2157 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2158 Pass &all_threads to find_inferior, not &all_lwps.
2159 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2160 (i386_dr_low_get_status): Ditto.
2161 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2162 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2163 (x86_linux_read_description): Ditto.
2164 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2165
3b8361aa
DE
21662014-02-20 Doug Evans <dje@google.com>
2167
2168 * inferiors.c (get_first_inferior): Fix buglet.
2169
f7667f0d
DE
21702014-02-19 Doug Evans <dje@google.com>
2171
2172 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2173 * inferiors.c (add_thread): Change result type to struct thread_info *.
2174 All callers updated.
2175 (add_lwp): Call add_thread here instead of in callers.
2176 All callers updated.
2177 * linux-low.h (get_lwp_thread): Rewrite.
2178 (struct lwp_info): New member "thread".
2179
b3312d80
DE
21802014-02-19 Doug Evans <dje@google.com>
2181
2182 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2183 All callers updated.
2184
ecc6f45c
DE
21852014-02-19 Doug Evans <dje@google.com>
2186
2187 * inferiors.c (add_thread): Fix whitespace.
2188
649ebbca
DE
21892014-02-19 Doug Evans <dje@google.com>
2190
2191 * dll.c (clear_dlls): Replace accessing list implemention details
2192 with API function.
2193 * gdbthread.h (get_first_thread): Declare.
2194 * inferiors.c (for_each_inferior_with_data): New function.
2195 (get_first_thread): New function.
2196 (find_thread_ptid): Simplify.
2197 (get_first_inferior): New function.
2198 (clear_list): Delete.
2199 (one_inferior_p): New function.
2200 (clear_inferior_list): New function.
2201 (clear_inferiors): Update.
2202 * inferiors.h (for_each_inferior_with_data): Declare.
2203 (clear_inferior_list): Declare.
2204 (one_inferior_p): Declare.
2205 (get_first_inferior): Declare.
2206 * linux-low.c (linux_wait_for_event): Replace accessing list
2207 implemention details with API function.
2208 * server.c (target_running): Ditto.
2209 (accumulate_file_name_length): New function.
2210 (emit_dll_description): New function.
2211 (handle_qxfer_libraries): Replace accessing list implemention
2212 details with API function.
2213 (handle_qxfer_threads_worker): New function.
2214 (handle_qxfer_threads_proper): Replace accessing list implemention
2215 details with API function.
2216 (handle_query): Ditto.
2217 (visit_actioned_threads_callback_ftype): New typedef.
2218 (visit_actioned_threads_data): New struct.
2219 (visit_actioned_threads): Rewrite to be find_inferior callback.
2220 (resume): Call find_inferior.
2221 (handle_status): Replace accessing list implemention
2222 details with API function.
2223 (process_serial_event): Replace accessing list implemention details
2224 with API function.
2225 * target.c (set_desired_inferior): Replace accessing list implemention
2226 details with API function.
2227 * tracepoint.c (same_process_p): New function.
2228 (gdb_agent_about_to_close): Replace accessing list implemention
2229 details with API function.
2230 * win32-low.c (child_delete_thread): Replace accessing list
2231 implemention details with API function.
2232 (match_dll_by_basename): New function.
2233 (dll_is_loaded_by_basename): New function.
2234 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2235 details call to dll_is_loaded_by_basename.
2236
80894984
DE
22372014-02-19 Doug Evans <dje@google.com>
2238
2239 * dll.h (struct dll_info): Add comment.
2240 * gdbthread.h (struct thread_info): Add comment.
2241 (current_ptid): Simplify.
2242 * inferiors.c (add_process): Update.
2243 (remove_process): Update.
2244 * inferiors.h (struct process_info): Rename member "head" to "entry".
2245 * linux-low.c (delete_lwp): Update.
2246 (add_lwp): Update.
2247 (last_thread_of_process_p): Update.
2248 (kill_one_lwp_callback, linux_kill): Update.
2249 (status_pending_p_callback): Update.
2250 (wait_for_sigstop): Update. Simplify read of ptid.
2251 (start_step_over): Update.
2252 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2253 (get_lwp_thread): Update.
2254 (struct lwp_info): Rename member "head" to "entry".
2255 * regcache.h (inferior_list_entry): Delete.
2256 * server.c (kill_inferior_callback): Update.
2257 (detach_or_kill_inferior_callback): Update.
2258 (print_started_pid): Update.
2259 (print_attached_pid): Update.
2260 (process_serial_event): Simplify read of ptid.
2261 * thread-db.c (thread_db_create_event): Update.
2262 (thread_db_get_tls_address): Update.
2263 * win32-low.c (current_inferior_ptid): Simplify.
2264
46917d26
TT
22652014-02-19 Tom Tromey <tromey@redhat.com>
2266
2267 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2268 argument.
2269 (target_supports_btrace): Update.
2270
0759a81e
YQ
22712014-02-14 Yao Qi <yao@codesourcery.com>
2272
2273 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2274 (rsp-low-ipa.o): New target.
2275
a7191e8b
TT
22762014-02-12 Tom Tromey <tromey@redhat.com>
2277
2278 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2279 convert_ascii_to_int.
2280 * regcache.c (registers_to_string): Likewise.
2281 * remote-utils.c (decode_M_packet): Likewise.
2282 * server.c (process_serial_event): Likewise.
2283
ff0e980e
TT
22842014-02-12 Tom Tromey <tromey@redhat.com>
2285
2286 * server.c (handle_query, handle_v_run): Use hex2bin, not
2287 unhexify.
2288 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2289
e9371aff
TT
22902014-02-12 Tom Tromey <tromey@redhat.com>
2291
2292 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2293 convert_int_to_ascii.
2294 * regcache.c (registers_to_string, collect_register_as_string):
2295 Likewise.
2296 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2297 Likewise.
2298 * server.c (process_serial_event): Likewise.
2299 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2300 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2301
971dc0b8
TT
23022014-02-12 Tom Tromey <tromey@redhat.com>
2303
2304 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2305 bin2hex, not hexify.
2306 * tracepoint.c (cmd_qtstatus): Likewise.
2307
0a822afb
TT
23082014-02-12 Tom Tromey <tromey@redhat.com>
2309
2310 * remote-utils.c (monitor_output): Pass explicit length to
2311 hexify.
2312
9c3d6531
TT
23132014-02-12 Tom Tromey <tromey@redhat.com>
2314
2315 * tracepoint.c: Include rsp-low.h.
2316 * server.c: Include rsp-low.h.
2317 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2318 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2319 declare.
2320 * remote-utils.c: Include rsp-low.h.
2321 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2322 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2323 (convert_int_to_ascii, convert_ascii_to_int): Move to
2324 common/rsp-low.c.
2325 * regcache.c: Include rsp-low.h.
2326 * ax.c: Include rsp-low.h.
2327 * Makefile.in (SFILES): Add common/rsp-low.c.
2328 (OBS): Add rsp-low.o.
2329 (rsp-low.o): New target.
2330
01fd3ea5
TT
23312014-02-12 Tom Tromey <tromey@redhat.com>
2332
2333 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2334 Include print-utils.h.
2335 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2336 (plongest, thirty_two, phex_nz): Remove.
2337 * Makefile.in (SFILES): Add common/print-utils.c.
2338 (OBS): Add print-utils.o.
2339 (print-utils-ipa.o): New target.
2340 (print-utils.o): New target.
2341 (IPA_OBJS): Add print-utils-ipa.o.
2342
e99dc820
TT
23432014-02-06 Tom Tromey <tromey@redhat.com>
2344
2345 * Makefile.in (SFILES): Fix indentation.
2346
ee1e2d4f
DE
23472014-02-05 Doug Evans <dje@google.com>
2348
2349 * linux-low.c (linux_wait_for_event): Improve comment.
2350 (linux_wait_1): Keep current_inferior in sync with event_child.
2351
f5a02773
DE
23522014-01-22 Doug Evans <dje@google.com>
2353
2354 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2355
87ce2a04
DE
23562014-01-22 Doug Evans <dje@google.com>
2357
2358 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2359 * configure: Regenerate.
2360 * config.in: Regenerate.
2361 * Makefile.in (SFILES): Add debug.c.
2362 (OBS): Add debug.o.
2363 * debug.c: New file.
2364 * debug.h: New file.
2365 * linux-aarch64-low.c (*): Update all debugging printfs to use
2366 debug_printf instead of fprintf.
2367 * linux-arm-low.c (*): Ditto.
2368 * linux-cris-low.c (*): Ditto.
2369 * linux-crisv32-low.c (*): Ditto.
2370 * linux-m32r-low.c (*): Ditto.
2371 * linux-sparc-low.c (*): Ditto.
2372 * linux-x86.c (*): Ditto.
2373 * linux-low.c (*): Ditto.
2374 (linux_wait_1): Add calls to debug_enter, debug_exit.
2375 (linux_wait): Remove redundant debugging printf.
2376 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2377 (linux_resume, unstop_all_lwps): Ditto.
2378 * mem-break.c (*): Update all debugging printfs to use
2379 debug_printf instead of fprintf.
2380 * remote-utils.c (*): Ditto.
2381 * thread-db.c (*): Ditto.
2382 * server.c #include <ctype.h>, "gdb_vecs.h".
2383 (debug_threads): Moved to debug.c.
2384 (*): Update all debugging printfs to use debug_printf instead of
2385 fprintf.
2386 (start_inferior): Replace call to fflush with call to debug_flush.
2387 (monitor_show_help): Mention set debug-format.
2388 (parse_debug_format_options): New function.
2389 (handle_monitor_command): Handle "monitor set debug-format".
2390 (gdbserver_usage): Mention --debug-format.
2391 (main): Parse --debug-format.
2392 * server.h (debug_threads): Declaration moved to debug.h.
2393 #include "debug.h".
2394 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2395 trace_debug_1 that uses debug_printf.
2396 (tracepoint_look_up_symbols): Update all debugging printfs to use
2397 debug_printf instead of fprintf.
2398
e671835b
BS
23992014-01-20 Baruch Siach <baruch@tkos.co.il>
2400
2401 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2402 sys/ptrace.h.
2403
b5737fa9
PA
24042014-01-17 Pedro Alves <palves@redhat.com>
2405
ea38d2a9 2406 PR build/16445
c7faa97a
PA
2407 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2408 defined after including gdb_proc_service.h.
b5737fa9 2409
40ed484e
DE
24102014-01-16 Doug Evans <dje@google.com>
2411
2412 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2413 (match_dll): Use it.
2414
969c39fb
MM
24152014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2416
2417 * target.h (target_ops) <read_btrace>: Change parameters and
2418 return type to allow error reporting.
2419 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2420 trace reading errors on.
2421 * linux-low.c (linux_low_read_btrace): Pass trace reading
2422 errors on.
2423 (linux_low_disable_btrace): New.
2424
ab7f45ba
DE
24252014-01-15 Doug Evans <dje@google.com>
2426
2427 * inferiors.c (thread_id_to_gdb_id): Delete.
2428 * inferiors.h (thread_id_to_gdb_id): Delete.
2429
66af0f44
EZ
24302014-01-13 Eli Zaretskii <eliz@gnu.org>
2431
2432 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2433 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2434 versions.
2435
9939e131
PA
24362014-01-08 Pedro Alves <palves@redhat.com>
2437
2438 * server.c (handle_status): Don't discard previous queued stop
2439 replies or thread's pending status here.
2440 (main) <disconnection>: Do it here instead.
2441
b7ea362b
PA
24422014-01-08 Pedro Alves <palves@redhat.com>
2443
2444 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2445 * server.c (visit_actioned_threads, handle_pending_status): New
2446 function.
2447 (handle_v_cont): Factor out parts to ...
2448 (resume): ... this new function. If in all-stop, and a thread
2449 being resumed has a pending status, report it without actually
2450 resuming.
2451 (myresume): Adjust to use the new 'resume' function.
2452 (clear_pending_status_callback, set_pending_status_callback)
2453 (find_status_pending_thread_callback): New functions.
2454 (handle_status): Handle the case of multiple threads having
2455 interesting statuses to report. Report threads' real last signal
2456 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2457 with an interesting thread to report the status for, instead of
2458 always reporting the status of the first thread.
2459
28498c42
JB
24602014-01-01 Joel Brobecker <brobecker@adacore.com>
2461
2462 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2463 * gdbreplay.c (gdbreplay_version): Likewise.
2464
f45c82da
YZ
24652013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2466
2467 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2468 iov.iov_len with the real length in use.
2469
379a5e2d
JB
24702013-12-13 Joel Brobecker <brobecker@adacore.com>
2471
2472 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2473 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2474 for all targets that use win32-low.c.
2475 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2476 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2477
4210d83e
PA
24782013-12-13 Pedro Alves <palves@redhat.com>
2479
2480 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2481 if equal to TARGET_WAITKIND_LOADED.
2482 * win32-low.c (cached_status): New static global.
2483 (win32_wait): Add declaration.
2484 (do_initial_child_stuff): Flush all initial pending debug events
2485 up to the initial breakpoint.
2486 (win32_wait): If CACHED_STATUS was set, return that instead
2487 of doing a real wait. Remove the code resuming the execution
2488 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2489 during the initial phase. Also remove the code changing
2490 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2491 TARGET_WAITKIND_STOPPED.
2492
e7f0d979
YQ
24932013-12-11 Yao Qi <yao@codesourcery.com>
2494
2495 * notif.c (handle_notif_ack): Return 0 if no notification
2496 matches.
2497
ebcf782c
DE
24982013-11-20 Doug Evans <dje@google.com>
2499
2500 * linux-low.c (linux_set_resume_request): Fix comment.
2501
20ad9378
DE
25022013-11-20 Doug Evans <dje@google.com>
2503
2504 * linux-low.c (resume_status_pending_p): Tweak comment.
2505
a196ebeb
WT
25062013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2507
2508 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2509 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2510 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2511 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2512 (srv_amd64_regobj): Add amd64-mpx.o.
2513 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2514 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2515 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2516 * i387-fp.c (num_pl_bnd_register) Added constant.
2517 (num_pl_bnd_cfg_registers) Added constant.
2518 (struct i387_xsave) Added reserved area and MPX fields.
2519 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2520 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2521 function.
2522 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2523 (init_registers_amd64_mpx_linux): Declare new function.
2524 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2525 (x86_64_regmap): Add MPX registers.
2526 (x86_linux_read_description): Add MPX case.
2527 (initialize_low_arch): Initialize MPX targets.
2528
0080a2f6
TT
25292013-11-18 Tom Tromey <tromey@redhat.com>
2530
2531 * configure: Rebuild.
2532 * configure.ac: Don't check for stdlib.h.
2533 * gdbreplay.c: Unconditionally include stdlib.h.
2534
2978b111
TT
25352013-11-18 Tom Tromey <tromey@redhat.com>
2536
2537 * config.in: Rebuild.
2538 * configure: Rebuild.
2539 * configure.ac: Don't use AC_HEADER_DIRENT.
2540
a3d08894
TT
25412013-11-18 Tom Tromey <tromey@redhat.com>
2542
2543 * server.h: Don't check HAVE_STRING_H.
2544 * gdbreplay.c: Don't check HAVE_STRING_H.
2545 * configure: Rebuild.
2546
0a5dd17d
TT
25472013-11-18 Tom Tromey <tromey@redhat.com>
2548
2549 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2550 LIBGNU.
2551
1bd2f0ba
TT
25522013-11-08 Tom Tromey <tromey@redhat.com>
2553
2554 * configure, config.in: Rebuild.
2555 * configure.ac: Remove unused configury.
2556
3266f10b
TT
25572013-11-08 Tom Tromey <tromey@redhat.com>
2558
2559 * acinclude.m4: Include common.m4, codeset.m4.
2560 * configure, config.in: Rebuild.
2561 * configure.ac: Use GDB_AC_COMMON.
2562
6682d959
AA
25632013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2564
2565 * linux-s390-low.c (HWCAP_S390_TE): New define.
2566 (s390_arch_setup): Consider the TE field in the HWCAP for
2567 determining 'have_regset_tdb'.
2568
fd0a4d76
SDJ
25692013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2570
2571 PR gdb/16014
2572 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2573 call to sizeof.
2574
1a3d890b
PA
25752013-10-02 Pedro Alves <palves@redhat.com>
2576
2577 * server.c (process_serial_event): Don't output "GDBserver
2578 exiting" if GDB is connected through stdio.
2579 * target.c (mywait): Likewise, be silent if GDB is connected
2580 through stdio.
2581
97ad4581
JB
25822013-10-01 Joel Brobecker <brobecker@adacore.com>
2583
2584 * lynx-low.c (lynx_add_threads_after_attach): New function.
2585 (lynx_attach): Remove call to add_thread. Add call to
2586 lynx_add_threads_after_attach instead.
2587
5b4e221c
MF
25882013-09-28 Mike Frysinger <vapier@gentoo.org>
2589
2590 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2591 * config.in, configure: Regenerated.
2592
ee47b2f8
YQ
25932013-09-18 Yao Qi <yao@codesourcery.com>
2594
2595 PR server/15959
2596 * server.c (start_inferior): Clear 'resume_info'.
2597
d6707650 25982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2599
d6707650
JW
2600 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2601 for each register.
2602
9243dd0e 26032013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2604
9243dd0e
JW
2605 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2606 linux-tile-low.o to srv_tgtobj.
2607
c623a6ef
WN
26082013-09-16 Will Newton <will.newton@linaro.org>
2609
2610 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2611 out regs.
2612
fb71d39e
PA
26132013-09-06 Pedro Alves <palves@redhat.com>
2614
2615 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2616 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2617 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2618 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2619 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2620 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2621
8e7e9910
PA
26222013-09-06 Pedro Alves <palves@redhat.com>
2623
2624 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2625 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2626
7c3a12ca
PA
26272013-09-06 Pedro Alves <palves@redhat.com>
2628
2629 * linux-amd64-ipa.c: Include tracepoint.h.
2630 * linux-i386-ipa.c: Include tracepoint.h.
2631
8eb3d7b6
RW
26322013-09-06 Ricard Wanderlof <ricardw@axis.com>
2633
2634 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2635 (ps_get_thread_area): New function.
2636
eddddb9d
RW
26372013-09-06 Ricard Wanderlof <ricardw@axis.com>
2638
2639 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2640 (initialize_low_arch): Call init_registers_crisv32 rather than
2641 init_register_crisv32.
2642
533b0600
PA
26432013-09-05 Pedro Alves <palves@redhat.com>
2644
2645 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2646 to ...
2647 * hostio.h: ... this new file.
2648 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2649 win32-low.c: Include hostio.h.
2650
0ce3d3b5
PA
26512013-09-05 Pedro Alves <palves@redhat.com>
2652
2653 * server.h (gdb_client_data, handler_func, callback_handler_func)
2654 (delete_file_handler, add_file_handler, append_callback_event)
2655 (delete_callback_event, start_event_loop, initialize_event_loop):
2656 Move to event-loop.h and include it.
2657 * event-loop.h: New file.
2658
799cdc37
PA
26592013-09-05 Pedro Alves <palves@redhat.com>
2660
2661 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2662 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2663 (loaded_dll, unloaded_dll): Move to ...
2664 * dll.h: ... this new file.
2665 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2666
6a6bbd9d
PA
26672013-09-05 Pedro Alves <palves@redhat.com>
2668
2669 * server.h (current_process, get_thread_process, all_processes)
2670 (add_inferior_to_list, for_each_inferior, current_inferior)
2671 (remove_inferior, add_process, remove_process, find_process_pid)
2672 (have_started_inferiors_p, have_attached_inferiors_p)
2673 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2674 (clear_inferiors, find_inferior, find_inferior_id)
2675 (inferior_target_data, set_inferior_target_data)
2676 (inferior_regcache_data, set_inferior_regcache_data): Move to
2677 inferiors.h, and include it.
2678 * inferiors.h: New file.
2679
f699aaba
PA
26802013-09-05 Pedro Alves <palves@redhat.com>
2681
2682 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2683 Move ...
2684 * ax.h: ... here.
2685
c144c7a0
PA
26862013-09-05 Pedro Alves <palves@redhat.com>
2687
2688 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2689 tracepoint.h.
2690 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2691 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2692 (handle_tracepoint_general_set, handle_tracepoint_query)
2693 (tracepoint_finished_step, tracepoint_was_hit)
2694 (release_while_stepping_state_list, current_traceframe)
2695 (in_readonly_region, traceframe_read_mem)
2696 (fetch_traceframe_registers, traceframe_read_sdata)
2697 (traceframe_read_info, struct fast_tpoint_collect_status)
2698 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2699 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2700 (supply_fast_tracepoint_registers)
2701 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2702 (ipa_tdesc, claim_trampoline_space)
2703 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2704 (agent_mem_read, agent_get_trace_state_variable_value)
2705 (agent_set_trace_state_variable_value, agent_tsv_read)
2706 (agent_mem_read_string, get_raw_reg_func_addr)
2707 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2708 * tracepoint.h: ... this new file.
2709
ff42e6ab
PA
27102013-09-05 Pedro Alves <palves@redhat.com>
2711
2712 * server.h (perror_with_name, error, fatal, warning, paddress)
2713 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2714 include it.
2715 * utils.h: New file.
2716
541af0f4
PA
27172013-09-05 Pedro Alves <palves@redhat.com>
2718
2719 * server.h (remote_debug, noack_mode, transport_is_reliable)
2720 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2721 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2722 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2723 (write_enn, initialize_async_io, enable_async_io)
2724 (disable_async_io, check_remote_input_interrupt_request)
2725 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2726 (dead_thread_notify, prepare_resume_reply)
2727 (decode_address_to_semicolon, decode_address, decode_m_packet)
2728 (decode_M_packet, decode_X_packet, decode_xfer_write)
2729 (decode_search_memory_packet, unhexify, hexify)
2730 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2731 (look_up_one_symbol, relocate_instruction)
2732 (monitor_output): Move to remote-utils.h, and include it.
2733 * remote-utils.h: New file.
2734
eebdf26b
PA
27352013-09-05 Pedro Alves <palves@redhat.com>
2736
2737 * server.h (_): Delete.
2738
3aafd2ff
PA
27392013-09-02 Pedro Alves <palves@redhat.com>
2740
2741 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2742 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2743 allocated.
2744 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2745
cee83bcb
PM
27462013-09-02 Pierre Muller <muller@sourceware.org>
2747
2748 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2749 or WriteProcessMemory complete successfully and handle
2750 ERROR_PARTIAL_COPY error.
2751
9a13b2fa
PA
27522013-09-02 Pedro Alves <palves@redhat.com>
2753
2754 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2755 error instead of EIO.
2756
602e3198
JK
27572013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2758
2759 PR server/15604
2760 * linux-low.c: Include filestuff.h.
2761 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2762 * lynx-low.c: Include filestuff.h.
2763 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2764 * server.c: Include filestuff.h.
2765 (main): Call notice_open_fds.
2766 * spu-low.c: Include filestuff.h.
2767 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2768
96d7229d
LM
27692013-08-22 Luis Machado <lgustavo@codesourcery.com>
2770
2771 * Makefile.in: Explain why ../target and ../nat are not
2772 listed as include file search paths.
2773 (linux-waitpid.o): New object file rule.
2774 * configure.srv (srv_native_linux_obj): New variable.
2775 Replace all occurrences of linux native object files with
2776 $srv_native_linux_obj.
2777 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2778 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2779 (linux_enable_event_reporting): Remove declaration.
2780 (my_waitpid): Moved to common/linux-waitpid.c.
2781 (linux_wait_for_event): Pass ptid when calling
2782 linux_enable_event_reporting.
2783 (linux_supports_tracefork_flag): Remove.
2784 (linux_enable_event_reporting): Likewise.
2785 (linux_tracefork_grandchild): Remove.
2786 (STACK_SIZE): Moved to common/linux-ptrace.c.
2787 (linux_tracefork_child): Remove.
2788 (linux_test_for_tracefork): Remove.
2789 (linux_look_up_symbols): Call linux_supports_traceclone.
2790 (initialize_low): Remove call to linux_test_for_tracefork.
2791 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2792 common/linux-ptrace.h.
2793 (PTRACE_TYPE_ARG4): Likewise.
2794 Include linux-ptrace.h.
2795
32940073
PA
27962013-08-21 Pedro Alves <palves@redhat.com>
2797
2798 * config.in: Renegerate.
2799
33b60d58 28002013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2801
33b60d58
LM
2802 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2803 (SFILES): Remove $(srcdir)/common/target-common.c and
2804 add $(srcdir)/target/waitstatus.c.
2805 (OBS): Remove target-common.o and add waitstatus.o.
2806 (server_h): Remove $(srcdir)/../common/target-common.h and
2807 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2808 and $(srcdir)/../target/waitstatus.h.
2809 (target-common.o): Remove.
2810 (waitstatus.o): New target object file.
2811 * target.h: Do not include target-common.h and
2812 include target/resume.h, target/wait.h and
2813 target/waitstatus.h.
2814
b8e1b30e
LM
28152013-08-13 Luis Machado <lgustavo@codesourcery.com>
2816
2817 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2818 to PTRACE_TYPE_ARG3.
2819 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2820 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2821 PTRACE_TYPE_ARG4.
2822 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2823 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2824
7a60ad40
YQ
28252013-07-27 Jie Zhang <jie@codesourcery.com>
2826 Daniel Jacobowitz <dan@codesourcery.com>
2827 Yao Qi <yao@codesourcery.com>
2828
2829 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2830 (mips-linux-watch.o): New rule.
2831 (mips_linux_watch_h): New variable.
2832 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2833 srv_tgtobj.
2834 * linux-mips-low.c: Include mips-linux-watch.h.
2835 (struct arch_process_info, struct arch_lwp_info): New.
2836 (update_watch_registers_callback): New function.
2837 (mips_linux_new_process, mips_linux_new_thread) New functions.
2838 (mips_linux_prepare_to_resume, mips_insert_point): New
2839 functions.
2840 (mips_remove_point, mips_stopped_by_watchpoint): New
2841 functions.
2842 (rsp_bp_type_to_target_hw_bp_type): New function.
2843 (mips_stopped_data_address): New function.
2844 (the_low_target): Add watchpoint support functions.
2845
de6f69ad
YQ
28462013-07-27 Yao Qi <yao@codesourcery.com>
2847
2848 * i386-low.c: Include break-common.h.
2849 (enum target_hw_bp_type): Remove.
2850
3360c0bf
LM
28512013-07-24 Luis Machado <lgustavo@codesourcery.com>
2852
2853 * Makefile.in (SFILES): /common/target-common.c.
2854 (OBS): Add target-common.o.
2855 (server_h): Add $(srcdir)/../common/target-common.h.
2856 (target-common.o): New target.
2857 * server.c (queue_stop_reply_callback): Free
2858 status string after use.
2859 * target.c (target_waitstatus_to_string): Remove.
2860 * target.h: Include target-common.h.
2861 (resume_kind): Likewise.
2862 (target_waitkind): Likewise.
2863 (target_waitstatus): Likewise.
2864 (TARGET_WNOHANG): Likewise.
2865
bd885420
YQ
28662013-07-04 Yao Qi <yao@codesourcery.com>
2867
2868 * Makefile.in (host_alias): Use @host_noncanonical@.
2869 (target_alias): Use @target_noncanonical@.
2870 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2871 ACX_NONCANONICAL_HOST.
2872 * configure: Regenerated.
2873
2874 Revert:
2875 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2876
2877 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2878 * configure: Rebuild.
2879 * Makefile.in (version_host, version_target): Get from configure.
2880 (version.c): Use $(version_host) and $(version_target).
2881
17ef446e
PA
28822013-07-03 Pedro Alves <palves@redhat.com>
2883
2884 * Makefile.in (config.status): Depend on development.sh.
2885 * acinclude.m4: Include libmcheck.m4.
2886 * configure: Regenerate.
2887
7a9a7487
MG
28882013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2889
2890 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2891 attribute inside the parentheses.
2892 (winapi_DebugSetProcessKillOnExit): Ditto.
2893 (winapi_DebugBreakProcess): Ditto.
2894 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2895
49b64de6
MG
28962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2897
2898 * notif.h (notif_event): Add a dummy member to avoid compiler
2899 errors.
2900
d5749ee7
PA
29012013-07-01 Pedro Alves <palves@redhat.com>
2902
2903 * hostio.c (HOSTIO_PATH_MAX): Define.
2904 (require_filename, handle_open, handle_unlink, handle_readlink):
2905 Use it.
2906
d8d2a3ee
PA
29072013-07-01 Pedro Alves <palves@redhat.com>
2908
2909 * server.h: Include "pathmax.h".
2910 * linux-low.c: Don't include sys/param.h.
2911 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2912 MAXPATHLEN.
2913 * win32-low.c: Don't include sys/param.h.
2914 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2915
bc7dea8d
PA
29162013-07-01 Pedro Alves <palves@redhat.com>
2917
2918 * event-loop.c: Don't check HAVE_UNISTD_H before including
2919 <unistd.h>.
2920 * gdbreplay.c: Likewise.
2921 * remote-utils.c: Likewise.
2922 * server.c: Likewise.
2923 * configure.ac: Don't check for unistd.h.
2924 * configure: Regenerate.
2925
d6c2da54
TT
29262013-06-28 Tom Tromey <tromey@redhat.com>
2927
2928 * Makefile.in (version.c): Use version.in, not
2929 common/version.in.
2930
257b6bec
MG
29312013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2932
2933 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2934 * configure: Rebuild.
2935 * Makefile.in (version_host, version_target): Get from configure.
2936 (version.c): Use $(version_host) and $(version_target).
2937
86ebe149
DK
29382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2939
2940 Fix trace-status to output user name without trailing colon.
2941 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2942
f30aa5af
DK
29432013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2944
2945 Fix trace-status to output proper start-time and stop-time.
2946 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2947 output start time and stop time in hex as gdb expects.
2948
28a93511
YQ
29492013-06-26 Pedro Alves <pedro@codesourcery.com>
2950
2951 * tracepoint.c (build_traceframe_info_xml): Output trace state
2952 variables present in the trace buffer.
2953
01208463
TT
29542013-06-24 Tom Tromey <tromey@redhat.com>
2955
2956 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2957 create-version.sh.
2958 (version.o): Remove.
2959 * gdbreplay.c: Include version.h.
2960 (version, host_name): Don't declare.
2961 * server.h: Include version.h.
2962 (version, host_name): Don't declare.
2963
760256f9
PA
29642013-06-12 Pedro Alves <palves@redhat.com>
2965
2966 * linux-x86-low.c (linux_is_elf64): Delete global.
2967 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2968 with local linux_pid_exe_is_elf_64_file use.
2969
030031ee
PA
29702013-06-11 Pedro Alves <palves@redhat.com>
2971
2972 * linux-low.c (regset_disabled, disable_regset): New functions.
2973 (regsets_fetch_inferior_registers)
2974 (regsets_store_inferior_registers): Use them.
2975 (initialize_regsets_info); Don't allocate the disabled_regsets
2976 array here.
2977 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2978 comment.
2979
5da6eb0a
PA
29802013-06-11 Pedro Alves <palves@redhat.com>
2981
2982 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2983 xmalloc.
2984
7e5aaa09
PA
29852013-06-11 Pedro Alves <palves@redhat.com>
2986
2987 * linux-x86-low.c (initialize_low_arch): Call
2988 init_registers_x32_avx_linux.
2989
d878444c
JK
29902013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2991
2992 Fix compatibility with Android Bionic.
2993 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2994 it is not empty.
2995
3aee8918
PA
29962013-06-07 Pedro Alves <palves@redhat.com>
2997
5f2b57b5 2998 PR server/14823
3aee8918
PA
2999 * Makefile.in (OBS): Add tdesc.o.
3000 (IPA_OBJS): Add tdesc-ipa.o.
3001 (tdesc-ipa.o): New rule.
3002 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3003 interface.
3004 * linux-low.c (new_inferior): Delete.
3005 (disabled_regsets, num_regsets): Delete.
3006 (linux_add_process): Adjust to set the new per-process
3007 new_inferior flag.
3008 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3009 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3010 was a stop. When calling arch_setup, switch the current inferior
3011 to the thread that got an event.
3012 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3013 (regsets_fetch_inferior_registers)
3014 (regsets_store_inferior_registers): New regsets_info parameter.
3015 Adjust to use it.
3016 (linux_register_in_regsets): New regs_info parameter. Adjust to
3017 use it.
3018 (register_addr, fetch_register, store_register): New usrregs_info
3019 parameter. Adjust to use it.
3020 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3021 parameter regs_info. Adjust to use it.
3022 (linux_fetch_registers): Get the current inferior's regs_info, and
3023 adjust to use it.
3024 (linux_store_registers): Ditto.
3025 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3026 (initialize_low): Don't initialize the target_regsets here. Call
3027 initialize_low_arch.
3028 * linux-low.h (target_regsets): Delete declaration.
3029 (struct regsets_info): New.
3030 (struct usrregs_info): New.
3031 (struct regs_info): New.
3032 (struct process_info_private) <new_inferior>: New field.
3033 (struct linux_target_ops): Delete the num_regs, regmap, and
3034 regset_bitmap fields. New field regs_info.
3035 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3036 * i387-fp.c (num_xmm_registers): Delete.
3037 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3038 calls to new interface.
3039 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3040 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3041 Infer the number of xmm registers from the regcache's target
3042 description.
3043 * i387-fp.h (num_xmm_registers): Delete.
3044 * inferiors.c (add_thread): Don't install the thread's regcache
3045 here.
3046 * proc-service.c (gregset_info): Fetch the current inferior's
3047 regs_info. Adjust to use it.
3048 * regcache.c: Include tdesc.h.
3049 (register_bytes, reg_defs, num_registers)
3050 (gdbserver_expedite_regs): Delete.
3051 (get_thread_regcache): If the thread doesn't have a regcache yet,
3052 create one, instead of aborting gdbserver.
3053 (regcache_invalidate_one): Rename to ...
3054 (regcache_invalidate_thread): ... this.
3055 (regcache_invalidate_one): New.
3056 (regcache_invalidate): Only invalidate registers of the current
3057 process.
3058 (init_register_cache): Add target_desc parameter, and use it.
3059 (new_register_cache): Ditto. Assert the target description has a
3060 non zero registers_size.
3061 (regcache_cpy): Add assertions. Adjust.
3062 (realloc_register_cache, set_register_cache): Delete.
3063 (registers_to_string, registers_from_string): Adjust.
3064 (find_register_by_name, find_regno, find_register_by_number)
3065 (register_cache_size): Add target_desc parameter, and use it.
3066 (free_register_cache_thread, free_register_cache_thread_one)
3067 (regcache_release, register_cache_size): New.
3068 (register_size): Add target_desc parameter, and use it.
3069 (register_data, supply_register, supply_register_zeroed)
3070 (supply_regblock, supply_register_by_name, collect_register)
3071 (collect_register_as_string, collect_register_by_name): Adjust.
3072 * regcache.h (struct target_desc): Forward declare.
3073 (struct regcache) <tdesc>: New field.
3074 (init_register_cache, new_register_cache): Add target_desc
3075 parameter.
3076 (regcache_invalidate_thread): Declare.
3077 (regcache_invalidate_one): Delete declaration.
3078 (regcache_release): Declare.
3079 (find_register_by_number, register_cache_size, register_size)
3080 (find_regno): Add target_desc parameter.
3081 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3082 declarations.
3083 * remote-utils.c: Include tdesc.h.
3084 (outreg, prepare_resume_reply): Adjust.
3085 * server.c: Include tdesc.h.
3086 (gdbserver_xmltarget): Delete declaration.
3087 (get_features_xml, process_serial_event): Adjust.
3088 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3089 declare.
3090 (struct process_info) <tdesc>: New field.
3091 (ipa_tdesc): Declare.
3092 * tdesc.c: New file.
3093 * tdesc.h: New file.
3094 * tracepoint.c: Include tdesc.h.
3095 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3096 (get_context_regcache): Adjust to pass ipa_tdesc down.
3097 (do_action_at_tracepoint): Adjust to get the register cache size
3098 from the context regcache's description.
3099 (traceframe_walk_blocks): Adjust to get the register cache size
3100 from the current trace frame's description.
3101 (traceframe_get_pc): Adjust to get current trace frame's
3102 description and pass it down.
3103 (gdb_collect): Adjust to get the register cache size from the
3104 IPA's description.
3105 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3106 (gdbserver_xmltarget): Delete.
3107 (initialize_low_tracepoint): Set the ipa's target description.
3108 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3109 (initialize_low_tracepoint): Set the ipa's target description.
3110 * linux-x86-low.c: Include tdesc.h.
3111 [__x86_64__] (is_64bit_tdesc): New.
3112 (ps_get_thread_area, x86_get_thread_area): Use it.
3113 (i386_cannot_store_register): Rename to ...
3114 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3115 (i386_cannot_fetch_register): Rename to ...
3116 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3117 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3118 to new interface.
3119 (target_regsets): Rename to ...
3120 (x86_regsets): ... this.
3121 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3122 interface.
3123 (x86_siginfo_fixup): Use is_64bit_tdesc.
3124 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3125 (tdesc_x32_avx_linux, tdesc_x32_linux)
3126 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3127 Declare.
3128 (x86_linux_update_xmltarget): Delete.
3129 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3130 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3131 (AMD64_LINUX_USER64_CS): New.
3132 (x86_linux_read_description): New, based on
3133 x86_linux_update_xmltarget.
3134 (same_process_callback): New.
3135 (x86_arch_setup_process_callback): New.
3136 (x86_linux_update_xmltarget): New.
3137 (x86_regsets_info): New.
3138 (amd64_linux_regs_info): New.
3139 (i386_linux_usrregs_info): New.
3140 (i386_linux_regs_info): New.
3141 (x86_linux_regs_info): New.
3142 (x86_arch_setup): Reimplement.
3143 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3144 (x86_emit_ops): Ditto.
3145 (the_low_target): Adjust. Install x86_linux_regs_info,
3146 x86_cannot_fetch_register, and x86_cannot_store_register.
3147 (initialize_low_arch): New.
3148 * linux-ia64-low.c (tdesc_ia64): Declare.
3149 (ia64_fetch_register): Adjust.
3150 (ia64_usrregs_info, regs_info): New globals.
3151 (ia64_regs_info): New function.
3152 (the_low_target): Adjust.
3153 (initialize_low_arch): New function.
3154 * linux-sparc-low.c (tdesc_sparc64): Declare.
3155 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3156 Adjust.
3157 (sparc_arch_setup): New function.
3158 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3159 (the_low_target): Adjust.
3160 (initialize_low_arch): New function.
3161 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3162 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3163 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3164 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3165 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3166 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3167 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3168 (tdesc_powerpc_isa205_vsx64l): Declare.
3169 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3170 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3171 (ppc_set_pc, ppc_get_hwcap): Adjust.
3172 (ppc_usrregs_info): Forward declare.
3173 (!__powerpc64__) ppc_regmap_adjusted: New global.
3174 (ppc_arch_setup): Adjust to the current process'es target
3175 description.
3176 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3177 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3178 (ppc_store_evrregset): Adjust.
3179 (target_regsets): Rename to ...
3180 (ppc_regsets): ... this, and make static.
3181 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3182 (ppc_regs_info): New function.
3183 (the_low_target): Adjust.
3184 (initialize_low_arch): New function.
3185 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3186 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3187 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3188 (tdesc_s390x_linux64v2): Declare.
3189 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3190 (s390_fill_gregset, s390_store_last_break): Adjust.
3191 (target_regsets): Rename to ...
3192 (s390_regsets): ... this, and make static.
3193 (s390_get_pc, s390_set_pc): Adjust.
3194 (s390_get_hwcap): New target_desc parameter, and use it.
3195 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3196 (s390_arch_setup): Adjust to set the current process'es target
3197 description. Don't adjust the regmap.
3198 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3199 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3200 (regs_info_3264): New globals.
3201 (s390_regs_info): New function.
3202 (the_low_target): Adjust.
3203 (initialize_low_arch): New function.
3204 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3205 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3206 [__mips64] (init_registers_mips_linux)
3207 (init_registers_mips_dsp_linux): Delete defines.
3208 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3209 (have_dsp): New global.
3210 (mips_read_description): New, based on mips_arch_setup.
3211 (mips_arch_setup): Reimplement.
3212 (get_usrregs_info): New function.
3213 (mips_cannot_fetch_register, mips_cannot_store_register)
3214 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3215 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3216 (target_regsets): Rename to ...
3217 (mips_regsets): ... this, and make static.
3218 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3219 (dsp_regs_info, regs_info): New globals.
3220 (mips_regs_info): New function.
3221 (the_low_target): Adjust.
3222 (initialize_low_arch): New function.
3223 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3224 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3225 Declare.
3226 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3227 (arm_read_description): New, with bits factored from
3228 arm_arch_setup.
3229 (arm_arch_setup): Reimplement.
3230 (target_regsets): Rename to ...
3231 (arm_regsets): ... this, and make static.
3232 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3233 (arm_regs_info): New function.
3234 (the_low_target): Adjust.
3235 (initialize_low_arch): New function.
3236 * linux-m68k-low.c (tdesc_m68k): Declare.
3237 (target_regsets): Rename to ...
3238 (m68k_regsets): ... this, and make static.
3239 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3240 (m68k_regs_info): New function.
3241 (m68k_arch_setup): New function.
3242 (the_low_target): Adjust.
3243 (initialize_low_arch): New function.
3244 * linux-sh-low.c (tdesc_sharch): Declare.
3245 (target_regsets): Rename to ...
3246 (sh_regsets): ... this, and make static.
3247 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3248 (sh_regs_info, sh_arch_setup): New functions.
3249 (the_low_target): Adjust.
3250 (initialize_low_arch): New function.
3251 * linux-bfin-low.c (tdesc_bfin): Declare.
3252 (bfin_arch_setup): New function.
3253 (bfin_usrregs_info, regs_info): New globals.
3254 (bfin_regs_info): New function.
3255 (the_low_target): Adjust.
3256 (initialize_low_arch): New function.
3257 * linux-cris-low.c (tdesc_cris): Declare.
3258 (cris_arch_setup): New function.
3259 (cris_usrregs_info, regs_info): New globals.
3260 (cris_regs_info): New function.
3261 (the_low_target): Adjust.
3262 (initialize_low_arch): New function.
3263 * linux-cris-low.c (tdesc_crisv32): Declare.
3264 (cris_arch_setup): New function.
3265 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3266 (cris_regs_info): New function.
3267 (the_low_target): Adjust.
3268 (initialize_low_arch): New function.
3269 * linux-m32r-low.c (tdesc_m32r): Declare.
3270 (m32r_arch_setup): New function.
3271 (m32r_usrregs_info, regs_info): New globals.
3272 (m32r_regs_info): Adjust.
3273 (initialize_low_arch): New function.
3274 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3275 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3276 (tic6x_usrregs_info): Forward declare.
3277 (tic6x_read_description): New function, based on ...
3278 (tic6x_arch_setup): ... this. Reimplement.
3279 (target_regsets): Rename to ...
3280 (tic6x_regsets): ... this, and make static.
3281 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3282 (tic6x_regs_info): New function.
3283 (the_low_target): Adjust.
3284 (initialize_low_arch): New function.
3285 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3286 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3287 (target_regsets): Rename to ...
3288 (xtensa_regsets): ... this, and make static.
3289 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3290 globals.
3291 (xtensa_arch_setup, xtensa_regs_info): New functions.
3292 (the_low_target): Adjust.
3293 (initialize_low_arch): New function.
3294 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3295 (nios2_arch_setup): Set the current process'es tdesc.
3296 (target_regsets): Rename to ...
3297 (nios2_regsets): ... this.
3298 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3299 (nios2_regs_info): New function.
3300 (the_low_target): Adjust.
3301 (initialize_low_arch): New function.
a261b8f5
PA
3302 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3303 (aarch64_arch_setup): Set the current process'es tdesc.
3304 (target_regsets): Rename to ...
3305 (aarch64_regsets): ... this.
3306 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3307 (aarch64_regs_info): New function.
3308 (the_low_target): Adjust.
3309 (initialize_low_arch): New function.
3aee8918
PA
3310 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3311 globals.
3312 (target_regsets): Rename to ...
3313 (tile_regsets): ... this.
3314 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3315 (tile_regs_info): New function.
3316 (tile_arch_setup): Set the current process'es tdesc.
3317 (the_low_target): Adjust.
3318 (initialize_low_arch): New function.
3319 * spu-low.c (tdesc_spu): Declare.
3320 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3321 * win32-arm-low.c (tdesc_arm): Declare.
3322 (arm_arch_setup): New function.
3323 (the_low_target): Install arm_arch_setup instead of
3324 init_registers_arm.
3325 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3326 (init_windows_x86): Rename to ...
3327 (i386_arch_setup): ... this. Set `win32_tdesc'.
3328 (the_low_target): Adjust.
3329 * win32-low.c (win32_tdesc): New global.
3330 (child_add_thread): Don't create the thread cache here.
3331 (do_initial_child_stuff): Set the new process'es tdesc.
3332 * win32-low.h (struct target_desc): Forward declare.
3333 (win32_tdesc): Declare.
3334 * lynx-i386-low.c (tdesc_i386): Declare global.
3335 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3336 * lynx-low.c (lynx_tdesc): New global.
3337 (lynx_add_process): Set the new process'es tdesc.
3338 * lynx-low.h (struct target_desc): Forward declare.
3339 (lynx_tdesc): Declare global.
3340 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3341 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3342 * nto-low.c (nto_tdesc): New global.
3343 (do_attach): Set the new process'es tdesc.
3344 * nto-low.h (struct target_desc): Forward declare.
3345 (nto_tdesc): Declare.
3346 * nto-x86-low.c (tdesc_i386): Declare.
3347 (nto_x86_arch_setup): Set `nto_tdesc'.
3348
b1fbec62
GB
33492013-06-04 Gary Benson <gbenson@redhat.com>
3350
3351 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3352 to qSupported response when appropriate.
3353 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3354 with nonzero-length annex.
3355 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3356 arguments supplied in annex.
3357
d1ec4ce7
DE
33582013-05-31 Doug Evans <dje@google.com>
3359
ac44adcb 3360 PR server/15594
d1ec4ce7
DE
3361 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3362 64 bits in 64-cross-32 environment.
3363
9b25f2d3
PA
33642013-05-28 Pedro Alves <palves@redhat.com>
3365
3366 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3367 (aarch64-without-fpu.c): Delete rule.
3368 * configure.srv (aarch64*-*-linux*): Remove references to
3369 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3370 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3371 declaration.
3372
6740dc9c
PA
33732013-05-24 Pedro Alves <palves@redhat.com>
3374
3375 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3376 instead of strchr/decode_address. Error if the range isn't split
3377 with a ','. Don't assume there's be a ':' in the action.
3378
c2d6af84
PA
33792013-05-23 Yao Qi <yao@codesourcery.com>
3380 Pedro Alves <palves@redhat.com>
3381
3382 * linux-low.c (lwp_in_step_range): New function.
3383 (linux_wait_1): If the thread was range stepping and stopped
3384 outside the stepping range, report the stop to GDB. Otherwise,
3385 continue stepping. Add range stepping debug output.
3386 (linux_set_resume_request): Copy the step range from the resume
3387 request to the lwp.
3388 (linux_supports_range_stepping): New.
3389 (linux_target_ops) <supports_range_stepping>: Set to
3390 linux_supports_range_stepping.
3391 * linux-low.h (struct linux_target_ops)
3392 <supports_range_stepping>: New field.
3393 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3394 * linux-x86-low.c (x86_supports_range_stepping): New.
3395 (the_low_target) <supports_range_stepping>: Set to
3396 x86_supports_range_stepping.
3397 * server.c (handle_v_cont): Handle 'r' action.
3398 (handle_v_requests): Append ";r" if the target supports range
3399 stepping.
3400 * target.h (struct thread_resume) <step_range_start,
3401 step_range_end>: New fields.
3402 (struct target_ops) <supports_range_stepping>:
3403 New field.
3404 (target_supports_range_stepping): New macro.
3405
58794e1a
JB
34062013-05-17 Joel Brobecker <brobecker@adacore.com>
3407
3408 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3409 confusion in comment.
3410
d631c5a7
JB
34112013-05-17 Joel Brobecker <brobecker@adacore.com>
3412
3413 * lynx-low.c (struct process_info_private): New type.
3414 (lynx_add_process): New function.
3415 (lynx_create_inferior, lynx_attach): Replace calls to
3416 add_process by calls to lynx_add_process.
3417 (lynx_resume): If PTID is null, then try using
3418 current_process()->private->last_wait_event_ptid.
3419 Add comments.
3420 (lynx_clear_inferiors): Delete. The contents of that function
3421 has been inlined in lynx_mourn;
3422 (lynx_wait_1): Save the ptid in the process's private data.
3423 (lynx_mourn): Free the process' private data. Replace call
3424 to lynx_clear_inferiors by call to clear_inferiors.
3425
96f7a20f
YQ
34262013-05-17 Yao Qi <yao@codesourcery.com>
3427
3428 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3429 the right place.
3430
db0dfaa0
LM
34312013-05-16 Luis Machado <lgustavo@codesourcery.com>
3432
3433 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3434 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3435 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3436 PT_TEXT_END_ADDR guards. Update comments.
3437 (linux_target_op) <read_offsets>: Conditionally define to
3438 linux_read_offsets if the target is UCLIBC and if it defines
3439 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3440
68f5f838
SL
34412013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3442 Andrew Jenner <andrew@codesourcery.com>
3443
3444 * Makefile.in (SFILES): Add linux-nios2-low.c.
3445 (clean): Add action to delete nios2-linux.c.
3446 (nios2-linux.c): New rule.
3447 * configure.srv: Add nios2*-*-linux*.
3448 * linux-nios2-low.c: New.
3449
1ebff1fd
HAQ
34502013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3451
3452 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3453
f6150862
HZ
34542013-04-25 Hui Zhu <hui@codesourcery.com>
3455
3456 PR gdb/15186
f6150862
HZ
3457 * ax.c (ax_printf): Add fflush.
3458
614c279d
TT
34592013-04-22 Tom Tromey <tromey@redhat.com>
3460
3461 * Makefile.in (SFILES): Add filestuff.c.
3462 (OBS): Add filestuff.o.
3463 (filestuff.o): New target.
3464 * config.in, configure: Rebuild.
3465 * configure.ac: Check for fdwalk, pipe2.
3466
7d4e5717
PA
34672013-04-17 Pedro Alves <palves@redhat.com>
3468
3469 * configure.ac (USE_THREAD_DB): Delete variable.
3470 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3471 Don't AC_SUBST USE_THREAD_DB.
3472 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3473 * config.in, configure: Regenerate.
3474
d5c93e41
PA
34752013-04-16 Pedro Alves <palves@redhat.com>
3476
3477 * linux-low.h (struct lwp_info) <thread_known>: Move under
3478 the USE_THREAD_DB #ifdef.
3479
04f5fe89
PA
34802013-04-16 Pedro Alves <palves@redhat.com>
3481
3482 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3483 (linux-low.o): Delete rule.
3484 * linux-low.h: Always include "gdb_thread_db.h" instead of
3485 conditionally including thread_db.h.
3486 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3487 HAVE_THREAD_DB_H.
3488
480b27bf
JK
34892013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3490
3491 * Makefile.in (install-only): Fix make install regression.
3492
43662968
JK
34932013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3494
3495 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3496 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3497 installation.
3498 * gdbserver.1: Remove.
3499
3e74e146
PA
35002013-03-22 Pedro Alves <palves@redhat.com>
3501
3502 * linux-low.c (handle_extended_wait): Don't call
3503 linux_enable_event_reporting.
3504
a8347a2a
TT
35052013-03-15 Tony Theodore <tonyt@logyst.com>
3506
3507 PR build/9098:
3508 * Makefile.in (SHELL): Use @SHELL@.
3509
eeb56fa7
SDJ
35102013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3511
3512 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3513 compiler warning.
3514
4fa7e2ff
JB
35152013-03-13 Joel Brobecker <brobecker@adacore.com>
3516
3517 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3518 Remove extraneous NULL element.
3519
8ddb1965
YQ
35202013-03-13 Yao Qi <yao@codesourcery.com>
3521
3522 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3523 'V' block in trace frame.
3524
9accd112
MM
35252013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3526
3527 * target.h (struct target_ops): Add btrace ops.
3528 (target_supports_btrace): New macro.
3529 (target_enable_btrace): New macro.
3530 (target_disable_btrace): New macro.
3531 (target_read_btrace): New macro.
3532 * gdbthread.h (struct thread_info): Add btrace field.
3533 * server.c: Include btrace-common.h.
3534 (handle_btrace_general_set): New function.
3535 (handle_btrace_enable): New function.
3536 (handle_btrace_disable): New function.
3537 (handle_general_set): Call handle_btrace_general_set.
3538 (handle_qxfer_btrace): New function.
3539 (struct qxfer qxfer_packets[]): Add btrace entry.
3540 * inferiors.c (remove_thread): Disable btrace.
3541 * linux-low: Include linux-btrace.h.
3542 (linux_low_enable_btrace): New function.
3543 (linux_low_read_btrace): New function.
3544 (linux_target_ops): Add btrace ops.
3545 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3546 Add srv_linux_btrace=yes.
3547 (x86_64-*-linux*): Add linux-btrace.o.
3548 Add srv_linux_btrace=yes.
3549 * configure.ac: Define HAVE_LINUX_BTRACE.
3550 * config.in: Regenerated.
3551 * configure: Regenerated.
3552
5cc22e4c
MM
35532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3554
3555 * server.c (handle_qxfer): Preserve error message if -3 is
3556 returned.
3557 (qxfer): Document the -3 return value.
3558
7c97f91e
MM
35592013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3560
3561 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3562 (linux_btrace_h): New variable.
3563 (linux-btrace.o): New rule.
3564
be9a119c 35652013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3566 Hafiz Abid Qadeer <abidh@codesourcery.com>
3567
3568 * tracepoint.c (trace_buffer_size): New global.
3569 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3570 (init_trace_buffer): Change to one-argument function. Allocate
3571 trace buffer memory.
3572 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3573 handle QTBuffer:size packet.
3574 (cmd_bigqtbuffer_size): New function.
3575 (initialize_tracepoint): Call init_trace_buffer with
3576 DEFAULT_TRACE_BUFFER_SIZE.
3577 * server.c (handle_query): Add QTBuffer:size in the
3578 supported packets.
3579
e64f7499
YQ
35802013-03-07 Yao Qi <yao@codesourcery.com>
3581
3582 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3583 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3584 of -1.
3585 (cmd_qtsp): Adjust condition. Do post increment.
3586 Set cur_action and cur_step_action back to 0.
3587
f0ae6fc3
PA
35882013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3589
3590 PR server/15236
3591 * linux-low.c (linux_write_memory): Return early success if LEN is
3592 zero.
3593
b5b0b0af
CV
35942013-03-05 Corinna Vinschen <vinschen@redhat.de>
3595
334ad4a8 3596 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3597
589bc927
TT
35982013-02-28 Tom Tromey <tromey@redhat.com>
3599
3600 * configure.ac: Invoke AC_SYS_LARGEFILE.
3601 * configure, config.in: Rebuild.
3602
dfe07582
CV
36032013-02-28 Corinna Vinschen <vinschen@redhat.com>
3604
3605 * win32-low.c: Throughout, fix format strings and casts of
3606 printf-like functions to avoid type related warnings on all
3607 platforms.
3608 (get_child_debug_event): Print dwDebugEventCode as hex since
3609 that's how it's usually documented.
3610
736cd585
YQ
36112013-02-28 Yao Qi <yao@codesourcery.com>
3612
3613 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3614 pulongest.
3615
e1f58301
JW
36162013-02-27 Jiong Wang <jiwang@tilera.com>
3617
3618 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3619 (reg-tilegx32.c): New rule.
3620 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3621 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3622 different register info initializer according to elf class.
3623 (init_registers_tilgx32): New function. The tilegx32 register info
3624 initializer.
3625 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3626 (tile_store_gregset): Likewise.
3627
d171ca78
YQ
36282013-02-27 Yao Qi <yao@codesourcery.com>
3629
3630 * server.c (process_point_options): Print debug message when
3631 debug_threads is true.
3632
282bbdf3
YQ
36332013-02-26 Yao Qi <yao@codesourcery.com>
3634
3635 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3636
aca22551
PA
36372013-02-19 Pedro Alves <palves@redhat.com>
3638 Kai Tietz <ktietz@redhat.com>
3639
3640 PR gdb/15161
3641
3642 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3643 instead of strtoul to extract address from packet.
3644 (process_serial_event) <'z'>: Likewise.
3645
4f3cee1c
YQ
36462013-02-18 Yao Qi <yao@codesourcery.com>
3647
3648 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3649
8e1d55a3
PA
36502013-02-14 Pedro Alves <palves@redhat.com>
3651
3652 Plug memory leak.
3653
3654 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3655 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3656
458820da
PA
36572013-02-14 Pedro Alves <palves@redhat.com>
3658
3659 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3660
baea0dae
PA
36612013-02-14 Pedro Alves <palves@redhat.com>
3662
3663 * tracepoint.c (save_string): Delete.
3664 (add_tracepoint_action): Use savestring instead of save_string.
3665
0b1afbb3
PA
36662013-02-12 Pedro Alves <palves@redhat.com>
3667
3668 * linux-xtensa-low.c: Ditto.
3669 * xtensa-xtregs.c: Ditto.
3670
8a4ac37e
PA
36712013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3672
3673 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3674 thread_db.
3675
148de6bb
MS
36762013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3677
3678 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3679 aarch64_num_wp_regs and aarch64_num_bp_regs to
3680 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3681
55fac6e0
MS
36822013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3683
3684 * linux-aarch64-low.c (ps_get_thread_area): Replace
3685 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3686
176eb98c
MS
36872013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3688 Marcus Shawcroft <marcus.shawcroft@arm.com>
3689 Nigel Stephens <nigel.stephens@arm.com>
3690 Yufeng Zhang <yufeng.zhang@arm.com>
3691
3692 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3693 (aarch64.c, aarch64-without-fpu.c): New targets.
3694 * configure.srv (aarch64*-*-linux*): New.
3695 * linux-aarch64-low.c: New file.
3696
56f7af9c
MS
36972013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3698
43aaf8b6 3699 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3700 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3701 (dequeue_one_deferred_signal, linux_resume_one_thread)
3702 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3703 (linux_tracefork_grandchild, linux_test_for_tracefork)
3704 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3705 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3706 where the argument is 0.
3707
60f662b0
YQ
37082013-01-25 Yao Qi <yao@codesourcery.com>
3709
3710 * event-loop.c: Include "queue.h".
3711 (gdb_event_p): New typedef.
3712 (struct gdb_event) <next_event>: Remove.
3713 (event_queue): Change to QUEUE(gdb_event_p).
3714 (async_queue_event): Remove.
3715 (gdb_event_xfree): New.
3716 (initialize_event_loop): New.
3717 (process_event): Use API from QUEUE.
3718 (wait_for_event): Likewise.
3719 * server.c (main): Call initialize_event_loop.
3720 * server.h (initialize_event_loop): Declare.
3721
5ae4861a
YQ
37222013-01-18 Yao Qi <yao@codesourcery.com>
3723
3724 * ax.h (struct eval_agent_expr_context): New.
3725 (gdb_eval_agent_expr): Update declaration.
3726 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3727 TFRAME. Add new argument CTX.
3728 * server.h (struct eval_agent_expr_context): Declare.
3729 (agent_mem_read, agent_tsv_read): Update declaration.
3730 (agent_mem_read_string): Likewise.
3731 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3732 (add_traceframe_block): Add new argument TPOINT.
3733 Increase TPOINT->traceframe_usage.
3734 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3735 eval_tracepoint_agent_expr.
3736 (condition_true_at_tracepoint): Likewise.
3737 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3738 (agent_mem_read_string, agent_tsv_read): Likewise.
3739
85e00e85
YQ
37402013-01-16 Yao Qi <yao@codesourcery.com>
3741
3742 * linux-low.c (linux_resume_one_lwp): Don't check
3743 'lwp->bp_reinsert != 0'.
3744
4039cf45
JB
37452013-01-07 Joel Brobecker <brobecker@adacore.com>
3746 Pedro Alves <palves@redhat.com>
3747
3748 * lynx-low.c (ptrace_request_to_str): Define a temporary
3749 macro and use it to simplify this function's implementation.
3750
9044dee2
JB
37512013-01-07 Joel Brobecker <brobecker@adacore.com>
3752
3753 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3754 sets errno.
3755
e6352c8f
JB
37562013-01-07 Joel Brobecker <brobecker@adacore.com>
3757
3758 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3759
50681a27
JB
37602013-01-07 Joel Brobecker <brobecker@adacore.com>
3761
3762 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3763
3f6e77ef
JB
37642013-01-07 Joel Brobecker <brobecker@adacore.com>
3765
3766 * lynx-low.c (lynx_resume): Use the resume_info parameter
3767 to determine the ptid for the lynx_ptrace call, unless
3768 it is equal to minus_one_ptid, in which case we use the
3769 ptid of the current_inferior.
3770 (lynx_wait_1): After having received a thread create/exit
3771 event, resume the inferior's execution using the signaling
3772 thread's ptid, rather than the old ptid.
3773
7fda33ae
JB
37742013-01-07 Joel Brobecker <brobecker@adacore.com>
3775
3776 * lynx-low.c (lynx_resume): Delete variable ret.
3777
b9786c74
JB
37782013-01-01 Joel Brobecker <brobecker@adacore.com>
3779
3780 * gdbreplay.c (gdbreplay_version): Update copyright year.
3781 * server.c (gdbserver_version): Likewise.
3782
8b93d60f
JB
37832012-12-17 Joel Brobecker <brobecker@adacore.com>
3784
3785 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3786 new thread.
3787
037335a7
JB
37882012-12-17 Joel Brobecker <brobecker@adacore.com>
3789
3790 * lynx-low.c (ptrace_request_to_str): Add handling for
3791 PTRACE_GETTRACESIG.
3792
52d4cbd8
JB
37932012-12-17 Joel Brobecker <brobecker@adacore.com>
3794
3795 * lynx-low.c (lynx_attach): Delete variable new_process.
3796
ab8f6ca9
JB
37972012-12-17 Joel Brobecker <brobecker@adacore.com>
3798
3799 * lynx-low.c (lynx_create_inferior): Delete variable
3800 new_process.
3801
78cbc024
JB
38022012-12-17 Joel Brobecker <brobecker@adacore.com>
3803
3804 * lynx-low.c (ptrace_request_to_str): Do not handle
3805 PTRACE_GETTHREADLIST if this macro does not exist.
3806
14a00470
YQ
38072012-12-15 Yao Qi <yao@codesourcery.com>
3808
3809 * Makefile.in (OBS): Add notif.o.
3810 * notif.c, notif.h: New.
3811 * server.c: Include "notif.h".
3812 (struct vstop_notif) <next>: Remove.
3813 <base>: New field.
3814 (queue_stop_reply): Update.
3815 (push_event, send_next_stop_reply): Remove.
3816 (discard_queued_stop_replies): Update.
3817 (notif_stop): New variable.
3818 (handle_v_stopped): Remove.
3819 (handle_v_requests): Don't call handle_v_stopped. Call
3820 handle_ack_notif instead.
3821 (queue_stop_reply_callback): Call notif_event_enque instead
3822 of queue_stop_reply.
3823 (handle_status): Don't call send_next_stop_reply, call
3824 notif_write_event instead.
3825 (kill_inferior_callback): Likewise.
3826 (detach_or_kill_inferior_callback): Likewise.
3827 (main): Call initialize_notif.
3828 (process_serial_event): Call QUEUE_is_empty.
3829 (handle_target_event): Call notif_push instead of push event.
3830 * server.h (push_event): Remove declaration.
3831
61c125b9
TT
38322012-12-10 Tom Tromey <tromey@redhat.com>
3833
3834 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3835 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3836 macros.
3837 (.c.o): Rewrite.
3838 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3839 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3840 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3841 (amd64-linux-ipa.o, ax.o): Rewrite.
3842 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3843 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3844 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3845 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3846 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3847 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3848 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3849 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3850 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3851 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3852 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3853 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3854 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3855 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3856 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3857 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3858 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3859 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3860 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3861 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3862 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3863 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3864 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3865 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3866 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3867 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3868 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3869 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3870 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3871 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3872 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3873 (reg-tilegx.o): Remove.
3874 (all_object_files): New macro.
3875 Include .deps files.
3876 * aclocal.m4, configure: Rebuild.
3877 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3878 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3879 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3880
e90e9ad9
TT
38812012-12-05 Tom Tromey <tromey@redhat.com>
3882
3883 PR gdb/14917:
3884 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3885
02d403bf 38862012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3887
3888 * configure.ac: Check for linux/perf_event.h.
3889 * config.in: Regenerated.
3890 * configure: Regenerated.
3891
0270a750
PA
38922012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3893
3894 * hostio.c (handle_readlink): Decrease buffer size
3895 parameter passed to readlink by one byte.
3896
8c29b58e
YQ
38972012-11-26 Yao Qi <yao@codesourcery.com>
3898
3899 * configure.ac (build_warnings): Append '-Wempty-body'.
3900 * configure: Regenerated.
3901 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3902 body.
3903
8bdce1ff
PM
39042012-11-15 Pierre Muller <muller@sourceware.org>
3905
3906 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3907 * config.in: Regenerate.
3908 * configure: Regenerate.
3909 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3910 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3911 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3912 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3913 header.
3914 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3915 instead of <sys/wait.h> header.
3916 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3917
02d403bf 39182012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3919
3920 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3921 (various make rules): Remove -DGDBSERVER
3922
fbd5db48
YQ
39232012-11-09 Yao Qi <yao@codesourcery.com>
3924
3925 * spu-low.c (current_ptid): Move it to ..
3926 * gdbthread.h: ... here. New.
3927 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3928 * server.c (myresume, process_serial_event): Likewise.
3929 * thread-db.c (thread_db_find_new_threads): Likewise.
3930 * tracepoint.c (run_inferior_command): Likewise.
3931
b3dc46ff
AB
39322012-10-01 Andrew Burgess <aburgess@broadcom.com>
3933
3934 * server.c (handle_search_memory_1): Include access length in
3935 warning message.
3936
07c04788
HPN
39372012-09-05 Michael Brandt <michael.brandt@axis.com>
3938
3939 * linux-crisv32-low.c: Fix compile errors.
3940
918d227b
YQ
39412012-09-04 Yao Qi <yao@codesourcery.com>
3942
3943 * tracepoint.c (cmd_qtsv): Adjust debug message.
3944 Don't check CUR_TPOINT.
3945
18c1b81a
YQ
39462012-08-28 Yao Qi <yao@codesourcery.com>
3947
3948 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3949 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3950 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3951 Remove declarations of xmalloc, xreallloc, xstrdup and
3952 freeargv.
3953 * Makefile.in (libiberty_h): New.
3954 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3955 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3956
dc82f37b
YQ
39572012-08-23 Yao Qi <yao@codesourcery.com>
3958
3959 * server.h: Remove declaration of 'xsnprintf'.
3960
406b1477
KS
39612012-08-22 Keith Seitz <keiths@redhat.com>
3962
3963 * server.h: Include build-gnulib-gbserver/config.h.
3964 * gdbreplay.c: Likewise.
3965
e6712ff1
DE
39662012-08-08 Doug Evans <dje@google.com>
3967
3968 * Makefile.in (SFILES): Add gdb_vecs.c.
3969 (OBS): Add gdb_vecs.o.
3970 (gdb_vecs_h, host_defs_h): New variables.
3971 (thread-db.o): Add $(gdb_vecs_h) dependency.
3972 (gdb_vecs.o): New rule.
3973 * thread-db.c: #include "gdb_vecs.h".
3974 (thread_db_load_search): Use a vector to iterate over path elements.
3975 Handle text appearing after "$pdir".
3976
3977 * configure.ac: Add check for strstr.
3978 * config.in: Regenerate.
3979 * configure: Regenerate.
3980
7c3270ae
UW
39812012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3982
3983 * hostio.c (handle_pread): If pread fails, fall back to attempting
3984 lseek/read.
3985 (handle_pwrite): Likewise for pwrite.
3986
b62e2b27
UW
39872012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3988
3989 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3990 between unsupported TYPE and unimplementable ADDR/LEN combination.
3991 (arm_insert_point): Act on new return value.
3992
78a99e91
PA
39932012-07-31 Pedro Alves <palves@redhat.com>
3994
3995 * server.c (process_point_options): Only skip tokens if we find
3996 one that is unrecognized. Don't treat 'X' specially while
3997 skipping unrecognized tokens.
3998
fcf303ab
UW
39992012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4000
4001 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4002 to 4-byte-align HW breakpoint addresses for Thumb.
4003
7255706c
YQ
40042012-07-27 Yao Qi <yao@codesourcery.com>
4005
4006 PR remote/14161.
4007
4008 * server.h: Declare gdb_agent_about_to_close.
4009 * target.c (kill_inferior): Include "agent.h".
4010 New. Send command 'kill'.
4011 * target.h (kill_inferior): Removed macro.
4012 * tracepoint.c (gdb_agent_about_to_close): New.
4013 (gdb_agent_helper_thread): Handle command 'close'.
4014 Wait endlessly until the inferior stops.
4015 Install gdb_agent_remove_socket to atexit hook.
4016 (agent_socket_name): New static variable.
4017 (gdb_agent_socket_init): Replace local variable 'name' with
4018 'agent_socket_name'.
4019 (gdb_agent_remove_socket): New.
4020
5a3f286f
YQ
40212012-07-27 Yao Qi <yao@codesourcery.com>
4022
4023 * server.c (process_point_options): Stop at 'X' when parsing.
4024
961bd387
ME
40252012-07-19 Michael Eager <eager@eagercon.com>
4026
a261b8f5 4027 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4028 to hw_execute.
4029 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4030 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4031 hardware breakpoint.
4032
aa7c7447
JK
40332012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4034
4035 * gdbserver/linux-low.c (initialize_low): Call
4036 linux_ptrace_init_warnings.
4037
7f216e7c
DE
40382012-07-02 Doug Evans <dje@google.com>
4039
4040 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4041 pointer to int.
4042
d3ce09f5
SS
40432012-07-02 Stan Shebs <stan@codesourcery.com>
4044
4045 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4046 (ax.o): Add it to build rule.
4047 (ax-ipa.o): Ditto.
4048 (OBS): Add format.o.
4049 (IPA_OBS): Add format.o.
4050 * server.c (handle_query): Claim support for breakpoint commands.
4051 (process_point_options): Add command case.
4052 (process_serial_event): Leave running if there are printfs in
4053 effect.
4054 * mem-break.h (any_persistent_commands): Declare.
4055 (add_breakpoint_commands): Declare.
4056 (gdb_no_commands_at_breakpoint): Declare.
4057 (run_breakpoint_commands): Declare.
4058 * mem-break.c (struct point_command_list): New struct.
4059 (struct breakpoint): New field command_list.
4060 (any_persistent_commands): New function.
4061 (add_commands_to_breakpoint): New function.
4062 (add_breakpoint_commands): New function.
4063 (gdb_no_commands_at_breakpoint): New function.
4064 (run_breakpoint_commands): New function.
4065 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4066 locally.
4067 * ax.c: Include format.h.
4068 (ax_printf): New function.
4069 (gdb_eval_agent_expr): Add printf opcode.
4070
2f8f6aed
YQ
40712012-06-13 Yao Qi <yao@codesourcery.com>
4072
4073 * server.c (start_inferior): Remove duplicated writes to fields
4074 'last_resume_kind' and 'last_status' of 'current_inferior'.
4075
0c9070b3
YQ
40762012-06-12 Yao Qi <yao@codesourcery.com>
4077 Pedro Alves <palves@redhat.com>
4078
4079 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4080 comment.
4081 * server.c (handle_v_cont): Extend comment.
4082
c52daf70
YQ
40832012-06-11 Yao Qi <yao@codesourcery.com>
4084
4085 * linux-low.c (linux_attach): Add 'static'.
4086
d38bbb0a
YQ
40872012-06-06 Yao Qi <yao@codesourcery.com>
4088
4089 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4090
89dc0afd
JK
40912012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4092
4093 Fix gcc -flto compilation warning.
4094 * server.c (main): Make variable multi_mode and attach volatile.
4095
75f62ce7
TJB
40962012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4097
4098 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4099 if the platform doesn't know about it.
4100
65f479b6
PA
41012012-05-30 Jeff Kenton <jkenton@tilera.com>
4102
4103 * Makefile.in (SFILES): Add linux-tile-low.c.
4104 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4105 * configure.srv: Handle tilegx-*-linux*.
4106 * linux-tile-low.c: New file.
4107
0c5bf5a9
JK
41082012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4109
4110 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4111
a493e3e2
PA
41122012-05-24 Pedro Alves <palves@redhat.com>
4113
4114 PR gdb/7205
4115
43aaf8b6 4116 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4117
2ea28649
PA
41182012-05-24 Pedro Alves <palves@redhat.com>
4119
4120 PR gdb/7205
4121
4122 Replace target_signal with gdb_signal throughout.
4123
8d409d16
MR
41242012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4125
4126 * linux-low.c (linux_store_registers): Avoid the copying sequence
4127 when no data has been retrieved by ptrace.
4128
23512c01
MGD
41292012-05-22 Will Deacon <will.deacon@arm.com>
4130
4131 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4132 Include asm/ptrace.h.
4133 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4134 already defined.
4135
4934b29e
MR
41362012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4137
4138 * linux-low.c (linux_store_registers): Don't re-retrieve data
4139 with ptrace that has already been obtained from /proc. Always
4140 copy any data retrieved with ptrace to the buffer supplied.
4141
bde24c0a
PA
41422012-05-11 Yao Qi <yao@codesourcery.com>
4143 Pedro Alves <palves@redhat.com>
4144
4145 * linux-low.c (enum stopping_threads_kind): New.
4146 (stopping_threads): Change type to `enum stopping_threads_kind'.
4147 (handle_extended_wait): If stopping and suspending threads, leave
4148 the new_lwp suspended too.
4149 (linux_wait_for_event): Adjust.
4150 (stop_all_lwps): Set `stopping_threads' to
4151 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4152 whether we're suspending threads or just stopping them. Assert no
4153 recursion happens.
4154
623b6bdf
YQ
41552012-04-29 Yao Qi <yao@codesourcery.com>
4156
4157 * server.h: Move some code to ...
4158 * gdbthread.h: ... here. New.
4159 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4160 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4161 (nto-low.o, win32-low.o): Likewise.
4162 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4163 * regcache.c, remote-utils.c, server.c: Likewise.
4164 * target.c, tracepoint.c, win32-low.c: Likewise.
4165
f15f9948
TJB
41662012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4167
4168 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4169 (PTRACE_ARG4_TYPE): Likewise.
4170 (PTRACE_XFER_TYPE): Likewise.
4171 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4172 ptrace to PTRACE_ARG3_TYPE.
4173 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4174 (PTRACE_ARG4_TYPE): Likewise.
4175 (PTRACE_XFER_TYPE): Likewise.
4176 (linux_detach_one_lwp): Cast fourth argument of
4177 ptrace to long then PTRACE_ARG4_TYPE.
4178 (regsets_fetch_inferior_registers): Cast third argument of
4179 ptrace to long then PTRACE_ARG3_TYPE.
4180 (regsets_store_inferior_registers): Likewise.
4181
38ea300a
PA
41822012-04-20 Pedro Alves <palves@redhat.com>
4183
4184 * configure: Regenerate.
4185
c971b7fa
PA
41862012-04-19 Pedro Alves <palves@redhat.com>
4187
43aaf8b6 4188 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4189 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4190 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4191 (all, install-only, uninstall, clean-info, all-lib, clean): No
4192 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4193 (maintainer-clean realclean distclean): Use subdir_do.
4194 (subdir_do): New.
4195 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4196 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4197 * acinclude.m4: Include acx_configure_dir.m4.
4198 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4199 calls. Call AC_PROG_RANLIB. Configure gnulib using
4200 ACX_CONFIGURE_DIR.
4201 (GNULIB): New.
4202 (GNULIB_STDINT_H): Adjust.
4203 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4204 * gdbreplay.c: Include build-gnulib/config.h.
4205 * server.h: Likewise.
4206 * aclocal.m4: Regenerate.
4207 * config.in: Regenerate.
4208 * configure: Regenerate.
c971b7fa 4209
809277f8
PA
42102012-04-19 Pedro Alves <palves@redhat.com>
4211
4212 * Makefile.in (LIBGNU, INCGNU): Adjust.
4213 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4214 (all, install-only, uninstall, clean-info, all-lib, clean)
4215 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4216 * configure.ac: Adjust AC_OUTPUT output.
4217 * aclocal.m4: Regenerate.
4218 * configure: Regenerate.
4219
fd9bb8b8
PA
42202012-04-19 Pedro Alves <palves@redhat.com>
4221
4222 * Makefile.in (generated_files): New.
4223 (server_h): Remove the explicit dependency on config.h, and depend
4224 on $generated_files.
4225
1c298c66
PA
42262012-04-19 Pedro Alves <palves@redhat.com>
4227
4228 * Makefile.in (INCGNU): Add -Ignulib.
4229
57c4b50b
PA
42302012-04-19 Pedro Alves <palves@redhat.com>
4231
4232 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4233 (INCGNU): ... this, and spell out -I here.
4234 (GNULIB_LIB): Rename to ...
4235 (LIBGNU): ... this.
4236 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4237
1030e047
PA
42382012-04-19 Pedro Alves <palves@redhat.com>
4239
4240 * config.in: Regenerate.
4241
447d4319
PA
42422012-04-19 Pedro Alves <palves@redhat.com>
4243
4244 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4245 * server.h (memmem): Remove declaration.
4246 * config.in: Regenerate.
4247 * configure: Regenerate.
4248
aad9eab9
YQ
42492012-04-19 Yao Qi <yao@codesourcery.com>
4250
4251 * Makefile.in (SFILES): Add common/vec.c.
4252 (OBS): Add vec.o.
4253 (vec.o): New rule.
4254
3e10640f
YQ
42552012-04-19 Yao Qi <yao@codesourcery.com>
4256
4257 * remote-utils.c (prepare_resume_reply): Replace with macro
4258 target_core_of_thread.
4259 * server.c (handle_qxfer_threads_proper): Likewise.
4260 * target.h (traget_core_of_thread): New macro.
4261
71622373
PA
42622012-04-18 Pedro Alves <palves@redhat.com>
4263
4264 * aclocal.m4: Regenerate.
4265 * configure: Regenerate.
4266
80d26939
YQ
42672012-04-16 Yao Qi <yao@codesourcery.com>
4268
4269 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4270 duplicated on address.
4271
42476b70
YQ
42722012-04-16 Yao Qi <yao@codesourcery.com>
4273
4274 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4275 (struct tracepoint_action_ops) <send>: New field.
4276 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4277 (agent_expr_send, x_tracepoint_action_send): New.
4278 (l_tracepoint_action_send): New.
4279 (cmd_qtdp): Download and install tracepoint
4280 according to `use_agent'.
4281 (run_inferior_command): Add one more parameter `len'.
4282 Update callers.
4283 (tracepoint_send_agent): New.
4284 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4285
7bc83639
YQ
42862012-04-16 Yao Qi <yao@codesourcery.com>
4287
4288 * tracepoint.c (download_tracepoints): Moved to ...
4289 (cmd_qtstart): ... here.
4290
5f18041e
YQ
42912012-04-14 Yao Qi <yao@codesourcery.com>
4292
4293 * tracepoint.c: Include inttypes.h.
4294 (struct collect_memory_action): Use sized types.
4295 (struct tracepoint): Likewise.
4296 (cmd_qtdp, stop_tracing): Update print specifiers.
4297 (cmd_qtp, response_tracepoint): Likewise.
4298 (collect_data_at_tracepoint): Likewise.
4299 (collect_data_at_step): Likewise.
4300
55a8c076
YQ
43012012-04-14 Yao Qi <yao@codesourcery.com>
4302
4303 Import gnulib module inttypes.
4304 * aclocal.m4, config.in, configure: Regenerated.
4305
dc750257
YQ
43062012-04-14 Yao Qi <yao@codesourcery.com>
4307
4308 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4309 Makefile and config.status at last.
4310
0ab5faf9
YQ
43112012-04-13 Yao Qi <yao@codesourcery.com>
4312
4313 * tracepoint.c: Include stdint.h unconditionally.
4314
18f5fd81
TJB
43152012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4316
4317 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4318 on BFD_HAVE_SYS_PROCFS_TYPE.
4319 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4320 * configure: Regenerate.
4321 * config.in: Likewise.
4322
4d47af5c
L
43232012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4324
4325 * Makefile.in (clean): Also remove x32.c x32-linux.c
4326 x32-avx.c x32-avx-linux.c.
4327 (x32.o): New target.
4328 (x32.c): Likewise.
4329 (x32-linux.o): Likewise.
4330 (x32-linux.c): Likewise.
4331 (x32-avx.o): Likewise.
4332 (x32-avx.c): Likewise.
4333 (x32-avx-linux.o): Likewise.
4334 (x32-avx-linux.c): Likewise.
4335
4336 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4337 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4338 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4339 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4340 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4341 i386/x32-avx-linux.xml.
4342
4343 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4344 (init_registers_x32_avx_linux): Likwise.
4345 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4346 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4347
ecedbe58
PA
43482012-04-13 Pedro Alves <palves@redhat.com>
4349
4350 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4351 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4352 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4353 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4354 the sub-make.
4355
c92b5177
L
43562012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4357
4358 * linux-x86-low.c (compat_x32_clock_t): New.
4359 (compat_x32_siginfo_t): Likewise.
4360 (compat_x32_siginfo_from_siginfo): Likewise.
4361 (siginfo_from_compat_x32_siginfo): Likewise.
4362 (linux_is_elf64): Likewise.
4363 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4364 and siginfo_from_compat_x32_siginfo for x32.
4365 (x86_arch_setup): Set linux_is_elf64.
4366
214d508e
L
43672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4368
4369 PR gdb/13969
4370 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4371 e_machine field.
4372 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4373 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4374 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4375 compatible with process.
4376
c9a1864a
YQ
43772012-04-12 Yao Qi <yao@codesourcery.com>
4378
4379 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4380 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4381 (install-only, install-info, clean): Handle sub dir gnulib.
4382 (all-lib, am--refresh): New targets.
4383 (memmem.o): Remove target.
4384 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4385 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4386 (AC_REPLACE_FUNCS): Remove memmem.
4387 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4388 (AC_OUTPUT): Generate Makefile in gnulib/.
4389 * aclocal.m4, config.in, configure: Regenerated.
4390
367ba2c2
MR
43912012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4392
4393 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4394
9d236627
PA
43952012-04-05 Pedro Alves <palves@redhat.com>
4396
4397 -Werror=strict-aliasing
4398
4399 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4400 pointer.
4401
111217b3
PA
44022012-04-04 Pedro Alves <palves@redhat.com>
4403
4404 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4405 (sparc_store_gregset_from_stack, sparc_store_gregset)
4406 (sparc_breakpoint_at): Fix formatting.
4407
8365dcf5
TJB
44082012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4409
4410 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4411 are available.
4412 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4413 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4414 * config.in: Regenerate.
4415 * configure: Likewise.
4416
689cc2ae
PA
44172012-03-29 Pedro Alves <palves@redhat.com>
4418
4419 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4420 Correct ptrace arguments.
4421
c14dfd32
PA
44222012-03-28 Pedro Alves <palves@redhat.com>
4423
4424 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4425 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4426 (IA64_FR1_REGNUM): New defines.
4427 (ia64_fetch_register): New.
4428 (the_low_target): Install it.
4429 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4430 field.
4431 * linux-low.c (linux_fetch_registers): Try the
4432 the_low_target.fetch_register hook first.
4433
4434 * linux-arm-low.c (the_low_target): Adjust.
4435 * linux-bfin-low.c (the_low_target): Adjust.
4436 * linux-cris-low.c (the_low_target): Adjust.
4437 * linux-crisv32-low.c (the_low_target): Adjust.
4438 * linux-m32r-low.c (the_low_target): Adjust.
4439 * linux-m68k-low.c (the_low_target): Adjust.
4440 * linux-mips-low.c (the_low_target): Adjust.
4441 * linux-ppc-low.c (the_low_target): Adjust.
4442 * linux-s390-low.c (the_low_target): Adjust.
4443 * linux-sh-low.c (the_low_target): Adjust.
4444 * linux-sparc-low.c (the_low_target): Adjust.
4445 * linux-tic6x-low.c (the_low_target): Adjust.
4446 * linux-x86-low.c (the_low_target): Adjust.
4447 * linux-xtensa-low.c (the_low_target): Adjust.
4448
63c88e13
PA
44492012-03-26 Pedro Alves <palves@redhat.com>
4450
4451 * server.c (handle_qxfer_libraries): Don't bail early if
4452 the_target->qxfer_libraries_svr4 is not NULL.
4453
fb723180
PA
44542012-03-26 Pedro Alves <palves@redhat.com>
4455
4456 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4457
0afae3cf
PA
44582012-03-23 Pedro Alves <palves@redhat.com>
4459
4460 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4461 "library-list-svr4" element's start tag when the the DSO list is
4462 empty.
4463
485f1ee4
PA
44642012-03-23 Pedro Alves <palves@redhat.com>
4465
4466 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4467 a variable whose type size is the same as the inferior's pointer
4468 size.
4469
a5362b9a
TS
44702012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4471
4472 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4473 struct siginfo.
4474 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4475 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4476 * linux-low.h: Include <signal.h>.
4477 (struct siginfo): Remove forward declaration.
4478 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4479 struct siginfo.
4480
d226c142
MF
44812012-03-21 Mike Frysinger <vapier@gentoo.org>
4482
4483 * .gitignore: Ignore more files.
4484
122f36ef
PA
44852012-03-19 Pedro Alves <palves@redhat.com>
4486 Jan Kratochvil <jan.kratochvil@redhat.com>
4487
4488 * server.c (cont_thread, general_thread): Add describing comments.
4489 (start_inferior): Clear `cont_thread'.
4490 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4491 of a process.
4492
fc3e5175
YQ
44932012-03-15 Yao Qi <yao@codesourcery.com>
4494
4495 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4496 handling to ...
4497 (cmd_qtdp): ... here.
4498
8d0d92cd
YQ
44992012-03-15 Yao Qi <yao@codesourcery.com>
4500
4501 * tracepoint.c (struct tracepoint_action_ops): New.
4502 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4503 (m_tracepoint_action_download): New.
4504 (r_tracepoint_action_download): New.
4505 (x_tracepoint_action_download): New.
4506 (l_tracepoint_action_download): New.
4507 (add_tracepoint_action): Install `action->ops' according type.
4508 (download_tracepoint_1): Move code `download' function pointer
4509 of various tracepoint_action_ops.
4510
87b0bb13
JK
45112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4512
4513 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4514 linux_ptrace_attach_warnings.
4515
5f572dec
JK
45162012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4517
4518 * Makefile.in (linux-ptrace.o): New.
4519 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4520 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4521 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4522 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4523 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4524 of these targets.
4525 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4526
f4647387
YQ
45272012-03-08 Yao Qi <yao@codesourcery.com>
4528 Pedro Alves <palves@redhat.com>
4529
4530 Fix PR server/13392.
4531 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4532 offset of JMP insn.
4533 * tracepoint.c (remove_tracepoint): New.
4534 (cmd_qtdp): Call remove_tracepoint when failed to install.
4535
9b224c5e
PA
45362012-03-07 Pedro Alves <palves@redhat.com>
4537
4538 * linux-low.c (get_detach_signal): New.
4539 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4540 Pass on pending signals to PTRACE_DETACH. Check the result of the
4541 ptrace call.
4542 * server.c (program_signals, program_signals_p): New.
4543 (handle_general_set): Handle QProgramSignals.
4544 * server.h (program_signals, program_signals_p): Declare.
4545
e237a7e2
JK
45462012-03-05 Pedro Alves <palves@redhat.com>
4547 Jan Kratochvil <jan.kratochvil@redhat.com>
4548
4549 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4550 New comment why.
4551
5808517f
YQ
45522012-03-03 Yao Qi <yao@codesourcery.com>
4553
4554 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4555 agent_look_up_symbols.
4556
58b4daa5
YQ
45572012-03-03 Yao Qi <yao@codesourcery.com>
4558
4559 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4560 (linux-x86-low.o): Likewise.
4561 * server.h: Remove in_process_agent_loaded.
4562 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4563 common/agent.c.
4564 Update callers.
4565
8ffcbaaf
YQ
45662012-03-03 Yao Qi <yao@codesourcery.com>
4567
4568 * tracepoint.c (gdb_agent_capability): New global.
4569 (in_process_agent_loaded_ust): Renamed to
4570 `in_process_agent_supports_ust'.
4571 Update callers.
4572 (in_process_agent_supports_ust): Call agent_capability_check.
4573 (clear_installed_tracepoints): Assert that agent supports
4574 agent.
4575
d1feda86
YQ
45762012-03-03 Yao Qi <yao@codesourcery.com>
4577
4578 * linux-low.c (linux_supports_agent): New.
4579 (linux_target_ops): Initialize field `supports_agent' with
4580 linux_supports_agent.
4581 * target.h (struct target_ops) <supports_agent>: New.
4582 (target_supports_agent): New macro.
4583 * server.c (handle_general_set): Handle packet 'QAgent'.
4584 (handle_query): Send `QAgent+'.
4585 * Makefile.in (server.o): Depends on agent.h.
4586
2fa291ac
YQ
45872012-03-03 Yao Qi <yao@codesourcery.com>
4588
4589 * Makefile.in (OBS): Add agent.o.
4590 Add new rule for agent.o.
4591 Track dependence of tracepoint.c on agent.h.
4592 * tracepoint.c (run_inferior_command_1):
4593 (run_inferior_command): Call agent_run_command.
4594 (gdb_ust_connect_sync_socket): Deleted. Move it to
4595 common/agent.c.
4596 (resume_thread, stop_thread): Likewise.
4597 (gdb_ust_socket_init): Renamed to ...
4598 (gdb_agent_socket_init): ... New.
4599 (gdb_ust_thread): Renamed to ...
4600 (gdb_agent_helper_thread): ... New.
4601 (gdb_ust_init): Move some code to ...
4602 (gdb_agent_init): ... here. New.
4603 [HAVE_UST]: Call gdb_ust_init.
4604 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4605 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4606 * config.in, configure: Regenerated.
4607
05044653
PA
46082012-03-02 Pedro Alves <palves@redhat.com>
4609
4610 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4611 * linux-low.c (struct simple_pid_list): New.
4612 (stopped_pids): New a struct simple_pid_list pointer.
4613 (add_to_pid_list, pull_pid_from_list): New.
4614 (handle_extended_wait): Don't assume the first signal new children
4615 report is SIGSTOP. Adjust call to pull_pid_from_list.
4616 (linux_wait_for_lwp): Adjust.
4617
8d00225b
YQ
46182012-03-02 Yao Qi <yao@codesourcery.com>
4619
4620 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4621 debug log.
4622
19560ba5
YQ
46232012-03-02 Yao Qi <yao@codesourcery.com>
4624
4625 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4626 `stop_pc' and `tpoint'. Update caller.
4627
1faeff08
MR
46282012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4629
4630 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4631 * linux-low.c (use_linux_regsets): New macro.
4632 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4633 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4634 (linux_register_in_regsets): New function.
4635 (usr_fetch_inferior_registers): Skip registers covered by
4636 regsets.
4637 (usr_store_inferior_registers): Likewise.
4638 (usr_fetch_inferior_registers): New macro.
4639 (usr_store_inferior_registers): Likewise.
4640 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4641 (linux_store_registers): Likewise.
4642 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4643 prototype.
4644 (init_registers_mips64_dsp_linux): Likewise.
4645 (init_registers_mips_linux): New macro.
4646 (init_registers_mips_dsp_linux): Likewise.
4647 (mips_dsp_num_regs): Likewise.
4648 (DSP_BASE, DSP_CONTROL): New fallback macros.
4649 (mips_base_regs): New macro.
4650 (mips_regmap): Use it. Fix the size.
4651 (mips_dsp_regmap): New variable.
4652 (mips_dsp_regset_bitmap): Likewise.
4653 (mips_arch_setup): New function.
4654 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4655 than mips_regmap.
4656 (mips_cannot_store_register): Likewise.
4657 (the_low_target): Update .arch_setup, .num_regs and .regmap
4658 initializers. Add .regset_bitmap initializer.
4659 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4660 initializer.
4661 * linux-bfin-low.c (the_low_target): Likewise.
4662 * linux-cris-low.c (the_low_target): Likewise.
4663 * linux-crisv32-low.c (the_low_target): Likewise.
4664 * linux-ia64-low.c (the_low_target): Likewise.
4665 * linux-m32r-low.c (the_low_target): Likewise.
4666 * linux-m68k-low.c (the_low_target): Likewise.
4667 * linux-ppc-low.c (the_low_target): Likewise.
4668 * linux-s390-low.c (the_low_target): Likewise.
4669 * linux-sh-low.c (the_low_target): Likewise.
4670 * linux-sparc-low.c (the_low_target): Likewise.
4671 * linux-tic6x-low.c (the_low_target): Likewise.
4672 * linux-x86-low.c (the_low_target): Likewise.
4673 * linux-xtensa-low.c (the_low_target): Likewise.
4674 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4675 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4676 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4677 srv_xmlfiles.
4678 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4679 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4680
c03e6ccc
YQ
46812012-02-29 Yao Qi <yao@codesourcery.com>
4682 Pedro Alves <palves@redhat.com>
4683
4684 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4685 `step_over_finished' is true.
4686
644cebc9
PA
46872012-02-27 Pedro Alves <palves@redhat.com>
4688
4689 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4690 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4691
c14d7ab2
PA
46922012-02-27 Pedro Alves <palves@redhat.com>
4693
4694 PR server/9684
4695 * linux-low.c (pid_is_stopped): New.
4696 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4697
412c89dd
LM
46982012-02-25 Luis Machado <lgustavo@codesourcery.com>
4699
4700 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4701 of conditions.
4702
b745defe
MR
47032012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4704
4705 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4706
9f3a5c85
LM
47072012-02-24 Luis Machado <lgustavo@codesourcery>
4708
4709 * server.c (handle_query): Advertise support for target-side
4710 breakpoint condition evaluation.
4711 (process_point_options): New function.
4712 (process_serial_event): When inserting a breakpoint, check for
4713 a target-side condition that should be evaluated.
4714
4715 * mem-break.c: Include regcache.h and ax.h.
4716 (point_cond_list_t): New data structure.
4717 (breakpoint) <cond_list>: New field.
4718 (find_gdb_breakpoint_at): Make non-static.
4719 (delete_gdb_breakpoint_at): Clear any target-side
4720 conditions.
4721 (clear_gdb_breakpoint_conditions): New function.
4722 (add_condition_to_breakpoint): Likewise.
4723 (add_breakpoint_condition): Likewise.
4724 (gdb_condition_true_at_breakpoint): Likewise.
4725 (gdb_breakpoint_here): Return result directly instead
4726 of going through a local variable.
4727
4728 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4729 (clear_gdb_breakpoint_conditions): Likewise.
4730 (add_breakpoint_condition): Likewise.
4731 (gdb_condition_true_at_breakpoint): Likewise.
4732
4733 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4734 (need_step_over_p): Take target-side breakpoint condition into
4735 consideration.
4736
5e1dc496
LM
47372012-02-24 Luis Machado <lgustavo@codesourcery>
4738
4739 * server.h: Include tracepoint.h.
4740 (agent_mem_read, agent_get_trace_state_variable_value,
4741 agent_set_trace_state_variable_value,
4742 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4743 get_set_tsv_func_addr): New prototypes.
4744
4745 * ax.h: New include file.
4746 * ax.c: New source file.
4747
4748 * tracepoint.c: Include ax.h.
4749 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4750 agent_expr, eval_result_type): Move to ax.h.
4751 (parse_agent_expr): Rename to ...
4752 (gdb_parse_agent_expr): ... this, make it non-static and move
4753 to ax.h.
4754 (unparse_agent_expr) Rename to ...
4755 (gdb_unparse_agent_expr): ... this, make it non-static and move
4756 to ax.h.
4757 (eval_agent_expr): Rename to ...
4758 (eval_tracepoint_agent_expr): ... this.
4759 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4760 forward declarations.
4761 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4762 (agent_get_trace_state_variable_value): New function.
4763 (agent_set_trace_state_variable_value): New function.
4764 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4765 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4766 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4767 (condition_true_at_tracepoint): Likewise.
4768 (parse_agent_expr): Rename to ...
4769 (gdb_parse_agent_expr): ... this and move to ax.c.
4770 (unparse_agent_expr): Rename to ...
4771 (gdb_unparse_agent_expr): ... this and move to ax.c.
4772 (gdb_agent_op_name): Move to ax.c.
4773 (eval_agent_expr): Rename to ...
4774 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4775 and move to ax.c.
4776 (eval_tracepoint_agent_expr): New function.
4777 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4778 non-static.
5e1dc496
LM
4779 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4780 ax.c.
4781 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4782 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4783 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4784 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4785 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4786 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4787 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4788 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4789 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4790 (compile_bytecodes): Remove forward declaration.
4791 (is_goto_target): Move to ax.c.
4792 (compile_bytecodes): Move to ax.c and call
4793 agent_get_trace_state_variable_value (...) and
4794 agent_set_trace_state_variable_value (...).
4795
4796 * Makefile.in: Update ax.c and IPA dependencies.
4797
277e4e52
PA
47982012-02-24 Pedro Alves <palves@redhat.com>
4799
4800 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4801 (cmd_bigqtbuffer_circular): ... this. Only handle
4802 'QTBuffer:circular:'.
4803 (handle_tracepoint_general_set): Adjust.
4804
bf4c19f7
YQ
48052012-02-16 Yao Qi <yao@codesourcery.com>
4806
4807 * inferiors.c: Move code to ...
4808 * dll.c: .... here. New.
4809 * server.h: Declare clear_dlls.
4810 * Makefile.in (SFILES): Add dll.c.
4811 (OBS): Add dll.o
4812 (dll.o): New rule.
4813
d73f2619
YQ
48142012-02-11 Yao Qi <yao@codesourcery.com>
4815
4816 * server.c: (handle_monitor_command): Add a new parameter
4817 `own_buf'.
4818 (handle_query): Update caller.
4819
f8255c2a
JB
48202012-02-09 Joel Brobecker <brobecker@adacore.com>
4821
4822 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4823 * configure, config.in: Regenerate.
4824 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4825 is not defined.
4826
da84f473
PA
48272012-02-02 Pedro Alves <palves@redhat.com>
4828
4829 Try SIGKILL first, then PTRACE_KILL.
4830 * linux-low.c (linux_kill_one_lwp): New.
4831 (linux_kill_one_lwp): Rename to ...
4832 (kill_one_lwp_callback): ... this. Use the new
4833 linux_kill_one_lwp.
4834
e886a173
PA
48352012-02-02 Pedro Alves <palves@redhat.com>
4836
4837 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4838 inferior.
4839
be07f1a2
PA
48402012-01-27 Pedro Alves <palves@redhat.com>
4841
4842 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4843 (elf_64_file_p): Make static.
4844 (linux_pid_exe_is_elf_64_file): New.
4845 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4846 Delete declarations.
4847 (linux_pid_exe_is_elf_64_file): Declare.
4848 * linux-x86-low.c (x86_arch_setup): Use
4849 linux_pid_exe_is_elf_64_file.
4850
d8301ad1
JK
48512012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4852
4853 * linux-low.c (linux_wait_for_event_1): Rename to ...
4854 (linux_wait_for_event): ... here and merge it with former
4855 linux_wait_for_event - new variable wait_ptid, use it.
4856 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4857
01b17894
PA
48582012-01-23 Pedro Alves <palves@redhat.com>
4859
4860 * server.c (main): Avoid yet another case of infinite loop while
4861 detaching/killing after a longjmp.
4862
e825046f
JK
48632012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4864
4865 Code cleanup.
4866 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4867
b9e7b9c3
UW
48682012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4869
4870 * hostio.c (handle_readlink): New function.
4871 (handle_vFile): Call it to handle "vFile:readlink" packets.
4872
901f9912
UW
48732012-01-20 Pedro Alves <palves@redhat.com>
4874 Ulrich Weigand <ulrich.weigand@linaro.org>
4875
4876 * server.c (handle_v_requests): Only support vAttach and vRun to
4877 start multiple processes when in extended protocol mode.
4878
fc1ab1a0
PA
48792012-01-17 Pedro Alves <palves@redhat.com>
4880
4881 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4882 memalign plus mprotect to allocate the scratch buffer.
4883
7d5d4e98
PA
48842012-01-13 Pedro Alves <palves@redhat.com>
4885
4886 * server.c (attach_inferior): Clear `cont_thread'.
4887
f128d5e9
PA
48882012-01-13 Pedro Alves <palves@redhat.com>
4889
4890 * server.c (main): Avoid infinite loop while detaching/killing
4891 after a longjmp.
4892
06db92f0
DE
48932012-01-09 Doug Evans <dje@google.com>
4894
4895 * server.c (start_inferior): Set last_ptid in --wrapper case.
4896
32d92999
YQ
48972012-01-06 Yao Qi <yao@codesourcery.com>
4898
4899 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4900 defined.
4901 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4902
5e0a92a9
YQ
49032012-01-04 Yao Qi <yao@codesourcery.com>
4904
4905 * tracepoint.c (cmd_qtdp): Print debug message
4906 for static tracepoint.
4907
ae639e8c
YQ
49082012-01-04 Yao Qi <yao@codesourcery.com>
4909
4910 * tracepoint.c (trace_vdebug): Differentiate debug message
4911 between gdbserver and IPA.
4912
f72429c5
YQ
49132012-01-03 Yao Qi <yao@codesourcery.com>
4914
4915 * tracepoint.c (tracepoint_was_hit): Don't collect for
4916 static tracepoint.
4917
12c3e59c
JB
49182012-01-02 Joel Brobecker <brobecker@adacore.com>
4919
4920 * terminal.h: Reformat copyright header.
4921
67827812
JB
49222012-01-02 Joel Brobecker <brobecker@adacore.com>
4923
4924 * server.c (gdbserver_version): Update copyright year.
4925 * gdbreplay.c (gdbreplay_version): Likewise.
4926
3e52c33d
JK
49272011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4928
4929 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4930
4931 Revert:
4932 2011-12-18 Hui Zhu <teawater@gmail.com>
4933 * linux-low.c (linux_create_inferior): Save return value to ret.
4934
66f1260e
HZ
49352011-12-18 Hui Zhu <teawater@gmail.com>
4936
4937 * linux-low.c (linux_create_inferior): Save return value to ret.
4938
e77616d7
DE
49392011-12-16 Doug Evans <dje@google.com>
4940
e7b06c57
DE
4941 * linux-low.c (linux_create_inferior): If stdio connection,
4942 redirect stdin from /dev/null, stdout to stderr.
4943 * remote-utils.c (remote_is_stdio): New static global.
4944 (remote_connection_is_stdio): New function.
4945 (remote_prepare): Handle stdio connection.
4946 (remote_open): Ditto.
4947 (remote_close): Don't close stdin for stdio connections.
4948 (read_prim,write_prim): New functions. Replace all calls to
4949 read/write to these.
4950 * server.c (main): Watch for "-" argument. Move call to
4951 remote_prepare before start_inferior.
4952 * server.h (STDIO_CONNECTION_NAME): New macro.
4953 (remote_connection_is_stdio): Declare.
4954
e77616d7
DE
4955 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4956 in debugging output.
4957
82067193
YQ
49582011-12-15 Yao Qi <yao@codesourcery.com>
4959
4960 * tracepoint.c: Include sys/syscall.h.
4961 (gdb_ust_thread): Remove preprocessor conditional.
4962
82bfbe7e
PA
49632011-12-14 Pedro Alves <pedro@codesourcery.com>
4964
4965 * linux-low.c (linux_detach_one_lwp): Call
4966 the_low_target.prepare_to_resume before detaching.
4967
712c6575
YQ
49682011-12-14 Yao Qi <yao@codesourcery.com>
4969
4970 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4971 of write.
4972
d54d1edf
YQ
49732011-12-14 Yao Qi <yao@codesourcery.com>
4974
4975 * i386-low.c (i386_low_stopped_data_address): Initialize local
4976 variable `control'.
4977
6210a125
PA
49782011-12-13 Pedro Alves <pedro@codesourcery.com>
4979
4980 PR remote/13492
4981
4982 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4983 DR_CONTROL unless necessary. Extend comments.
4984 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4985 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4986
2ece8244
YQ
49872011-12-13 Yao Qi <yao@codesourcery.com>
4988
4989 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4990 macros.
4991 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4992
784867a5
JK
49932011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4994
4995 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4996 Print new debug message for such case.
4997
6bf36717
JK
49982011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4999
5000 Fix overlapping memcpy.
5001 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5002 the read_inferior_memory transfer.
5003 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5004 write_inferior_memory transfer.
5005 (set_fast_tracepoint_jump): New variable buf. Use it for the
5006 read_inferior_memory and write_inferior_memory transfers.
5007 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5008 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5009 Use it for the write_inferior_memory transfer.
5010 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5011 buffers.
5012
50275556
MR
50132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5014
5015 * linux-low.c (fetch_register, store_register): Make code
5016 consistent, fix formatting.
5017
7325beb4
MR
50182011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5019
5020 * linux-low.c (usr_store_inferior_registers): Factor out code
5021 to handle individual registers into...
5022 (store_register): ... this new function.
5023
c642a434
UW
50242011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5025
5026 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5027 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5028 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5029 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5030 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5031 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5032 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5033 (srv_xmlfiles): Add new XML files.
5034
5035 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5036 and <sys/uio.h>.
5037 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5038 (init_registers_s390_linux32v1): Add prototype.
5039 (init_registers_s390_linux32v2): Likewise.
5040 (init_registers_s390_linux64v1): Likewise.
5041 (init_registers_s390_linux64v2): Likewise.
5042 (init_registers_s390x_linux64v1): Likewise.
5043 (init_registers_s390x_linux64v2): Likewise.
5044 (s390_num_regs): Increment to 52.
5045 (s390_regmap): Add orig_r2 register.
5046 (s390_num_regs_3264): Increment to 68.
5047 (s390_regmap_3264): Add orig_r2 register.
5048 (s390_collect_ptrace_register): Handle orig_r2 register.
5049 (s390_supply_ptrace_register): Likewise.
5050 (s390_fill_last_break): New function.
5051 (s390_store_last_break): Likewise.
5052 (s390_fill_system_call): New function.
5053 (s390_store_system_call): Likewise.
5054 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5055 register sets.
5056 (s390_check_regset): New function.
5057 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5058 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5059 Update target_regsets for available register sets.
5060
2268b414
JK
50612011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5062 Jan Kratochvil <jan.kratochvil@redhat.com>
5063
5064 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5065 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5066 New.
5067 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5068 * linux-low.h (struct process_info_private): New member r_debug.
5069 * server.c (handle_qxfer_libraries): Call
5070 the_target->qxfer_libraries_svr4.
5071 (handle_qxfer_libraries_svr4): New function.
5072 (qxfer_packets): New entry "libraries-svr4".
5073 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5074 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5075 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5076 PACKET_qXfer_libraries_svr4.
5077
d6db1fab
UW
50782011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5079
5080 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5081 PSW address/mask between 8-byte and 16-byte formats.
5082 (s390_supply_ptrace_register): Likewise.
5083 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5084 basic addressing mode bit.
5085
242f5f1c
SS
50862011-11-24 Stan Shebs <stan@codesourcery.com>
5087
5088 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5089
f196051f
SS
50902011-11-17 Stan Shebs <stan@codesourcery.com>
5091
5092 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5093 (tracing_start_time): New global.
5094 (tracing_stop_time): New global.
5095 (tracing_user_name): New global.
5096 (tracing_notes): New global.
5097 (tracing_stop_note): New global.
5098 (cmd_qtstart): Set traceframe_usage, start_time.
5099 (stop_tracing): Set stop_time.
5100 (cmd_qtstatus): Report additional status.
5101 (cmd_qtp): New function.
5102 (handle_tracepoint_query): Call it.
5103 (cmd_qtnotes): New function.
5104 (handle_tracepoint_general_set): Call it.
5105 (get_timestamp): Rename from tsv_get_timestamp.
5106
405f8e94
SS
51072011-11-14 Stan Shebs <stan@codesourcery.com>
5108 Kwok Cheung Yeung <kcy@codesourcery.com>
5109
5110 * linux-x86-low.c (small_jump_insn): New.
5111 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5112 trampoline and error message, build a trampoline and issue a small
5113 jump instruction to it.
5114 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5115 trampoline and error message.
5116 (x86_get_min_fast_tracepoint_insn_len): New.
5117 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5118 * linux-low.h (struct linux_target_ops): Add arguments to
5119 install_fast_tracepoint_jump_pad operation, add new operation.
5120 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5121 arguments.
5122 (linux_get_min_fast_tracepoint_insn_len): New function.
5123 (linux_target_op): Add new operation.
5124 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5125 (gdb_trampoline_buffer_end): Ditto.
5126 (gdb_trampoline_buffer_error): Ditto.
5127 (struct ipa_sym_addresses): Add fields for new IPA variables.
5128 (symbol_list): Add entries for new IPA variables.
5129 (struct tracepoint): Add fields to hold the address range of the
5130 trampoline used by the tracepoint.
5131 (trampoline_buffer_head): New static variable.
5132 (trampoline_buffer_tail): Ditto.
5133 (claim_trampoline_space): New function.
5134 (have_fast_tracepoint_trampoline_buffer): New function.
5135 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5136 structure.
5137 (install_fast_tracepoint): Ditto, also add error buffer argument.
5138 (cmd_qtminftpilen): New function.
5139 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5140 (fast_tracepoint_from_trampoline_address): New function.
5141 (fast_tracepoint_collecting): Handle trampoline as part of jump
5142 pad space.
5143 (set_trampoline_buffer_space): New function.
5144 (initialize_tracepoint): Initialize new IPA variables.
5145 * target.h (struct target_ops): Add arguments to
5146 install_fast_tracepoint_jump_pad operation, add new
5147 get_min_fast_tracepoint_insn_len operation.
5148 (target_get_min_fast_tracepoint_insn_len): New.
5149 (install_fast_tracepoint_jump_pad): Add arguments.
5150 * server.h (IPA_BUFSIZ): Define.
5151 * linux-i386-ipa.c: Include extra header files.
5152 (initialize_fast_tracepoint_trampoline_buffer): New function.
5153 (initialize_low_tracepoint): Call it.
5154 * server.h (set_trampoline_buffer_space): Declare.
5155 (claim_trampoline_space): Ditto.
5156 (have_fast_tracepoint_trampoline_buffer): Ditto.
5157
1e4d1764
YQ
51582011-11-14 Yao Qi <yao@codesourcery.com>
5159
5160 * server.c (handle_query): Handle InstallInTrace for qSupported.
5161 * tracepoint.c (add_tracepoint): Sort list.
5162 (install_tracepoint, download_tracepoint): New.
5163 (cmd_qtdp): Call them to install and download tracepoints.
5164 (sort_tracepoints): Removed.
5165 (cmd_qtstart): Update.
5166
5c73ff4e
YQ
51672011-11-14 Yao Qi <yao@codesourcery.com>
5168
5169 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5170 * mem-break.h: Declare.
5171 * tracepoint.c (cmd_qtstart): Move some code to ...
5172 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5173 New.
5174 (download_tracepoints): Move some code to ...
5175 (download_tracepoint_1): ... here. New.
5176
86a30030
YQ
51772011-11-08 Yao Qi <yao@codesourcery.com>
5178
5179 * remote-utils.c (relocate_instruction): A comment fix.
5180
8d26e50c
JB
51812011-11-07 Joel Brobecker <brobecker@adacore.com>
5182
5183 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5184 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5185 dr_status_mirror and dr_control_mirror from debug_reg_state.
5186 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5187 (i386_initial_stuff): Remove use of deleted globals.
5188 (i386_get_thread_context, i386_set_thread_context,
5189 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5190 from debug_reg_state.
5191
a59306a3
YQ
51922011-11-05 Yao Qi <yao@codesourcery.com>
5193
5194 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5195 address as TPOINT's.
5196
3065dfb6
SS
51972011-11-02 Stan Shebs <stan@codesourcery.com>
5198
5199 * tracepoint.c (agent_mem_read_string): New function.
5200 (eval_agent_expr): Call it for tracenz.
5201 * server.c (handle_query): Report support for tracenz.
5202
fd0d8c7c
YQ
52032011-11-02 Yao Qi <yao@codesourcery.com>
5204
5205 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5206
609086b1
YQ
52072011-11-02 Yao Qi <yao@codesourcery.com>
5208
5209 * target.h: Fix a typo in comment.
5210
b9fd1791
PA
52112011-10-31 Pedro Alves <pedro@codesourcery.com>
5212
5213 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5214 clobber the breakpoints' shadows with fast tracepoint jumps.
5215 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5216 * target.c (write_inferior_memory): Also pass MYADDR down to
5217 check_mem_write.
5218
03583c20
UW
52192011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5220
5221 * configure.ac: Check support for personality routine.
5222 * configure: Regenerate.
5223 * config.in: Likewise.
5224 * linux-low.c: Include <sys/personality.h>.
5225 Define ADDR_NO_RANDOMIZE if necessary.
5226 (linux_create_inferior): Disable address space randomization when
5227 forking inferior, if requested.
5228 (linux_supports_disable_randomization): New function.
5229 (linux_target_ops): Install it.
5230 * server.h (disable_randomization): Declare.
5231 * server.c (disable_randomization): New global variable.
5232 (handle_general_set): Handle QDisableRandomization.
5233 (handle_query): Likewise for qSupported.
5234 (main): Support --disable-randomization and --no-disable-randomization
5235 command line arguments.
5236 * target.h (struct target_ops): Add supports_disable_randomization.
5237 (target_supports_disable_randomization): New macro.
5238
723b724b
MF
52392011-09-29 Mike Frysinger <vapier@gentoo.org>
5240
5241 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5242 ifdef check.
5243 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5244 [!PT_GETDSBT] (target_loadmap): New definition.
5245 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5246 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5247 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5248 and PT_GETDSBT to LINUX_LOADMAP.
5249 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5250 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5251
55329a5c 52522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5253
5254 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5255 (arm_linux_hwbp_cap): New static variable.
5256 (arm_linux_get_hwbp_cap): Replace by ...
5257 (arm_linux_init_hwbp_cap): ... this new function.
5258 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5259 (arm_linux_get_hw_watchpoint_count): Likewise.
5260 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5261 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5262 (arm_prepare_to_resume): Use perror_with_name instead of error.
5263
55329a5c 52642011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5265
5266 * linux-arm-low.c: Include <signal.h>.
5267 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5268 (struct arm_linux_hwbp_cap): New data type.
5269 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5270 (struct arm_linux_hw_breakpoint): New data type.
5271 (MAX_BPTS, MAX_WPTS): Define.
5272 (struct arch_process_info, struct arch_lwp_info): New data types.
5273 (arm_linux_get_hwbp_cap): New function.
5274 (arm_linux_get_hw_breakpoint_count): Likewise.
5275 (arm_linux_get_hw_watchpoint_count): Likewise.
5276 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5277 (arm_hwbp_control_initialize): Likewise.
5278 (arm_hwbp_control_is_enabled): Likewise.
5279 (arm_hwbp_control_is_initialized): Likewise.
5280 (arm_hwbp_control_disable): Likewise.
5281 (arm_linux_hw_breakpoint_equal): Likewise.
5282 (arm_linux_hw_point_initialize): Likewise.
5283 (struct update_registers_data): New data structure.
5284 (update_registers_callback: New function.
5285 (arm_insert_point): Likewise.
5286 (arm_remove_point): Likewise.
5287 (arm_stopped_by_watchpoint): Likewise.
5288 (arm_stopped_data_address): Likewise.
5289 (arm_new_process): Likewise.
5290 (arm_new_thread): Likewise.
5291 (arm_prepare_to_resume): Likewise.
5292 (the_low_target): Register arm_insert_point, arm_remove_point,
5293 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5294 arm_new_thread, and arm_prepare_to_resume.
5295
6b9801d4
SS
52962011-09-15 Stan Shebs <stan@codesourcery.com>
5297
5298 * server.h (struct emit_ops): Add compare-goto fields.
5299 * tracepoint.c (gdb_agent_op_sizes): New table.
5300 (emit_eq_goto): New function.
5301 (emit_ne_goto): New function.
5302 (emit_lt_goto): New function.
5303 (emit_le_goto): New function.
5304 (emit_gt_goto): New function.
5305 (emit_ge_goto): New function.
5306 (is_goto_target): New function.
5307 (compile_bytecodes): Recognize special cases of compare-goto
5308 combinations and call specialized emitters for them.
5309 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5310 (amd64_emit_ne_goto): New function.
5311 (amd64_emit_lt_goto): New function.
5312 (amd64_emit_le_goto): New function.
5313 (amd64_emit_gt_goto): New function.
5314 (amd64_emit_ge_goto): New function.
5315 (amd64_emit_ops): Add the new functions.
5316 (i386_emit_eq_goto): New function.
5317 (i386_emit_ne_goto): New function.
5318 (i386_emit_lt_goto): New function.
5319 (i386_emit_le_goto): New function.
5320 (i386_emit_gt_goto): New function.
5321 (i386_emit_ge_goto): New function.
5322 (i386_emit_ops): Add the new functions.
5323
bf15cbda
SS
53242011-09-08 Stan Shebs <stan@codesourcery.com>
5325
5326 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5327 (i386_emit_epilogue): Restore %ebx.
5328
943ca1dd
JZ
53292011-08-31 Jie Zhang <jzhang918@gmail.com>
5330
5331 * server.c (step_thread): Remove definition.
5332 (process_serial_event): Don't handle Hs.
5333 * server.h (step_thread): Remove declaration.
5334 * target.c (set_desired_inferior): Remove use of step_thread.
5335
e3deef73
LM
53362011-08-24 Luis Machado <lgustavo@codesourcery.com>
5337
5338 * linux-low.c: Include linux-procfs.h.
5339 (linux_attach_lwp_1): Update comments.
5340 (linux_attach): Scan for existing threads when attaching to a
5341 process that is the tgid.
5342 * Makefile.in: Update dependencies.
5343
13da1c97
LM
53442011-08-24 Luis Machado <lgustavo@codesourcery.com>
5345
5346 * configure.srv: Add linux-procfs.o dependencies.
5347
881127c9
YQ
53482011-08-14 Yao Qi <yao@codesourcery.com>
5349
5350 * target.h (struct target_ops): Fix indent.
5351 * win32-low.c (win32_target_ops): Fix comment.
5352
58dbd541
YQ
53532011-08-14 Andrew Jenner <andrew@codesourcery.com>
5354 Yao Qi <yao@codesourcery.com>
5355
5356 * Makefile.in (clean): Remove tic6x-*.c files.
5357 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5358 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5359 (tic6x-c64xp-linux.c): Likewise.
5360 * configure.srv: Add support for tic6x-*-uclinux.
5361 * linux-tic6x-low.c: New.
5362 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5363
78d85199
YQ
53642011-08-14 Andrew Stubbs <ams@codesourcery.com>
5365 Yao Qi <yao@codesourcery.com>
5366
5367 * target.h (struct target_ops): Add read_loadmap.
5368 * linux-low.c (struct target_loadseg): New type.
5369 (struct target_loadmap): New type.
5370 (linux_read_loadmap): New function.
5371 (linux_target_ops): Add linux_read_loadmap.
5372 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5373 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5374 to NULL.
78d85199 5375
a959a88d
EZ
53762011-08-05 Eli Zaretskii <eliz@gnu.org>
5377
5378 * win32-low.c: Include <stdint.h>.
5379
1ced966e
PA
53802011-07-22 Pedro Alves <pedro@codesourcery.com>
5381
5382 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5383 to the inferior here.
5384 (i386_remove_aligned_watchpoint): Ditto.
5385 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5386 fit part of the watchpoint in the debug registers.
5387 (i386_update_inferior_debug_regs): New.
5388 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5389 registers, and only update the inferior on success.
5390 (i386_low_remove_watchpoint): Ditto.
5391
d26e3629
KY
53922011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5393
5394 * linux-low.c (compare_ints, unique, list_threads, show_process,
5395 linux_core_of_thread): Delete.
5396 (linux_target_ops): Change linux_core_of_thread to
5397 linux_common_core_of_thread.
5398 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5399 * utils.c (malloc_failure): Change type of argument.
5400 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5401 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5402 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5403 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5404 (IPA_OBJS): Add common-utils-ipa.o.
5405 (ptid_h, linux_osdata_h): New macros.
5406 (server_h): Add common/common-utils.h, common/xml-utils.h,
5407 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5408 common/ptid.h.
5409 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5410 ptid.o, buffer.o): New rules.
5411 (linux-low.o): Add common/linux-osdata.h as a dependency.
5412 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5413 * configure.ac: Add AC_HEADER_DIRENT check.
5414 * config.in: Regenerate.
5415 * configure: Regenerate.
5416 * remote-utils.c (xml_escape_text): Delete.
5417 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5418 buffer_xml_printf): Move to common/buffer.c.
5419 * server.c (main): Remove call to initialize_inferiors.
5420 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5421 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5422 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5423 internal_error, gdb_assert, gdb_assert_fail): Delete.
5424 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5425 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5426 common/buffer.h.
5427 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5428 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5429 initialize_inferiors): Delete.
5430
2275a1a7
PA
54312011-07-20 Pedro Alves <pedro@codesourcery.com>
5432
5433 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5434 symbol error.
5435
0a5b1e09
PA
54362011-05-31 Pedro Alves <pedro@codesourcery.com>
5437
5438 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5439 assertion.
5440 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5441
6938fd34
YQ
54422011-05-26 Yao Qi <yao@codesourcery.com>
5443
5444 * Makefile.in (thread-db.o): Track dependence to
5445 common/gdb_thread_db.h.
5446 * thread-db.c: include gdb_thread_db.h from right place.
5447
b481f9e0
TT
54482011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5449
5450 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5451 __FILE__ and __LINE__ to internal_error.
5452
98a5dd13
DE
54532011-05-13 Doug Evans <dje@google.com>
5454
5455 * thread-db.c (try_thread_db_load_from_sdir): New function.
5456 (try_thread_db_load_from_dir): New function.
5457 (thread_db_load_search): Handle $sdir, ignore $pdir.
5458 Remove trying of system directories if search of
5459 libthread-db-search-path fails, that is now done via $sdir.
5460
d248b706
KY
54612011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5462
5463 * server.c (handle_query): Add EnableDisableTracepoints to the list
5464 of supported features.
43aaf8b6 5465 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5466 tracepoints.
43aaf8b6
PA
5467 (cmd_qtenable_disable): New.
5468 (cmd_qtstart): Install tracepoints even if disabled.
5469 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5470 receiving a QTEnable or QTDisable packet.
5471 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5472 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5473 tracepoints.
5474 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5475
84e578fb
DE
54762011-05-10 Doug Evans <dje@google.com>
5477
5478 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5479
71f55dd8
DE
54802011-05-04 Doug Evans <dje@google.com>
5481
5482 * linux-low.c (linux_join): Skip process lookup.
5483 * spu-low.c (spu_join): Ditto.
5484 * server.c (join_inferiors_callback): Delete.
5485 (process_serial_event): For 'D' packet (detach) call join_inferior
5486 directly.
5487
4d393d60
JM
54882011-05-04 Joseph Myers <joseph@codesourcery.com>
5489
5490 * README: Don't mention xscale*-*-linux*.
5491 * configure.srv (xscale*-*-linux*): Don't handle target.
5492
b00ad6ff
NF
54932011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5494
5495 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5496 casting pointers.
5497 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5498 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5499 (i386_emit_void_call_2): Likewise.
5500
af96c192
YQ
55012011-04-26 Yao Qi <yao@codesourcery.com>
5502
43aaf8b6
PA
5503 * linux-low.c: Move common macros to linux-ptrace.h.
5504 Include linux-ptrace.h.
af96c192
YQ
5505 * Makefile.in (linux_ptrace_h): New.
5506 (linux-low.o): Depends on linux-ptrace.h.
5507
03f2bd59
JK
55082011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5509
5510 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5511 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5512 (remote_prepare): New function with most of the TCP code from ...
5513 (remote_open): ... here. Detect PORT here unconditionally. Move also
5514 setting transport_is_reliable.
5515 * server.c (run_once): New variable.
5516 (gdbserver_usage): Document it.
5517 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5518 the first run if RUN_ONCE.
5519 * server.h (run_once, remote_prepare): New declarations.
5520
7a9dd1b2
TT
55212011-04-19 Tom Tromey <tromey@redhat.com>
5522
5523 * win32-low.c (handle_load_dll): Remove duplicate "the".
5524
81239425
PM
55252011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5526
5527 Remove support for old Cygwin 1.5 versions.
5528 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5529 function to avoid warning.
5530 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5531 warning.
5532
9e0627f1
PM
55332011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5534
5535 * gdbserver/server.h (Macro _): Define it if not available.
5536
588eebee
MS
55372011-03-14 Michael Snyder <msnyder@vmware.com>
5538
348af9f7 5539 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5540
43f70d4c
JB
55412011-03-10 Joel Brobecker <brobecker@adacore.com>
5542
5543 * Makefile.in (maintainer-clean realclean distclean): Remove
5544 "make ... subdir_do" command.
5545
348af9f7
MS
55462011-03-10 Michael Snyder <msnyder@vmware.com>
5547
5548 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5549
5550 * server.c (handle_v_run): Free alloced buffer on early return.
5551
e637a4f5
YQ
55522011-03-09 Yao Qi <yao@codesourcery.com>
5553
5554 Revert:
5555 2011-03-04 Yao Qi <yao@codesourcery.com>
5556
5557 * Makefile.in: Remove GNU make feature --directory.
5558
5559 2011-03-05 Yao Qi <yao@codesourcery.com>
5560
5561 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5562 (subdir_do): New make target. Copied from gdb/Makefile.
5563 (maintainer-clean, realclean, distclean, clean): Call corresponding
5564 make targets in common/Makefile.
5565
5566 2011-02-11 Yao Qi <yao@codesourcery.com>
5567
5568 * configure.ac: Call AC_PROG_RANLIB.
5569 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5570 * configure: Regenerate.
5571
e6edda56
JK
55722011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5573
5574 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5575
e5141119
JB
55762011-03-06 Yao Qi <yao@codesourcery.com>
5577
5578 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5579
64794aa4
JB
55802011-03-05 Yao Qi <yao@codesourcery.com>
5581
5582 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5583 (subdir_do): New make target. Copied from gdb/Makefile.
5584 (maintainer-clean, realclean, distclean, clean): Call corresponding
5585 make targets in common/Makefile.
5586
7a762829
YQ
55872011-03-04 Yao Qi <yao@codesourcery.com>
5588
5589 * Makefile.in: Remove GNU make feature --directory.
5590
348af9f7
MS
55912011-03-04 Michael Snyder <msnyder@vmware.com>
5592
5593 * server.c (queue_stop_reply): Call xmalloc not malloc.
5594
55952011-03-02 Michael Snyder <msnyder@vmware.com>
5596
5597 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5598
9f72fee2
MS
55992011-02-28 Michael Snyder <msnyder@vmware.com>
5600
588eebee
MS
5601 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5602 (cmd_qtframe): Ditto.
5603 (cmd_qtbuffer): Ditto.
5604 (cmd_bigqtbuffer): Ditto.
5605
9f72fee2
MS
5606 * utils.c (decimal2str): Initialize 'width' to nine, then
5607 don't mess with it.
5608
8040bd49
UW
56092011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5610
5611 * hostio.c (require_data): Free *data, not data.
5612
7e52cbd0
JK
56132011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5614
5615 * hostio.c (require_data): Use free, not xfree.
5616
9130f83e
MS
56172011-02-27 Michael Snyder <msnyder@vmware.com>
5618
4b812f4e
MS
5619 * server.c (handle_query): Discard unused value.
5620
9130f83e
MS
5621 * hostio.c (require_data): Free malloc memory before returning
5622 error.
5623
69d37113
MS
56242011-02-26 Michael Snyder <msnyder@vmware.com>
5625
5626 * linux-low.c (list_threads): Call closedir for dirent.
5627
35f5825a
MS
56282011-02-27 Michael Snyder <msnyder@vmware.com>
5629
2a589cef
MS
5630 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5631 a case statement falls through.
5632
0adea5f7
MS
5633 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5634
35f5825a
MS
5635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5636 in comparison.
5637
238f1c74
MS
56382011-02-26 Michael Snyder <msnyder@vmware.com>
5639
5640 * utils.c (decimal2str): Eliminate dead code and dead param.
5641 (pulongest): Drop dead param from call to decimal2str.
5642 (plongest): Ditto.
5643
633ff500
JB
56442011-02-24 Joel Brobecker <brobecker@adacore.com>
5645
5646 Revert the following patch (not approved yet):
5647 2011-02-21 Hui Zhu <teawater@gmail.com>
5648 * tracepoint.c (tp_printf): New function.
5649 (eval_agent_expr): Handle gdb_agent_op_printf.
5650
f9c6ff72
HZ
56512011-02-21 Hui Zhu <teawater@gmail.com>
5652
5653 * tracepoint.c (tp_printf): New function.
5654 (eval_agent_expr): Handle gdb_agent_op_printf.
5655
94d5e490
TT
56562011-02-18 Tom Tromey <tromey@redhat.com>
5657
5658 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5659 (tracepoint.o): Likewise.
5660 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5661 (gdb_agent_op_names): Likewise.
5662
c7f96d2b
TT
56632011-02-18 Tom Tromey <tromey@redhat.com>
5664
5665 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5666 gdb_agent_op_rot>: New constants.
5667 (gdb_agent_op_names): Add pick and roll.
5668 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5669 cases.
5670
0feedb2c
JK
56712011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5672
5673 * aclocal.m4: Regenerated with aclocal-1.11.1.
5674
b3b9301e
PA
56752011-02-14 Pedro Alves <pedro@codesourcery.com>
5676
5677 * server.c (handle_qxfer_traceframe_info): New.
5678 (qxfer_packets): Register "traceframe-info".
5679 (handle_query): Report support for qXfer:traceframe-info:read+.
5680 * tracepoint.c (match_blocktype): New.
5681 (traceframe_find_block_type): Rename to ...
5682 (traceframe_walk_blocks): ... this. Add callback filter argument,
5683 and use it.
5684 (traceframe_find_block_type): New, reimplemented on top of
5685 traceframe_walk_blocks.
5686 (build_traceframe_info_xml): New.
5687 (traceframe_read_info): New.
5688 * server.h (traceframe_read_info): Declare.
5689
4f3e6fb7
YQ
56902011-02-11 Yao Qi <yao@codesourcery.com>
5691
5692 * configure.ac: Call AC_PROG_RANLIB.
5693 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5694 * configure: Regenerate.
5695
764880b7
PA
56962011-02-07 Pedro Alves <pedro@codesourcery.com>
5697
5698 * server.c (gdb_read_memory): Change return semantics to allow
5699 partial transfers.
5700 (handle_search_memory_1): Adjust.
5701 (process_serial_event) <'m' packet>: Handle partial transfers.
5702 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5703
1c79eb8a
PA
57042011-01-28 Pedro Alves <pedro@codesourcery.com>
5705
5706 * regcache.c (init_register_cache): Initialize
5707 regcache->register_status.
5708 (free_register_cache): Release regcache->register_status.
5709 (regcache_cpy): Copy register_status.
5710 (registers_to_string): Print 'x's for unavailable registers.
5711 (supply_register): Mark the register's status valid or
5712 unavailable, depending on whether a buffer was passed in or not.
5713 (supply_register_zeroed): New.
5714 (supply_regblock): Mark the registers' status valid or
5715 unavailable, depending on whether a buffer was passed in or not.
5716 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5717 (struct regcache): New `register_status' field.
5718 (supply_register_zeroed): Declare.
5719 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5720 supply_register_zeroed, rather than passing a NULL buffer to
5721 supply_register.
5722 * tracepoint.c (fetch_traceframe_registers): Update comment.
5723
85724a0e
PA
57242011-01-28 Pedro Alves <pedro@codesourcery.com>
5725
5726 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5727 buffer explicit.
5728
d08aafef
PA
57292011-01-25 Pedro Alves <pedro@codesourcery.com>
5730
5731 * server.h (decode_xfer_write): Change prototype.
5732 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5733 and don't extract the annex here.
5734 * server.c (decode_xfer_read): Remove `annex' parameter,
5735 and don't extract the annex here.
5736 (decode_xfer): New.
5737 (struct qxfer): New.
5738 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5739 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5740 (handle_qxfer_statictrace): New functions, abstracted out from
5741 handle_query, and made to use the struct qxfer interface.
5742 (handle_threads_qxfer_proper): Rename to ...
5743 (handle_qxfer_threads_proper): ... this.
5744 (handle_threads_qxfer): Rename to ...
5745 (handle_qxfer_threads): ... this. Adjust.
5746 (qxfer_packets): New array.
5747 (handle_qxfer): New function.
5748 (handle_query): Use handle_qxfer.
5749
493e2a69
MS
57502011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5751
5752 * gdbreplay.c: Shorten lines of >= 80 columns.
5753 * linux-low.c: Ditto.
5754 * linux-ppc-low.c: Ditto.
5755 * linux-s390-low.c: Ditto.
5756 * linux-sparc-low.c: Ditto.
5757 * linux-x86-low.c: Ditto.
5758 * linux-xtensa-low.c: Ditto.
5759 * mem-break.c: Ditto.
5760 * nto-low.c: Ditto.
5761 * regcache.h: Ditto.
5762 * remote-utils.c: Ditto.
5763 * server.c: Ditto.
5764 * server.h: Ditto.
5765 * thread-db.c: Ditto.
5766 * tracepoint.c: Ditto.
5767 * utils.c: Ditto.
5768 * win32-low.h: Ditto.
5769
44944448
JB
57702011-01-05 Joel Brobecker <brobecker@adacore.com>
5771
5772 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5773 update.
5774
71ce852c
JB
57752011-01-01 Joel Brobecker <brobecker@adacore.com>
5776
5777 * server.c (gdbserver_version): Update copyright year in version
5778 output.
5779 * gdbreplay.c (gdbreplay_version): Ditto.
5780
eb826dc6
MF
57812010-12-29 Jie Zhang <jie.zhang@analog.com>
5782
5783 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5784 * linux-bfin-low.c: New file.
5785 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5786 PT_DATA_ADDR for BFIN targets.
5787 * Makefile.in (SFILES): Add linux-bfin-low.c.
5788 (clean): Remove reg-bfin.c.
5789 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5790 * README: Mention supported Blackfin targets.
5791
39ab222a
MF
57922010-12-23 Mike Frysinger <vapier@gentoo.org>
5793
5794 * .gitignore: New file.
5795
a1f2ce7d
MF
57962010-11-16 Mike Frysinger <vapier@gentoo.org>
5797
5798 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5799
f474844c
JZ
58002010-10-22 Jie Zhang <jie@codesourcery.com>
5801
5802 * Makefile.in: Add FLAGS_TO_PASS variable.
5803 (install): Remove dependency of install-only and recursively
5804 invoke make for install-only.
5805
f1048712
DE
58062010-10-04 Doug Evans <dje@google.com>
5807
5808 * Makefile.in (uninstall): Use $(DESTDIR).
5809
b53a1623
PA
58102010-09-24 Pedro Alves <pedro@codesourcery.com>
5811
e6ee044d
PA
5812 PR gdb/11842
5813
b53a1623
PA
5814 * linux-x86-low.c (compat_siginfo_from_siginfo)
5815 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5816 si_code is < 0. Check for si_code == SI_TIMER before checking for
5817 si_code < 0.
5818
fa1bd1e4
JB
58192010-09-13 Joel Brobecker <brobecker@adacore.com>
5820
5821 * lynx-i386-low.c: New file.
5822 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5823
47fac8f8
JB
58242010-09-13 Joel Brobecker <brobecker@adacore.com>
5825
5826 * lynx-low.c (ptrace_request_to_str): Remove handling for
5827 request values that have been removed in LynxOS 5.x.
5828
1adfc54d
JB
58292010-09-13 Joel Brobecker <brobecker@adacore.com>
5830
5831 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5832 <ptrace.h>
5833
c2a66c29
NS
58342010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5835
5836 * configure.ac: Add --enable-inprocess-agent option.
5837 * configure: Rebuilt.
5838
32fcada3
YQ
58392010-09-06 Yao Qi <yao@codesourcery.com>
5840
5841 * linux-low.c (linux_kill): Remove unused variable.
5842 (linux_stabilize_threads): Likewise.
5843 * server.c (start_inferior): Likewise.
5844 (queue_stop_reply_callback): Likewise.
5845 * tracepoint.c (do_action_at_tracepoint): Likewise.
5846
0cccb683
YQ
58472010-09-06 Yao Qi <yao@codesourcery.com>
5848
5849 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5850 on return.
5851
423ec54c
JK
58522010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5853
5854 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5855
12ac6819
PA
58562010-09-06 Pedro Alves <pedro@codesourcery.com>
5857
5858 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5859 "$(IPA_DEPFILES)".
5860
8ed54b31
JB
58612010-09-01 Joel Brobecker <brobecker@adacore.com>
5862
5863 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5864 gdbserver/lynx-ppc-low.c: New files.
5865 * Makefile.in (lynx_low_h): New variable.
5866 (lynx-low.o, lynx-ppc-low.o): New rules.
5867 * configure.ac: On LynxOS, link with -lnetinet.
5868 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5869 * configure: regenerate.
5870
bb0116a4
JB
58712010-09-01 Joel Brobecker <brobecker@adacore.com>
5872
5873 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5874 * configure.ac: Add check for vasprintf and vsnprintf.
5875 * configure, config.in: Regenerate.
5876 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5877
a778ab81 58782010-09-01 Joel Brobecker <brobecker@adacore.com>
5879
5880 * gdbreplay.c: Move include of alloca.h up, next to include of
5881 malloc.h.
5882 * server.h: Add include of malloc.h.
5883 * mem-break.c: Remove include of malloc.h.
5884 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5885
8b034a19 58862010-09-01 Joel Brobecker <brobecker@adacore.com>
5887
5888 * Makefile.in (memmem.o): Build with -Wno-error.
5889
58902010-09-01 Joel Brobecker <brobecker@adacore.com>
5891
5892 * utils.c (xsnprintf): Make non-static.
5893 * server.h: Add xsnprintf declaration.
5894 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5895 replace calls to snprintf by calls to xsnprintf throughout.
5896
58972010-09-01 Joel Brobecker <brobecker@adacore.com>
5898
5899 * configure.ac: Add configure check for alloca.
5900 * configure, config.in: Regenerate.
5901 * server.h: Include alloca.h if it exists.
5902 * gdbreplay.c: Include alloca.h if it exists.
5903
1a981360
PA
59042010-08-28 Pedro Alves <pedro@codesourcery.com>
5905
5906 * linux-low.c (__SIGRTMIN): Define if not already defined.
5907 (linux_create_inferior): Check for __ANDROID__ rather than
5908 __SIGRTMIN.
5909 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5910 are already deferred.
5911 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5912 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5913 stopped and already has a pending signal to report.
5914 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5915 a pending signal to report or is moving out of a jump pad.
5916 (linux_init_signals): Check for __ANDROID__ rather than
5917 __SIGRTMIN.
5918
b4d51a55
PA
59192010-08-28 Pedro Alves <pedro@codesourcery.com>
5920
5921 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5922 debug_threads check. Avoid a linear search when not doing debug
5923 output.
5924
ec48365d
PA
59252010-08-27 Pedro Alves <pedro@codesourcery.com>
5926
5927 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5928 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5929 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5930 (process_event): Change local fd's type to gdb_fildes_t.
5931 (create_file_handler): Adjust prototype.
5932 (delete_file_handler): Adjust prototype.
5933 (handle_file_event): Adjust prototype. Use pfildes.
5934 (create_file_event): Adjsut prototype.
5935 * remote-utils.c (remote_desc, listen_desc): Change type to
5936 gdb_fildes_t.
5937 * server.h: New gdb_fildes_t typedef.
5938 [USE_WIN32API]: Include winsock2.h.
5939 (delete_file_handler, add_file_handler): Adjust prototypes.
5940 (pfildes): Declare.
5941 * utils.c (pfildes): New.
5942
854d88f0
PA
59432010-08-27 Pedro Alves <pedro@codesourcery.com>
5944
5945 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5946 * configure: Regenerate.
5947
0146f85b
PA
59482010-08-27 Pedro Alves <pedro@codesourcery.com>
5949
5950 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5951 (linux_done_accessing_memory): ... this.
5952 (linux_target_ops): Adjust.
5953 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5954 * nto-low.c (nto_target_ops): Adjust comment.
5955 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5956 * spu-low.c (spu_target_ops): Adjust comment.
5957 * target.h (target_ops): Rename unprepare_to_access_memory field
5958 to done_accessing_memory.
5959 (unprepare_to_access_memory): Rename to ...
5960 (done_accessing_memory): ... this.
5961
90d74c30
PA
59622010-08-26 Pedro Alves <pedro@codesourcery.com>
5963
5964 * linux-low.c (linux_prepare_to_access_memory): New.
5965 (linux_unprepare_to_access_memory): New.
5966 (linux_target_ops): Install them.
5967 * server.c (read_memory): Rename to ...
5968 (gdb_read_memory): ... this. Use
5969 prepare_to_access_memory/prepare_to_access_memory.
5970 (write_memory): Rename to ...
5971 (gdb_write_memory): ... this. Use
5972 prepare_to_access_memory/prepare_to_access_memory.
5973 (handle_search_memory_1): Adjust.
5974 (process_serial_event): Adjust.
5975 * target.h (struct target_ops): New fields
5976 prepare_to_access_memory and unprepare_to_access_memory.
5977 (prepare_to_access_memory, unprepare_to_access_memory): New.
5978 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5979 prepare_to_access_memory/prepare_to_access_memory.
5980 * nto-low.c (nto_target_ops): Adjust.
5981 * spu-low.c (spu_target_ops): Adjust.
5982 * win32-low.c (win32_target_ops): Adjust.
5983
fd467969
PA
59842010-08-26 Pedro Alves <pedro@codesourcery.com>
5985
5986 * Makefile.in (WARN_CFLAGS): Get it from configure.
5987 (WERROR_CFLAGS): New.
5988 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5989 * configure.ac: Introduce --enable-werror, which adds -Werror to
5990 the compiler command line. Enabled by default. Disable with
5991 --disable-werror. Add -Wdeclaration-after-statement
5992 Wpointer-arith and -Wformat-nonliteral to warning flags.
5993 * configure: Regenerate.
5994
331e2f5f
PA
59952010-08-26 Pedro Alves <pedro@codesourcery.com>
5996
5997 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5998
e581f2b4
PA
59992010-08-26 Pedro Alves <pedro@codesourcery.com>
6000
6001 * gdbreplay.c (remote_error): New.
6002 (gdbchar): New.
6003 (expect): Use gdbchar. Check for error reading from GDB.
6004 Clarify sync error output.
6005 (play): Check for errors writing to GDB.
6006 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6007 * remote-utils.c (getpkt): Check for errors writing to the remote
6008 descriptor.
6009
3c11dd79
PA
60102010-08-25 Pedro Alves <pedro@codesourcery.com>
6011
6012 * linux-low.c (linux_wait_1): Move non-debugging code out of
6013 `debug_threads' control.
6014
d20a8ad9
PA
60152010-08-25 Pedro Alves <pedro@codesourcery.com>
6016
6017 * linux-low.c (linux_wait_1): Don't set last_status here.
6018 * server.c (push_event, queue_stop_reply_callback): Assert we're
6019 not pushing a TARGET_WAITKIND_IGNORE event.
6020 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6021 (myresume, handle_target_event): Set the thread's last_resume_kind
6022 and last_status from the target returned status.
6023
964e4306
PA
60242010-08-25 Pedro Alves <pedro@codesourcery.com>
6025
6026 PR threads/10729
6027
6028 * linux-x86-low.c (update_debug_registers_callback): New.
6029 (i386_dr_low_set_addr): Use it.
6030 (i386_dr_low_get_addr): New.
6031 (i386_dr_low_set_control): Use update_debug_registers_callback.
6032 (i386_dr_low_get_control): New.
6033 (i386_dr_low_get_status): Adjust.
6034 * linux-low.c (linux_stop_lwp): New.
6035 * linux-low.h (linux_stop_lwp): Declare.
6036
6037 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6038 argument instead of a i386_debug_reg_state.
6039 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6040 a i386_debug_reg_state.
6041 (i386_insert_aligned_watchpoint): Adjust.
6042 (i386_remove_aligned_watchpoint): Adjust.
6043 (i386_low_stopped_data_address): Read the debug registers from the
6044 inferior instead of from the mirrors.
6045 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6046 (i386_dr_low_get_addr): Declare.
6047 (i386_dr_low_get_control): Declare.
6048 (i386_dr_low_get_status): Change prototype.
6049
6050 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6051 (i386_dr_low_get_addr): New.
6052 (i386_dr_low_get_control): New.
6053 (i386_dr_low_get_status): Adjust prototype. Return
6054 dr_status_mirror.
6055 (i386_initial_stuff): Clear dr_status_mirror and
6056 dr_control_mirror.
6057 (i386_get_thread_context): Adjust.
6058 (i386_set_thread_context): Adjust.
6059 (i386_thread_added): Adjust.
6060
5f21a75b
PA
60612010-08-24 Pedro Alves <pedro@codesourcery.com>
6062
6063 * linux-low.h (linux_thread_area): Delete declaration.
6064
3e4c1235
TS
60652010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6066
6067 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6068 after its termination.
6069
1971b033
PA
60702010-08-09 Pedro Alves <pedro@codesourcery.com>
6071
6072 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6073 (gdb_wants_all_stopped): Delete.
6074 (linux_wait_1): Don't call them.
6075 * server.c (handle_v_cont): Tag all threads as want-stopped.
6076 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6077 stopped as "client-wants-stopped".
6078
310444ac
PA
60792010-07-31 Pedro Alves <pedro@codesourcery.com>
6080
6081 * Makefile.in (signals_h): New.
6082 (server_h): Depend on it.
6083 (server.o): Don't depend on $(signals_def).
6084 (signals.o): Depend on $(signals_def).
6085
a19cae16
JK
60862010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6087
6088 * Makefile.in (signals_def): New.
6089 (server_h): Append include/gdb/signals.h and signals_def.
6090 (server.o): Append signals_def.
6091
30d50328
JK
60922010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6093
6094 * server.c (handle_target_event): Use target_signal_to_host for
6095 resume_info.sig initialization.
6096 * target.h (struct thread_resume) <sig>: New comment.
6097
5c3216e2
OS
60982010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6099
c6f46ca0
OS
6100 * server.c (handle_query): strcpy() the returned string from paddress()
6101 instead of sprintf().
5c3216e2
OS
6102 * utils.c (paddress): Return phex_nz().
6103
6bd31874
JB
61042010-07-07 Joel Brobecker <brobecker@adacore.com>
6105
6106 * server.c (handle_v_cont): Call mourn_inferior if process
6107 just exited.
6108 (myresume): Likewise.
6109
0fb4aa4b
PA
61102010-07-01 Pedro Alves <pedro@codesourcery.com>
6111
6112 Static tracepoints, and integration with UST.
6113
6114 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6115 * mem-break.c (uninsert_all_breakpoints)
6116 (reinsert_all_breakpoints): New.
6117 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6118 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6119 (gdb_agent_ust_loaded, helper_thread_id)
6120 (gdb_agent_helper_thread_id): New macros.
6121 (struct ipa_sym_addresses): Add addr_ust_loaded,
6122 addr_helper_thread_id, addr_cmd_buf.
6123 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6124 (in_process_agent_loaded_ust): New.
6125 (write_e_ust_not_loaded): New.
6126 (maybe_write_ipa_ust_not_loaded): New.
6127 (struct collect_static_trace_data_action): New.
6128 (enum tracepoint_type) <static_tracepoint>: New.
6129 (struct tracepoint) <handle>: Mention static tracepoints.
6130 (struct static_tracepoint_ctx): New.
6131 (CMD_BUF_SIZE): New.
6132 (add_tracepoint_action): Handle static tracepoint actions.
6133 (unprobe_marker_at): New.
6134 (clear_installed_tracepoints): Handle static tracepoints.
6135 (cmd_qtdp): Handle static tracepoints.
6136 (probe_marker_at): New.
6137 (cmd_qtstart): Handle static tracepoints.
6138 (response_tracepoint): Handle static tracepoints.
6139 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6140 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6141 (get_context_regcache): Handle static tracepoints.
6142 (do_action_at_tracepoint): Handle static tracepoint actions.
6143 (traceframe_find_block_type): Handle static trace data blocks.
6144 (traceframe_read_sdata): New.
6145 (download_tracepoints): Download static tracepoint actions.
6146 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6147 (GDB_PROBE_NAME): New.
6148 (ust_ops): New.
6149 (GET_UST_SYM): New.
6150 (USTF): New.
6151 (dlsym_ust): New.
6152 (ust_marker_to_static_tracepoint): New.
6153 (gdb_probe): New.
6154 (collect_ust_data_at_tracepoint): New.
6155 (gdb_ust_probe): New.
6156 (UNIX_PATH_MAX, SOCK_DIR): New.
6157 (gdb_ust_connect_sync_socket): New.
6158 (resume_thread, stop_thread): New.
6159 (run_inferior_command): New.
6160 (init_named_socket): New.
6161 (gdb_ust_socket_init): New.
6162 (cstr_to_hexstr): New.
6163 (next_st): New.
6164 (first_marker, next_marker): New.
6165 (response_ust_marker): New.
6166 (cmd_qtfstm, cmd_qtsstm): New.
6167 (unprobe_marker_at, probe_marker_at): New.
6168 (cmd_qtstmat, gdb_ust_thread): New.
6169 (gdb_ust_init): New.
6170 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6171 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6172 (ST_REGENTRY): New.
6173 (x86_64_st_collect_regmap): New.
6174 (X86_64_NUM_ST_COLLECT_GREGS): New.
6175 (AMD64_RIP_REGNUM): New.
6176 (supply_static_tracepoint_registers): New.
6177 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6178 (ST_REGENTRY): New.
6179 (i386_st_collect_regmap): New.
6180 (i386_NUM_ST_COLLECT_GREGS): New.
6181 (supply_static_tracepoint_registers): New.
6182 * server.c (handle_query): Handle qXfer:statictrace:read.
6183 <qSupported>: Report support for StaticTracepoints, and
6184 qXfer:statictrace:read features.
6185 * server.h (traceframe_read_sdata)
6186 (supply_static_tracepoint_registers): Declare.
6187 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6188 (unpack_varlen_hex): Include in IPA build.
6189 * Makefile.in (ustlibs, ustinc): New.
6190 (IPA_OBJS): Add remote-utils-ipa.o.
6191 ($(IPA_LIB)): Link -ldl and -lpthread.
6192 (UST_CFLAGS): New.
6193 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6194 * config.in, configure: Regenerate.
6195
9e4344e5
PA
61962010-06-20 Ian Lance Taylor <iant@google.com>
6197 Pedro Alves <pedro@codesourcery.com>
6198
6199 * linux-x86-low.c (always_true): Delete.
6200 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6201 trying to fool the compiler with always_true.
6202
c6beb2cb
PA
62032010-06-20 Pedro Alves <pedro@codesourcery.com>
6204
6205 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6206 conditions in gdbserver.
6207
d2ed6730
UW
62082010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6209
6210 * spu-low.c (spu_read_memory): Wrap around local store limit.
6211 (spu_write_memory): Likewise.
6212
4e29fb54
PA
62132010-06-15 Pedro Alves <pedro@codesourcery.com>
6214
6215 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6216 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6217 LONGEST uses.
6218 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6219 uses.
6220 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6221 uses with LONGEST uses.
6222
6a271cae
PA
62232010-06-14 Stan Shebs <stan@codesourcery.com>
6224 Pedro Alves <pedro@codesourcery.com>
6225
6226 Bytecode compiler.
6227
6228 * linux-x86-low.c: Include limits.h.
6229 (add_insns): New.
6230 (always_true): New.
6231 (EMIT_ASM): New.
6232 (EMIT_ASM32): New.
6233 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6234 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6235 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6236 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6237 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6238 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6239 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6240 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6241 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6242 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6243 (amd64_emit_void_call_2): New.
6244 (amd64_emit_ops): New.
6245 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6246 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6247 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6248 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6249 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6250 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6251 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6252 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6253 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6254 (i386_emit_stack_adjust, i386_emit_int_call_1)
6255 (i386_emit_void_call_2): New.
6256 (i386_emit_ops): New.
6257 (x86_emit_ops): New.
6258 (the_low_target): Install x86_emit_ops.
6259 * server.h (struct emit_ops): New.
6260 (get_raw_reg_func_addr): Declare.
6261 (current_insn_ptr, emit_error): Declare.
6262 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6263 (set_trace_state_variable_value): New defines.
6264 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6265 addr_get_trace_state_variable_value and
6266 addr_set_trace_state_variable_value.
6267 (symbol_list): New fields for get_raw_reg,
6268 get_trace_state_variable_value and set_trace_state_variable_value.
6269 (condfn): New typedef.
6270 (struct tracepoint): New field `compiled_cond'.
6271 (do_action_at_tracepoint): Clear compiled_cond.
6272 (get_trace_state_variable_value, set_trace_state_variable_value):
6273 Export in the IPA.
6274 (condition_true_at_tracepoint): If there's a compiled condition,
6275 run that.
6276 (current_insn_ptr, emit_error): New globals.
6277 (struct bytecode_address): New.
6278 (get_raw_reg_func_addr): New.
6279 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6280 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6281 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6282 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6283 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6284 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6285 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6286 (compile_tracepoint_condition, compile_bytecodes): New.
6287 * target.h (emit_ops): Forward declare.
6288 (struct target_ops): New field emit_ops.
6289 (target_emit_ops): New.
6290 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6291 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6292 * linux-low.c (linux_emit_ops): New.
6293 (linux_target_ops): Install it.
6294 * linux-low.h (struct linux_target_ops): New field emit_ops.
6295
92b72907
UW
62962010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6297
6298 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6299 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6300
fa593d66
PA
63012010-06-01 Pedro Alves <pedro@codesourcery.com>
6302 Stan Shebs <stan@codesourcery.com>
6303
6304 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6305 (all): Depend on $(extra_libraries).
6306 (install-only): Install the IPA.
6307 (IPA_OBJS, IPA_LIB): New.
6308 (clean): Remove the IPA lib.
6309 (IPAGENT_CFLAGS): New.
6310 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6311 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6312 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6313 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6314 * configure.ac: Check for atomic builtins support in the compiler.
6315 (IPA_DEPFILES, extra_libraries): Define.
6316 * configure.srv (ipa_obj): Add description.
6317 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6318 (i[34567]86-*-linux*): Set ipa_obj.
6319 (x86_64-*-linux*): Set ipa_obj.
6320 * linux-low.c (stabilizing_threads): New.
6321 (supports_fast_tracepoints): New.
6322 (linux_detach): Stabilize threads before detaching.
6323 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6324 the lwp is either not stabilizing, or is moving out of a jump pad.
6325 (linux_fast_tracepoint_collecting): New.
6326 (maybe_move_out_of_jump_pad): New.
6327 (enqueue_one_deferred_signal): New.
6328 (dequeue_one_deferred_signal): New.
6329 (linux_wait_for_event_1): If moving out of a jump pad, defer
6330 pending signals to later.
6331 (linux_stabilize_threads): New.
6332 (linux_wait_1): Check if threads need moving out of jump pads, and
6333 do it if so.
6334 (stuck_in_jump_pad_callback): New.
6335 (move_out_of_jump_pad_callback): New.
6336 (lwp_running): New.
6337 (linux_resume_one_lwp): Handle moving out of jump pads.
6338 (linux_set_resume_request): Dequeue deferred signals.
6339 (need_step_over_p): Also step over fast tracepoint jumps.
6340 (start_step_over): Also uninsert fast tracepoint jumps.
6341 (finish_step_over): Also reinsert fast tracepoint jumps.
6342 (linux_install_fast_tracepoint_jump): New.
6343 (linux_target_ops): Install linux_stabilize_threads and
6344 linux_install_fast_tracepoint_jump_pad.
6345 * linux-low.h (linux_target_ops) <get_thread_area,
6346 install_fast_tracepoint_jump_pad>: New fields.
6347 (struct lwp_info) <collecting_fast_tracepoint,
6348 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6349 (linux_get_thread_area): Declare.
6350 * linux-x86-low.c (jump_insn): New.
6351 (x86_get_thread_area): New.
6352 (append_insns): New.
6353 (push_opcode): New.
6354 (amd64_install_fast_tracepoint_jump_pad): New.
6355 (i386_install_fast_tracepoint_jump_pad): New.
6356 (x86_install_fast_tracepoint_jump_pad): New.
6357 (the_low_target): Install x86_get_thread_area and
6358 x86_install_fast_tracepoint_jump_pad.
6359 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6360 (struct fast_tracepoint_jump): New.
6361 (fast_tracepoint_jump_insn): New.
6362 (fast_tracepoint_jump_shadow): New.
6363 (find_fast_tracepoint_jump_at): New.
6364 (fast_tracepoint_jump_here): New.
6365 (delete_fast_tracepoint_jump): New.
6366 (set_fast_tracepoint_jump): New.
6367 (uninsert_fast_tracepoint_jumps_at): New.
6368 (reinsert_fast_tracepoint_jumps_at): New.
6369 (set_breakpoint_at): Use write_inferior_memory.
6370 (uninsert_raw_breakpoint): Use write_inferior_memory.
6371 (check_mem_read): Mask out fast tracepoint jumps.
6372 (check_mem_write): Mask out fast tracepoint jumps.
6373 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6374 (set_fast_tracepoint_jump): Declare.
6375 (delete_fast_tracepoint_jump)
6376 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6377 (reinsert_fast_tracepoint_jumps_at): Declare.
6378 * regcache.c: Don't compile many functions when building the
6379 in-process agent library.
6380 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6381 the register buffer in the heap.
6382 (free_register_cache): If the register buffer isn't owned by the
6383 regcache, don't free it.
6384 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6385 pre-existing register caches.
6386 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6387 type.
6388 (convert_ascii_to_int): : Constify `from' parameter type.
6389 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6390 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6391 the needed buffer in-place.
6392 (relocate_instruction): New.
6393 * server.c (handle_query) <qSymbols>: If the target supports
6394 tracepoints, give it a chance of looking up symbols. Report
6395 support for fast tracepoints.
6396 (handle_status): Stabilize threads.
6397 (process_serial_event): Adjust.
6398 * server.h (struct fast_tracepoint_jump): Forward declare.
6399 (struct process_info) <fast_tracepoint_jumps>: New field.
6400 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6401 (decode_X_packet, decode_M_packet): Adjust.
6402 (relocate_instruction): Declare.
6403 (in_process_agent_loaded): Declare.
6404 (tracepoint_look_up_symbols): Declare.
6405 (struct fast_tpoint_collect_status): Declare.
6406 (fast_tracepoint_collecting): Declare.
6407 (force_unlock_trace_buffer): Declare.
6408 (handle_tracepoint_bkpts): Declare.
6409 (initialize_low_tracepoint)
6410 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6411 * target.h (struct target_ops) <stabilize_threads,
6412 install_fast_tracepoint_jump_pad>: New fields.
6413 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6414 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6415 [HAVE_STDINT_H]: Include stdint.h.
6416 (trace_debug_1): Rename to ...
6417 (trace_vdebug): ... this.
6418 (trace_debug): Rename to ...
6419 (trace_debug_1): ... this. Add `level' parameter.
6420 (trace_debug): New.
6421 (ATTR_USED, ATTR_NOINLINE): New.
6422 (IP_AGENT_EXPORT): New.
6423 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6424 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6425 (about_to_request_buffer_space, trace_buffer_is_full)
6426 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6427 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6428 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6429 (traceframe_write_count, traceframes_created)
6430 (trace_state_variables)
6431 New renaming defines.
6432 (struct ipa_sym_addresses): New.
6433 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6434 (symbol_list): New.
6435 (ipa_sym_addrs): New.
6436 (all_tracepoint_symbols_looked_up): New.
6437 (in_process_agent_loaded): New.
6438 (write_e_ipa_not_loaded): New.
6439 (maybe_write_ipa_not_loaded): New.
6440 (tracepoint_look_up_symbols): New.
6441 (debug_threads) [IN_PROCESS_AGENT]: New.
6442 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6443 (UNKNOWN_SIDE_EFFECTS): New.
6444 (stop_tracing): New.
6445 (flush_trace_buffer): New.
6446 (stop_tracing_bkpt): New.
6447 (flush_trace_buffer_bkpt): New.
6448 (read_inferior_integer): New.
6449 (read_inferior_uinteger): New.
6450 (read_inferior_data_pointer): New.
6451 (write_inferior_data_pointer): New.
6452 (write_inferior_integer): New.
6453 (write_inferior_uinteger): New.
6454 (struct collect_static_trace_data_action): Delete.
6455 (enum tracepoint_type): New.
6456 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6457 <actions_str, step_actions, step_actions_str>: Only include in
6458 GDBserver.
fa593d66
PA
6459 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6460 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6461 (tracepoints): Use IP_AGENT_EXPORT.
6462 (last_tracepoint): Don't include in the IPA.
6463 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6464 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6465 (alloced_trace_state_variables): New.
6466 (trace_state_variables): Use IP_AGENT_EXPORT.
6467 (traceframe_t): Delete unused variable.
6468 (circular_trace_buffer): Don't include in the IPA.
6469 (trace_buffer_start): Delete.
6470 (struct trace_buffer_control): New.
6471 (trace_buffer_free): Delete.
6472 (struct ipa_trace_buffer_control): New.
6473 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6474 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6475 New.
6476 (trace_buffer_ctrl): New.
6477 (TRACE_BUFFER_CTRL_CURR): New.
6478 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6479 Reimplement as macros.
6480 (trace_buffer_wrap): Delete.
6481 (traceframe_write_count, traceframe_read_count)
6482 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6483 (struct tracepoint_hit_ctx) <type>: New field.
6484 (struct fast_tracepoint_ctx): New.
6485 (memory_barrier): New.
6486 (cmpxchg): New.
6487 (record_tracepoint_error): Update atomically in the IPA.
6488 (clear_inferior_trace_buffer): New.
6489 (about_to_request_buffer_space): New.
6490 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6491 updating the same buffer.
6492 (add_tracepoint): Default the tracepoint's type to trap
6493 tracepoint, and orig_size to -1.
6494 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6495 internal variables.
6496 (create_trace_state_variable): New parameter `gdb'. Handle it.
6497 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6498 (cmd_qtdp): Handle fast tracepoints.
6499 (cmd_qtdv): Adjust.
6500 (max_jump_pad_size): New.
6501 (gdb_jump_pad_head): New.
6502 (get_jump_space_head): New.
6503 (claim_jump_space): New.
6504 (sort_tracepoints): New.
6505 (MAX_JUMP_SIZE): New.
6506 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6507 IPA.
6508 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6509 support. Upload fast traceframes, and delete internal IPA
6510 breakpoints.
6511 (stop_tracing_handler): New.
6512 (flush_trace_buffer_handler): New.
6513 (cmd_qtstop): Upload fast tracepoints.
6514 (response_tracepoint): Handle fast tracepoints.
6515 (tracepoint_finished_step): Upload fast traceframes. Set the
6516 tracepoint hit context's tracepoint type.
6517 (handle_tracepoint_bkpts): New.
6518 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6519 type. Add comment about fast tracepoints.
6520 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6521 non-existing action_str field.
6522 (get_context_regcache): Handle fast tracepoints.
6523 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6524 to the regcache.
6525 (fast_tracepoint_from_jump_pad_address): New.
6526 (fast_tracepoint_from_ipa_tpoint_address): New.
6527 (collecting_t): New.
6528 (force_unlock_trace_buffer): New.
6529 (fast_tracepoint_collecting): New.
6530 (collecting): New.
6531 (gdb_collect): New.
6532 (write_inferior_data_ptr): New.
6533 (target_tp_heap): New.
6534 (target_malloc): New.
6535 (download_agent_expr): New.
6536 (UALIGN): New.
6537 (download_tracepoints): New.
6538 (download_trace_state_variables): New.
6539 (upload_fast_traceframes): New.
6540 (IPA_FIRST_TRACEFRAME): New.
6541 (IPA_NEXT_TRACEFRAME_1): New.
6542 (IPA_NEXT_TRACEFRAME): New.
6543 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6544 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6545 (gdb_jump_pad_buffer_end): New.
6546 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6547 (initialize_tracepoint): Adjust.
6548 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6549 buffer. Initialize the low module.
6550 * utils.c (PREFIX, TOOLNAME): New.
6551 (malloc_failure): Use PREFIX.
6552 (error): In the IPA, an error causes an exit.
6553 (fatal, warning): Use PREFIX.
6554 (internal_error): Use TOOLNAME.
6555 (NUMCELLS): Increase to 10.
6556 * configure, config.in: Regenerate.
6557
d149dd1d
PA
65582010-06-01 Pedro Alves <pedro@codesourcery.com>
6559
6560 * server.c (handle_query) <qSupported>: Do two passes over the
6561 qSupported string to avoid nesting strtok.
6562
f6528abd
JK
65632010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6564
6565 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6566 (CDEPS): New.
6567 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6568 -Wl,--dynamic-list.
6569 * configure: Regenerate.
6570 * proc-service.list: New.
6571
ca2a87a0
JK
65722010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6573
6574 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6575 New comment.
6576
363a6e9f
OS
65772010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6578
6579 * gdbreplay.c (remote_open): Check error return from socket() call by
6580 its equality to -1 not by it being negative.
6581 * remote-utils.c (remote_open): Likewise.
6582
d23b6cb1
PA
65832010-05-23 Pedro Alves <pedro@codesourcery.com>
6584
6585 * config.h: Regenerate.
6586
28d3cf85
MK
65872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6588
6589 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6590 doesn't provide PTRACE_GET_THREAD_AREA.
6591
fea36a59
MK
65922010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6593
6594 * linux-m68k-low.c: Include <asm/ptrace.h>
6595 (ps_get_thread_area): Implement.
6596
24b066ba
DE
65972010-05-03 Doug Evans <dje@google.com>
6598
6599 * event-loop.c (struct callback_event): New struct.
6600 (callback_list): New global.
6601 (append_callback_event, delete_callback_event): New functions.
6602 (process_callback): New function.
6603 (start_event_loop): Call it.
6604 * remote-utils.c (NOT_SCHEDULED): Define.
6605 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6606 moved out of readchar.
6607 (readchar): Rewrite. Call reschedule before returning.
6608 (reset_readchar): New function.
6609 (remote_close): Call it.
6610 (process_remaining, reschedule): New functions.
6611 * server.h (callback_handler_func): New typedef.
6612 (append_callback_event, delete_callback_event): Declare.
6613
9836d6ea
PA
66142010-05-03 Pedro Alves <pedro@codesourcery.com>
6615
6616 * proc-service.c (ps_pglobal_lookup): Use
6617 thread_db_look_up_one_symbol.
6618 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6619 parameter. Use it instead of all_symbols_looked_up.
6620 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6621 field.
6622 (all_symbols_looked_up): Don't declare.
6623 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6624 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6625 field.
6626 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6627 Set all_symbols_looked_up here.
6628 (thread_db_look_up_one_symbol): New.
6629 (thread_db_get_tls_address): Adjust.
6630 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6631 thread_db object on the heap, and tentatively set it in the
6632 process structure.
6633 (thread_db_init): Don't set all_symbols_looked_up here.
6634 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6635
7984d532
PA
66362010-05-03 Pedro Alves <pedro@codesourcery.com>
6637
6638 * linux-low.c (linux_kill, linux_detach): Adjust.
6639 (status_pending_p_callback): Remove redundant statement. Check
6640 for !TARGET_WAITIKIND_IGNORE, instead of
6641 TARGET_WAITKIND_STOPPED.
6642 (handle_tracepoints): Make sure LWP is locked. Adjust.
6643 (linux_wait_for_event_1): Adjust.
6644 (linux_cancel_breakpoints): New.
6645 (unsuspend_one_lwp): New.
6646 (unsuspend_all_lwps): New.
6647 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6648 (send_sigstop_callback): Change return type to int, add new
6649 `except' parameter and handle it.
6650 (suspend_and_send_sigstop_callback): New.
6651 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6652 pass them down. If SUSPEND, also increment the lwp's suspend
6653 count.
6654 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6655 (need_step_over_p): Don't consider suspended LWPs.
6656 (start_step_over): Adjust.
6657 (proceed_one_lwp): Change return type to int, add new `except'
6658 parameter and handle it.
6659 (unsuspend_and_proceed_one_lwp): New.
6660 (proceed_all_lwps): Use find_inferior instead of
6661 for_each_inferior.
6662 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6663 also decrement the suspend count of LWPs. Pass `except' down,
6664 instead of hacking its suspend count.
6665 (linux_pause_all): Add `freeze' parameter. Adjust.
6666 (linux_unpause_all): New.
6667 (linux_target_ops): Install linux_unpause_all.
6668 * server.c (handle_status): Adjust.
6669 * target.h (struct target_ops): New fields `unpause_all' and
6670 `cancel_breakpoints'. Add new parameter to `pause_all'.
6671 (pause_all): Add new `freeze' parameter.
6672 (unpause_all): New.
6673 (cancel_breakpoints): New.
6674 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6675 cancel breakpoints.
6676 (cmd_qtstart): Pause threads.
6677 (stop_tracing): Pause threads, and cancel breakpoints.
6678 * win32-low.c (win32_target_ops): Adjust.
6679
e471f25b
PA
66802010-05-03 Pedro Alves <pedro@codesourcery.com>
6681
6682 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6683 the inferior right away from here...
6684 (linux_wait_1): ... to here, and adjust to check the thread's
6685 last_resume_kind instead of the lwp's step or stop_expected flags.
6686
1915ef4f
PA
66872010-05-02 Pedro Alves <pedro@codesourcery.com>
6688
6689 * README: Use consistent `GDB' and `GDBserver' spellings.
6690
f9e39928
PA
66912010-05-02 Pedro Alves <pedro@codesourcery.com>
6692
6693 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6694 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6695 (linux_detach_one_lwp): Assume the lwp is stopped.
6696 (any_thread_of): Delete.
6697 (linux_detach): Stop all lwps here. Don't blindly delete all
6698 breakpoints.
6699 (delete_lwp_callback): New.
6700 (linux_mourn): Delete all lwps of the process that is gone.
6701 (linux_wait_1): Don't delete the last lwp of the process here.
6702 * mem-break.h (mark_breakpoints_out): Declare.
6703 * mem-break.c (mark_breakpoints_out): New.
6704 (free_all_breakpoints): Use it.
6705 * server.c (handle_target_event): If the process is gone, mark
6706 breakpoints out.
6707 * thread-db.c (struct thread_db) <create_bp>: New field.
6708 (thread_db_enable_reporting): Fix prototype. Store a thread event
6709 breakpoint reference in the thread_db struct.
6710 (thread_db_load_search): Clear the thread_db object.
6711 (try_thread_db_load_1): Ditto.
6712 (switch_to_process): New.
6713 (disable_thread_event_reporting): Use it.
6714 (remove_thread_event_breakpoints): New.
6715 (thread_db_detach, thread_db_mourn): Use it.
6716
1e7fc18c
PA
67172010-05-01 Pedro Alves <pedro@codesourcery.com>
6718
6719 * linux-low.c (linux_enable_event_reporting): New.
6720 (linux_wait_for_event_1, handle_extended_wait): Use it.
6721
02fc4de7
PA
67222010-04-30 Pedro Alves <pedro@codesourcery.com>
6723
6724 * linux-low.c (linux_kill_one_lwp, linux_kill)
6725 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6726 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6727 SIGSTOP even if the LWP is stopped.
6728 (send_sigstop_callback): New.
6729 (stop_all_lwps): Use send_sigstop_callback instead.
6730 (linux_resume_one_thread): Adjust.
6731 (proceed_one_lwp): Still proceed an LWP that the client has
6732 requested to stop, if we haven't reported it as stopped yet. Make
6733 sure that LWPs the client want stopped, have a pending SIGSTOP.
6734
bc3b5632
DE
67352010-04-26 Doug Evans <dje@google.com>
6736
ae1ada35
DE
6737 * server.c (handle_general_set): Make static.
6738
bc3b5632
DE
6739 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6740 Print received char after testing for error/eof instead of before.
6741 (input_interrupt): Tweak comment.
6742
65730243
DE
67432010-04-23 Doug Evans <dje@google.com>
6744
6745 * server.c (start_inferior): Print inferior argv if --debug.
6746
a8ae7dc0
AR
67472010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6748
6749 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6750 * nto-x86-low.c: Include server.h
6751
1c07cc19
PM
67522010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6753
6754 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6755 be consistent with other sources of this directory.
6756 (init_registers_amd64): Correct name of source file of this function
6757 in the comment.
6758
e0a61e09
PM
67592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6760
6761 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6762 64-bit executables.
6763
54709339
PM
67642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6765
6766 * win32-i386-low.c: Add 64-bit support.
6767 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6768 (init_registers_amd64): Declare.
6769 (mappings): Add 64-bit version of array.
6770 (init_windows_x86): New function.
6771 (the_low_target): Change init_arch field to init_windows_x86.
6772
e8f0053d
PM
67732010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6774
6775 * win32-low.c: Adapt to support also 64-bit architecture.
6776 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6777 (get_image_name): Use SIZE_T type for local variable `done'.
6778 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6779 (toolhelp_get_dll_name): Idem.
6780 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6781 Use uintptr_t typecast to avoid warning.
6782 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6783 (handle_exception): Use phex_nz to avoid warning.
6784 (win32_wait): Remove unused local variable `process'.
6785
c481e77e
PM
67862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6787
6788 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6789 `amd64-avx.o'.
6790
12ea4b69
PM
67912010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6792
6793 * configure.ac: Use `ws2_32' library for srv_mingw.
6794 * configure: Regenerate.
6795 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6796 * remote-utils.c: Likewise.
6797
f6d1620c
L
67982010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6799
6800 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6801 if __x86_64__ is defined.
6802
8e642873
PM
68032010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6804
6805 * configure: Regenerate.
6806
711e434b
PM
68072010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6808
6809 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6810 * target.h (target_ops): New get_tib_address field.
6811 * win32-low.h (win32_thread_info): Add thread_local_base field.
6812 * win32-low.c (child_add_thread): Add tlb argument.
6813 Set thread_local_base field to TLB.
6814 (get_child_debug_event): Adapt to child_add_thread change.
6815 (win32_get_tib_address): New function.
6816 (win32_target_ops): Set get_tib_address field to
6817 win32_get_tib_address.
6818 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6819
505106cd
PA
68202010-04-12 Pedro Alves <pedro@codesourcery.com>
6821
505106cd
PA
6822 * linux-low.c (linux_mourn): Also remove the process.
6823 * server.c (handle_target_event): Don't remove the process here.
6824 * nto-low.c (nto_mourn): New.
6825 (nto_target_ops): Install it.
6826 * spu-low.c (spu_mourn): New.
6827 (spu_target_ops): Install it.
6828 * win32-low.c (win32_mourn): New.
6829 (win32_target_ops): Install it.
6830
e8470a06
PA
68312010-04-12 Pedro Alves <pedro@codesourcery.com>
6832
6833 * server.h (buffer_xml_printf): Remove redundant `;'.
6834
45ba0d02
PA
68352010-04-12 Pedro Alves <pedro@codesourcery.com>
6836
6837 * regcache.c (set_register_cache): Invalidate regcaches before
6838 changing the register cache layout.
6839 (regcache_invalidate_one): Allow a NULL regcache.
6840 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6841 regcaches before changing the register cache layout or the target
6842 regsets.
6843
59e04013
L
68442010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6845
6846 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6847 variable warning on Linux/x86-64.
6848
8336d594
PA
68492010-04-11 Pedro Alves <pedro@codesourcery.com>
6850
6851 GDBserver disconnected tracing support.
6852
6853 * linux-low.c (linux_remove_process): Delete.
6854 (add_lwp): Don't set last_resume_kind here.
6855 (linux_kill): Use `mourn'.
6856 (linux_detach): Use `thread_db_detach', and `mourn'.
6857 (linux_mourn): New.
6858 (linux_attach_lwp_1): Adjust comment.
6859 (linux_attach): last_resume_kind moved the thread_info; adjust.
6860 (status_pending_p_callback): Adjust.
6861 (linux_wait_for_event_1): Adjust.
6862 (count_events_callback, select_singlestep_lwp_callback)
6863 (select_event_lwp_callback, cancel_breakpoints_callback)
6864 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6865 (proceed_one_lwp): Adjust.
6866 (linux_async): Add debug output.
6867 (linux_thread_stopped): New.
6868 (linux_pause_all): New.
6869 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6870 linux_pause_all.
6871 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6872 (thread_db_free): Delete declaration.
6873 (thread_db_detach, thread_db_mourn): Declare.
6874 * thread-db.c (thread_db_init): Use thread_db_mourn.
6875 (thread_db_free): Delete, split in two.
6876 (disable_thread_event_reporting): New.
6877 (thread_db_detach): New.
6878 (thread_db_mourn): New.
6879
6880 * server.h (struct thread_info) <last_resume_kind>: New field.
6881 <attached>: Add comment.
6882 <gdb_detached>: New field.
6883 (handler_func): Change return type to int.
6884 (handle_serial_event, handle_target_event): Ditto.
6885 (gdb_connected): Declare.
6886 (tracing): Delete.
6887 (disconnected_tracing): Declare.
6888 (stop_tracing): Declare.
6889
6890 * server.c (handle_query) <qSupported>: Report support for
6891 disconnected tracing.
6892 (queue_stop_reply_callback): Account for running threads.
6893 (gdb_wants_thread_stopped): New.
6894 (gdb_wants_all_threads_stopped): New.
6895 (gdb_reattached_process): New.
6896 (handle_status): Clear the `gdb_detached' flag of all processes.
6897 In all-stop, stop all threads.
6898 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6899 (process_serial_event): If the remote connection breaks, or if an
6900 exit was forced with "monitor exit", force an event loop exit.
6901 Handle disconnected tracing on detach.
6902 (handle_serial_event): Adjust.
6903 (handle_target_event): If GDB isn't connected, forward events back
6904 to the inferior, unless the last process exited, in which case,
6905 exit gdbserver. Adjust interface.
6906
6907 * remote-utils.c (remote_open): Don't block in accept. Instead
6908 register an event loop source on the listen socket file
6909 descriptor. Refactor bits into ...
6910 (listen_desc): ... this new global.
6911 (gdb_connected): ... this new function.
6912 (enable_async_notification): ... this new function.
6913 (handle_accept_event): ... this new function.
6914 (remote_close): Clear remote_desc.
6915
6916 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6917
6918 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6919 New fields.
6920 (mourn_inferior): Define.
6921 (target_process_qsupported): Avoid the dangling else problem.
6922 (thread_stopped): Define.
6923 (pause_all): Define.
6924 (target_waitstatus_to_string): Declare.
6925 * target.c (target_waitstatus_to_string): New.
6926
6927 * tracepoint.c (tracing): Make extern.
6928 (disconnected_tracing): New.
6929 (stop_tracing): Make extern. Handle tracing stops due to GDB
6930 disconnecting.
6931 (cmd_qtdisconnected): New.
6932 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6933 (handle_tracepoint_general_set): Handle QTDisconnected.
6934
6935 * event-loop.c (event_handler_func): Change return type to int.
6936 (process_event): Bail out if the event handler wants the event
6937 loop to stop.
6938 (handle_file_event): Ditto.
6939 (start_event_loop): Bail out if the event handler wants the event
6940 loop to stop.
6941
6942 * nto-low.c (nto_target_ops): Adjust.
6943 * spu-low.c (spu_wait): Don't remove the process here.
6944 (spu_target_ops): Adjust.
6945 * win32-low.c (win32_wait): Don't remove the process here.
6946 (win32_target_ops): Adjust.
6947
5d267c4c
PA
69482010-04-11 Pedro Alves <pedro@codesourcery.com>
6949
6950 * regcache.c (realloc_register_cache): Invalidate inferior's
6951 regcache before recreating it.
6952
623ccd72
PA
69532010-04-09 Pedro Alves <pedro@codesourcery.com>
6954
6955 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6956
219f2f23
PA
69572010-04-09 Stan Shebs <stan@codesourcery.com>
6958 Pedro Alves <pedro@codesourcery.com>
6959
6960 * server.h (LONGEST): New.
6961 (struct thread_info) <while_stepping>: New field.
6962 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6963 Declare.
6964 (initialize_tracepoint, handle_tracepoint_general_set)
6965 (handle_tracepoint_query, tracepoint_finished_step)
6966 (tracepoint_was_hit, release_while_stepping_state_list):
6967 (current_traceframe): Declare.
6968 * server.c (handle_general_set): Handle tracepoint packets.
6969 (read_memory): New.
6970 (write_memory): New.
6971 (handle_search_memory_1): Use read_memory.
6972 (handle_query): Report support for conditional tracepoints, trace
6973 state variables, and tracepoint sources. Handle tracepoint
6974 queries.
6975 (main): Initialize the tracepoints module.
6976 (process_serial_event): Handle traceframe reads/writes.
6977
6978 * linux-low.c (handle_tracepoints): New.
6979 (linux_wait_1): Call it.
6980 (linux_resume_one_lwp): Handle while-stepping.
6981 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6982 (linux_target_ops): Install them.
6983 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6984 New field.
6985 * linux-x86-low.c (x86_supports_tracepoints): New.
6986 (the_low_target). Install it.
6987
6988 * mem-break.h (delete_breakpoint): Declare.
6989 * mem-break.c (delete_breakpoint): Make external.
6990
6991 * target.h (struct target_ops): Add `supports_tracepoints',
6992 `read_pc', and `write_pc' fields.
6993 (target_supports_tracepoints): Define.
6994 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6995 (phex_nz): New.
6996
6997 * regcache.h (struct regcache) <registers_owned>: New field.
6998 (init_register_cache, regcache_cpy): Declare.
6999 (regcache_read_pc, regcache_write_pc): Declare.
7000 (register_cache_size): Declare.
7001 (supply_regblock): Declare.
7002 * regcache.c (init_register_cache): New.
7003 (new_register_cache): Use it.
7004 (regcache_cpy): New.
7005 (register_cache_size): New.
7006 (supply_regblock): New.
7007 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7008
219f2f23
PA
7009 * tracepoint.c: New.
7010
7011 * Makefile.in (OBS): Add tracepoint.o.
7012 (tracepoint.o): New rule.
7013
3a13a53b
L
70142010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7015
7016 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7017 (i386-mmx.o): New.
7018 (i386-mmx.c): Likewise.
7019 (i386-mmx-linux.o): Likewise.
7020 (i386-mmx-linux.c): Likewise.
7021
7022 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7023 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7024 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7025 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7026
7027 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7028 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7029 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7030
1570b33e
L
70312010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7032
7033 * Makefile.in (clean): Updated.
7034 (i386-avx.o): New.
7035 (i386-avx.c): Likewise.
7036 (i386-avx-linux.o): Likewise.
7037 (i386-avx-linux.c): Likewise.
7038 (amd64-avx.o): Likewise.
7039 (amd64-avx.c): Likewise.
7040 (amd64-avx-linux.o): Likewise.
7041 (amd64-avx-linux.c): Likewise.
7042
7043 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7044 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7045 (srv_amd64_regobj): Add amd64-avx.o.
7046 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7047 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7048 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7049 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7050 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7051 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7052 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7053
7054 * i387-fp.c: Include "i386-xstate.h".
7055 (i387_xsave): New.
7056 (i387_cache_to_xsave): Likewise.
7057 (i387_xsave_to_cache): Likewise.
7058 (x86_xcr0): Likewise.
7059
7060 * i387-fp.h (i387_cache_to_xsave): Likewise.
7061 (i387_xsave_to_cache): Likewise.
7062 (x86_xcr0): Likewise.
7063
7064 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7065 * linux-crisv32-low.c (target_regsets): Likewise.
7066 * linux-m68k-low.c (target_regsets): Likewise.
7067 * linux-mips-low.c (target_regsets): Likewise.
7068 * linux-ppc-low.c (target_regsets): Likewise.
7069 * linux-s390-low.c (target_regsets): Likewise.
7070 * linux-sh-low.c (target_regsets): Likewise.
7071 * linux-sparc-low.c (target_regsets): Likewise.
7072 * linux-xtensa-low.c (target_regsets): Likewise.
7073
7074 * linux-low.c: Include <sys/uio.h>.
7075 (regsets_fetch_inferior_registers): Support nt_type.
7076 (regsets_store_inferior_registers): Likewise.
7077 (linux_process_qsupported): New.
7078 (linux_target_ops): Add linux_process_qsupported.
7079
7080 * linux-low.h (regset_info): Add nt_type.
7081 (linux_target_ops): Add process_qsupported.
7082
7083 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7084 and <sys/uio.h>.
7085 (init_registers_i386_avx_linux): New.
7086 (init_registers_amd64_avx_linux): Likewise.
7087 (xmltarget_i386_linux_no_xml): Likewise.
7088 (xmltarget_amd64_linux_no_xml): Likewise.
7089 (PTRACE_GETREGSET): Likewise.
7090 (PTRACE_SETREGSET): Likewise.
7091 (x86_fill_xstateregset): Likewise.
7092 (x86_store_xstateregset): Likewise.
7093 (use_xml): Likewise.
7094 (x86_linux_update_xmltarget): Likewise.
7095 (x86_linux_process_qsupported): Likewise.
7096 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7097 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7098 init_registers_i386_linux here. Call
7099 x86_linux_update_xmltarget.
7100 (the_low_target): Add x86_linux_process_qsupported.
7101
7102 * server.c (handle_query): Call target_process_qsupported.
7103
7104 * target.h (target_ops): Add process_qsupported.
7105 (target_process_qsupported): New.
7106
fc7238bb
PA
71072010-04-03 Pedro Alves <pedro@codesourcery.com>
7108
7109 * inferiors.c (add_thread): Set last_status kind to
7110 TARGET_WAITKIND_IGNORE.
7111 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7112 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7113 (linux_wait_1): Move `thread' local definition to block that uses
7114 it. Don't NULL initialize `event_child'.
7115 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7116 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7117 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7118
bdabb078
PA
71192010-04-01 Pedro Alves <pedro@codesourcery.com>
7120
7121 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7122 an extended waitstatus, or by a watchpoint.
7123 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7124 thread was stepping or has been stopped by a watchpoint.
7125
d3bbe7a0
PA
71262010-04-01 Pedro Alves <pedro@codesourcery.com>
7127
7128 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7129 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7130 of another, then delete the previous, and validate all
7131 breakpoints.
7132 (validate_inserted_breakpoint): New.
7133 (delete_disabled_breakpoints): New.
7134 (validate_breakpoints): New.
7135 (check_mem_read): Validate breakpoints before trusting their
7136 shadow. Delete disabled breakpoints.
7137 (check_mem_write): Validate breakpoints before trusting they
7138 should be inserted. Delete disabled breakpoints.
7139 * mem-break.h (validate_breakpoints):
7140 * server.c (handle_query): Validate breakpoints when we see a
7141 qSymbol query.
7142
8b07ae33
PA
71432010-04-01 Pedro Alves <pedro@codesourcery.com>
7144
7145 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7146 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7147 if we could tell there's a GDB breakpoint at stop_pc.
7148 (need_step_over_p): Don't do a step over if we find a GDB
7149 breakpoint at the resume PC.
7150
7151 * mem-break.c (struct raw_breakpoint): New.
7152 (enum bkpt_type): New type `gdb_breakpoint'.
7153 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7154 fields. New field `raw'.
7155 (find_raw_breakpoint_at): New.
7156 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7157 breakpoint instead.
7158 (set_breakpoint_at): Adjust.
7159 (delete_raw_breakpoint): New.
7160 (release_breakpoint): New.
7161 (delete_breakpoint): Rename to...
7162 (delete_breakpoint_1): ... this. Add proc parameter. Use
7163 release_breakpoint. Return ENOENT.
7164 (delete_breakpoint): Reimplement.
7165 (find_breakpoint_at): Delete.
7166 (find_gdb_breakpoint_at): New.
7167 (delete_breakpoint_at): Delete.
7168 (set_gdb_breakpoint_at): New.
7169 (delete_gdb_breakpoint_at): New.
7170 (gdb_breakpoint_here): New.
7171 (set_reinsert_breakpoint): Use release_breakpoint.
7172 (uninsert_breakpoint): Rename to ...
7173 (uninsert_raw_breakpoint): ... this.
7174 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7175 (reinsert_raw_breakpoint): Change parameter type to
7176 raw_breakpoint.
7177 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7178 instead.
7179 (check_breakpoints): Adjust. Use release_breakpoint.
7180 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7181 (breakpoint_inserted_here): Ditto.
7182 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7183 Don't trust the breakpoint's shadow if it is not inserted.
7184 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7185 (delete_all_breakpoints): Adjust.
7186 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7187 use delete_breakpoint_1.
7188
7189 * mem-break.h (breakpoints_supported): Delete declaration.
7190 (set_gdb_breakpoint_at): Declare.
7191 (gdb_breakpoint_here): Declare.
7192 (delete_breakpoint_at): Delete.
7193 (delete_gdb_breakpoint_at): Declare.
7194
7195 * server.h (struct raw_breakpoint): Forward declare.
7196 (struct process_info): New field `raw_breakpoints'.
7197
7198 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7199 breakpoints.
7200
6bf5e0ba
PA
72012010-03-24 Pedro Alves <pedro@codesourcery.com>
7202
7203 * linux-low.c (status_pending_p_callback): Fix comment.
7204 (linux_wait_for_event_1): Move most of the internal breakpoint
7205 handling from here...
7206 (linux_wait_1): ... to here.
7207 (count_events_callback): New.
7208 (select_singlestep_lwp_callback): New.
7209 (select_event_lwp_callback): New.
7210 (cancel_breakpoints_callback): New.
7211 (select_event_lwp): New.
7212 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7213 priority to all LWPs that have had events that should be reported
7214 to the client. Cancel breakpoints when about to reporting the
7215 event to the client, not while stopping lwps. No longer cancel
7216 finished single-steps here.
7217 (cancel_finished_single_step): Delete.
7218 (cancel_finished_single_steps): Delete.
7219
414a389f
PA
72202010-03-24 Pedro Alves <pedro@codesourcery.com>
7221
7222 * mem-break.c (enum bkpt_type): New.
7223 (struct breakpoint): New field `type'.
7224 (set_breakpoint_at): Change return type to struct breakpoint
7225 pointer. Set type to `other_breakpoint' by default.
7226 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7227 in the breakpoint list.
7228 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7229 (reinsert_breakpoint): Rename to ...
7230 (reinsert_raw_breakpoint): ... this.
7231 (reinsert_breakpoints_at): Adjust.
7232 * mem-break.h (struct breakpoint): Declare.
7233 (set_breakpoint_at): Change return type to struct breakpoint
7234 pointer.
7235
2280c721
PA
72362010-03-24 Pedro Alves <pedro@codesourcery.com>
7237
7238 * server.c (handle_query): Assign, not compare.
7239
d50171e4
PA
72402010-03-24 Pedro Alves <pedro@codesourcery.com>
7241
7242 Teach linux gdbserver to step-over-breakpoints.
7243
7244 * linux-low.c (can_hardware_single_step): New.
7245 (supports_breakpoints): New.
7246 (handle_extended_wait): If stopping threads, read the stop pc of
7247 the new cloned LWP.
7248 (get_pc): New.
7249 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7250 low target doesn't support retrieving the PC.
7251 (add_lwp): Set last_resume_kind to resume_continue.
7252 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7253 (linux_attach): Don't clear stop_expected. Set the lwp's
7254 last_resume_kind to resume_stop.
7255 (linux_detach_one_lwp): Don't check for removed breakpoints.
7256 (check_removed_breakpoint): Delete.
7257 (status_pending_p): Rename to ...
7258 (status_pending_p_callback): ... this. Don't check for removed
7259 breakpoints. Don't consider threads that are stopped from GDB's
7260 perspective.
7261 (linux_wait_for_lwp): Always read the stop_pc here.
7262 (cancel_breakpoint): New.
7263 (step_over_bkpt): New global.
7264 (linux_wait_for_event_1): Implement stepping over breakpoints.
7265 (gdb_wants_lwp_stopped): New.
7266 (gdb_wants_all_stopped): New.
7267 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7268 single-step traps here. Store the thread's last reported target
7269 wait status.
7270 (send_sigstop): Don't clear stop_expected. Always set it,
7271 instead.
7272 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7273 (cancel_finished_single_step): New.
7274 (cancel_finished_single_steps): New.
7275 (wait_for_sigstop): Don't cancel finished single-step traps here.
7276 (linux_resume_one_lwp): Don't check for removed breakpoints.
7277 Don't set `step' on non-hardware step archs.
7278 (linux_set_resume_request): Ignore resume_stop requests if already
7279 stopping or stopped. Set the lwp's last_resume_kind.
7280 (resume_status_pending_p): Don't check for removed breakpoints.
7281 (need_step_over_p): New.
7282 (start_step_over): New.
7283 (finish_step_over): New.
7284 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7285 requests. Clear the thread's last reported target waitstatus.
7286 Don't use the `suspended' flag. Don't consider pending breakpoints.
7287 (linux_resume): Start a step-over if necessary.
7288 (proceed_one_lwp): New.
7289 (proceed_all_lwps): New.
7290 (unstop_all_lwps): New.
7291 * linux-low.h (struct lwp_info): Rewrite comment for the
7292 `suspended' flag. Add the `stop_pc' field. Delete the
7293 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7294 Add `'last_resume_kind' and `need_step_over' fields.
7295 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7296 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7297 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7298 (set_raw_breakpoint_at): New.
7299 (set_breakpoint_at): Rewrite to use it.
7300 (reinsert_breakpoint_handler): Delete.
7301 (set_reinsert_breakpoint): New.
7302 (reinsert_breakpoint_by_bp): Delete.
7303 (delete_reinsert_breakpoints): New.
7304 (uninsert_breakpoint): Rewrite.
7305 (uninsert_breakpoints_at): New.
7306 (reinsert_breakpoint): Rewrite.
7307 (reinsert_breakpoints_at): New.
7308 (check_breakpoints): Rewrite.
7309 (breakpoint_here): New.
7310 (breakpoint_inserted_here): New.
7311 (check_mem_read): Adjust.
7312 * mem-break.h (breakpoints_supported, breakpoint_here)
7313 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7314 (reinsert_breakpoint_by_bp): Delete declaration.
7315 (delete_reinsert_breakpoints): Declare.
7316 (reinsert_breakpoint): Delete declaration.
7317 (reinsert_breakpoints_at): Declare.
7318 (uninsert_breakpoint): Delete declaration.
7319 (uninsert_breakpoints_at): Declare.
7320 (check_breakpoints): Adjust prototype.
7321 * server.h: Adjust include order.
7322 (struct thread_info): Declare here. Add a `last_status' field.
7323
30ba68cb
MS
73242010-03-23 Michael Snyder <msnyder@vmware.com>
7325
7326 * server.c (crc32): New function.
7327 (handle_query): Add handling for 'qCRC:' request.
7328
b9a881c2
PA
73292010-03-23 Pedro Alves <pedro@codesourcery.com>
7330
7331 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7332 lwp had been stopped by a watchpoint.
7333
e92d13d5
PA
73342010-03-16 Pedro Alves <pedro@codesourcery.com>
7335
7336 * server.h (internal_error): Declare.
7337 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7338 * utils.c (internal_error): New function.
7339
64daa791
AS
73402010-03-15 Andreas Schwab <schwab@redhat.com>
7341
7342 * configure.srv: Fix typo setting srv_regobj.
7343
f52cd8cd
PA
73442010-03-15 Pedro Alves <pedro@codesourcery.com>
7345
7346 * linux-low.c (fetch_register): Avoid passing a non string literal
7347 format to `error'.
7348 (usr_store_inferior_registers): Ditto.
7349
93ae6fdc
PA
73502010-03-14 Pedro Alves <pedro@codesourcery.com>
7351
7352 * linux-low.c (linux_write_memory): Bail out early if peeking
7353 memory failed.
7354
c3adc08c
PA
73552010-03-14 Pedro Alves <pedro@codesourcery.com>
7356
7357 * linux-low.h (struct lwp_info): New fields
7358 `stopped_by_watchpoint' and `stopped_data_address'.
7359 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7360 here, and cache them in the lwp object.
7361 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7362 directly.
7363 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7364 field.
7365 (linux_stopped_by_watchpoint): Rewrite.
7366 (linux_stopped_data_address): Rewrite.
7367
bce522a2
PA
73682010-03-06 Simo Melenius <simo.melenius@iki.fi>
7369
7370 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7371 switching the current inferior, not before.
7372
90884b2b
L
73732010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7374
7375 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7376 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7377 i386-linux.c and amd64-linux.c.
7378 (reg-i386.o): Removed.
7379 (reg-i386.c): Likewise.
7380 (reg-i386-linux.o): Likewise.
7381 (reg-i386-linux.c): Likewise.
7382 (reg-x86-64.o): Likewise.
7383 (reg-x86-64.c): Likewise.
7384 (reg-x86-64-linux.o): Likewise.
7385 (reg-x86-64-linux.c): Likewise.
7386 (i386.o): New.
7387 (i386.c): Likewise.
7388 (i386-linux.o): Likewise.
7389 (i386-linux.c): Likewise.
7390 (amd64.o): Likewise.
7391 (amd64.c): Likewise.
7392 (amd64-linux.o): Likewise.
7393 (amd64-linux.c): Likewise.
7394
7395 * configure.srv (srv_i386_regobj): New.
7396 (srv_i386_linux_regobj): Likewise.
7397 (srv_amd64_regobj): Likewise.
7398 (srv_amd64_linux_regobj): Likewise.
7399 (srv_i386_32bit_xmlfiles): Likewise.
7400 (srv_i386_64bit_xmlfiles): Likewise.
7401 (srv_i386_xmlfiles): Likewise.
7402 (srv_amd64_xmlfiles): Likewise.
7403 (srv_i386_linux_xmlfiles): Likewise.
7404 (srv_amd64_linux_xmlfiles): Likewise.
7405 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7406 srv_xmlfiles to $srv_i386_xmlfiles.
7407 (i[34567]86-*-mingw32ce*): Likewise.
7408 (i[34567]86-*-mingw*): Likewise.
7409 (i[34567]86-*-nto*): Likewise.
7410 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7411 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7412 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7413 (x86_64-*-linux*): Likewise.
7414
7415 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7416 (init_registers_amd64_linux): New.
7417 (x86_arch_setup): Replace init_registers_x86_64_linux with
7418 init_registers_amd64_linux.
7419
193f13e6
MK
74202010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7421
7422 * configure.ac: Check for libdl. If it is not available link against
7423 static libthread_db.
7424 * configure: Regenerate.
7425
85d721b8
PA
74262010-02-22 Pedro Alves <pedro@codesourcery.com>
7427
7428 PR9605
7429
7430 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7431 handing a read watchpoint.
7432 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7433
6076632b
DE
74342010-02-12 Doug Evans <dje@google.com>
7435
7436 * linux-low.c (linux_supports_tracefork_flag): Document.
7437 (linux_look_up_symbols): Add comment.
7438
3327ccf7
L
74392010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7440
7441 * regcache.c (supply_register): Clear regcache if buf is NULL.
7442
0718675c 74432010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7444 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7445
7446 * inferiors.c (find_inferior): Add function documentation.
7447 (unloaded_dll): Handle the case where the unloaded dll has not
7448 been previously registered in the dll list.
7449
177321bd
DJ
74502010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7451
7452 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7453 (thumb2_breakpoint): New.
7454 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7455
2b009048
DJ
74562010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7457
7458 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7459 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7460 breakpoints.
7461
3be029c7
PA
74622010-01-21 Pedro Alves <pedro@codesourcery.com>
7463
7464 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7465
18f5de3b
JK
74662010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7467
7468 * linux-s390-low.c (s390_collect_ptrace_register)
7469 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7470
3743bb4f
DE
74712010-01-21 Doug Evans <dje@google.com>
7472
14ce3065
DE
7473 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7474 (PTRACE_ARG4_TYPE): New macro.
7475 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7476 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7477 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7478 (usr_store_inferior_registers): Ditto.
7479 (linux_read_memory, linux_write_memory): Ditto.
7480 (linux_test_for_tracefork): Ditto.
7481
3743bb4f
DE
7482 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7483 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7484
8b315be5
PA
74852010-01-21 Pedro Alves <pedro@codesourcery.com>
7486
7487 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7488 target.
7489
85492558
PA
74902010-01-21 Pedro Alves <pedro@codesourcery.com>
7491
7492 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7493 prototype to take a regcache. Adjust.
7494
442ea881
PA
74952010-01-20 Pedro Alves <pedro@codesourcery.com>
7496
7497 * regcache.h (struct thread_info): Forward declare.
7498 (struct regcache): New.
7499 (new_register_cache): Adjust prototype.
7500 (get_thread_regcache): Declare.
7501 (free_register_cache): Adjust prototype.
7502 (registers_to_string, registers_from_string): Ditto.
7503 (supply_register, supply_register_by_name, collect_register)
7504 (collect_register_as_string, collect_register_by_name): Ditto.
7505 * regcache.c (struct inferior_regcache_data): Delete.
7506 (get_regcache): Rename to ...
7507 (get_thread_regcache): ... this. Adjust. Switch inferior before
7508 fetching registers.
7509 (regcache_invalidate_one): Adjust.
7510 (regcache_invalidate): Fix prototype.
7511 (new_register_cache): Return the new register cache.
7512 (free_register_cache): Change prototype.
7513 (realloc_register_cache): Adjust.
7514 (registers_to_string): Change prototype to take a regcache. Adjust.
7515 (registers_from_string): Ditto.
7516 (register_data): Ditto.
7517 (supply_register): Ditto.
7518 (supply_register_by_name): Ditto.
7519 (collect_register): Ditto.
7520 (collect_register_as_string): Ditto.
7521 (collect_register_by_name): Ditto.
7522 * server.c (process_serial_event): Adjust.
7523 * linux-low.h (regset_fill_func, regset_store_func): Change
7524 prototype.
7525 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7526 Change prototype.
7527 * linux-low.c (get_stop_pc): Adjust.
7528 (check_removed_breakpoint): Adjust.
7529 (linux_wait_for_event): Adjust.
7530 (linux_resume_one_lwp): Adjust.
7531 (fetch_register): Add regcache parameter. Adjust.
7532 (usr_store_inferior_registers): Ditto.
7533 (regsets_fetch_inferior_registers): Ditto.
7534 (regsets_store_inferior_registers): Ditto.
7535 (linux_fetch_registers, linux_store_registers): Ditto.
7536 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7537 regcache. Adjust.
43aaf8b6
PA
7538 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7539 Ditto.
442ea881
PA
7540 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7541 prototype to take a regcache.
7542 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7543 * remote-utils.c (convert_ascii_to_int, outreg)
7544 (prepare_resume_reply): Change prototype to take a regcache.
7545 Adjust.
7546 * target.h (struct target_ops) <fetch_registers, store_registers>:
7547 Change prototype to take a regcache.
7548 (fetch_inferior_registers, store_inferior_registers): Change
7549 prototype to take a regcache. Adjust.
7550 * proc-service.c (ps_lgetregs): Adjust.
7551 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7552 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7553 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7554 take a regcache. Adjust.
7555 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7556 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7557 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7558 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7559 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7560 (cris_cannot_fetch_register):
7561 (cris_breakpoint_at): Change prototype to take a regcache.
7562 Adjust.
7563 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7564 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7565 to take a regcache. Adjust.
7566 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7567 Adjust.
7568 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7569 take a regcache. Adjust.
7570 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7571 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7572 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7573 * linux-mips-low.c (mips_get_pc):
7574 (mips_set_pc): Change prototype to take a regcache. Adjust.
7575 (mips_reinsert_addr): Adjust.
7576 (mips_collect_register): Change prototype to take a regcache.
7577 Adjust.
7578 (mips_supply_register):
7579 (mips_collect_register_32bit, mips_supply_register_32bit)
7580 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7581 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7582 * linux-ppc-low.c (ppc_supply_ptrace_register)
7583 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7584 (parse_spufs_run): Adjust.
7585 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7586 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7587 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7588 take a regcache. Adjust.
7589 * linux-s390-low.c (s390_collect_ptrace_register)
7590 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7591 (s390_set_pc): Change prototype to take a regcache. Adjust.
7592 (s390_arch_setup): Adjust.
7593 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7594 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7595 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7596 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7597 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7598 regcache. Adjust.
7599 (sparc_breakpoint_at): Adjust.
7600 * linux-xtensa-low.c (xtensa_fill_gregset):
7601 (xtensa_store_gregset):
7602 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7603 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7604 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7605 prototype to take a regcache. Adjust.
7606 * win32-arm-low.c (arm_fetch_inferior_register)
7607 (arm_store_inferior_register): Change prototype to take a
7608 regcache. Adjust.
7609 * win32-i386-low.c (i386_fetch_inferior_register)
7610 (i386_store_inferior_register): Change prototype to take a
7611 regcache. Adjust.
7612 * win32-low.c (child_fetch_inferior_registers)
7613 (child_store_inferior_registers): Change prototype to take a
7614 regcache. Adjust.
7615 (win32_wait): Adjust.
7616 (win32_fetch_inferior_registers): Change prototype to take a
7617 regcache. Adjust.
7618 (win32_store_inferior_registers): Adjust.
7619 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7620 store_inferior_register>: Change prototype to take a regcache.
7621
60c3d7b0
DE
76222010-01-20 Doug Evans <dje@google.com>
7623
7624 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7625 #ifdef.
7626 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7627 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7628
dc146f7c
VP
76292010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7630
7631 * linux-low.c (linux_core_of_thread): New.
7632 (compare_ints, show_process, list_threads): New.
7633 (linux_qxfer_osdata): Report threads and cores.
7634 (linux_target_op): Register linux_core_of_thread.
7635 * remote-utils.c (prepare_resume_reply): Report the core.
7636 (buffer_xml_printf): Support %d specifier.
7637 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7638 New.
7639 (handle_query): Handle qXfer:threads. Announce availability
7640 thereof.
7641 * target.h (struct target_ops): New field core_of_thread.
7642
7803799a
UW
76432010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7644
7645 * Makefile.in (clean): Remove new generated files.
7646 (reg-s390.o, reg-s390.c): Remove rules.
7647 (reg-s390x.o, reg-s390x.c): Likewise.
7648 (s390-linux32.o, s390-linux32.c): Add rules.
7649 (s390-linux64.o, s390-linux64.c): Likewise.
7650 (s390x-linux64.o, s390x-linux64.c): Likewise.
7651 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7652 * linux-s390-low.c: Include <elf.h>.
7653 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7654 (init_registers_s390): Remove prototype.
7655 (init_registers_s390x): Likewise.
7656 (init_registers_s390_linux32): Add prototype.
7657 (init_registers_s390_linux64): Likewise.
7658 (init_registers_s390x_linux64): Likewise.
7659 (s390_num_regs_3264): New define.
7660 (s390_regmap_3264): New global variable.
7661 (s390_cannot_fetch_register): Remove obsolete check.
7662 (s390_cannot_store_register): Likewise.
7663 (s390_collect_ptrace_register): Handle upper/lower register halves.
7664 (s390_supply_ptrace_register): Likewise.
7665 (s390_fill_gregset): Update to register number changes.
7666 (s390_get_hwcap): New routine.
7667 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7668 Install appropriate regmap and register set.
7669
6e7ffa39
JB
76702010-01-01 Joel Brobecker <brobecker@adacore.com>
7671
7672 * server.c (gdbserver_version): Update copyright year to 2010.
7673 * gdbreplay.c (gdbreplay_version): Likewise.
7674
957f3f49
DE
76752009-12-28 Doug Evans <dje@google.com>
7676
7677 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7678 elf/external.h. Include <elf.h> instead but only if necessary.
7679
ca5c370d
PA
76802009-12-28 Pedro Alves <pedro@codesourcery.com>
7681
7682 * linux-low.c (linux_remove_process): Remove `detaching'
7683 parameter. Don't release/detach from thread_db here.
7684 (linux_kill): Release/detach from thread_db here, ...
7685 (linux_detach): ... and here, before actually detaching.
7686 (linux_wait_1): ... and here, when a process exits.
7687 * thread-db.c (any_thread_of): New.
7688 (thread_db_free): Switch the current inferior to a thread of the
7689 passed in process.
7690
4ee62156
DE
76912009-12-21 Doug Evans <dje@google.com>
7692
d90e6a88
DE
7693 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7694
c5f62d5f
DE
7695 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7696 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7697 warning ifndef __NR_tkill. Move setting of errno there too.
7698 Delete unnecessary resetting of errno after syscall.
7699 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7700
10e86dd7
DE
7701 * configure.ac: Check for dladdr.
7702 * config.in: Regenerate.
7703 * configure: Regenerate.
7704 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7705 (try_thread_db_load): Update.
7706
4ee62156
DE
7707 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7708
00f515da
DE
77092009-12-18 Doug Evans <dje@google.com>
7710
e9464885
DE
7711 * event-loop.c: Include unistd.h if it exists.
7712
07d4f67e
DE
7713 * linux-low.c (my_waitpid): Move definition away from being in
7714 between linux_tracefork_child/linux_test_for_tracefork.
7715
00f515da
DE
7716 * gdb_proc_service.h (psaddr_t): Fix type.
7717 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7718 signature to match glibc.
7719
1de1badb
DE
77202009-12-16 Doug Evans <dje@google.com>
7721
7722 * linux-low.c (linux_read_memory): Fix argument to read.
7723
aeeb81d1
PA
77242009-11-26 Pedro Alves <pedro@codesourcery.com>
7725
7726 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7727 events, don't leave current_inferior pointing at null.
7728
10357975
PA
77292009-11-26 Pedro Alves <pedro@codesourcery.com>
7730
7731 * win32-low.c (LOG): Delete.
7732 (OUTMSG): Output to stderr.
7733 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7734 on compile time LOG macro.
7735 (win32_wait): Fix debug output.
7736
cf6e3471
PA
77372009-11-26 Pedro Alves <pedro@codesourcery.com>
7738
7739 * win32-low.c (win32_add_one_solib): If the dll name is
7740 "ntdll.dll", prepend the system directory to the dll path.
7741
0c85e18e
MK
77422009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7743
7744 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7745
9ac544ce 77462009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7747 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7748
7749 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7750 * configure.ac: Check for __mcoldfire__ and set
7751 gdb_cv_m68k_is_coldfire.
7752 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7753 reg-cf.o and reg-m68k.o.
7754 * configure: Regenerated.
7755
fd7dd3e6
PA
77562009-11-16 Pedro Alves <pedro@codesourcery.com>
7757
7758 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7759 Pass it to thread_db_free.
7760 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7761 proper `detaching' argument to linux_remove_process.
7762 * linux-low.h (thread_db_free): Add `detaching' parameter.
7763 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7764 to thread_db_free.
7765 (thread_db_free): Add `detaching' parameter. Only
7766 call td_ta_clear_event if detaching from process.
7767
75aa492e
MK
77682009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7769
7770 * thread-db.c (thread_db_free): Fix typo.
7771
21e1bee4
PP
77722009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7773
7774 PR gdb/10838
7775 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7776
8838b45e
NS
77772009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7778
7779 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7780 with an i686 compiler.
7781 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7782 needed.
7783 * configure: Rebuilt.
7784
8a35fb51
SL
77852009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7786
7787 PR gdb/10783
7788
7789 * server.c (handle_search_memory_1): Correct read_addr initialization
7790 in loop for searching subsequent chunks.
7791
96f15937
PP
77922009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7793
7794 * configure.ac: New --with-libthread-db option.
7795 * thread-db.c: Allow direct dependence on libthread_db.
7796 (thread_db_free): Adjust.
7797 * config.in: Regenerate.
7798 * configure: Likewise.
889bf7c5 7799
5f7d1694
PP
78002009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7801
7802 PR gdb/10757
7803 * thread-db.c (attach_thread): New function.
7804 (maybe_attach_thread): Return success/failure.
7805 (find_new_threads_callback): Adjust.
889bf7c5
PA
7806 (thread_db_find_new_threads): Loop until no new threads.
7807
88e3b899
PA
78082009-10-13 Pedro Alves <pedro@codesourcery.com>
7809
7810 * proc-service.c (ps_lgetregs): Formatting.
7811
cdbfd419
PP
78122009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7813
7814 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7815 * configure.ac: Adjust.
7816 * linux-low.h (struct process_info_private): Move members to struct
7817 thread_db.
7818 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7819 * linux-low.c (linux_remove_process): Adjust.
7820 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7821 * server.c (handle_query): Move code ...
7822 (handle_monitor_command): ... here. New function.
7823 * target.h (struct target_ops): New member.
7824 * thread-db.c (struct thread_db): New.
7825 (libthread_db_search_path): New variable.
7826 (thread_db_create_event, thread_db_enable_reporting)
7827 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7828 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7829 (try_thread_db_load_1, dladdr_to_soname): New functions.
7830 (try_thread_db_load, thread_db_load_search): New functions.
7831 (thread_db_init): Search for libthread_db.
7832 (thread_db_free): New function.
7833 (thread_db_handle_monitor_command): Likewise.
7834 * config.in: Regenerate.
7835 * configure: Regenerate.
889bf7c5 7836
4168d2d6
UW
78372009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7838
7839 * spu-low.c (spu_kill): Wait for inferior to terminate.
7840 Call clear_inferiors.
7841 (spu_detach): Call clear_inferiors.
7842
81ecdfbb
RW
78432009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7844
7845 * aclocal.m4: Regenerate.
7846 * config.in: Likewise.
7847 * configure: Likewise.
7848
0b9ff2c0
UW
78492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7850
7851 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7852 (parse_spufs_run): New function.
7853 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7854 (ppc_breakpoint_at): Handle SPU breakpoints.
7855
efcbbd14
UW
78562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7857
7858 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7859 (SPUFS_MAGIC): Define.
7860 (spu_enumerate_spu_ids): New function.
7861 (linux_qxfer_spu): New function.
7862 (linux_target_ops): Install linux_qxfer_spu.
7863
f4d9bade
UW
78642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7865
7866 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7867 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7868 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7869 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7870 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7871 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7872 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7873 (init_registers_powerpc_cell32l): Add prototype.
7874 (init_registers_powerpc_cell64l): Likewise.
7875 (ppc_arch_setup): Detect Cell/B.E. architecture.
7876
96e946ca
RW
78772009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7878
7879 * Makefile.in (datarootdir): New variable.
7880
58d6951d
DJ
78812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7882
7883 * linux-low.c (linux_write_memory): Update debugging output.
7884 * Makefile.in (clean): Add new descriptions.
7885 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7886 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7887 * configure.srv: Add new files for arm*-*-linux*.
7888 * linux-arm-low.c: Add new declarations.
7889 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7890 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7891 (HWCAP_VFPv3D16): New.
7892 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7893 instead of __IWMMXT__.
7894 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7895 (arm_arch_setup): New.
7896 (target_regsets): Remove #ifdef. Add VFP regset.
7897 (the_low_target): Use arm_arch_setup.
7898
12b42a12
DJ
78992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7900
7901 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7902 the main thread again.
7903
ac8c974e
AR
79042009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7905
7906 Adding Neutrino gdbserver.
7907 * configure: Regenerated.
7908 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7909 * configure.srv (i[34567]86-*-nto*): New target.
7910 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7911 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7912 (nto_comctrl) [__QNX__]: New function.
7913 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7914
4424e0c3 79152009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7916
7917 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7918 srv_tgtobj.
7919
912cf4ba
PA
79202009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7921 Pedro Alves <pedro@codesourcery.com>
7922
7923 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7924 don't support CONTEXT_EXTENDED_REGISTERS.
7925 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7926 (the_low_target): Install them.
7927 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7928 failing with ERROR_PIPE_NOT_CONNECTED.
7929
aa5ca48f
DE
79302009-06-30 Doug Evans <dje@google.com>
7931 Pierre Muller <muller@ics.u-strasbg.fr>
7932
7933 Add h/w watchpoint support to x86-linux, win32-i386.
7934 * Makefile.in (SFILES): Add i386-low.c
7935 (i386_low_h): Define.
7936 (i386-low.o): Add dependencies.
7937 (linux-x86-low.o): Add i386-low.h dependency.
7938 (win32-i386-low.o): Ditto.
7939 * i386-low.c: New file.
7940 * i386-low.h: New file.
7941 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7942 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7943 * linux-low.c (linux_add_process): Initialize arch_private.
7944 (linux_remove_process): Free arch_private.
7945 (add_lwp): Initialize arch_private.
7946 (delete_lwp): Free arch_private.
7947 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7948 provided.
7949 * linux-low.h (process_info_private): New member arch_private.
7950 (lwp_info): New member arch_private.
7951 (linux_target_ops): New members new_process, new_thread,
7952 prepare_to_resume.
7953 (ptid_of): New macro.
7954 * linux-x86-low.c: Include stddef.h, i386-low.h.
7955 (arch_process_info): New struct.
7956 (arch_lwp_info): New struct.
7957 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7958 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7959 (i386_dr_low_get_status): New function.
7960 (x86_insert_point, x86_remove_point): New functions.
7961 (x86_stopped_by_watchpoint): New function.
7962 (x86_stopped_data_address): New function.
7963 (x86_linux_new_process, x86_linux_new_thread): New functions.
7964 (x86_linux_prepare_to_resume): New function.
7965 (the_low_target): Add entries for insert_point, remove_point,
7966 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7967 prepare_to_resume.
7968 * server.c (debug_hw_points): New global.
7969 (monitor_show_help): Document set debug-hw-points.
7970 (handle_query): Process "set debug-hw-points".
7971 * server.h (debug_hw_points): Declare.
7972 (paddress): Declare.
7973 * utils.c (NUMCELLS, CELLSIZE): New macros.
7974 (get_sell, xsnprintf, paddress): New functions.
7975 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7976 remove_point, stopped_by_watchpoint, stopped_data_address.
7977 * win32-i386-low.c: Include i386-low.h.
7978 (debug_reg_state): Replaces dr.
7979 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7980 (i386_dr_low_get_status): New function.
7981 (i386_insert_point, i386_remove_point): New functions.
7982 (i386_stopped_by_watchpoint): New function.
7983 (i386_stopped_data_address): New function.
7984 (i386_initial_stuff): Update.
7985 (get_thread_context,set_thread_context,i386_thread_added): Update.
7986 (the_low_target): Add entries for insert_point,
7987 remove_point, stopped_by_watchpoint, stopped_data_address.
7988 * win32-low.c (win32_insert_watchpoint): New function.
7989 (win32_remove_watchpoint): New function.
7990 (win32_stopped_by_watchpoint): New function.
7991 (win32_stopped_data_address): New function.
7992 (win32_target_ops): Add entries for insert_watchpoint,
7993 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7994 * win32-low.h (win32_target_ops): New members insert_point,
7995 remove_point, stopped_by_watchpoint, stopped_data_address.
7996
d993e290
PA
79972009-06-25 Pedro Alves <pedro@codesourcery.com>
7998
7999 * server.c (process_serial_event): Re-return unsupported, not
8000 error, if the type isn't recognized. Re-allow supporting only
8001 insert or remove packets. Also call require_running for
8002 breakpoints. Add missing break statement to default case. Tidy.
8003 * target.h (struct target_ops): Rename insert_watchpoint to
8004 insert_point, and remove_watchpoint to remove_point.
8005
8006 * linux-low.h (struct linux_target_ops): Likewise.
8007 * linux-low.c (linux_insert_watchpoint): Rename to ...
8008 (linux_insert_point): ... this. Adjust.
8009 (linux_remove_watchpoint): Rename to ...
8010 (linux_remove_point): ... this. Adjust.
8011 (linux_target_ops): Adjust.
8012 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8013 (cris_insert_point): ... this.
8014 (cris_remove_watchpoint): Rename to ...
8015 (cris_remove_point): ... this.
8016 (the_low_target): Adjust.
8017
0f54c268
PM
80182009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8019
8020 * server.c (handle_v_kill): Pass signal_pid to
8021 kill_inferior if multi_process is zero.
8022
c6314022
AR
80232009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8024
8025 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8026 * target.h (target_ops): Comment for *_watchpoint to make it clear
8027 the functions can get types '0' and '1'.
8028
4463ce24
AR
80292009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8030
8031 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8032 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8033 * regcache.c (get_regcache): Likewise.
8034 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8035 * win32-low.c (child_fetch_inferior_registers): Remove check for
8036 regno 0.
8037
cf8fd78b
PA
80382009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8039 Pedro Alves <pedro@codesourcery.com>
8040
8041 * target.h (struct target_ops) <supports_multi_process>: New
8042 callback.
8043 (target_supports_multi_process): New.
8044 * server.c (handle_query): Even if GDB reports support, only
8045 enable multi-process if the target also supports it. Report
8046 multi-process support only if the target backend supports it.
8047 * linux-low.c (linux_supports_multi_process): New function.
8048 (linux_target_ops): Install it as target_supports_multi_process
8049 callback.
8050
47c0c975
DE
80512009-05-24 Doug Evans <dje@google.com>
8052
e09875d4
DE
8053 Global renaming of find_thread_pid to find_thread_ptid.
8054 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8055 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8056 All callers updated.
8057
e27d73f6
DE
8058 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8059 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8060 directly.
8061
47c0c975
DE
8062 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8063 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8064 (linux_resume_one_lwp): Ditto.
8065
2acc282a
DE
80662009-05-23 Doug Evans <dje@google.com>
8067
8068 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8069 from struct inferior_list_entry * to struct lwp_info *.
8070 All callers updated.
8071
9f1036c1
DE
80722009-05-13 Doug Evans <dje@google.com>
8073
8074 * linux-x86-low.c: Don't include assert.h.
8075 (x86_siginfo_fixup): Use fatal, not assert.
8076 (x86_arch_setup): Fix comment.
8077
d0722149
DE
80782009-05-12 Doug Evans <dje@google.com>
8079
8080 Biarch support for i386/amd64 gdbserver.
8081 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8082 Add linux-x86-low.c.
8083 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8084 (linux-x86-low.o): Add.
8085 * linux-x86-64-low.c: Delete.
8086 * linux-i386-low.c: Delete.
8087 * linux-x86-low.c: New file.
8088 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8089 linux-x86-low.o.
8090 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8091 linux-x86-low.o.
8092 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8093 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8094 (linux_child_pid_to_exec_file): New function.
8095 (elf_64_header_p, elf_64_file_p): New functions.
8096 (siginfo_fixup): New function.
8097 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8098 give target a chance to convert layout.
8099 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8100 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8101
fdeb2a12
DE
81022009-05-07 Doug Evans <dje@google.com>
8103
8104 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8105 (regsets_store_inferior_registers): Ditto.
8106
a6dbe5df
PA
81072009-05-06 Pedro Alves <pedro@codesourcery.com>
8108
8109 PR server/10048
8110
8111 * linux-low.c (must_set_ptrace_flags): Delete.
8112 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8113 of the global.
8114 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8115 `lwp->must_set_ptrace_flags' instead.
ba42693b 8116 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8117 (linux_wait_1): ... not here.
8118
5091eb23
DE
81192009-04-30 Doug Evans <dje@google.com>
8120
9f767825
DE
8121 * inferiors.c (started_inferior_callback): New function.
8122 (attached_inferior_callback): New function.
8123 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8124 * server.c (print_started_pid, print_attached_pid): New functions.
8125 (detach_or_kill_for_exit): New function.
8126 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8127 * server.h (have_started_inferiors_p): Declare.
8128 (have_attached_inferiors_p): Declare.
8129
5091eb23
DE
8130 * inferiors.c (remove_process): Fix memory leak, free process.
8131 * linux-low.c (linux_remove_process): New function.
8132 (linux_kill): Call it instead of remove_process.
8133 (linux_detach, linux_wait_1): Ditto.
8134
155c8968
PA
81352009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8136
8137 * configure.srv: Add x86 Windows CE target.
8138
7fe519cb
UW
81392009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8140
8141 * inferiors.c (get_thread_process): Make global.
8142 * server.h (get_thread_process): Add prototype.
8143 * thread-db.c (find_one_thread): Use get_thread_process
8144 instead of current_process.
8145 (thread_db_get_tls_address): Do not crash if called when
8146 thread layer is not yet initialized.
8147
5472f405
UW
81482009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8149
8150 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8151 * spu-low.c (current_tid): Rename to ...
8152 (current_ptid): ... this.
8153 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8154 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8155 ptid_get_lwp (current_ptid) instead of current_tid.
8156 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8157 instead of current_tid. Use find_process_pid to verify pid
8158 argument is valid. Pass proper argument to remove_process.
8159 (spu_thread_alive): Compare current_ptid instead of current_tid.
8160 (spu_resume): Likewise.
8161
55ac2b99
PA
81622009-04-02 Pedro Alves <pedro@codesourcery.com>
8163
8164 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8165 variable.
8166
95954743
PA
81672009-04-01 Pedro Alves <pedro@codesourcery.com>
8168
8169 Implement the multiprocess extensions, and add linux multiprocess
8170 support.
8171
8172 * server.h (ULONGEST): Declare.
8173 (struct ptid, ptid_t): New.
8174 (minus_one_ptid, null_ptid): Declare.
8175 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8176 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8177 (struct inferior_list_entry): Change `id' type from unsigned from
8178 to ptid_t.
8179 (struct sym_cache, struct breakpoint, struct
8180 process_info_private): Forward declare.
8181 (struct process_info): Declare.
8182 (current_process): Declare.
8183 (all_processes): Declare.
8184 (initialize_inferiors): Declare.
8185 (add_thread): Adjust to use ptid_t.
8186 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8187 (add_process, remove_process, find_thread_pid): Declare.
8188 (find_inferior_id): Adjust to use ptid_t.
8189 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8190 (multi_process): Declare.
8191 (push_event): Adjust to use ptid_t.
8192 (read_ptid, write_ptid): Declare.
8193 (prepare_resume_reply): Adjust to use ptid_t.
8194 (clear_symbol_cache): Declare.
8195 * inferiors.c (all_processes): New.
8196 (null_ptid, minus_one_ptid): New.
8197 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8198 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8199 (add_thread): Change unsigned long to ptid. Remove gdb_id
8200 parameter. Adjust.
8201 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8202 (gdb_id_to_thread): Rename to ...
8203 (find_thread_pid): ... this. Change unsigned long to ptid.
8204 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8205 (loaded_dll, pull_pid_from_list): Adjust.
8206 (add_process, remove_process, find_process_pid)
8207 (get_thread_process, current_process, initialize_inferiors): New.
8208 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8209 (struct target_waitstatus) <related_pid>: Ditto.
8210 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8211 return type to int.
8212 (struct target_ops) <join>: Add `pid' argument.
8213 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8214 (struct target_ops) <wait>: Add `ptid' field. Change return type
8215 to ptid.
8216 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8217 (mywait): Add `ptid' argument. Change return type to ptid_t.
8218 (target_pid_to_str): Declare.
8219 * target.c (set_desired_inferior): Adjust to use ptids.
8220 (mywait): Add new `ptid' argument. Adjust.
8221 (target_pid_to_str): New.
8222 * mem-break.h (free_all_breakpoints): Declare.
8223 * mem-break.c (breakpoints): Delelete.
8224 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8225 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8226 to use per-process breakpoint list.
8227 (free_all_breakpoints): New.
8228 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8229 (symbol_cache, all_symbols_looked_up): Delete.
8230 (hexchars): New.
8231 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8232 read_ptid): New.
8233 (prepare_resume_reply): Change ptid argument's type from unsigned
8234 long to ptid_t. Adjust. Implement W;process and X;process.
8235 (free_sym_cache, clear_symbol_cache): New.
8236 (look_up_one_symbol): Adjust to per-process symbol cache. *
8237 * server.c (cont_thread, general_thread, step_thread): Change type
8238 to ptid_t.
8239 (attached): Delete.
8240 (multi_process): New.
8241 (last_ptid): Change type to ptid_t.
8242 (struct vstop_notif) <ptid>: Change type to ptid_t.
8243 (queue_stop_reply, push_event): Change `ptid' argument's type to
8244 ptid_t.
8245 (discard_queued_stop_replies): Add `pid' argument.
8246 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8247 changes. Don't reference the `attached' global.
8248 (attach_inferior): Adjust to mywait interface changes.
8249 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8250 features. Handle and report "multiprocess+". Handle
8251 "qAttached:PID".
8252 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8253 changes.
8254 (handle_v_kill): New.
8255 (handle_v_stopped): Adjust to use target_pid_to_str.
8256 (handle_v_requests): Allow multiple attaches and runs when
8257 multiprocess extensions are in effect. Handle "vKill".
8258 (myresume): Adjust to use ptids.
8259 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8260 (handle_status): Adjust to discard_queued_stop_replies interface
8261 change.
8262 (first_thread_of, kill_inferior_callback)
8263 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8264 (main): Call initialize_inferiors. Adjust to use ptids, killing
8265 and detaching from all inferiors. Handle multiprocess packet
8266 variants.
8267 * linux-low.h: Include gdb_proc_service.h.
8268 (struct process_info_private): New.
8269 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8270 <lwpid_of>: Use ptid_get_lwp.
8271 (get_lwp_thread): Adjust.
8272 (struct lwp_info): Add `dead' member.
8273 (find_lwp_pid): Declare.
8274 * linux-low.c (thread_db_active): Delete.
8275 (new_inferior): Adjust comment.
8276 (inferior_pid): Delete.
8277 (linux_add_process): New.
8278 (handle_extended_wait): Adjust.
8279 (add_lwp): Change unsigned long to ptid.
8280 (linux_create_inferior): Add process to processes table. Adjust
8281 to use ptids. Don't set new_inferior here.
8282 (linux_attach_lwp): Rename to ...
8283 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8284 it. Adjust to use ptids.
8285 (linux_attach_lwp): New.
8286 (linux_attach): Add process to processes table. Don't set
8287 new_inferior here.
8288 (struct counter): New.
8289 (second_thread_of_pid_p, last_thread_of_process_p): New.
8290 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8291 multiple processes.
8292 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8293 processes. Remove process from process table.
8294 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8295 to multiple processes.
8296 (any_thread_of): New.
8297 (linux_detach): Add `pid' argument, and handle it. Remove process
8298 from processes table.
8299 (linux_join): Add `pid' argument. Handle it.
8300 (linux_thread_alive): Change unsighed long argument to ptid_t.
8301 Consider dead lwps as not being alive.
8302 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8303 threads we're not interested in.
8304 (same_lwp, find_lwp_pid): New.
8305 (linux_wait_for_lwp): Change `pid' argument's type from int to
8306 ptid_t. Adjust.
8307 (linux_wait_for_event): Rename to ...
8308 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8309 from int to ptid_t. Adjust.
8310 (linux_wait_for_event): New.
8311 (linux_wait_1): Add `ptid' argument. Change return type to
8312 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8313 that exit from the process table.
8314 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8315 Adjust.
8316 (mark_lwp_dead): New.
8317 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8318 stopping all threads, mark its main lwp as dead.
8319 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8320 ptids.
8321 (fetch_register, usr_store_inferior_registers)
8322 (regsets_fetch_inferior_registers)
8323 (regsets_store_inferior_registers, linux_read_memory)
8324 (linux_write_memory): Inline `inferior_pid'.
8325 (linux_look_up_symbols): Adjust to use per-process
8326 `thread_db_active'.
8327 (linux_request_interrupt): Adjust to use ptids.
8328 (linux_read_auxv): Inline `inferior_pid'.
8329 (initialize_low): Don't reference thread_db_active.
8330 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8331 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8332 (ps_getpid): Return the pid of the current inferior.
8333 * thread-db.c (proc_handle, thread_agent): Delete.
8334 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8335 per-process data.
8336 (find_one_thread): Change argument type to ptid_t. Adjust to
8337 per-process data.
8338 (maybe_attach_thread): Adjust to per-process data and ptids.
8339 (thread_db_find_new_threads): Ditto.
8340 (thread_db_init): Ditto.
8341 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8342 processes table. Adjust to use ptids.
8343 (spu_kill, spu_detach): Adjust interface. Remove process from
8344 processes table.
8345 (spu_join, spu_thread_alive): Adjust interface.
8346 (spu_wait): Adjust interface. Remove process from processes
8347 table. Adjust to use ptids.
8348 * win32-low.c (current_inferior_tid): Delete.
8349 (current_inferior_ptid): New.
8350 (debug_event_ptid): New.
8351 (thread_rec): Take a ptid. Adjust.
8352 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8353 (child_delete_thread): Ditto.
8354 (do_initial_child_stuff): Add `attached' argument. Add process to
8355 processes table.
8356 (child_fetch_inferior_registers, child_store_inferior_registers):
8357 Adjust.
8358 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8359 (win32_attach): Pass 1 to do_initial_child_stuff.
8360 (win32_kill): Adjust interface. Remove process from processes
8361 table.
8362 (win32_detach): Ditto.
8363 (win32_join): Adjust interface.
8364 (win32_thread_alive): Take a ptid.
8365 (win32_resume): Adjust to use ptids.
8366 (get_child_debug_event): Ditto.
8367 (win32_wait): Adjust interface. Remove exiting process from
8368 processes table.
8369
bd99dc85
PA
83702009-04-01 Pedro Alves <pedro@codesourcery.com>
8371
8372 Non-stop mode support.
8373
8374 * server.h (non_stop): Declare.
8375 (gdb_client_data, handler_func): Declare.
8376 (delete_file_handler, add_file_handler, start_event_loop):
8377 Declare.
8378 (handle_serial_event, handle_target_event, push_event)
8379 (putpkt_notif): Declare.
8380 * target.h (enum resume_kind): New.
8381 (struct thread_resume): Replace `step' field by `kind' field.
8382 (TARGET_WNOHANG): Define.
8383 (struct target_ops) <wait>: Add `options' argument.
8384 <supports_non_stop, async, start_non_stop>: New fields.
8385 (target_supports_non_stop, target_async): New.
8386 (start_non_stop): Declare.
8387 (mywait): Add `options' argument.
8388 * target.c (mywait): Add `options' argument. Print child exit
8389 notifications here.
8390 (start_non_stop): New.
8391 * server.c (non_stop, own_buf, mem_buf): New globals.
8392 (struct vstop_notif): New.
8393 (notif_queue): New global.
8394 (queue_stop_reply, push_event, discard_queued_stop_replies)
8395 (send_next_stop_reply): New.
8396 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8397 interface changes.
8398 (attach_inferior): In non-stop mode, don't wait for the target
8399 here.
8400 (handle_general_set): Handle QNonStop.
8401 (handle_query): When handling qC, return the current general
8402 thread, instead of the first thread of the list.
8403 (handle_query): If the backend supports non-stop mode, include
8404 QNonStop+ in the qSupported query response.
8405 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8406 and non-stop mode.
8407 (handle_v_attach, handle_v_run): Handle non-stop mode.
8408 (handle_v_stopped): New.
8409 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8410 (myresume): Adjust to use resume_kind. Handle non-stop.
8411 (queue_stop_reply_callback): New.
8412 (handle_status): Handle non-stop mode.
8413 (main): Clear non_stop flag on reconnection. Use the event-loop.
8414 Refactor serial protocol handling from here ...
8415 (process_serial_event): ... to this new function. When GDB
8416 selects any thread, select one here. In non-stop mode, wait until
8417 GDB acks all pending events before exiting.
8418 (handle_serial_event, handle_target_event): New.
8419 * remote-utils.c (remote_open): Install remote_desc in the event
8420 loop.
8421 (remote_close): Remove remote_desc from the event loop.
8422 (putpkt_binary): Rename to...
8423 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8424 (putpkt_binary): New as wrapper around putpkt_binary_1.
8425 (putpkt_notif): New.
8426 (prepare_resume_reply): In non-stop mode, don't change the
8427 general_thread.
8428 * event-loop.c: New.
8429 * Makefile.in (OBJ): Add event-loop.o.
8430 (event-loop.o): New rule.
8431
8432 * linux-low.h (pid_of): Moved here.
8433 (lwpid_of): New.
8434 (get_lwp_thread): Use lwpid_of.
8435 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8436 * linux-low.c (pid_of): Delete.
8437 (inferior_pid): Use lwpid_of.
8438 (linux_event_pipe): New.
8439 (target_is_async_p): New.
8440 (delete_lwp): New.
8441 (handle_extended_wait): Use lwpid_of.
8442 (add_lwp): Don't set lwpid field.
8443 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8444 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8445 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8446 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8447 first. Adjust to linux_wait_for_event interface changes. Use
8448 lwpid_of.
8449 (linux_detach): Don't delete the main lwp here.
8450 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8451 (status_pending_p): Don't consider explicitly suspended lwps.
8452 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8453 pointer. Add OPTIONS argument. Change return type to int. Use
8454 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8455 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8456 pointer. Add status pointer argument. Return a pid instead of a
8457 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8458 changes. In non-stop mode, don't switch to a random thread.
8459 (linux_wait): Rename to...
8460 (linux_wait_1): ... this. Add target_options argument, and handle
8461 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8462 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8463 clean exit and signal exit code. Don't stop all threads in
8464 non-stop mode. In all-stop mode, only stop all threads when
8465 reporting a stop to GDB. Handle explicit thread stop requests.
8466 (async_file_flush, async_file_mark): New.
8467 (linux_wait): New.
8468 (send_sigstop): Use lwpid_of.
8469 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8470 interface changes. In non-stop mode, don't switch to a random
8471 thread.
8472 (linux_resume_one_lwp): Use lwpid_of.
8473 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8474 (linux_resume_one_thread): ... this. Handle resume_stop. In
8475 non-stop mode, don't look for pending flag in all threads.
8476 (resume_status_pending_p): Don't consider explicitly suspended
8477 threads.
8478 (my_waitpid): Reimplement. Emulate __WALL.
8479 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8480 Use lwpid_of.
8481 (sigchld_handler, linux_supports_non_stop, linux_async)
8482 (linux_start_non_stop): New.
8483 (linux_target_ops): Register linux_supports_non_stop, linux_async
8484 and linux_start_non_stop.
8485 (initialize_low): Install SIGCHLD handler.
8486 * thread-db.c (thread_db_create_event, find_one_thread)
8487 (thread_db_get_tls_address): Use lwpid_of.
8488 * win32-low.c (win32_detach): Adjust to use resume_kind.
8489 (win32_wait): Add `options' argument.
8490 * spu-low.c (spu_resume): Adjust to use resume_kind.
8491 (spu_wait): Add `options' argument.
8492
5b1c542e
PA
84932009-04-01 Pedro Alves <pedro@codesourcery.com>
8494
8495 Decouple target code from remote protocol.
8496
8497 * target.h (enum target_waitkind): New.
8498 (struct target_waitstatus): New.
8499 (struct target_ops) <wait>: Return an unsigned long. Take a
8500 target_waitstatus pointer instead of a char pointer.
8501 (mywait): Likewise.
8502 * target.c (mywait): Change prototype to return an unsigned long.
8503 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8504 * server.h (thread_from_wait, old_thread_from_wait): Delete
8505 declarations.
8506 (prepare_resume_reply): Change prototype to take a
8507 target_waitstatus.
8508 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8509 (last_status, last_ptid): New.
8510 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8511 pid instead of a signal.
8512 (attach_inferior): Remove "status" and "signal" parameters.
8513 Adjust.
8514 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8515 not as an address.
8516 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8517 (handle_v_requests, myresume): Remove "status" and "signal"
8518 parameters. Adjust.
8519 (handle_status): New.
8520 (main): Delete local `status'. Adjust.
8521 * remote-utils.c: Include target.h.
8522 (prepare_resume_reply): Change prototype to take a
8523 target_waitstatus. Adjust.
8524
8525 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8526 interface.
8527 * spu-low.c (spu_wait): Adjust.
8528 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8529 Delete.
8530 (win32_wait): Adjust.
8531
2bd7c093
PA
85322009-04-01 Pedro Alves <pedro@codesourcery.com>
8533
8534 * target.h (struct thread_resume): Delete leave_stopped member.
8535 (struct target_ops): Add a `n' argument to the `resume' callback.
8536 * server.c (start_inferior): Adjust.
8537 (handle_v_cont, myresume): Adjust.
8538 * linux-low.c (check_removed_breakpoint): Adjust to resume
8539 interface change, and to removed leave_stopped field.
8540 (resume_ptr): Delete.
8541 (struct thread_resume_array): New.
8542 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8543 resume interface change.
8544 (linux_continue_one_thread, linux_queue_one_thread)
8545 (resume_status_pending_p): Check if the resume field is NULL
8546 instead of checking the leave_stopped member.
8547 (linux_resume): Adjust to the target resume interface change.
8548 * spu-low.c (spu_resume): Adjust to the target resume interface
8549 change.
8550 * win32-low.c (win32_detach, win32_resume): Ditto.
8551
c35fafde
PA
85522009-04-01 Pedro Alves <pedro@codesourcery.com>
8553
8554 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8555 flag.
8556 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8557 pending.
8558 (linux_continue_one_thread): Only preserve the stepping flag if
8559 there's a pending breakpoint.
8560
0a59d50b
PA
85612009-03-31 Pedro Alves <pedro@codesourcery.com>
8562
8563 * server.c (main): After the inferior having exited, call
8564 remote_close before exiting gdbserver.
8565
f04c6d38
TJB
85662009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8567
8568 Fix size of FPSCR in Power 7 processors.
8569 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8570 (PPC_FEATURE_HAS_DFP): New #define.
8571 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8572 size of the FPSCR.
8573
78e5cee6
PA
85742009-03-23 Pedro Alves <pedro@codesourcery.com>
8575
8576 * server.c (handle_query) Whitespace and formatting.
8577
1b3f6016
PA
85782009-03-22 Pedro Alves <pedro@codesourcery.com>
8579
8580 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8581 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8582 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8583 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8584 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8585 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8586 Makefile.in, configure.ac: Fix whitespace throughout.
8587 * configure: Regenerate.
8588
a07b2135
PA
85892009-03-22 Pedro Alves <pedro@codesourcery.com>
8590
8591 * inferiors.c (find_inferior): Make it safe for the callback
8592 function to delete the currently iterated inferior.
8593
67cc2626
PA
85942009-03-22 Pedro Alves <pedro@codesourcery.com>
8595
8596 * Makefile.in (linuw_low_h): Move higher.
8597 (thread-db.o): Depend on $(linux_low_h).
8598
54a0b537
PA
85992009-03-17 Pedro Alves <pedro@codesourcery.com>
8600
8601 Rename "process" to "lwp" throughout.
8602
8603 * linux-low.c (all_processes): Rename to...
8604 (all_lwps): ... this.
8605 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8606 (add_process): Rename to ...
8607 (add_lwp): ... this. Adjust.
8608 (linux_create_inferior): Adjust.
8609 (linux_attach_lwp): Adjust.
8610 (linux_attach): Adjust.
8611 (linux_kill_one_process): Rename to ...
8612 (linux_kill_one_lwp): ... this. Adjust.
8613 (linux_kill): Adjust.
8614 (linux_detach_one_process): Rename to ...
8615 (linux_detach_one_lwp): ... this. Adjust.
8616 (linux_detach): Adjust.
8617 (check_removed_breakpoint): Adjust.
8618 (status_pending_p): Adjust.
8619 (linux_wait_for_process): Rename to ...
8620 (linux_wait_for_lwp): ... this. Adjust.
8621 (linux_wait_for_event): Adjust.
8622 (send_sigstop): Adjust.
8623 (wait_for_sigstop): Adjust.
8624 (stop_all_processes): Rename to ...
8625 (stop_all_lwps): ... this.
8626 (linux_resume_one_process): Rename to ...
8627 (linux_resume_one_lwp): ... this. Adjust.
8628 (linux_set_resume_request, linux_continue_one_thread)
8629 (linux_queue_one_thread, resume_status_pending_p)
8630 (usr_store_inferior_registers, regsets_store_inferior_registers)
8631 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8632 Adjust.
8633 * linux-low.h (get_process): Rename to ...
8634 (get_lwp): ... this. Adjust.
8635 (get_thread_process): Rename to ...
8636 (get_thread_lwp): ... this. Adjust.
8637 (get_process_thread): Rename to ...
8638 (get_lwp_thread): ... this. Adjust.
8639 (struct process_info): Rename to ...
8640 (struct lwp_info): ... this.
8641 (all_processes): Rename to ...
8642 (all_lwps): ... this.
8643 * proc-service.c (ps_lgetregs): Adjust.
8644 * thread-db.c (thread_db_create_event, find_one_thread)
8645 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8646
0b16c5cf
PA
86472009-03-14 Pedro Alves <pedro@codesourcery.com>
8648
8649 * server.c (handle_query): Handle "qAttached".
8650
32de4b9d
NS
86512009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8652
8653 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8654 GPLv3, update license URL.
8655
2aecd87f
DE
86562009-03-01 Doug Evans <dje@google.com>
8657
93efd302 8658 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8659 (server_h): Add gdb_signals.h.
8660 (signals.o): Update.
8661 * server.h (target_signal_from_host,target_signal_to_host_p)
8662 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8663
86b1f9c5
PM
86642009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8665
8666 * remote-utils.c (getpkt): Also generate remote-debug
8667 information if noack_mode is set.
8668
4aa995e1
PA
86692009-02-06 Pedro Alves <pedro@codesourcery.com>
8670
8671 * server.c (handle_query): Report qXfer:siginfo:read and
8672 qXfer:siginfo:write as supported and handle them.
8673 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8674 * linux-low.c (linux_xfer_siginfo): New.
8675 (linux_target_ops): Set it.
8676
62709adf
PA
86772009-01-26 Pedro Alves <pedro@codesourcery.com>
8678
8679 * server.c (gdbserver_usage): Mention --remote-debug.
8680 (main): Accept '--remote-debug' switch.
8681
aef93bd7
DE
86822009-01-18 Doug Evans <dje@google.com>
8683
8684 * regcache.c (new_register_cache): No need to check result of xcalloc.
8685 * server.c (handle_search_memory): Back out calls to xmalloc,
8686 result is checked and error is returned to user upon failure.
8687 (handle_query): Ditto. Add more checks for result of malloc.
8688 (handle_v_cont): Check result of malloc, report error back to
8689 user upon failure.
8690 (handle_v_run): Ditto. Call freeargv.
8691 * server.h (freeargv): Declare.
8692 * utils.c (freeargv): New fn.
8693
54363045
DE
86942009-01-15 Doug Evans <dje@google.com>
8695
f626972c
DE
8696 * gdbreplay.c (perror_with_name): Make arg const char *.
8697 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8698 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8699 * utils.c (perror_with_name): Make arg const char *.
54363045 8700
18aae699
PA
87012009-01-14 Pedro Alves <pedro@codesourcery.com>
8702
8703 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8704 when handling a EXIT_PROCESS_DEBUG_EVENT.
8705
ff703abe
JB
87062009-01-06 Joel Brobecker <brobecker@adacore.com>
8707
8708 * gdbreplay.c (gdbreplay_version): Update copyright year.
8709 * server.c (gdbserver_version): Likewise.
8710
f21cc1a2 87112009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8712
8713 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8714 (handle_extended_wait): Improve comment.
0e21c1ec 8715
bca929d3
DE
87162008-12-13 Doug Evans <dje@google.com>
8717
8718 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8719 * server.h (ATTR_MALLOC): New macro.
8720 (xmalloc,xcalloc,xstrdup): Declare.
8721 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8722 * inferiors.c: Ditto.
8723 * linux-low.c: Ditto.
8724 * mem-break.c: Ditto.
8725 * regcache.c: Ditto.
8726 * remote-utils.c: Ditto.
8727 * server.c: Ditto.
8728 * target.c: Ditto.
8729 * win32-low.c: Ditto.
8730
97438e3f
DE
87312008-12-12 Doug Evans <dje@google.com>
8732
896c7fbb
DE
8733 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8734 in debugging printf.
8735
97438e3f
DE
8736 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8737
e3b886f8
DE
87382008-12-09 Doug Evans <dje@google.com>
8739
8740 * linux-low.h (struct process_info): Delete member tid, unused.
8741 * thread-db.c (find_one_thread): Update.
8742 (maybe_attach_thread): Update.
8743
07e059b5
VP
87442008-12-02 Pedro Alves <pedro@codesourcery.com>
8745
889bf7c5
PA
8746 * target.h (struct target_ops): Add qxfer_osdata member.
8747 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8748 and dirent.h.
8749 (linux_qxfer_osdata): New functions.
8750 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8751 callback.
8752 * server.c (handle_query): Handle "qXfer:osdata:read:".
8753 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8754 (buffer_xml_printf): New functions.
8755 * server.h (struct buffer): New.
8756 (buffer_grow_str, buffer_grow_str0): New macros.
8757 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8758 (buffer_xml_printf): Declare.
07e059b5 8759
4cab47ab
DE
87602008-11-24 Doug Evans <dje@google.com>
8761
8762 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8763
f142445f
DJ
87642008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8765
8766 * server.c (handle_v_run): Always use the supplied argument list.
8767
d0107bb6 87682008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8769
d0107bb6
BW
8770 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8771 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8772
2c4ad781
TJB
87732008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8774
8775 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8776 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8777 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8778 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8779 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8780 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8781 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8782 XML target descriptions.
8783 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8784 when inferior is running on an ISA 2.05 or later processor. Add
8785 special case to return offset for full 64-bit slot of FPSCR when
8786 in 32-bits.
8787
dfb64f85
DJ
87882008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8789
8790 * Makefile.in (SFILES, clean): Added sparc64 files.
8791 (reg-sparc64.o, reg-sparc64.c): New.
8792 * configure.srv (sparc*-*-linux*): New configuration.
8793 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8794 syscall arguments for SPARC.
8795 (regsets_store_inferior_registers): Likewise.
8796 * linux-sparc-low.c: New file.
8797
66b6e1dd
DE
87982008-10-21 Doug Evans <dje@google.com>
8799
8800 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8801 (READLINE_DIR,READLINE_DEP): Delete.
8802 (INTERNAL_CFLAGS): Update.
8803 (LINTFLAGS): Update.
8804
9b710a42
PA
88052008-10-10 Pedro Alves <pedro@codesourcery.com>
8806
8807 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8808 whole argv from the last run, not just argv[0].
8809
5822d809
PA
88102008-09-08 Pedro Alves <pedro@codesourcery.com>
8811
8812 * regcache.c (new_register_cache): Return NULL if the register
8813 cache size isn't known yet.
8814 (free_register_cache): Avoid dereferencing a NULL regcache.
8815
74aac56f
DJ
88162008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8817
8818 * configure.srv: Merge MIPS and MIPS64.
8819
400b20f5
MR
88202008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8821
8822 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8823
677c5bb1
LM
88242008-08-18 Luis Machado <luisgpm@br.ibm.com>
8825
8826 * Makefile.in: Add required vsx dependencies.
8827
8828 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8829 Declare init_registers_powerpc_vsx32l.
8830 Declare init_registers_powerpc_vsx64l.
8831 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8832 (ppc_arch_setup): Check for VSX in hwcap.
8833 (ppc_fill_vsxregset): New function.
8834 (ppc_store_vsxregset): New function.
8835 Add new VSX entry in regset_info target_regsets.
8836
8837 * configure.srv: Add new VSX dependencies.
8838
a6f3e723
SL
88392008-08-12 Pedro Alves <pedro@codesourcery.com>
8840
8841 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8842 (remote_open): Set or clear transport_is_reliable.
8843 (putpkt_binary): Don't expect acks in noack mode.
8844 (getpkt): Don't send ack/nac in noack mode.
8845 * server.c (handle_general_set): Handle QStartNoAckMode.
8846 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8847 qSupported.
8848 (main): Reset noack_mode on every connection.
8849 * server.h (noack_mode): Declare.
8850
a417dc56
RW
88512008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8852
8853 * Makefile.in (GDBREPLAY_OBS): New variable.
8854 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8855
3221518c
UW
88562008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8857 Daniel Jacobowitz <dan@codesourcery.com>
8858
8859 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8860 (usr_store_inferior_registers): Likewise.
8861 (regsets_store_inferior_registers): Likewise.
8862
ec56be1b
PA
88632008-07-31 Rolf Jansen <rj@surtec.com>
8864 Pedro Alves <pedro@codesourcery.com>
8865
8866 * configure.ac: Check for memmem declaration.
8867 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8868 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8869 (disable_packet_qfThreadInfo): Unconditionally compile.
8870 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8871 * configure, config.in: Regenerate.
8872
2fe5e3ff
DE
88732008-07-28 Doug Kwan <dougkwan@google.com>
8874
8875 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8876 (linux_write_memory): Remove declaration of errno.
8877
836acd6d
UW
88782008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8879
8880 * linux-low.c (handle_extended_wait): Do not use "status"
8881 variable uninitialized.
8882
aeba519e
PA
88832008-07-07 Pedro Alves <pedro@codesourcery.com>
8884
8885 * server.c (handle_v_attach): Inhibit reporting dll changes.
8886
db42f210
PA
88872008-06-27 Pedro Alves <pedro@codesourcery.com>
8888
8889 * remote-utils.c (prepare_resume_reply): If requested, don't
8890 output "thread:TID" in the T stop reply.
8891
8892 * server.c (disable_packet_vCont, disable_packet_Tthread)
8893 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8894 (handle_query): If requested, disable support for qC, qfThreadInfo
8895 and qsThreadInfo.
8896 (handle_v_requests): If requested, disable support for vCont.
8897 (gdbserver_show_disableable): New.
8898 (main): Handle --disable-packet and --disable-packet=LIST.
8899
8900 * server.h (disable_packet_vCont, disable_packet_Tthread)
8901 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8902
8e4c5421
CD
89032008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8904
8905 * server.c (gdbserver_usage): Mention --version.
8906
6e23a804
DJ
89072008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8908
8909 * Makefile.in (gdbreplay.o): New rule.
8910
90aa6a40
JM
89112008-06-06 Joseph Myers <joseph@codesourcery.com>
8912
8913 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8914 message, not gdbserver.
8915
c16158bc 89162008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8917 Nathan Sidwell <nathan@codesourcery.com>
8918 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8919
8920 * acinclude.m4: Include ../../config/acx.m4.
8921 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8922 * configure, config.in: Regenerate.
8923 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8924 * server.c (gdbserver_version): Print PKGVERSION.
8925 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8926 (main): Adjust gdbserver_usage calls.
8927 * gdbreplay.c (version, host_name): Add declarations.
8928 (gdbreplay_version, gdbreplay_usage): New.
8929 (main): Accept --version and --help options.
8930
aeb75bf5
DJ
89312008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8932
8933 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8934 (arm_breakpoint_at): Handle Thumb.
8935 (the_low_target): Add comment.
8936
76b233dd
UW
89372008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8938
8939 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8940
08388c79
DE
89412008-05-09 Doug Evans <dje@google.com>
8942
a3c83fae
DE
8943 * server.h (decode_search_memory_packet): Declare.
8944 * remote-utils.c (decode_search_memory_packet): New fn.
8945 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8946 (handle_search_memory): New fn.
8947 (handle_query): Process qSearch:memory packets.
8948
bb9c3d36
UW
89492008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8950
8951 * regcache.c (registers_length): Remove.
8952 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8953 full register packet.
8954 * regcache.h (registers_length): Remove prototype.
8955 * server.h (PBUFSIZ): Define to 16384.
8956
7284e1be
UW
89572008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8958
8959 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8960 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8961 powerpc-64l.o, and powerpc-altivec64l.o.
8962 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8963 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8964 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8965 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8966 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8967 to srv_xmlfiles.
8968
8969 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8970 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8971 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8972 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8973 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8974 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8975 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8976 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8977 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8978 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8979 (clean): Update.
8980
8981 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8982 (init_registers_powerpc_32l): ... this new prototype.
8983 (init_registers_powerpc_32): Remove, replace by ...
8984 (init_registers_powerpc_altivec32l): ... this new prototype.
8985 (init_registers_powerpc_e500): Remove, replace by ...
8986 (init_registers_powerpc_e500l): ... this new prototype.
8987 (init_registers_ppc64): Remove, replace by ...
8988 (init_registers_powerpc_64l): ... this new prototype.
8989 (init_registers_powerpc_64): Remove, replace by ...
8990 (init_registers_powerpc_altivec64l): ... this new prototype.
8991 (ppc_num_regs): Set to 73.
8992 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8993 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8994 (ppc_cannot_store_register): Handle orig_r3 and trap.
8995 (ppc_arch_setup): Update init_registers_... calls.
8996 (ppc_fill_gregset): Handle orig_r3 and trap.
8997
8998 * inferiors.c (clear_inferiors): Reset current_inferior.
8999
fdc59709
PB
90002008-04-23 Paolo Bonzini <bonzini@gnu.org>
9001
889bf7c5
PA
9002 * acinclude.m4: Add override.m4.
9003 * configure: Regenerate.
fdc59709 9004
c9b2f845
UW
90052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9006
9007 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9008 initial call to init_register_ppc64.
9009
550512b8
UW
90102008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9011
43aaf8b6
PA
9012 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9013 single powerpc*-*-linux* case.
550512b8
UW
9014 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9015
b6430ec3
UW
90162008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9017
9018 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9019 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9020 from reg_xmlfiles.
9021 * linux-ppc-low.c: Include <elf.h>.
9022 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9023 (ppc_hwcap): New global variable.
9024 (ppc_regmap): Remove __SPE__ #ifdef sections.
9025 (ppc_regmap_e500): New global variable.
9026 (ppc_cannot_store_register): Update __SPE__ special case.
9027 (ppc_get_hwcap): New function.
9028 (ppc_arch_setup): Use it to determine whether inferior supports
9029 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9030 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9031 Do not access registers if target does not support AltiVec.
9032 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9033 Do not access registers if target does not support SPE.
9034 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9035
52fa2412
UW
90362008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9037
9038 * linux-low.c (disabled_regsets, num_regsets): New.
9039 (use_regsets_p): Delete.
9040 (linux_wait_for_process): Clear disabled_regsets.
9041 (regsets_fetch_inferior_registers): Check and set it.
9042 (regsets_store_inferior_registers): Likewise.
9043 (linux_fetch_registers, linux_store_registers): Do not use
9044 use_regsets_p.
9045 (initialize_low): Allocate disabled_regsets.
9046
e28b3332
DJ
90472008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9048
9049 * Makefile.in (LIBOBJS): New.
9050 (OBS): Use LIBOBJS.
9051 (memmem.o): New rule.
9052 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9053 * configure: Regenerated.
9054
4536995d
UW
90552008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9056
9057 * server.c (handle_query): Never return "unsupported" for
9058 qXfer:features:read queries.
9059
221c031f
UW
90602008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9061
9062 * server.c (get_features_xml): Fix inverted condition.
9063 (handle_query): Always support qXfer:feature:read.
9064
ccd213ac
DJ
90652008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9066
9067 * server.c (wrapper_argv): New.
9068 (start_inferior): Handle wrapper_argv. If set, expect an extra
9069 trap.
9070 (gdbserver_usage): Document --wrapper.
9071 (main): Parse --wrapper.
9072
6fe305f7
UW
90732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9074
9075 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9076 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9077 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9078 (ppc_set_pc): Likewise.
9079 (ppc_arch_setup): New function.
9080 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9081 of collect_register.
889bf7c5 9082 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9083
5b0a002e
UW
90842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9085
9086 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9087 instead of linux-ppc64-low.o.
9088 * linux-ppc64-low.c: Remove file.
9089 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9090 (linux-ppc64-low.o): Remove rule.
9091
9092 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9093 (init_registers_powerpc_64): Likewise.
9094 (ppc_regmap): Conditionally define depending on __powerpc64__.
9095 (ppc_cannot_store_register): Do not special-case "fpscr" when
9096 compiled on __powerpc64__.
9097 (ppc_collect_ptrace_register): New function.
9098 (ppc_supply_ptrace_register): New function.
9099 (ppc_breakpoint): Change type to "unsigned int".
9100 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9101 (the_low_target): Conditionally provide initializers for the
889bf7c5 9102 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9103 collect_ptrace_register and supply_ptrace_register members.
9104
9b4b61c8
UW
91052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9106
9107 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9108 * server.c (gdbserver_xmltarget): Define.
9109 (get_features_xml): Use it to replace "target.xml" and arch_string.
9110
9111 * configure.srv: Remove srv_xmltarget. Add XML files that were
9112 mentioned there to srv_xmlfiles instead. Remove conditional tests
9113 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9114 srv_xmlfiles and srv_regobj to include all possible choices.
9115 * configure.ac (srv_xmltarget): Remove.
9116 (srv_xmlfiles): Do not add "target.xml".
9117 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9118 checks for supplementary target information.
9119 * configure: Regenerate.
9120 * Makefile.in (XML_TARGET): Remove.
9121 (target.xml): Remove rule.
9122 (clean): Do not clean up target.xml.
9123 (.PRECIOUS): Do not mention target.xml.
9124
9125 * target.h (struct target_ops): Remove arch_string member.
9126 * linux-low.c (linux_arch_string): Remove.
9127 (linux_target_ops): Remove arch_string initializer.
9128 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9129 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9130 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9131 * spu-low.c (spu_arch_string): Remove.
9132 (spu_target_ops): Remove arch_string initializer.
9133 * win32-low.c (win32_arch_string): Remove.
9134 (win32_target_ops): Remove arch_string initializer.
9135 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9136 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9137 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9138
ee1a7ae4
UW
91392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9140
9141 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9142 by collect_ptrace_register and supply_ptrace_register hooks.
9143 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9144 instead of checking for the_low_target.left_pad_xfer.
9145 (usr_store_inferior_registers): Use collect_ptrace_register callback
9146 instead of checking for the_low_target.left_pad_xfer.
9147
9148 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9149 (s390_supply_ptrace_register): Likewise.
9150 (s390_fill_gregset): Call s390_collect_ptrace_register.
9151 (the_low_target): Update.
9152
9153 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9154 (ppc_supply_ptrace_register): Likewise.
9155 (the_low_target): Update.
9156
9157 * linux-i386-low.c (the_low_target): Update.
9158 * linux-x86-64-low.c (the_low_target): Update.
9159
d61ddec4
UW
91602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9161
9162 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9163 reg-s390.o and reg-s390x.o.
9164
9165 * linux-low.c (new_inferior): New global variable.
9166 (linux_create_inferior, linux_attach): Set it.
9167 (linux_wait_for_process): Call the_low_target.arch_setup after the
9168 target has stopped for the first time.
9169 (initialize_low): Do not call the_low_target.arch_setup.
9170
9171 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9172 (s390_set_pc): Likewise.
9173 (s390_arch_setup): New function.
9174 (the_low_target): Use s390_arch_setup as arch_setup routine.
9175
9176 * regcache.c (realloc_register_cache): New function.
9177 (set_register_cache): Call it for each existing regcache.
9178
d05b4ac3
UW
91792008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9180
9181 * server.h (init_registers): Remove prototype.
9182
9183 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9184 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9185 instead of init_registers ().
9186 * linux-arm-low.c (init_registers_arm): Add prototype.
9187 (init_registers_arm_with_iwmmxt): Likewise.
9188 (the_low_target): Add initializer for arch_setup field.
9189 * linux-cris-low.c (init_registers_cris): Add prototype.
9190 (the_low_target): Add initializer for arch_setup field.
9191 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9192 (the_low_target): Add initializer for arch_setup field.
9193 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9194 (the_low_target): Add initializer for arch_setup field.
9195 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9196 (the_low_target): Add initializer for arch_setup field.
9197 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9198 (the_low_target): Add initializer for arch_setup field.
9199 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9200 (the_low_target): Add initializer for arch_setup field.
9201 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9202 (init_registers_mips64_linux): Likewise.
9203 (the_low_target): Add initializer for arch_setup field.
9204 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9205 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9206 (the_low_target): Add initializer for arch_setup field.
9207 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9208 (init_registers_powerpc_64): Likewise.
9209 (the_low_target): Add initializer for arch_setup field.
9210 * linux-s390-low.c (init_registers_s390): Add prototype.
9211 (init_registers_s390x): Likewise.
9212 (the_low_target): Add initializer for arch_setup field.
9213 * linux-sh-low.c (init_registers_sh): Add prototype.
9214 (the_low_target): Add initializer for arch_setup field.
9215 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9216 (the_low_target): Add initializer for arch_setup field.
9217 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9218 (the_low_target): Add initializer for arch_setup field.
9219
9220 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9221 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9222 instead of init_registers ().
9223 * win32-arm-low.c (init_registers_arm): Add prototype.
9224 (the_low_target): Add initializer for arch_setup field.
9225 * win32-i386-low.c (init_registers_i386): Add prototype.
9226 (the_low_target): Add initializer for arch_setup field.
9227
9228 * spu-low.c (init_registers_spu): Add prototype.
9229 (initialize_low): Call initialie_registers_spu () instead of
9230 initialize_registers ().
9231
fd96d250
PA
92322008-02-19 Pedro Alves <pedro@codesourcery.com>
9233
9234 * server.c (handle_v_requests): When handling the vRun and vAttach
9235 packets, if already debugging a process, don't kill it. Return an
9236 error instead.
9237
d41b6bb4
DJ
92382008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9239
9240 * server.c (handle_query): Correct length check.
9241
5ac588cf
PA
92422008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9243
9244 * win32-low.c (do_initial_child_stuff): Add process handle
9245 parameter. Set current_process_handle and current_process_id from the
9246 parameters. Clear globals.
9247 (win32_create_inferior): Don't set current_process_handle and
9248 current_process_id here. Instead pass them on the call to
9249 do_initial_child_stuff.
9250 (win32_attach): Likewise.
9251 (win32_clear_inferiors): New.
9252 (win32_kill): Don't close the current process handle or the
9253 current thread handle here. Instead call win32_clear_inferiors.
9254 (win32_detach): Don't open a new handle to the process. Call
9255 win32_clear_inferiors.
9256 (win32_join): Don't rely on current_process_handle; open a new
9257 handle using the process id.
9258 (win32_wait): Call win32_clear_inferiors when the inferior process
9259 has exited.
9260
ecd7ecbc
DJ
92612008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9262
9263 * server.c (monitor_show_help): Add "exit".
9264
1525d545
MG
92652008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9266
ecd7ecbc 9267 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9268 (clean): Add reg-xtensa.c.
9269 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9270 * configure.srv (xtensa*-*-linux*) New target.
9271 * linux-xtensa-low.c: New.
9272 * xtensa-xtregs.c: New.
1525d545 9273
59a016f0
PA
92742008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9275
9276 * hostio.c: Don't include errno.h.
9277 (errno_to_fileio_errno): Move to hostio-errno.
9278 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9279 error number outputting to the target->hostio_last_error callback.
9280 (hostio_packet_error): Use FILEIO_EINVAL directly.
9281 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9282 calls to hostio_error.
9283 * hostio-errno.c: New.
9284 * server.h (hostio_last_error_from_errno): Declare.
9285 * target.h (target_ops): Add hostio_last_error member.
9286 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9287 as hostio_last_error handler.
889bf7c5 9288 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9289 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9290 (wince_hostio_last_error): New functions.
9291 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9292 as hostio_last_error handler.
9293 (win32_target_ops) [!_WIN32_WCE]: Register
9294 hostio_last_error_from_errno as hostio_last_error handler.
9295 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9296 (hostio-errno.o): New rule.
9297 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9298 * configure.srv (srv_hostio_err_objs): New variable. Default to
9299 hostio-errno.o.
9300 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9301 * configure: Regenerate.
9302
2d717e4f
DJ
93032008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9304
9305 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9306 (linux_kill, linux_detach): Clean up the process list.
9307 * remote-utils.c (remote_open): Improve port number parsing.
9308 (putpkt_binary, input_interrupt): Only send interrupts if the target
9309 is running.
9310 * server.c (extended_protocol): Make static.
9311 (attached): Define earlier.
9312 (exit_requested, response_needed, program_argv): New variables.
9313 (target_running): New.
9314 (start_inferior): Clear attached here.
9315 (attach_inferior): Set attached here.
9316 (require_running): Define.
9317 (handle_query): Use require_running and target_running. Implement
9318 "monitor exit".
9319 (handle_v_attach, handle_v_run): New.
9320 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9321 (gdbserver_usage): Update.
9322 (main): Redo argument parsing. Handle --debug and --multi. Handle
9323 --attach along with other options or after the port. Save
9324 program_argv. Support no initial program. Resynchronize
9325 communication with GDB after an error. Handle "monitor exit".
9326 Use require_running and target_running. Always allow the extended
9327 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9328 restart in extended mode.
9329 * README: Refer to the GDB manual. Update --attach usage.
9330
7407e2de
AS
93312007-12-20 Andreas Schwab <schwab@suse.de>
9332
9333 * linux-low.c (STACK_SIZE): Define.
9334 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9335 (linux_test_for_tracefork): Likewise.
9336
b65d95c5
DJ
93372007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9338
9339 * linux-low.c (linux_wait_for_event): Update messages. Do not
9340 reinsert auto-delete breakpoints.
9341 * mem-break.c (struct breakpoint): Change return type of handler to
9342 int.
9343 (set_breakpoint_at): Update handler type.
9344 (reinsert_breakpoint_handler): Return 1 instead of calling
9345 delete_breakpoint.
9346 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9347 setting a new one.
9348 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9349 * mem-break.h (set_breakpoint_at): Update handler type.
9350 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9351 * win32-low.c (auto_delete_breakpoint): New.
9352 (get_child_debug_event): Use it.
9353
4e799345
DJ
93542007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9355
9356 * configure.ac: Check for pread and pwrite.
9357 * hostio.c (handle_pread): Fall back to lseek and read.
9358 (handle_pwrite): Fall back to lseek and write.
9359 * config.in, configure: Regenerated.
9360
27524b67
DJ
93612007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9362
9363 * server.c (myresume): Add own_buf argument.
9364 (main): Update calls.
9365
a20d5e98
DJ
93662007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9367
9368 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9369 * remote-utils.c (remote_open): Do not call disable_async_io.
9370 (block_async_io): Delete.
9371 (unblock_async_io): Make static.
9372 (initialize_async_io): New.
9373 * server.c (handle_v_cont): Handle async I/O here.
9374 (myresume): Likewise. Move other common resume tasks here...
9375 (main): ... from here. Call initialize_async_io. Disable async
9376 I/O before the main loop.
9377 * server.h (initialize_async_io): Declare.
9378 (block_async_io, unblock_async_io): Delete prototypes.
9379 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9380
b79d787e
DJ
93812007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9382
9383 * remote-utils.c (readchar): Allow binary data in received messages.
9384
d97903b2
PA
93852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9386
9387 * win32-low.c (attaching): New global.
9388 (win32_create_inferior): Clear the `attaching' global.
9389 (win32_attach): Set the `attaching' global.
9390 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9391 attaching. Only set a breakpoint at the entry point if not
9392 attaching.
9393
311de423
PA
93942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9395
9396 * server.c (main): Don't report dll events on the initial
9397 connection on attaches.
9398
6c2d16d2
PA
93992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9400
9401 * server.c (main): Relax numerical bases supported for the pid of
9402 the --attach command line argument.
9403
5ca906e6
PA
94042007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9405
9406 * win32-low.c (win32_attach): Call OpenProcess before
9407 DebugActiveProcess, not after. Add last error output to error
9408 call.
9409
9c6c8194
PA
94102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9411
9412 * win32-low.c (win32_get_thread_context)
9413 (win32_set_thread_context): New functions.
9414 (thread_rec): Use win32_get_thread_context.
9415 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9416 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9417 field.
9418
4d5d1aaa
PA
94192007-12-03 Leo Zayas
9420 Pedro Alves <pedro_alves@portugalmail.pt>
9421
9422 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9423 global variables.
9424 (child_add_thread): Minor cleanup.
9425 (child_continue): Resume artificially suspended threads before
9426 calling ContinueDebugEvent.
9427 (suspend_one_thread): New.
9428 (fake_breakpoint_event): New.
9429 (get_child_debug_event): Change return type to int. Check here if
9430 gdb sent an interrupt request. If a soft interrupt was requested,
9431 fake a breakpoint event. Return 0 if there is no event to handle,
9432 and 1 otherwise.
9433 (win32_wait): Don't check here if gdb sent an interrupt request.
9434 Ensure there is a valid event to handle.
9435 (win32_request_interrupt): Add soft interruption method as last
9436 resort.
9437
c436e841
PA
94382007-12-03 Leo Zayas
9439 Pedro Alves <pedro_alves@portugalmail.pt>
9440
9441 * win32-low.h (win32_thread_info): Add descriptions to the
9442 structure members. Replace `suspend_count' counter by a
9443 `suspended' flag.
9444 * win32-low.c (thread_rec): Update condition of when to get the
9445 context from the inferior. Rely on ContextFlags being set if it
9446 has already been retrieved. Only suspend the inferior thread if
9447 we haven't already. Warn if that fails.
9448 (continue_one_thread): s/suspend_count/suspended/. Only call
9449 ResumeThread once. Warn if that fails.
9450
e7b5fa67
PA
94512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9452
9453 * win32-low.c (win32_wait): Don't read from the inferior when it
9454 has already exited.
9455
a385171d
PA
94562007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9457
9458 * Makefile.in (win32_low_h): New variable.
9459 (win32-low.o): Add dependency on $(win32_low_h).
9460 (win32-arm-low.o, win32-i386-low.o): New rules.
9461
f80c84b3
DJ
94622007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9463
9464 * hostio.c: Correct copyright year.
9465
a6b151f1
DJ
94662007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9467
9468 * Makefile.in (OBS): Add hostio.o.
9469 (hostio.o): New rule.
9470 * server.h (handle_vFile): Declare.
9471 * hostio.c: New file.
9472 * server.c (handle_v_requests): Take packet_len and new_packet_len
9473 for binary packets. Call handle_vFile.
9474 (main): Update call to handle_v_requests.
9475
f9387fc3
DJ
94762007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9477
9478 * linux-low.c: Include <sched.h>.
9479
51c2684e
DJ
94802007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9481
9482 * linux-low.c (linux_tracefork_grandchild): New.
9483 (linux_tracefork_child): Use clone.
9484 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9485
75f83163
JB
94862007-10-31 Joel Brobecker <brobecker@adacore.com>
9487
9488 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9489
da5898ce
DJ
94902007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9491
9492 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9493
24a09b5f
DJ
94942007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9495
9496 * inferiors.c (change_inferior_id): Delete.
9497 (add_pid_to_list, pull_pid_from_list): New.
9498 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9499 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9500 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9501 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9502 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9503 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9504 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9505 (using_threads): Always set to 1.
9506 (handle_extended_wait): New.
9507 (add_process): Do not set TID.
9508 (linux_create_inferior): Set must_set_ptrace_flags.
9509 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9510 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9511 (linux_thread_alive): Rename TID argument to LWPID.
9512 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9513 (linux_wait_for_event): Do not use TID or check using_threads. Update
9514 call to dead_thread_notify. Call handle_extended_wait.
9515 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9516 (send_sigstop): Delete sigstop_sent.
9517 (wait_for_sigstop): Avoid TID.
9518 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9519 (linux_test_for_tracefork): New.
9520 (linux_lookup_signals): Use thread_db_active and
9521 linux_supports_tracefork_flag.
9522 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9523 * linux-low.h (get_process_thread): Avoid TID.
9524 (struct process_ifo): Move thread_known and tid to the end. Remove
9525 sigstop_sent.
9526 (linux_attach_lwp, thread_db_init): Update prototypes.
9527 * server.h (change_inferior_id): Delete prototype.
9528 (add_pid_to_list, pull_pid_from_list): New prototypes.
9529 * thread-db.c (thread_db_use_events): New.
9530 (find_first_thread): Rename to...
9531 (find_one_thread): ...this. Update callers and messages. Do not
9532 call fatal. Check thread_db_use_events. Do not call
9533 change_inferior_id or new_thread_notify.
9534 (maybe_attach_thread): Update. Do not call new_thread_notify.
9535 (thread_db_init): Set thread_db_use_events. Check use_events.
9536 * utils.c (fatal, warning): Correct message prefix.
9537
30ed0a8f
DJ
95382007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9539
9540 * Makefile.in (clean): Remove new files.
9541 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9542 (powerpc-64.o, powerpc-64.c): New rules.
9543 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9544 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9545 with SPE.
9546 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9547 SPE targets.
9548 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9549 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9550 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9551 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9552 (target_regsets): Add AltiVec and SPE register sets.
9553 * configure.ac: Check for AltiVec and SPE.
9554 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9555 (ppc_fill_vrregset, ppc_store_vrregset): New.
9556 (target_regsets): Add AltiVec register set.
9557 * configure: Regenerated.
9558
fd462a61
DJ
95592007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9560
9561 * linux-low.c (O_LARGEFILE): Define.
9562 (linux_read_memory): Use /proc/PID/mem.
9563 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9564 * configure, config.in: Regenerated.
9565
69f223ed
DJ
95662007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9567
9568 * linux-low.c (linux_wait_for_event): Do not pass signals while
9569 single-stepping.
9570
aec18585
PA
95712007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9572
9573 * win32-low.c (create_process): New.
9574 (win32_create_inferior): Use create_process instead of
9575 CreateProcess. If create_process failed retry appending an ".exe"
9576 suffix. Store the GetLastError result immediatelly after
9577 create_process calls and use it on the call to error.
9578
34d86ddd
PA
95792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9580
9581 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9582
5a0e3bd0
JB
95832007-08-23 Joel Brobecker <brobecker@adacore.com>
9584
9585 * configure.ac: Switch license to GPLv3.
9586
f88c79e6
MS
95872007-08-01 Michael Snyder <msnyder@access-company.com>
9588
9589 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9590
6b3d9b83
PA
95912007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9592
9593 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9594 typedef.
9595 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9596 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9597 CloseToolhelp32Snapshot.
9598 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9599 CloseToolhelp32Snapshot.
9600
c588c53c
MS
96012007-07-27 Michael Snyder <michael.snyder@access-company.com>
9602
9603 * server.c (main): Check for inferior exit before main loop.
9604
aa0403d9
PA
96052007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9606
9607 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9608 instead of on tmp_desc.
9609
255e7678
DJ
96102007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9611 Daniel Jacobowitz <dan@codesourcery.com>
9612
9613 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9614 (add_thread): Minor cleanups.
9615 (clear_inferiors): Move lower in the file. Clear the DLL
9616 list.
9617 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9618 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9619 (xml_escape_text): New.
9620 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9621 for qSupported.
9622 (handle_v_cont): Report errors.
9623 (gdbserver_version): Update.
9624 (main): Correct size of own_buf. Do not report initial DLL events.
9625 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9626 (unloaded_dll, xml_escape_text): New.
9627 * win32-low.c (enum target_waitkind): Update comments.
9628 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9629 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9630 (win32_EnumProcessModules, win32_GetModuleInformation)
9631 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9632 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9633 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9634 (win32_Module32First, win32_Module32Next, load_toolhelp)
9635 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9636 (get_child_debug_event): Handle DLL events.
9637 (win32_wait): Likewise.
9638
0d37add9
DJ
96392007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9640
9641 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9642 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9643
45e2715e
PA
96442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9645
9646 * win32-low.c (handle_output_debug_string): Ignore event if not
9647 waiting.
9648
c5674cf1
PA
96492007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9650
9651 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9652
2bbe3cc1
DJ
96532007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9654
9655 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9656
ae13219e
DJ
96572007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9658
9659 * inferiors.c (change_inferior_id): Add comment.
9660 * linux-low.c (check_removed_breakpoint): Add an early
9661 prototype. Improve debug output.
9662 (linux_attach): Doc update.
9663 (linux_detach_one_process, linux_detach): Clean up before releasing
9664 each process.
9665 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9666 * linux-low.h (struct process_info): Doc improvement.
9667 * mem-break.c (delete_all_breakpoints): New.
9668 * mem-break.h (delete_all_breakpoints): New prototype.
9669 * thread-db.c (find_first_thread): New.
9670 (thread_db_create_event): Call it instead of
9671 thread_db_find_new_threads. Clean up unused variables.
9672 (maybe_attach_thread): Remove first thread handling.
9673 (thread_db_find_new_threads): Use find_first_thread.
9674 (thread_db_get_tls_address): Likewise.
9675
4105de34
DJ
96762007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9677
9678 * thread-db.c (thread_db_find_new_threads): Add prototype.
9679 (thread_db_create_event): Check for the main thread before adding
9680 a new thread.
9681 (maybe_attach_thread): Only enable event reporting if TID == 0.
9682 (thread_db_get_tls_address): Check for new threads.
9683
2b876972
DJ
96842007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9685
9686 * linux-low.c (linux_create_inferior): Try execv before execvp.
9687 * spu-low.c (spu_create_inferior): Likewise.
9688
7a245884
DJ
96892007-06-13 Mike Frysinger <vapier@gentoo.org>
9690
9691 * linux-low.c (linux_create_inferior): Change execv to execvp.
9692 * spu-low.c (spu_create_inferior): Likewies.
9693
117ce543
DJ
96942007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9695
9696 * Makefile.in (clean): Clean new files instead of deleted ones.
9697 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9698 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9699 rules.
9700 * configure.srv: Specify XML files and new regformats for MIPS and
9701 MIPS64 GNU/Linux.
9702 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9703 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9704 an entry for the restart register.
9705 (mips_cannot_fetch_register, mips_cannot_store_register)
9706 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9707 register names to match the XML descriptions.
9708 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9709 restart register instead of $0.
9710
0e7f50da
UW
97112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9712 Markus Deuling <deuling@de.ibm.com>
9713
9714 * remote-utils.c (decode_xfer_write): New function.
9715 * server.h (decode_xfer_write): Add prototype.
9716 * server.c (handle_query): Add PACKET_LEN argument. Support
9717 qXfer:spu:read and qXfer:spu:write packets.
9718 (main): Pass packet_len to handle_query.
9719 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9720 * target.h (target_ops): Add qxfer_spu.
9721
374c1d38
UW
97222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9723
9724 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9725 accessing non-seekable spufs files.
9726
bb63802a
UW
97272007-05-16 Markus Deuling <deuling@de.ibm.com>
9728
889bf7c5 9729 * server.c (handle_query): Add reply for qC packet.
bb63802a 9730
7390519e
PA
97312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9732 Leo Zayas <lerele@champenstudios@com>
9733
9734 * server.h (check_remote_input_interrupt_request): New function.
9735 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9736 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9737 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9738 (check_remote_input_interrupt_request): New function.
9739 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9740 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9741 winapi_GenerateConsoleCtrlEvent): New typedefs.
9742 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9743 to 250 ms.
9744 (win32_wait): Check for remote interrupt request
9745 with check_remote_input_interrupt_request.
9746 (win32_request_interrupt): New function.
9747 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9748
34b34921
PA
97492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9750
9751 * win32-low.c (debug_registers_changed,
9752 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9753 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9754 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9755 (thread_rec): Get context using the low target.
9756 (child_add_thread): Call thread_added on the low target,
9757 which does the same thing.
9758 (regptr): Delete.
9759 (do_initial_child_stuff): Remove debug registers references.
9760 Set context using the low target. Resume threads after
9761 setting the contexts.
9762 (child_continue): Remove dead variable. Remove debug
9763 registers references.
9764 (child_fetch_inferior_registers): Go through the low target.
9765 (do_child_store_inferior_registers): Remove.
9766 (child_store_inferior_registers): Go through the low target.
9767 (win32_resume): Remove debug registers references.
9768 Set context using the low target.
9769 (handle_exception): Change return type to void. Don't record
9770 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9771 first chance exception.
889bf7c5 9772 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9773 goto loop. Always return after waiting for debug event.
9774 (win32_wait): Convert to switch statement. Handle spurious
9775 events.
9776
9777 * win32-i386-low.c (debug_registers_changed,
9778 debug_registers_used): New.
9779 (initial_stuff): Rename to ...
9780 (i386_initial_stuff): ... this. Clear debug registers
9781 state variables.
9782 (store_debug_registers): Delete.
9783 (i386_get_thread_context): New.
9784 (load_debug_registers): Delete.
9785 (i386_set_thread_context): New.
9786 (i386_thread_added): New.
9787 (single_step): Rename to ...
9788 (i386_single_step): ... this.
9789 (do_fetch_inferior_registers): Rename to ...
9790 (i386_fetch_inferior_register): ... this.
9791 (i386_store_inferior_register): New.
9792 (the_low_target): Adapt to new interface.
9793
9794 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9795 (arm_get_thread_context): New.
9796 (arm_set_thread_context): New.
9797 (regptr): New.
9798 (do_fetch_inferior_registers): Rename to ...
9799 (arm_fetch_inferior_register): ... this.
9800 (arm_store_inferior_register): New.
9801 (arm_wince_breakpoint): Reimplement as unsigned long.
9802 (arm_wince_breakpoint_len): Define.
9803 (the_low_target): Adapt to new interface.
9804
9805 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9806 load_debug_registers. Add get_thread_context, set_thread_context,
9807 thread_added and store_inferior_register. Rename
9808 fetch_inferior_registers to fetch_inferior_register.
9809 (regptr): Remove declaration.
9810
dd6953e1
PA
98112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9812
9813 * linux-low.c (linux_detach): Change return type to int. Return 0.
9814 * spu-low.c (spu_detach): Likewise.
9815
444d6139
PA
98162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9817
9818 * target.h (target_ops): Change return type of detach to int.
9819 Add join.
9820 (join_inferior): New.
9821 * server.c (main): Don't skip detach support on mingw32.
9822 If the inferior doesn't support detaching return error.
9823 Call join_inferior instead of using waitpid.
9824 * linux-low.c (linux_join): New.
9825 (linux_target_op): Add linux_join.
9826 * spu-low.c (spu_join): New.
9827 (spu_target_ops): Add spu_join.
9828 * win32-low.c (win32_detach): Adapt to new interface.
9829 Reopen current_process_handle before detaching. Issue a child
9830 resume before detaching.
9831 (win32_join): New.
9832 (win32_target_op): Add win32_join.
9833
1d5315fe
PA
98342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9835
9836 * win32-low.c (win32-attach): Fix return value.
9837 * target.h (target_ops): Describe ATTACH return values.
9838
bf914831
PA
98392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9840
9841 * win32-low.c (GETPROCADDRESS): Define.
9842 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9843 (winapi_DebugSetProcessKillOnExit): Likewise.
9844 (win32_create_inferior): Force usage of ansi CreateProcessA.
9845 (win32_attach): Use GETPROCADDRESS.
9846 (win32_detach): Likewise.
9847
f72f3e60
PA
98482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9849
9850 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9851
ed50f18f
PA
98522007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9853
9854 * win32-low.c: Commit leftover changes from 2007-03-29.
9855
0c2ead7e
DJ
98562007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9857
9858 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9859 fields short instead of int. Add explicit padding.
9860 (i387_cache_to_fsave): Remove unnecessary casts.
9861 (i387_fsave_to_cache): Doc fix.
9862 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9863
73725ff3
DJ
98642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9865
9866 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9867 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9868
d99f33d8
PA
98692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9870
9871 * configure.srv (arm*-*-mingw32ce*): Move near the other
9872 arm targets.
9873
68070c10
PA
98742007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9875
2482afc6 9876 * configure.ac: Add errno checking.
68070c10
PA
9877 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9878 sys/file.h and malloc.h.
9879 (AC_CHECK_DECLS): Add perror.
9880 (srv_mingwce): Handle.
2482afc6 9881 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9882 win32-i386-low.o to srv_tgtobj.
9883 (i[34567]86-*-mingw*): Likewise.
9884 (arm*-*-mingw32ce*): Add case.
9885 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9886 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9887 [__MINGW32CE__] (strerror): New function.
9888 [__MINGW32CE__] (errno): Define to GetLastError.
9889 [__MINGW32CE__] (COUNTOF): New macro.
9890 (remote_open): Remove extra close call.
9891 * mem-break.c (delete_breakpoint_at): New function.
9892 * mem-break.h (delete_breakpoint_at): Declare.
9893 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9894 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9895 [USE_WIN32API] (read, write): Add char* casts.
9896 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9897 * server.h: Include wincecompat.h on Windows CE.
9898 [HAVE_ERRNO_H]: Check.
9899 (perror): Declare if not declared.
9900 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9901 (perror_with_name): Remove errno declaration.
9902 * wincecompat.h: New.
9903 * wincecompat.c: New.
9904 * win32-low.h: New.
9905 * win32-arm-low.c: New.
9906 * win32-i386-low.c: New.
9907 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9908 (OUTMSG2): Make it safe.
9909 (_T): New macro.
9910 (COUNTOF): New macro.
9911 (NUM_REGS): Get it from the low target.
9912 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9913 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9914 (thread_rec): Let low target handle debug registers.
9915 (child_add_thread): Likewise.
9916 (child_init_thread_list): Likewise.
9917 (continue_one_thread): Likewise.
9918 (regptr): New.
9919 (do_child_fetch_inferior_registers): Move to ...
9920 * win32-i386-low.c: ... here, and rename to ...
9921 (do_fetch_inferior_registers): ... this.
889bf7c5 9922 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9923 Go through the low target.
9924 (do_child_store_inferior_registers): Use regptr.
9925 (strwinerror): New function.
9926 (win32_create_inferior): Handle Windows CE.
9927 Use strwinerror instead of strerror on Windows error
9928 codes. Add program to the error output.
9929 Don't close the main thread handle on Windows CE.
9930 (win32_attach): Use coredll.dll on Windows CE.
9931 (win32_kill): Close current process and current
9932 thread handles.
9933 (win32_detach): Use coredll.dll on Windows CE.
9934 (win32_resume): Let low target handle debug registers, and
9935 step request.
9936 (handle_exception): Add/Remove initial breakpoint. Avoid
9937 non-existant WSTOPSIG on Windows CE.
9938 (win32_read_inferior_memory): Cast to remove warning.
9939 (win32_arch_string): Go through the low target.
9940 (initialize_low): Call set_breakpoint_data with the low
9941 target's breakpoint.
9942 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9943 FOP_REGNUM, mappings): Move to ...
9944 * win32-i386-low.c: ... here.
9945 * win32-low.c (win32_thread_info): Move to ...
9946 * win32-low.h: ... here.
9947 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9948 win32-arm-low.c and wincecompat.c.
9949 (all:): Add $EXEEXT.
9950 (install-only:): Likewise.
9951 (gdbserver:): Likewise.
9952 (gdbreplay:): Likewise.
9953 * config.in: Regenerate.
9954 * configure: Regenerate.
9955
41093d81
PA
99562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9957
9958 * win32-low.c: Rename typedef thread_info to
9959 win32_thread_info throughout.
9960
544afa54
PA
99612007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9962
9963 * win32-i386-low.c: Rename to ...
9964 * win32-low.c: ... this.
9965 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9966 * Makefile.in: Likewise.
9967
bce7165d
PA
99682007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9969
9970 * remote-utils.c (monitor_output): Constify msg parameter.
9971 * server.h (monitor_output): Likewise.
9972 * win32-i386-low.c (handle_output_debug_string): New.
9973 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9974 handle_output_debug_string.
9975 (get_child_debug_event): Likewise.
9976
506c7aa0
DJ
99772007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9978
9979 * server.c (main): Correct strtoul check.
9980
42c81e2a
DJ
99812007-03-27 Jon Ringle <jon@ringle.org>
9982
9983 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9984
9453113a
DJ
99852007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9986
9987 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9988
64a69107
DJ
99892007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * terminal.h: Check HAVE_SGTTY_H.
9992
99932007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9994
9995 * remote-utils.c (remote_open): Print out the assigned port number.
9996
c74d0ad8
DJ
99972007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * remote-utils.c (monitor_output): New function.
10000 * server.c (debug_threads): Define here.
10001 (monitor_show_help): New function.
10002 (handle_query): Handle qRcmd.
10003 (main): Do not handle 'd' packet.
10004 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10005 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10006 of debug_threads.
10007
de7c3b4a
PA
100082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10009
10010 * Makefile.in (EXEEXT): New.
10011 (clean): Use $(EXEEXT).
10012
ef57601b
PA
100132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10014
10015 * target.h (target_ops): Rename send_signal to request_interrupt,
10016 and remove enum target_signal parameter.
10017 * linux-low.c (linux_request_interrupt): Rename from
10018 linux_send_signal, and always send SIGINT.
10019 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10020 and always send SIGINT.
10021 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10022 of send_signal.
10023 (input_interrupt): Likewise.
10024
820f2bda
PA
100252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10026
10027 * server.c (get_features_xml): Check if target implemented
10028 arch_string.
10029 * win32-i386-low.c (win32_arch_string): New.
10030 (win32_target_ops): Add win32_arch_string as arch_string member.
10031
ab39bf24
UW
100322007-02-22 Markus Deuling <deuling@de.ibm.com>
10033
10034 * spu-low.c (spu_arch_string): New.
10035 (spu_target_ops): Add spu_arch_string.
10036
61ff6e04
DJ
100372007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10038
10039 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10040 * configure.ac: Do not check for terminal.h.
10041 * configure, config.in: Regenerated.
10042
fb1e4ffc
DJ
100432007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10044
10045 * Makefile.in (OBS): Add $(XML_BUILTIN).
10046 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10047 (clean): Update.
10048 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10049 (arm-with-iwmmxt.c): New.
10050 * config.in, configure: Regenerate.
10051 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10052 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10053 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10054 (arm*-*-linux*): Add iWMMXt and regset support.
10055 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10056 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10057 (arm_store_wmmxregset, target_regsets): New.
10058 * server.c (get_features_xml): Take annex argument. Check builtin
10059 XML documents.
10060 (handle_query): Handle multiple annexes.
10061
0f48aa01
DJ
100622007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10063
10064 * remote-utils.c [USE_WIN32API] (read, write): Define.
10065 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10066 write.
10067
23181151
DJ
100682007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10069
10070 * linux-i386-low.c (the_low_target): Set arch_string.
10071 * linux-x86-64-low.c (the_low_target): Likewise.
10072 * linux-low.c (linux_arch_string): New.
10073 (linux_target_ops): Add it.
10074 * linux-low.h (struct linux_target_ops): Add arch_string.
10075 * server.c (write_qxfer_response): Use const void * for DATA.
10076 (get_features_xml): New.
10077 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10078 * target.h (struct target_ops): Add arch_string method.
10079
9d606399
DJ
100802007-01-03 Denis Pilat <denis.pilat@st.com>
10081 Daniel Jacobowitz <dan@codesourcery.com>
10082
10083 * linux-low.c (linux_kill): Handle being called with no threads.
10084 * win32-i386-low.c (win32_kill): Likewise.
10085 (get_child_debug_event): Clear current_process_handle.
10086
100872006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10088 Daniel Jacobowitz <dan@codesourcery.com>
10089
10090 * remote-utils.c (remote_open): Check the type of specified
10091 serial port devices before opening them.
10092 * server.c (main): Kill the inferior if an error occurs during
10093 the first remote_open.
10094
a5e13d24
DJ
100952006-12-05 Markus Deuling <deuling@de.ibm.com>
10096
10097 * README: Update supported targets.
10098
186947f7
DJ
100992006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10100
10101 * Makefile.in (clean): Remove reg-mips64.c.
10102 (reg-mips64.c, reg-mips64.o): New rules.
10103 * configure.srv: Handle mips64. Include regset support for mips.
10104 * linux-mips-low.c (union mips_register): New.
10105 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10106 (mips_breakpoint, mips_breakpoint_at): Use int.
10107 (mips_collect_register, mips_supply_register)
10108 (mips_collect_register_32bit, mips_supply_register_32bit)
10109 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10110 (mips_store_fpregset, target_regsets): New.
10111 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10112
a13e2c95
UW
101132006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10114
10115 * configure.srv: Add target "spu*-*-*".
10116 * Makefile.in (clean): Remove reg-spu.c.
10117 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10118 * spu-low.c: New file.
10119
cb7283db
DJ
101202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * configure.ac: Correct td_thr_tls_get_addr test.
10123 * configure: Regenerated.
10124
89be2091
DJ
101252006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10126
10127 * linux-low.c (linux_wait_for_event): Reformat. Use the
10128 pass_signals array.
10129 * remote-utils.c (decode_address_to_semicolon): New.
10130 * server.c (pass_signals, handle_general_set): New.
10131 (handle_query): Mention QPassSignals for qSupported.
10132 (main): Call handle_general_set.
10133 * server.h (pass_signals, decode_address_to_semicolon): New.
10134
000ef4f0
DJ
101352006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10136
10137 * server.c (handle_query): Correct error handling for read_auxv.
10138
b7149293
UW
101392005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10140
10141 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10142 and srv_linux_thread_db to yes.
10143 * linux-s390-low.c (s390_fill_gregset): New function.
10144 (target_regsets): Define data structure.
10145
dae5f5cf
DJ
101462006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10147
10148 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10149 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10150 * config.in, configure: Regenerated.
10151 * inferiors.c (gdb_id_to_thread): New function.
10152 (gdb_id_to_thread_id): Use it.
10153 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10154 * linux-low.h (struct process_info): Add th member.
10155 (thread_db_get_tls_address): New prototype.
10156 * remote-utils.c (decode_address): Make non-static.
10157 * server.c (handle_query): Handle qGetTLSAddr.
10158 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10159 * target.h (struct target_ops): Add get_tls_address.
10160 * thread-db.c (maybe_attach_thread): Save the thread handle.
10161 (thread_db_get_tls_address): New.
10162
32ca6d61
DJ
101632006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10164
10165 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10166 (linux_resume_one_process): Take a siginfo_t *. Update all
10167 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10168 (struct pending_signals): Add a siginfo_t.
10169 (linux_wait_for_process): Always set last_status.
10170 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10171 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10172 * linux-low.h (struct process_info): Add last_status.
10173
5ffff7c1
DJ
101742006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10175
10176 * remote-utils.c (try_rle): New function.
10177 (putpkt_binary): Use it.
10178
8695c747
DJ
101792006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10180
10181 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10182 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10183 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10184 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10185 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10186 point registers.
10187
290fadea
RS
101882006-08-08 Richard Sandiford <richard@codesourcery.com>
10189
10190 * server.c (terminal_fd): New variable.
10191 (old_foreground_pgrp): Likewise.
10192 (restore_old_foreground_pgrp): New function.
10193 (start_inferior): Record the terminal file descriptor in terminal_fd
10194 and its original foreground group in old_foreground_pgrp. Register
10195 restore_old_foreground_pgrp with atexit().
10196
9f2e1e63
DJ
101972006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10198
10199 * server.c (handle_query): Correct qPart to qXfer.
10200
b80864fb
DJ
102012006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10202
10203 * configure.ac: Check for more headers which are missing on
10204 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10205 * configure.srv: Add Cygwin and mingw32.
10206 * remote-utils.c: Don't include headers unconditionally which
10207 are missing on mingw32. Include <winsock.h> for mingw32.
10208 (remote_open): Adjust for mingw32 support. Flush
10209 standard error after writing to it.
10210 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10211 (unblock_async_io, enable_async_io, disable_async_io)
10212 (readchar, getpkt): Update for Winsock support.
10213 (prepare_resume_reply): Expect a protocol signal number.
10214 * server.c: Disable <sys/wait.h> on mingw32.
10215 (start_inferior): Adjust for mingw32 support. Flush
10216 standard error after writing to it.
10217 (attach_inferior): Likewise. Use protocol signal
10218 numbers.
10219 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10220 and names.
10221 * win32-i386-low.c: New file.
10222 * Makefile.in (XM_CLIBS): Set.
10223 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10224 (win32-i386-low.o): New dependency rule.
10225 * linux-low.c (linux_wait): Use target signal numbers.
10226 * target.h (struct target_ops): Doc fix.
10227 * server.h (target_signal_to_name): New prototype.
10228 * gdbreplay.c: Don't include headers unconditionally which
10229 are missing on mingw32. Include <winsock.h> for mingw32.
10230 (remote_close, remote_open): Adjust for Winsock support.
10231 * configure, config.in: Regenerated.
10232
0876f84a
DJ
102332006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10234
10235 * server.c (decode_xfer_read, write_qxfer_response): New.
10236 (handle_query): Take a packet length argument. Handle
10237 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10238 the qSupported response.
10239 (main): Update call to handle_query.
10240
01f9e8fa
DJ
102412006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10242
10243 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10244 (putpkt_binary): Renamed from putpkt and adjusted for binary
10245 data.
10246 (putpkt): New wrapper for putpkt_binary.
10247 (readchar): Don't mask off the high bit.
10248 (decode_X_packet): New function.
10249 * server.c (main): Call putpkt_binary if a handler sets the packet
10250 length. Save the length of the incoming packet. Handle 'X'.
10251 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10252
be2a5f71
DJ
102532006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10254
10255 * server.c (handle_query): Handle qSupported.
10256
ea025f5f
DJ
102572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10258
10259 * remote-utils.c (all_symbols_looked_up): New variable.
10260 (look_up_one_symbol): Check it.
10261 * server.h (look_up_one_symbol): New declaration.
10262 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10263
9308fc88
DJ
102642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10265
10266 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10267 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10268 (PTRACE_GET_THREAD_AREA): Define.
10269 (ps_get_thread_area): New function.
10270
52fb6437
NS
102712006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10272
10273 * configure.srv (m68k*-*-uclinux*): New target.
10274 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10275 (linux_resume_one_process): Remove extraneous cast.
10276 (linux_read_offsets): New.
10277 (linux_target_op): Add linux_read_offsets on mmuless systems.
10278 * server.c (handle_query): Add qOffsets logic.
10279 * target.h (struct target_ops): Add read_offsets.
10280
21b0f40c
DJ
102812006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10284 (PTRACE_GET_THREAD_AREA): Define.
10285 (ps_get_thread_area): New function.
10286 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10287 (linux-x86-64-low.o): Update.
10288
0050a760
DJ
102892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10290
10291 * configure.ac: Remove checks for prfpregset_t.
10292 * gdb_proc_service.h: New file.
10293 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10294 new "gdb_proc_service.h".
10295 * proc-service.c: Likewise.
10296 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10297 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10298 * Makefile.in (gdb_proc_service_h): Updated.
10299 * configure, config.in: Regenerated.
10300
b92a518e
DJ
103012006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * remote-utils.c (prepare_resume_reply): Move declaration
10304 of gdb_id_from_wait to the top of the block.
10305
545587ee
DJ
103062006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10307
10308 * linux-low.c (regsets_store_inferior_registers): Read the regset
10309 from the target before filling it.
10310
9db87ebd
DJ
103112006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10312
10313 * server.c (attach_inferior): Return SIGTRAP for a successful
10314 attach.
10315
dd24457d
DJ
103162006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10317
10318 * Makefile.in (OBS): Add version.o.
10319 (STAGESTUFF): Delete.
10320 (version.o): Add dependencies.
10321 (version.c): Replace rule.
10322 (clean): Remove version.c.
10323 * server.c (gdbserver_version): New.
10324 (gdbserver_usage): Use printf.
10325 (main): Handle --version and --help.
10326 * server.h (version, host_name): Add declarations.
10327
6f0f660e
EZ
103282005-12-23 Eli Zaretskii <eliz@gnu.org>
10329
889bf7c5
PA
10330 * linux-arm-low.c:
10331 * linux-arm-low.c:
10332 * inferiors.c:
10333 * i387-fp.h:
10334 * i387-fp.c:
10335 * gdbreplay.c:
10336 * regcache.c:
10337 * proc-service.c:
10338 * mem-break.h:
10339 * mem-break.c:
10340 * linux-x86-64-low.c:
10341 * linux-sh-low.c:
10342 * linux-s390-low.c:
10343 * linux-ppc64-low.c:
10344 * linux-ppc-low.c:
10345 * linux-mips-low.c:
10346 * linux-m68k-low.c:
10347 * linux-m32r-low.c:
10348 * linux-low.h:
10349 * linux-low.c:
10350 * linux-ia64-low.c:
10351 * linux-i386-low.c:
10352 * linux-crisv32-low.c:
10353 * thread-db.c:
10354 * terminal.h:
10355 * target.h:
10356 * target.c:
10357 * server.h:
10358 * server.c:
10359 * remote-utils.c:
10360 * regcache.h:
10361 * utils.c:
10362 * Makefile.in:
10363 * configure.ac:
6f0f660e
EZ
10364 * gdbserver.1: Add (C) after Copyright. Update the FSF
10365 address.
10366
9d1fb177
DJ
103672005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10370 (arm_breakpoint_at): Recognize both breakpoints.
10371 (the_low_target): Use the correct breakpoint instruction.
10372
011a70c2
DJ
103732005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10374
10375 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10376 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10377 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10378 (the_low_target): Update.
10379
7fb85e41
AS
103802005-10-25 Andreas Schwab <schwab@suse.de>
10381
10382 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10383
10384 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10385 (ia64_num_regs): Reduce to 462.
10386
3db0444b
DJ
103872005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10388
10389 * acinclude.m4: Correct quoting.
10390 * aclocal.m4: Regenerated.
10391
10392 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10393 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10394 (thread_db_init): Call thread_db_err_str.
10395 * configure.ac: Check for TD_VERSION.
10396 * config.in, configure: Regenerated.
10397
bee0189a
DJ
103982005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10399
10400 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10401
e9d25b98
DJ
104022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10403
10404 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10405 is not available. Define HAVE_PTRACE_GETREGS if it is.
10406 * config.in, configure: Regenerated.
10407 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10408 * linux-i386-low.c, linux-m68k-low.c: Update to use
10409 HAVE_PTRACE_GETREGS.
10410 * linux-low.c (regsets_fetch_inferior_registers)
10411 (regsets_store_inferior_registers): Only return 0 if we processed
10412 GENERAL_REGS.
10413 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10414 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10415
a06660f7
DJ
104162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10417
10418 * inferiors.c (struct thread_info): Add gdb_id.
10419 (add_thread): Add gdb_id argument.
10420 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10421 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10422 calls to add_thread.
10423 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10424 * server.c (handle_query): Use thread_to_gdb_id.
10425 (handle_v_cont, main): Use gdb_id_to_thread_id.
10426 * server.h (add_thread): Update prototype.
10427 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10428 prototypes.
10429
5a1f5858
DJ
104302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10433 left-padded registers.
10434 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10435 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10436
e122f1f5
SE
104372005-07-01 Steve Ellcey <sje@cup.hp.com>
10438
10439 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10440 * configure: Regenerate.
10441 * config.in: Regenerate.
10442 * server.h (NEED_DECLARATION_STRERROR):
10443 Replace with !HAVE_DECL_STRERROR.
10444
d592fa2f
DJ
104452005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10446
10447 * linux-low.c (linux_wait, linux_send_signal): Don't test
10448 an unsigned long variable for > 0 if it could be MAX_ULONG.
10449 * server.c (myresume): Likewise.
10450 * target.c (set_desired_inferior): Likewise.
10451
ccbd4912
MK
104522005-06-13 Mark Kettenis <kettenis@gnu.org>
10453
10454 * configure.ac: Simplify and improve check for socklen_t.
10455 * configure, config.in: Regenerate.
10456
f450004a
DJ
104572005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * acconfig.h: Remove.
10460 * configure.ac: Add a test for socklen_t. Use three-argument
10461 AC_DEFINE throughout.
10462 * config.in: Regenerated using autoheader 2.59.
10463 * configure: Regenerated.
10464
10465 * gdbreplay.c (socklen_t): Provide a default.
10466 (remote_open): Use socklen_t.
10467 * remote-utils.c (socklen_t): Provide a default.
10468 (remote_open): Use socklen_t.
10469 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10470 unsigned char.
10471
10472 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10473 char for buffers.
10474 * linux-low.c (linux_read_memory, linux_write_memory)
10475 (linux_read_auxv): Likewise.
10476 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10477 (check_mem_write): Likewise.
10478 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10479 Likewise.
10480 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10481 (registers_from_string, register_data): Likewise.
10482 * server.c (handle_query, main): Likewise.
10483 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10484 (decode_M_packet): Likewise.
10485 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10486 * target.h (struct target_ops): Update read_memory, write_memory,
10487 and read_auxv.
10488 (read_inferior_memory, write_inferior_memory): Update.
10489 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10490 to unsigned char *.
10491 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10492 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10493 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10494 linux-s390-low.c, linux-sh-low.c: Update for changes in
10495 read_inferior_memory and the_low_target->breakpoint.
10496
eee84df1
DJ
104972005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10498
10499 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10500 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10501 * configure.srv: Add powerpc64-*-linux*.
10502 * linux-ppc64-low.c: New file.
10503
45b134e5
OF
105042005-05-23 Orjan Friberg <orjanf@axis.com>
10505
10506 * linux-cris-low.c: New file with support for CRIS.
10507 * linux-crisv32-low.c: Ditto for CRISv32.
10508 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10509 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10510 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10511 reg-crisv32.o, and reg-crisv32.c to make rules.
10512 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10513 recognized targets.
10514
48d93c75
UW
105152005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10516
10517 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10518 of sizeof (PTRACE_XFER_TYPE).
10519 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10520
e013ee27
OF
105212005-05-12 Orjan Friberg <orjanf@axis.com>
10522
889bf7c5 10523 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10524 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10525 pointers for hardware watchpoint support.
10526 * linux-low.h (struct linux_target_ops): Ditto.
10527 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10528 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10529 to linux_target_ops.
10530 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10531 reply packet.
10532 * server.c (main): Recognize 'Z' and 'z' packets.
10533
b0ded00b
UW
105342005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10535
10536 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10537 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10538 (the_low_target): Add new members.
10539
8643e2ad
DJ
105402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10541
10542 * proc-service.c (ps_lgetregs): Search all_processes instead of
10543 all_threads.
10544
fc620387
DJ
105452005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10546
10547 * server.c (start_inferior): Change return type to int.
10548 (attach_inferior): Change sigptr to int *.
10549 (handle_v_cont, handle_v_requests): Change signal to int *.
10550 (main): Change signal to int.
10551
105522005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10553
10554 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10555 * configure.srv: Add m32r*-*-linux*.
10556 * linux-m32r-low.c: New file.
10557
e0e76420
DJ
105582005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10559
10560 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10561
a1928bad
DJ
105622005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10565 Take unsigned long arguments for PIDs.
10566 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10567 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10568 (wait_for_sigstop, linux_resume_one_process)
10569 (regsets_fetch_inferior_registers, linux_send_signal)
10570 (linux_read_auxv): Likewise. Update the types of variables holding
10571 PIDs. Update format string specifiers.
10572 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10573 * remote-utils.c (prepare_resume_reply): Likewise.
10574 * server.c (cont_thread, general_thread, step_thread)
10575 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10576 unsigned long.
10577 (handle_query): Update format specifiers.
10578 (handle_v_cont, main): Use strtoul for thread IDs.
10579 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10580 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10581 (general_thread, step_thread, thread_from_wait)
10582 (old_thread_from_wait): Update.
10583 * target.h (struct thread_resume): Use unsigned long for THREAD.
10584 (struct target_ops): Use unsigned long for arguments to attach and
10585 thread_alive.
10586
dcdb98d2
DJ
105872005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10588
10589 * acinclude.m4: Include bfd/bfd.m4 directly.
10590 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10591 <agriffis@toolchain.org>.
10592 * aclocal.m4, configure: Regenerated.
10593
bec39cab
AC
105942005-01-07 Andrew Cagney <cagney@gnu.org>
10595
10596 * configure.ac: Rename configure.in, require autoconf 2.59.
10597 * configure: Re-generate.
10598
434c4c77
DJ
105992004-12-08 Daniel Jacobowitz <dan@debian.org>
10600
10601 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10602 LIBS when finished.
10603 * aclocal.m4: Regenerated.
10604 * configure: Regenerated.
10605
db1d3e1b
AS
106062004-11-21 Andreas Schwab <schwab@suse.de>
10607
10608 * linux-m68k-low.c (m68k_num_gregs): Define.
10609 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10610 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10611 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10612 (m68k_breakpoint_at): New. Add to the_low_target.
10613
10614 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10615 srv_linux_thread_db to yes.
10616
43360365
JB
106172004-10-20 Joel Brobecker <brobecker@gnat.com>
10618
10619 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10620 (ARCH_SET_FS): Likewise.
10621 (ARCH_GET_FS): Likewise.
10622 (ARCH_GET_GS): Likewise.
10623
fd500816
DJ
106242004-10-16 Daniel Jacobowitz <dan@debian.org>
10625
10626 * linux-i386-low.c (ps_get_thread_area): New.
10627 * linux-x86-64-low.c (ps_get_thread_area): New.
10628 * linux-low.c: Include <sys/syscall.h>.
10629 (linux_kill_one_process): Don't kill the first thread here.
10630 (linux_kill): Kill the first thread here.
10631 (kill_lwp): New function.
10632 (send_sigstop, linux_send_signal): Use it.
10633 * proc-service.c: Clean up #ifdefs.
10634 (fpregset_info): Delete.
10635 (ps_lgetregs): Update and enable implementation.
10636 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10637 implementations.
10638 * remote-utils.c (struct sym_cache, symbol_cache): New.
10639 (input_interrupt): Print a clearer message.
10640 (async_io_enabled): New variable.
10641 (enable_async_io, disable_async_io): Use it. Update comments.
10642 (look_up_one_symbol): Use the symbol cache.
10643 * thread-db.c (thread_db_look_up_symbols): New function.
10644 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10645
f6de3c42
DJ
106462004-10-16 Daniel Jacobowitz <dan@debian.org>
10647
10648 * configure.in: Test for -rdynamic.
10649 * configure: Regenerated.
10650 * Makefile (INTERNAL_LDFLAGS): New.
10651 (gdbserver, gdbreplay): Use it.
10652
2c0fc042
AC
106532004-09-02 Andrew Cagney <cagney@gnu.org>
10654
10655 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10656
075b3282
DJ
106572004-03-23 Daniel Jacobowitz <drow@mvista.com>
10658
10659 * linux-low.c (linux_wait): Clear all_processes list also.
10660
fa6a77dc
DJ
106612004-03-12 Daniel Jacobowitz <drow@mvista.com>
10662
10663 * linux-low.c: Include <errno.h>. Remove extern declaration of
10664 errno.
10665
6d782a97
DJ
106662004-03-12 Daniel Jacobowitz <drow@mvista.com>
10667
10668 * gdbreplay.c, server.h, utils.c: Update copyright years.
10669
3a7fb99b
DJ
106702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10671
10672 * server.c (main): Print child status or termination signal from
10673 variable 'signal', not 'sig'.
10674
c3e735a6
DJ
106752004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10676
10677 * linux-low.c (linux_read_memory): Change return type to
10678 int. Check for and return error from ptrace().
10679 * target.c (read_inferior_memory): Change return type to int. Pass
10680 back return status from the_target->read_memory().
10681 * target.h (struct target_ops): Adapt *read_memory() prototype.
10682 Update comment.
10683 (read_inferior_memory): Adapt prototype.
10684 * server.c (main): Return an error packet if
10685 read_inferior_memory() returns an error.
10686
a59d1c82
DJ
106872004-03-04 Daniel Jacobowitz <drow@mvista.com>
10688
10689 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10690 Unify with other clean targets.
10691
dc3f8883
DJ
106922004-02-29 Daniel Jacobowitz <drow@mvista.com>
10693
10694 * server.c (handle_v_cont): Call set_desired_inferior.
10695
89a208da
DJ
106962004-02-29 Daniel Jacobowitz <drow@mvista.com>
10697
10698 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10699
62ea82f5
DJ
107002004-02-29 Daniel Jacobowitz <drow@mvista.com>
10701
10702 * linux-low.c (linux_wait): Unblock async I/O.
10703 (linux_resume): Block and enable async I/O.
10704 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10705 * server.h (block_async_io, unblock_async_io): Add prototypes.
10706
6910d122
DJ
107072004-02-29 Daniel Jacobowitz <drow@mvista.com>
10708
10709 * remote-utils.c (remote_open): Print a status notice after
10710 opening a TCP port.
10711 * server.c (attach_inferior): Print a status notice after
10712 attaching.
10713
107142004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10715
10716 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10717
c89dc5d4
DJ
107182004-02-26 Daniel Jacobowitz <drow@mvista.com>
10719
10720 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10721 error packet.
10722 * server.c, target.h: Update copyright years.
10723
4b8dad4a
RM
107242004-02-25 Roland McGrath <roland@redhat.com>
10725
10726 * target.h (struct target_ops): New member `read_auxv'.
10727 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10728 * linux-low.c (linux_read_auxv): New function.
10729 (linux_target_ops): Initialize `read_auxv' member to that.
10730
d7446758
JB
107312004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10732
10733 Committed by Jim Blandy <jimb@redhat.com>.
10734
10735 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10736 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10737 instead of GPR_SIZE to distiguish s390 and s390x targets.
10738
5544ad89
DJ
107392004-01-31 Daniel Jacobowitz <drow@mvista.com>
10740
10741 * linux-low.c: Update copyright year.
10742 (check_removed_breakpoint): Clear pending_is_breakpoint.
10743 (linux_set_resume_request, linux_queue_one_thread)
10744 (resume_status_pending_p): New functions.
10745 (linux_continue_one_thread): Use process->resume.
10746 (linux_resume): Only resume threads if there are no pending events.
10747 * linux-low.h (struct process_info): Add resume request
10748 pointer.
10749
2a68b70e
DJ
107502004-01-30 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * regcache.c (new_register_cache): Clear the allocated register
10753 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10754
64386c31
DJ
107552003-10-13 Daniel Jacobowitz <drow@mvista.com>
10756
10757 * linux-low.c (linux_resume): Take a struct thread_resume *
10758 argument.
10759 (linux_wait): Update call.
10760 (resume_ptr): New static variable.
10761 (linux_continue_one_thread): Renamed from
10762 linux_continue_one_process. Use resume_ptr.
10763 (linux_resume): Use linux_continue_one_thread.
10764 * server.c (handle_v_cont, handle_v_requests): New functions.
10765 (myresume): New function.
10766 (main): Handle 'v' case.
10767 * target.h (struct thread_resume): New type.
10768 (struct target_ops): Change argument of "resume" to struct
10769 thread_resume *.
10770 (myresume): Delete macro.
10771
c938e9b0
L
107722003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10773
10774 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10775 (uninstall): Support DESTDIR.
10776
7f313d07
BC
10777Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10778
10779 * configure.srv: Add xscale*linux copy of arm*linux entry.
10780
3b2fc2ea
DJ
107812003-07-24 Daniel Jacobowitz <drow@mvista.com>
10782
10783 * linux-arm-low.c (arm_reinsert_addr): New function.
10784 (the_low_target): Add arm_reinsert_addr.
10785
1c0a559e
MK
107862003-07-08 Mark Kettenis <kettenis@gnu.org>
10787
10788 * mem-break.c: Remove whitespace at end of file.
10789
43d5792c
DJ
107902003-06-28 Daniel Jacobowitz <drow@mvista.com>
10791
10792 * configure.in: Check whether we need to prototype strerror.
10793 * server.h: Optionally prototype strerror.
10794 * gdbreplay.c (perror_with_name): Use strerror.
10795 * linux-low.c (linux_attach_lwp): Use strerror.
10796 * utils.c (perror_with_name): Use strerror.
10797 * config.in, configure: Regenerated.
10798
c8a86edf
DJ
107992003-06-28 Daniel Jacobowitz <drow@mvista.com>
10800
10801 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10802 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10803
73d37363
DJ
108042003-06-20 Daniel Jacobowitz <drow@mvista.com>
10805
10806 * Makefile.in (SFILES): Update.
10807 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10808 low-sun3.c: Remove files.
10809
6ad8ae5c
DJ
108102003-06-17 Daniel Jacobowitz <drow@mvista.com>
10811
10812 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10813 (linux_detach_one_process, linux_detach): New functions.
10814 (linux_target_ops): Add linux_detach.
10815 * server.c (main): Handle 'D' packet.
10816 * target.h (struct target_ops): Add "detach" member.
10817 (detach_inferior): Define.
10818
1581182a
MK
108192003-06-13 Mark Kettenis <kettenis@gnu.org>
10820
10821 From Kelley Cook <kelleycook@wideopenwest.com>:
10822 * configure.srv: Accept i[34567]86 variants.
10823
e5379b03
DJ
108242003-06-05 Daniel Jacobowitz <drow@mvista.com>
10825
10826 * linux-low.c (linux_wait_for_event): Correct comment typos.
10827 (linux_resume_one_process): Call check_removed_breakpoint.
10828 (linux_send_signal): New function.
10829 (linux_target_ops): Add linux_send_signal.
10830 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10831 of kill.
10832 * target.h (struct target_ops): Add send_signal.
10833
2ff29de4
JB
108342003-05-29 Jim Blandy <jimb@redhat.com>
10835
10836 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10837 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10838 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10839 away part of the register's value.
10840
254787d4
DJ
108412003-03-26 Daniel Jacobowitz <drow@mvista.com>
10842
10843 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10844 (linux_wait_for_event, linux_init_signals): Likewise.
10845
94e10508
DJ
108462003-03-17 Daniel Jacobowitz <drow@mvista.com>
10847
10848 * configure.in: Check for stdlib.h.
10849 * configure: Regenerated.
10850 * config.in: Regenerated.
10851
4c0711e0
DJ
108522003-01-04 Andreas Schwab <schwab@suse.de>
10853
10854 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10855
ef66e766
AC
108562003-01-02 Andrew Cagney <ac131313@redhat.com>
10857
10858 * Makefile.in: Remove obsolete code.
10859
a1358604
DJ
108602002-11-20 Daniel Jacobowitz <drow@mvista.com>
10861
10862 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10863 defined(PT_FPR0_HI).
10864
23ce3b1c
DJ
108652002-11-17 Stuart Hughes <seh@zee2.com>
10866
10867 * linux-arm-low.c (arm_num_regs): Increase.
10868 (arm_regmap): Include status register.
10869
108702002-11-17 Daniel Jacobowitz <drow@mvista.com>
10871
10872 * linux-low.c (register_addr): Remove incorrect -1 check.
10873
a9fa9f7d
DJ
108742002-08-29 Daniel Jacobowitz <drow@mvista.com>
10875
10876 * linux-low.c (linux_create_inferior): Call setpgid. Return
10877 the new PID.
10878 (unstopped_p, linux_signal_pid): Remove.
10879 (linux_target_ops): Remove linux_signal_pid.
10880 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10881 global instead of target method.
10882 * target.h (struct target_ops): Remove signal_pid. Update comment
10883 for create_inferior.
10884 * server.c (signal_pid): New variable.
10885 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10886 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10887 (attach_inferior): Set signal_pid.
10888
17574093
DJ
108892002-08-23 Daniel Jacobowitz <drow@mvista.com>
10890
10891 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10892
108932002-08-20 Jim Blandy <jimb@redhat.com>
10894
10895 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10896 default for this.
10897
108982002-08-01 Andrew Cagney <cagney@redhat.com>
10899
10900 * Makefile.in: Make chill references obsolete.
10901
109022002-07-24 Kevin Buettner <kevinb@redhat.com>
10903
10904 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10905 * configure: Regenerate.
10906 * config.in: Regenerate.
10907
109082002-07-09 David O'Brien <obrien@FreeBSD.org>
10909
10910 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10911 (perror_with_name, remote_close, remote_open, expect, play): Static.
10912
109132002-07-04 Michal Ludvig <mludvig@suse.cz>
10914
4b8dad4a 10915 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10916 byte offsets instead of an array of indexes.
10917 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10918
109192002-06-13 Daniel Jacobowitz <drow@mvista.com>
10920
10921 * regcache.c: Add comment.
10922
109232002-06-11 Daniel Jacobowitz <drow@mvista.com>
10924
10925 * thread-db.c: New file.
10926 * proc-service.c: New file.
10927 * acinclude.m4: New file.
10928 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10929 proc-service.o, and thread-db.o.
10930 (linux-low.o): Add USE_THREAD_DB.
10931 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10932 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10933 * aclocal.m4: Regenerated.
10934 * config.in: Regenerated.
10935 * configure: Regenerated.
10936 * configure.in: Check for proc_service.h, sys/procfs.h,
10937 thread_db.h, and linux/elf.h headrs.
10938 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10939 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10940 Check for -lthread_db and thread support.
10941 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10942 PowerPC, and SuperH.
10943 * i387-fp.c: Constify arguments.
10944 * i387-fp.h: Likewise.
10945 * inferiors.c: (struct thread_info): Renamed from
10946 `struct inferior_info'. Remove PID member. Use generic inferior
10947 list header. All uses updated.
10948 (inferiors, signal_pid): Removed.
10949 (all_threads): New variable.
10950 (get_thread): Define.
10951 (add_inferior_to_list): New function.
10952 (for_each_inferior): New function.
10953 (change_inferior_id): New function.
10954 (add_inferior): Removed.
10955 (remove_inferior): New function.
10956 (add_thread): New function.
10957 (free_one_thread): New function.
10958 (remove_thread): New function.
10959 (clear_inferiors): Use for_each_inferior and free_one_thread.
10960 (find_inferior): New function.
10961 (find_inferior_id): New function.
10962 (inferior_target_data): Update argument type.
10963 (set_inferior_target_data): Likewise.
10964 (inferior_regcache_data): Likewise.
10965 (set_inferior_regcache_data): Likewise.
10966 * linux-low.c (linux_bp_reinsert): Remove.
10967 (all_processes, stopping_threads, using_thrads)
10968 (struct pending_signals, debug_threads, pid_of): New.
10969 (inferior_pid): Replace with macro.
10970 (struct inferior_linux_data): Remove.
10971 (get_stop_pc, add_process): New functions.
10972 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10973 Use add_process and add_thread.
10974 (linux_attach_lwp): New function, based on old linux_attach. Use
10975 add_process and add_thread. Set stop_expected for new threads.
10976 (linux_attach): New function.
10977 (linux_kill_one_process): New function.
10978 (linux_kill): Kill all LWPs.
10979 (linux_thread_alive): Use find_inferior_id.
10980 (check_removed_breakpoints, status_pending_p): New functions.
10981 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10982 Update. Use WNOHANG. Wait for cloned processes also. Update process
10983 struct for the found process.
10984 (linux_wait_for_event): New function.
10985 (linux_wait): Use it. Support LWPs.
10986 (send_sigstop, wait_for_sigstop, stop_all_processes)
10987 (linux_resume_one_process, linux_continue_one_process): New functions.
10988 (linux_resume): Support LWPs.
10989 (REGISTER_RAW_SIZE): Remove.
10990 (fetch_register): Use register_size instead. Call supply_register.
10991 (usr_store_inferior_registers): Likewise. Call collect_register.
10992 Fix recursive case.
10993 (regsets_fetch_inferior_registers): Improve error message.
10994 (regsets_store_inferior_registers): Add debugging.
10995 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10996 (unstopped_p, linux_signal_pid): New functions.
10997 (linux_target_ops): Add linux_signal_pid.
10998 (linux_init_signals): New function.
10999 (initialize_low): Call it. Initialize using_threads.
11000 * regcache.c (inferior_regcache_data): Add valid
11001 flag.
11002 (get_regcache): Fetch registers lazily. Add fetch argument
11003 and update all callers.
11004 (regcache_invalidate_one, regcache_invalidate): New
11005 functions.
11006 (new_register_cache): Renamed from create_register_cache.
11007 Return the new regcache.
11008 (free_register_cache): Change argument to a void *.
11009 (registers_to_string, registers_from_string): Call get_regcache
11010 with fetch flag set.
11011 (register_data): Make static. Pass fetch flag to get_regcache.
11012 (supply_register): Call get_regcache with fetch flag clear.
11013 (collect_register): Call get_regcache with fetch flag set.
11014 (collect_register_as_string): New function.
11015 * regcache.h: Update.
11016 * remote-utils.c (putpkt): Flush after debug output and use
11017 stderr.
11018 Handle input interrupts while waiting for an ACK.
11019 (input_interrupt): Use signal_pid method.
11020 (getpkt): Flush after debug output and use stderr.
11021 (outreg): Use collect_register_as_string.
11022 (new_thread_notify, dead_thread_notify): New functions.
11023 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11024 and general_thread.
11025 (look_up_one_symbol): Flush after debug output.
11026 * server.c (step_thread, server_waiting): New variables.
11027 (start_inferior): Don't use signal_pid. Update call to mywait.
11028 (attach_inferior): Update call to mywait.
11029 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11030 (main): Don't fetch/store registers explicitly. Use
11031 set_desired_inferior. Support proposed ``Hs'' packet. Update
11032 calls to mywait.
11033 * server.h: Update.
11034 (struct inferior_list, struct_inferior_list_entry): New.
11035 * target.c (set_desired_inferior): New.
11036 (write_inferior_memory): Constify.
11037 (mywait): New function.
11038 * target.h: Update.
11039 (struct target_ops): New signal_pid method.
11040 (mywait): Removed macro, added prototype.
11041
11042 * linux-low.h (regset_func): Removed.
11043 (regset_fill_func, regset_store_func): New.
11044 (enum regset_type): New.
11045 (struct regset_info): Add type field. Use new operation types.
11046 (struct linux_target_ops): stop_pc renamed to get_pc.
11047 Add decr_pc_after_break and breakpoint_at.
11048 (get_process, get_thread_proess, get_process_thread)
11049 (strut process_info, all_processes, linux_attach_lwp)
11050 (thread_db_init): New.
11051
11052 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11053 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11054 (the_low_target): Add new members.
11055 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11056 (i386_store_fpxregset): Constify.
11057 (target_regsets): Add new kind identifier.
11058 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11059 (i386_set_pc): Add debugging.
11060 (i386_breakpoint_at): New function.
11061 (the_low_target): Add new members.
11062 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11063 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11064 (mips_breakpoint_at): New.
11065 (the_low_target): Add new members.
11066 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11067 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11068 (the_low_target): Add new members.
11069 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11070 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11071 (the_low_target): Add new members.
11072 * linux-x86-64-low.c (target_regsets): Add new kind
11073 identifier.
11074
110752002-05-15 Daniel Jacobowitz <drow@mvista.com>
11076
11077 From Martin Pool <mbp@samba.org>:
11078 * server.c (gdbserver_usage): New function.
11079 (main): Call it.
11080
110812002-05-14 Daniel Jacobowitz <drow@mvista.com>
11082
11083 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11084 stop_at -> stop_pc.
11085
110862002-05-04 Andrew Cagney <ac131313@redhat.com>
11087
11088 * Makefile.in: Remove obsolete code.
11089
110902002-04-24 Michal Ludvig <mludvig@suse.cz>
11091
11092 * linux-low.c (regsets_fetch_inferior_registers),
11093 (regsets_store_inferior_registers): Removed cast to int from
11094 ptrace() calls.
11095 * regcache.h: Added declaration of struct inferior_info.
11096
110972002-04-20 Daniel Jacobowitz <drow@mvista.com>
11098
11099 * inferiors.c (struct inferior_info): Add regcache_data.
11100 (add_inferior): Call create_register_cache.
11101 (clear_inferiors): Call free_register_cache.
11102 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11103 * regcache.c (struct inferior_regcache_data): New.
11104 (registers): Remove.
11105 (get_regcache): New function.
11106 (create_register_cache, free_register_cache): New functions.
11107 (set_register_cache): Don't initialize the register cache here.
11108 (registers_to_string, registers_from_string, register_data): Call
11109 get_regcache.
11110 * regcache.h: Add prototypes.
11111 * server.h: Likewise.
11112
111132002-04-20 Daniel Jacobowitz <drow@mvista.com>
11114
11115 * mem-break.c: New file.
11116 * mem-break.h: New file.
11117 * Makefile.in: Add mem-break.o rule; update server.h
11118 dependencies.
11119 * inferiors.c (struct inferior_info): Add target_data
11120 member.
11121 (clear_inferiors): Free target_data member if set.
11122 (inferior_target_data, set_inferior_target_data): New functions.
11123 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11124 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11125 * linux-low.c (linux_bp_reinsert): New variable.
11126 (struct inferior_linux_data): New.
11127 (linux_create_inferior): Use set_inferior_target_data.
11128 (linux_attach): Likewise. Call add_inferior.
11129 (linux_wait_for_one_inferior): New function.
11130 (linux_wait): Call it.
11131 (linux_write_memory): Add const.
11132 (initialize_low): Call set_breakpoint_data.
11133 * linux-low.h (struct linux_target_ops): Add breakpoint
11134 handling members.
11135 * server.c (attach_inferior): Remove extra add_inferior
11136 call.
11137 * server.h: Include mem-break.h. Update inferior.c
11138 prototypes.
11139 * target.c (read_inferior_memory)
11140 (write_inferior_memory): New functions.
11141 * target.h (read_inferior_memory)
11142 (write_inferior_memory): Change macros to prototypes.
11143 (struct target_ops): Update comments. Add const to write_memory
11144 definition.
11145
111462002-04-11 Daniel Jacobowitz <drow@mvista.com>
11147
11148 * linux-low.c (usr_store_inferior_registers): Support
11149 registers which are allowed to fail to store.
11150 * linux-low.h (linux_target_ops): Likewise.
11151 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11152 (ppc_cannot_store_register): FPSCR may not be storable.
11153
111542002-04-09 Daniel Jacobowitz <drow@mvista.com>
11155
11156 * server.h: Include <string.h> if HAVE_STRING_H.
11157 * ChangeLog: Correct paths in last ChangeLog entry.
11158
111592002-04-09 Daniel Jacobowitz <drow@mvista.com>
11160
11161 * linux-low.h: Remove obsolete prototypes.
11162 (struct linux_target_ops): New.
11163 (extern the_low_target): New.
11164 * linux-low.c (num_regs, regmap): Remove declarations.
11165 (register_addr): Use the_low_target explicitly.
11166 (fetch_register): Likewise.
11167 (usr_fetch_inferior_registers): Likewise.
11168 (usr_store_inferior_registers): Likewise.
11169 * linux-arm-low.c (num_regs): Remove.
11170 (arm_num_regs): Define.
11171 (arm_regmap): Renamed from regmap, made static.
11172 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11173 made static.
11174 (arm_cannot_store_register): Renamed from cannot_store_register,
11175 made static.
11176 (the_low_target): New.
11177 * linux-i386-low.c (num_regs): Remove.
11178 (i386_num_regs): Define.
11179 (i386_regmap): Renamed from regmap, made static.
11180 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11181 made static.
11182 (i386_cannot_store_register): Renamed from cannot_store_register,
11183 made static.
11184 (the_low_target): New.
11185 * linux-ia64-low.c (num_regs): Remove.
11186 (ia64_num_regs): Define.
11187 (ia64_regmap): Renamed from regmap, made static.
11188 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11189 made static.
11190 (ia64_cannot_store_register): Renamed from cannot_store_register,
11191 made static.
11192 (the_low_target): New.
11193 * linux-m68k-low.c (num_regs): Remove.
11194 (m68k_num_regs): Define.
11195 (m68k_regmap): Renamed from regmap, made static.
11196 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11197 made static.
11198 (m68k_cannot_store_register): Renamed from cannot_store_register,
11199 made static.
11200 (the_low_target): New.
11201 * linux-mips-low.c (num_regs): Remove.
11202 (mips_num_regs): Define.
11203 (mips_regmap): Renamed from regmap, made static.
11204 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11205 made static.
11206 (mips_cannot_store_register): Renamed from cannot_store_register,
11207 made static.
11208 (the_low_target): New.
11209 * linux-ppc-low.c (num_regs): Remove.
11210 (ppc_num_regs): Define.
11211 (ppc_regmap): Renamed from regmap, made static.
11212 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11213 made static.
11214 (ppc_cannot_store_register): Renamed from cannot_store_register,
11215 made static.
11216 (the_low_target): New.
11217 * linux-s390-low.c (num_regs): Remove.
11218 (s390_num_regs): Define.
11219 (s390_regmap): Renamed from regmap, made static.
11220 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11221 made static.
11222 (s390_cannot_store_register): Renamed from cannot_store_register,
11223 made static.
11224 (the_low_target): New.
11225 * linux-sh-low.c (num_regs): Remove.
11226 (sh_num_regs): Define.
11227 (sh_regmap): Renamed from regmap, made static.
11228 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11229 made static.
11230 (sh_cannot_store_register): Renamed from cannot_store_register,
11231 made static.
11232 (the_low_target): New.
11233 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11234 (the_low_target): New.
11235
112362002-04-09 Daniel Jacobowitz <drow@mvista.com>
11237
11238 * Makefile.in: Add stamp-h target.
11239 * configure.in: Create stamp-h.
11240 * configure: Regenerated.
11241
112422002-04-09 Daniel Jacobowitz <drow@mvista.com>
11243
11244 * inferiors.c: New file.
11245 * target.c: New file.
11246 * target.h: New file.
11247 * Makefile.in: Add target.o and inferiors.o. Update
11248 dependencies.
11249 * linux-low.c (inferior_pid): New static variable,
11250 moved from server.c.
11251 (linux_create_inferior): Renamed from create_inferior.
11252 Call add_inferior. Return 0 on success instead of a PID.
11253 (linux_attach): Renamed from myattach.
11254 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11255 (linux_thread_alive): Renamed from mythread_alive.
11256 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11257 child dies.
11258 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11259 (regsets_store_inferior_registers): Correct error message.
11260 Add missing ``return 0''.
11261 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11262 (linux_store_registers): Renamed from store_inferior_registers.
11263 (linux_read_memory): Renamed from read_inferior_memory.
11264 (linux_write_memory): Renamed from write_inferior_memory.
11265 (linux_target_ops): New structure.
11266 (initialize_low): Call set_target_ops ().
11267 * remote-utils.c (unhexify): New function.
11268 (hexify): New function.
11269 (input_interrupt): Send signals to ``signal_pid''.
11270 * server.c (inferior_pid): Remove.
11271 (start_inferior): Update create_inferior call.
11272 (attach_inferior): Call add_inferior.
11273 (handle_query): New function.
11274 (main): Call handle_query for `q' packets.
11275 * server.h: Include "target.h". Remove obsolete prototypes.
11276 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11277
112782002-04-09 Daniel Jacobowitz <drow@mvista.com>
11279
11280 * Makefile.in: Add WARN_CFLAGS. Update configury
11281 dependencies.
11282 * configure.in: Check for <string.h>
11283 * configure: Regenerate.
11284 * config.in: Regenerate.
11285 * gdbreplay.c: Include needed system headers.
11286 (remote_open): Remove strchr prototype.
11287 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11288 * regcache.c (supply_register): Change buf argument to const void *.
11289 (supply_register_by_name): Likewise.
11290 (collect_register): Change buf argument to void *.
11291 (collect_register_by_name): Likewise.
11292 * regcache.h: Add missing prototypes.
11293 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11294 * server.c (handle_query): New function.
11295 (attached): New static variable, moved out of main.
11296 (main): Quiet longjmp clobber warnings.
11297 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11298 * utils.c (error): Remove NORETURN.
11299 (fatal): Likewise.