Fix preprocessor conditional
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ca9b78ce
YQ
12015-06-01 Yao Qi <yao.qi@linaro.org>
2
3 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4 * linux-x86-low.c: Likewise.
5
bfacd19d
DB
62015-05-28 Don Breazeal <donb@codesourcery.com>
7
8 * linux-low.c (handle_extended_wait): Initialize
9 thread_info.last_resume_kind for new fork children.
10
452003ef
PA
112015-05-15 Pedro Alves <palves@redhat.com>
12
13 * target.h (target_handle_new_gdb_connection): Rewrite using if
14 wrapped in do/while.
15
1041a03c
JB
162015-05-14 Joel Brobecker <brobecker@adacore.com>
17
18 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
19 * configure, config.in: Regenerate.
20 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
21 Declare typedef.
22
c269dbdb
DB
232015-05-12 Don Breazeal <donb@codesourcery.com>
24
25 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
26 PTRACE_EVENT_VFORK_DONE.
27 (linux_low_ptrace_options, extended_event_reported): Add vfork
28 events.
29 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
30 and "vforkdone" for RSP 'T' Stop Reply Packet.
31 * server.h (report_vfork_events): Declare
32 global variable.
33
3a8a0396
DB
342015-05-12 Don Breazeal <donb@codesourcery.com>
35
36 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
37 (the_low_target) <new_fork>: Initialize new member.
38 * linux-arm-low.c (arm_new_fork): New function.
39 (the_low_target) <new_fork>: Initialize new member.
40 * linux-low.c (handle_extended_wait): Call new target function
41 new_fork.
42 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
43 * linux-mips-low.c (mips_add_watchpoint): New function
44 extracted from mips_insert_point.
45 (the_low_target) <new_fork>: Initialize new member.
46 (mips_linux_new_fork): New function.
47 (mips_insert_point): Call mips_add_watchpoint.
48 * linux-x86-low.c (x86_linux_new_fork): New function.
49 (the_low_target) <new_fork>: Initialize new member.
50
de0d863e
DB
512015-05-12 Don Breazeal <donb@codesourcery.com>
52
53 * linux-low.c (handle_extended_wait): Implement return value,
54 rename argument 'event_child' to 'event_lwp', handle
55 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
56 (linux_low_ptrace_options): New function.
57 (linux_low_filter_event): Call linux_low_ptrace_options,
58 use different argument fo linux_enable_event_reporting,
59 use return value from handle_extended_wait.
60 (extended_event_reported): New function.
61 (linux_wait_1): Call extended_event_reported and set
62 status to report fork events.
63 (linux_write_memory): Add pid to debug message.
64 (reset_lwp_ptrace_options_callback): New function.
65 (linux_handle_new_gdb_connection): New function.
66 (linux_target_ops): Initialize new structure member.
67 * linux-low.h (struct lwp_info) <waitstatus>: New member.
68 * lynx-low.c: Initialize new structure member.
69 * remote-utils.c (prepare_resume_reply): Implement stop reason
70 "fork" for "T" stop message.
71 * server.c (handle_query): Call handle_new_gdb_connection.
72 * server.h (report_fork_events): Declare global flag.
73 * target.h (struct target_ops) <handle_new_gdb_connection>:
74 New member.
75 (target_handle_new_gdb_connection): New macro.
76 * win32-low.c: Initialize new structure member.
77
ddcbc397
DB
782015-05-12 Don Breazeal <donb@codesourcery.com>
79
80 * mem-break.c (APPEND_TO_LIST): Define macro.
81 (clone_agent_expr): New function.
82 (clone_one_breakpoint): New function.
83 (clone_all_breakpoints): New function.
84 * mem-break.h: Declare new functions.
85
89245bc0
DB
862015-05-12 Don Breazeal <donb@codesourcery.com>
87
88 * linux-low.c (linux_supports_fork_events): New function.
89 (linux_supports_vfork_events): New function.
90 (linux_target_ops): Initialize new structure members.
91 (initialize_low): Call linux_check_ptrace_features.
92 * lynx-low.c (lynx_target_ops): Initialize new structure
93 members.
94 * server.c (report_fork_events, report_vfork_events):
95 New global flags.
96 (handle_query): Add new features to qSupported packet and
97 response.
98 (captured_main): Initialize new global variables.
99 * target.h (struct target_ops) <supports_fork_events>:
100 New member.
101 <supports_vfork_events>: New member.
102 (target_supports_fork_events): New macro.
103 (target_supports_vfork_events): New macro.
104 * win32-low.c (win32_target_ops): Initialize new structure
105 members.
106
835205d0
GB
1072015-05-12 Gary Benson <gbenson@redhat.com>
108
109 * server.c (handle_qxfer_exec_file): Use current process
110 if annex is empty.
111
21e94bd9
SL
1122015-05-08 Sandra Loosemore <sandra@codesourcery.com>
113
114 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
115 Remove HAVE_PTRACE_GETREGS conditionals.
116 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
117 instead of PTRACE_GETREGS and PTRACE_SETREGS.
118
45614f15
YQ
1192015-05-08 Yao Qi <yao.qi@linaro.org>
120
121 * linux-low.c (linux_supports_conditional_breakpoints): New
122 function.
123 (linux_target_ops): Install new target method.
124 * lynx-low.c (lynx_target_ops): Install NULL hook for
125 supports_conditional_breakpoints.
126 * nto-low.c (nto_target_ops): Likewise.
127 * spu-low.c (spu_target_ops): Likewise.
128 * win32-low.c (win32_target_ops): Likewise.
129 * server.c (handle_query): Check
130 target_supports_conditional_breakpoints.
131 * target.h (struct target_ops) <supports_conditional_breakpoints>:
132 New field.
133 (target_supports_conditional_breakpoints): New macro.
134
80ad801e
PA
1352015-05-06 Pedro Alves <palves@redhat.com>
136
137 PR server/18081
138 * server.c (start_inferior): If the process exits, mourn it.
139
819843c7
GB
1402015-04-21 Gary Benson <gbenson@redhat.com>
141
142 * hostio.c (fileio_open_flags_to_host): Factored out to
143 fileio_to_host_openflags in common/fileio.c. Single use
144 updated.
145
a2d5a9d7
MF
1462015-04-17 Max Filippov <jcmvbkbc@gmail.com>
147
148 * linux-xtensa-low.c (xtensa_fill_gregset)
149 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
150 XCHAL_HAVE_LOOP.
151
deb44829
MF
1522015-04-17 Max Filippov <jcmvbkbc@gmail.com>
153
154 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
155 (regs_info): Replace usrregs pointer with NULL.
156
e57f1de3
GB
1572015-04-17 Gary Benson <gbenson@redhat.com>
158
159 * target.h (struct target_ops) <pid_to_exec_file>: New field.
160 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
161 * server.c (handle_qxfer_exec_file): New function.
162 (qxfer_packets): Add exec-file entry.
163 (handle_query): Report qXfer:exec-file:read as supported packet.
164
62828379
RN
1652015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
166
167 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
168
b88bb450
GB
1692015-04-09 Gary Benson <gbenson@redhat.com>
170
171 * hostio-errno.c (errno_to_fileio_error): Remove function.
172 Update caller to use remote_fileio_to_fio_error.
173
c8f4bfdd
YQ
1742015-04-09 Yao Qi <yao.qi@linaro.org>
175
176 * linux-low.c (linux_insert_point): Call
177 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
178 (linux_remove_point): Call remove_memory_breakpoint if type is
179 raw_bkpt_type_sw.
180 * linux-x86-low.c (x86_insert_point): Don't call
181 insert_memory_breakpoint.
182 (x86_remove_point): Don't call remove_memory_breakpoint.
183
41f98f02
PA
1842015-04-01 Pedro Alves <palves@redhat.com>
185 Cleber Rosa <crosa@redhat.com>
186
187 * server.c (gdbserver_usage): Reorganize and extend the usage
188 message.
189
2bf6fb9d
PA
1902015-03-24 Pedro Alves <palves@redhat.com>
191
192 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
193 output. Also dump TRAP_TRACE.
194 (linux_low_filter_event): In debug output, distinguish a
195 resume_stop SIGSTOP from a delayed SIGSTOP.
196
369f6daa
GB
1972015-03-24 Gary Benson <gbenson@redhat.com>
198
199 * linux-x86-low.c (x86_linux_new_thread): Moved to
200 nat/x86-linux.c.
201 (x86_linux_prepare_to_resume): Likewise.
202
8e5d4070
GB
2032015-03-24 Gary Benson <gbenson@redhat.com>
204
205 * Makefile.in (x86-linux-dregs.o): New rule.
206 * configure.srv: Add x86-linux-dregs.o to relevant targets.
207 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
208 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
209 (x86_linux_dr_get): Likewise.
210 (x86_linux_dr_set): Likewise.
211 (update_debug_registers_callback): Likewise.
212 (x86_linux_dr_set_addr): Likewise.
213 (x86_linux_dr_get_addr): Likewise.
214 (x86_linux_dr_set_control): Likewise.
215 (x86_linux_dr_get_control): Likewise.
216 (x86_linux_dr_get_status): Likewise.
217 (x86_linux_update_debug_registers): Likewise.
218
2b95d440
GB
2192015-03-24 Gary Benson <gbenson@redhat.com>
220
221 * linux-x86-low.c (x86_linux_update_debug_registers):
222 New function, factored out from...
223 (x86_linux_prepare_to_resume): ...this.
224
14b0bc68
GB
2252015-03-24 Gary Benson <gbenson@redhat.com>
226
227 * linux-x86-low.c (x86_linux_dr_get): Update comments.
228 (x86_linux_dr_set): Likewise.
229 (update_debug_registers_callback): Likewise.
230 (x86_linux_dr_set_addr): Likewise.
231 (x86_linux_dr_get_addr): Likewise.
232 (x86_linux_dr_set_control): Likewise.
233 (x86_linux_dr_get_control): Likewise.
234 (x86_linux_dr_get_status): Likewise.
235 (x86_linux_prepare_to_resume): Likewise.
236
5dfe6ca8
GB
2372015-03-24 Gary Benson <gbenson@redhat.com>
238
239 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
240 Use perror_with_name. Pass string through gettext.
241 (x86_linux_dr_set): Likewise.
242
d33472ad
GB
2432015-03-24 Gary Benson <gbenson@redhat.com>
244
245 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
246 (x86_linux_dr_set_addr): ...this.
247 (x86_dr_low_get_addr): Rename to...
248 (x86_linux_dr_get_addr): ...this.
249 (x86_dr_low_set_control): Rename to...
250 (x86_linux_dr_set_control): ...this.
251 (x86_dr_low_get_control): Rename to...
252 (x86_linux_dr_get_control): ...this.
253 (x86_dr_low_get_status): Rename to...
254 (x86_linux_dr_get_status): ...this.
255 (x86_dr_low): Update with new function names.
256
4b134ca1
GB
2572015-03-24 Gary Benson <gbenson@redhat.com>
258
259 * Makefile.in (x86-linux.o): New rule.
260 * configure.srv: Add x86-linux.o to relevant targets.
261 * linux-low.c (lwp_set_arch_private_info): New function.
262 (lwp_arch_private_info): Likewise.
263 * linux-x86-low.c: Include nat/x86-linux.h.
264 (arch_lwp_info): Removed structure.
265 (update_debug_registers_callback):
266 Use lwp_set_debug_registers_changed.
267 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
268 and lwp_set_debug_registers_changed.
269 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
270
34c703da
GB
2712015-03-24 Gary Benson <gbenson@redhat.com>
272
273 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
274 * linux-arm-low.c (arm_new_thread): Likewise.
275 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
276 * linux-mips-low.c (mips_linux_new_thread): Likewise.
277 * linux-x86-low.c (x86_linux_new_thread): Likewise.
278 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
279
cff068da
GB
2802015-03-24 Gary Benson <gbenson@redhat.com>
281
282 * linux-low.c (ptid_of_lwp): New function.
283 (lwp_is_stopped): Likewise.
284 (lwp_stop_reason): Likewise.
285 * linux-x86-low.c (update_debug_registers_callback):
286 Use lwp_is_stopped.
287 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
288 lwp_stop_reason.
289
b2f7c7e8
GB
2902015-03-24 Gary Benson <gbenson@redhat.com>
291
292 * linux-low.h (linux_stop_lwp): Remove declaration.
293
6d4ee8c6
GB
2942015-03-24 Gary Benson <gbenson@redhat.com>
295
296 * linux-low.h: Include nat/linux-nat.h.
297 * linux-low.c (iterate_over_lwps_args): New structure.
298 (iterate_over_lwps_filter): New function.
299 (iterate_over_lwps): Likewise.
300 * linux-x86-low.c (update_debug_registers_callback):
301 Update signature to what iterate_over_lwps expects.
302 Remove PID check that iterate_over_lwps now performs.
303 (x86_dr_low_set_addr): Use iterate_over_lwps.
304 (x86_dr_low_set_control): Likewise.
305
70a0bb6b
GB
3062015-03-24 Gary Benson <gbenson@redhat.com>
307
308 * linux-x86-low.c (x86_debug_reg_state): New function.
309 (x86_linux_prepare_to_resume): Use the above.
310
7b669087
GB
3112015-03-24 Gary Benson <gbenson@redhat.com>
312
313 * linux-low.c (current_lwp_ptid): New function.
314 * linux-x86-low.c: Include nat/linux-nat.h.
315 (x86_dr_low_get_addr): Use current_lwp_ptid.
316 (x86_dr_low_get_control): Likewise.
317 (x86_dr_low_get_status): Likewise.
318
eef49a3d
PA
3192015-03-20 Pedro Alves <palves@redhat.com>
320
321 * tracepoint.c (cmd_qtstatus): Make "str" const.
322
b2333d22
PA
3232015-03-20 Pedro Alves <palves@redhat.com>
324
325 * server.c (handle_general_set): Make "req_str" const.
326
23f238d3
PA
3272015-03-19 Pedro Alves <palves@redhat.com>
328
329 * linux-low.c (linux_resume_one_lwp): Rename to ...
330 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
331 instead call perror_with_name.
332 (check_ptrace_stopped_lwp_gone): New function.
333 (linux_resume_one_lwp): Reimplement as wrapper around
334 linux_resume_one_lwp_throw that swallows errors if the LWP is
335 gone.
336
91baf43f
PA
3372015-03-19 Pedro Alves <palves@redhat.com>
338
339 * linux-low.c (count_events_callback, select_event_lwp_callback):
340 No longer check whether the thread has resume_stop as last resume
341 kind.
342
8bf3b159
PA
3432015-03-19 Pedro Alves <palves@redhat.com>
344
345 * linux-low.c (count_events_callback, select_event_lwp_callback):
346 Use the lwp's status_pending_p field, not the thread's.
347
b90fc188
PA
3482015-03-19 Pedro Alves <palves@redhat.com>
349
350 * linux-low.c (select_event_lwp_callback): Update comments to
351 no longer mention SIGTRAP.
352
464b0089
GB
3532015-03-18 Gary Benson <gbenson@redhat.com>
354
355 * server.c (handle_query): Do not report vFile:fstat as supported.
356
aa9e327f
GB
3572015-03-11 Gary Benson <gbenson@redhat.com>
358
359 * hostio.c (sys/types.h): New include.
360 (sys/stat.h): Likewise.
361 (common-remote-fileio.h): Likewise.
362 (handle_fstat): New function.
363 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 364
791c0056
GB
3652015-03-11 Gary Benson <gbenson@redhat.com>
366
367 * configure.ac (AC_CHECK_MEMBERS): Add checks for
368 struct stat.st_blocks and struct stat.st_blksize.
369 * configure: Regenerate.
370 * config.in: Likewise.
371 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
372 (OBS): Add common-remote-fileio.o.
373 (common-remote-fileio.o): New rule.
374
9a9df970
PA
3752015-03-09 Pedro Alves <palves@redhat.com>
376
377 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
378 'struct sockaddr' pointer in 'accept' call.
379
9eb1356e
PA
3802015-03-09 Pedro Alves <palves@redhat.com>
381
382 Revert:
383 2015-03-07 Pedro Alves <palves@redhat.com>
384 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
385 or <winsock2.h> here. Instead include "gdb_socket.h".
386 (remote_open): Use union gdb_sockaddr_u.
387 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
388 or <winsock2.h> here. Instead include "gdb_socket.h".
389 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
390 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
391 or <sys/un.h>.
392 (init_named_socket, gdb_agent_helper_thread): Use union
393 gdb_sockaddr_u.
394
aac331e4
PA
3952015-03-07 Pedro Alves <palves@redhat.com>
396
397 * configure.ac (build_warnings): Move
398 -Wdeclaration-after-statement to the C-specific set.
399 * configure: Regenerate.
400
366c75fc
PA
4012015-03-07 Pedro Alves <palves@redhat.com>
402
403 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
404 or <winsock2.h> here. Instead include "gdb_socket.h".
405 (remote_open): Use union gdb_sockaddr_u.
406 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
407 or <winsock2.h> here. Instead include "gdb_socket.h".
408 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
409 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
410 or <sys/un.h>.
411 (init_named_socket, gdb_agent_helper_thread): Use union
412 gdb_sockaddr_u.
413
492d29ea
PA
4142015-03-07 Pedro Alves <palves@redhat.com>
415
416 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
417 instead.
418
60a191ed
YQ
4192015-03-06 Yao Qi <yao.qi@linaro.org>
420
421 * linux-aarch64-low.c (aarch64_insert_point): Use
422 show_debug_regs as a boolean.
423 (aarch64_remove_point): Likewise.
424
f5771b1d
PA
4252015-03-05 Pedro Alves <palves@redhat.com>
426
427 * lynx-low.c (lynx_target_ops): Install NULL hooks for
428 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
429 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
430 * nto-low.c (nto_target_ops): Likewise.
431 * spu-low.c (spu_target_ops): Likewise.
432 * win32-low.c (win32_target_ops): Likewise.
433
3e572f71
PA
4342015-03-04 Pedro Alves <palves@redhat.com>
435
436 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
437 Decide whether a breakpoint triggered based on the SIGTRAP's
438 siginfo.si_code.
439 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
440 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
441 (linux_low_filter_event): Check for breakpoints before checking
442 watchpoints.
443 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
444 siginfo.si_code.
445 (linux_stopped_by_sw_breakpoint)
446 (linux_supports_stopped_by_sw_breakpoint)
447 (linux_stopped_by_hw_breakpoint)
448 (linux_supports_stopped_by_hw_breakpoint): New functions.
449 (linux_target_ops): Install new target methods.
450
1ec68e26
PA
4512015-03-04 Pedro Alves <palves@redhat.com>
452
453 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
454 * server.c (swbreak_feature, hwbreak_feature): New globals.
455 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
456 (captured_main): Clear swbreak_feature and hwbreak_feature.
457 * server.h (swbreak_feature, hwbreak_feature): Declare.
458 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
459 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
460 supports_stopped_by_hw_breakpoint>: New fields.
461 (target_supports_stopped_by_sw_breakpoint)
462 (target_stopped_by_sw_breakpoint)
463 (target_supports_stopped_by_hw_breakpoint)
464 (target_stopped_by_hw_breakpoint): Declare.
465
15c66dd6
PA
4662015-03-04 Pedro Alves <palves@redhat.com>
467
468 enum lwp_stop_reason -> enum target_stop_reason
469 * linux-low.c (check_stopped_by_breakpoint): Adjust.
470 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
471 (linux_wait_1, stuck_in_jump_pad_callback)
472 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
473 (linux_stopped_by_watchpoint):
474 * linux-low.h (enum lwp_stop_reason): Delete.
475 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
476 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
477
98fc70d6
YQ
4782015-03-04 Yao Qi <yao.qi@linaro.org>
479
480 * Makefile.in (SFILES): Add linux-aarch64-low.c.
481
dd2ac174
GB
4822015-03-03 Gary Benson <gbenson@redhat.com>
483
484 * hostio.c (handle_vFile): Fix prefix lengths.
485
d68e53f4
MM
4862015-03-03 Markus Metzger <markus.t.metzger@intel.com>
487
488 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
489 ptr_bits.
490
bf2d68ab
AA
4912015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
492
493 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
494 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
495 (clean): Add "rm -f" for above C files.
496 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
497 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
498 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
499 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
500 * linux-s390-low.c (HWCAP_S390_VX): New macro.
501 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
502 (init_registers_s390x_vx_linux64)
503 (init_registers_s390x_tevx_linux64)
504 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
505 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
506 declarations.
507 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
508 (s390_store_vxrs_high): New functions.
509 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
510 NT_S390_VXRS_HIGH.
511 (s390_arch_setup): Add logic for selecting one of the new target
512 descriptions. Activate the new vector regsets if applicable.
513 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
514 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
515 and init_registers_s390x_tevx_linux64.
516
c966a859
PA
5172015-03-01 Pedro Alves <palves@redhat.com>
518
519 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
520 parameter.
521
4180215b
PA
5222015-02-27 Pedro Alves <palves@redhat.com>
523
524 * linux-x86-low.c (u_debugreg_offset): New function.
525 (x86_linux_dr_get, x86_linux_dr_set): Use it.
526
749bab01
PA
5272015-02-27 Pedro Alves <palves@redhat.com>
528
529 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
530 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
531 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
532 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
533 (ps_lsetfpregs, ps_getpid)
534 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
535 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
536 (ps_lsetxregs, ps_plog): Declare.
537
3c14e5a3
PA
5382015-02-27 Pedro Alves <palves@redhat.com>
539
540 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
541 IP_AGENT_EXPORT_FUNC.
542 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
543 IP_AGENT_EXPORT_FUNC.
544 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
545 (IP_AGENT_EXPORT): Delete.
546 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
547 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
548 (gdb_trampoline_buffer_error, collecting, gdb_collect)
549 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
550 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
551 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
552 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
553 (traceframe_read_count, traceframe_write_count)
554 (traceframes_created, trace_state_variables, get_raw_reg)
555 (get_trace_state_variable_value, set_trace_state_variable_value)
556 (ust_loaded, helper_thread_id, cmd_buf): Use
557 IPA_SYM_EXPORTED_NAME.
558 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
559 (tracepoints) Use IP_AGENT_EXPORT_VAR.
560 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
561 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
562 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
563 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
564 EXTERN_C_PUSH/EXTERN_C_POP.
565 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
566 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
567 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
568 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
569 (traceframe_write_count, traceframe_read_count)
570 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
571 (about_to_request_buffer_space, get_trace_state_variable_value)
572 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
573 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
574 EXTERN_C_PUSH/EXTERN_C_POP.
575 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
576 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
577 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
578 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
579 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
580 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
581 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
582 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
583 Define.
584 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
585 (IP_AGENT_EXPORT_VAR_DECL): Define.
586 (tracing): Declare.
587 (gdb_agent_get_raw_reg): Declare.
588
fe978cb0
PA
5892015-02-27 Tom Tromey <tromey@redhat.com>
590 Pedro Alves <palves@redhat.com>
591
592 Rename symbols whose names are reserved C++ keywords throughout.
593
3bc3d82a
PA
5942015-02-27 Pedro Alves <palves@redhat.com>
595
596 * Makefile.in (COMPILER): New, get it from autoconf.
597 (CXX): Get from autoconf instead.
598 (COMPILE.pre): Use COMPILER.
599 (CC-LD): Rename to ...
600 (CC_LD): ... this. Use COMPILER.
601 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
602 (CXX_FOR_TARGET): Default to g++ instead of gcc.
603 * acinclude.m4: Include build-with-cxx.m4.
604 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
605 Disable -Werror by default if building in C++ mode.
606 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
607 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
608 the C++ compiler. Save/restore CXXFLAGS too.
609 * configure: Regenerate.
610
07697489
PA
6112015-02-27 Pedro Alves <palves@redhat.com>
612
613 * acinclude.m4: Include libiberty.m4.
614 * configure.ac: Call libiberty_INIT.
615 * config.in, configure: Regenerate.
616
9beb7c4e
PA
6172015-02-26 Pedro Alves <palves@redhat.com>
618
619 * linux-low.c (linux_wait_1): When incrementing the PC past a
620 program breakpoint always use the_low_target.breakpoint_len as
621 increment, rather than the maximum between that and
622 the_low_target.decr_pc_after_break.
623
8090aef2
PA
6242015-02-23 Pedro Alves <palves@redhat.com>
625
626 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
627 thread was doing a step-over; always adjust the PC if
628 we stepped over a permanent breakpoint.
629 (linux_wait_1): If we stepped over breakpoint that was on top of a
630 permanent breakpoint, manually advance the PC past it.
631
bc9540e8
PA
6322015-02-23 Pedro Alves <palves@redhat.com>
633
634 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
635 modes.
636 (x86_fill_gregset, x86_store_gregset): Use it when handling
637 $orig_eax.
638
2db9a427
PA
6392015-02-20 Pedro Alves <palves@redhat.com>
640
641 * thread-db.c: Include "nat/linux-procfs.h".
642 (thread_db_init): Skip listing new threads if the kernel supports
643 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
644
afa8d396
PA
6452015-02-20 Pedro Alves <palves@redhat.com>
646
647 * linux-low.c (status_pending_p_callback): Use ptid_match.
648
c9587f88
AT
6492015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
650
651 PR breakpoints/16812
652 * linux-low.c (wstatus_maybe_breakpoint): Remove.
653 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
654 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
655
b05ec7a5
AT
6562015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
657
658 PR breakpoints/15956
659 * tracepoint.c (cmd_qtinit): Add check for current_thread.
660
d33501a5
MM
6612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
662
663 * linux-low.c (linux_low_btrace_conf): Print size.
664 * server.c (handle_btrace_conf_general_set): New.
665 (hanle_general_set): Call handle_btrace_conf_general_set.
666 (handle_query): Report Qbtrace-conf:bts:size as supported.
667
f4abbc16
MM
6682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
669
670 * linux-low.c (linux_low_enable_btrace): Update parameters.
671 (linux_low_btrace_conf): New.
672 (linux_target_ops)<to_btrace_conf>: Initialize.
673 * server.c (current_btrace_conf): New.
674 (handle_btrace_enable): Rename to ...
675 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
676 to target_enable_btrace. Update comment. Update users.
677 (handle_qxfer_btrace_conf): New.
678 (qxfer_packets): Add btrace-conf entry.
679 (handle_query): Report qXfer:btrace-conf:read as supported packet.
680 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
681 (target_ops)<read_btrace_conf>: New.
682 (target_enable_btrace): Update parameters.
683 (target_read_btrace_conf): New.
684
043c3577
MM
6852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
686
687 * server.c (handle_btrace_general_set): Remove call to
688 target_supports_btrace.
689 (supported_btrace_packets): New.
690 (handle_query): Call supported_btrace_packets.
691 * target.h: include btrace-common.h.
692 (btrace_target_info): Removed.
693 (supports_btrace, target_supports_btrace): Update parameters.
694
734b0e4b
MM
6952015-02-09 Markus Metzger <markus.t.metzger@intel.com>
696
697 * Makefile.in (SFILES): Add common/btrace-common.c.
698 (OBS): Add common/btrace-common.o.
699 (btrace-common.o): Add build rules.
700 * linux-low: Include btrace-common.h.
701 (linux_low_read_btrace): Use struct btrace_data. Call
702 btrace_data_init and btrace_data_fini.
703
d6c146e9
PA
7042015-02-06 Pedro Alves <palves@redhat.com>
705
706 * thread-db.c (find_new_threads_callback): Add debug output.
707
20ba1ce6
PA
7082015-02-04 Pedro Alves <palves@redhat.com>
709
710 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
711 (resume_stopped_resumed_lwps): New function.
712 (linux_wait_for_event_filtered): Use it.
713
8cc73a39
SDJ
7142015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
715
716 * Makefile.in (SFILES): Add linux-personality.c.
717 (linux-personality.o): New rule.
718 * configure.srv (srv_linux_obj): Add linux-personality.o to the
719 list of objects to be built.
720 * linux-low.c: Include nat/linux-personality.h.
721 (linux_create_inferior): Remove code to disable address space
722 randomization (moved to ../nat/linux-personality.c). Create
723 cleanup to disable address space randomization.
724
fb23d554
SDJ
7252015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
726
727 * Makefile.in (posix-strerror.o): New rule.
728 (mingw-strerror.o): Likewise.
729 * configure: Regenerated.
730 * configure.ac: Source file ../common/common.host. Initialize new
731 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
732
cdf43629
YQ
7332015-01-14 Yao Qi <yao@codesourcery.com>
734
735 * Makefile.in (SFILES): Add nat/ppc-linux.c.
736 (ppc-linux.o): New rule.
737 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
738 * configure.ac: AC_CHECK_FUNCS(getauxval).
739 * config.in: Re-generated.
740 * configure: Re-generated.
741 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
742 ppc64_64bit_inferior_p
743
514c5338
YQ
7442015-01-14 Yao Qi <yao@codesourcery.com>
745
746 * linux-ppc-low.c: Include "nat/ppc-linux.h".
747 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
748 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
749 (PT_ORIG_R3, PT_TRAP): Likewise.
750 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
751 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
752 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
753
3368c1e5
JB
7542015-01-10 Joel Brobecker <brobecker@adacore.com>
755
756 * i387-fp.c (i387_cache_to_xsave): In look over
757 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
758 zmmh_low_space field by use of zmmh_high_space.
759
582511be
PA
7602015-01-09 Pedro Alves <palves@redhat.com>
761
762 * linux-low.c (step_over_bkpt): Move higher up in the file.
763 (handle_extended_wait): Don't store the stop_pc here.
764 (get_stop_pc): Adjust comments and rename to ...
765 (check_stopped_by_breakpoint): ... this. Record whether the LWP
766 stopped for a software breakpoint or hardware breakpoint.
767 (thread_still_has_status_pending_p): New function.
768 (status_pending_p_callback): Use
769 thread_still_has_status_pending_p. If the event is no longer
770 interesting, resume the LWP.
771 (handle_tracepoints): Add assert.
772 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
773 (wstatus_maybe_breakpoint): New function.
774 (cancel_breakpoint): Delete function.
775 (check_stopped_by_watchpoint): New function, factored out from
776 linux_low_filter_event.
777 (lp_status_maybe_breakpoint): Delete function.
778 (linux_low_filter_event): Remove filter_ptid argument.
779 Leave thread group exits pending here. Store the LWP's stop PC.
780 Always leave events pending.
781 (linux_wait_for_event_filtered): Pull all events out of the
782 kernel, and leave them all pending.
783 (count_events_callback, select_event_lwp_callback): Consider all
784 events.
785 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
786 (select_event_lwp): Only give preference to the stepping LWP in
787 all-stop mode. Adjust comments.
788 (ignore_event): New function.
789 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
790 references to cancel_breakpoints. Adjust to renames. Also give
791 equal priority to all LWPs that have had events in non-stop mode.
792 If reporting a software breakpoint event, unadjust the LWP's PC.
793 (linux_wait): If linux_wait_1 returned an ignored event, retry.
794 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
795 Adjust.
796 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
797 (resume_status_pending_p): Use thread_still_has_status_pending_p.
798 (linux_stopped_by_watchpoint): Adjust.
799 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
800 * linux-low.h (enum lwp_stop_reason): New.
801 (struct lwp_info) <stop_pc>: Adjust comment.
802 <stopped_by_watchpoint>: Delete field.
803 <stop_reason>: New field.
804 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
805 * mem-break.c (software_breakpoint_inserted_here)
806 (hardware_breakpoint_inserted_here): New function.
807 * mem-break.h (software_breakpoint_inserted_here)
808 (hardware_breakpoint_inserted_here): Declare.
809 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
810 (cancel_breakpoints): Delete.
811 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
812 (upload_fast_traceframes): Remove references to
813 cancel_breakpoints.
814
a33e3959
PA
8152015-01-09 Pedro Alves <palves@redhat.com>
816
817 * thread-db.c (find_new_threads_callback): Ignore thread if the
818 kernel thread ID is -1.
819
8784d563
PA
8202015-01-09 Pedro Alves <palves@redhat.com>
821
822 * linux-low.c (linux_attach_fail_reason_string): Move to
823 nat/linux-ptrace.c, and rename.
824 (linux_attach_lwp): Update comment.
825 (attach_proc_task_lwp_callback): New function.
826 (linux_attach): Adjust to rename and use
827 linux_proc_attach_tgid_threads.
828 (linux_attach_fail_reason_string): Delete declaration.
829
76f2b779
JB
8302015-01-01 Joel Brobecker <brobecker@adacore.com>
831
832 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
833 * server.c (gdbserver_version): Likewise.
834
fafcc06a
SDJ
8352014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
836
837 * remote-utils.c: Include ctype.h.
838 (input_interrupt): Explicitly handle the case when the char
839 received is the NUL byte. Improve the printing of non-ASCII
840 characters.
841
beed38b8
JB
8422014-12-16 Joel Brobecker <brobecker@adacore.com>
843
844 * linux-low.c (linux_low_filter_event): Update call to
845 linux_enable_event_reporting following the addition of
846 a new parameter to that function.
847
bf330350
CU
8482014-12-16 Catalin Udma <catalin.udma@freescale.com>
849
850 PR server/17457
851 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
852 (AARCH64_FPCR_REGNO): Likewise.
853 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
854 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
855 (aarch64_store_fpregset): Likewise.
856
5227d625
JB
8572014-12-15 Joel Brobecker <brobecker@adacore.com>
858
859 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
860 Remove FIXME comment about assumption about N.
861
f93b65a0
JB
8622014-12-13 Joel Brobecker <brobecker@adacore.com>
863
864 * configure.ac: If large-file support is disabled in GDBserver,
865 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
866 * configure: Regenerate.
867
e5a9158d
AA
8682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
869
870 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
871 warning upon ENODATA from ptrace.
872 * linux-s390-low.c (s390_store_tdb): New.
873 (s390_regsets): Add regset for NT_S390_TDB.
874
feea5f36
AA
8752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
876
877 * linux-low.c (regsets_store_inferior_registers): Skip regsets
878 without a fill_function.
879 * linux-s390-low.c (s390_fill_last_break): Remove.
880 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
881 (s390_arch_setup): Use regset's size instead of fill_function for
882 loop end condition.
883
098dbe61
AA
8842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
885
886 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
887 the regset's store function when ptrace returned an error.
888 * regcache.c (get_thread_regcache): Invalidate register cache
889 before fetching inferior's registers.
890
28eef672
AA
8912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
892
893 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
894 while-loop as for-loop.
895 (regsets_store_inferior_registers): Likewise.
896
bdca27a2
YQ
8972014-11-28 Yao Qi <yao@codesourcery.com>
898
899 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
900 * config.in, configure: Re-generate.
901 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
902 is defined.
903
9c232dda
YQ
9042014-11-21 Yao Qi <yao@codesourcery.com>
905
906 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
907 (AC_CHECK_HEADERS): Remove malloc.h.
908 * configure: Re-generated.
909 * config.in: Re-generated.
910 * server.h: Don't include alloca.h and malloc.h.
911 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
912 Don't include malloc.h.
913
43968415
JB
9142014-11-17 Joel Brobecker <brobecker@adacore.com>
915
916 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
917 corresponding ERRNO check in same block.
918
40e91bc7
PA
9192014-11-12 Pedro Alves <palves@redhat.com>
920
921 * server.c (cont_thread): Update comment.
922 (start_inferior, attach_inferior): No longer clear cont_thread.
923 (handle_v_cont): No longer set cont_thread.
924 (captured_main): Clear cont_thread each time a GDB connects.
925
c2c118cf
PA
9262014-11-12 Pedro Alves <palves@redhat.com>
927
928 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
929 thread, and don't resume all threads if the Hc thread has exited.
930
78708b7c
PA
9312014-11-12 Pedro Alves <palves@redhat.com>
932
933 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
934 the process group instead of to a specific LWP.
935
a2abc7de
PA
9362014-10-15 Pedro Alves <palves@redhat.com>
937
938 PR server/17487
939 * win32-arm-low.c (arm_set_thread_context): Remove current_event
940 parameter.
941 (arm_set_thread_context): Delete.
942 (the_low_target): Adjust.
943 * win32-i386-low.c (debug_registers_changed)
944 (debug_registers_used): Delete.
945 (update_debug_registers_callback): New function.
946 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
947 needing to update their debug registers.
948 (win32_get_current_dr): New function.
949 (x86_dr_low_get_addr, x86_dr_low_get_control)
950 (x86_dr_low_get_status): Fetch the debug register from the thread
951 record's context.
952 (i386_initial_stuff): Adjust.
953 (i386_get_thread_context): Remove current_event parameter. Don't
954 clear debug_registers_changed nor copy DR values to
955 debug_reg_state.
956 (i386_set_thread_context): Delete.
957 (i386_prepare_to_resume): New function.
958 (i386_thread_added): Mark the thread as needing to update irs
959 debug registers.
960 (the_low_target): Remove i386_set_thread_context and install
961 i386_prepare_to_resume.
962 * win32-low.c (win32_get_thread_context): Adjust.
963 (win32_set_thread_context): Use SetThreadContext
964 directly.
965 (win32_prepare_to_resume): New function.
966 (win32_require_context): New function, factored out from ...
967 (thread_rec): ... this.
968 (continue_one_thread): Call win32_prepare_to_resume on each thread
969 we're about to continue.
970 (win32_resume): Call win32_prepare_to_resume on the event thread.
971 * win32-low.h (struct win32_thread_info)
972 <debug_registers_changed>: New field.
973 (struct win32_target_ops): Change prototype of set_thread_context,
974 delete set_thread_context and add prepare_to_resume.
975 (win32_require_context): New declaration.
976
a442d071
GB
9772014-10-08 Gary Benson <gbenson@redhat.com>
978
979 * server.h: Do not include common-exceptions.h.
980
6f1947e8
GB
9812014-10-08 Gary Benson <gbenson@redhat.com>
982
983 * server.h: Do not include cleanups.h.
984
63b434a4
JH
9852014-09-30 James Hogan <james.hogan@imgtec.com>
986
987 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
988 mips64-dsp-linux.c.
989
c4d9ceb6
YQ
9902014-09-23 Yao Qi <yao@codesourcery.com>
991
992 * linux-low.c (lp_status_maybe_breakpoint): New function.
993 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
994 (count_events_callback): Likewise.
995 (select_event_lwp_callback): Likewise.
996 (cancel_breakpoints_callback): Likewise.
997
89a5711c
DB
9982014-09-19 Don Breazeal <donb@codesourcery.com>
999
1000 * linux-low.c (handle_extended_wait): Call
1001 linux_ptrace_get_extended_event.
1002 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1003 linux_is_extended_waitstatus.
1004
bffc0964
JB
10052014-09-16 Joel Brobecker <brobecker@adacore.com>
1006
1007 * Makefile.in (CPPFLAGS): Define.
1008 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1009 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1010
0bfdf32f
GB
10112014-09-16 Gary Benson <gbenson@redhat.com>
1012
1013 * inferiors.h (current_inferior): Renamed as...
1014 (current_thread): New variable. All uses updated.
1015 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1016 (maybe_move_out_of_jump_pad): Likewise.
1017 (cancel_breakpoint): Likewise.
1018 (linux_low_filter_event): Likewise.
1019 (wait_for_sigstop): Likewise.
1020 (linux_resume_one_lwp): Likewise.
1021 (need_step_over_p): Likewise.
1022 (start_step_over): Likewise.
1023 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1024 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1025 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1026 and save_inferior as saved_thread.
1027 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1028 saved_thread.
1029 (regcache_invalidate_thread): Likewise.
1030 * remote-utils.c (prepare_resume_reply): Likewise.
1031 * thread-db.c (thread_db_get_tls_address): Likewise.
1032 (disable_thread_event_reporting): Likewise.
1033 (remove_thread_event_breakpoints): Likewise.
1034 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1035 as saved_thread.
1036 * target.h (set_desired_inferior): Renamed as...
1037 (set_desired_thread): New declaration. All uses updated.
1038 * server.c (myresume): Updated comment to reference thread instead
1039 of inferior.
1040 (handle_serial_event): Likewise.
1041 (handle_target_event): Likewise.
1042
361c8ade
GB
10432014-09-12 Tom Tromey <tromey@redhat.com>
1044 Gary Benson <gbenson@redhat.com>
1045
1046 * regcache.h: Include common-regcache.h.
1047 (regcache_read_pc): Don't declare.
1048 * regcache.c (get_thread_regcache_for_ptid): New function.
1049
bd9269f7
GB
10502014-09-11 Tom Tromey <tromey@redhat.com>
1051 Gary Benson <gbenson@redhat.com>
1052
1053 * symbol.c: New file.
1054 * Makefile.in (SFILES): Add symbol.c.
1055 (OBS): Add symbol.o.
1056
f8c1d06b
GB
10572014-09-11 Gary Benson <gbenson@redhat.com>
1058
1059 * target.c (target_stop_ptid, target_continue_ptid): New
1060 functions.
1061
721ec300
GB
10622014-09-11 Tom Tromey <tromey@redhat.com>
1063 Gary Benson <gbenson@redhat.com>
1064
1065 * target.h: Include target/target.h.
1066 * target.c (target_read_memory, target_read_uint32)
1067 (target_write_memory): New functions.
1068
c5e92cca
GB
10692014-09-11 Gary Benson <gbenson@redhat.com>
1070
1071 * server.h (debug_hw_points): Don't declare.
1072 * server.c (debug_hw_points): Don't define. Replace all uses
1073 with show_debug_regs.
1074 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1075 all uses with show_debug_regs.
1076
2e4bb98a
EBM
10772014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1078
1079 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1080 endianness into account.
1081 (ppc_supply_ptrace_register): Likewise.
1082
ac740bc7
JH
10832014-09-03 James Hogan <james.hogan@imgtec.com>
1084
1085 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1086 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1087
97ea6506
GB
10882014-09-03 Gary Benson <gbenson@redhat.com>
1089
1090 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1091 ALL_DEBUG_ADDRESS_REGISTERS.
1092
df7e5265
GB
10932014-09-02 Gary Benson <gbenson@redhat.com>
1094
1095 * i386-low.h: Renamed as...
1096 * x86-low.h: New file. All type, function and variable name
1097 prefixes changed from "i386_" to "x86_". All references updated.
1098 * i386-low.c: Renamed as...
1099 * x86-low.c: New file. All type, function and variable name
1100 prefixes changed from "i386_" to "x86_". All references updated.
1101
ed859da7
GB
11022014-09-02 Gary Benson <gbenson@redhat.com>
1103
1104 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1105 (x86_linux_new_thread): Likewise.
1106
860789c7
GB
11072014-08-29 Gary Benson <gbenson@redhat.com>
1108
1109 * server.h (setjmp.h): Do not include.
1110 (toplevel): Do not declare.
1111 (common-exceptions.h): Include.
1112 (cleanups.h): Likewise.
1113 * server.c (toplevel): Do not define.
1114 (exit_code): New static global.
1115 (detach_or_kill_for_exit_cleanup): New function.
1116 (main): New function. Original main renamed to...
1117 (captured_main): New function.
1118 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1119
ff55e1b5
GB
11202014-08-29 Gary Benson <gbenson@redhat.com>
1121
1122 * Makefile.in (SFILES): Add common/common-exceptions.c.
1123 (OBS): Add common-exceptions.o.
1124 (common-exceptions.o): New rule.
1125 * utils.c (prepare_to_throw_exception): New function.
1126
e9bcb658
GB
11272014-08-29 Gary Benson <gbenson@redhat.com>
1128
1129 * config.in: Regenerate.
1130 * configure: Likewise.
1131
e3180625
GB
11322014-08-29 Gary Benson <gbenson@redhat.com>
1133
1134 * Makefile.in (SFILES): Add common/cleanups.c.
1135 (OBS): cleanups.o.
1136 (cleanups.o): New rule.
1137
e3d6ba5d
GB
11382014-08-29 Gary Benson <gbenson@redhat.com>
1139
1140 * utils.c (internal_vwarning): New function.
1141
7096e886
GB
11422014-08-28 Gary Benson <gbenson@redhat.com>
1143
1144 * utils.h (fatal): Remove declaration.
1145 * utils.c (fatal): Remove function.
1146
14ce3192
GB
11472014-08-28 Gary Benson <gbenson@redhat.com>
1148
1149 * tracepoint.c (gdb_agent_init): Replace fatal with
1150 perror_with_name.
1151 (initialize_tracepoint): Likewise.
1152
50278d59
GB
11532014-08-28 Gary Benson <gbenson@redhat.com>
1154
1155 * remote-utils.c (remote_prepare): Replace fatal with error.
1156
aa96c426
GB
11572014-08-28 Gary Benson <gbenson@redhat.com>
1158
1159 * linux-low.c (linux_async): Replace fatal with warning.
1160 Tidy up and return.
1161 (linux_start_non_stop): Return -1 if linux_async failed.
1162
f7160e97
GB
11632014-08-28 Gary Benson <gbenson@redhat.com>
1164
1165 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1166 gdb_assert.
1167 (i386_dr_low_get_addr): Remove vague comment.
1168 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1169 gdb_assert.
1170
38e08fca
GB
11712014-08-28 Gary Benson <gbenson@redhat.com>
1172
1173 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1174 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1175 internal_error.
1176 (linux_resume_one_lwp): Likewise.
1177 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1178 gdb_assert.
1179 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1180 with internal_error.
1181 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1182 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1183 (find_register_by_name): Replace fatal with internal_error.
1184 (find_regno): Likewise.
1185 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1186 * thread-db.c (thread_db_create_event): Likewise.
1187 (thread_db_load_search): Likewise.
1188 (try_thread_db_load_1): Likewise.
1189 * tracepoint.c (get_jump_space_head): Replace fatal with
1190 internal_error.
1191 (claim_trampoline_space): Likewise.
1192 (have_fast_tracepoint_trampoline_buffer): Likewise.
1193 (cmd_qtstart): Likewise.
1194 (stop_tracing): Likewise.
1195 (fast_tracepoint_collecting): Likewise.
1196 (target_malloc): Likewise.
1197 (download_tracepoint): Likewise.
1198 (download_trace_state_variables): Replace check with gdb_assert.
1199 (upload_fast_traceframes): Replace fatal with internal_error.
1200
34abf635
GB
12012014-08-19 Tom Tromey <tromey@redhat.com>
1202 Gary Benson <gbenson@redhat.com>
1203
1204 * Makefile.in (SFILES): Add common/common-debug.c.
1205 (OBS): Add common-debug.o.
1206 (common-debug.o): New rule.
1207 * debug.h (debug_printf): Don't declare.
1208 * debug.c (debug_printf): Renamed and rewritten as...
1209 (debug_vprintf): New function.
1210
f6e94d78
GB
12112014-08-19 Gary Benson <gbenson@redhat.com>
1212
1213 * utils.h: Do not include print-utils.h.
1214
9239eeab
GB
12152014-08-19 Tom Tromey <tromey@redhat.com>
1216 Gary Benson <gbenson@redhat.com>
1217
1218 * server.h: Add static assertion.
1219 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1220
ef87c8bb
GB
12212014-08-19 Tom Tromey <tromey@redhat.com>
1222 Gary Benson <gbenson@redhat.com>
1223
1224 * Makefile.in (SFILES): Add common/errors.c.
1225 (OBS): Add errors.o.
1226 (IPA_OBS): Add errors-ipa.o.
1227 (errors.o): New rule.
1228 (errors-ipa.o): Likewise.
1229 * utils.h (perror_with_name, error, warning): Don't declare.
1230 * utils.c (warning): Renamed and rewritten as...
1231 (vwarning): New function.
1232 (error): Renamed and rewritten as...
1233 (verror): New function.
1234 (internal_error): Renamed and rewritten as...
1235 (internal_verror): New function.
1236
bb974a24
GB
12372014-08-07 Gary Benson <gbenson@redhat.com>
1238
1239 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1240 * configure: Regenerate.
1241 * config.in: Likewise.
1242 * server.h: Do not include errno.h.
1243 * event-loop.c: Likewise.
1244 * hostio-errno.c: Likewise.
1245 * linux-low.c: Likewise.
1246 * remote-utils.c: Likewise.
1247 * spu-low.c: Likewise.
1248 * utils.c: Likewise.
1249 * gdbreplay.c: Unconditionally include errno.h.
1250
6d3d12eb
GB
12512014-08-07 Gary Benson <gbenson@redhat.com>
1252
1253 * server.h: Do not include string.h.
1254 * event-loop.c: Likewise.
1255 * linux-low.c: Likewise.
1256 * regcache.c: Likewise.
1257 * remote-utils.c: Likewise.
1258 * spu-low.c: Likewise.
1259 * utils.c: Likewise.
1260
dccbb609
GB
12612014-08-07 Gary Benson <gbenson@redhat.com>
1262
1263 * server.h: Do not include gdb_assert.h.
1264
e76df0d0
GB
12652014-08-07 Gary Benson <gbenson@redhat.com>
1266
1267 * server.h: Do not include common-utils.h.
1268
4cb9c816
GB
12692014-08-07 Gary Benson <gbenson@redhat.com>
1270
1271 * server.h: Do not include ptid.h.
1272 * notif.h: Likewise.
1273
3995eeee
GB
12742014-08-07 Gary Benson <gbenson@redhat.com>
1275
1276 * server.h: Do not include gdb_locale.h.
1277
cb9f1a9b
GB
12782014-08-07 Gary Benson <gbenson@redhat.com>
1279
1280 * server.h: Do not include gdb/signals.h.
1281 * win32-low.c: Likewise.
1282
a5fceff8
GB
12832014-08-07 Gary Benson <gbenson@redhat.com>
1284
1285 * server.h: Do not include pathmax.h.
1286
b9391142
GB
12872014-08-07 Gary Benson <gbenson@redhat.com>
1288
1289 * server.h: Do not include libiberty.h.
1290 * linux-bfin-low.c: Likewise.
1291
0e443c87
GB
12922014-08-07 Gary Benson <gbenson@redhat.com>
1293
1294 * server.h: Do not include ansidecl.h.
1295
8ebb3f56
GB
12962014-08-07 Gary Benson <gbenson@redhat.com>
1297
1298 * linux-x86-low.c: Do not include stddef.h.
1299 * lynx-ppc-low.c: Likewise.
1300 * tracepoint.c: Likewise.
1301
8980bdf6
GB
13022014-08-07 Gary Benson <gbenson@redhat.com>
1303
1304 * server.h: Do not include stdarg.h.
1305 * nto-low.c: Likewise.
1306
d7096f71
GB
13072014-08-07 Gary Benson <gbenson@redhat.com>
1308
1309 * server.h: Do not include stdlib.h.
1310 * inferiors.c: Likewise.
1311 * linux-low.c: Likewise.
1312 * regcache.c: Likewise.
1313 * spu-low.c: Likewise.
1314 * tracepoint.c: Likewise.
1315 * utils.c: Likewise.
1316
d02f550d
GB
13172014-08-07 Gary Benson <gbenson@redhat.com>
1318
1319 * server.h: Do not include stdio.h.
1320 * linux-low.c: Likewise.
1321 * remote-utils.c: Likewise.
1322 * spu-low.c: Likewise.
1323 * utils.c: Likewise.
1324 * wincecompat.c: Likewise.
1325
87f6c4e3
GB
13262014-08-06 Gary Benson <gbenson@redhat.com>
1327
1328 * regcache.c (init_register_cache): Move conditionals inside if.
1329
7089dca4
GB
13302014-08-06 Gary Benson <gbenson@redhat.com>
1331
1332 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1333
462f517e
GB
13342014-07-31 Gary Benson <gbenson@redhat.com>
1335
1336 * ax.h: Do not include server.h.
1337 * gdbthread.h: Likewise.
1338 * lynx-low.h: Likewise.
1339 * notif.h: Likewise.
1340
976411d6
GB
13412014-07-30 Gary Benson <gbenson@redhat.com>
1342
1343 * server.h: Include common-defs.h.
1344 Do not include config.h or build-gnulib-gdbserver/config.h.
1345
d41f6d8e
GB
13462014-07-30 Gary Benson <gbenson@redhat.com>
1347
1348 * hostio-errno.c: Move server.h to top of includes list.
1349 * inferiors.c: Likewise.
1350 * linux-x86-low.c: Likewise.
1351 * notif.c: Include server.h.
1352
314c6a35
TT
13532014-07-24 Tom Tromey <tromey@redhat.com>
1354 Gary Benson <gbenson@redhat.com>
1355
1356 * server.h (CORE_ADDR): Now unsigned.
1357
69ff6be5
PA
13582014-07-16 Pedro Alves <palves@redhat.com>
1359
1360 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1361
ce9e3fe7
PA
13622014-07-15 Pedro Alves <palves@redhat.com>
1363
1364 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1365 copy.
1366
e76126e8
PA
13672014-07-11 Pedro Alves <palves@redhat.com>
1368
1369 * linux-low.c (kill_wait_lwp): New function, based on
1370 kill_one_lwp_callback, but use my_waitpid directly.
1371 (kill_one_lwp_callback, linux_kill): Use it.
1372
8e9db26e
PA
13732014-06-23 Pedro Alves <palves@redhat.com>
1374
1375 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1376 before setting DR0..DR3.
1377
698b3e08
GB
13782014-06-20 Gary Benson <gbenson@redhat.com>
1379
1380 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1381 * configure: Regenerated.
1382 * config.in: Likewise.
1383
125f8a3d
GB
13842014-06-20 Gary Benson <gbenson@redhat.com>
1385
1386 * Makefile.in (SFILES): Update locations for files moved
1387 from common to nat.
1388 (object file files): Reordered.
1389
42995dbd
GB
13902014-06-20 Gary Benson <gbenson@redhat.com>
1391
1392 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1393 (i386_dr_low_set_addr): Likewise.
1394 (i386_dr_low_get_addr): Likewise.
1395 (i386_dr_low_can_set_control): Likewise.
1396 (i386_dr_low_set_control): Likewise.
1397 (i386_dr_low_get_control): Likewise.
1398 (i386_dr_low_get_status): Likewise.
1399 (i386_get_debug_register_length): Likewise.
1400 * linux-x86-low.c (i386_dr_low_set_addr):
1401 Changed signature. Made static.
1402 (i386_dr_low_get_addr): Likewise.
1403 (i386_dr_low_set_control): Likewise.
1404 (i386_dr_low_get_control): Likewise.
1405 (i386_dr_low_get_status): Likewise.
1406 (i386_dr_low): New global variable.
1407 * win32-i386-low.c (i386_dr_low_set_addr):
1408 Changed signature. Made static.
1409 (i386_dr_low_get_addr): Likewise.
1410 (i386_dr_low_set_control): Likewise.
1411 (i386_dr_low_get_control): Likewise.
1412 (i386_dr_low_get_status): Likewise.
1413 (i386_dr_low): New global variable.
1414
e1d2394b
MS
14152014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1416
1417 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1418 * Makefile.in (AR, AR_FLAGS): Define.
1419 * configure: Regenerate.
1420
3a8ee006
GB
14212014-06-19 Gary Benson <gbenson@redhat.com>
1422
1423 * Makefile.in (i386-dregs.o): New rule.
1424 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1425 * i386-low.c (target.h): Remove include.
1426 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1427 (DR_CONTROL_SHIFT): Likewise.
1428 (DR_CONTROL_SIZE): Likewise.
1429 (DR_RW_EXECUTE): Likewise.
1430 (DR_RW_WRITE): Likewise.
1431 (DR_RW_READ): Likewise.
1432 (DR_RW_IORW): Likewise.
1433 (DR_LEN_1): Likewise.
1434 (DR_LEN_2): Likewise.
1435 (DR_LEN_4): Likewise.
1436 (DR_LEN_8): Likewise.
1437 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1438 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1439 (DR_ENABLE_SIZE): Likewise.
1440 (DR_LOCAL_SLOWDOWN): Likewise.
1441 (DR_GLOBAL_SLOWDOWN): Likewise.
1442 (DR_CONTROL_RESERVED): Likewise.
1443 (I386_DR_CONTROL_MASK): Likewise.
1444 (I386_DR_VACANT): Likewise.
1445 (I386_DR_LOCAL_ENABLE): Likewise.
1446 (I386_DR_GLOBAL_ENABLE): Likewise.
1447 (I386_DR_DISABLE): Likewise.
1448 (I386_DR_SET_RW_LEN): Likewise.
1449 (I386_DR_GET_RW_LEN): Likewise.
1450 (I386_DR_WATCH_HIT): Likewise.
1451 (i386_wp_op_t): Likewise.
1452 (i386_show_dr): Likewise.
1453 (i386_length_and_rw_bits): Likewise.
1454 (i386_insert_aligned_watchpoint): Likewise.
1455 (i386_remove_aligned_watchpoint): Likewise.
1456 (i386_handle_nonaligned_watchpoint): Likewise.
1457 i386_update_inferior_debug_regs(): Likewise.
1458 (i386_dr_insert_watchpoint): Likewise.
1459 (i386_dr_remove_watchpoint): Likewise.
1460 (i386_dr_region_ok_for_watchpoint): Likewise.
1461 (i386_dr_stopped_data_address): Likewise.
1462 (i386_dr_stopped_by_watchpoint): Likewise.
1463
8f26655c
GB
14642014-06-19 Gary Benson <gbenson@redhat.com>
1465
1466 * i386-low.c (i386_dr_show): Renamed to
1467 i386_show_dr and made static. All uses updated.
1468 (i386_dr_length_and_rw_bits): Renamed to
1469 i386_length_and_rw_bits and made static.
1470 All uses updated.
1471 (i386_dr_insert_aligned_watchpoint): Renamed to
1472 i386_insert_aligned_watchpoint and made static.
1473 All uses updated.
1474 (i386_dr_remove_aligned_watchpoint): Renamed to
1475 i386_remove_aligned_watchpoint and made static.
1476 All uses updated.
1477 (i386_dr_update_inferior_debug_regs): Renamed to
1478 i386_update_inferior_debug_regs and made static.
1479 All uses updated.
1480
b9228891
GB
14812014-06-18 Gary Benson <gbenson@redhat.com>
1482
5171def3
GB
1483 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1484 (i386_dr_low_can_set_control): Likewise.
1485 (i386_get_debug_register_length): Likewise.
1486 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1487 (i386_dr_low_can_set_control): Likewise.
1488 (i386_get_debug_register_length): Likewise.
1489
14902014-06-17 Gary Benson <gbenson@redhat.com>
1491
b9228891
GB
1492 * i386-low.h (i386-dregs.h): New include.
1493 (DR_FIRSTADDR): Now in i386-dregs.h.
1494 (DR_LASTADDR): Likewise.
1495 (DR_NADDR): Likewise.
1496 (DR_STATUS): Likewise.
1497 (DR_CONTROL): Likewise.
1498 (i386_debug_reg_state): Likewise.
1499 (i386_dr_insert_watchpoint): Likewise.
1500 (i386_dr_remove_watchpoint): Likewise.
1501 (i386_dr_region_ok_for_watchpoint): Likewise.
1502 (i386_dr_stopped_data_address): Likewise.
1503 (i386_dr_stopped_by_watchpoint): Likewise.
1504 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1505
4be83cc2
GB
15062014-06-18 Gary Benson <gbenson@redhat.com>
1507
1508 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1509 i386_dr_insert_watchpoint.
1510 (i386_low_remove_watchpoint): Renamed to
1511 i386_dr_remove_watchpoint.
1512 (i386_low_region_ok_for_watchpoint): Renamed to
1513 i386_dr_region_ok_for_watchpoint.
1514 (i386_low_stopped_data_address): Renamed to
1515 i386_dr_stopped_data_address.
1516 (i386_low_stopped_by_watchpoint): Renamed to
1517 i386_dr_stopped_by_watchpoint.
1518 * i386-low.c (i386_show_dr): Renamed to
1519 i386_dr_show and made nonstatic. All uses updated.
1520 (i386_length_and_rw_bits): Renamed to
1521 i386_dr_length_and_rw_bits and made nonstatic.
1522 All uses updated.
1523 (i386_insert_aligned_watchpoint): Renamed to
1524 i386_dr_insert_aligned_watchpoint and made nonstatic.
1525 All uses updated.
1526 (i386_remove_aligned_watchpoint): Renamed to
1527 i386_dr_remove_aligned_watchpoint and made nonstatic.
1528 All uses updated.
1529 (i386_update_inferior_debug_regs): Renamed to
1530 i386_dr_update_inferior_debug_regs and made nonstatic.
1531 All uses updated.
1532 (i386_low_insert_watchpoint): Renamed to
1533 i386_dr_insert_watchpoint. All uses updated.
1534 (i386_low_remove_watchpoint): Renamed to
1535 i386_dr_remove_watchpoint. All uses updated.
1536 (i386_low_region_ok_for_watchpoint): Renamed to
1537 i386_dr_region_ok_for_watchpoint. All uses updated.
1538 (i386_low_stopped_data_address): Renamed to
1539 i386_dr_stopped_data_address. All uses updated.
1540 (i386_low_stopped_by_watchpoint): Renamed to
1541 i386_dr_stopped_by_watchpoint. All uses updated.
1542
131aa0d4
GB
15432014-06-18 Gary Benson <gbenson@redhat.com>
1544
1545 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1546 (i386_dr_low_can_set_control): Likewise.
1547 (i386_insert_aligned_watchpoint): New check.
1548
d9305f7f
GB
15492014-06-18 Gary Benson <gbenson@redhat.com>
1550
1551 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1552 Renamed to state.
1553
e927c9fc
GB
15542014-06-18 Gary Benson <gbenson@redhat.com>
1555
1556 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1557 instead of fatal and error.
1558 (i386_handle_nonaligned_watchpoint): Likewise.
1559
1b6d4134
GB
15602014-06-18 Gary Benson <gbenson@redhat.com>
1561
1562 * i386-low.c (i386_get_debug_register_length): New macro.
1563 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1564 (i386_show_dr): Use debug_printf instead of fprintf. Use
1565 phex to format values.
1566
6e62758f
GB
15672014-06-18 Gary Benson <gbenson@redhat.com>
1568
1569 * i386-low.h: Comment changes.
1570 * i386-low.c: Likewise.
1571
fc6e2f03
GB
15722014-06-18 Gary Benson <gbenson@redhat.com>
1573
1574 * i386-low.c: Whitespace changes.
1575
f9d1eeed
TT
15762014-06-12 Tom Tromey <tromey@redhat.com>
1577
1578 * utils.c (freeargv): Remove.
1579
0b04e523
TT
15802014-06-12 Tom Tromey <tromey@redhat.com>
1581
1582 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1583 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1584 (parse_debug_format_options): Likewise.
1585 (gdbserver_usage): Likewise.
1586 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1587 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1588 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1589 against libiberty.
1590 ($(LIBGNU)): Depend on libiberty.
1591 (all-lib): Recurse into all subdirs.
1592 (install-only): Invoke "install" target in subdirs.
1593 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1594 targets.
1595 * configure: Rebuild.
1596 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1597 for vasprintf, vsnprintf, or gettimeofday.
1598 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1599 srv_tgtobj.
1600
270c9937
JB
16012014-06-05 Joel Brobecker <brobecker@adacore.com>
1602
1603 * development.sh: Delete.
1604 * Makefile.in (config.status): Adjust dependency on development.sh.
1605 * configure.ac: Adjust development.sh source call.
1606 * configure: Regenerate.
1607
0a261ed8
PA
16082014-06-02 Pedro Alves <palves@redhat.com>
1609
1610 * ax.c (gdb_free_agent_expr): New function.
1611 * ax.h (gdb_free_agent_expr): New declaration.
1612 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1613 list.
1614 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1615 static.
1616 (clear_breakpoint_conditions_and_commands): New function.
1617 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1618 (clear_breakpoint_conditions_and_commands): New declaration.
1619
e9dae05e
RR
16202014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1621
1622 * linux-aarch64-low.c (asm/ptrace.h): Include.
1623
5876f503
JK
16242014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1625
1626 Fix TLS access for -static -pthread.
1627 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1628 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1629 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1630
802e8e6d
PA
16312014-05-20 Pedro Alves <palves@redhat.com>
1632
1633 * linux-aarch64-low.c (aarch64_insert_point)
1634 (aarch64_remove_point): No longer check whether the type is
1635 supported here. Adjust to new interface.
1636 (the_low_target): Install aarch64_supports_z_point_type as
1637 supports_z_point_type method.
1638 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1639 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1640 instead of a Z packet char. Adjust.
1641 (arm_supports_z_point_type): New function.
1642 (arm_insert_point, arm_remove_point): Adjust to new interface.
1643 (the_low_target): Install arm_supports_z_point_type.
1644 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1645 (cris_insert_point, cris_remove_point): Adjust to new interface.
1646 Don't check whether the type is supported here.
1647 (the_low_target): Install cris_supports_z_point_type.
1648 * linux-low.c (linux_supports_z_point_type): New function.
1649 (linux_insert_point, linux_remove_point): Adjust to new interface.
1650 * linux-low.h (struct linux_target_ops) <insert_point,
1651 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1652 raw_breakpoint pointer parameter.
1653 <supports_z_point_type>: New method.
1654 * linux-mips-low.c (mips_supports_z_point_type): New function.
1655 (mips_insert_point, mips_remove_point): Adjust to new interface.
1656 Use mips_supports_z_point_type.
1657 (the_low_target): Install mips_supports_z_point_type.
1658 * linux-ppc-low.c (the_low_target): Install NULL as
1659 supports_z_point_type method.
1660 * linux-s390-low.c (the_low_target): Install NULL as
1661 supports_z_point_type method.
1662 * linux-sparc-low.c (the_low_target): Install NULL as
1663 supports_z_point_type method.
1664 * linux-x86-low.c (x86_supports_z_point_type): New function.
1665 (x86_insert_point): Adjust to new insert_point interface. Use
1666 insert_memory_breakpoint. Adjust to new
1667 i386_low_insert_watchpoint interface.
1668 (x86_remove_point): Adjust to remove_point interface. Use
1669 remove_memory_breakpoint. Adjust to new
1670 i386_low_remove_watchpoint interface.
1671 (the_low_target): Install x86_supports_z_point_type.
1672 * lynx-low.c (lynx_target_ops): Install NULL as
1673 supports_z_point_type callback.
1674 * nto-low.c (nto_supports_z_point_type): New.
1675 (nto_insert_point, nto_remove_point): Adjust to new interface.
1676 (nto_target_ops): Install nto_supports_z_point_type.
1677 * mem-break.c: Adjust intro comment.
1678 (struct raw_breakpoint) <raw_type, size>: New fields.
1679 <inserted>: Update comment.
1680 <shlib_disabled>: Delete field.
1681 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1682 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1683 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1684 (raw_bkpt_type_to_target_hw_bp_type): New function.
1685 (find_enabled_raw_code_breakpoint_at): New function.
1686 (find_raw_breakpoint_at): New type and size parameters. Use them.
1687 (insert_memory_breakpoint): New function, based off
1688 set_raw_breakpoint_at.
1689 (remove_memory_breakpoint): New function.
1690 (set_raw_breakpoint_at): Reimplement.
1691 (set_breakpoint): New, based on set_breakpoint_at.
1692 (set_breakpoint_at): Reimplement.
1693 (delete_raw_breakpoint): Go through the_target->remove_point
1694 instead of assuming memory breakpoints.
1695 (find_gdb_breakpoint_at): Delete.
1696 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1697 (find_gdb_breakpoint): New function.
1698 (set_gdb_breakpoint_at): Delete.
1699 (z_type_supported): New function.
1700 (set_gdb_breakpoint_1): New function, loosely based off
1701 set_gdb_breakpoint_at.
1702 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1703 (delete_gdb_breakpoint_at): Delete.
1704 (delete_gdb_breakpoint_1): New function, loosely based off
1705 delete_gdb_breakpoint_at.
1706 (delete_gdb_breakpoint): New function.
1707 (clear_gdb_breakpoint_conditions): Rename to ...
1708 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1709 breakpoint.
1710 (add_condition_to_breakpoint): Make static.
1711 (add_breakpoint_condition): Take a struct breakpoint pointer
1712 instead of an address. Adjust.
1713 (gdb_condition_true_at_breakpoint): Rename to ...
1714 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1715 z_type parameter.
1716 (gdb_condition_true_at_breakpoint): Reimplement.
1717 (add_breakpoint_commands): Take a struct breakpoint pointer
1718 instead of an address. Adjust.
1719 (gdb_no_commands_at_breakpoint): Rename to ...
1720 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1721 parameter. Return true if no breakpoint was found. Change debug
1722 output.
1723 (gdb_no_commands_at_breakpoint): Reimplement.
1724 (run_breakpoint_commands): Rename to ...
1725 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1726 and change return type to boolean.
1727 (run_breakpoint_commands): New function.
1728 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1729 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1730 breakpoint. Go through the_target->remove_point instead of
1731 assuming memory breakpoint.
1732 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1733 software and hardware breakpoints.
1734 (reinsert_raw_breakpoint): Go through the_target->insert_point
1735 instead of assuming memory breakpoint.
1736 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1737 software and hardware breakpoints.
1738 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1739 Check both software and hardware breakpoints.
1740 (validate_inserted_breakpoint): Assert the breakpoint is a
1741 software breakpoint. Set the inserted flag to -1 instead of
1742 setting shlib_disabled.
1743 (delete_disabled_breakpoints): Adjust.
1744 (validate_breakpoints): Only validate software breakpoints.
1745 Adjust to inserted flag change.
1746 (check_mem_read, check_mem_write): Skip breakpoint types other
1747 than software breakpoints. Adjust to inserted flag change.
1748 * mem-break.h (enum raw_bkpt_type): New enum.
1749 (raw_breakpoint, struct process_info): Forward declare.
1750 (Z_packet_to_target_hw_bp_type): Delete declaration.
1751 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1752 (set_gdb_breakpoint, delete_gdb_breakpoint)
1753 (clear_breakpoint_conditions): New declarations.
1754 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1755 (breakpoint_inserted_here): Update comment.
1756 (add_breakpoint_condition, add_breakpoint_commands): Replace
1757 address parameter with a breakpoint pointer parameter.
1758 (gdb_breakpoint_here): Update comment.
1759 (delete_gdb_breakpoint_at): Delete.
1760 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1761 * server.c (process_point_options): Take a struct breakpoint
1762 pointer instead of an address. Adjust.
1763 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1764 delete_gdb_breakpoint.
1765 * spu-low.c (spu_target_ops): Install NULL as
1766 supports_z_point_type method.
1767 * target.h: Include mem-break.h.
1768 (struct target_ops) <prepare_to_access_memory>: Update comment.
1769 <supports_z_point_type>: New field.
1770 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1771 instead of a char. Also take a raw breakpoint pointer.
1772 * win32-arm-low.c (the_low_target): Install NULL as
1773 supports_z_point_type.
1774 * win32-i386-low.c (i386_supports_z_point_type): New function.
1775 (i386_insert_point, i386_remove_point): Adjust to new interface.
1776 (the_low_target): Install i386_supports_z_point_type.
1777 * win32-low.c (win32_supports_z_point_type): New function.
1778 (win32_insert_point, win32_remove_point): Adjust to new interface.
1779 (win32_target_ops): Install win32_supports_z_point_type.
1780 * win32-low.h (struct win32_target_ops):
1781 <supports_z_point_type>: New method.
1782 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1783 instead of a char. Also take a raw breakpoint pointer.
1784
932539e3
PA
17852014-05-20 Pedro Alves <palves@redhat.com>
1786
1787 * mem-break.h: Include break-common.h.
1788 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1789 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1790 (Z_packet_to_target_hw_bp_type): New declaration.
1791 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1792 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1793 (Z_PACKET_ACCESS_WP): Delete macros.
1794 (Z_packet_to_hw_type): Delete function.
1795 * i386-low.h: Don't include break-common.h here.
1796 (Z_packet_to_hw_type): Delete declaration.
1797 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1798 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1799 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1800 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1801 * linux-aarch64-low.c: Don't include break-common.h here.
1802 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1803 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1804 (Z_packet_to_target_hw_bp_type): Delete function.
1805 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1806 function.
1807 (mips_insert_point, mips_remove_point): Use
1808 Z_packet_to_target_hw_bp_type.
1809
4ff0d3d8
PA
18102014-05-20 Pedro Alves <palves@redhat.com>
1811
1812 * linux-aarch64-low.c: Include break-common.h.
1813 (enum target_point_type): Delete.
1814 (Z_packet_to_point_type): Rename to ...
1815 (Z_packet_to_target_hw_bp_type): ... this, and return a
1816 target_hw_bp_type instead.
1817 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1818 instead of an enum target_point_type.
1819 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1820 breakpoint type.
1821 (aarch64_dr_state_insert_one_point)
1822 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1823 (aarch64_handle_aligned_watchpoint)
1824 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1825 Take an enum target_hw_bp_type instead of an enum
1826 target_point_type.
1827 (aarch64_supports_z_point_type): New function.
1828 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1829 use Z_packet_to_target_hw_bp_type.
1830
786dc519
JB
18312014-05-20 Joel Brobecker <brobecker@adacore.com>
1832
1833 * configure.ac: Only use -Werror by default when DEVELOPMENT
1834 is true.
1835 * configure: Regenerate.
1836
9e0aa64f
JK
18372014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1838
1839 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1840 * linux-x86-low.c (X86_64_USER_REGS): New.
1841 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1842
2b577b92
YQ
18432014-04-28 Yao Qi <yao@codesourcery.com>
1844
1845 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1846 name.
1847
94611da2
PA
18482014-04-25 Pedro Alves <palves@redhat.com>
1849
1850 PR server/16255
1851 * linux-low.c (linux_attach_fail_reason_string): New function.
1852 (linux_attach_lwp): Delete.
1853 (linux_attach_lwp_1): Rename to ...
1854 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1855 argument. Remove "initial" parameter. Return int instead of
1856 void. Don't error or warn here.
1857 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1858 failure to attach to the tgid. Call warning when failing to
1859 attach to an lwp.
1860 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1861 argument. Remove "initial" parameter. Return int instead of
1862 void. Don't error or warn here.
1863 (linux_attach_fail_reason_string): New declaration.
1864 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1865 interface change. Use linux_attach_fail_reason_string.
1866
01f9f808
MS
18672014-04-24 Michael Sturm <michael.sturm@mintel.com>
1868 Walfred Tedeschi <walfred.tedeschi@intel.com>
1869
1870 * Makefile.in: Added rules to handle new files
1871 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1872 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1873 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1874 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1875 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1876 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1877 x32-avx512-linux.o.
1878 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1879 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1880 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1881 i386/x32-avx512.xml.
1882 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1883 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1884 i386/x32-avx512-linux.xml.
1885 * i387-fp.c (num_avx512_k_registers): New constant for number
1886 of K registers.
1887 (num_avx512_zmmh_low_registers): New constant for number of
1888 lower ZMM registers (0-15).
1889 (num_avx512_zmmh_high_registers): New constant for number of
1890 higher ZMM registers (16-31).
1891 (num_avx512_ymmh_registers): New contant for number of higher
1892 YMM registers (ymm16-31 added by avx521 on x86_64).
1893 (num_avx512_xmm_registers): New constant for number of higher
1894 XMM registers (xmm16-31 added by AVX512 on x86_64).
1895 (struct i387_xsave): Add space for AVX512 registers.
1896 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1897 Add code to handle AVX512 registers.
1898 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1899 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1900 prototypei from generated file.
1901 (tdesc_amd64_avx512_linux): Likewise.
1902 (init_registers_x32_avx512_linux): Likewise.
1903 (tdesc_x32_avx512_linux): Likewise.
1904 (init_registers_i386_avx512_linux): Likewise.
1905 (tdesc_i386_avx512_linux): Likewise.
1906 (x86_64_regmap): Add AVX512 registers.
1907 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1908 mask.
1909 (initialize_low_arch): Add code to initialize AVX512 registers.
1910
51aa91f9
PA
19112014-04-23 Pedro Alves <palves@redhat.com>
1912
1913 * mem-break.c (find_gdb_breakpoint_at): Make static.
1914 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1915
a4165e94
PA
19162014-04-23 Pedro Alves <palves@redhat.com>
1917
1918 * i386-low.c: Don't include break-common.h here.
1919 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1920 prototype to take target_hw_bp_type as argument instead of a Z
1921 packet char.
1922 * i386-low.h: Include break-common.h here.
1923 (Z_packet_to_hw_type): Declare.
1924 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1925 prototypes.
1926 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1927 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1928 (x86_remove_point): Convert the packet number to a
1929 target_hw_bp_type before calling i386_low_remove_watchpoint.
1930 * win32-i386-low.c (i386_insert_point): Convert the packet number
1931 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1932 (i386_remove_point): Convert the packet number to a
1933 target_hw_bp_type before calling i386_low_remove_watchpoint.
1934
b8acf843
PA
19352014-04-23 Pedro Alves <palves@redhat.com>
1936
1937 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1938
d708bcd1
PA
19392014-04-10 Pedro Alves <palves@redhat.com>
1940
1941 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1942 Check if the condition or command is NULL before checking if the
1943 breakpoint is known. On success, return true.
1944 * mem-break.h (add_breakpoint_condition): Document return.
1945 (add_breakpoint_commands): Add describing comment.
1946 * server.c (skip_to_semicolon): New function.
1947 (process_point_options): Use it.
1948
2eec7d5b
PA
19492014-04-09 Pedro Alves <palves@redhat.com>
1950
1951 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1952 to lwpid_of.
1953
fa96cb38
PA
19542014-02-27 Pedro Alves <palves@redhat.com>
1955
1956 PR 12702
1957 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1958 macros.
1959 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1960 output.
1961 (last_thread_of_process_p): Take a PID argument instead of a
1962 thread pointer.
1963 (linux_wait_for_lwp): Delete.
1964 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1965 functions.
1966 (linux_low_filter_event): New function, party factored out from
1967 linux_wait_for_event.
1968 (linux_wait_for_event): Rename to ...
1969 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1970 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1971 sigsuspend. Check for zombie leaders.
1972 (linux_wait_for_event): Reimplement as wrapper around
1973 linux_wait_for_event_filtered.
1974 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1975 a normal or signal exit is seen, it's the whole process exiting.
1976 (wait_for_sigstop): No longer a for_each_inferior callback.
1977 Rewrite on top of linux_wait_for_event_filtered.
1978 (stop_all_lwps): Call wait_for_sigstop directly.
1979 * server.c (resume, handle_target_event): Handle
1980 TARGET_WAITKIND_NO_RESUMED.
1981
d763de10
JB
19822014-02-26 Joel Brobecker <brobecker@adacore.com>
1983
1984 * win32-low.c (psapi_get_dll_name,
1985 * win32_CreateToolhelp32Snapshot): Delete.
1986 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1987 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1988 Delete.
1989 (handle_load_dll): Add function description.
1990 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1991
850a0f76
JB
19922014-02-26 Joel Brobecker <brobecker@adacore.com>
1993
1994 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1995 Add comment.
1996 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1997 base address when calling win32_add_one_solib.
1998 (handle_load_dll): Delete local variable load_addr.
1999 Remove 0x1000 offset applied to DLL base address when calling
2000 win32_add_one_solib.
2001 (handle_unload_dll): Add comment.
2002
f25b3fc3
JB
20032014-02-26 Joel Brobecker <brobecker@adacore.com>
2004
2005 * win32-low.c (win32_add_all_dlls): Renames
2006 win32_ensure_ntdll_loaded. Rewrite function documentation.
2007 Adjust implementation to always load all DLLs.
2008 Add 0x1000 offset to DLL base address when calling
2009 win32_add_one_solib.
2010 (child_initialization_done): New static global.
2011 (do_initial_child_stuff): Set child_initialization_done to
2012 zero during child initialization, and 1 after. Replace call
2013 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2014 Add comment.
2015 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2016 (handle_unload_dll): Add function documentation.
2017 (get_child_debug_event): Ignore load and unload DLL events
2018 during child initialization.
2019
d86d4aaf
DE
20202014-02-20 Doug Evans <dje@google.com>
2021
3bc32da3 2022 Remove global all_lwps.
d86d4aaf
DE
2023 * inferiors.h (ptid_of): Move here from linux-low.h.
2024 (pid_of, lwpid_of): Ditto.
2025 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2026 parameter is a struct thread_info * now.
2027 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2028 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2029 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2030 directly.
2031 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2032 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2033 * linux-arm-low.c (update_registers_callback): Update, "entry"
2034 parameter is a struct thread_info * now.
2035 Fetch lwpid from current_inferior directly.
2036 (arm_insert_point): Pass &all_threads to find_inferior instead of
2037 &all_lwps.
2038 (arm_remove_point): Ditto.
2039 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2040 (arm_prepare_to_resume): Fetch pid from thread.
2041 (arm_read_description): Fetch lwpid from current_inferior directly.
2042 * linux-low.c (all_lwps): Delete.
2043 (delete_lwp): Delete call to remove_inferior.
2044 (handle_extended_wait): Fetch lwpid from thread.
2045 (add_lwp): Don't set lwp->entry.id. Remove call to
2046 add_inferior_to_list.
2047 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2048 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2049 (kill_one_lwp_callback): Ditto.
2050 (linux_kill): Don't dereference NULL pointer.
2051 Fetch ptid,lwpid from thread.
2052 (get_detach_signal): Fetch ptid from thread.
2053 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2054 Simplify call to regcache_invalidate_thread.
2055 (delete_lwp_callback): Update, "entry" parameter is a
2056 struct thread_info * now. Fetch pid from thread.
2057 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2058 (status_pending_p_callback): Update, "entry" parameter is a
2059 struct thread_info * now. Fetch ptid from thread.
2060 (find_lwp_pid): Update, "entry" parameter is a
2061 struct thread_info * now.
2062 (linux_wait_for_lwp): Fetch pid from thread.
2063 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2064 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2065 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2066 (dequeue_one_deferred_signal): Ditto.
2067 (cancel_breakpoint): Fetch ptid from current_inferior.
2068 (linux_wait_for_event): Pass &all_threads to find_inferior,
2069 not &all_lwps. Fetch ptid, lwpid from thread.
2070 (count_events_callback): Update, "entry" parameter is a
2071 struct thread_info * now.
2072 (select_singlestep_lwp_callback): Ditto.
2073 (select_event_lwp_callback): Ditto.
2074 (cancel_breakpoints_callback): Ditto.
2075 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2076 not &all_lwps.
2077 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2078 (unsuspend_one_lwp): Update, "entry" parameter is a
2079 struct thread_info * now.
2080 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2081 not &all_lwps.
2082 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2083 Fetch lwpid from thread, not lwp.
2084 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2085 Pass &all_threads to find_inferior, not &all_lwps.
2086 (send_sigstop): Fetch lwpid from thread, not lwp.
2087 (send_sigstop_callback): Update, "entry" parameter is a
2088 struct thread_info * now.
2089 (suspend_and_send_sigstop_callback): Ditto.
2090 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2091 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2092 struct thread_info * now.
2093 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2094 from thread, lwp.
2095 (lwp_running): Update, "entry" parameter is a
2096 struct thread_info * now.
2097 (stop_all_lwps): Fetch ptid from thread.
2098 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2099 (linux_resume_one_lwp): Fetch lwpid from thread.
2100 (linux_set_resume_request): Update, "entry" parameter is a
2101 struct thread_info * now. Fetch pid, lwpid from thread.
2102 (resume_status_pending_p): Update, "entry" parameter is a
2103 struct thread_info * now.
2104 (need_step_over_p): Ditto. Fetch lwpid from thread.
2105 (start_step_over): Fetch lwpid from thread.
2106 (linux_resume_one_thread): Update, "entry" parameter is a
2107 struct thread_info * now. Fetch lwpid from thread.
2108 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2109 (proceed_one_lwp): Update, "entry" parameter is a
2110 struct thread_info * now. Fetch lwpid from thread.
2111 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2112 struct thread_info * now.
2113 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2114 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2115 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2116 directly.
2117 (regsets_store_inferior_registers): Ditto.
2118 (fetch_register, store_register): Ditto.
2119 (linux_read_memory, linux_write_memory): Ditto.
2120 (linux_request_interrupt): Ditto.
2121 (linux_read_auxv): Ditto.
2122 (linux_xfer_siginfo): Ditto.
2123 (linux_qxfer_spu): Ditto.
2124 (linux_qxfer_libraries_svr4): Ditto.
2125 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2126 moved to inferiors.h.
2127 (get_lwp): Delete.
2128 (get_thread_lwp): Update.
2129 (struct lwp_info): Delete member "entry". Simplify comment for
2130 member "thread".
2131 (all_lwps): Delete.
2132 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2133 current_inferior directly.
2134 (update_watch_registers_callback): Update, "entry" parameter is a
2135 struct thread_info * now. Fetch pid from thread.
2136 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2137 (mips_insert_point): Fetch lwpid from current_inferior.
2138 Pass &all_threads to find_inferior, not &all_lwps.
2139 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2140 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2141 directly.
2142 (mips_stopped_data_address): Ditto.
2143 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2144 directly.
2145 * linux-tile-low.c (tile_arch_setup): Ditto.
2146 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2147 (update_debug_registers_callback): Update, "entry" parameter is a
2148 struct thread_info * now. Fetch pid from thread.
2149 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2150 Pass &all_threads to find_inferior, not &all_lwps.
2151 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2152 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2153 Pass &all_threads to find_inferior, not &all_lwps.
2154 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2155 (i386_dr_low_get_status): Ditto.
2156 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2157 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2158 (x86_linux_read_description): Ditto.
2159 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2160
3b8361aa
DE
21612014-02-20 Doug Evans <dje@google.com>
2162
2163 * inferiors.c (get_first_inferior): Fix buglet.
2164
f7667f0d
DE
21652014-02-19 Doug Evans <dje@google.com>
2166
2167 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2168 * inferiors.c (add_thread): Change result type to struct thread_info *.
2169 All callers updated.
2170 (add_lwp): Call add_thread here instead of in callers.
2171 All callers updated.
2172 * linux-low.h (get_lwp_thread): Rewrite.
2173 (struct lwp_info): New member "thread".
2174
b3312d80
DE
21752014-02-19 Doug Evans <dje@google.com>
2176
2177 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2178 All callers updated.
2179
ecc6f45c
DE
21802014-02-19 Doug Evans <dje@google.com>
2181
2182 * inferiors.c (add_thread): Fix whitespace.
2183
649ebbca
DE
21842014-02-19 Doug Evans <dje@google.com>
2185
2186 * dll.c (clear_dlls): Replace accessing list implemention details
2187 with API function.
2188 * gdbthread.h (get_first_thread): Declare.
2189 * inferiors.c (for_each_inferior_with_data): New function.
2190 (get_first_thread): New function.
2191 (find_thread_ptid): Simplify.
2192 (get_first_inferior): New function.
2193 (clear_list): Delete.
2194 (one_inferior_p): New function.
2195 (clear_inferior_list): New function.
2196 (clear_inferiors): Update.
2197 * inferiors.h (for_each_inferior_with_data): Declare.
2198 (clear_inferior_list): Declare.
2199 (one_inferior_p): Declare.
2200 (get_first_inferior): Declare.
2201 * linux-low.c (linux_wait_for_event): Replace accessing list
2202 implemention details with API function.
2203 * server.c (target_running): Ditto.
2204 (accumulate_file_name_length): New function.
2205 (emit_dll_description): New function.
2206 (handle_qxfer_libraries): Replace accessing list implemention
2207 details with API function.
2208 (handle_qxfer_threads_worker): New function.
2209 (handle_qxfer_threads_proper): Replace accessing list implemention
2210 details with API function.
2211 (handle_query): Ditto.
2212 (visit_actioned_threads_callback_ftype): New typedef.
2213 (visit_actioned_threads_data): New struct.
2214 (visit_actioned_threads): Rewrite to be find_inferior callback.
2215 (resume): Call find_inferior.
2216 (handle_status): Replace accessing list implemention
2217 details with API function.
2218 (process_serial_event): Replace accessing list implemention details
2219 with API function.
2220 * target.c (set_desired_inferior): Replace accessing list implemention
2221 details with API function.
2222 * tracepoint.c (same_process_p): New function.
2223 (gdb_agent_about_to_close): Replace accessing list implemention
2224 details with API function.
2225 * win32-low.c (child_delete_thread): Replace accessing list
2226 implemention details with API function.
2227 (match_dll_by_basename): New function.
2228 (dll_is_loaded_by_basename): New function.
2229 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2230 details call to dll_is_loaded_by_basename.
2231
80894984
DE
22322014-02-19 Doug Evans <dje@google.com>
2233
2234 * dll.h (struct dll_info): Add comment.
2235 * gdbthread.h (struct thread_info): Add comment.
2236 (current_ptid): Simplify.
2237 * inferiors.c (add_process): Update.
2238 (remove_process): Update.
2239 * inferiors.h (struct process_info): Rename member "head" to "entry".
2240 * linux-low.c (delete_lwp): Update.
2241 (add_lwp): Update.
2242 (last_thread_of_process_p): Update.
2243 (kill_one_lwp_callback, linux_kill): Update.
2244 (status_pending_p_callback): Update.
2245 (wait_for_sigstop): Update. Simplify read of ptid.
2246 (start_step_over): Update.
2247 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2248 (get_lwp_thread): Update.
2249 (struct lwp_info): Rename member "head" to "entry".
2250 * regcache.h (inferior_list_entry): Delete.
2251 * server.c (kill_inferior_callback): Update.
2252 (detach_or_kill_inferior_callback): Update.
2253 (print_started_pid): Update.
2254 (print_attached_pid): Update.
2255 (process_serial_event): Simplify read of ptid.
2256 * thread-db.c (thread_db_create_event): Update.
2257 (thread_db_get_tls_address): Update.
2258 * win32-low.c (current_inferior_ptid): Simplify.
2259
46917d26
TT
22602014-02-19 Tom Tromey <tromey@redhat.com>
2261
2262 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2263 argument.
2264 (target_supports_btrace): Update.
2265
0759a81e
YQ
22662014-02-14 Yao Qi <yao@codesourcery.com>
2267
2268 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2269 (rsp-low-ipa.o): New target.
2270
a7191e8b
TT
22712014-02-12 Tom Tromey <tromey@redhat.com>
2272
2273 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2274 convert_ascii_to_int.
2275 * regcache.c (registers_to_string): Likewise.
2276 * remote-utils.c (decode_M_packet): Likewise.
2277 * server.c (process_serial_event): Likewise.
2278
ff0e980e
TT
22792014-02-12 Tom Tromey <tromey@redhat.com>
2280
2281 * server.c (handle_query, handle_v_run): Use hex2bin, not
2282 unhexify.
2283 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2284
e9371aff
TT
22852014-02-12 Tom Tromey <tromey@redhat.com>
2286
2287 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2288 convert_int_to_ascii.
2289 * regcache.c (registers_to_string, collect_register_as_string):
2290 Likewise.
2291 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2292 Likewise.
2293 * server.c (process_serial_event): Likewise.
2294 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2295 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2296
971dc0b8
TT
22972014-02-12 Tom Tromey <tromey@redhat.com>
2298
2299 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2300 bin2hex, not hexify.
2301 * tracepoint.c (cmd_qtstatus): Likewise.
2302
0a822afb
TT
23032014-02-12 Tom Tromey <tromey@redhat.com>
2304
2305 * remote-utils.c (monitor_output): Pass explicit length to
2306 hexify.
2307
9c3d6531
TT
23082014-02-12 Tom Tromey <tromey@redhat.com>
2309
2310 * tracepoint.c: Include rsp-low.h.
2311 * server.c: Include rsp-low.h.
2312 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2313 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2314 declare.
2315 * remote-utils.c: Include rsp-low.h.
2316 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2317 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2318 (convert_int_to_ascii, convert_ascii_to_int): Move to
2319 common/rsp-low.c.
2320 * regcache.c: Include rsp-low.h.
2321 * ax.c: Include rsp-low.h.
2322 * Makefile.in (SFILES): Add common/rsp-low.c.
2323 (OBS): Add rsp-low.o.
2324 (rsp-low.o): New target.
2325
01fd3ea5
TT
23262014-02-12 Tom Tromey <tromey@redhat.com>
2327
2328 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2329 Include print-utils.h.
2330 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2331 (plongest, thirty_two, phex_nz): Remove.
2332 * Makefile.in (SFILES): Add common/print-utils.c.
2333 (OBS): Add print-utils.o.
2334 (print-utils-ipa.o): New target.
2335 (print-utils.o): New target.
2336 (IPA_OBJS): Add print-utils-ipa.o.
2337
e99dc820
TT
23382014-02-06 Tom Tromey <tromey@redhat.com>
2339
2340 * Makefile.in (SFILES): Fix indentation.
2341
ee1e2d4f
DE
23422014-02-05 Doug Evans <dje@google.com>
2343
2344 * linux-low.c (linux_wait_for_event): Improve comment.
2345 (linux_wait_1): Keep current_inferior in sync with event_child.
2346
f5a02773
DE
23472014-01-22 Doug Evans <dje@google.com>
2348
2349 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2350
87ce2a04
DE
23512014-01-22 Doug Evans <dje@google.com>
2352
2353 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2354 * configure: Regenerate.
2355 * config.in: Regenerate.
2356 * Makefile.in (SFILES): Add debug.c.
2357 (OBS): Add debug.o.
2358 * debug.c: New file.
2359 * debug.h: New file.
2360 * linux-aarch64-low.c (*): Update all debugging printfs to use
2361 debug_printf instead of fprintf.
2362 * linux-arm-low.c (*): Ditto.
2363 * linux-cris-low.c (*): Ditto.
2364 * linux-crisv32-low.c (*): Ditto.
2365 * linux-m32r-low.c (*): Ditto.
2366 * linux-sparc-low.c (*): Ditto.
2367 * linux-x86.c (*): Ditto.
2368 * linux-low.c (*): Ditto.
2369 (linux_wait_1): Add calls to debug_enter, debug_exit.
2370 (linux_wait): Remove redundant debugging printf.
2371 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2372 (linux_resume, unstop_all_lwps): Ditto.
2373 * mem-break.c (*): Update all debugging printfs to use
2374 debug_printf instead of fprintf.
2375 * remote-utils.c (*): Ditto.
2376 * thread-db.c (*): Ditto.
2377 * server.c #include <ctype.h>, "gdb_vecs.h".
2378 (debug_threads): Moved to debug.c.
2379 (*): Update all debugging printfs to use debug_printf instead of
2380 fprintf.
2381 (start_inferior): Replace call to fflush with call to debug_flush.
2382 (monitor_show_help): Mention set debug-format.
2383 (parse_debug_format_options): New function.
2384 (handle_monitor_command): Handle "monitor set debug-format".
2385 (gdbserver_usage): Mention --debug-format.
2386 (main): Parse --debug-format.
2387 * server.h (debug_threads): Declaration moved to debug.h.
2388 #include "debug.h".
2389 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2390 trace_debug_1 that uses debug_printf.
2391 (tracepoint_look_up_symbols): Update all debugging printfs to use
2392 debug_printf instead of fprintf.
2393
e671835b
BS
23942014-01-20 Baruch Siach <baruch@tkos.co.il>
2395
2396 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2397 sys/ptrace.h.
2398
b5737fa9
PA
23992014-01-17 Pedro Alves <palves@redhat.com>
2400
ea38d2a9 2401 PR build/16445
c7faa97a
PA
2402 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2403 defined after including gdb_proc_service.h.
b5737fa9 2404
40ed484e
DE
24052014-01-16 Doug Evans <dje@google.com>
2406
2407 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2408 (match_dll): Use it.
2409
969c39fb
MM
24102014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2411
2412 * target.h (target_ops) <read_btrace>: Change parameters and
2413 return type to allow error reporting.
2414 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2415 trace reading errors on.
2416 * linux-low.c (linux_low_read_btrace): Pass trace reading
2417 errors on.
2418 (linux_low_disable_btrace): New.
2419
ab7f45ba
DE
24202014-01-15 Doug Evans <dje@google.com>
2421
2422 * inferiors.c (thread_id_to_gdb_id): Delete.
2423 * inferiors.h (thread_id_to_gdb_id): Delete.
2424
66af0f44
EZ
24252014-01-13 Eli Zaretskii <eliz@gnu.org>
2426
2427 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2428 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2429 versions.
2430
9939e131
PA
24312014-01-08 Pedro Alves <palves@redhat.com>
2432
2433 * server.c (handle_status): Don't discard previous queued stop
2434 replies or thread's pending status here.
2435 (main) <disconnection>: Do it here instead.
2436
b7ea362b
PA
24372014-01-08 Pedro Alves <palves@redhat.com>
2438
2439 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2440 * server.c (visit_actioned_threads, handle_pending_status): New
2441 function.
2442 (handle_v_cont): Factor out parts to ...
2443 (resume): ... this new function. If in all-stop, and a thread
2444 being resumed has a pending status, report it without actually
2445 resuming.
2446 (myresume): Adjust to use the new 'resume' function.
2447 (clear_pending_status_callback, set_pending_status_callback)
2448 (find_status_pending_thread_callback): New functions.
2449 (handle_status): Handle the case of multiple threads having
2450 interesting statuses to report. Report threads' real last signal
2451 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2452 with an interesting thread to report the status for, instead of
2453 always reporting the status of the first thread.
2454
28498c42
JB
24552014-01-01 Joel Brobecker <brobecker@adacore.com>
2456
2457 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2458 * gdbreplay.c (gdbreplay_version): Likewise.
2459
f45c82da
YZ
24602013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2461
2462 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2463 iov.iov_len with the real length in use.
2464
379a5e2d
JB
24652013-12-13 Joel Brobecker <brobecker@adacore.com>
2466
2467 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2468 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2469 for all targets that use win32-low.c.
2470 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2471 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2472
4210d83e
PA
24732013-12-13 Pedro Alves <palves@redhat.com>
2474
2475 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2476 if equal to TARGET_WAITKIND_LOADED.
2477 * win32-low.c (cached_status): New static global.
2478 (win32_wait): Add declaration.
2479 (do_initial_child_stuff): Flush all initial pending debug events
2480 up to the initial breakpoint.
2481 (win32_wait): If CACHED_STATUS was set, return that instead
2482 of doing a real wait. Remove the code resuming the execution
2483 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2484 during the initial phase. Also remove the code changing
2485 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2486 TARGET_WAITKIND_STOPPED.
2487
e7f0d979
YQ
24882013-12-11 Yao Qi <yao@codesourcery.com>
2489
2490 * notif.c (handle_notif_ack): Return 0 if no notification
2491 matches.
2492
ebcf782c
DE
24932013-11-20 Doug Evans <dje@google.com>
2494
2495 * linux-low.c (linux_set_resume_request): Fix comment.
2496
20ad9378
DE
24972013-11-20 Doug Evans <dje@google.com>
2498
2499 * linux-low.c (resume_status_pending_p): Tweak comment.
2500
a196ebeb
WT
25012013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2502
2503 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2504 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2505 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2506 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2507 (srv_amd64_regobj): Add amd64-mpx.o.
2508 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2509 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2510 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2511 * i387-fp.c (num_pl_bnd_register) Added constant.
2512 (num_pl_bnd_cfg_registers) Added constant.
2513 (struct i387_xsave) Added reserved area and MPX fields.
2514 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2515 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2516 function.
2517 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2518 (init_registers_amd64_mpx_linux): Declare new function.
2519 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2520 (x86_64_regmap): Add MPX registers.
2521 (x86_linux_read_description): Add MPX case.
2522 (initialize_low_arch): Initialize MPX targets.
2523
0080a2f6
TT
25242013-11-18 Tom Tromey <tromey@redhat.com>
2525
2526 * configure: Rebuild.
2527 * configure.ac: Don't check for stdlib.h.
2528 * gdbreplay.c: Unconditionally include stdlib.h.
2529
2978b111
TT
25302013-11-18 Tom Tromey <tromey@redhat.com>
2531
2532 * config.in: Rebuild.
2533 * configure: Rebuild.
2534 * configure.ac: Don't use AC_HEADER_DIRENT.
2535
a3d08894
TT
25362013-11-18 Tom Tromey <tromey@redhat.com>
2537
2538 * server.h: Don't check HAVE_STRING_H.
2539 * gdbreplay.c: Don't check HAVE_STRING_H.
2540 * configure: Rebuild.
2541
0a5dd17d
TT
25422013-11-18 Tom Tromey <tromey@redhat.com>
2543
2544 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2545 LIBGNU.
2546
1bd2f0ba
TT
25472013-11-08 Tom Tromey <tromey@redhat.com>
2548
2549 * configure, config.in: Rebuild.
2550 * configure.ac: Remove unused configury.
2551
3266f10b
TT
25522013-11-08 Tom Tromey <tromey@redhat.com>
2553
2554 * acinclude.m4: Include common.m4, codeset.m4.
2555 * configure, config.in: Rebuild.
2556 * configure.ac: Use GDB_AC_COMMON.
2557
6682d959
AA
25582013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2559
2560 * linux-s390-low.c (HWCAP_S390_TE): New define.
2561 (s390_arch_setup): Consider the TE field in the HWCAP for
2562 determining 'have_regset_tdb'.
2563
fd0a4d76
SDJ
25642013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2565
2566 PR gdb/16014
2567 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2568 call to sizeof.
2569
1a3d890b
PA
25702013-10-02 Pedro Alves <palves@redhat.com>
2571
2572 * server.c (process_serial_event): Don't output "GDBserver
2573 exiting" if GDB is connected through stdio.
2574 * target.c (mywait): Likewise, be silent if GDB is connected
2575 through stdio.
2576
97ad4581
JB
25772013-10-01 Joel Brobecker <brobecker@adacore.com>
2578
2579 * lynx-low.c (lynx_add_threads_after_attach): New function.
2580 (lynx_attach): Remove call to add_thread. Add call to
2581 lynx_add_threads_after_attach instead.
2582
5b4e221c
MF
25832013-09-28 Mike Frysinger <vapier@gentoo.org>
2584
2585 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2586 * config.in, configure: Regenerated.
2587
ee47b2f8
YQ
25882013-09-18 Yao Qi <yao@codesourcery.com>
2589
2590 PR server/15959
2591 * server.c (start_inferior): Clear 'resume_info'.
2592
d6707650 25932013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2594
d6707650
JW
2595 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2596 for each register.
2597
9243dd0e 25982013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2599
9243dd0e
JW
2600 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2601 linux-tile-low.o to srv_tgtobj.
2602
c623a6ef
WN
26032013-09-16 Will Newton <will.newton@linaro.org>
2604
2605 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2606 out regs.
2607
fb71d39e
PA
26082013-09-06 Pedro Alves <palves@redhat.com>
2609
2610 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2611 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2612 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2613 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2614 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2615 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2616
8e7e9910
PA
26172013-09-06 Pedro Alves <palves@redhat.com>
2618
2619 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2620 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2621
7c3a12ca
PA
26222013-09-06 Pedro Alves <palves@redhat.com>
2623
2624 * linux-amd64-ipa.c: Include tracepoint.h.
2625 * linux-i386-ipa.c: Include tracepoint.h.
2626
8eb3d7b6
RW
26272013-09-06 Ricard Wanderlof <ricardw@axis.com>
2628
2629 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2630 (ps_get_thread_area): New function.
2631
eddddb9d
RW
26322013-09-06 Ricard Wanderlof <ricardw@axis.com>
2633
2634 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2635 (initialize_low_arch): Call init_registers_crisv32 rather than
2636 init_register_crisv32.
2637
533b0600
PA
26382013-09-05 Pedro Alves <palves@redhat.com>
2639
2640 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2641 to ...
2642 * hostio.h: ... this new file.
2643 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2644 win32-low.c: Include hostio.h.
2645
0ce3d3b5
PA
26462013-09-05 Pedro Alves <palves@redhat.com>
2647
2648 * server.h (gdb_client_data, handler_func, callback_handler_func)
2649 (delete_file_handler, add_file_handler, append_callback_event)
2650 (delete_callback_event, start_event_loop, initialize_event_loop):
2651 Move to event-loop.h and include it.
2652 * event-loop.h: New file.
2653
799cdc37
PA
26542013-09-05 Pedro Alves <palves@redhat.com>
2655
2656 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2657 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2658 (loaded_dll, unloaded_dll): Move to ...
2659 * dll.h: ... this new file.
2660 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2661
6a6bbd9d
PA
26622013-09-05 Pedro Alves <palves@redhat.com>
2663
2664 * server.h (current_process, get_thread_process, all_processes)
2665 (add_inferior_to_list, for_each_inferior, current_inferior)
2666 (remove_inferior, add_process, remove_process, find_process_pid)
2667 (have_started_inferiors_p, have_attached_inferiors_p)
2668 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2669 (clear_inferiors, find_inferior, find_inferior_id)
2670 (inferior_target_data, set_inferior_target_data)
2671 (inferior_regcache_data, set_inferior_regcache_data): Move to
2672 inferiors.h, and include it.
2673 * inferiors.h: New file.
2674
f699aaba
PA
26752013-09-05 Pedro Alves <palves@redhat.com>
2676
2677 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2678 Move ...
2679 * ax.h: ... here.
2680
c144c7a0
PA
26812013-09-05 Pedro Alves <palves@redhat.com>
2682
2683 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2684 tracepoint.h.
2685 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2686 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2687 (handle_tracepoint_general_set, handle_tracepoint_query)
2688 (tracepoint_finished_step, tracepoint_was_hit)
2689 (release_while_stepping_state_list, current_traceframe)
2690 (in_readonly_region, traceframe_read_mem)
2691 (fetch_traceframe_registers, traceframe_read_sdata)
2692 (traceframe_read_info, struct fast_tpoint_collect_status)
2693 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2694 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2695 (supply_fast_tracepoint_registers)
2696 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2697 (ipa_tdesc, claim_trampoline_space)
2698 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2699 (agent_mem_read, agent_get_trace_state_variable_value)
2700 (agent_set_trace_state_variable_value, agent_tsv_read)
2701 (agent_mem_read_string, get_raw_reg_func_addr)
2702 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2703 * tracepoint.h: ... this new file.
2704
ff42e6ab
PA
27052013-09-05 Pedro Alves <palves@redhat.com>
2706
2707 * server.h (perror_with_name, error, fatal, warning, paddress)
2708 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2709 include it.
2710 * utils.h: New file.
2711
541af0f4
PA
27122013-09-05 Pedro Alves <palves@redhat.com>
2713
2714 * server.h (remote_debug, noack_mode, transport_is_reliable)
2715 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2716 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2717 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2718 (write_enn, initialize_async_io, enable_async_io)
2719 (disable_async_io, check_remote_input_interrupt_request)
2720 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2721 (dead_thread_notify, prepare_resume_reply)
2722 (decode_address_to_semicolon, decode_address, decode_m_packet)
2723 (decode_M_packet, decode_X_packet, decode_xfer_write)
2724 (decode_search_memory_packet, unhexify, hexify)
2725 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2726 (look_up_one_symbol, relocate_instruction)
2727 (monitor_output): Move to remote-utils.h, and include it.
2728 * remote-utils.h: New file.
2729
eebdf26b
PA
27302013-09-05 Pedro Alves <palves@redhat.com>
2731
2732 * server.h (_): Delete.
2733
3aafd2ff
PA
27342013-09-02 Pedro Alves <palves@redhat.com>
2735
2736 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2737 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2738 allocated.
2739 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2740
cee83bcb
PM
27412013-09-02 Pierre Muller <muller@sourceware.org>
2742
2743 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2744 or WriteProcessMemory complete successfully and handle
2745 ERROR_PARTIAL_COPY error.
2746
9a13b2fa
PA
27472013-09-02 Pedro Alves <palves@redhat.com>
2748
2749 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2750 error instead of EIO.
2751
602e3198
JK
27522013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2753
2754 PR server/15604
2755 * linux-low.c: Include filestuff.h.
2756 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2757 * lynx-low.c: Include filestuff.h.
2758 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2759 * server.c: Include filestuff.h.
2760 (main): Call notice_open_fds.
2761 * spu-low.c: Include filestuff.h.
2762 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2763
96d7229d
LM
27642013-08-22 Luis Machado <lgustavo@codesourcery.com>
2765
2766 * Makefile.in: Explain why ../target and ../nat are not
2767 listed as include file search paths.
2768 (linux-waitpid.o): New object file rule.
2769 * configure.srv (srv_native_linux_obj): New variable.
2770 Replace all occurrences of linux native object files with
2771 $srv_native_linux_obj.
2772 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2773 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2774 (linux_enable_event_reporting): Remove declaration.
2775 (my_waitpid): Moved to common/linux-waitpid.c.
2776 (linux_wait_for_event): Pass ptid when calling
2777 linux_enable_event_reporting.
2778 (linux_supports_tracefork_flag): Remove.
2779 (linux_enable_event_reporting): Likewise.
2780 (linux_tracefork_grandchild): Remove.
2781 (STACK_SIZE): Moved to common/linux-ptrace.c.
2782 (linux_tracefork_child): Remove.
2783 (linux_test_for_tracefork): Remove.
2784 (linux_look_up_symbols): Call linux_supports_traceclone.
2785 (initialize_low): Remove call to linux_test_for_tracefork.
2786 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2787 common/linux-ptrace.h.
2788 (PTRACE_TYPE_ARG4): Likewise.
2789 Include linux-ptrace.h.
2790
32940073
PA
27912013-08-21 Pedro Alves <palves@redhat.com>
2792
2793 * config.in: Renegerate.
2794
33b60d58 27952013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2796
33b60d58
LM
2797 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2798 (SFILES): Remove $(srcdir)/common/target-common.c and
2799 add $(srcdir)/target/waitstatus.c.
2800 (OBS): Remove target-common.o and add waitstatus.o.
2801 (server_h): Remove $(srcdir)/../common/target-common.h and
2802 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2803 and $(srcdir)/../target/waitstatus.h.
2804 (target-common.o): Remove.
2805 (waitstatus.o): New target object file.
2806 * target.h: Do not include target-common.h and
2807 include target/resume.h, target/wait.h and
2808 target/waitstatus.h.
2809
b8e1b30e
LM
28102013-08-13 Luis Machado <lgustavo@codesourcery.com>
2811
2812 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2813 to PTRACE_TYPE_ARG3.
2814 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2815 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2816 PTRACE_TYPE_ARG4.
2817 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2818 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2819
7a60ad40
YQ
28202013-07-27 Jie Zhang <jie@codesourcery.com>
2821 Daniel Jacobowitz <dan@codesourcery.com>
2822 Yao Qi <yao@codesourcery.com>
2823
2824 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2825 (mips-linux-watch.o): New rule.
2826 (mips_linux_watch_h): New variable.
2827 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2828 srv_tgtobj.
2829 * linux-mips-low.c: Include mips-linux-watch.h.
2830 (struct arch_process_info, struct arch_lwp_info): New.
2831 (update_watch_registers_callback): New function.
2832 (mips_linux_new_process, mips_linux_new_thread) New functions.
2833 (mips_linux_prepare_to_resume, mips_insert_point): New
2834 functions.
2835 (mips_remove_point, mips_stopped_by_watchpoint): New
2836 functions.
2837 (rsp_bp_type_to_target_hw_bp_type): New function.
2838 (mips_stopped_data_address): New function.
2839 (the_low_target): Add watchpoint support functions.
2840
de6f69ad
YQ
28412013-07-27 Yao Qi <yao@codesourcery.com>
2842
2843 * i386-low.c: Include break-common.h.
2844 (enum target_hw_bp_type): Remove.
2845
3360c0bf
LM
28462013-07-24 Luis Machado <lgustavo@codesourcery.com>
2847
2848 * Makefile.in (SFILES): /common/target-common.c.
2849 (OBS): Add target-common.o.
2850 (server_h): Add $(srcdir)/../common/target-common.h.
2851 (target-common.o): New target.
2852 * server.c (queue_stop_reply_callback): Free
2853 status string after use.
2854 * target.c (target_waitstatus_to_string): Remove.
2855 * target.h: Include target-common.h.
2856 (resume_kind): Likewise.
2857 (target_waitkind): Likewise.
2858 (target_waitstatus): Likewise.
2859 (TARGET_WNOHANG): Likewise.
2860
bd885420
YQ
28612013-07-04 Yao Qi <yao@codesourcery.com>
2862
2863 * Makefile.in (host_alias): Use @host_noncanonical@.
2864 (target_alias): Use @target_noncanonical@.
2865 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2866 ACX_NONCANONICAL_HOST.
2867 * configure: Regenerated.
2868
2869 Revert:
2870 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2871
2872 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2873 * configure: Rebuild.
2874 * Makefile.in (version_host, version_target): Get from configure.
2875 (version.c): Use $(version_host) and $(version_target).
2876
17ef446e
PA
28772013-07-03 Pedro Alves <palves@redhat.com>
2878
2879 * Makefile.in (config.status): Depend on development.sh.
2880 * acinclude.m4: Include libmcheck.m4.
2881 * configure: Regenerate.
2882
7a9a7487
MG
28832013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2884
2885 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2886 attribute inside the parentheses.
2887 (winapi_DebugSetProcessKillOnExit): Ditto.
2888 (winapi_DebugBreakProcess): Ditto.
2889 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2890
49b64de6
MG
28912013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2892
2893 * notif.h (notif_event): Add a dummy member to avoid compiler
2894 errors.
2895
d5749ee7
PA
28962013-07-01 Pedro Alves <palves@redhat.com>
2897
2898 * hostio.c (HOSTIO_PATH_MAX): Define.
2899 (require_filename, handle_open, handle_unlink, handle_readlink):
2900 Use it.
2901
d8d2a3ee
PA
29022013-07-01 Pedro Alves <palves@redhat.com>
2903
2904 * server.h: Include "pathmax.h".
2905 * linux-low.c: Don't include sys/param.h.
2906 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2907 MAXPATHLEN.
2908 * win32-low.c: Don't include sys/param.h.
2909 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2910
bc7dea8d
PA
29112013-07-01 Pedro Alves <palves@redhat.com>
2912
2913 * event-loop.c: Don't check HAVE_UNISTD_H before including
2914 <unistd.h>.
2915 * gdbreplay.c: Likewise.
2916 * remote-utils.c: Likewise.
2917 * server.c: Likewise.
2918 * configure.ac: Don't check for unistd.h.
2919 * configure: Regenerate.
2920
d6c2da54
TT
29212013-06-28 Tom Tromey <tromey@redhat.com>
2922
2923 * Makefile.in (version.c): Use version.in, not
2924 common/version.in.
2925
257b6bec
MG
29262013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2927
2928 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2929 * configure: Rebuild.
2930 * Makefile.in (version_host, version_target): Get from configure.
2931 (version.c): Use $(version_host) and $(version_target).
2932
86ebe149
DK
29332013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2934
2935 Fix trace-status to output user name without trailing colon.
2936 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2937
f30aa5af
DK
29382013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2939
2940 Fix trace-status to output proper start-time and stop-time.
2941 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2942 output start time and stop time in hex as gdb expects.
2943
28a93511
YQ
29442013-06-26 Pedro Alves <pedro@codesourcery.com>
2945
2946 * tracepoint.c (build_traceframe_info_xml): Output trace state
2947 variables present in the trace buffer.
2948
01208463
TT
29492013-06-24 Tom Tromey <tromey@redhat.com>
2950
2951 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2952 create-version.sh.
2953 (version.o): Remove.
2954 * gdbreplay.c: Include version.h.
2955 (version, host_name): Don't declare.
2956 * server.h: Include version.h.
2957 (version, host_name): Don't declare.
2958
760256f9
PA
29592013-06-12 Pedro Alves <palves@redhat.com>
2960
2961 * linux-x86-low.c (linux_is_elf64): Delete global.
2962 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2963 with local linux_pid_exe_is_elf_64_file use.
2964
030031ee
PA
29652013-06-11 Pedro Alves <palves@redhat.com>
2966
2967 * linux-low.c (regset_disabled, disable_regset): New functions.
2968 (regsets_fetch_inferior_registers)
2969 (regsets_store_inferior_registers): Use them.
2970 (initialize_regsets_info); Don't allocate the disabled_regsets
2971 array here.
2972 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2973 comment.
2974
5da6eb0a
PA
29752013-06-11 Pedro Alves <palves@redhat.com>
2976
2977 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2978 xmalloc.
2979
7e5aaa09
PA
29802013-06-11 Pedro Alves <palves@redhat.com>
2981
2982 * linux-x86-low.c (initialize_low_arch): Call
2983 init_registers_x32_avx_linux.
2984
d878444c
JK
29852013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2986
2987 Fix compatibility with Android Bionic.
2988 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2989 it is not empty.
2990
3aee8918
PA
29912013-06-07 Pedro Alves <palves@redhat.com>
2992
5f2b57b5 2993 PR server/14823
3aee8918
PA
2994 * Makefile.in (OBS): Add tdesc.o.
2995 (IPA_OBJS): Add tdesc-ipa.o.
2996 (tdesc-ipa.o): New rule.
2997 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2998 interface.
2999 * linux-low.c (new_inferior): Delete.
3000 (disabled_regsets, num_regsets): Delete.
3001 (linux_add_process): Adjust to set the new per-process
3002 new_inferior flag.
3003 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3004 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3005 was a stop. When calling arch_setup, switch the current inferior
3006 to the thread that got an event.
3007 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3008 (regsets_fetch_inferior_registers)
3009 (regsets_store_inferior_registers): New regsets_info parameter.
3010 Adjust to use it.
3011 (linux_register_in_regsets): New regs_info parameter. Adjust to
3012 use it.
3013 (register_addr, fetch_register, store_register): New usrregs_info
3014 parameter. Adjust to use it.
3015 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3016 parameter regs_info. Adjust to use it.
3017 (linux_fetch_registers): Get the current inferior's regs_info, and
3018 adjust to use it.
3019 (linux_store_registers): Ditto.
3020 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3021 (initialize_low): Don't initialize the target_regsets here. Call
3022 initialize_low_arch.
3023 * linux-low.h (target_regsets): Delete declaration.
3024 (struct regsets_info): New.
3025 (struct usrregs_info): New.
3026 (struct regs_info): New.
3027 (struct process_info_private) <new_inferior>: New field.
3028 (struct linux_target_ops): Delete the num_regs, regmap, and
3029 regset_bitmap fields. New field regs_info.
3030 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3031 * i387-fp.c (num_xmm_registers): Delete.
3032 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3033 calls to new interface.
3034 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3035 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3036 Infer the number of xmm registers from the regcache's target
3037 description.
3038 * i387-fp.h (num_xmm_registers): Delete.
3039 * inferiors.c (add_thread): Don't install the thread's regcache
3040 here.
3041 * proc-service.c (gregset_info): Fetch the current inferior's
3042 regs_info. Adjust to use it.
3043 * regcache.c: Include tdesc.h.
3044 (register_bytes, reg_defs, num_registers)
3045 (gdbserver_expedite_regs): Delete.
3046 (get_thread_regcache): If the thread doesn't have a regcache yet,
3047 create one, instead of aborting gdbserver.
3048 (regcache_invalidate_one): Rename to ...
3049 (regcache_invalidate_thread): ... this.
3050 (regcache_invalidate_one): New.
3051 (regcache_invalidate): Only invalidate registers of the current
3052 process.
3053 (init_register_cache): Add target_desc parameter, and use it.
3054 (new_register_cache): Ditto. Assert the target description has a
3055 non zero registers_size.
3056 (regcache_cpy): Add assertions. Adjust.
3057 (realloc_register_cache, set_register_cache): Delete.
3058 (registers_to_string, registers_from_string): Adjust.
3059 (find_register_by_name, find_regno, find_register_by_number)
3060 (register_cache_size): Add target_desc parameter, and use it.
3061 (free_register_cache_thread, free_register_cache_thread_one)
3062 (regcache_release, register_cache_size): New.
3063 (register_size): Add target_desc parameter, and use it.
3064 (register_data, supply_register, supply_register_zeroed)
3065 (supply_regblock, supply_register_by_name, collect_register)
3066 (collect_register_as_string, collect_register_by_name): Adjust.
3067 * regcache.h (struct target_desc): Forward declare.
3068 (struct regcache) <tdesc>: New field.
3069 (init_register_cache, new_register_cache): Add target_desc
3070 parameter.
3071 (regcache_invalidate_thread): Declare.
3072 (regcache_invalidate_one): Delete declaration.
3073 (regcache_release): Declare.
3074 (find_register_by_number, register_cache_size, register_size)
3075 (find_regno): Add target_desc parameter.
3076 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3077 declarations.
3078 * remote-utils.c: Include tdesc.h.
3079 (outreg, prepare_resume_reply): Adjust.
3080 * server.c: Include tdesc.h.
3081 (gdbserver_xmltarget): Delete declaration.
3082 (get_features_xml, process_serial_event): Adjust.
3083 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3084 declare.
3085 (struct process_info) <tdesc>: New field.
3086 (ipa_tdesc): Declare.
3087 * tdesc.c: New file.
3088 * tdesc.h: New file.
3089 * tracepoint.c: Include tdesc.h.
3090 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3091 (get_context_regcache): Adjust to pass ipa_tdesc down.
3092 (do_action_at_tracepoint): Adjust to get the register cache size
3093 from the context regcache's description.
3094 (traceframe_walk_blocks): Adjust to get the register cache size
3095 from the current trace frame's description.
3096 (traceframe_get_pc): Adjust to get current trace frame's
3097 description and pass it down.
3098 (gdb_collect): Adjust to get the register cache size from the
3099 IPA's description.
3100 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3101 (gdbserver_xmltarget): Delete.
3102 (initialize_low_tracepoint): Set the ipa's target description.
3103 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3104 (initialize_low_tracepoint): Set the ipa's target description.
3105 * linux-x86-low.c: Include tdesc.h.
3106 [__x86_64__] (is_64bit_tdesc): New.
3107 (ps_get_thread_area, x86_get_thread_area): Use it.
3108 (i386_cannot_store_register): Rename to ...
3109 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3110 (i386_cannot_fetch_register): Rename to ...
3111 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3112 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3113 to new interface.
3114 (target_regsets): Rename to ...
3115 (x86_regsets): ... this.
3116 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3117 interface.
3118 (x86_siginfo_fixup): Use is_64bit_tdesc.
3119 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3120 (tdesc_x32_avx_linux, tdesc_x32_linux)
3121 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3122 Declare.
3123 (x86_linux_update_xmltarget): Delete.
3124 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3125 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3126 (AMD64_LINUX_USER64_CS): New.
3127 (x86_linux_read_description): New, based on
3128 x86_linux_update_xmltarget.
3129 (same_process_callback): New.
3130 (x86_arch_setup_process_callback): New.
3131 (x86_linux_update_xmltarget): New.
3132 (x86_regsets_info): New.
3133 (amd64_linux_regs_info): New.
3134 (i386_linux_usrregs_info): New.
3135 (i386_linux_regs_info): New.
3136 (x86_linux_regs_info): New.
3137 (x86_arch_setup): Reimplement.
3138 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3139 (x86_emit_ops): Ditto.
3140 (the_low_target): Adjust. Install x86_linux_regs_info,
3141 x86_cannot_fetch_register, and x86_cannot_store_register.
3142 (initialize_low_arch): New.
3143 * linux-ia64-low.c (tdesc_ia64): Declare.
3144 (ia64_fetch_register): Adjust.
3145 (ia64_usrregs_info, regs_info): New globals.
3146 (ia64_regs_info): New function.
3147 (the_low_target): Adjust.
3148 (initialize_low_arch): New function.
3149 * linux-sparc-low.c (tdesc_sparc64): Declare.
3150 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3151 Adjust.
3152 (sparc_arch_setup): New function.
3153 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3154 (the_low_target): Adjust.
3155 (initialize_low_arch): New function.
3156 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3157 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3158 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3159 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3160 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3161 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3162 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3163 (tdesc_powerpc_isa205_vsx64l): Declare.
3164 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3165 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3166 (ppc_set_pc, ppc_get_hwcap): Adjust.
3167 (ppc_usrregs_info): Forward declare.
3168 (!__powerpc64__) ppc_regmap_adjusted: New global.
3169 (ppc_arch_setup): Adjust to the current process'es target
3170 description.
3171 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3172 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3173 (ppc_store_evrregset): Adjust.
3174 (target_regsets): Rename to ...
3175 (ppc_regsets): ... this, and make static.
3176 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3177 (ppc_regs_info): New function.
3178 (the_low_target): Adjust.
3179 (initialize_low_arch): New function.
3180 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3181 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3182 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3183 (tdesc_s390x_linux64v2): Declare.
3184 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3185 (s390_fill_gregset, s390_store_last_break): Adjust.
3186 (target_regsets): Rename to ...
3187 (s390_regsets): ... this, and make static.
3188 (s390_get_pc, s390_set_pc): Adjust.
3189 (s390_get_hwcap): New target_desc parameter, and use it.
3190 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3191 (s390_arch_setup): Adjust to set the current process'es target
3192 description. Don't adjust the regmap.
3193 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3194 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3195 (regs_info_3264): New globals.
3196 (s390_regs_info): New function.
3197 (the_low_target): Adjust.
3198 (initialize_low_arch): New function.
3199 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3200 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3201 [__mips64] (init_registers_mips_linux)
3202 (init_registers_mips_dsp_linux): Delete defines.
3203 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3204 (have_dsp): New global.
3205 (mips_read_description): New, based on mips_arch_setup.
3206 (mips_arch_setup): Reimplement.
3207 (get_usrregs_info): New function.
3208 (mips_cannot_fetch_register, mips_cannot_store_register)
3209 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3210 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3211 (target_regsets): Rename to ...
3212 (mips_regsets): ... this, and make static.
3213 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3214 (dsp_regs_info, regs_info): New globals.
3215 (mips_regs_info): New function.
3216 (the_low_target): Adjust.
3217 (initialize_low_arch): New function.
3218 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3219 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3220 Declare.
3221 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3222 (arm_read_description): New, with bits factored from
3223 arm_arch_setup.
3224 (arm_arch_setup): Reimplement.
3225 (target_regsets): Rename to ...
3226 (arm_regsets): ... this, and make static.
3227 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3228 (arm_regs_info): New function.
3229 (the_low_target): Adjust.
3230 (initialize_low_arch): New function.
3231 * linux-m68k-low.c (tdesc_m68k): Declare.
3232 (target_regsets): Rename to ...
3233 (m68k_regsets): ... this, and make static.
3234 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3235 (m68k_regs_info): New function.
3236 (m68k_arch_setup): New function.
3237 (the_low_target): Adjust.
3238 (initialize_low_arch): New function.
3239 * linux-sh-low.c (tdesc_sharch): Declare.
3240 (target_regsets): Rename to ...
3241 (sh_regsets): ... this, and make static.
3242 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3243 (sh_regs_info, sh_arch_setup): New functions.
3244 (the_low_target): Adjust.
3245 (initialize_low_arch): New function.
3246 * linux-bfin-low.c (tdesc_bfin): Declare.
3247 (bfin_arch_setup): New function.
3248 (bfin_usrregs_info, regs_info): New globals.
3249 (bfin_regs_info): New function.
3250 (the_low_target): Adjust.
3251 (initialize_low_arch): New function.
3252 * linux-cris-low.c (tdesc_cris): Declare.
3253 (cris_arch_setup): New function.
3254 (cris_usrregs_info, regs_info): New globals.
3255 (cris_regs_info): New function.
3256 (the_low_target): Adjust.
3257 (initialize_low_arch): New function.
3258 * linux-cris-low.c (tdesc_crisv32): Declare.
3259 (cris_arch_setup): New function.
3260 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3261 (cris_regs_info): New function.
3262 (the_low_target): Adjust.
3263 (initialize_low_arch): New function.
3264 * linux-m32r-low.c (tdesc_m32r): Declare.
3265 (m32r_arch_setup): New function.
3266 (m32r_usrregs_info, regs_info): New globals.
3267 (m32r_regs_info): Adjust.
3268 (initialize_low_arch): New function.
3269 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3270 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3271 (tic6x_usrregs_info): Forward declare.
3272 (tic6x_read_description): New function, based on ...
3273 (tic6x_arch_setup): ... this. Reimplement.
3274 (target_regsets): Rename to ...
3275 (tic6x_regsets): ... this, and make static.
3276 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3277 (tic6x_regs_info): New function.
3278 (the_low_target): Adjust.
3279 (initialize_low_arch): New function.
3280 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3281 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3282 (target_regsets): Rename to ...
3283 (xtensa_regsets): ... this, and make static.
3284 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3285 globals.
3286 (xtensa_arch_setup, xtensa_regs_info): New functions.
3287 (the_low_target): Adjust.
3288 (initialize_low_arch): New function.
3289 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3290 (nios2_arch_setup): Set the current process'es tdesc.
3291 (target_regsets): Rename to ...
3292 (nios2_regsets): ... this.
3293 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3294 (nios2_regs_info): New function.
3295 (the_low_target): Adjust.
3296 (initialize_low_arch): New function.
a261b8f5
PA
3297 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3298 (aarch64_arch_setup): Set the current process'es tdesc.
3299 (target_regsets): Rename to ...
3300 (aarch64_regsets): ... this.
3301 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3302 (aarch64_regs_info): New function.
3303 (the_low_target): Adjust.
3304 (initialize_low_arch): New function.
3aee8918
PA
3305 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3306 globals.
3307 (target_regsets): Rename to ...
3308 (tile_regsets): ... this.
3309 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3310 (tile_regs_info): New function.
3311 (tile_arch_setup): Set the current process'es tdesc.
3312 (the_low_target): Adjust.
3313 (initialize_low_arch): New function.
3314 * spu-low.c (tdesc_spu): Declare.
3315 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3316 * win32-arm-low.c (tdesc_arm): Declare.
3317 (arm_arch_setup): New function.
3318 (the_low_target): Install arm_arch_setup instead of
3319 init_registers_arm.
3320 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3321 (init_windows_x86): Rename to ...
3322 (i386_arch_setup): ... this. Set `win32_tdesc'.
3323 (the_low_target): Adjust.
3324 * win32-low.c (win32_tdesc): New global.
3325 (child_add_thread): Don't create the thread cache here.
3326 (do_initial_child_stuff): Set the new process'es tdesc.
3327 * win32-low.h (struct target_desc): Forward declare.
3328 (win32_tdesc): Declare.
3329 * lynx-i386-low.c (tdesc_i386): Declare global.
3330 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3331 * lynx-low.c (lynx_tdesc): New global.
3332 (lynx_add_process): Set the new process'es tdesc.
3333 * lynx-low.h (struct target_desc): Forward declare.
3334 (lynx_tdesc): Declare global.
3335 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3336 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3337 * nto-low.c (nto_tdesc): New global.
3338 (do_attach): Set the new process'es tdesc.
3339 * nto-low.h (struct target_desc): Forward declare.
3340 (nto_tdesc): Declare.
3341 * nto-x86-low.c (tdesc_i386): Declare.
3342 (nto_x86_arch_setup): Set `nto_tdesc'.
3343
b1fbec62
GB
33442013-06-04 Gary Benson <gbenson@redhat.com>
3345
3346 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3347 to qSupported response when appropriate.
3348 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3349 with nonzero-length annex.
3350 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3351 arguments supplied in annex.
3352
d1ec4ce7
DE
33532013-05-31 Doug Evans <dje@google.com>
3354
ac44adcb 3355 PR server/15594
d1ec4ce7
DE
3356 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3357 64 bits in 64-cross-32 environment.
3358
9b25f2d3
PA
33592013-05-28 Pedro Alves <palves@redhat.com>
3360
3361 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3362 (aarch64-without-fpu.c): Delete rule.
3363 * configure.srv (aarch64*-*-linux*): Remove references to
3364 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3365 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3366 declaration.
3367
6740dc9c
PA
33682013-05-24 Pedro Alves <palves@redhat.com>
3369
3370 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3371 instead of strchr/decode_address. Error if the range isn't split
3372 with a ','. Don't assume there's be a ':' in the action.
3373
c2d6af84
PA
33742013-05-23 Yao Qi <yao@codesourcery.com>
3375 Pedro Alves <palves@redhat.com>
3376
3377 * linux-low.c (lwp_in_step_range): New function.
3378 (linux_wait_1): If the thread was range stepping and stopped
3379 outside the stepping range, report the stop to GDB. Otherwise,
3380 continue stepping. Add range stepping debug output.
3381 (linux_set_resume_request): Copy the step range from the resume
3382 request to the lwp.
3383 (linux_supports_range_stepping): New.
3384 (linux_target_ops) <supports_range_stepping>: Set to
3385 linux_supports_range_stepping.
3386 * linux-low.h (struct linux_target_ops)
3387 <supports_range_stepping>: New field.
3388 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3389 * linux-x86-low.c (x86_supports_range_stepping): New.
3390 (the_low_target) <supports_range_stepping>: Set to
3391 x86_supports_range_stepping.
3392 * server.c (handle_v_cont): Handle 'r' action.
3393 (handle_v_requests): Append ";r" if the target supports range
3394 stepping.
3395 * target.h (struct thread_resume) <step_range_start,
3396 step_range_end>: New fields.
3397 (struct target_ops) <supports_range_stepping>:
3398 New field.
3399 (target_supports_range_stepping): New macro.
3400
58794e1a
JB
34012013-05-17 Joel Brobecker <brobecker@adacore.com>
3402
3403 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3404 confusion in comment.
3405
d631c5a7
JB
34062013-05-17 Joel Brobecker <brobecker@adacore.com>
3407
3408 * lynx-low.c (struct process_info_private): New type.
3409 (lynx_add_process): New function.
3410 (lynx_create_inferior, lynx_attach): Replace calls to
3411 add_process by calls to lynx_add_process.
3412 (lynx_resume): If PTID is null, then try using
3413 current_process()->private->last_wait_event_ptid.
3414 Add comments.
3415 (lynx_clear_inferiors): Delete. The contents of that function
3416 has been inlined in lynx_mourn;
3417 (lynx_wait_1): Save the ptid in the process's private data.
3418 (lynx_mourn): Free the process' private data. Replace call
3419 to lynx_clear_inferiors by call to clear_inferiors.
3420
96f7a20f
YQ
34212013-05-17 Yao Qi <yao@codesourcery.com>
3422
3423 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3424 the right place.
3425
db0dfaa0
LM
34262013-05-16 Luis Machado <lgustavo@codesourcery.com>
3427
3428 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3429 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3430 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3431 PT_TEXT_END_ADDR guards. Update comments.
3432 (linux_target_op) <read_offsets>: Conditionally define to
3433 linux_read_offsets if the target is UCLIBC and if it defines
3434 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3435
68f5f838
SL
34362013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3437 Andrew Jenner <andrew@codesourcery.com>
3438
3439 * Makefile.in (SFILES): Add linux-nios2-low.c.
3440 (clean): Add action to delete nios2-linux.c.
3441 (nios2-linux.c): New rule.
3442 * configure.srv: Add nios2*-*-linux*.
3443 * linux-nios2-low.c: New.
3444
1ebff1fd
HAQ
34452013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3446
3447 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3448
f6150862
HZ
34492013-04-25 Hui Zhu <hui@codesourcery.com>
3450
3451 PR gdb/15186
f6150862
HZ
3452 * ax.c (ax_printf): Add fflush.
3453
614c279d
TT
34542013-04-22 Tom Tromey <tromey@redhat.com>
3455
3456 * Makefile.in (SFILES): Add filestuff.c.
3457 (OBS): Add filestuff.o.
3458 (filestuff.o): New target.
3459 * config.in, configure: Rebuild.
3460 * configure.ac: Check for fdwalk, pipe2.
3461
7d4e5717
PA
34622013-04-17 Pedro Alves <palves@redhat.com>
3463
3464 * configure.ac (USE_THREAD_DB): Delete variable.
3465 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3466 Don't AC_SUBST USE_THREAD_DB.
3467 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3468 * config.in, configure: Regenerate.
3469
d5c93e41
PA
34702013-04-16 Pedro Alves <palves@redhat.com>
3471
3472 * linux-low.h (struct lwp_info) <thread_known>: Move under
3473 the USE_THREAD_DB #ifdef.
3474
04f5fe89
PA
34752013-04-16 Pedro Alves <palves@redhat.com>
3476
3477 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3478 (linux-low.o): Delete rule.
3479 * linux-low.h: Always include "gdb_thread_db.h" instead of
3480 conditionally including thread_db.h.
3481 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3482 HAVE_THREAD_DB_H.
3483
480b27bf
JK
34842013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3485
3486 * Makefile.in (install-only): Fix make install regression.
3487
43662968
JK
34882013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3489
3490 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3491 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3492 installation.
3493 * gdbserver.1: Remove.
3494
3e74e146
PA
34952013-03-22 Pedro Alves <palves@redhat.com>
3496
3497 * linux-low.c (handle_extended_wait): Don't call
3498 linux_enable_event_reporting.
3499
a8347a2a
TT
35002013-03-15 Tony Theodore <tonyt@logyst.com>
3501
3502 PR build/9098:
3503 * Makefile.in (SHELL): Use @SHELL@.
3504
eeb56fa7
SDJ
35052013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3506
3507 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3508 compiler warning.
3509
4fa7e2ff
JB
35102013-03-13 Joel Brobecker <brobecker@adacore.com>
3511
3512 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3513 Remove extraneous NULL element.
3514
8ddb1965
YQ
35152013-03-13 Yao Qi <yao@codesourcery.com>
3516
3517 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3518 'V' block in trace frame.
3519
9accd112
MM
35202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3521
3522 * target.h (struct target_ops): Add btrace ops.
3523 (target_supports_btrace): New macro.
3524 (target_enable_btrace): New macro.
3525 (target_disable_btrace): New macro.
3526 (target_read_btrace): New macro.
3527 * gdbthread.h (struct thread_info): Add btrace field.
3528 * server.c: Include btrace-common.h.
3529 (handle_btrace_general_set): New function.
3530 (handle_btrace_enable): New function.
3531 (handle_btrace_disable): New function.
3532 (handle_general_set): Call handle_btrace_general_set.
3533 (handle_qxfer_btrace): New function.
3534 (struct qxfer qxfer_packets[]): Add btrace entry.
3535 * inferiors.c (remove_thread): Disable btrace.
3536 * linux-low: Include linux-btrace.h.
3537 (linux_low_enable_btrace): New function.
3538 (linux_low_read_btrace): New function.
3539 (linux_target_ops): Add btrace ops.
3540 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3541 Add srv_linux_btrace=yes.
3542 (x86_64-*-linux*): Add linux-btrace.o.
3543 Add srv_linux_btrace=yes.
3544 * configure.ac: Define HAVE_LINUX_BTRACE.
3545 * config.in: Regenerated.
3546 * configure: Regenerated.
3547
5cc22e4c
MM
35482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3549
3550 * server.c (handle_qxfer): Preserve error message if -3 is
3551 returned.
3552 (qxfer): Document the -3 return value.
3553
7c97f91e
MM
35542013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3555
3556 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3557 (linux_btrace_h): New variable.
3558 (linux-btrace.o): New rule.
3559
be9a119c 35602013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3561 Hafiz Abid Qadeer <abidh@codesourcery.com>
3562
3563 * tracepoint.c (trace_buffer_size): New global.
3564 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3565 (init_trace_buffer): Change to one-argument function. Allocate
3566 trace buffer memory.
3567 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3568 handle QTBuffer:size packet.
3569 (cmd_bigqtbuffer_size): New function.
3570 (initialize_tracepoint): Call init_trace_buffer with
3571 DEFAULT_TRACE_BUFFER_SIZE.
3572 * server.c (handle_query): Add QTBuffer:size in the
3573 supported packets.
3574
e64f7499
YQ
35752013-03-07 Yao Qi <yao@codesourcery.com>
3576
3577 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3578 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3579 of -1.
3580 (cmd_qtsp): Adjust condition. Do post increment.
3581 Set cur_action and cur_step_action back to 0.
3582
f0ae6fc3
PA
35832013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3584
3585 PR server/15236
3586 * linux-low.c (linux_write_memory): Return early success if LEN is
3587 zero.
3588
b5b0b0af
CV
35892013-03-05 Corinna Vinschen <vinschen@redhat.de>
3590
334ad4a8 3591 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3592
589bc927
TT
35932013-02-28 Tom Tromey <tromey@redhat.com>
3594
3595 * configure.ac: Invoke AC_SYS_LARGEFILE.
3596 * configure, config.in: Rebuild.
3597
dfe07582
CV
35982013-02-28 Corinna Vinschen <vinschen@redhat.com>
3599
3600 * win32-low.c: Throughout, fix format strings and casts of
3601 printf-like functions to avoid type related warnings on all
3602 platforms.
3603 (get_child_debug_event): Print dwDebugEventCode as hex since
3604 that's how it's usually documented.
3605
736cd585
YQ
36062013-02-28 Yao Qi <yao@codesourcery.com>
3607
3608 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3609 pulongest.
3610
e1f58301
JW
36112013-02-27 Jiong Wang <jiwang@tilera.com>
3612
3613 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3614 (reg-tilegx32.c): New rule.
3615 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3616 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3617 different register info initializer according to elf class.
3618 (init_registers_tilgx32): New function. The tilegx32 register info
3619 initializer.
3620 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3621 (tile_store_gregset): Likewise.
3622
d171ca78
YQ
36232013-02-27 Yao Qi <yao@codesourcery.com>
3624
3625 * server.c (process_point_options): Print debug message when
3626 debug_threads is true.
3627
282bbdf3
YQ
36282013-02-26 Yao Qi <yao@codesourcery.com>
3629
3630 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3631
aca22551
PA
36322013-02-19 Pedro Alves <palves@redhat.com>
3633 Kai Tietz <ktietz@redhat.com>
3634
3635 PR gdb/15161
3636
3637 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3638 instead of strtoul to extract address from packet.
3639 (process_serial_event) <'z'>: Likewise.
3640
4f3cee1c
YQ
36412013-02-18 Yao Qi <yao@codesourcery.com>
3642
3643 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3644
8e1d55a3
PA
36452013-02-14 Pedro Alves <palves@redhat.com>
3646
3647 Plug memory leak.
3648
3649 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3650 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3651
458820da
PA
36522013-02-14 Pedro Alves <palves@redhat.com>
3653
3654 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3655
baea0dae
PA
36562013-02-14 Pedro Alves <palves@redhat.com>
3657
3658 * tracepoint.c (save_string): Delete.
3659 (add_tracepoint_action): Use savestring instead of save_string.
3660
0b1afbb3
PA
36612013-02-12 Pedro Alves <palves@redhat.com>
3662
3663 * linux-xtensa-low.c: Ditto.
3664 * xtensa-xtregs.c: Ditto.
3665
8a4ac37e
PA
36662013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3667
3668 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3669 thread_db.
3670
148de6bb
MS
36712013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3672
3673 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3674 aarch64_num_wp_regs and aarch64_num_bp_regs to
3675 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3676
55fac6e0
MS
36772013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3678
3679 * linux-aarch64-low.c (ps_get_thread_area): Replace
3680 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3681
176eb98c
MS
36822013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3683 Marcus Shawcroft <marcus.shawcroft@arm.com>
3684 Nigel Stephens <nigel.stephens@arm.com>
3685 Yufeng Zhang <yufeng.zhang@arm.com>
3686
3687 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3688 (aarch64.c, aarch64-without-fpu.c): New targets.
3689 * configure.srv (aarch64*-*-linux*): New.
3690 * linux-aarch64-low.c: New file.
3691
56f7af9c
MS
36922013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3693
43aaf8b6 3694 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3695 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3696 (dequeue_one_deferred_signal, linux_resume_one_thread)
3697 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3698 (linux_tracefork_grandchild, linux_test_for_tracefork)
3699 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3700 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3701 where the argument is 0.
3702
60f662b0
YQ
37032013-01-25 Yao Qi <yao@codesourcery.com>
3704
3705 * event-loop.c: Include "queue.h".
3706 (gdb_event_p): New typedef.
3707 (struct gdb_event) <next_event>: Remove.
3708 (event_queue): Change to QUEUE(gdb_event_p).
3709 (async_queue_event): Remove.
3710 (gdb_event_xfree): New.
3711 (initialize_event_loop): New.
3712 (process_event): Use API from QUEUE.
3713 (wait_for_event): Likewise.
3714 * server.c (main): Call initialize_event_loop.
3715 * server.h (initialize_event_loop): Declare.
3716
5ae4861a
YQ
37172013-01-18 Yao Qi <yao@codesourcery.com>
3718
3719 * ax.h (struct eval_agent_expr_context): New.
3720 (gdb_eval_agent_expr): Update declaration.
3721 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3722 TFRAME. Add new argument CTX.
3723 * server.h (struct eval_agent_expr_context): Declare.
3724 (agent_mem_read, agent_tsv_read): Update declaration.
3725 (agent_mem_read_string): Likewise.
3726 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3727 (add_traceframe_block): Add new argument TPOINT.
3728 Increase TPOINT->traceframe_usage.
3729 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3730 eval_tracepoint_agent_expr.
3731 (condition_true_at_tracepoint): Likewise.
3732 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3733 (agent_mem_read_string, agent_tsv_read): Likewise.
3734
85e00e85
YQ
37352013-01-16 Yao Qi <yao@codesourcery.com>
3736
3737 * linux-low.c (linux_resume_one_lwp): Don't check
3738 'lwp->bp_reinsert != 0'.
3739
4039cf45
JB
37402013-01-07 Joel Brobecker <brobecker@adacore.com>
3741 Pedro Alves <palves@redhat.com>
3742
3743 * lynx-low.c (ptrace_request_to_str): Define a temporary
3744 macro and use it to simplify this function's implementation.
3745
9044dee2
JB
37462013-01-07 Joel Brobecker <brobecker@adacore.com>
3747
3748 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3749 sets errno.
3750
e6352c8f
JB
37512013-01-07 Joel Brobecker <brobecker@adacore.com>
3752
3753 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3754
50681a27
JB
37552013-01-07 Joel Brobecker <brobecker@adacore.com>
3756
3757 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3758
3f6e77ef
JB
37592013-01-07 Joel Brobecker <brobecker@adacore.com>
3760
3761 * lynx-low.c (lynx_resume): Use the resume_info parameter
3762 to determine the ptid for the lynx_ptrace call, unless
3763 it is equal to minus_one_ptid, in which case we use the
3764 ptid of the current_inferior.
3765 (lynx_wait_1): After having received a thread create/exit
3766 event, resume the inferior's execution using the signaling
3767 thread's ptid, rather than the old ptid.
3768
7fda33ae
JB
37692013-01-07 Joel Brobecker <brobecker@adacore.com>
3770
3771 * lynx-low.c (lynx_resume): Delete variable ret.
3772
b9786c74
JB
37732013-01-01 Joel Brobecker <brobecker@adacore.com>
3774
3775 * gdbreplay.c (gdbreplay_version): Update copyright year.
3776 * server.c (gdbserver_version): Likewise.
3777
8b93d60f
JB
37782012-12-17 Joel Brobecker <brobecker@adacore.com>
3779
3780 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3781 new thread.
3782
037335a7
JB
37832012-12-17 Joel Brobecker <brobecker@adacore.com>
3784
3785 * lynx-low.c (ptrace_request_to_str): Add handling for
3786 PTRACE_GETTRACESIG.
3787
52d4cbd8
JB
37882012-12-17 Joel Brobecker <brobecker@adacore.com>
3789
3790 * lynx-low.c (lynx_attach): Delete variable new_process.
3791
ab8f6ca9
JB
37922012-12-17 Joel Brobecker <brobecker@adacore.com>
3793
3794 * lynx-low.c (lynx_create_inferior): Delete variable
3795 new_process.
3796
78cbc024
JB
37972012-12-17 Joel Brobecker <brobecker@adacore.com>
3798
3799 * lynx-low.c (ptrace_request_to_str): Do not handle
3800 PTRACE_GETTHREADLIST if this macro does not exist.
3801
14a00470
YQ
38022012-12-15 Yao Qi <yao@codesourcery.com>
3803
3804 * Makefile.in (OBS): Add notif.o.
3805 * notif.c, notif.h: New.
3806 * server.c: Include "notif.h".
3807 (struct vstop_notif) <next>: Remove.
3808 <base>: New field.
3809 (queue_stop_reply): Update.
3810 (push_event, send_next_stop_reply): Remove.
3811 (discard_queued_stop_replies): Update.
3812 (notif_stop): New variable.
3813 (handle_v_stopped): Remove.
3814 (handle_v_requests): Don't call handle_v_stopped. Call
3815 handle_ack_notif instead.
3816 (queue_stop_reply_callback): Call notif_event_enque instead
3817 of queue_stop_reply.
3818 (handle_status): Don't call send_next_stop_reply, call
3819 notif_write_event instead.
3820 (kill_inferior_callback): Likewise.
3821 (detach_or_kill_inferior_callback): Likewise.
3822 (main): Call initialize_notif.
3823 (process_serial_event): Call QUEUE_is_empty.
3824 (handle_target_event): Call notif_push instead of push event.
3825 * server.h (push_event): Remove declaration.
3826
61c125b9
TT
38272012-12-10 Tom Tromey <tromey@redhat.com>
3828
3829 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3830 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3831 macros.
3832 (.c.o): Rewrite.
3833 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3834 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3835 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3836 (amd64-linux-ipa.o, ax.o): Rewrite.
3837 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3838 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3839 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3840 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3841 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3842 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3843 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3844 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3845 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3846 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3847 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3848 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3849 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3850 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3851 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3852 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3853 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3854 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3855 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3856 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3857 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3858 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3859 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3860 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3861 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3862 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3863 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3864 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3865 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3866 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3867 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3868 (reg-tilegx.o): Remove.
3869 (all_object_files): New macro.
3870 Include .deps files.
3871 * aclocal.m4, configure: Rebuild.
3872 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3873 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3874 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3875
e90e9ad9
TT
38762012-12-05 Tom Tromey <tromey@redhat.com>
3877
3878 PR gdb/14917:
3879 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3880
02d403bf 38812012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3882
3883 * configure.ac: Check for linux/perf_event.h.
3884 * config.in: Regenerated.
3885 * configure: Regenerated.
3886
0270a750
PA
38872012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3888
3889 * hostio.c (handle_readlink): Decrease buffer size
3890 parameter passed to readlink by one byte.
3891
8c29b58e
YQ
38922012-11-26 Yao Qi <yao@codesourcery.com>
3893
3894 * configure.ac (build_warnings): Append '-Wempty-body'.
3895 * configure: Regenerated.
3896 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3897 body.
3898
8bdce1ff
PM
38992012-11-15 Pierre Muller <muller@sourceware.org>
3900
3901 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3902 * config.in: Regenerate.
3903 * configure: Regenerate.
3904 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3905 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3906 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3907 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3908 header.
3909 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3910 instead of <sys/wait.h> header.
3911 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3912
02d403bf 39132012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3914
3915 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3916 (various make rules): Remove -DGDBSERVER
3917
fbd5db48
YQ
39182012-11-09 Yao Qi <yao@codesourcery.com>
3919
3920 * spu-low.c (current_ptid): Move it to ..
3921 * gdbthread.h: ... here. New.
3922 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3923 * server.c (myresume, process_serial_event): Likewise.
3924 * thread-db.c (thread_db_find_new_threads): Likewise.
3925 * tracepoint.c (run_inferior_command): Likewise.
3926
b3dc46ff
AB
39272012-10-01 Andrew Burgess <aburgess@broadcom.com>
3928
3929 * server.c (handle_search_memory_1): Include access length in
3930 warning message.
3931
07c04788
HPN
39322012-09-05 Michael Brandt <michael.brandt@axis.com>
3933
3934 * linux-crisv32-low.c: Fix compile errors.
3935
918d227b
YQ
39362012-09-04 Yao Qi <yao@codesourcery.com>
3937
3938 * tracepoint.c (cmd_qtsv): Adjust debug message.
3939 Don't check CUR_TPOINT.
3940
18c1b81a
YQ
39412012-08-28 Yao Qi <yao@codesourcery.com>
3942
3943 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3944 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3945 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3946 Remove declarations of xmalloc, xreallloc, xstrdup and
3947 freeargv.
3948 * Makefile.in (libiberty_h): New.
3949 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3950 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3951
dc82f37b
YQ
39522012-08-23 Yao Qi <yao@codesourcery.com>
3953
3954 * server.h: Remove declaration of 'xsnprintf'.
3955
406b1477
KS
39562012-08-22 Keith Seitz <keiths@redhat.com>
3957
3958 * server.h: Include build-gnulib-gbserver/config.h.
3959 * gdbreplay.c: Likewise.
3960
e6712ff1
DE
39612012-08-08 Doug Evans <dje@google.com>
3962
3963 * Makefile.in (SFILES): Add gdb_vecs.c.
3964 (OBS): Add gdb_vecs.o.
3965 (gdb_vecs_h, host_defs_h): New variables.
3966 (thread-db.o): Add $(gdb_vecs_h) dependency.
3967 (gdb_vecs.o): New rule.
3968 * thread-db.c: #include "gdb_vecs.h".
3969 (thread_db_load_search): Use a vector to iterate over path elements.
3970 Handle text appearing after "$pdir".
3971
3972 * configure.ac: Add check for strstr.
3973 * config.in: Regenerate.
3974 * configure: Regenerate.
3975
7c3270ae
UW
39762012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3977
3978 * hostio.c (handle_pread): If pread fails, fall back to attempting
3979 lseek/read.
3980 (handle_pwrite): Likewise for pwrite.
3981
b62e2b27
UW
39822012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3983
3984 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3985 between unsupported TYPE and unimplementable ADDR/LEN combination.
3986 (arm_insert_point): Act on new return value.
3987
78a99e91
PA
39882012-07-31 Pedro Alves <palves@redhat.com>
3989
3990 * server.c (process_point_options): Only skip tokens if we find
3991 one that is unrecognized. Don't treat 'X' specially while
3992 skipping unrecognized tokens.
3993
fcf303ab
UW
39942012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3995
3996 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3997 to 4-byte-align HW breakpoint addresses for Thumb.
3998
7255706c
YQ
39992012-07-27 Yao Qi <yao@codesourcery.com>
4000
4001 PR remote/14161.
4002
4003 * server.h: Declare gdb_agent_about_to_close.
4004 * target.c (kill_inferior): Include "agent.h".
4005 New. Send command 'kill'.
4006 * target.h (kill_inferior): Removed macro.
4007 * tracepoint.c (gdb_agent_about_to_close): New.
4008 (gdb_agent_helper_thread): Handle command 'close'.
4009 Wait endlessly until the inferior stops.
4010 Install gdb_agent_remove_socket to atexit hook.
4011 (agent_socket_name): New static variable.
4012 (gdb_agent_socket_init): Replace local variable 'name' with
4013 'agent_socket_name'.
4014 (gdb_agent_remove_socket): New.
4015
5a3f286f
YQ
40162012-07-27 Yao Qi <yao@codesourcery.com>
4017
4018 * server.c (process_point_options): Stop at 'X' when parsing.
4019
961bd387
ME
40202012-07-19 Michael Eager <eager@eagercon.com>
4021
a261b8f5 4022 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4023 to hw_execute.
4024 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4025 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4026 hardware breakpoint.
4027
aa7c7447
JK
40282012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4029
4030 * gdbserver/linux-low.c (initialize_low): Call
4031 linux_ptrace_init_warnings.
4032
7f216e7c
DE
40332012-07-02 Doug Evans <dje@google.com>
4034
4035 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4036 pointer to int.
4037
d3ce09f5
SS
40382012-07-02 Stan Shebs <stan@codesourcery.com>
4039
4040 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4041 (ax.o): Add it to build rule.
4042 (ax-ipa.o): Ditto.
4043 (OBS): Add format.o.
4044 (IPA_OBS): Add format.o.
4045 * server.c (handle_query): Claim support for breakpoint commands.
4046 (process_point_options): Add command case.
4047 (process_serial_event): Leave running if there are printfs in
4048 effect.
4049 * mem-break.h (any_persistent_commands): Declare.
4050 (add_breakpoint_commands): Declare.
4051 (gdb_no_commands_at_breakpoint): Declare.
4052 (run_breakpoint_commands): Declare.
4053 * mem-break.c (struct point_command_list): New struct.
4054 (struct breakpoint): New field command_list.
4055 (any_persistent_commands): New function.
4056 (add_commands_to_breakpoint): New function.
4057 (add_breakpoint_commands): New function.
4058 (gdb_no_commands_at_breakpoint): New function.
4059 (run_breakpoint_commands): New function.
4060 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4061 locally.
4062 * ax.c: Include format.h.
4063 (ax_printf): New function.
4064 (gdb_eval_agent_expr): Add printf opcode.
4065
2f8f6aed
YQ
40662012-06-13 Yao Qi <yao@codesourcery.com>
4067
4068 * server.c (start_inferior): Remove duplicated writes to fields
4069 'last_resume_kind' and 'last_status' of 'current_inferior'.
4070
0c9070b3
YQ
40712012-06-12 Yao Qi <yao@codesourcery.com>
4072 Pedro Alves <palves@redhat.com>
4073
4074 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4075 comment.
4076 * server.c (handle_v_cont): Extend comment.
4077
c52daf70
YQ
40782012-06-11 Yao Qi <yao@codesourcery.com>
4079
4080 * linux-low.c (linux_attach): Add 'static'.
4081
d38bbb0a
YQ
40822012-06-06 Yao Qi <yao@codesourcery.com>
4083
4084 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4085
89dc0afd
JK
40862012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4087
4088 Fix gcc -flto compilation warning.
4089 * server.c (main): Make variable multi_mode and attach volatile.
4090
75f62ce7
TJB
40912012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4092
4093 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4094 if the platform doesn't know about it.
4095
65f479b6
PA
40962012-05-30 Jeff Kenton <jkenton@tilera.com>
4097
4098 * Makefile.in (SFILES): Add linux-tile-low.c.
4099 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4100 * configure.srv: Handle tilegx-*-linux*.
4101 * linux-tile-low.c: New file.
4102
0c5bf5a9
JK
41032012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4104
4105 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4106
a493e3e2
PA
41072012-05-24 Pedro Alves <palves@redhat.com>
4108
4109 PR gdb/7205
4110
43aaf8b6 4111 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4112
2ea28649
PA
41132012-05-24 Pedro Alves <palves@redhat.com>
4114
4115 PR gdb/7205
4116
4117 Replace target_signal with gdb_signal throughout.
4118
8d409d16
MR
41192012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4120
4121 * linux-low.c (linux_store_registers): Avoid the copying sequence
4122 when no data has been retrieved by ptrace.
4123
23512c01
MGD
41242012-05-22 Will Deacon <will.deacon@arm.com>
4125
4126 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4127 Include asm/ptrace.h.
4128 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4129 already defined.
4130
4934b29e
MR
41312012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4132
4133 * linux-low.c (linux_store_registers): Don't re-retrieve data
4134 with ptrace that has already been obtained from /proc. Always
4135 copy any data retrieved with ptrace to the buffer supplied.
4136
bde24c0a
PA
41372012-05-11 Yao Qi <yao@codesourcery.com>
4138 Pedro Alves <palves@redhat.com>
4139
4140 * linux-low.c (enum stopping_threads_kind): New.
4141 (stopping_threads): Change type to `enum stopping_threads_kind'.
4142 (handle_extended_wait): If stopping and suspending threads, leave
4143 the new_lwp suspended too.
4144 (linux_wait_for_event): Adjust.
4145 (stop_all_lwps): Set `stopping_threads' to
4146 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4147 whether we're suspending threads or just stopping them. Assert no
4148 recursion happens.
4149
623b6bdf
YQ
41502012-04-29 Yao Qi <yao@codesourcery.com>
4151
4152 * server.h: Move some code to ...
4153 * gdbthread.h: ... here. New.
4154 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4155 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4156 (nto-low.o, win32-low.o): Likewise.
4157 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4158 * regcache.c, remote-utils.c, server.c: Likewise.
4159 * target.c, tracepoint.c, win32-low.c: Likewise.
4160
f15f9948
TJB
41612012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4162
4163 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4164 (PTRACE_ARG4_TYPE): Likewise.
4165 (PTRACE_XFER_TYPE): Likewise.
4166 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4167 ptrace to PTRACE_ARG3_TYPE.
4168 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4169 (PTRACE_ARG4_TYPE): Likewise.
4170 (PTRACE_XFER_TYPE): Likewise.
4171 (linux_detach_one_lwp): Cast fourth argument of
4172 ptrace to long then PTRACE_ARG4_TYPE.
4173 (regsets_fetch_inferior_registers): Cast third argument of
4174 ptrace to long then PTRACE_ARG3_TYPE.
4175 (regsets_store_inferior_registers): Likewise.
4176
38ea300a
PA
41772012-04-20 Pedro Alves <palves@redhat.com>
4178
4179 * configure: Regenerate.
4180
c971b7fa
PA
41812012-04-19 Pedro Alves <palves@redhat.com>
4182
43aaf8b6 4183 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4184 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4185 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4186 (all, install-only, uninstall, clean-info, all-lib, clean): No
4187 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4188 (maintainer-clean realclean distclean): Use subdir_do.
4189 (subdir_do): New.
4190 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4191 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4192 * acinclude.m4: Include acx_configure_dir.m4.
4193 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4194 calls. Call AC_PROG_RANLIB. Configure gnulib using
4195 ACX_CONFIGURE_DIR.
4196 (GNULIB): New.
4197 (GNULIB_STDINT_H): Adjust.
4198 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4199 * gdbreplay.c: Include build-gnulib/config.h.
4200 * server.h: Likewise.
4201 * aclocal.m4: Regenerate.
4202 * config.in: Regenerate.
4203 * configure: Regenerate.
c971b7fa 4204
809277f8
PA
42052012-04-19 Pedro Alves <palves@redhat.com>
4206
4207 * Makefile.in (LIBGNU, INCGNU): Adjust.
4208 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4209 (all, install-only, uninstall, clean-info, all-lib, clean)
4210 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4211 * configure.ac: Adjust AC_OUTPUT output.
4212 * aclocal.m4: Regenerate.
4213 * configure: Regenerate.
4214
fd9bb8b8
PA
42152012-04-19 Pedro Alves <palves@redhat.com>
4216
4217 * Makefile.in (generated_files): New.
4218 (server_h): Remove the explicit dependency on config.h, and depend
4219 on $generated_files.
4220
1c298c66
PA
42212012-04-19 Pedro Alves <palves@redhat.com>
4222
4223 * Makefile.in (INCGNU): Add -Ignulib.
4224
57c4b50b
PA
42252012-04-19 Pedro Alves <palves@redhat.com>
4226
4227 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4228 (INCGNU): ... this, and spell out -I here.
4229 (GNULIB_LIB): Rename to ...
4230 (LIBGNU): ... this.
4231 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4232
1030e047
PA
42332012-04-19 Pedro Alves <palves@redhat.com>
4234
4235 * config.in: Regenerate.
4236
447d4319
PA
42372012-04-19 Pedro Alves <palves@redhat.com>
4238
4239 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4240 * server.h (memmem): Remove declaration.
4241 * config.in: Regenerate.
4242 * configure: Regenerate.
4243
aad9eab9
YQ
42442012-04-19 Yao Qi <yao@codesourcery.com>
4245
4246 * Makefile.in (SFILES): Add common/vec.c.
4247 (OBS): Add vec.o.
4248 (vec.o): New rule.
4249
3e10640f
YQ
42502012-04-19 Yao Qi <yao@codesourcery.com>
4251
4252 * remote-utils.c (prepare_resume_reply): Replace with macro
4253 target_core_of_thread.
4254 * server.c (handle_qxfer_threads_proper): Likewise.
4255 * target.h (traget_core_of_thread): New macro.
4256
71622373
PA
42572012-04-18 Pedro Alves <palves@redhat.com>
4258
4259 * aclocal.m4: Regenerate.
4260 * configure: Regenerate.
4261
80d26939
YQ
42622012-04-16 Yao Qi <yao@codesourcery.com>
4263
4264 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4265 duplicated on address.
4266
42476b70
YQ
42672012-04-16 Yao Qi <yao@codesourcery.com>
4268
4269 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4270 (struct tracepoint_action_ops) <send>: New field.
4271 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4272 (agent_expr_send, x_tracepoint_action_send): New.
4273 (l_tracepoint_action_send): New.
4274 (cmd_qtdp): Download and install tracepoint
4275 according to `use_agent'.
4276 (run_inferior_command): Add one more parameter `len'.
4277 Update callers.
4278 (tracepoint_send_agent): New.
4279 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4280
7bc83639
YQ
42812012-04-16 Yao Qi <yao@codesourcery.com>
4282
4283 * tracepoint.c (download_tracepoints): Moved to ...
4284 (cmd_qtstart): ... here.
4285
5f18041e
YQ
42862012-04-14 Yao Qi <yao@codesourcery.com>
4287
4288 * tracepoint.c: Include inttypes.h.
4289 (struct collect_memory_action): Use sized types.
4290 (struct tracepoint): Likewise.
4291 (cmd_qtdp, stop_tracing): Update print specifiers.
4292 (cmd_qtp, response_tracepoint): Likewise.
4293 (collect_data_at_tracepoint): Likewise.
4294 (collect_data_at_step): Likewise.
4295
55a8c076
YQ
42962012-04-14 Yao Qi <yao@codesourcery.com>
4297
4298 Import gnulib module inttypes.
4299 * aclocal.m4, config.in, configure: Regenerated.
4300
dc750257
YQ
43012012-04-14 Yao Qi <yao@codesourcery.com>
4302
4303 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4304 Makefile and config.status at last.
4305
0ab5faf9
YQ
43062012-04-13 Yao Qi <yao@codesourcery.com>
4307
4308 * tracepoint.c: Include stdint.h unconditionally.
4309
18f5fd81
TJB
43102012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4311
4312 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4313 on BFD_HAVE_SYS_PROCFS_TYPE.
4314 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4315 * configure: Regenerate.
4316 * config.in: Likewise.
4317
4d47af5c
L
43182012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4319
4320 * Makefile.in (clean): Also remove x32.c x32-linux.c
4321 x32-avx.c x32-avx-linux.c.
4322 (x32.o): New target.
4323 (x32.c): Likewise.
4324 (x32-linux.o): Likewise.
4325 (x32-linux.c): Likewise.
4326 (x32-avx.o): Likewise.
4327 (x32-avx.c): Likewise.
4328 (x32-avx-linux.o): Likewise.
4329 (x32-avx-linux.c): Likewise.
4330
4331 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4332 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4333 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4334 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4335 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4336 i386/x32-avx-linux.xml.
4337
4338 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4339 (init_registers_x32_avx_linux): Likwise.
4340 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4341 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4342
ecedbe58
PA
43432012-04-13 Pedro Alves <palves@redhat.com>
4344
4345 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4346 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4347 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4348 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4349 the sub-make.
4350
c92b5177
L
43512012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4352
4353 * linux-x86-low.c (compat_x32_clock_t): New.
4354 (compat_x32_siginfo_t): Likewise.
4355 (compat_x32_siginfo_from_siginfo): Likewise.
4356 (siginfo_from_compat_x32_siginfo): Likewise.
4357 (linux_is_elf64): Likewise.
4358 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4359 and siginfo_from_compat_x32_siginfo for x32.
4360 (x86_arch_setup): Set linux_is_elf64.
4361
214d508e
L
43622012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4363
4364 PR gdb/13969
4365 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4366 e_machine field.
4367 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4368 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4369 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4370 compatible with process.
4371
c9a1864a
YQ
43722012-04-12 Yao Qi <yao@codesourcery.com>
4373
4374 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4375 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4376 (install-only, install-info, clean): Handle sub dir gnulib.
4377 (all-lib, am--refresh): New targets.
4378 (memmem.o): Remove target.
4379 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4380 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4381 (AC_REPLACE_FUNCS): Remove memmem.
4382 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4383 (AC_OUTPUT): Generate Makefile in gnulib/.
4384 * aclocal.m4, config.in, configure: Regenerated.
4385
367ba2c2
MR
43862012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4387
4388 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4389
9d236627
PA
43902012-04-05 Pedro Alves <palves@redhat.com>
4391
4392 -Werror=strict-aliasing
4393
4394 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4395 pointer.
4396
111217b3
PA
43972012-04-04 Pedro Alves <palves@redhat.com>
4398
4399 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4400 (sparc_store_gregset_from_stack, sparc_store_gregset)
4401 (sparc_breakpoint_at): Fix formatting.
4402
8365dcf5
TJB
44032012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4404
4405 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4406 are available.
4407 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4408 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4409 * config.in: Regenerate.
4410 * configure: Likewise.
4411
689cc2ae
PA
44122012-03-29 Pedro Alves <palves@redhat.com>
4413
4414 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4415 Correct ptrace arguments.
4416
c14dfd32
PA
44172012-03-28 Pedro Alves <palves@redhat.com>
4418
4419 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4420 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4421 (IA64_FR1_REGNUM): New defines.
4422 (ia64_fetch_register): New.
4423 (the_low_target): Install it.
4424 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4425 field.
4426 * linux-low.c (linux_fetch_registers): Try the
4427 the_low_target.fetch_register hook first.
4428
4429 * linux-arm-low.c (the_low_target): Adjust.
4430 * linux-bfin-low.c (the_low_target): Adjust.
4431 * linux-cris-low.c (the_low_target): Adjust.
4432 * linux-crisv32-low.c (the_low_target): Adjust.
4433 * linux-m32r-low.c (the_low_target): Adjust.
4434 * linux-m68k-low.c (the_low_target): Adjust.
4435 * linux-mips-low.c (the_low_target): Adjust.
4436 * linux-ppc-low.c (the_low_target): Adjust.
4437 * linux-s390-low.c (the_low_target): Adjust.
4438 * linux-sh-low.c (the_low_target): Adjust.
4439 * linux-sparc-low.c (the_low_target): Adjust.
4440 * linux-tic6x-low.c (the_low_target): Adjust.
4441 * linux-x86-low.c (the_low_target): Adjust.
4442 * linux-xtensa-low.c (the_low_target): Adjust.
4443
63c88e13
PA
44442012-03-26 Pedro Alves <palves@redhat.com>
4445
4446 * server.c (handle_qxfer_libraries): Don't bail early if
4447 the_target->qxfer_libraries_svr4 is not NULL.
4448
fb723180
PA
44492012-03-26 Pedro Alves <palves@redhat.com>
4450
4451 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4452
0afae3cf
PA
44532012-03-23 Pedro Alves <palves@redhat.com>
4454
4455 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4456 "library-list-svr4" element's start tag when the the DSO list is
4457 empty.
4458
485f1ee4
PA
44592012-03-23 Pedro Alves <palves@redhat.com>
4460
4461 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4462 a variable whose type size is the same as the inferior's pointer
4463 size.
4464
a5362b9a
TS
44652012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4466
4467 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4468 struct siginfo.
4469 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4470 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4471 * linux-low.h: Include <signal.h>.
4472 (struct siginfo): Remove forward declaration.
4473 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4474 struct siginfo.
4475
d226c142
MF
44762012-03-21 Mike Frysinger <vapier@gentoo.org>
4477
4478 * .gitignore: Ignore more files.
4479
122f36ef
PA
44802012-03-19 Pedro Alves <palves@redhat.com>
4481 Jan Kratochvil <jan.kratochvil@redhat.com>
4482
4483 * server.c (cont_thread, general_thread): Add describing comments.
4484 (start_inferior): Clear `cont_thread'.
4485 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4486 of a process.
4487
fc3e5175
YQ
44882012-03-15 Yao Qi <yao@codesourcery.com>
4489
4490 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4491 handling to ...
4492 (cmd_qtdp): ... here.
4493
8d0d92cd
YQ
44942012-03-15 Yao Qi <yao@codesourcery.com>
4495
4496 * tracepoint.c (struct tracepoint_action_ops): New.
4497 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4498 (m_tracepoint_action_download): New.
4499 (r_tracepoint_action_download): New.
4500 (x_tracepoint_action_download): New.
4501 (l_tracepoint_action_download): New.
4502 (add_tracepoint_action): Install `action->ops' according type.
4503 (download_tracepoint_1): Move code `download' function pointer
4504 of various tracepoint_action_ops.
4505
87b0bb13
JK
45062012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4507
4508 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4509 linux_ptrace_attach_warnings.
4510
5f572dec
JK
45112012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4512
4513 * Makefile.in (linux-ptrace.o): New.
4514 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4515 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4516 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4517 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4518 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4519 of these targets.
4520 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4521
f4647387
YQ
45222012-03-08 Yao Qi <yao@codesourcery.com>
4523 Pedro Alves <palves@redhat.com>
4524
4525 Fix PR server/13392.
4526 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4527 offset of JMP insn.
4528 * tracepoint.c (remove_tracepoint): New.
4529 (cmd_qtdp): Call remove_tracepoint when failed to install.
4530
9b224c5e
PA
45312012-03-07 Pedro Alves <palves@redhat.com>
4532
4533 * linux-low.c (get_detach_signal): New.
4534 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4535 Pass on pending signals to PTRACE_DETACH. Check the result of the
4536 ptrace call.
4537 * server.c (program_signals, program_signals_p): New.
4538 (handle_general_set): Handle QProgramSignals.
4539 * server.h (program_signals, program_signals_p): Declare.
4540
e237a7e2
JK
45412012-03-05 Pedro Alves <palves@redhat.com>
4542 Jan Kratochvil <jan.kratochvil@redhat.com>
4543
4544 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4545 New comment why.
4546
5808517f
YQ
45472012-03-03 Yao Qi <yao@codesourcery.com>
4548
4549 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4550 agent_look_up_symbols.
4551
58b4daa5
YQ
45522012-03-03 Yao Qi <yao@codesourcery.com>
4553
4554 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4555 (linux-x86-low.o): Likewise.
4556 * server.h: Remove in_process_agent_loaded.
4557 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4558 common/agent.c.
4559 Update callers.
4560
8ffcbaaf
YQ
45612012-03-03 Yao Qi <yao@codesourcery.com>
4562
4563 * tracepoint.c (gdb_agent_capability): New global.
4564 (in_process_agent_loaded_ust): Renamed to
4565 `in_process_agent_supports_ust'.
4566 Update callers.
4567 (in_process_agent_supports_ust): Call agent_capability_check.
4568 (clear_installed_tracepoints): Assert that agent supports
4569 agent.
4570
d1feda86
YQ
45712012-03-03 Yao Qi <yao@codesourcery.com>
4572
4573 * linux-low.c (linux_supports_agent): New.
4574 (linux_target_ops): Initialize field `supports_agent' with
4575 linux_supports_agent.
4576 * target.h (struct target_ops) <supports_agent>: New.
4577 (target_supports_agent): New macro.
4578 * server.c (handle_general_set): Handle packet 'QAgent'.
4579 (handle_query): Send `QAgent+'.
4580 * Makefile.in (server.o): Depends on agent.h.
4581
2fa291ac
YQ
45822012-03-03 Yao Qi <yao@codesourcery.com>
4583
4584 * Makefile.in (OBS): Add agent.o.
4585 Add new rule for agent.o.
4586 Track dependence of tracepoint.c on agent.h.
4587 * tracepoint.c (run_inferior_command_1):
4588 (run_inferior_command): Call agent_run_command.
4589 (gdb_ust_connect_sync_socket): Deleted. Move it to
4590 common/agent.c.
4591 (resume_thread, stop_thread): Likewise.
4592 (gdb_ust_socket_init): Renamed to ...
4593 (gdb_agent_socket_init): ... New.
4594 (gdb_ust_thread): Renamed to ...
4595 (gdb_agent_helper_thread): ... New.
4596 (gdb_ust_init): Move some code to ...
4597 (gdb_agent_init): ... here. New.
4598 [HAVE_UST]: Call gdb_ust_init.
4599 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4600 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4601 * config.in, configure: Regenerated.
4602
05044653
PA
46032012-03-02 Pedro Alves <palves@redhat.com>
4604
4605 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4606 * linux-low.c (struct simple_pid_list): New.
4607 (stopped_pids): New a struct simple_pid_list pointer.
4608 (add_to_pid_list, pull_pid_from_list): New.
4609 (handle_extended_wait): Don't assume the first signal new children
4610 report is SIGSTOP. Adjust call to pull_pid_from_list.
4611 (linux_wait_for_lwp): Adjust.
4612
8d00225b
YQ
46132012-03-02 Yao Qi <yao@codesourcery.com>
4614
4615 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4616 debug log.
4617
19560ba5
YQ
46182012-03-02 Yao Qi <yao@codesourcery.com>
4619
4620 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4621 `stop_pc' and `tpoint'. Update caller.
4622
1faeff08
MR
46232012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4624
4625 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4626 * linux-low.c (use_linux_regsets): New macro.
4627 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4628 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4629 (linux_register_in_regsets): New function.
4630 (usr_fetch_inferior_registers): Skip registers covered by
4631 regsets.
4632 (usr_store_inferior_registers): Likewise.
4633 (usr_fetch_inferior_registers): New macro.
4634 (usr_store_inferior_registers): Likewise.
4635 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4636 (linux_store_registers): Likewise.
4637 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4638 prototype.
4639 (init_registers_mips64_dsp_linux): Likewise.
4640 (init_registers_mips_linux): New macro.
4641 (init_registers_mips_dsp_linux): Likewise.
4642 (mips_dsp_num_regs): Likewise.
4643 (DSP_BASE, DSP_CONTROL): New fallback macros.
4644 (mips_base_regs): New macro.
4645 (mips_regmap): Use it. Fix the size.
4646 (mips_dsp_regmap): New variable.
4647 (mips_dsp_regset_bitmap): Likewise.
4648 (mips_arch_setup): New function.
4649 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4650 than mips_regmap.
4651 (mips_cannot_store_register): Likewise.
4652 (the_low_target): Update .arch_setup, .num_regs and .regmap
4653 initializers. Add .regset_bitmap initializer.
4654 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4655 initializer.
4656 * linux-bfin-low.c (the_low_target): Likewise.
4657 * linux-cris-low.c (the_low_target): Likewise.
4658 * linux-crisv32-low.c (the_low_target): Likewise.
4659 * linux-ia64-low.c (the_low_target): Likewise.
4660 * linux-m32r-low.c (the_low_target): Likewise.
4661 * linux-m68k-low.c (the_low_target): Likewise.
4662 * linux-ppc-low.c (the_low_target): Likewise.
4663 * linux-s390-low.c (the_low_target): Likewise.
4664 * linux-sh-low.c (the_low_target): Likewise.
4665 * linux-sparc-low.c (the_low_target): Likewise.
4666 * linux-tic6x-low.c (the_low_target): Likewise.
4667 * linux-x86-low.c (the_low_target): Likewise.
4668 * linux-xtensa-low.c (the_low_target): Likewise.
4669 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4670 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4671 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4672 srv_xmlfiles.
4673 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4674 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4675
c03e6ccc
YQ
46762012-02-29 Yao Qi <yao@codesourcery.com>
4677 Pedro Alves <palves@redhat.com>
4678
4679 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4680 `step_over_finished' is true.
4681
644cebc9
PA
46822012-02-27 Pedro Alves <palves@redhat.com>
4683
4684 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4685 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4686
c14d7ab2
PA
46872012-02-27 Pedro Alves <palves@redhat.com>
4688
4689 PR server/9684
4690 * linux-low.c (pid_is_stopped): New.
4691 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4692
412c89dd
LM
46932012-02-25 Luis Machado <lgustavo@codesourcery.com>
4694
4695 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4696 of conditions.
4697
b745defe
MR
46982012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4699
4700 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4701
9f3a5c85
LM
47022012-02-24 Luis Machado <lgustavo@codesourcery>
4703
4704 * server.c (handle_query): Advertise support for target-side
4705 breakpoint condition evaluation.
4706 (process_point_options): New function.
4707 (process_serial_event): When inserting a breakpoint, check for
4708 a target-side condition that should be evaluated.
4709
4710 * mem-break.c: Include regcache.h and ax.h.
4711 (point_cond_list_t): New data structure.
4712 (breakpoint) <cond_list>: New field.
4713 (find_gdb_breakpoint_at): Make non-static.
4714 (delete_gdb_breakpoint_at): Clear any target-side
4715 conditions.
4716 (clear_gdb_breakpoint_conditions): New function.
4717 (add_condition_to_breakpoint): Likewise.
4718 (add_breakpoint_condition): Likewise.
4719 (gdb_condition_true_at_breakpoint): Likewise.
4720 (gdb_breakpoint_here): Return result directly instead
4721 of going through a local variable.
4722
4723 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4724 (clear_gdb_breakpoint_conditions): Likewise.
4725 (add_breakpoint_condition): Likewise.
4726 (gdb_condition_true_at_breakpoint): Likewise.
4727
4728 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4729 (need_step_over_p): Take target-side breakpoint condition into
4730 consideration.
4731
5e1dc496
LM
47322012-02-24 Luis Machado <lgustavo@codesourcery>
4733
4734 * server.h: Include tracepoint.h.
4735 (agent_mem_read, agent_get_trace_state_variable_value,
4736 agent_set_trace_state_variable_value,
4737 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4738 get_set_tsv_func_addr): New prototypes.
4739
4740 * ax.h: New include file.
4741 * ax.c: New source file.
4742
4743 * tracepoint.c: Include ax.h.
4744 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4745 agent_expr, eval_result_type): Move to ax.h.
4746 (parse_agent_expr): Rename to ...
4747 (gdb_parse_agent_expr): ... this, make it non-static and move
4748 to ax.h.
4749 (unparse_agent_expr) Rename to ...
4750 (gdb_unparse_agent_expr): ... this, make it non-static and move
4751 to ax.h.
4752 (eval_agent_expr): Rename to ...
4753 (eval_tracepoint_agent_expr): ... this.
4754 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4755 forward declarations.
4756 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4757 (agent_get_trace_state_variable_value): New function.
4758 (agent_set_trace_state_variable_value): New function.
4759 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4760 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4761 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4762 (condition_true_at_tracepoint): Likewise.
4763 (parse_agent_expr): Rename to ...
4764 (gdb_parse_agent_expr): ... this and move to ax.c.
4765 (unparse_agent_expr): Rename to ...
4766 (gdb_unparse_agent_expr): ... this and move to ax.c.
4767 (gdb_agent_op_name): Move to ax.c.
4768 (eval_agent_expr): Rename to ...
4769 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4770 and move to ax.c.
4771 (eval_tracepoint_agent_expr): New function.
4772 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4773 non-static.
5e1dc496
LM
4774 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4775 ax.c.
4776 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4777 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4778 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4779 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4780 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4781 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4782 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4783 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4784 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4785 (compile_bytecodes): Remove forward declaration.
4786 (is_goto_target): Move to ax.c.
4787 (compile_bytecodes): Move to ax.c and call
4788 agent_get_trace_state_variable_value (...) and
4789 agent_set_trace_state_variable_value (...).
4790
4791 * Makefile.in: Update ax.c and IPA dependencies.
4792
277e4e52
PA
47932012-02-24 Pedro Alves <palves@redhat.com>
4794
4795 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4796 (cmd_bigqtbuffer_circular): ... this. Only handle
4797 'QTBuffer:circular:'.
4798 (handle_tracepoint_general_set): Adjust.
4799
bf4c19f7
YQ
48002012-02-16 Yao Qi <yao@codesourcery.com>
4801
4802 * inferiors.c: Move code to ...
4803 * dll.c: .... here. New.
4804 * server.h: Declare clear_dlls.
4805 * Makefile.in (SFILES): Add dll.c.
4806 (OBS): Add dll.o
4807 (dll.o): New rule.
4808
d73f2619
YQ
48092012-02-11 Yao Qi <yao@codesourcery.com>
4810
4811 * server.c: (handle_monitor_command): Add a new parameter
4812 `own_buf'.
4813 (handle_query): Update caller.
4814
f8255c2a
JB
48152012-02-09 Joel Brobecker <brobecker@adacore.com>
4816
4817 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4818 * configure, config.in: Regenerate.
4819 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4820 is not defined.
4821
da84f473
PA
48222012-02-02 Pedro Alves <palves@redhat.com>
4823
4824 Try SIGKILL first, then PTRACE_KILL.
4825 * linux-low.c (linux_kill_one_lwp): New.
4826 (linux_kill_one_lwp): Rename to ...
4827 (kill_one_lwp_callback): ... this. Use the new
4828 linux_kill_one_lwp.
4829
e886a173
PA
48302012-02-02 Pedro Alves <palves@redhat.com>
4831
4832 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4833 inferior.
4834
be07f1a2
PA
48352012-01-27 Pedro Alves <palves@redhat.com>
4836
4837 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4838 (elf_64_file_p): Make static.
4839 (linux_pid_exe_is_elf_64_file): New.
4840 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4841 Delete declarations.
4842 (linux_pid_exe_is_elf_64_file): Declare.
4843 * linux-x86-low.c (x86_arch_setup): Use
4844 linux_pid_exe_is_elf_64_file.
4845
d8301ad1
JK
48462012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4847
4848 * linux-low.c (linux_wait_for_event_1): Rename to ...
4849 (linux_wait_for_event): ... here and merge it with former
4850 linux_wait_for_event - new variable wait_ptid, use it.
4851 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4852
01b17894
PA
48532012-01-23 Pedro Alves <palves@redhat.com>
4854
4855 * server.c (main): Avoid yet another case of infinite loop while
4856 detaching/killing after a longjmp.
4857
e825046f
JK
48582012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4859
4860 Code cleanup.
4861 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4862
b9e7b9c3
UW
48632012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4864
4865 * hostio.c (handle_readlink): New function.
4866 (handle_vFile): Call it to handle "vFile:readlink" packets.
4867
901f9912
UW
48682012-01-20 Pedro Alves <palves@redhat.com>
4869 Ulrich Weigand <ulrich.weigand@linaro.org>
4870
4871 * server.c (handle_v_requests): Only support vAttach and vRun to
4872 start multiple processes when in extended protocol mode.
4873
fc1ab1a0
PA
48742012-01-17 Pedro Alves <palves@redhat.com>
4875
4876 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4877 memalign plus mprotect to allocate the scratch buffer.
4878
7d5d4e98
PA
48792012-01-13 Pedro Alves <palves@redhat.com>
4880
4881 * server.c (attach_inferior): Clear `cont_thread'.
4882
f128d5e9
PA
48832012-01-13 Pedro Alves <palves@redhat.com>
4884
4885 * server.c (main): Avoid infinite loop while detaching/killing
4886 after a longjmp.
4887
06db92f0
DE
48882012-01-09 Doug Evans <dje@google.com>
4889
4890 * server.c (start_inferior): Set last_ptid in --wrapper case.
4891
32d92999
YQ
48922012-01-06 Yao Qi <yao@codesourcery.com>
4893
4894 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4895 defined.
4896 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4897
5e0a92a9
YQ
48982012-01-04 Yao Qi <yao@codesourcery.com>
4899
4900 * tracepoint.c (cmd_qtdp): Print debug message
4901 for static tracepoint.
4902
ae639e8c
YQ
49032012-01-04 Yao Qi <yao@codesourcery.com>
4904
4905 * tracepoint.c (trace_vdebug): Differentiate debug message
4906 between gdbserver and IPA.
4907
f72429c5
YQ
49082012-01-03 Yao Qi <yao@codesourcery.com>
4909
4910 * tracepoint.c (tracepoint_was_hit): Don't collect for
4911 static tracepoint.
4912
12c3e59c
JB
49132012-01-02 Joel Brobecker <brobecker@adacore.com>
4914
4915 * terminal.h: Reformat copyright header.
4916
67827812
JB
49172012-01-02 Joel Brobecker <brobecker@adacore.com>
4918
4919 * server.c (gdbserver_version): Update copyright year.
4920 * gdbreplay.c (gdbreplay_version): Likewise.
4921
3e52c33d
JK
49222011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4923
4924 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4925
4926 Revert:
4927 2011-12-18 Hui Zhu <teawater@gmail.com>
4928 * linux-low.c (linux_create_inferior): Save return value to ret.
4929
66f1260e
HZ
49302011-12-18 Hui Zhu <teawater@gmail.com>
4931
4932 * linux-low.c (linux_create_inferior): Save return value to ret.
4933
e77616d7
DE
49342011-12-16 Doug Evans <dje@google.com>
4935
e7b06c57
DE
4936 * linux-low.c (linux_create_inferior): If stdio connection,
4937 redirect stdin from /dev/null, stdout to stderr.
4938 * remote-utils.c (remote_is_stdio): New static global.
4939 (remote_connection_is_stdio): New function.
4940 (remote_prepare): Handle stdio connection.
4941 (remote_open): Ditto.
4942 (remote_close): Don't close stdin for stdio connections.
4943 (read_prim,write_prim): New functions. Replace all calls to
4944 read/write to these.
4945 * server.c (main): Watch for "-" argument. Move call to
4946 remote_prepare before start_inferior.
4947 * server.h (STDIO_CONNECTION_NAME): New macro.
4948 (remote_connection_is_stdio): Declare.
4949
e77616d7
DE
4950 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4951 in debugging output.
4952
82067193
YQ
49532011-12-15 Yao Qi <yao@codesourcery.com>
4954
4955 * tracepoint.c: Include sys/syscall.h.
4956 (gdb_ust_thread): Remove preprocessor conditional.
4957
82bfbe7e
PA
49582011-12-14 Pedro Alves <pedro@codesourcery.com>
4959
4960 * linux-low.c (linux_detach_one_lwp): Call
4961 the_low_target.prepare_to_resume before detaching.
4962
712c6575
YQ
49632011-12-14 Yao Qi <yao@codesourcery.com>
4964
4965 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4966 of write.
4967
d54d1edf
YQ
49682011-12-14 Yao Qi <yao@codesourcery.com>
4969
4970 * i386-low.c (i386_low_stopped_data_address): Initialize local
4971 variable `control'.
4972
6210a125
PA
49732011-12-13 Pedro Alves <pedro@codesourcery.com>
4974
4975 PR remote/13492
4976
4977 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4978 DR_CONTROL unless necessary. Extend comments.
4979 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4980 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4981
2ece8244
YQ
49822011-12-13 Yao Qi <yao@codesourcery.com>
4983
4984 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4985 macros.
4986 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4987
784867a5
JK
49882011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4989
4990 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4991 Print new debug message for such case.
4992
6bf36717
JK
49932011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4994
4995 Fix overlapping memcpy.
4996 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4997 the read_inferior_memory transfer.
4998 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4999 write_inferior_memory transfer.
5000 (set_fast_tracepoint_jump): New variable buf. Use it for the
5001 read_inferior_memory and write_inferior_memory transfers.
5002 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5003 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5004 Use it for the write_inferior_memory transfer.
5005 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5006 buffers.
5007
50275556
MR
50082011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5009
5010 * linux-low.c (fetch_register, store_register): Make code
5011 consistent, fix formatting.
5012
7325beb4
MR
50132011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5014
5015 * linux-low.c (usr_store_inferior_registers): Factor out code
5016 to handle individual registers into...
5017 (store_register): ... this new function.
5018
c642a434
UW
50192011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5020
5021 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5022 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5023 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5024 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5025 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5026 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5027 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5028 (srv_xmlfiles): Add new XML files.
5029
5030 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5031 and <sys/uio.h>.
5032 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5033 (init_registers_s390_linux32v1): Add prototype.
5034 (init_registers_s390_linux32v2): Likewise.
5035 (init_registers_s390_linux64v1): Likewise.
5036 (init_registers_s390_linux64v2): Likewise.
5037 (init_registers_s390x_linux64v1): Likewise.
5038 (init_registers_s390x_linux64v2): Likewise.
5039 (s390_num_regs): Increment to 52.
5040 (s390_regmap): Add orig_r2 register.
5041 (s390_num_regs_3264): Increment to 68.
5042 (s390_regmap_3264): Add orig_r2 register.
5043 (s390_collect_ptrace_register): Handle orig_r2 register.
5044 (s390_supply_ptrace_register): Likewise.
5045 (s390_fill_last_break): New function.
5046 (s390_store_last_break): Likewise.
5047 (s390_fill_system_call): New function.
5048 (s390_store_system_call): Likewise.
5049 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5050 register sets.
5051 (s390_check_regset): New function.
5052 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5053 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5054 Update target_regsets for available register sets.
5055
2268b414
JK
50562011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5057 Jan Kratochvil <jan.kratochvil@redhat.com>
5058
5059 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5060 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5061 New.
5062 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5063 * linux-low.h (struct process_info_private): New member r_debug.
5064 * server.c (handle_qxfer_libraries): Call
5065 the_target->qxfer_libraries_svr4.
5066 (handle_qxfer_libraries_svr4): New function.
5067 (qxfer_packets): New entry "libraries-svr4".
5068 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5069 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5070 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5071 PACKET_qXfer_libraries_svr4.
5072
d6db1fab
UW
50732011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5074
5075 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5076 PSW address/mask between 8-byte and 16-byte formats.
5077 (s390_supply_ptrace_register): Likewise.
5078 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5079 basic addressing mode bit.
5080
242f5f1c
SS
50812011-11-24 Stan Shebs <stan@codesourcery.com>
5082
5083 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5084
f196051f
SS
50852011-11-17 Stan Shebs <stan@codesourcery.com>
5086
5087 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5088 (tracing_start_time): New global.
5089 (tracing_stop_time): New global.
5090 (tracing_user_name): New global.
5091 (tracing_notes): New global.
5092 (tracing_stop_note): New global.
5093 (cmd_qtstart): Set traceframe_usage, start_time.
5094 (stop_tracing): Set stop_time.
5095 (cmd_qtstatus): Report additional status.
5096 (cmd_qtp): New function.
5097 (handle_tracepoint_query): Call it.
5098 (cmd_qtnotes): New function.
5099 (handle_tracepoint_general_set): Call it.
5100 (get_timestamp): Rename from tsv_get_timestamp.
5101
405f8e94
SS
51022011-11-14 Stan Shebs <stan@codesourcery.com>
5103 Kwok Cheung Yeung <kcy@codesourcery.com>
5104
5105 * linux-x86-low.c (small_jump_insn): New.
5106 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5107 trampoline and error message, build a trampoline and issue a small
5108 jump instruction to it.
5109 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5110 trampoline and error message.
5111 (x86_get_min_fast_tracepoint_insn_len): New.
5112 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5113 * linux-low.h (struct linux_target_ops): Add arguments to
5114 install_fast_tracepoint_jump_pad operation, add new operation.
5115 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5116 arguments.
5117 (linux_get_min_fast_tracepoint_insn_len): New function.
5118 (linux_target_op): Add new operation.
5119 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5120 (gdb_trampoline_buffer_end): Ditto.
5121 (gdb_trampoline_buffer_error): Ditto.
5122 (struct ipa_sym_addresses): Add fields for new IPA variables.
5123 (symbol_list): Add entries for new IPA variables.
5124 (struct tracepoint): Add fields to hold the address range of the
5125 trampoline used by the tracepoint.
5126 (trampoline_buffer_head): New static variable.
5127 (trampoline_buffer_tail): Ditto.
5128 (claim_trampoline_space): New function.
5129 (have_fast_tracepoint_trampoline_buffer): New function.
5130 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5131 structure.
5132 (install_fast_tracepoint): Ditto, also add error buffer argument.
5133 (cmd_qtminftpilen): New function.
5134 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5135 (fast_tracepoint_from_trampoline_address): New function.
5136 (fast_tracepoint_collecting): Handle trampoline as part of jump
5137 pad space.
5138 (set_trampoline_buffer_space): New function.
5139 (initialize_tracepoint): Initialize new IPA variables.
5140 * target.h (struct target_ops): Add arguments to
5141 install_fast_tracepoint_jump_pad operation, add new
5142 get_min_fast_tracepoint_insn_len operation.
5143 (target_get_min_fast_tracepoint_insn_len): New.
5144 (install_fast_tracepoint_jump_pad): Add arguments.
5145 * server.h (IPA_BUFSIZ): Define.
5146 * linux-i386-ipa.c: Include extra header files.
5147 (initialize_fast_tracepoint_trampoline_buffer): New function.
5148 (initialize_low_tracepoint): Call it.
5149 * server.h (set_trampoline_buffer_space): Declare.
5150 (claim_trampoline_space): Ditto.
5151 (have_fast_tracepoint_trampoline_buffer): Ditto.
5152
1e4d1764
YQ
51532011-11-14 Yao Qi <yao@codesourcery.com>
5154
5155 * server.c (handle_query): Handle InstallInTrace for qSupported.
5156 * tracepoint.c (add_tracepoint): Sort list.
5157 (install_tracepoint, download_tracepoint): New.
5158 (cmd_qtdp): Call them to install and download tracepoints.
5159 (sort_tracepoints): Removed.
5160 (cmd_qtstart): Update.
5161
5c73ff4e
YQ
51622011-11-14 Yao Qi <yao@codesourcery.com>
5163
5164 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5165 * mem-break.h: Declare.
5166 * tracepoint.c (cmd_qtstart): Move some code to ...
5167 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5168 New.
5169 (download_tracepoints): Move some code to ...
5170 (download_tracepoint_1): ... here. New.
5171
86a30030
YQ
51722011-11-08 Yao Qi <yao@codesourcery.com>
5173
5174 * remote-utils.c (relocate_instruction): A comment fix.
5175
8d26e50c
JB
51762011-11-07 Joel Brobecker <brobecker@adacore.com>
5177
5178 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5179 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5180 dr_status_mirror and dr_control_mirror from debug_reg_state.
5181 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5182 (i386_initial_stuff): Remove use of deleted globals.
5183 (i386_get_thread_context, i386_set_thread_context,
5184 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5185 from debug_reg_state.
5186
a59306a3
YQ
51872011-11-05 Yao Qi <yao@codesourcery.com>
5188
5189 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5190 address as TPOINT's.
5191
3065dfb6
SS
51922011-11-02 Stan Shebs <stan@codesourcery.com>
5193
5194 * tracepoint.c (agent_mem_read_string): New function.
5195 (eval_agent_expr): Call it for tracenz.
5196 * server.c (handle_query): Report support for tracenz.
5197
fd0d8c7c
YQ
51982011-11-02 Yao Qi <yao@codesourcery.com>
5199
5200 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5201
609086b1
YQ
52022011-11-02 Yao Qi <yao@codesourcery.com>
5203
5204 * target.h: Fix a typo in comment.
5205
b9fd1791
PA
52062011-10-31 Pedro Alves <pedro@codesourcery.com>
5207
5208 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5209 clobber the breakpoints' shadows with fast tracepoint jumps.
5210 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5211 * target.c (write_inferior_memory): Also pass MYADDR down to
5212 check_mem_write.
5213
03583c20
UW
52142011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5215
5216 * configure.ac: Check support for personality routine.
5217 * configure: Regenerate.
5218 * config.in: Likewise.
5219 * linux-low.c: Include <sys/personality.h>.
5220 Define ADDR_NO_RANDOMIZE if necessary.
5221 (linux_create_inferior): Disable address space randomization when
5222 forking inferior, if requested.
5223 (linux_supports_disable_randomization): New function.
5224 (linux_target_ops): Install it.
5225 * server.h (disable_randomization): Declare.
5226 * server.c (disable_randomization): New global variable.
5227 (handle_general_set): Handle QDisableRandomization.
5228 (handle_query): Likewise for qSupported.
5229 (main): Support --disable-randomization and --no-disable-randomization
5230 command line arguments.
5231 * target.h (struct target_ops): Add supports_disable_randomization.
5232 (target_supports_disable_randomization): New macro.
5233
723b724b
MF
52342011-09-29 Mike Frysinger <vapier@gentoo.org>
5235
5236 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5237 ifdef check.
5238 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5239 [!PT_GETDSBT] (target_loadmap): New definition.
5240 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5241 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5242 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5243 and PT_GETDSBT to LINUX_LOADMAP.
5244 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5245 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5246
55329a5c 52472011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5248
5249 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5250 (arm_linux_hwbp_cap): New static variable.
5251 (arm_linux_get_hwbp_cap): Replace by ...
5252 (arm_linux_init_hwbp_cap): ... this new function.
5253 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5254 (arm_linux_get_hw_watchpoint_count): Likewise.
5255 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5256 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5257 (arm_prepare_to_resume): Use perror_with_name instead of error.
5258
55329a5c 52592011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5260
5261 * linux-arm-low.c: Include <signal.h>.
5262 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5263 (struct arm_linux_hwbp_cap): New data type.
5264 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5265 (struct arm_linux_hw_breakpoint): New data type.
5266 (MAX_BPTS, MAX_WPTS): Define.
5267 (struct arch_process_info, struct arch_lwp_info): New data types.
5268 (arm_linux_get_hwbp_cap): New function.
5269 (arm_linux_get_hw_breakpoint_count): Likewise.
5270 (arm_linux_get_hw_watchpoint_count): Likewise.
5271 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5272 (arm_hwbp_control_initialize): Likewise.
5273 (arm_hwbp_control_is_enabled): Likewise.
5274 (arm_hwbp_control_is_initialized): Likewise.
5275 (arm_hwbp_control_disable): Likewise.
5276 (arm_linux_hw_breakpoint_equal): Likewise.
5277 (arm_linux_hw_point_initialize): Likewise.
5278 (struct update_registers_data): New data structure.
5279 (update_registers_callback: New function.
5280 (arm_insert_point): Likewise.
5281 (arm_remove_point): Likewise.
5282 (arm_stopped_by_watchpoint): Likewise.
5283 (arm_stopped_data_address): Likewise.
5284 (arm_new_process): Likewise.
5285 (arm_new_thread): Likewise.
5286 (arm_prepare_to_resume): Likewise.
5287 (the_low_target): Register arm_insert_point, arm_remove_point,
5288 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5289 arm_new_thread, and arm_prepare_to_resume.
5290
6b9801d4
SS
52912011-09-15 Stan Shebs <stan@codesourcery.com>
5292
5293 * server.h (struct emit_ops): Add compare-goto fields.
5294 * tracepoint.c (gdb_agent_op_sizes): New table.
5295 (emit_eq_goto): New function.
5296 (emit_ne_goto): New function.
5297 (emit_lt_goto): New function.
5298 (emit_le_goto): New function.
5299 (emit_gt_goto): New function.
5300 (emit_ge_goto): New function.
5301 (is_goto_target): New function.
5302 (compile_bytecodes): Recognize special cases of compare-goto
5303 combinations and call specialized emitters for them.
5304 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5305 (amd64_emit_ne_goto): New function.
5306 (amd64_emit_lt_goto): New function.
5307 (amd64_emit_le_goto): New function.
5308 (amd64_emit_gt_goto): New function.
5309 (amd64_emit_ge_goto): New function.
5310 (amd64_emit_ops): Add the new functions.
5311 (i386_emit_eq_goto): New function.
5312 (i386_emit_ne_goto): New function.
5313 (i386_emit_lt_goto): New function.
5314 (i386_emit_le_goto): New function.
5315 (i386_emit_gt_goto): New function.
5316 (i386_emit_ge_goto): New function.
5317 (i386_emit_ops): Add the new functions.
5318
bf15cbda
SS
53192011-09-08 Stan Shebs <stan@codesourcery.com>
5320
5321 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5322 (i386_emit_epilogue): Restore %ebx.
5323
943ca1dd
JZ
53242011-08-31 Jie Zhang <jzhang918@gmail.com>
5325
5326 * server.c (step_thread): Remove definition.
5327 (process_serial_event): Don't handle Hs.
5328 * server.h (step_thread): Remove declaration.
5329 * target.c (set_desired_inferior): Remove use of step_thread.
5330
e3deef73
LM
53312011-08-24 Luis Machado <lgustavo@codesourcery.com>
5332
5333 * linux-low.c: Include linux-procfs.h.
5334 (linux_attach_lwp_1): Update comments.
5335 (linux_attach): Scan for existing threads when attaching to a
5336 process that is the tgid.
5337 * Makefile.in: Update dependencies.
5338
13da1c97
LM
53392011-08-24 Luis Machado <lgustavo@codesourcery.com>
5340
5341 * configure.srv: Add linux-procfs.o dependencies.
5342
881127c9
YQ
53432011-08-14 Yao Qi <yao@codesourcery.com>
5344
5345 * target.h (struct target_ops): Fix indent.
5346 * win32-low.c (win32_target_ops): Fix comment.
5347
58dbd541
YQ
53482011-08-14 Andrew Jenner <andrew@codesourcery.com>
5349 Yao Qi <yao@codesourcery.com>
5350
5351 * Makefile.in (clean): Remove tic6x-*.c files.
5352 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5353 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5354 (tic6x-c64xp-linux.c): Likewise.
5355 * configure.srv: Add support for tic6x-*-uclinux.
5356 * linux-tic6x-low.c: New.
5357 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5358
78d85199
YQ
53592011-08-14 Andrew Stubbs <ams@codesourcery.com>
5360 Yao Qi <yao@codesourcery.com>
5361
5362 * target.h (struct target_ops): Add read_loadmap.
5363 * linux-low.c (struct target_loadseg): New type.
5364 (struct target_loadmap): New type.
5365 (linux_read_loadmap): New function.
5366 (linux_target_ops): Add linux_read_loadmap.
5367 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5368 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5369 to NULL.
78d85199 5370
a959a88d
EZ
53712011-08-05 Eli Zaretskii <eliz@gnu.org>
5372
5373 * win32-low.c: Include <stdint.h>.
5374
1ced966e
PA
53752011-07-22 Pedro Alves <pedro@codesourcery.com>
5376
5377 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5378 to the inferior here.
5379 (i386_remove_aligned_watchpoint): Ditto.
5380 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5381 fit part of the watchpoint in the debug registers.
5382 (i386_update_inferior_debug_regs): New.
5383 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5384 registers, and only update the inferior on success.
5385 (i386_low_remove_watchpoint): Ditto.
5386
d26e3629
KY
53872011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5388
5389 * linux-low.c (compare_ints, unique, list_threads, show_process,
5390 linux_core_of_thread): Delete.
5391 (linux_target_ops): Change linux_core_of_thread to
5392 linux_common_core_of_thread.
5393 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5394 * utils.c (malloc_failure): Change type of argument.
5395 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5396 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5397 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5398 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5399 (IPA_OBJS): Add common-utils-ipa.o.
5400 (ptid_h, linux_osdata_h): New macros.
5401 (server_h): Add common/common-utils.h, common/xml-utils.h,
5402 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5403 common/ptid.h.
5404 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5405 ptid.o, buffer.o): New rules.
5406 (linux-low.o): Add common/linux-osdata.h as a dependency.
5407 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5408 * configure.ac: Add AC_HEADER_DIRENT check.
5409 * config.in: Regenerate.
5410 * configure: Regenerate.
5411 * remote-utils.c (xml_escape_text): Delete.
5412 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5413 buffer_xml_printf): Move to common/buffer.c.
5414 * server.c (main): Remove call to initialize_inferiors.
5415 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5416 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5417 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5418 internal_error, gdb_assert, gdb_assert_fail): Delete.
5419 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5420 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5421 common/buffer.h.
5422 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5423 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5424 initialize_inferiors): Delete.
5425
2275a1a7
PA
54262011-07-20 Pedro Alves <pedro@codesourcery.com>
5427
5428 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5429 symbol error.
5430
0a5b1e09
PA
54312011-05-31 Pedro Alves <pedro@codesourcery.com>
5432
5433 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5434 assertion.
5435 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5436
6938fd34
YQ
54372011-05-26 Yao Qi <yao@codesourcery.com>
5438
5439 * Makefile.in (thread-db.o): Track dependence to
5440 common/gdb_thread_db.h.
5441 * thread-db.c: include gdb_thread_db.h from right place.
5442
b481f9e0
TT
54432011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5444
5445 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5446 __FILE__ and __LINE__ to internal_error.
5447
98a5dd13
DE
54482011-05-13 Doug Evans <dje@google.com>
5449
5450 * thread-db.c (try_thread_db_load_from_sdir): New function.
5451 (try_thread_db_load_from_dir): New function.
5452 (thread_db_load_search): Handle $sdir, ignore $pdir.
5453 Remove trying of system directories if search of
5454 libthread-db-search-path fails, that is now done via $sdir.
5455
d248b706
KY
54562011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5457
5458 * server.c (handle_query): Add EnableDisableTracepoints to the list
5459 of supported features.
43aaf8b6 5460 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5461 tracepoints.
43aaf8b6
PA
5462 (cmd_qtenable_disable): New.
5463 (cmd_qtstart): Install tracepoints even if disabled.
5464 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5465 receiving a QTEnable or QTDisable packet.
5466 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5467 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5468 tracepoints.
5469 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5470
84e578fb
DE
54712011-05-10 Doug Evans <dje@google.com>
5472
5473 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5474
71f55dd8
DE
54752011-05-04 Doug Evans <dje@google.com>
5476
5477 * linux-low.c (linux_join): Skip process lookup.
5478 * spu-low.c (spu_join): Ditto.
5479 * server.c (join_inferiors_callback): Delete.
5480 (process_serial_event): For 'D' packet (detach) call join_inferior
5481 directly.
5482
4d393d60
JM
54832011-05-04 Joseph Myers <joseph@codesourcery.com>
5484
5485 * README: Don't mention xscale*-*-linux*.
5486 * configure.srv (xscale*-*-linux*): Don't handle target.
5487
b00ad6ff
NF
54882011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5489
5490 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5491 casting pointers.
5492 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5493 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5494 (i386_emit_void_call_2): Likewise.
5495
af96c192
YQ
54962011-04-26 Yao Qi <yao@codesourcery.com>
5497
43aaf8b6
PA
5498 * linux-low.c: Move common macros to linux-ptrace.h.
5499 Include linux-ptrace.h.
af96c192
YQ
5500 * Makefile.in (linux_ptrace_h): New.
5501 (linux-low.o): Depends on linux-ptrace.h.
5502
03f2bd59
JK
55032011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5504
5505 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5506 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5507 (remote_prepare): New function with most of the TCP code from ...
5508 (remote_open): ... here. Detect PORT here unconditionally. Move also
5509 setting transport_is_reliable.
5510 * server.c (run_once): New variable.
5511 (gdbserver_usage): Document it.
5512 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5513 the first run if RUN_ONCE.
5514 * server.h (run_once, remote_prepare): New declarations.
5515
7a9dd1b2
TT
55162011-04-19 Tom Tromey <tromey@redhat.com>
5517
5518 * win32-low.c (handle_load_dll): Remove duplicate "the".
5519
81239425
PM
55202011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5521
5522 Remove support for old Cygwin 1.5 versions.
5523 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5524 function to avoid warning.
5525 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5526 warning.
5527
9e0627f1
PM
55282011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5529
5530 * gdbserver/server.h (Macro _): Define it if not available.
5531
588eebee
MS
55322011-03-14 Michael Snyder <msnyder@vmware.com>
5533
348af9f7 5534 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5535
43f70d4c
JB
55362011-03-10 Joel Brobecker <brobecker@adacore.com>
5537
5538 * Makefile.in (maintainer-clean realclean distclean): Remove
5539 "make ... subdir_do" command.
5540
348af9f7
MS
55412011-03-10 Michael Snyder <msnyder@vmware.com>
5542
5543 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5544
5545 * server.c (handle_v_run): Free alloced buffer on early return.
5546
e637a4f5
YQ
55472011-03-09 Yao Qi <yao@codesourcery.com>
5548
5549 Revert:
5550 2011-03-04 Yao Qi <yao@codesourcery.com>
5551
5552 * Makefile.in: Remove GNU make feature --directory.
5553
5554 2011-03-05 Yao Qi <yao@codesourcery.com>
5555
5556 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5557 (subdir_do): New make target. Copied from gdb/Makefile.
5558 (maintainer-clean, realclean, distclean, clean): Call corresponding
5559 make targets in common/Makefile.
5560
5561 2011-02-11 Yao Qi <yao@codesourcery.com>
5562
5563 * configure.ac: Call AC_PROG_RANLIB.
5564 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5565 * configure: Regenerate.
5566
e6edda56
JK
55672011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5568
5569 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5570
e5141119
JB
55712011-03-06 Yao Qi <yao@codesourcery.com>
5572
5573 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5574
64794aa4
JB
55752011-03-05 Yao Qi <yao@codesourcery.com>
5576
5577 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5578 (subdir_do): New make target. Copied from gdb/Makefile.
5579 (maintainer-clean, realclean, distclean, clean): Call corresponding
5580 make targets in common/Makefile.
5581
7a762829
YQ
55822011-03-04 Yao Qi <yao@codesourcery.com>
5583
5584 * Makefile.in: Remove GNU make feature --directory.
5585
348af9f7
MS
55862011-03-04 Michael Snyder <msnyder@vmware.com>
5587
5588 * server.c (queue_stop_reply): Call xmalloc not malloc.
5589
55902011-03-02 Michael Snyder <msnyder@vmware.com>
5591
5592 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5593
9f72fee2
MS
55942011-02-28 Michael Snyder <msnyder@vmware.com>
5595
588eebee
MS
5596 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5597 (cmd_qtframe): Ditto.
5598 (cmd_qtbuffer): Ditto.
5599 (cmd_bigqtbuffer): Ditto.
5600
9f72fee2
MS
5601 * utils.c (decimal2str): Initialize 'width' to nine, then
5602 don't mess with it.
5603
8040bd49
UW
56042011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5605
5606 * hostio.c (require_data): Free *data, not data.
5607
7e52cbd0
JK
56082011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5609
5610 * hostio.c (require_data): Use free, not xfree.
5611
9130f83e
MS
56122011-02-27 Michael Snyder <msnyder@vmware.com>
5613
4b812f4e
MS
5614 * server.c (handle_query): Discard unused value.
5615
9130f83e
MS
5616 * hostio.c (require_data): Free malloc memory before returning
5617 error.
5618
69d37113
MS
56192011-02-26 Michael Snyder <msnyder@vmware.com>
5620
5621 * linux-low.c (list_threads): Call closedir for dirent.
5622
35f5825a
MS
56232011-02-27 Michael Snyder <msnyder@vmware.com>
5624
2a589cef
MS
5625 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5626 a case statement falls through.
5627
0adea5f7
MS
5628 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5629
35f5825a
MS
5630 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5631 in comparison.
5632
238f1c74
MS
56332011-02-26 Michael Snyder <msnyder@vmware.com>
5634
5635 * utils.c (decimal2str): Eliminate dead code and dead param.
5636 (pulongest): Drop dead param from call to decimal2str.
5637 (plongest): Ditto.
5638
633ff500
JB
56392011-02-24 Joel Brobecker <brobecker@adacore.com>
5640
5641 Revert the following patch (not approved yet):
5642 2011-02-21 Hui Zhu <teawater@gmail.com>
5643 * tracepoint.c (tp_printf): New function.
5644 (eval_agent_expr): Handle gdb_agent_op_printf.
5645
f9c6ff72
HZ
56462011-02-21 Hui Zhu <teawater@gmail.com>
5647
5648 * tracepoint.c (tp_printf): New function.
5649 (eval_agent_expr): Handle gdb_agent_op_printf.
5650
94d5e490
TT
56512011-02-18 Tom Tromey <tromey@redhat.com>
5652
5653 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5654 (tracepoint.o): Likewise.
5655 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5656 (gdb_agent_op_names): Likewise.
5657
c7f96d2b
TT
56582011-02-18 Tom Tromey <tromey@redhat.com>
5659
5660 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5661 gdb_agent_op_rot>: New constants.
5662 (gdb_agent_op_names): Add pick and roll.
5663 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5664 cases.
5665
0feedb2c
JK
56662011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5667
5668 * aclocal.m4: Regenerated with aclocal-1.11.1.
5669
b3b9301e
PA
56702011-02-14 Pedro Alves <pedro@codesourcery.com>
5671
5672 * server.c (handle_qxfer_traceframe_info): New.
5673 (qxfer_packets): Register "traceframe-info".
5674 (handle_query): Report support for qXfer:traceframe-info:read+.
5675 * tracepoint.c (match_blocktype): New.
5676 (traceframe_find_block_type): Rename to ...
5677 (traceframe_walk_blocks): ... this. Add callback filter argument,
5678 and use it.
5679 (traceframe_find_block_type): New, reimplemented on top of
5680 traceframe_walk_blocks.
5681 (build_traceframe_info_xml): New.
5682 (traceframe_read_info): New.
5683 * server.h (traceframe_read_info): Declare.
5684
4f3e6fb7
YQ
56852011-02-11 Yao Qi <yao@codesourcery.com>
5686
5687 * configure.ac: Call AC_PROG_RANLIB.
5688 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5689 * configure: Regenerate.
5690
764880b7
PA
56912011-02-07 Pedro Alves <pedro@codesourcery.com>
5692
5693 * server.c (gdb_read_memory): Change return semantics to allow
5694 partial transfers.
5695 (handle_search_memory_1): Adjust.
5696 (process_serial_event) <'m' packet>: Handle partial transfers.
5697 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5698
1c79eb8a
PA
56992011-01-28 Pedro Alves <pedro@codesourcery.com>
5700
5701 * regcache.c (init_register_cache): Initialize
5702 regcache->register_status.
5703 (free_register_cache): Release regcache->register_status.
5704 (regcache_cpy): Copy register_status.
5705 (registers_to_string): Print 'x's for unavailable registers.
5706 (supply_register): Mark the register's status valid or
5707 unavailable, depending on whether a buffer was passed in or not.
5708 (supply_register_zeroed): New.
5709 (supply_regblock): Mark the registers' status valid or
5710 unavailable, depending on whether a buffer was passed in or not.
5711 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5712 (struct regcache): New `register_status' field.
5713 (supply_register_zeroed): Declare.
5714 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5715 supply_register_zeroed, rather than passing a NULL buffer to
5716 supply_register.
5717 * tracepoint.c (fetch_traceframe_registers): Update comment.
5718
85724a0e
PA
57192011-01-28 Pedro Alves <pedro@codesourcery.com>
5720
5721 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5722 buffer explicit.
5723
d08aafef
PA
57242011-01-25 Pedro Alves <pedro@codesourcery.com>
5725
5726 * server.h (decode_xfer_write): Change prototype.
5727 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5728 and don't extract the annex here.
5729 * server.c (decode_xfer_read): Remove `annex' parameter,
5730 and don't extract the annex here.
5731 (decode_xfer): New.
5732 (struct qxfer): New.
5733 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5734 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5735 (handle_qxfer_statictrace): New functions, abstracted out from
5736 handle_query, and made to use the struct qxfer interface.
5737 (handle_threads_qxfer_proper): Rename to ...
5738 (handle_qxfer_threads_proper): ... this.
5739 (handle_threads_qxfer): Rename to ...
5740 (handle_qxfer_threads): ... this. Adjust.
5741 (qxfer_packets): New array.
5742 (handle_qxfer): New function.
5743 (handle_query): Use handle_qxfer.
5744
493e2a69
MS
57452011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5746
5747 * gdbreplay.c: Shorten lines of >= 80 columns.
5748 * linux-low.c: Ditto.
5749 * linux-ppc-low.c: Ditto.
5750 * linux-s390-low.c: Ditto.
5751 * linux-sparc-low.c: Ditto.
5752 * linux-x86-low.c: Ditto.
5753 * linux-xtensa-low.c: Ditto.
5754 * mem-break.c: Ditto.
5755 * nto-low.c: Ditto.
5756 * regcache.h: Ditto.
5757 * remote-utils.c: Ditto.
5758 * server.c: Ditto.
5759 * server.h: Ditto.
5760 * thread-db.c: Ditto.
5761 * tracepoint.c: Ditto.
5762 * utils.c: Ditto.
5763 * win32-low.h: Ditto.
5764
44944448
JB
57652011-01-05 Joel Brobecker <brobecker@adacore.com>
5766
5767 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5768 update.
5769
71ce852c
JB
57702011-01-01 Joel Brobecker <brobecker@adacore.com>
5771
5772 * server.c (gdbserver_version): Update copyright year in version
5773 output.
5774 * gdbreplay.c (gdbreplay_version): Ditto.
5775
eb826dc6
MF
57762010-12-29 Jie Zhang <jie.zhang@analog.com>
5777
5778 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5779 * linux-bfin-low.c: New file.
5780 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5781 PT_DATA_ADDR for BFIN targets.
5782 * Makefile.in (SFILES): Add linux-bfin-low.c.
5783 (clean): Remove reg-bfin.c.
5784 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5785 * README: Mention supported Blackfin targets.
5786
39ab222a
MF
57872010-12-23 Mike Frysinger <vapier@gentoo.org>
5788
5789 * .gitignore: New file.
5790
a1f2ce7d
MF
57912010-11-16 Mike Frysinger <vapier@gentoo.org>
5792
5793 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5794
f474844c
JZ
57952010-10-22 Jie Zhang <jie@codesourcery.com>
5796
5797 * Makefile.in: Add FLAGS_TO_PASS variable.
5798 (install): Remove dependency of install-only and recursively
5799 invoke make for install-only.
5800
f1048712
DE
58012010-10-04 Doug Evans <dje@google.com>
5802
5803 * Makefile.in (uninstall): Use $(DESTDIR).
5804
b53a1623
PA
58052010-09-24 Pedro Alves <pedro@codesourcery.com>
5806
e6ee044d
PA
5807 PR gdb/11842
5808
b53a1623
PA
5809 * linux-x86-low.c (compat_siginfo_from_siginfo)
5810 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5811 si_code is < 0. Check for si_code == SI_TIMER before checking for
5812 si_code < 0.
5813
fa1bd1e4
JB
58142010-09-13 Joel Brobecker <brobecker@adacore.com>
5815
5816 * lynx-i386-low.c: New file.
5817 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5818
47fac8f8
JB
58192010-09-13 Joel Brobecker <brobecker@adacore.com>
5820
5821 * lynx-low.c (ptrace_request_to_str): Remove handling for
5822 request values that have been removed in LynxOS 5.x.
5823
1adfc54d
JB
58242010-09-13 Joel Brobecker <brobecker@adacore.com>
5825
5826 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5827 <ptrace.h>
5828
c2a66c29
NS
58292010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5830
5831 * configure.ac: Add --enable-inprocess-agent option.
5832 * configure: Rebuilt.
5833
32fcada3
YQ
58342010-09-06 Yao Qi <yao@codesourcery.com>
5835
5836 * linux-low.c (linux_kill): Remove unused variable.
5837 (linux_stabilize_threads): Likewise.
5838 * server.c (start_inferior): Likewise.
5839 (queue_stop_reply_callback): Likewise.
5840 * tracepoint.c (do_action_at_tracepoint): Likewise.
5841
0cccb683
YQ
58422010-09-06 Yao Qi <yao@codesourcery.com>
5843
5844 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5845 on return.
5846
423ec54c
JK
58472010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5848
5849 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5850
12ac6819
PA
58512010-09-06 Pedro Alves <pedro@codesourcery.com>
5852
5853 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5854 "$(IPA_DEPFILES)".
5855
8ed54b31
JB
58562010-09-01 Joel Brobecker <brobecker@adacore.com>
5857
5858 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5859 gdbserver/lynx-ppc-low.c: New files.
5860 * Makefile.in (lynx_low_h): New variable.
5861 (lynx-low.o, lynx-ppc-low.o): New rules.
5862 * configure.ac: On LynxOS, link with -lnetinet.
5863 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5864 * configure: regenerate.
5865
bb0116a4
JB
58662010-09-01 Joel Brobecker <brobecker@adacore.com>
5867
5868 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5869 * configure.ac: Add check for vasprintf and vsnprintf.
5870 * configure, config.in: Regenerate.
5871 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5872
a778ab81 58732010-09-01 Joel Brobecker <brobecker@adacore.com>
5874
5875 * gdbreplay.c: Move include of alloca.h up, next to include of
5876 malloc.h.
5877 * server.h: Add include of malloc.h.
5878 * mem-break.c: Remove include of malloc.h.
5879 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5880
8b034a19 58812010-09-01 Joel Brobecker <brobecker@adacore.com>
5882
5883 * Makefile.in (memmem.o): Build with -Wno-error.
5884
58852010-09-01 Joel Brobecker <brobecker@adacore.com>
5886
5887 * utils.c (xsnprintf): Make non-static.
5888 * server.h: Add xsnprintf declaration.
5889 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5890 replace calls to snprintf by calls to xsnprintf throughout.
5891
58922010-09-01 Joel Brobecker <brobecker@adacore.com>
5893
5894 * configure.ac: Add configure check for alloca.
5895 * configure, config.in: Regenerate.
5896 * server.h: Include alloca.h if it exists.
5897 * gdbreplay.c: Include alloca.h if it exists.
5898
1a981360
PA
58992010-08-28 Pedro Alves <pedro@codesourcery.com>
5900
5901 * linux-low.c (__SIGRTMIN): Define if not already defined.
5902 (linux_create_inferior): Check for __ANDROID__ rather than
5903 __SIGRTMIN.
5904 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5905 are already deferred.
5906 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5907 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5908 stopped and already has a pending signal to report.
5909 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5910 a pending signal to report or is moving out of a jump pad.
5911 (linux_init_signals): Check for __ANDROID__ rather than
5912 __SIGRTMIN.
5913
b4d51a55
PA
59142010-08-28 Pedro Alves <pedro@codesourcery.com>
5915
5916 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5917 debug_threads check. Avoid a linear search when not doing debug
5918 output.
5919
ec48365d
PA
59202010-08-27 Pedro Alves <pedro@codesourcery.com>
5921
5922 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5923 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5924 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5925 (process_event): Change local fd's type to gdb_fildes_t.
5926 (create_file_handler): Adjust prototype.
5927 (delete_file_handler): Adjust prototype.
5928 (handle_file_event): Adjust prototype. Use pfildes.
5929 (create_file_event): Adjsut prototype.
5930 * remote-utils.c (remote_desc, listen_desc): Change type to
5931 gdb_fildes_t.
5932 * server.h: New gdb_fildes_t typedef.
5933 [USE_WIN32API]: Include winsock2.h.
5934 (delete_file_handler, add_file_handler): Adjust prototypes.
5935 (pfildes): Declare.
5936 * utils.c (pfildes): New.
5937
854d88f0
PA
59382010-08-27 Pedro Alves <pedro@codesourcery.com>
5939
5940 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5941 * configure: Regenerate.
5942
0146f85b
PA
59432010-08-27 Pedro Alves <pedro@codesourcery.com>
5944
5945 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5946 (linux_done_accessing_memory): ... this.
5947 (linux_target_ops): Adjust.
5948 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5949 * nto-low.c (nto_target_ops): Adjust comment.
5950 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5951 * spu-low.c (spu_target_ops): Adjust comment.
5952 * target.h (target_ops): Rename unprepare_to_access_memory field
5953 to done_accessing_memory.
5954 (unprepare_to_access_memory): Rename to ...
5955 (done_accessing_memory): ... this.
5956
90d74c30
PA
59572010-08-26 Pedro Alves <pedro@codesourcery.com>
5958
5959 * linux-low.c (linux_prepare_to_access_memory): New.
5960 (linux_unprepare_to_access_memory): New.
5961 (linux_target_ops): Install them.
5962 * server.c (read_memory): Rename to ...
5963 (gdb_read_memory): ... this. Use
5964 prepare_to_access_memory/prepare_to_access_memory.
5965 (write_memory): Rename to ...
5966 (gdb_write_memory): ... this. Use
5967 prepare_to_access_memory/prepare_to_access_memory.
5968 (handle_search_memory_1): Adjust.
5969 (process_serial_event): Adjust.
5970 * target.h (struct target_ops): New fields
5971 prepare_to_access_memory and unprepare_to_access_memory.
5972 (prepare_to_access_memory, unprepare_to_access_memory): New.
5973 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5974 prepare_to_access_memory/prepare_to_access_memory.
5975 * nto-low.c (nto_target_ops): Adjust.
5976 * spu-low.c (spu_target_ops): Adjust.
5977 * win32-low.c (win32_target_ops): Adjust.
5978
fd467969
PA
59792010-08-26 Pedro Alves <pedro@codesourcery.com>
5980
5981 * Makefile.in (WARN_CFLAGS): Get it from configure.
5982 (WERROR_CFLAGS): New.
5983 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5984 * configure.ac: Introduce --enable-werror, which adds -Werror to
5985 the compiler command line. Enabled by default. Disable with
5986 --disable-werror. Add -Wdeclaration-after-statement
5987 Wpointer-arith and -Wformat-nonliteral to warning flags.
5988 * configure: Regenerate.
5989
331e2f5f
PA
59902010-08-26 Pedro Alves <pedro@codesourcery.com>
5991
5992 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5993
e581f2b4
PA
59942010-08-26 Pedro Alves <pedro@codesourcery.com>
5995
5996 * gdbreplay.c (remote_error): New.
5997 (gdbchar): New.
5998 (expect): Use gdbchar. Check for error reading from GDB.
5999 Clarify sync error output.
6000 (play): Check for errors writing to GDB.
6001 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6002 * remote-utils.c (getpkt): Check for errors writing to the remote
6003 descriptor.
6004
3c11dd79
PA
60052010-08-25 Pedro Alves <pedro@codesourcery.com>
6006
6007 * linux-low.c (linux_wait_1): Move non-debugging code out of
6008 `debug_threads' control.
6009
d20a8ad9
PA
60102010-08-25 Pedro Alves <pedro@codesourcery.com>
6011
6012 * linux-low.c (linux_wait_1): Don't set last_status here.
6013 * server.c (push_event, queue_stop_reply_callback): Assert we're
6014 not pushing a TARGET_WAITKIND_IGNORE event.
6015 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6016 (myresume, handle_target_event): Set the thread's last_resume_kind
6017 and last_status from the target returned status.
6018
964e4306
PA
60192010-08-25 Pedro Alves <pedro@codesourcery.com>
6020
6021 PR threads/10729
6022
6023 * linux-x86-low.c (update_debug_registers_callback): New.
6024 (i386_dr_low_set_addr): Use it.
6025 (i386_dr_low_get_addr): New.
6026 (i386_dr_low_set_control): Use update_debug_registers_callback.
6027 (i386_dr_low_get_control): New.
6028 (i386_dr_low_get_status): Adjust.
6029 * linux-low.c (linux_stop_lwp): New.
6030 * linux-low.h (linux_stop_lwp): Declare.
6031
6032 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6033 argument instead of a i386_debug_reg_state.
6034 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6035 a i386_debug_reg_state.
6036 (i386_insert_aligned_watchpoint): Adjust.
6037 (i386_remove_aligned_watchpoint): Adjust.
6038 (i386_low_stopped_data_address): Read the debug registers from the
6039 inferior instead of from the mirrors.
6040 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6041 (i386_dr_low_get_addr): Declare.
6042 (i386_dr_low_get_control): Declare.
6043 (i386_dr_low_get_status): Change prototype.
6044
6045 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6046 (i386_dr_low_get_addr): New.
6047 (i386_dr_low_get_control): New.
6048 (i386_dr_low_get_status): Adjust prototype. Return
6049 dr_status_mirror.
6050 (i386_initial_stuff): Clear dr_status_mirror and
6051 dr_control_mirror.
6052 (i386_get_thread_context): Adjust.
6053 (i386_set_thread_context): Adjust.
6054 (i386_thread_added): Adjust.
6055
5f21a75b
PA
60562010-08-24 Pedro Alves <pedro@codesourcery.com>
6057
6058 * linux-low.h (linux_thread_area): Delete declaration.
6059
3e4c1235
TS
60602010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6061
6062 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6063 after its termination.
6064
1971b033
PA
60652010-08-09 Pedro Alves <pedro@codesourcery.com>
6066
6067 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6068 (gdb_wants_all_stopped): Delete.
6069 (linux_wait_1): Don't call them.
6070 * server.c (handle_v_cont): Tag all threads as want-stopped.
6071 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6072 stopped as "client-wants-stopped".
6073
310444ac
PA
60742010-07-31 Pedro Alves <pedro@codesourcery.com>
6075
6076 * Makefile.in (signals_h): New.
6077 (server_h): Depend on it.
6078 (server.o): Don't depend on $(signals_def).
6079 (signals.o): Depend on $(signals_def).
6080
a19cae16
JK
60812010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6082
6083 * Makefile.in (signals_def): New.
6084 (server_h): Append include/gdb/signals.h and signals_def.
6085 (server.o): Append signals_def.
6086
30d50328
JK
60872010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6088
6089 * server.c (handle_target_event): Use target_signal_to_host for
6090 resume_info.sig initialization.
6091 * target.h (struct thread_resume) <sig>: New comment.
6092
5c3216e2
OS
60932010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6094
c6f46ca0
OS
6095 * server.c (handle_query): strcpy() the returned string from paddress()
6096 instead of sprintf().
5c3216e2
OS
6097 * utils.c (paddress): Return phex_nz().
6098
6bd31874
JB
60992010-07-07 Joel Brobecker <brobecker@adacore.com>
6100
6101 * server.c (handle_v_cont): Call mourn_inferior if process
6102 just exited.
6103 (myresume): Likewise.
6104
0fb4aa4b
PA
61052010-07-01 Pedro Alves <pedro@codesourcery.com>
6106
6107 Static tracepoints, and integration with UST.
6108
6109 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6110 * mem-break.c (uninsert_all_breakpoints)
6111 (reinsert_all_breakpoints): New.
6112 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6113 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6114 (gdb_agent_ust_loaded, helper_thread_id)
6115 (gdb_agent_helper_thread_id): New macros.
6116 (struct ipa_sym_addresses): Add addr_ust_loaded,
6117 addr_helper_thread_id, addr_cmd_buf.
6118 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6119 (in_process_agent_loaded_ust): New.
6120 (write_e_ust_not_loaded): New.
6121 (maybe_write_ipa_ust_not_loaded): New.
6122 (struct collect_static_trace_data_action): New.
6123 (enum tracepoint_type) <static_tracepoint>: New.
6124 (struct tracepoint) <handle>: Mention static tracepoints.
6125 (struct static_tracepoint_ctx): New.
6126 (CMD_BUF_SIZE): New.
6127 (add_tracepoint_action): Handle static tracepoint actions.
6128 (unprobe_marker_at): New.
6129 (clear_installed_tracepoints): Handle static tracepoints.
6130 (cmd_qtdp): Handle static tracepoints.
6131 (probe_marker_at): New.
6132 (cmd_qtstart): Handle static tracepoints.
6133 (response_tracepoint): Handle static tracepoints.
6134 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6135 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6136 (get_context_regcache): Handle static tracepoints.
6137 (do_action_at_tracepoint): Handle static tracepoint actions.
6138 (traceframe_find_block_type): Handle static trace data blocks.
6139 (traceframe_read_sdata): New.
6140 (download_tracepoints): Download static tracepoint actions.
6141 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6142 (GDB_PROBE_NAME): New.
6143 (ust_ops): New.
6144 (GET_UST_SYM): New.
6145 (USTF): New.
6146 (dlsym_ust): New.
6147 (ust_marker_to_static_tracepoint): New.
6148 (gdb_probe): New.
6149 (collect_ust_data_at_tracepoint): New.
6150 (gdb_ust_probe): New.
6151 (UNIX_PATH_MAX, SOCK_DIR): New.
6152 (gdb_ust_connect_sync_socket): New.
6153 (resume_thread, stop_thread): New.
6154 (run_inferior_command): New.
6155 (init_named_socket): New.
6156 (gdb_ust_socket_init): New.
6157 (cstr_to_hexstr): New.
6158 (next_st): New.
6159 (first_marker, next_marker): New.
6160 (response_ust_marker): New.
6161 (cmd_qtfstm, cmd_qtsstm): New.
6162 (unprobe_marker_at, probe_marker_at): New.
6163 (cmd_qtstmat, gdb_ust_thread): New.
6164 (gdb_ust_init): New.
6165 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6166 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6167 (ST_REGENTRY): New.
6168 (x86_64_st_collect_regmap): New.
6169 (X86_64_NUM_ST_COLLECT_GREGS): New.
6170 (AMD64_RIP_REGNUM): New.
6171 (supply_static_tracepoint_registers): New.
6172 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6173 (ST_REGENTRY): New.
6174 (i386_st_collect_regmap): New.
6175 (i386_NUM_ST_COLLECT_GREGS): New.
6176 (supply_static_tracepoint_registers): New.
6177 * server.c (handle_query): Handle qXfer:statictrace:read.
6178 <qSupported>: Report support for StaticTracepoints, and
6179 qXfer:statictrace:read features.
6180 * server.h (traceframe_read_sdata)
6181 (supply_static_tracepoint_registers): Declare.
6182 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6183 (unpack_varlen_hex): Include in IPA build.
6184 * Makefile.in (ustlibs, ustinc): New.
6185 (IPA_OBJS): Add remote-utils-ipa.o.
6186 ($(IPA_LIB)): Link -ldl and -lpthread.
6187 (UST_CFLAGS): New.
6188 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6189 * config.in, configure: Regenerate.
6190
9e4344e5
PA
61912010-06-20 Ian Lance Taylor <iant@google.com>
6192 Pedro Alves <pedro@codesourcery.com>
6193
6194 * linux-x86-low.c (always_true): Delete.
6195 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6196 trying to fool the compiler with always_true.
6197
c6beb2cb
PA
61982010-06-20 Pedro Alves <pedro@codesourcery.com>
6199
6200 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6201 conditions in gdbserver.
6202
d2ed6730
UW
62032010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6204
6205 * spu-low.c (spu_read_memory): Wrap around local store limit.
6206 (spu_write_memory): Likewise.
6207
4e29fb54
PA
62082010-06-15 Pedro Alves <pedro@codesourcery.com>
6209
6210 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6211 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6212 LONGEST uses.
6213 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6214 uses.
6215 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6216 uses with LONGEST uses.
6217
6a271cae
PA
62182010-06-14 Stan Shebs <stan@codesourcery.com>
6219 Pedro Alves <pedro@codesourcery.com>
6220
6221 Bytecode compiler.
6222
6223 * linux-x86-low.c: Include limits.h.
6224 (add_insns): New.
6225 (always_true): New.
6226 (EMIT_ASM): New.
6227 (EMIT_ASM32): New.
6228 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6229 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6230 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6231 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6232 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6233 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6234 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6235 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6236 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6237 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6238 (amd64_emit_void_call_2): New.
6239 (amd64_emit_ops): New.
6240 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6241 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6242 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6243 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6244 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6245 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6246 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6247 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6248 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6249 (i386_emit_stack_adjust, i386_emit_int_call_1)
6250 (i386_emit_void_call_2): New.
6251 (i386_emit_ops): New.
6252 (x86_emit_ops): New.
6253 (the_low_target): Install x86_emit_ops.
6254 * server.h (struct emit_ops): New.
6255 (get_raw_reg_func_addr): Declare.
6256 (current_insn_ptr, emit_error): Declare.
6257 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6258 (set_trace_state_variable_value): New defines.
6259 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6260 addr_get_trace_state_variable_value and
6261 addr_set_trace_state_variable_value.
6262 (symbol_list): New fields for get_raw_reg,
6263 get_trace_state_variable_value and set_trace_state_variable_value.
6264 (condfn): New typedef.
6265 (struct tracepoint): New field `compiled_cond'.
6266 (do_action_at_tracepoint): Clear compiled_cond.
6267 (get_trace_state_variable_value, set_trace_state_variable_value):
6268 Export in the IPA.
6269 (condition_true_at_tracepoint): If there's a compiled condition,
6270 run that.
6271 (current_insn_ptr, emit_error): New globals.
6272 (struct bytecode_address): New.
6273 (get_raw_reg_func_addr): New.
6274 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6275 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6276 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6277 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6278 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6279 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6280 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6281 (compile_tracepoint_condition, compile_bytecodes): New.
6282 * target.h (emit_ops): Forward declare.
6283 (struct target_ops): New field emit_ops.
6284 (target_emit_ops): New.
6285 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6286 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6287 * linux-low.c (linux_emit_ops): New.
6288 (linux_target_ops): Install it.
6289 * linux-low.h (struct linux_target_ops): New field emit_ops.
6290
92b72907
UW
62912010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6292
6293 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6294 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6295
fa593d66
PA
62962010-06-01 Pedro Alves <pedro@codesourcery.com>
6297 Stan Shebs <stan@codesourcery.com>
6298
6299 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6300 (all): Depend on $(extra_libraries).
6301 (install-only): Install the IPA.
6302 (IPA_OBJS, IPA_LIB): New.
6303 (clean): Remove the IPA lib.
6304 (IPAGENT_CFLAGS): New.
6305 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6306 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6307 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6308 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6309 * configure.ac: Check for atomic builtins support in the compiler.
6310 (IPA_DEPFILES, extra_libraries): Define.
6311 * configure.srv (ipa_obj): Add description.
6312 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6313 (i[34567]86-*-linux*): Set ipa_obj.
6314 (x86_64-*-linux*): Set ipa_obj.
6315 * linux-low.c (stabilizing_threads): New.
6316 (supports_fast_tracepoints): New.
6317 (linux_detach): Stabilize threads before detaching.
6318 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6319 the lwp is either not stabilizing, or is moving out of a jump pad.
6320 (linux_fast_tracepoint_collecting): New.
6321 (maybe_move_out_of_jump_pad): New.
6322 (enqueue_one_deferred_signal): New.
6323 (dequeue_one_deferred_signal): New.
6324 (linux_wait_for_event_1): If moving out of a jump pad, defer
6325 pending signals to later.
6326 (linux_stabilize_threads): New.
6327 (linux_wait_1): Check if threads need moving out of jump pads, and
6328 do it if so.
6329 (stuck_in_jump_pad_callback): New.
6330 (move_out_of_jump_pad_callback): New.
6331 (lwp_running): New.
6332 (linux_resume_one_lwp): Handle moving out of jump pads.
6333 (linux_set_resume_request): Dequeue deferred signals.
6334 (need_step_over_p): Also step over fast tracepoint jumps.
6335 (start_step_over): Also uninsert fast tracepoint jumps.
6336 (finish_step_over): Also reinsert fast tracepoint jumps.
6337 (linux_install_fast_tracepoint_jump): New.
6338 (linux_target_ops): Install linux_stabilize_threads and
6339 linux_install_fast_tracepoint_jump_pad.
6340 * linux-low.h (linux_target_ops) <get_thread_area,
6341 install_fast_tracepoint_jump_pad>: New fields.
6342 (struct lwp_info) <collecting_fast_tracepoint,
6343 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6344 (linux_get_thread_area): Declare.
6345 * linux-x86-low.c (jump_insn): New.
6346 (x86_get_thread_area): New.
6347 (append_insns): New.
6348 (push_opcode): New.
6349 (amd64_install_fast_tracepoint_jump_pad): New.
6350 (i386_install_fast_tracepoint_jump_pad): New.
6351 (x86_install_fast_tracepoint_jump_pad): New.
6352 (the_low_target): Install x86_get_thread_area and
6353 x86_install_fast_tracepoint_jump_pad.
6354 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6355 (struct fast_tracepoint_jump): New.
6356 (fast_tracepoint_jump_insn): New.
6357 (fast_tracepoint_jump_shadow): New.
6358 (find_fast_tracepoint_jump_at): New.
6359 (fast_tracepoint_jump_here): New.
6360 (delete_fast_tracepoint_jump): New.
6361 (set_fast_tracepoint_jump): New.
6362 (uninsert_fast_tracepoint_jumps_at): New.
6363 (reinsert_fast_tracepoint_jumps_at): New.
6364 (set_breakpoint_at): Use write_inferior_memory.
6365 (uninsert_raw_breakpoint): Use write_inferior_memory.
6366 (check_mem_read): Mask out fast tracepoint jumps.
6367 (check_mem_write): Mask out fast tracepoint jumps.
6368 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6369 (set_fast_tracepoint_jump): Declare.
6370 (delete_fast_tracepoint_jump)
6371 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6372 (reinsert_fast_tracepoint_jumps_at): Declare.
6373 * regcache.c: Don't compile many functions when building the
6374 in-process agent library.
6375 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6376 the register buffer in the heap.
6377 (free_register_cache): If the register buffer isn't owned by the
6378 regcache, don't free it.
6379 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6380 pre-existing register caches.
6381 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6382 type.
6383 (convert_ascii_to_int): : Constify `from' parameter type.
6384 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6385 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6386 the needed buffer in-place.
6387 (relocate_instruction): New.
6388 * server.c (handle_query) <qSymbols>: If the target supports
6389 tracepoints, give it a chance of looking up symbols. Report
6390 support for fast tracepoints.
6391 (handle_status): Stabilize threads.
6392 (process_serial_event): Adjust.
6393 * server.h (struct fast_tracepoint_jump): Forward declare.
6394 (struct process_info) <fast_tracepoint_jumps>: New field.
6395 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6396 (decode_X_packet, decode_M_packet): Adjust.
6397 (relocate_instruction): Declare.
6398 (in_process_agent_loaded): Declare.
6399 (tracepoint_look_up_symbols): Declare.
6400 (struct fast_tpoint_collect_status): Declare.
6401 (fast_tracepoint_collecting): Declare.
6402 (force_unlock_trace_buffer): Declare.
6403 (handle_tracepoint_bkpts): Declare.
6404 (initialize_low_tracepoint)
6405 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6406 * target.h (struct target_ops) <stabilize_threads,
6407 install_fast_tracepoint_jump_pad>: New fields.
6408 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6409 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6410 [HAVE_STDINT_H]: Include stdint.h.
6411 (trace_debug_1): Rename to ...
6412 (trace_vdebug): ... this.
6413 (trace_debug): Rename to ...
6414 (trace_debug_1): ... this. Add `level' parameter.
6415 (trace_debug): New.
6416 (ATTR_USED, ATTR_NOINLINE): New.
6417 (IP_AGENT_EXPORT): New.
6418 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6419 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6420 (about_to_request_buffer_space, trace_buffer_is_full)
6421 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6422 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6423 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6424 (traceframe_write_count, traceframes_created)
6425 (trace_state_variables)
6426 New renaming defines.
6427 (struct ipa_sym_addresses): New.
6428 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6429 (symbol_list): New.
6430 (ipa_sym_addrs): New.
6431 (all_tracepoint_symbols_looked_up): New.
6432 (in_process_agent_loaded): New.
6433 (write_e_ipa_not_loaded): New.
6434 (maybe_write_ipa_not_loaded): New.
6435 (tracepoint_look_up_symbols): New.
6436 (debug_threads) [IN_PROCESS_AGENT]: New.
6437 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6438 (UNKNOWN_SIDE_EFFECTS): New.
6439 (stop_tracing): New.
6440 (flush_trace_buffer): New.
6441 (stop_tracing_bkpt): New.
6442 (flush_trace_buffer_bkpt): New.
6443 (read_inferior_integer): New.
6444 (read_inferior_uinteger): New.
6445 (read_inferior_data_pointer): New.
6446 (write_inferior_data_pointer): New.
6447 (write_inferior_integer): New.
6448 (write_inferior_uinteger): New.
6449 (struct collect_static_trace_data_action): Delete.
6450 (enum tracepoint_type): New.
6451 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6452 <actions_str, step_actions, step_actions_str>: Only include in
6453 GDBserver.
fa593d66
PA
6454 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6455 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6456 (tracepoints): Use IP_AGENT_EXPORT.
6457 (last_tracepoint): Don't include in the IPA.
6458 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6459 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6460 (alloced_trace_state_variables): New.
6461 (trace_state_variables): Use IP_AGENT_EXPORT.
6462 (traceframe_t): Delete unused variable.
6463 (circular_trace_buffer): Don't include in the IPA.
6464 (trace_buffer_start): Delete.
6465 (struct trace_buffer_control): New.
6466 (trace_buffer_free): Delete.
6467 (struct ipa_trace_buffer_control): New.
6468 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6469 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6470 New.
6471 (trace_buffer_ctrl): New.
6472 (TRACE_BUFFER_CTRL_CURR): New.
6473 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6474 Reimplement as macros.
6475 (trace_buffer_wrap): Delete.
6476 (traceframe_write_count, traceframe_read_count)
6477 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6478 (struct tracepoint_hit_ctx) <type>: New field.
6479 (struct fast_tracepoint_ctx): New.
6480 (memory_barrier): New.
6481 (cmpxchg): New.
6482 (record_tracepoint_error): Update atomically in the IPA.
6483 (clear_inferior_trace_buffer): New.
6484 (about_to_request_buffer_space): New.
6485 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6486 updating the same buffer.
6487 (add_tracepoint): Default the tracepoint's type to trap
6488 tracepoint, and orig_size to -1.
6489 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6490 internal variables.
6491 (create_trace_state_variable): New parameter `gdb'. Handle it.
6492 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6493 (cmd_qtdp): Handle fast tracepoints.
6494 (cmd_qtdv): Adjust.
6495 (max_jump_pad_size): New.
6496 (gdb_jump_pad_head): New.
6497 (get_jump_space_head): New.
6498 (claim_jump_space): New.
6499 (sort_tracepoints): New.
6500 (MAX_JUMP_SIZE): New.
6501 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6502 IPA.
6503 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6504 support. Upload fast traceframes, and delete internal IPA
6505 breakpoints.
6506 (stop_tracing_handler): New.
6507 (flush_trace_buffer_handler): New.
6508 (cmd_qtstop): Upload fast tracepoints.
6509 (response_tracepoint): Handle fast tracepoints.
6510 (tracepoint_finished_step): Upload fast traceframes. Set the
6511 tracepoint hit context's tracepoint type.
6512 (handle_tracepoint_bkpts): New.
6513 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6514 type. Add comment about fast tracepoints.
6515 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6516 non-existing action_str field.
6517 (get_context_regcache): Handle fast tracepoints.
6518 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6519 to the regcache.
6520 (fast_tracepoint_from_jump_pad_address): New.
6521 (fast_tracepoint_from_ipa_tpoint_address): New.
6522 (collecting_t): New.
6523 (force_unlock_trace_buffer): New.
6524 (fast_tracepoint_collecting): New.
6525 (collecting): New.
6526 (gdb_collect): New.
6527 (write_inferior_data_ptr): New.
6528 (target_tp_heap): New.
6529 (target_malloc): New.
6530 (download_agent_expr): New.
6531 (UALIGN): New.
6532 (download_tracepoints): New.
6533 (download_trace_state_variables): New.
6534 (upload_fast_traceframes): New.
6535 (IPA_FIRST_TRACEFRAME): New.
6536 (IPA_NEXT_TRACEFRAME_1): New.
6537 (IPA_NEXT_TRACEFRAME): New.
6538 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6539 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6540 (gdb_jump_pad_buffer_end): New.
6541 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6542 (initialize_tracepoint): Adjust.
6543 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6544 buffer. Initialize the low module.
6545 * utils.c (PREFIX, TOOLNAME): New.
6546 (malloc_failure): Use PREFIX.
6547 (error): In the IPA, an error causes an exit.
6548 (fatal, warning): Use PREFIX.
6549 (internal_error): Use TOOLNAME.
6550 (NUMCELLS): Increase to 10.
6551 * configure, config.in: Regenerate.
6552
d149dd1d
PA
65532010-06-01 Pedro Alves <pedro@codesourcery.com>
6554
6555 * server.c (handle_query) <qSupported>: Do two passes over the
6556 qSupported string to avoid nesting strtok.
6557
f6528abd
JK
65582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6559
6560 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6561 (CDEPS): New.
6562 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6563 -Wl,--dynamic-list.
6564 * configure: Regenerate.
6565 * proc-service.list: New.
6566
ca2a87a0
JK
65672010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6568
6569 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6570 New comment.
6571
363a6e9f
OS
65722010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6573
6574 * gdbreplay.c (remote_open): Check error return from socket() call by
6575 its equality to -1 not by it being negative.
6576 * remote-utils.c (remote_open): Likewise.
6577
d23b6cb1
PA
65782010-05-23 Pedro Alves <pedro@codesourcery.com>
6579
6580 * config.h: Regenerate.
6581
28d3cf85
MK
65822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6583
6584 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6585 doesn't provide PTRACE_GET_THREAD_AREA.
6586
fea36a59
MK
65872010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6588
6589 * linux-m68k-low.c: Include <asm/ptrace.h>
6590 (ps_get_thread_area): Implement.
6591
24b066ba
DE
65922010-05-03 Doug Evans <dje@google.com>
6593
6594 * event-loop.c (struct callback_event): New struct.
6595 (callback_list): New global.
6596 (append_callback_event, delete_callback_event): New functions.
6597 (process_callback): New function.
6598 (start_event_loop): Call it.
6599 * remote-utils.c (NOT_SCHEDULED): Define.
6600 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6601 moved out of readchar.
6602 (readchar): Rewrite. Call reschedule before returning.
6603 (reset_readchar): New function.
6604 (remote_close): Call it.
6605 (process_remaining, reschedule): New functions.
6606 * server.h (callback_handler_func): New typedef.
6607 (append_callback_event, delete_callback_event): Declare.
6608
9836d6ea
PA
66092010-05-03 Pedro Alves <pedro@codesourcery.com>
6610
6611 * proc-service.c (ps_pglobal_lookup): Use
6612 thread_db_look_up_one_symbol.
6613 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6614 parameter. Use it instead of all_symbols_looked_up.
6615 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6616 field.
6617 (all_symbols_looked_up): Don't declare.
6618 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6619 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6620 field.
6621 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6622 Set all_symbols_looked_up here.
6623 (thread_db_look_up_one_symbol): New.
6624 (thread_db_get_tls_address): Adjust.
6625 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6626 thread_db object on the heap, and tentatively set it in the
6627 process structure.
6628 (thread_db_init): Don't set all_symbols_looked_up here.
6629 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6630
7984d532
PA
66312010-05-03 Pedro Alves <pedro@codesourcery.com>
6632
6633 * linux-low.c (linux_kill, linux_detach): Adjust.
6634 (status_pending_p_callback): Remove redundant statement. Check
6635 for !TARGET_WAITIKIND_IGNORE, instead of
6636 TARGET_WAITKIND_STOPPED.
6637 (handle_tracepoints): Make sure LWP is locked. Adjust.
6638 (linux_wait_for_event_1): Adjust.
6639 (linux_cancel_breakpoints): New.
6640 (unsuspend_one_lwp): New.
6641 (unsuspend_all_lwps): New.
6642 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6643 (send_sigstop_callback): Change return type to int, add new
6644 `except' parameter and handle it.
6645 (suspend_and_send_sigstop_callback): New.
6646 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6647 pass them down. If SUSPEND, also increment the lwp's suspend
6648 count.
6649 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6650 (need_step_over_p): Don't consider suspended LWPs.
6651 (start_step_over): Adjust.
6652 (proceed_one_lwp): Change return type to int, add new `except'
6653 parameter and handle it.
6654 (unsuspend_and_proceed_one_lwp): New.
6655 (proceed_all_lwps): Use find_inferior instead of
6656 for_each_inferior.
6657 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6658 also decrement the suspend count of LWPs. Pass `except' down,
6659 instead of hacking its suspend count.
6660 (linux_pause_all): Add `freeze' parameter. Adjust.
6661 (linux_unpause_all): New.
6662 (linux_target_ops): Install linux_unpause_all.
6663 * server.c (handle_status): Adjust.
6664 * target.h (struct target_ops): New fields `unpause_all' and
6665 `cancel_breakpoints'. Add new parameter to `pause_all'.
6666 (pause_all): Add new `freeze' parameter.
6667 (unpause_all): New.
6668 (cancel_breakpoints): New.
6669 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6670 cancel breakpoints.
6671 (cmd_qtstart): Pause threads.
6672 (stop_tracing): Pause threads, and cancel breakpoints.
6673 * win32-low.c (win32_target_ops): Adjust.
6674
e471f25b
PA
66752010-05-03 Pedro Alves <pedro@codesourcery.com>
6676
6677 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6678 the inferior right away from here...
6679 (linux_wait_1): ... to here, and adjust to check the thread's
6680 last_resume_kind instead of the lwp's step or stop_expected flags.
6681
1915ef4f
PA
66822010-05-02 Pedro Alves <pedro@codesourcery.com>
6683
6684 * README: Use consistent `GDB' and `GDBserver' spellings.
6685
f9e39928
PA
66862010-05-02 Pedro Alves <pedro@codesourcery.com>
6687
6688 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6689 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6690 (linux_detach_one_lwp): Assume the lwp is stopped.
6691 (any_thread_of): Delete.
6692 (linux_detach): Stop all lwps here. Don't blindly delete all
6693 breakpoints.
6694 (delete_lwp_callback): New.
6695 (linux_mourn): Delete all lwps of the process that is gone.
6696 (linux_wait_1): Don't delete the last lwp of the process here.
6697 * mem-break.h (mark_breakpoints_out): Declare.
6698 * mem-break.c (mark_breakpoints_out): New.
6699 (free_all_breakpoints): Use it.
6700 * server.c (handle_target_event): If the process is gone, mark
6701 breakpoints out.
6702 * thread-db.c (struct thread_db) <create_bp>: New field.
6703 (thread_db_enable_reporting): Fix prototype. Store a thread event
6704 breakpoint reference in the thread_db struct.
6705 (thread_db_load_search): Clear the thread_db object.
6706 (try_thread_db_load_1): Ditto.
6707 (switch_to_process): New.
6708 (disable_thread_event_reporting): Use it.
6709 (remove_thread_event_breakpoints): New.
6710 (thread_db_detach, thread_db_mourn): Use it.
6711
1e7fc18c
PA
67122010-05-01 Pedro Alves <pedro@codesourcery.com>
6713
6714 * linux-low.c (linux_enable_event_reporting): New.
6715 (linux_wait_for_event_1, handle_extended_wait): Use it.
6716
02fc4de7
PA
67172010-04-30 Pedro Alves <pedro@codesourcery.com>
6718
6719 * linux-low.c (linux_kill_one_lwp, linux_kill)
6720 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6721 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6722 SIGSTOP even if the LWP is stopped.
6723 (send_sigstop_callback): New.
6724 (stop_all_lwps): Use send_sigstop_callback instead.
6725 (linux_resume_one_thread): Adjust.
6726 (proceed_one_lwp): Still proceed an LWP that the client has
6727 requested to stop, if we haven't reported it as stopped yet. Make
6728 sure that LWPs the client want stopped, have a pending SIGSTOP.
6729
bc3b5632
DE
67302010-04-26 Doug Evans <dje@google.com>
6731
ae1ada35
DE
6732 * server.c (handle_general_set): Make static.
6733
bc3b5632
DE
6734 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6735 Print received char after testing for error/eof instead of before.
6736 (input_interrupt): Tweak comment.
6737
65730243
DE
67382010-04-23 Doug Evans <dje@google.com>
6739
6740 * server.c (start_inferior): Print inferior argv if --debug.
6741
a8ae7dc0
AR
67422010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6743
6744 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6745 * nto-x86-low.c: Include server.h
6746
1c07cc19
PM
67472010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6748
6749 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6750 be consistent with other sources of this directory.
6751 (init_registers_amd64): Correct name of source file of this function
6752 in the comment.
6753
e0a61e09
PM
67542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6755
6756 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6757 64-bit executables.
6758
54709339
PM
67592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6760
6761 * win32-i386-low.c: Add 64-bit support.
6762 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6763 (init_registers_amd64): Declare.
6764 (mappings): Add 64-bit version of array.
6765 (init_windows_x86): New function.
6766 (the_low_target): Change init_arch field to init_windows_x86.
6767
e8f0053d
PM
67682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6769
6770 * win32-low.c: Adapt to support also 64-bit architecture.
6771 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6772 (get_image_name): Use SIZE_T type for local variable `done'.
6773 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6774 (toolhelp_get_dll_name): Idem.
6775 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6776 Use uintptr_t typecast to avoid warning.
6777 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6778 (handle_exception): Use phex_nz to avoid warning.
6779 (win32_wait): Remove unused local variable `process'.
6780
c481e77e
PM
67812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6782
6783 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6784 `amd64-avx.o'.
6785
12ea4b69
PM
67862010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6787
6788 * configure.ac: Use `ws2_32' library for srv_mingw.
6789 * configure: Regenerate.
6790 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6791 * remote-utils.c: Likewise.
6792
f6d1620c
L
67932010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6794
6795 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6796 if __x86_64__ is defined.
6797
8e642873
PM
67982010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6799
6800 * configure: Regenerate.
6801
711e434b
PM
68022010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6803
6804 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6805 * target.h (target_ops): New get_tib_address field.
6806 * win32-low.h (win32_thread_info): Add thread_local_base field.
6807 * win32-low.c (child_add_thread): Add tlb argument.
6808 Set thread_local_base field to TLB.
6809 (get_child_debug_event): Adapt to child_add_thread change.
6810 (win32_get_tib_address): New function.
6811 (win32_target_ops): Set get_tib_address field to
6812 win32_get_tib_address.
6813 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6814
505106cd
PA
68152010-04-12 Pedro Alves <pedro@codesourcery.com>
6816
505106cd
PA
6817 * linux-low.c (linux_mourn): Also remove the process.
6818 * server.c (handle_target_event): Don't remove the process here.
6819 * nto-low.c (nto_mourn): New.
6820 (nto_target_ops): Install it.
6821 * spu-low.c (spu_mourn): New.
6822 (spu_target_ops): Install it.
6823 * win32-low.c (win32_mourn): New.
6824 (win32_target_ops): Install it.
6825
e8470a06
PA
68262010-04-12 Pedro Alves <pedro@codesourcery.com>
6827
6828 * server.h (buffer_xml_printf): Remove redundant `;'.
6829
45ba0d02
PA
68302010-04-12 Pedro Alves <pedro@codesourcery.com>
6831
6832 * regcache.c (set_register_cache): Invalidate regcaches before
6833 changing the register cache layout.
6834 (regcache_invalidate_one): Allow a NULL regcache.
6835 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6836 regcaches before changing the register cache layout or the target
6837 regsets.
6838
59e04013
L
68392010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6840
6841 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6842 variable warning on Linux/x86-64.
6843
8336d594
PA
68442010-04-11 Pedro Alves <pedro@codesourcery.com>
6845
6846 GDBserver disconnected tracing support.
6847
6848 * linux-low.c (linux_remove_process): Delete.
6849 (add_lwp): Don't set last_resume_kind here.
6850 (linux_kill): Use `mourn'.
6851 (linux_detach): Use `thread_db_detach', and `mourn'.
6852 (linux_mourn): New.
6853 (linux_attach_lwp_1): Adjust comment.
6854 (linux_attach): last_resume_kind moved the thread_info; adjust.
6855 (status_pending_p_callback): Adjust.
6856 (linux_wait_for_event_1): Adjust.
6857 (count_events_callback, select_singlestep_lwp_callback)
6858 (select_event_lwp_callback, cancel_breakpoints_callback)
6859 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6860 (proceed_one_lwp): Adjust.
6861 (linux_async): Add debug output.
6862 (linux_thread_stopped): New.
6863 (linux_pause_all): New.
6864 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6865 linux_pause_all.
6866 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6867 (thread_db_free): Delete declaration.
6868 (thread_db_detach, thread_db_mourn): Declare.
6869 * thread-db.c (thread_db_init): Use thread_db_mourn.
6870 (thread_db_free): Delete, split in two.
6871 (disable_thread_event_reporting): New.
6872 (thread_db_detach): New.
6873 (thread_db_mourn): New.
6874
6875 * server.h (struct thread_info) <last_resume_kind>: New field.
6876 <attached>: Add comment.
6877 <gdb_detached>: New field.
6878 (handler_func): Change return type to int.
6879 (handle_serial_event, handle_target_event): Ditto.
6880 (gdb_connected): Declare.
6881 (tracing): Delete.
6882 (disconnected_tracing): Declare.
6883 (stop_tracing): Declare.
6884
6885 * server.c (handle_query) <qSupported>: Report support for
6886 disconnected tracing.
6887 (queue_stop_reply_callback): Account for running threads.
6888 (gdb_wants_thread_stopped): New.
6889 (gdb_wants_all_threads_stopped): New.
6890 (gdb_reattached_process): New.
6891 (handle_status): Clear the `gdb_detached' flag of all processes.
6892 In all-stop, stop all threads.
6893 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6894 (process_serial_event): If the remote connection breaks, or if an
6895 exit was forced with "monitor exit", force an event loop exit.
6896 Handle disconnected tracing on detach.
6897 (handle_serial_event): Adjust.
6898 (handle_target_event): If GDB isn't connected, forward events back
6899 to the inferior, unless the last process exited, in which case,
6900 exit gdbserver. Adjust interface.
6901
6902 * remote-utils.c (remote_open): Don't block in accept. Instead
6903 register an event loop source on the listen socket file
6904 descriptor. Refactor bits into ...
6905 (listen_desc): ... this new global.
6906 (gdb_connected): ... this new function.
6907 (enable_async_notification): ... this new function.
6908 (handle_accept_event): ... this new function.
6909 (remote_close): Clear remote_desc.
6910
6911 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6912
6913 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6914 New fields.
6915 (mourn_inferior): Define.
6916 (target_process_qsupported): Avoid the dangling else problem.
6917 (thread_stopped): Define.
6918 (pause_all): Define.
6919 (target_waitstatus_to_string): Declare.
6920 * target.c (target_waitstatus_to_string): New.
6921
6922 * tracepoint.c (tracing): Make extern.
6923 (disconnected_tracing): New.
6924 (stop_tracing): Make extern. Handle tracing stops due to GDB
6925 disconnecting.
6926 (cmd_qtdisconnected): New.
6927 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6928 (handle_tracepoint_general_set): Handle QTDisconnected.
6929
6930 * event-loop.c (event_handler_func): Change return type to int.
6931 (process_event): Bail out if the event handler wants the event
6932 loop to stop.
6933 (handle_file_event): Ditto.
6934 (start_event_loop): Bail out if the event handler wants the event
6935 loop to stop.
6936
6937 * nto-low.c (nto_target_ops): Adjust.
6938 * spu-low.c (spu_wait): Don't remove the process here.
6939 (spu_target_ops): Adjust.
6940 * win32-low.c (win32_wait): Don't remove the process here.
6941 (win32_target_ops): Adjust.
6942
5d267c4c
PA
69432010-04-11 Pedro Alves <pedro@codesourcery.com>
6944
6945 * regcache.c (realloc_register_cache): Invalidate inferior's
6946 regcache before recreating it.
6947
623ccd72
PA
69482010-04-09 Pedro Alves <pedro@codesourcery.com>
6949
6950 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6951
219f2f23
PA
69522010-04-09 Stan Shebs <stan@codesourcery.com>
6953 Pedro Alves <pedro@codesourcery.com>
6954
6955 * server.h (LONGEST): New.
6956 (struct thread_info) <while_stepping>: New field.
6957 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6958 Declare.
6959 (initialize_tracepoint, handle_tracepoint_general_set)
6960 (handle_tracepoint_query, tracepoint_finished_step)
6961 (tracepoint_was_hit, release_while_stepping_state_list):
6962 (current_traceframe): Declare.
6963 * server.c (handle_general_set): Handle tracepoint packets.
6964 (read_memory): New.
6965 (write_memory): New.
6966 (handle_search_memory_1): Use read_memory.
6967 (handle_query): Report support for conditional tracepoints, trace
6968 state variables, and tracepoint sources. Handle tracepoint
6969 queries.
6970 (main): Initialize the tracepoints module.
6971 (process_serial_event): Handle traceframe reads/writes.
6972
6973 * linux-low.c (handle_tracepoints): New.
6974 (linux_wait_1): Call it.
6975 (linux_resume_one_lwp): Handle while-stepping.
6976 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6977 (linux_target_ops): Install them.
6978 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6979 New field.
6980 * linux-x86-low.c (x86_supports_tracepoints): New.
6981 (the_low_target). Install it.
6982
6983 * mem-break.h (delete_breakpoint): Declare.
6984 * mem-break.c (delete_breakpoint): Make external.
6985
6986 * target.h (struct target_ops): Add `supports_tracepoints',
6987 `read_pc', and `write_pc' fields.
6988 (target_supports_tracepoints): Define.
6989 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6990 (phex_nz): New.
6991
6992 * regcache.h (struct regcache) <registers_owned>: New field.
6993 (init_register_cache, regcache_cpy): Declare.
6994 (regcache_read_pc, regcache_write_pc): Declare.
6995 (register_cache_size): Declare.
6996 (supply_regblock): Declare.
6997 * regcache.c (init_register_cache): New.
6998 (new_register_cache): Use it.
6999 (regcache_cpy): New.
7000 (register_cache_size): New.
7001 (supply_regblock): New.
7002 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7003
219f2f23
PA
7004 * tracepoint.c: New.
7005
7006 * Makefile.in (OBS): Add tracepoint.o.
7007 (tracepoint.o): New rule.
7008
3a13a53b
L
70092010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7010
7011 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7012 (i386-mmx.o): New.
7013 (i386-mmx.c): Likewise.
7014 (i386-mmx-linux.o): Likewise.
7015 (i386-mmx-linux.c): Likewise.
7016
7017 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7018 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7019 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7020 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7021
7022 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7023 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7024 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7025
1570b33e
L
70262010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7027
7028 * Makefile.in (clean): Updated.
7029 (i386-avx.o): New.
7030 (i386-avx.c): Likewise.
7031 (i386-avx-linux.o): Likewise.
7032 (i386-avx-linux.c): Likewise.
7033 (amd64-avx.o): Likewise.
7034 (amd64-avx.c): Likewise.
7035 (amd64-avx-linux.o): Likewise.
7036 (amd64-avx-linux.c): Likewise.
7037
7038 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7039 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7040 (srv_amd64_regobj): Add amd64-avx.o.
7041 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7042 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7043 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7044 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7045 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7046 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7047 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7048
7049 * i387-fp.c: Include "i386-xstate.h".
7050 (i387_xsave): New.
7051 (i387_cache_to_xsave): Likewise.
7052 (i387_xsave_to_cache): Likewise.
7053 (x86_xcr0): Likewise.
7054
7055 * i387-fp.h (i387_cache_to_xsave): Likewise.
7056 (i387_xsave_to_cache): Likewise.
7057 (x86_xcr0): Likewise.
7058
7059 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7060 * linux-crisv32-low.c (target_regsets): Likewise.
7061 * linux-m68k-low.c (target_regsets): Likewise.
7062 * linux-mips-low.c (target_regsets): Likewise.
7063 * linux-ppc-low.c (target_regsets): Likewise.
7064 * linux-s390-low.c (target_regsets): Likewise.
7065 * linux-sh-low.c (target_regsets): Likewise.
7066 * linux-sparc-low.c (target_regsets): Likewise.
7067 * linux-xtensa-low.c (target_regsets): Likewise.
7068
7069 * linux-low.c: Include <sys/uio.h>.
7070 (regsets_fetch_inferior_registers): Support nt_type.
7071 (regsets_store_inferior_registers): Likewise.
7072 (linux_process_qsupported): New.
7073 (linux_target_ops): Add linux_process_qsupported.
7074
7075 * linux-low.h (regset_info): Add nt_type.
7076 (linux_target_ops): Add process_qsupported.
7077
7078 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7079 and <sys/uio.h>.
7080 (init_registers_i386_avx_linux): New.
7081 (init_registers_amd64_avx_linux): Likewise.
7082 (xmltarget_i386_linux_no_xml): Likewise.
7083 (xmltarget_amd64_linux_no_xml): Likewise.
7084 (PTRACE_GETREGSET): Likewise.
7085 (PTRACE_SETREGSET): Likewise.
7086 (x86_fill_xstateregset): Likewise.
7087 (x86_store_xstateregset): Likewise.
7088 (use_xml): Likewise.
7089 (x86_linux_update_xmltarget): Likewise.
7090 (x86_linux_process_qsupported): Likewise.
7091 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7092 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7093 init_registers_i386_linux here. Call
7094 x86_linux_update_xmltarget.
7095 (the_low_target): Add x86_linux_process_qsupported.
7096
7097 * server.c (handle_query): Call target_process_qsupported.
7098
7099 * target.h (target_ops): Add process_qsupported.
7100 (target_process_qsupported): New.
7101
fc7238bb
PA
71022010-04-03 Pedro Alves <pedro@codesourcery.com>
7103
7104 * inferiors.c (add_thread): Set last_status kind to
7105 TARGET_WAITKIND_IGNORE.
7106 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7107 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7108 (linux_wait_1): Move `thread' local definition to block that uses
7109 it. Don't NULL initialize `event_child'.
7110 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7111 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7112 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7113
bdabb078
PA
71142010-04-01 Pedro Alves <pedro@codesourcery.com>
7115
7116 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7117 an extended waitstatus, or by a watchpoint.
7118 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7119 thread was stepping or has been stopped by a watchpoint.
7120
d3bbe7a0
PA
71212010-04-01 Pedro Alves <pedro@codesourcery.com>
7122
7123 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7124 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7125 of another, then delete the previous, and validate all
7126 breakpoints.
7127 (validate_inserted_breakpoint): New.
7128 (delete_disabled_breakpoints): New.
7129 (validate_breakpoints): New.
7130 (check_mem_read): Validate breakpoints before trusting their
7131 shadow. Delete disabled breakpoints.
7132 (check_mem_write): Validate breakpoints before trusting they
7133 should be inserted. Delete disabled breakpoints.
7134 * mem-break.h (validate_breakpoints):
7135 * server.c (handle_query): Validate breakpoints when we see a
7136 qSymbol query.
7137
8b07ae33
PA
71382010-04-01 Pedro Alves <pedro@codesourcery.com>
7139
7140 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7141 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7142 if we could tell there's a GDB breakpoint at stop_pc.
7143 (need_step_over_p): Don't do a step over if we find a GDB
7144 breakpoint at the resume PC.
7145
7146 * mem-break.c (struct raw_breakpoint): New.
7147 (enum bkpt_type): New type `gdb_breakpoint'.
7148 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7149 fields. New field `raw'.
7150 (find_raw_breakpoint_at): New.
7151 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7152 breakpoint instead.
7153 (set_breakpoint_at): Adjust.
7154 (delete_raw_breakpoint): New.
7155 (release_breakpoint): New.
7156 (delete_breakpoint): Rename to...
7157 (delete_breakpoint_1): ... this. Add proc parameter. Use
7158 release_breakpoint. Return ENOENT.
7159 (delete_breakpoint): Reimplement.
7160 (find_breakpoint_at): Delete.
7161 (find_gdb_breakpoint_at): New.
7162 (delete_breakpoint_at): Delete.
7163 (set_gdb_breakpoint_at): New.
7164 (delete_gdb_breakpoint_at): New.
7165 (gdb_breakpoint_here): New.
7166 (set_reinsert_breakpoint): Use release_breakpoint.
7167 (uninsert_breakpoint): Rename to ...
7168 (uninsert_raw_breakpoint): ... this.
7169 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7170 (reinsert_raw_breakpoint): Change parameter type to
7171 raw_breakpoint.
7172 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7173 instead.
7174 (check_breakpoints): Adjust. Use release_breakpoint.
7175 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7176 (breakpoint_inserted_here): Ditto.
7177 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7178 Don't trust the breakpoint's shadow if it is not inserted.
7179 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7180 (delete_all_breakpoints): Adjust.
7181 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7182 use delete_breakpoint_1.
7183
7184 * mem-break.h (breakpoints_supported): Delete declaration.
7185 (set_gdb_breakpoint_at): Declare.
7186 (gdb_breakpoint_here): Declare.
7187 (delete_breakpoint_at): Delete.
7188 (delete_gdb_breakpoint_at): Declare.
7189
7190 * server.h (struct raw_breakpoint): Forward declare.
7191 (struct process_info): New field `raw_breakpoints'.
7192
7193 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7194 breakpoints.
7195
6bf5e0ba
PA
71962010-03-24 Pedro Alves <pedro@codesourcery.com>
7197
7198 * linux-low.c (status_pending_p_callback): Fix comment.
7199 (linux_wait_for_event_1): Move most of the internal breakpoint
7200 handling from here...
7201 (linux_wait_1): ... to here.
7202 (count_events_callback): New.
7203 (select_singlestep_lwp_callback): New.
7204 (select_event_lwp_callback): New.
7205 (cancel_breakpoints_callback): New.
7206 (select_event_lwp): New.
7207 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7208 priority to all LWPs that have had events that should be reported
7209 to the client. Cancel breakpoints when about to reporting the
7210 event to the client, not while stopping lwps. No longer cancel
7211 finished single-steps here.
7212 (cancel_finished_single_step): Delete.
7213 (cancel_finished_single_steps): Delete.
7214
414a389f
PA
72152010-03-24 Pedro Alves <pedro@codesourcery.com>
7216
7217 * mem-break.c (enum bkpt_type): New.
7218 (struct breakpoint): New field `type'.
7219 (set_breakpoint_at): Change return type to struct breakpoint
7220 pointer. Set type to `other_breakpoint' by default.
7221 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7222 in the breakpoint list.
7223 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7224 (reinsert_breakpoint): Rename to ...
7225 (reinsert_raw_breakpoint): ... this.
7226 (reinsert_breakpoints_at): Adjust.
7227 * mem-break.h (struct breakpoint): Declare.
7228 (set_breakpoint_at): Change return type to struct breakpoint
7229 pointer.
7230
2280c721
PA
72312010-03-24 Pedro Alves <pedro@codesourcery.com>
7232
7233 * server.c (handle_query): Assign, not compare.
7234
d50171e4
PA
72352010-03-24 Pedro Alves <pedro@codesourcery.com>
7236
7237 Teach linux gdbserver to step-over-breakpoints.
7238
7239 * linux-low.c (can_hardware_single_step): New.
7240 (supports_breakpoints): New.
7241 (handle_extended_wait): If stopping threads, read the stop pc of
7242 the new cloned LWP.
7243 (get_pc): New.
7244 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7245 low target doesn't support retrieving the PC.
7246 (add_lwp): Set last_resume_kind to resume_continue.
7247 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7248 (linux_attach): Don't clear stop_expected. Set the lwp's
7249 last_resume_kind to resume_stop.
7250 (linux_detach_one_lwp): Don't check for removed breakpoints.
7251 (check_removed_breakpoint): Delete.
7252 (status_pending_p): Rename to ...
7253 (status_pending_p_callback): ... this. Don't check for removed
7254 breakpoints. Don't consider threads that are stopped from GDB's
7255 perspective.
7256 (linux_wait_for_lwp): Always read the stop_pc here.
7257 (cancel_breakpoint): New.
7258 (step_over_bkpt): New global.
7259 (linux_wait_for_event_1): Implement stepping over breakpoints.
7260 (gdb_wants_lwp_stopped): New.
7261 (gdb_wants_all_stopped): New.
7262 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7263 single-step traps here. Store the thread's last reported target
7264 wait status.
7265 (send_sigstop): Don't clear stop_expected. Always set it,
7266 instead.
7267 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7268 (cancel_finished_single_step): New.
7269 (cancel_finished_single_steps): New.
7270 (wait_for_sigstop): Don't cancel finished single-step traps here.
7271 (linux_resume_one_lwp): Don't check for removed breakpoints.
7272 Don't set `step' on non-hardware step archs.
7273 (linux_set_resume_request): Ignore resume_stop requests if already
7274 stopping or stopped. Set the lwp's last_resume_kind.
7275 (resume_status_pending_p): Don't check for removed breakpoints.
7276 (need_step_over_p): New.
7277 (start_step_over): New.
7278 (finish_step_over): New.
7279 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7280 requests. Clear the thread's last reported target waitstatus.
7281 Don't use the `suspended' flag. Don't consider pending breakpoints.
7282 (linux_resume): Start a step-over if necessary.
7283 (proceed_one_lwp): New.
7284 (proceed_all_lwps): New.
7285 (unstop_all_lwps): New.
7286 * linux-low.h (struct lwp_info): Rewrite comment for the
7287 `suspended' flag. Add the `stop_pc' field. Delete the
7288 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7289 Add `'last_resume_kind' and `need_step_over' fields.
7290 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7291 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7292 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7293 (set_raw_breakpoint_at): New.
7294 (set_breakpoint_at): Rewrite to use it.
7295 (reinsert_breakpoint_handler): Delete.
7296 (set_reinsert_breakpoint): New.
7297 (reinsert_breakpoint_by_bp): Delete.
7298 (delete_reinsert_breakpoints): New.
7299 (uninsert_breakpoint): Rewrite.
7300 (uninsert_breakpoints_at): New.
7301 (reinsert_breakpoint): Rewrite.
7302 (reinsert_breakpoints_at): New.
7303 (check_breakpoints): Rewrite.
7304 (breakpoint_here): New.
7305 (breakpoint_inserted_here): New.
7306 (check_mem_read): Adjust.
7307 * mem-break.h (breakpoints_supported, breakpoint_here)
7308 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7309 (reinsert_breakpoint_by_bp): Delete declaration.
7310 (delete_reinsert_breakpoints): Declare.
7311 (reinsert_breakpoint): Delete declaration.
7312 (reinsert_breakpoints_at): Declare.
7313 (uninsert_breakpoint): Delete declaration.
7314 (uninsert_breakpoints_at): Declare.
7315 (check_breakpoints): Adjust prototype.
7316 * server.h: Adjust include order.
7317 (struct thread_info): Declare here. Add a `last_status' field.
7318
30ba68cb
MS
73192010-03-23 Michael Snyder <msnyder@vmware.com>
7320
7321 * server.c (crc32): New function.
7322 (handle_query): Add handling for 'qCRC:' request.
7323
b9a881c2
PA
73242010-03-23 Pedro Alves <pedro@codesourcery.com>
7325
7326 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7327 lwp had been stopped by a watchpoint.
7328
e92d13d5
PA
73292010-03-16 Pedro Alves <pedro@codesourcery.com>
7330
7331 * server.h (internal_error): Declare.
7332 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7333 * utils.c (internal_error): New function.
7334
64daa791
AS
73352010-03-15 Andreas Schwab <schwab@redhat.com>
7336
7337 * configure.srv: Fix typo setting srv_regobj.
7338
f52cd8cd
PA
73392010-03-15 Pedro Alves <pedro@codesourcery.com>
7340
7341 * linux-low.c (fetch_register): Avoid passing a non string literal
7342 format to `error'.
7343 (usr_store_inferior_registers): Ditto.
7344
93ae6fdc
PA
73452010-03-14 Pedro Alves <pedro@codesourcery.com>
7346
7347 * linux-low.c (linux_write_memory): Bail out early if peeking
7348 memory failed.
7349
c3adc08c
PA
73502010-03-14 Pedro Alves <pedro@codesourcery.com>
7351
7352 * linux-low.h (struct lwp_info): New fields
7353 `stopped_by_watchpoint' and `stopped_data_address'.
7354 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7355 here, and cache them in the lwp object.
7356 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7357 directly.
7358 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7359 field.
7360 (linux_stopped_by_watchpoint): Rewrite.
7361 (linux_stopped_data_address): Rewrite.
7362
bce522a2
PA
73632010-03-06 Simo Melenius <simo.melenius@iki.fi>
7364
7365 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7366 switching the current inferior, not before.
7367
90884b2b
L
73682010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7369
7370 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7371 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7372 i386-linux.c and amd64-linux.c.
7373 (reg-i386.o): Removed.
7374 (reg-i386.c): Likewise.
7375 (reg-i386-linux.o): Likewise.
7376 (reg-i386-linux.c): Likewise.
7377 (reg-x86-64.o): Likewise.
7378 (reg-x86-64.c): Likewise.
7379 (reg-x86-64-linux.o): Likewise.
7380 (reg-x86-64-linux.c): Likewise.
7381 (i386.o): New.
7382 (i386.c): Likewise.
7383 (i386-linux.o): Likewise.
7384 (i386-linux.c): Likewise.
7385 (amd64.o): Likewise.
7386 (amd64.c): Likewise.
7387 (amd64-linux.o): Likewise.
7388 (amd64-linux.c): Likewise.
7389
7390 * configure.srv (srv_i386_regobj): New.
7391 (srv_i386_linux_regobj): Likewise.
7392 (srv_amd64_regobj): Likewise.
7393 (srv_amd64_linux_regobj): Likewise.
7394 (srv_i386_32bit_xmlfiles): Likewise.
7395 (srv_i386_64bit_xmlfiles): Likewise.
7396 (srv_i386_xmlfiles): Likewise.
7397 (srv_amd64_xmlfiles): Likewise.
7398 (srv_i386_linux_xmlfiles): Likewise.
7399 (srv_amd64_linux_xmlfiles): Likewise.
7400 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7401 srv_xmlfiles to $srv_i386_xmlfiles.
7402 (i[34567]86-*-mingw32ce*): Likewise.
7403 (i[34567]86-*-mingw*): Likewise.
7404 (i[34567]86-*-nto*): Likewise.
7405 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7406 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7407 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7408 (x86_64-*-linux*): Likewise.
7409
7410 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7411 (init_registers_amd64_linux): New.
7412 (x86_arch_setup): Replace init_registers_x86_64_linux with
7413 init_registers_amd64_linux.
7414
193f13e6
MK
74152010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7416
7417 * configure.ac: Check for libdl. If it is not available link against
7418 static libthread_db.
7419 * configure: Regenerate.
7420
85d721b8
PA
74212010-02-22 Pedro Alves <pedro@codesourcery.com>
7422
7423 PR9605
7424
7425 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7426 handing a read watchpoint.
7427 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7428
6076632b
DE
74292010-02-12 Doug Evans <dje@google.com>
7430
7431 * linux-low.c (linux_supports_tracefork_flag): Document.
7432 (linux_look_up_symbols): Add comment.
7433
3327ccf7
L
74342010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7435
7436 * regcache.c (supply_register): Clear regcache if buf is NULL.
7437
0718675c 74382010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7439 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7440
7441 * inferiors.c (find_inferior): Add function documentation.
7442 (unloaded_dll): Handle the case where the unloaded dll has not
7443 been previously registered in the dll list.
7444
177321bd
DJ
74452010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7446
7447 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7448 (thumb2_breakpoint): New.
7449 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7450
2b009048
DJ
74512010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7452
7453 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7454 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7455 breakpoints.
7456
3be029c7
PA
74572010-01-21 Pedro Alves <pedro@codesourcery.com>
7458
7459 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7460
18f5de3b
JK
74612010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7462
7463 * linux-s390-low.c (s390_collect_ptrace_register)
7464 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7465
3743bb4f
DE
74662010-01-21 Doug Evans <dje@google.com>
7467
14ce3065
DE
7468 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7469 (PTRACE_ARG4_TYPE): New macro.
7470 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7471 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7472 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7473 (usr_store_inferior_registers): Ditto.
7474 (linux_read_memory, linux_write_memory): Ditto.
7475 (linux_test_for_tracefork): Ditto.
7476
3743bb4f
DE
7477 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7478 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7479
8b315be5
PA
74802010-01-21 Pedro Alves <pedro@codesourcery.com>
7481
7482 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7483 target.
7484
85492558
PA
74852010-01-21 Pedro Alves <pedro@codesourcery.com>
7486
7487 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7488 prototype to take a regcache. Adjust.
7489
442ea881
PA
74902010-01-20 Pedro Alves <pedro@codesourcery.com>
7491
7492 * regcache.h (struct thread_info): Forward declare.
7493 (struct regcache): New.
7494 (new_register_cache): Adjust prototype.
7495 (get_thread_regcache): Declare.
7496 (free_register_cache): Adjust prototype.
7497 (registers_to_string, registers_from_string): Ditto.
7498 (supply_register, supply_register_by_name, collect_register)
7499 (collect_register_as_string, collect_register_by_name): Ditto.
7500 * regcache.c (struct inferior_regcache_data): Delete.
7501 (get_regcache): Rename to ...
7502 (get_thread_regcache): ... this. Adjust. Switch inferior before
7503 fetching registers.
7504 (regcache_invalidate_one): Adjust.
7505 (regcache_invalidate): Fix prototype.
7506 (new_register_cache): Return the new register cache.
7507 (free_register_cache): Change prototype.
7508 (realloc_register_cache): Adjust.
7509 (registers_to_string): Change prototype to take a regcache. Adjust.
7510 (registers_from_string): Ditto.
7511 (register_data): Ditto.
7512 (supply_register): Ditto.
7513 (supply_register_by_name): Ditto.
7514 (collect_register): Ditto.
7515 (collect_register_as_string): Ditto.
7516 (collect_register_by_name): Ditto.
7517 * server.c (process_serial_event): Adjust.
7518 * linux-low.h (regset_fill_func, regset_store_func): Change
7519 prototype.
7520 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7521 Change prototype.
7522 * linux-low.c (get_stop_pc): Adjust.
7523 (check_removed_breakpoint): Adjust.
7524 (linux_wait_for_event): Adjust.
7525 (linux_resume_one_lwp): Adjust.
7526 (fetch_register): Add regcache parameter. Adjust.
7527 (usr_store_inferior_registers): Ditto.
7528 (regsets_fetch_inferior_registers): Ditto.
7529 (regsets_store_inferior_registers): Ditto.
7530 (linux_fetch_registers, linux_store_registers): Ditto.
7531 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7532 regcache. Adjust.
43aaf8b6
PA
7533 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7534 Ditto.
442ea881
PA
7535 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7536 prototype to take a regcache.
7537 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7538 * remote-utils.c (convert_ascii_to_int, outreg)
7539 (prepare_resume_reply): Change prototype to take a regcache.
7540 Adjust.
7541 * target.h (struct target_ops) <fetch_registers, store_registers>:
7542 Change prototype to take a regcache.
7543 (fetch_inferior_registers, store_inferior_registers): Change
7544 prototype to take a regcache. Adjust.
7545 * proc-service.c (ps_lgetregs): Adjust.
7546 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7547 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7548 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7549 take a regcache. Adjust.
7550 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7551 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7552 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7553 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7554 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7555 (cris_cannot_fetch_register):
7556 (cris_breakpoint_at): Change prototype to take a regcache.
7557 Adjust.
7558 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7559 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7560 to take a regcache. Adjust.
7561 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7562 Adjust.
7563 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7564 take a regcache. Adjust.
7565 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7566 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7567 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7568 * linux-mips-low.c (mips_get_pc):
7569 (mips_set_pc): Change prototype to take a regcache. Adjust.
7570 (mips_reinsert_addr): Adjust.
7571 (mips_collect_register): Change prototype to take a regcache.
7572 Adjust.
7573 (mips_supply_register):
7574 (mips_collect_register_32bit, mips_supply_register_32bit)
7575 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7576 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7577 * linux-ppc-low.c (ppc_supply_ptrace_register)
7578 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7579 (parse_spufs_run): Adjust.
7580 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7581 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7582 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7583 take a regcache. Adjust.
7584 * linux-s390-low.c (s390_collect_ptrace_register)
7585 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7586 (s390_set_pc): Change prototype to take a regcache. Adjust.
7587 (s390_arch_setup): Adjust.
7588 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7589 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7590 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7591 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7592 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7593 regcache. Adjust.
7594 (sparc_breakpoint_at): Adjust.
7595 * linux-xtensa-low.c (xtensa_fill_gregset):
7596 (xtensa_store_gregset):
7597 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7598 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7599 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7600 prototype to take a regcache. Adjust.
7601 * win32-arm-low.c (arm_fetch_inferior_register)
7602 (arm_store_inferior_register): Change prototype to take a
7603 regcache. Adjust.
7604 * win32-i386-low.c (i386_fetch_inferior_register)
7605 (i386_store_inferior_register): Change prototype to take a
7606 regcache. Adjust.
7607 * win32-low.c (child_fetch_inferior_registers)
7608 (child_store_inferior_registers): Change prototype to take a
7609 regcache. Adjust.
7610 (win32_wait): Adjust.
7611 (win32_fetch_inferior_registers): Change prototype to take a
7612 regcache. Adjust.
7613 (win32_store_inferior_registers): Adjust.
7614 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7615 store_inferior_register>: Change prototype to take a regcache.
7616
60c3d7b0
DE
76172010-01-20 Doug Evans <dje@google.com>
7618
7619 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7620 #ifdef.
7621 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7622 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7623
dc146f7c
VP
76242010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7625
7626 * linux-low.c (linux_core_of_thread): New.
7627 (compare_ints, show_process, list_threads): New.
7628 (linux_qxfer_osdata): Report threads and cores.
7629 (linux_target_op): Register linux_core_of_thread.
7630 * remote-utils.c (prepare_resume_reply): Report the core.
7631 (buffer_xml_printf): Support %d specifier.
7632 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7633 New.
7634 (handle_query): Handle qXfer:threads. Announce availability
7635 thereof.
7636 * target.h (struct target_ops): New field core_of_thread.
7637
7803799a
UW
76382010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7639
7640 * Makefile.in (clean): Remove new generated files.
7641 (reg-s390.o, reg-s390.c): Remove rules.
7642 (reg-s390x.o, reg-s390x.c): Likewise.
7643 (s390-linux32.o, s390-linux32.c): Add rules.
7644 (s390-linux64.o, s390-linux64.c): Likewise.
7645 (s390x-linux64.o, s390x-linux64.c): Likewise.
7646 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7647 * linux-s390-low.c: Include <elf.h>.
7648 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7649 (init_registers_s390): Remove prototype.
7650 (init_registers_s390x): Likewise.
7651 (init_registers_s390_linux32): Add prototype.
7652 (init_registers_s390_linux64): Likewise.
7653 (init_registers_s390x_linux64): Likewise.
7654 (s390_num_regs_3264): New define.
7655 (s390_regmap_3264): New global variable.
7656 (s390_cannot_fetch_register): Remove obsolete check.
7657 (s390_cannot_store_register): Likewise.
7658 (s390_collect_ptrace_register): Handle upper/lower register halves.
7659 (s390_supply_ptrace_register): Likewise.
7660 (s390_fill_gregset): Update to register number changes.
7661 (s390_get_hwcap): New routine.
7662 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7663 Install appropriate regmap and register set.
7664
6e7ffa39
JB
76652010-01-01 Joel Brobecker <brobecker@adacore.com>
7666
7667 * server.c (gdbserver_version): Update copyright year to 2010.
7668 * gdbreplay.c (gdbreplay_version): Likewise.
7669
957f3f49
DE
76702009-12-28 Doug Evans <dje@google.com>
7671
7672 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7673 elf/external.h. Include <elf.h> instead but only if necessary.
7674
ca5c370d
PA
76752009-12-28 Pedro Alves <pedro@codesourcery.com>
7676
7677 * linux-low.c (linux_remove_process): Remove `detaching'
7678 parameter. Don't release/detach from thread_db here.
7679 (linux_kill): Release/detach from thread_db here, ...
7680 (linux_detach): ... and here, before actually detaching.
7681 (linux_wait_1): ... and here, when a process exits.
7682 * thread-db.c (any_thread_of): New.
7683 (thread_db_free): Switch the current inferior to a thread of the
7684 passed in process.
7685
4ee62156
DE
76862009-12-21 Doug Evans <dje@google.com>
7687
d90e6a88
DE
7688 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7689
c5f62d5f
DE
7690 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7691 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7692 warning ifndef __NR_tkill. Move setting of errno there too.
7693 Delete unnecessary resetting of errno after syscall.
7694 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7695
10e86dd7
DE
7696 * configure.ac: Check for dladdr.
7697 * config.in: Regenerate.
7698 * configure: Regenerate.
7699 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7700 (try_thread_db_load): Update.
7701
4ee62156
DE
7702 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7703
00f515da
DE
77042009-12-18 Doug Evans <dje@google.com>
7705
e9464885
DE
7706 * event-loop.c: Include unistd.h if it exists.
7707
07d4f67e
DE
7708 * linux-low.c (my_waitpid): Move definition away from being in
7709 between linux_tracefork_child/linux_test_for_tracefork.
7710
00f515da
DE
7711 * gdb_proc_service.h (psaddr_t): Fix type.
7712 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7713 signature to match glibc.
7714
1de1badb
DE
77152009-12-16 Doug Evans <dje@google.com>
7716
7717 * linux-low.c (linux_read_memory): Fix argument to read.
7718
aeeb81d1
PA
77192009-11-26 Pedro Alves <pedro@codesourcery.com>
7720
7721 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7722 events, don't leave current_inferior pointing at null.
7723
10357975
PA
77242009-11-26 Pedro Alves <pedro@codesourcery.com>
7725
7726 * win32-low.c (LOG): Delete.
7727 (OUTMSG): Output to stderr.
7728 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7729 on compile time LOG macro.
7730 (win32_wait): Fix debug output.
7731
cf6e3471
PA
77322009-11-26 Pedro Alves <pedro@codesourcery.com>
7733
7734 * win32-low.c (win32_add_one_solib): If the dll name is
7735 "ntdll.dll", prepend the system directory to the dll path.
7736
0c85e18e
MK
77372009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7738
7739 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7740
9ac544ce 77412009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7742 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7743
7744 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7745 * configure.ac: Check for __mcoldfire__ and set
7746 gdb_cv_m68k_is_coldfire.
7747 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7748 reg-cf.o and reg-m68k.o.
7749 * configure: Regenerated.
7750
fd7dd3e6
PA
77512009-11-16 Pedro Alves <pedro@codesourcery.com>
7752
7753 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7754 Pass it to thread_db_free.
7755 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7756 proper `detaching' argument to linux_remove_process.
7757 * linux-low.h (thread_db_free): Add `detaching' parameter.
7758 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7759 to thread_db_free.
7760 (thread_db_free): Add `detaching' parameter. Only
7761 call td_ta_clear_event if detaching from process.
7762
75aa492e
MK
77632009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7764
7765 * thread-db.c (thread_db_free): Fix typo.
7766
21e1bee4
PP
77672009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7768
7769 PR gdb/10838
7770 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7771
8838b45e
NS
77722009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7773
7774 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7775 with an i686 compiler.
7776 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7777 needed.
7778 * configure: Rebuilt.
7779
8a35fb51
SL
77802009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7781
7782 PR gdb/10783
7783
7784 * server.c (handle_search_memory_1): Correct read_addr initialization
7785 in loop for searching subsequent chunks.
7786
96f15937
PP
77872009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7788
7789 * configure.ac: New --with-libthread-db option.
7790 * thread-db.c: Allow direct dependence on libthread_db.
7791 (thread_db_free): Adjust.
7792 * config.in: Regenerate.
7793 * configure: Likewise.
889bf7c5 7794
5f7d1694
PP
77952009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7796
7797 PR gdb/10757
7798 * thread-db.c (attach_thread): New function.
7799 (maybe_attach_thread): Return success/failure.
7800 (find_new_threads_callback): Adjust.
889bf7c5
PA
7801 (thread_db_find_new_threads): Loop until no new threads.
7802
88e3b899
PA
78032009-10-13 Pedro Alves <pedro@codesourcery.com>
7804
7805 * proc-service.c (ps_lgetregs): Formatting.
7806
cdbfd419
PP
78072009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7808
7809 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7810 * configure.ac: Adjust.
7811 * linux-low.h (struct process_info_private): Move members to struct
7812 thread_db.
7813 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7814 * linux-low.c (linux_remove_process): Adjust.
7815 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7816 * server.c (handle_query): Move code ...
7817 (handle_monitor_command): ... here. New function.
7818 * target.h (struct target_ops): New member.
7819 * thread-db.c (struct thread_db): New.
7820 (libthread_db_search_path): New variable.
7821 (thread_db_create_event, thread_db_enable_reporting)
7822 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7823 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7824 (try_thread_db_load_1, dladdr_to_soname): New functions.
7825 (try_thread_db_load, thread_db_load_search): New functions.
7826 (thread_db_init): Search for libthread_db.
7827 (thread_db_free): New function.
7828 (thread_db_handle_monitor_command): Likewise.
7829 * config.in: Regenerate.
7830 * configure: Regenerate.
889bf7c5 7831
4168d2d6
UW
78322009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7833
7834 * spu-low.c (spu_kill): Wait for inferior to terminate.
7835 Call clear_inferiors.
7836 (spu_detach): Call clear_inferiors.
7837
81ecdfbb
RW
78382009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7839
7840 * aclocal.m4: Regenerate.
7841 * config.in: Likewise.
7842 * configure: Likewise.
7843
0b9ff2c0
UW
78442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7845
7846 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7847 (parse_spufs_run): New function.
7848 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7849 (ppc_breakpoint_at): Handle SPU breakpoints.
7850
efcbbd14
UW
78512009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7852
7853 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7854 (SPUFS_MAGIC): Define.
7855 (spu_enumerate_spu_ids): New function.
7856 (linux_qxfer_spu): New function.
7857 (linux_target_ops): Install linux_qxfer_spu.
7858
f4d9bade
UW
78592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7860
7861 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7862 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7863 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7864 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7865 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7866 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7867 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7868 (init_registers_powerpc_cell32l): Add prototype.
7869 (init_registers_powerpc_cell64l): Likewise.
7870 (ppc_arch_setup): Detect Cell/B.E. architecture.
7871
96e946ca
RW
78722009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7873
7874 * Makefile.in (datarootdir): New variable.
7875
58d6951d
DJ
78762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7877
7878 * linux-low.c (linux_write_memory): Update debugging output.
7879 * Makefile.in (clean): Add new descriptions.
7880 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7881 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7882 * configure.srv: Add new files for arm*-*-linux*.
7883 * linux-arm-low.c: Add new declarations.
7884 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7885 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7886 (HWCAP_VFPv3D16): New.
7887 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7888 instead of __IWMMXT__.
7889 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7890 (arm_arch_setup): New.
7891 (target_regsets): Remove #ifdef. Add VFP regset.
7892 (the_low_target): Use arm_arch_setup.
7893
12b42a12
DJ
78942009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7895
7896 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7897 the main thread again.
7898
ac8c974e
AR
78992009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7900
7901 Adding Neutrino gdbserver.
7902 * configure: Regenerated.
7903 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7904 * configure.srv (i[34567]86-*-nto*): New target.
7905 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7906 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7907 (nto_comctrl) [__QNX__]: New function.
7908 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7909
4424e0c3 79102009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7911
7912 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7913 srv_tgtobj.
7914
912cf4ba
PA
79152009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7916 Pedro Alves <pedro@codesourcery.com>
7917
7918 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7919 don't support CONTEXT_EXTENDED_REGISTERS.
7920 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7921 (the_low_target): Install them.
7922 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7923 failing with ERROR_PIPE_NOT_CONNECTED.
7924
aa5ca48f
DE
79252009-06-30 Doug Evans <dje@google.com>
7926 Pierre Muller <muller@ics.u-strasbg.fr>
7927
7928 Add h/w watchpoint support to x86-linux, win32-i386.
7929 * Makefile.in (SFILES): Add i386-low.c
7930 (i386_low_h): Define.
7931 (i386-low.o): Add dependencies.
7932 (linux-x86-low.o): Add i386-low.h dependency.
7933 (win32-i386-low.o): Ditto.
7934 * i386-low.c: New file.
7935 * i386-low.h: New file.
7936 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7937 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7938 * linux-low.c (linux_add_process): Initialize arch_private.
7939 (linux_remove_process): Free arch_private.
7940 (add_lwp): Initialize arch_private.
7941 (delete_lwp): Free arch_private.
7942 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7943 provided.
7944 * linux-low.h (process_info_private): New member arch_private.
7945 (lwp_info): New member arch_private.
7946 (linux_target_ops): New members new_process, new_thread,
7947 prepare_to_resume.
7948 (ptid_of): New macro.
7949 * linux-x86-low.c: Include stddef.h, i386-low.h.
7950 (arch_process_info): New struct.
7951 (arch_lwp_info): New struct.
7952 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7953 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7954 (i386_dr_low_get_status): New function.
7955 (x86_insert_point, x86_remove_point): New functions.
7956 (x86_stopped_by_watchpoint): New function.
7957 (x86_stopped_data_address): New function.
7958 (x86_linux_new_process, x86_linux_new_thread): New functions.
7959 (x86_linux_prepare_to_resume): New function.
7960 (the_low_target): Add entries for insert_point, remove_point,
7961 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7962 prepare_to_resume.
7963 * server.c (debug_hw_points): New global.
7964 (monitor_show_help): Document set debug-hw-points.
7965 (handle_query): Process "set debug-hw-points".
7966 * server.h (debug_hw_points): Declare.
7967 (paddress): Declare.
7968 * utils.c (NUMCELLS, CELLSIZE): New macros.
7969 (get_sell, xsnprintf, paddress): New functions.
7970 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7971 remove_point, stopped_by_watchpoint, stopped_data_address.
7972 * win32-i386-low.c: Include i386-low.h.
7973 (debug_reg_state): Replaces dr.
7974 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7975 (i386_dr_low_get_status): New function.
7976 (i386_insert_point, i386_remove_point): New functions.
7977 (i386_stopped_by_watchpoint): New function.
7978 (i386_stopped_data_address): New function.
7979 (i386_initial_stuff): Update.
7980 (get_thread_context,set_thread_context,i386_thread_added): Update.
7981 (the_low_target): Add entries for insert_point,
7982 remove_point, stopped_by_watchpoint, stopped_data_address.
7983 * win32-low.c (win32_insert_watchpoint): New function.
7984 (win32_remove_watchpoint): New function.
7985 (win32_stopped_by_watchpoint): New function.
7986 (win32_stopped_data_address): New function.
7987 (win32_target_ops): Add entries for insert_watchpoint,
7988 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7989 * win32-low.h (win32_target_ops): New members insert_point,
7990 remove_point, stopped_by_watchpoint, stopped_data_address.
7991
d993e290
PA
79922009-06-25 Pedro Alves <pedro@codesourcery.com>
7993
7994 * server.c (process_serial_event): Re-return unsupported, not
7995 error, if the type isn't recognized. Re-allow supporting only
7996 insert or remove packets. Also call require_running for
7997 breakpoints. Add missing break statement to default case. Tidy.
7998 * target.h (struct target_ops): Rename insert_watchpoint to
7999 insert_point, and remove_watchpoint to remove_point.
8000
8001 * linux-low.h (struct linux_target_ops): Likewise.
8002 * linux-low.c (linux_insert_watchpoint): Rename to ...
8003 (linux_insert_point): ... this. Adjust.
8004 (linux_remove_watchpoint): Rename to ...
8005 (linux_remove_point): ... this. Adjust.
8006 (linux_target_ops): Adjust.
8007 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8008 (cris_insert_point): ... this.
8009 (cris_remove_watchpoint): Rename to ...
8010 (cris_remove_point): ... this.
8011 (the_low_target): Adjust.
8012
0f54c268
PM
80132009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8014
8015 * server.c (handle_v_kill): Pass signal_pid to
8016 kill_inferior if multi_process is zero.
8017
c6314022
AR
80182009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8019
8020 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8021 * target.h (target_ops): Comment for *_watchpoint to make it clear
8022 the functions can get types '0' and '1'.
8023
4463ce24
AR
80242009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8025
8026 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8027 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8028 * regcache.c (get_regcache): Likewise.
8029 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8030 * win32-low.c (child_fetch_inferior_registers): Remove check for
8031 regno 0.
8032
cf8fd78b
PA
80332009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8034 Pedro Alves <pedro@codesourcery.com>
8035
8036 * target.h (struct target_ops) <supports_multi_process>: New
8037 callback.
8038 (target_supports_multi_process): New.
8039 * server.c (handle_query): Even if GDB reports support, only
8040 enable multi-process if the target also supports it. Report
8041 multi-process support only if the target backend supports it.
8042 * linux-low.c (linux_supports_multi_process): New function.
8043 (linux_target_ops): Install it as target_supports_multi_process
8044 callback.
8045
47c0c975
DE
80462009-05-24 Doug Evans <dje@google.com>
8047
e09875d4
DE
8048 Global renaming of find_thread_pid to find_thread_ptid.
8049 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8050 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8051 All callers updated.
8052
e27d73f6
DE
8053 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8054 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8055 directly.
8056
47c0c975
DE
8057 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8058 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8059 (linux_resume_one_lwp): Ditto.
8060
2acc282a
DE
80612009-05-23 Doug Evans <dje@google.com>
8062
8063 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8064 from struct inferior_list_entry * to struct lwp_info *.
8065 All callers updated.
8066
9f1036c1
DE
80672009-05-13 Doug Evans <dje@google.com>
8068
8069 * linux-x86-low.c: Don't include assert.h.
8070 (x86_siginfo_fixup): Use fatal, not assert.
8071 (x86_arch_setup): Fix comment.
8072
d0722149
DE
80732009-05-12 Doug Evans <dje@google.com>
8074
8075 Biarch support for i386/amd64 gdbserver.
8076 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8077 Add linux-x86-low.c.
8078 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8079 (linux-x86-low.o): Add.
8080 * linux-x86-64-low.c: Delete.
8081 * linux-i386-low.c: Delete.
8082 * linux-x86-low.c: New file.
8083 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8084 linux-x86-low.o.
8085 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8086 linux-x86-low.o.
8087 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8088 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8089 (linux_child_pid_to_exec_file): New function.
8090 (elf_64_header_p, elf_64_file_p): New functions.
8091 (siginfo_fixup): New function.
8092 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8093 give target a chance to convert layout.
8094 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8095 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8096
fdeb2a12
DE
80972009-05-07 Doug Evans <dje@google.com>
8098
8099 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8100 (regsets_store_inferior_registers): Ditto.
8101
a6dbe5df
PA
81022009-05-06 Pedro Alves <pedro@codesourcery.com>
8103
8104 PR server/10048
8105
8106 * linux-low.c (must_set_ptrace_flags): Delete.
8107 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8108 of the global.
8109 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8110 `lwp->must_set_ptrace_flags' instead.
ba42693b 8111 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8112 (linux_wait_1): ... not here.
8113
5091eb23
DE
81142009-04-30 Doug Evans <dje@google.com>
8115
9f767825
DE
8116 * inferiors.c (started_inferior_callback): New function.
8117 (attached_inferior_callback): New function.
8118 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8119 * server.c (print_started_pid, print_attached_pid): New functions.
8120 (detach_or_kill_for_exit): New function.
8121 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8122 * server.h (have_started_inferiors_p): Declare.
8123 (have_attached_inferiors_p): Declare.
8124
5091eb23
DE
8125 * inferiors.c (remove_process): Fix memory leak, free process.
8126 * linux-low.c (linux_remove_process): New function.
8127 (linux_kill): Call it instead of remove_process.
8128 (linux_detach, linux_wait_1): Ditto.
8129
155c8968
PA
81302009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8131
8132 * configure.srv: Add x86 Windows CE target.
8133
7fe519cb
UW
81342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8135
8136 * inferiors.c (get_thread_process): Make global.
8137 * server.h (get_thread_process): Add prototype.
8138 * thread-db.c (find_one_thread): Use get_thread_process
8139 instead of current_process.
8140 (thread_db_get_tls_address): Do not crash if called when
8141 thread layer is not yet initialized.
8142
5472f405
UW
81432009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8144
8145 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8146 * spu-low.c (current_tid): Rename to ...
8147 (current_ptid): ... this.
8148 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8149 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8150 ptid_get_lwp (current_ptid) instead of current_tid.
8151 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8152 instead of current_tid. Use find_process_pid to verify pid
8153 argument is valid. Pass proper argument to remove_process.
8154 (spu_thread_alive): Compare current_ptid instead of current_tid.
8155 (spu_resume): Likewise.
8156
55ac2b99
PA
81572009-04-02 Pedro Alves <pedro@codesourcery.com>
8158
8159 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8160 variable.
8161
95954743
PA
81622009-04-01 Pedro Alves <pedro@codesourcery.com>
8163
8164 Implement the multiprocess extensions, and add linux multiprocess
8165 support.
8166
8167 * server.h (ULONGEST): Declare.
8168 (struct ptid, ptid_t): New.
8169 (minus_one_ptid, null_ptid): Declare.
8170 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8171 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8172 (struct inferior_list_entry): Change `id' type from unsigned from
8173 to ptid_t.
8174 (struct sym_cache, struct breakpoint, struct
8175 process_info_private): Forward declare.
8176 (struct process_info): Declare.
8177 (current_process): Declare.
8178 (all_processes): Declare.
8179 (initialize_inferiors): Declare.
8180 (add_thread): Adjust to use ptid_t.
8181 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8182 (add_process, remove_process, find_thread_pid): Declare.
8183 (find_inferior_id): Adjust to use ptid_t.
8184 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8185 (multi_process): Declare.
8186 (push_event): Adjust to use ptid_t.
8187 (read_ptid, write_ptid): Declare.
8188 (prepare_resume_reply): Adjust to use ptid_t.
8189 (clear_symbol_cache): Declare.
8190 * inferiors.c (all_processes): New.
8191 (null_ptid, minus_one_ptid): New.
8192 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8193 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8194 (add_thread): Change unsigned long to ptid. Remove gdb_id
8195 parameter. Adjust.
8196 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8197 (gdb_id_to_thread): Rename to ...
8198 (find_thread_pid): ... this. Change unsigned long to ptid.
8199 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8200 (loaded_dll, pull_pid_from_list): Adjust.
8201 (add_process, remove_process, find_process_pid)
8202 (get_thread_process, current_process, initialize_inferiors): New.
8203 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8204 (struct target_waitstatus) <related_pid>: Ditto.
8205 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8206 return type to int.
8207 (struct target_ops) <join>: Add `pid' argument.
8208 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8209 (struct target_ops) <wait>: Add `ptid' field. Change return type
8210 to ptid.
8211 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8212 (mywait): Add `ptid' argument. Change return type to ptid_t.
8213 (target_pid_to_str): Declare.
8214 * target.c (set_desired_inferior): Adjust to use ptids.
8215 (mywait): Add new `ptid' argument. Adjust.
8216 (target_pid_to_str): New.
8217 * mem-break.h (free_all_breakpoints): Declare.
8218 * mem-break.c (breakpoints): Delelete.
8219 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8220 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8221 to use per-process breakpoint list.
8222 (free_all_breakpoints): New.
8223 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8224 (symbol_cache, all_symbols_looked_up): Delete.
8225 (hexchars): New.
8226 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8227 read_ptid): New.
8228 (prepare_resume_reply): Change ptid argument's type from unsigned
8229 long to ptid_t. Adjust. Implement W;process and X;process.
8230 (free_sym_cache, clear_symbol_cache): New.
8231 (look_up_one_symbol): Adjust to per-process symbol cache. *
8232 * server.c (cont_thread, general_thread, step_thread): Change type
8233 to ptid_t.
8234 (attached): Delete.
8235 (multi_process): New.
8236 (last_ptid): Change type to ptid_t.
8237 (struct vstop_notif) <ptid>: Change type to ptid_t.
8238 (queue_stop_reply, push_event): Change `ptid' argument's type to
8239 ptid_t.
8240 (discard_queued_stop_replies): Add `pid' argument.
8241 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8242 changes. Don't reference the `attached' global.
8243 (attach_inferior): Adjust to mywait interface changes.
8244 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8245 features. Handle and report "multiprocess+". Handle
8246 "qAttached:PID".
8247 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8248 changes.
8249 (handle_v_kill): New.
8250 (handle_v_stopped): Adjust to use target_pid_to_str.
8251 (handle_v_requests): Allow multiple attaches and runs when
8252 multiprocess extensions are in effect. Handle "vKill".
8253 (myresume): Adjust to use ptids.
8254 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8255 (handle_status): Adjust to discard_queued_stop_replies interface
8256 change.
8257 (first_thread_of, kill_inferior_callback)
8258 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8259 (main): Call initialize_inferiors. Adjust to use ptids, killing
8260 and detaching from all inferiors. Handle multiprocess packet
8261 variants.
8262 * linux-low.h: Include gdb_proc_service.h.
8263 (struct process_info_private): New.
8264 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8265 <lwpid_of>: Use ptid_get_lwp.
8266 (get_lwp_thread): Adjust.
8267 (struct lwp_info): Add `dead' member.
8268 (find_lwp_pid): Declare.
8269 * linux-low.c (thread_db_active): Delete.
8270 (new_inferior): Adjust comment.
8271 (inferior_pid): Delete.
8272 (linux_add_process): New.
8273 (handle_extended_wait): Adjust.
8274 (add_lwp): Change unsigned long to ptid.
8275 (linux_create_inferior): Add process to processes table. Adjust
8276 to use ptids. Don't set new_inferior here.
8277 (linux_attach_lwp): Rename to ...
8278 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8279 it. Adjust to use ptids.
8280 (linux_attach_lwp): New.
8281 (linux_attach): Add process to processes table. Don't set
8282 new_inferior here.
8283 (struct counter): New.
8284 (second_thread_of_pid_p, last_thread_of_process_p): New.
8285 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8286 multiple processes.
8287 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8288 processes. Remove process from process table.
8289 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8290 to multiple processes.
8291 (any_thread_of): New.
8292 (linux_detach): Add `pid' argument, and handle it. Remove process
8293 from processes table.
8294 (linux_join): Add `pid' argument. Handle it.
8295 (linux_thread_alive): Change unsighed long argument to ptid_t.
8296 Consider dead lwps as not being alive.
8297 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8298 threads we're not interested in.
8299 (same_lwp, find_lwp_pid): New.
8300 (linux_wait_for_lwp): Change `pid' argument's type from int to
8301 ptid_t. Adjust.
8302 (linux_wait_for_event): Rename to ...
8303 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8304 from int to ptid_t. Adjust.
8305 (linux_wait_for_event): New.
8306 (linux_wait_1): Add `ptid' argument. Change return type to
8307 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8308 that exit from the process table.
8309 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8310 Adjust.
8311 (mark_lwp_dead): New.
8312 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8313 stopping all threads, mark its main lwp as dead.
8314 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8315 ptids.
8316 (fetch_register, usr_store_inferior_registers)
8317 (regsets_fetch_inferior_registers)
8318 (regsets_store_inferior_registers, linux_read_memory)
8319 (linux_write_memory): Inline `inferior_pid'.
8320 (linux_look_up_symbols): Adjust to use per-process
8321 `thread_db_active'.
8322 (linux_request_interrupt): Adjust to use ptids.
8323 (linux_read_auxv): Inline `inferior_pid'.
8324 (initialize_low): Don't reference thread_db_active.
8325 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8326 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8327 (ps_getpid): Return the pid of the current inferior.
8328 * thread-db.c (proc_handle, thread_agent): Delete.
8329 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8330 per-process data.
8331 (find_one_thread): Change argument type to ptid_t. Adjust to
8332 per-process data.
8333 (maybe_attach_thread): Adjust to per-process data and ptids.
8334 (thread_db_find_new_threads): Ditto.
8335 (thread_db_init): Ditto.
8336 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8337 processes table. Adjust to use ptids.
8338 (spu_kill, spu_detach): Adjust interface. Remove process from
8339 processes table.
8340 (spu_join, spu_thread_alive): Adjust interface.
8341 (spu_wait): Adjust interface. Remove process from processes
8342 table. Adjust to use ptids.
8343 * win32-low.c (current_inferior_tid): Delete.
8344 (current_inferior_ptid): New.
8345 (debug_event_ptid): New.
8346 (thread_rec): Take a ptid. Adjust.
8347 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8348 (child_delete_thread): Ditto.
8349 (do_initial_child_stuff): Add `attached' argument. Add process to
8350 processes table.
8351 (child_fetch_inferior_registers, child_store_inferior_registers):
8352 Adjust.
8353 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8354 (win32_attach): Pass 1 to do_initial_child_stuff.
8355 (win32_kill): Adjust interface. Remove process from processes
8356 table.
8357 (win32_detach): Ditto.
8358 (win32_join): Adjust interface.
8359 (win32_thread_alive): Take a ptid.
8360 (win32_resume): Adjust to use ptids.
8361 (get_child_debug_event): Ditto.
8362 (win32_wait): Adjust interface. Remove exiting process from
8363 processes table.
8364
bd99dc85
PA
83652009-04-01 Pedro Alves <pedro@codesourcery.com>
8366
8367 Non-stop mode support.
8368
8369 * server.h (non_stop): Declare.
8370 (gdb_client_data, handler_func): Declare.
8371 (delete_file_handler, add_file_handler, start_event_loop):
8372 Declare.
8373 (handle_serial_event, handle_target_event, push_event)
8374 (putpkt_notif): Declare.
8375 * target.h (enum resume_kind): New.
8376 (struct thread_resume): Replace `step' field by `kind' field.
8377 (TARGET_WNOHANG): Define.
8378 (struct target_ops) <wait>: Add `options' argument.
8379 <supports_non_stop, async, start_non_stop>: New fields.
8380 (target_supports_non_stop, target_async): New.
8381 (start_non_stop): Declare.
8382 (mywait): Add `options' argument.
8383 * target.c (mywait): Add `options' argument. Print child exit
8384 notifications here.
8385 (start_non_stop): New.
8386 * server.c (non_stop, own_buf, mem_buf): New globals.
8387 (struct vstop_notif): New.
8388 (notif_queue): New global.
8389 (queue_stop_reply, push_event, discard_queued_stop_replies)
8390 (send_next_stop_reply): New.
8391 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8392 interface changes.
8393 (attach_inferior): In non-stop mode, don't wait for the target
8394 here.
8395 (handle_general_set): Handle QNonStop.
8396 (handle_query): When handling qC, return the current general
8397 thread, instead of the first thread of the list.
8398 (handle_query): If the backend supports non-stop mode, include
8399 QNonStop+ in the qSupported query response.
8400 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8401 and non-stop mode.
8402 (handle_v_attach, handle_v_run): Handle non-stop mode.
8403 (handle_v_stopped): New.
8404 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8405 (myresume): Adjust to use resume_kind. Handle non-stop.
8406 (queue_stop_reply_callback): New.
8407 (handle_status): Handle non-stop mode.
8408 (main): Clear non_stop flag on reconnection. Use the event-loop.
8409 Refactor serial protocol handling from here ...
8410 (process_serial_event): ... to this new function. When GDB
8411 selects any thread, select one here. In non-stop mode, wait until
8412 GDB acks all pending events before exiting.
8413 (handle_serial_event, handle_target_event): New.
8414 * remote-utils.c (remote_open): Install remote_desc in the event
8415 loop.
8416 (remote_close): Remove remote_desc from the event loop.
8417 (putpkt_binary): Rename to...
8418 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8419 (putpkt_binary): New as wrapper around putpkt_binary_1.
8420 (putpkt_notif): New.
8421 (prepare_resume_reply): In non-stop mode, don't change the
8422 general_thread.
8423 * event-loop.c: New.
8424 * Makefile.in (OBJ): Add event-loop.o.
8425 (event-loop.o): New rule.
8426
8427 * linux-low.h (pid_of): Moved here.
8428 (lwpid_of): New.
8429 (get_lwp_thread): Use lwpid_of.
8430 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8431 * linux-low.c (pid_of): Delete.
8432 (inferior_pid): Use lwpid_of.
8433 (linux_event_pipe): New.
8434 (target_is_async_p): New.
8435 (delete_lwp): New.
8436 (handle_extended_wait): Use lwpid_of.
8437 (add_lwp): Don't set lwpid field.
8438 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8439 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8440 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8441 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8442 first. Adjust to linux_wait_for_event interface changes. Use
8443 lwpid_of.
8444 (linux_detach): Don't delete the main lwp here.
8445 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8446 (status_pending_p): Don't consider explicitly suspended lwps.
8447 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8448 pointer. Add OPTIONS argument. Change return type to int. Use
8449 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8450 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8451 pointer. Add status pointer argument. Return a pid instead of a
8452 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8453 changes. In non-stop mode, don't switch to a random thread.
8454 (linux_wait): Rename to...
8455 (linux_wait_1): ... this. Add target_options argument, and handle
8456 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8457 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8458 clean exit and signal exit code. Don't stop all threads in
8459 non-stop mode. In all-stop mode, only stop all threads when
8460 reporting a stop to GDB. Handle explicit thread stop requests.
8461 (async_file_flush, async_file_mark): New.
8462 (linux_wait): New.
8463 (send_sigstop): Use lwpid_of.
8464 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8465 interface changes. In non-stop mode, don't switch to a random
8466 thread.
8467 (linux_resume_one_lwp): Use lwpid_of.
8468 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8469 (linux_resume_one_thread): ... this. Handle resume_stop. In
8470 non-stop mode, don't look for pending flag in all threads.
8471 (resume_status_pending_p): Don't consider explicitly suspended
8472 threads.
8473 (my_waitpid): Reimplement. Emulate __WALL.
8474 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8475 Use lwpid_of.
8476 (sigchld_handler, linux_supports_non_stop, linux_async)
8477 (linux_start_non_stop): New.
8478 (linux_target_ops): Register linux_supports_non_stop, linux_async
8479 and linux_start_non_stop.
8480 (initialize_low): Install SIGCHLD handler.
8481 * thread-db.c (thread_db_create_event, find_one_thread)
8482 (thread_db_get_tls_address): Use lwpid_of.
8483 * win32-low.c (win32_detach): Adjust to use resume_kind.
8484 (win32_wait): Add `options' argument.
8485 * spu-low.c (spu_resume): Adjust to use resume_kind.
8486 (spu_wait): Add `options' argument.
8487
5b1c542e
PA
84882009-04-01 Pedro Alves <pedro@codesourcery.com>
8489
8490 Decouple target code from remote protocol.
8491
8492 * target.h (enum target_waitkind): New.
8493 (struct target_waitstatus): New.
8494 (struct target_ops) <wait>: Return an unsigned long. Take a
8495 target_waitstatus pointer instead of a char pointer.
8496 (mywait): Likewise.
8497 * target.c (mywait): Change prototype to return an unsigned long.
8498 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8499 * server.h (thread_from_wait, old_thread_from_wait): Delete
8500 declarations.
8501 (prepare_resume_reply): Change prototype to take a
8502 target_waitstatus.
8503 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8504 (last_status, last_ptid): New.
8505 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8506 pid instead of a signal.
8507 (attach_inferior): Remove "status" and "signal" parameters.
8508 Adjust.
8509 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8510 not as an address.
8511 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8512 (handle_v_requests, myresume): Remove "status" and "signal"
8513 parameters. Adjust.
8514 (handle_status): New.
8515 (main): Delete local `status'. Adjust.
8516 * remote-utils.c: Include target.h.
8517 (prepare_resume_reply): Change prototype to take a
8518 target_waitstatus. Adjust.
8519
8520 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8521 interface.
8522 * spu-low.c (spu_wait): Adjust.
8523 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8524 Delete.
8525 (win32_wait): Adjust.
8526
2bd7c093
PA
85272009-04-01 Pedro Alves <pedro@codesourcery.com>
8528
8529 * target.h (struct thread_resume): Delete leave_stopped member.
8530 (struct target_ops): Add a `n' argument to the `resume' callback.
8531 * server.c (start_inferior): Adjust.
8532 (handle_v_cont, myresume): Adjust.
8533 * linux-low.c (check_removed_breakpoint): Adjust to resume
8534 interface change, and to removed leave_stopped field.
8535 (resume_ptr): Delete.
8536 (struct thread_resume_array): New.
8537 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8538 resume interface change.
8539 (linux_continue_one_thread, linux_queue_one_thread)
8540 (resume_status_pending_p): Check if the resume field is NULL
8541 instead of checking the leave_stopped member.
8542 (linux_resume): Adjust to the target resume interface change.
8543 * spu-low.c (spu_resume): Adjust to the target resume interface
8544 change.
8545 * win32-low.c (win32_detach, win32_resume): Ditto.
8546
c35fafde
PA
85472009-04-01 Pedro Alves <pedro@codesourcery.com>
8548
8549 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8550 flag.
8551 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8552 pending.
8553 (linux_continue_one_thread): Only preserve the stepping flag if
8554 there's a pending breakpoint.
8555
0a59d50b
PA
85562009-03-31 Pedro Alves <pedro@codesourcery.com>
8557
8558 * server.c (main): After the inferior having exited, call
8559 remote_close before exiting gdbserver.
8560
f04c6d38
TJB
85612009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8562
8563 Fix size of FPSCR in Power 7 processors.
8564 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8565 (PPC_FEATURE_HAS_DFP): New #define.
8566 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8567 size of the FPSCR.
8568
78e5cee6
PA
85692009-03-23 Pedro Alves <pedro@codesourcery.com>
8570
8571 * server.c (handle_query) Whitespace and formatting.
8572
1b3f6016
PA
85732009-03-22 Pedro Alves <pedro@codesourcery.com>
8574
8575 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8576 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8577 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8578 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8579 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8580 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8581 Makefile.in, configure.ac: Fix whitespace throughout.
8582 * configure: Regenerate.
8583
a07b2135
PA
85842009-03-22 Pedro Alves <pedro@codesourcery.com>
8585
8586 * inferiors.c (find_inferior): Make it safe for the callback
8587 function to delete the currently iterated inferior.
8588
67cc2626
PA
85892009-03-22 Pedro Alves <pedro@codesourcery.com>
8590
8591 * Makefile.in (linuw_low_h): Move higher.
8592 (thread-db.o): Depend on $(linux_low_h).
8593
54a0b537
PA
85942009-03-17 Pedro Alves <pedro@codesourcery.com>
8595
8596 Rename "process" to "lwp" throughout.
8597
8598 * linux-low.c (all_processes): Rename to...
8599 (all_lwps): ... this.
8600 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8601 (add_process): Rename to ...
8602 (add_lwp): ... this. Adjust.
8603 (linux_create_inferior): Adjust.
8604 (linux_attach_lwp): Adjust.
8605 (linux_attach): Adjust.
8606 (linux_kill_one_process): Rename to ...
8607 (linux_kill_one_lwp): ... this. Adjust.
8608 (linux_kill): Adjust.
8609 (linux_detach_one_process): Rename to ...
8610 (linux_detach_one_lwp): ... this. Adjust.
8611 (linux_detach): Adjust.
8612 (check_removed_breakpoint): Adjust.
8613 (status_pending_p): Adjust.
8614 (linux_wait_for_process): Rename to ...
8615 (linux_wait_for_lwp): ... this. Adjust.
8616 (linux_wait_for_event): Adjust.
8617 (send_sigstop): Adjust.
8618 (wait_for_sigstop): Adjust.
8619 (stop_all_processes): Rename to ...
8620 (stop_all_lwps): ... this.
8621 (linux_resume_one_process): Rename to ...
8622 (linux_resume_one_lwp): ... this. Adjust.
8623 (linux_set_resume_request, linux_continue_one_thread)
8624 (linux_queue_one_thread, resume_status_pending_p)
8625 (usr_store_inferior_registers, regsets_store_inferior_registers)
8626 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8627 Adjust.
8628 * linux-low.h (get_process): Rename to ...
8629 (get_lwp): ... this. Adjust.
8630 (get_thread_process): Rename to ...
8631 (get_thread_lwp): ... this. Adjust.
8632 (get_process_thread): Rename to ...
8633 (get_lwp_thread): ... this. Adjust.
8634 (struct process_info): Rename to ...
8635 (struct lwp_info): ... this.
8636 (all_processes): Rename to ...
8637 (all_lwps): ... this.
8638 * proc-service.c (ps_lgetregs): Adjust.
8639 * thread-db.c (thread_db_create_event, find_one_thread)
8640 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8641
0b16c5cf
PA
86422009-03-14 Pedro Alves <pedro@codesourcery.com>
8643
8644 * server.c (handle_query): Handle "qAttached".
8645
32de4b9d
NS
86462009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8647
8648 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8649 GPLv3, update license URL.
8650
2aecd87f
DE
86512009-03-01 Doug Evans <dje@google.com>
8652
93efd302 8653 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8654 (server_h): Add gdb_signals.h.
8655 (signals.o): Update.
8656 * server.h (target_signal_from_host,target_signal_to_host_p)
8657 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8658
86b1f9c5
PM
86592009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8660
8661 * remote-utils.c (getpkt): Also generate remote-debug
8662 information if noack_mode is set.
8663
4aa995e1
PA
86642009-02-06 Pedro Alves <pedro@codesourcery.com>
8665
8666 * server.c (handle_query): Report qXfer:siginfo:read and
8667 qXfer:siginfo:write as supported and handle them.
8668 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8669 * linux-low.c (linux_xfer_siginfo): New.
8670 (linux_target_ops): Set it.
8671
62709adf
PA
86722009-01-26 Pedro Alves <pedro@codesourcery.com>
8673
8674 * server.c (gdbserver_usage): Mention --remote-debug.
8675 (main): Accept '--remote-debug' switch.
8676
aef93bd7
DE
86772009-01-18 Doug Evans <dje@google.com>
8678
8679 * regcache.c (new_register_cache): No need to check result of xcalloc.
8680 * server.c (handle_search_memory): Back out calls to xmalloc,
8681 result is checked and error is returned to user upon failure.
8682 (handle_query): Ditto. Add more checks for result of malloc.
8683 (handle_v_cont): Check result of malloc, report error back to
8684 user upon failure.
8685 (handle_v_run): Ditto. Call freeargv.
8686 * server.h (freeargv): Declare.
8687 * utils.c (freeargv): New fn.
8688
54363045
DE
86892009-01-15 Doug Evans <dje@google.com>
8690
f626972c
DE
8691 * gdbreplay.c (perror_with_name): Make arg const char *.
8692 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8693 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8694 * utils.c (perror_with_name): Make arg const char *.
54363045 8695
18aae699
PA
86962009-01-14 Pedro Alves <pedro@codesourcery.com>
8697
8698 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8699 when handling a EXIT_PROCESS_DEBUG_EVENT.
8700
ff703abe
JB
87012009-01-06 Joel Brobecker <brobecker@adacore.com>
8702
8703 * gdbreplay.c (gdbreplay_version): Update copyright year.
8704 * server.c (gdbserver_version): Likewise.
8705
f21cc1a2 87062009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8707
8708 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8709 (handle_extended_wait): Improve comment.
0e21c1ec 8710
bca929d3
DE
87112008-12-13 Doug Evans <dje@google.com>
8712
8713 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8714 * server.h (ATTR_MALLOC): New macro.
8715 (xmalloc,xcalloc,xstrdup): Declare.
8716 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8717 * inferiors.c: Ditto.
8718 * linux-low.c: Ditto.
8719 * mem-break.c: Ditto.
8720 * regcache.c: Ditto.
8721 * remote-utils.c: Ditto.
8722 * server.c: Ditto.
8723 * target.c: Ditto.
8724 * win32-low.c: Ditto.
8725
97438e3f
DE
87262008-12-12 Doug Evans <dje@google.com>
8727
896c7fbb
DE
8728 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8729 in debugging printf.
8730
97438e3f
DE
8731 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8732
e3b886f8
DE
87332008-12-09 Doug Evans <dje@google.com>
8734
8735 * linux-low.h (struct process_info): Delete member tid, unused.
8736 * thread-db.c (find_one_thread): Update.
8737 (maybe_attach_thread): Update.
8738
07e059b5
VP
87392008-12-02 Pedro Alves <pedro@codesourcery.com>
8740
889bf7c5
PA
8741 * target.h (struct target_ops): Add qxfer_osdata member.
8742 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8743 and dirent.h.
8744 (linux_qxfer_osdata): New functions.
8745 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8746 callback.
8747 * server.c (handle_query): Handle "qXfer:osdata:read:".
8748 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8749 (buffer_xml_printf): New functions.
8750 * server.h (struct buffer): New.
8751 (buffer_grow_str, buffer_grow_str0): New macros.
8752 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8753 (buffer_xml_printf): Declare.
07e059b5 8754
4cab47ab
DE
87552008-11-24 Doug Evans <dje@google.com>
8756
8757 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8758
f142445f
DJ
87592008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8760
8761 * server.c (handle_v_run): Always use the supplied argument list.
8762
d0107bb6 87632008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8764
d0107bb6
BW
8765 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8766 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8767
2c4ad781
TJB
87682008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8769
8770 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8771 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8772 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8773 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8774 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8775 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8776 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8777 XML target descriptions.
8778 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8779 when inferior is running on an ISA 2.05 or later processor. Add
8780 special case to return offset for full 64-bit slot of FPSCR when
8781 in 32-bits.
8782
dfb64f85
DJ
87832008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8784
8785 * Makefile.in (SFILES, clean): Added sparc64 files.
8786 (reg-sparc64.o, reg-sparc64.c): New.
8787 * configure.srv (sparc*-*-linux*): New configuration.
8788 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8789 syscall arguments for SPARC.
8790 (regsets_store_inferior_registers): Likewise.
8791 * linux-sparc-low.c: New file.
8792
66b6e1dd
DE
87932008-10-21 Doug Evans <dje@google.com>
8794
8795 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8796 (READLINE_DIR,READLINE_DEP): Delete.
8797 (INTERNAL_CFLAGS): Update.
8798 (LINTFLAGS): Update.
8799
9b710a42
PA
88002008-10-10 Pedro Alves <pedro@codesourcery.com>
8801
8802 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8803 whole argv from the last run, not just argv[0].
8804
5822d809
PA
88052008-09-08 Pedro Alves <pedro@codesourcery.com>
8806
8807 * regcache.c (new_register_cache): Return NULL if the register
8808 cache size isn't known yet.
8809 (free_register_cache): Avoid dereferencing a NULL regcache.
8810
74aac56f
DJ
88112008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8812
8813 * configure.srv: Merge MIPS and MIPS64.
8814
400b20f5
MR
88152008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8816
8817 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8818
677c5bb1
LM
88192008-08-18 Luis Machado <luisgpm@br.ibm.com>
8820
8821 * Makefile.in: Add required vsx dependencies.
8822
8823 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8824 Declare init_registers_powerpc_vsx32l.
8825 Declare init_registers_powerpc_vsx64l.
8826 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8827 (ppc_arch_setup): Check for VSX in hwcap.
8828 (ppc_fill_vsxregset): New function.
8829 (ppc_store_vsxregset): New function.
8830 Add new VSX entry in regset_info target_regsets.
8831
8832 * configure.srv: Add new VSX dependencies.
8833
a6f3e723
SL
88342008-08-12 Pedro Alves <pedro@codesourcery.com>
8835
8836 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8837 (remote_open): Set or clear transport_is_reliable.
8838 (putpkt_binary): Don't expect acks in noack mode.
8839 (getpkt): Don't send ack/nac in noack mode.
8840 * server.c (handle_general_set): Handle QStartNoAckMode.
8841 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8842 qSupported.
8843 (main): Reset noack_mode on every connection.
8844 * server.h (noack_mode): Declare.
8845
a417dc56
RW
88462008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8847
8848 * Makefile.in (GDBREPLAY_OBS): New variable.
8849 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8850
3221518c
UW
88512008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8852 Daniel Jacobowitz <dan@codesourcery.com>
8853
8854 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8855 (usr_store_inferior_registers): Likewise.
8856 (regsets_store_inferior_registers): Likewise.
8857
ec56be1b
PA
88582008-07-31 Rolf Jansen <rj@surtec.com>
8859 Pedro Alves <pedro@codesourcery.com>
8860
8861 * configure.ac: Check for memmem declaration.
8862 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8863 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8864 (disable_packet_qfThreadInfo): Unconditionally compile.
8865 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8866 * configure, config.in: Regenerate.
8867
2fe5e3ff
DE
88682008-07-28 Doug Kwan <dougkwan@google.com>
8869
8870 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8871 (linux_write_memory): Remove declaration of errno.
8872
836acd6d
UW
88732008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8874
8875 * linux-low.c (handle_extended_wait): Do not use "status"
8876 variable uninitialized.
8877
aeba519e
PA
88782008-07-07 Pedro Alves <pedro@codesourcery.com>
8879
8880 * server.c (handle_v_attach): Inhibit reporting dll changes.
8881
db42f210
PA
88822008-06-27 Pedro Alves <pedro@codesourcery.com>
8883
8884 * remote-utils.c (prepare_resume_reply): If requested, don't
8885 output "thread:TID" in the T stop reply.
8886
8887 * server.c (disable_packet_vCont, disable_packet_Tthread)
8888 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8889 (handle_query): If requested, disable support for qC, qfThreadInfo
8890 and qsThreadInfo.
8891 (handle_v_requests): If requested, disable support for vCont.
8892 (gdbserver_show_disableable): New.
8893 (main): Handle --disable-packet and --disable-packet=LIST.
8894
8895 * server.h (disable_packet_vCont, disable_packet_Tthread)
8896 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8897
8e4c5421
CD
88982008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8899
8900 * server.c (gdbserver_usage): Mention --version.
8901
6e23a804
DJ
89022008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8903
8904 * Makefile.in (gdbreplay.o): New rule.
8905
90aa6a40
JM
89062008-06-06 Joseph Myers <joseph@codesourcery.com>
8907
8908 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8909 message, not gdbserver.
8910
c16158bc 89112008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8912 Nathan Sidwell <nathan@codesourcery.com>
8913 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8914
8915 * acinclude.m4: Include ../../config/acx.m4.
8916 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8917 * configure, config.in: Regenerate.
8918 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8919 * server.c (gdbserver_version): Print PKGVERSION.
8920 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8921 (main): Adjust gdbserver_usage calls.
8922 * gdbreplay.c (version, host_name): Add declarations.
8923 (gdbreplay_version, gdbreplay_usage): New.
8924 (main): Accept --version and --help options.
8925
aeb75bf5
DJ
89262008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8927
8928 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8929 (arm_breakpoint_at): Handle Thumb.
8930 (the_low_target): Add comment.
8931
76b233dd
UW
89322008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8933
8934 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8935
08388c79
DE
89362008-05-09 Doug Evans <dje@google.com>
8937
a3c83fae
DE
8938 * server.h (decode_search_memory_packet): Declare.
8939 * remote-utils.c (decode_search_memory_packet): New fn.
8940 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8941 (handle_search_memory): New fn.
8942 (handle_query): Process qSearch:memory packets.
8943
bb9c3d36
UW
89442008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8945
8946 * regcache.c (registers_length): Remove.
8947 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8948 full register packet.
8949 * regcache.h (registers_length): Remove prototype.
8950 * server.h (PBUFSIZ): Define to 16384.
8951
7284e1be
UW
89522008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8953
8954 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8955 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8956 powerpc-64l.o, and powerpc-altivec64l.o.
8957 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8958 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8959 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8960 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8961 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8962 to srv_xmlfiles.
8963
8964 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8965 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8966 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8967 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8968 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8969 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8970 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8971 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8972 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8973 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8974 (clean): Update.
8975
8976 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8977 (init_registers_powerpc_32l): ... this new prototype.
8978 (init_registers_powerpc_32): Remove, replace by ...
8979 (init_registers_powerpc_altivec32l): ... this new prototype.
8980 (init_registers_powerpc_e500): Remove, replace by ...
8981 (init_registers_powerpc_e500l): ... this new prototype.
8982 (init_registers_ppc64): Remove, replace by ...
8983 (init_registers_powerpc_64l): ... this new prototype.
8984 (init_registers_powerpc_64): Remove, replace by ...
8985 (init_registers_powerpc_altivec64l): ... this new prototype.
8986 (ppc_num_regs): Set to 73.
8987 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8988 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8989 (ppc_cannot_store_register): Handle orig_r3 and trap.
8990 (ppc_arch_setup): Update init_registers_... calls.
8991 (ppc_fill_gregset): Handle orig_r3 and trap.
8992
8993 * inferiors.c (clear_inferiors): Reset current_inferior.
8994
fdc59709
PB
89952008-04-23 Paolo Bonzini <bonzini@gnu.org>
8996
889bf7c5
PA
8997 * acinclude.m4: Add override.m4.
8998 * configure: Regenerate.
fdc59709 8999
c9b2f845
UW
90002008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9001
9002 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9003 initial call to init_register_ppc64.
9004
550512b8
UW
90052008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9006
43aaf8b6
PA
9007 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9008 single powerpc*-*-linux* case.
550512b8
UW
9009 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9010
b6430ec3
UW
90112008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9012
9013 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9014 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9015 from reg_xmlfiles.
9016 * linux-ppc-low.c: Include <elf.h>.
9017 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9018 (ppc_hwcap): New global variable.
9019 (ppc_regmap): Remove __SPE__ #ifdef sections.
9020 (ppc_regmap_e500): New global variable.
9021 (ppc_cannot_store_register): Update __SPE__ special case.
9022 (ppc_get_hwcap): New function.
9023 (ppc_arch_setup): Use it to determine whether inferior supports
9024 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9025 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9026 Do not access registers if target does not support AltiVec.
9027 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9028 Do not access registers if target does not support SPE.
9029 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9030
52fa2412
UW
90312008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9032
9033 * linux-low.c (disabled_regsets, num_regsets): New.
9034 (use_regsets_p): Delete.
9035 (linux_wait_for_process): Clear disabled_regsets.
9036 (regsets_fetch_inferior_registers): Check and set it.
9037 (regsets_store_inferior_registers): Likewise.
9038 (linux_fetch_registers, linux_store_registers): Do not use
9039 use_regsets_p.
9040 (initialize_low): Allocate disabled_regsets.
9041
e28b3332
DJ
90422008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9043
9044 * Makefile.in (LIBOBJS): New.
9045 (OBS): Use LIBOBJS.
9046 (memmem.o): New rule.
9047 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9048 * configure: Regenerated.
9049
4536995d
UW
90502008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9051
9052 * server.c (handle_query): Never return "unsupported" for
9053 qXfer:features:read queries.
9054
221c031f
UW
90552008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9056
9057 * server.c (get_features_xml): Fix inverted condition.
9058 (handle_query): Always support qXfer:feature:read.
9059
ccd213ac
DJ
90602008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9061
9062 * server.c (wrapper_argv): New.
9063 (start_inferior): Handle wrapper_argv. If set, expect an extra
9064 trap.
9065 (gdbserver_usage): Document --wrapper.
9066 (main): Parse --wrapper.
9067
6fe305f7
UW
90682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9069
9070 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9071 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9072 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9073 (ppc_set_pc): Likewise.
9074 (ppc_arch_setup): New function.
9075 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9076 of collect_register.
889bf7c5 9077 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9078
5b0a002e
UW
90792008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9080
9081 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9082 instead of linux-ppc64-low.o.
9083 * linux-ppc64-low.c: Remove file.
9084 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9085 (linux-ppc64-low.o): Remove rule.
9086
9087 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9088 (init_registers_powerpc_64): Likewise.
9089 (ppc_regmap): Conditionally define depending on __powerpc64__.
9090 (ppc_cannot_store_register): Do not special-case "fpscr" when
9091 compiled on __powerpc64__.
9092 (ppc_collect_ptrace_register): New function.
9093 (ppc_supply_ptrace_register): New function.
9094 (ppc_breakpoint): Change type to "unsigned int".
9095 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9096 (the_low_target): Conditionally provide initializers for the
889bf7c5 9097 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9098 collect_ptrace_register and supply_ptrace_register members.
9099
9b4b61c8
UW
91002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9101
9102 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9103 * server.c (gdbserver_xmltarget): Define.
9104 (get_features_xml): Use it to replace "target.xml" and arch_string.
9105
9106 * configure.srv: Remove srv_xmltarget. Add XML files that were
9107 mentioned there to srv_xmlfiles instead. Remove conditional tests
9108 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9109 srv_xmlfiles and srv_regobj to include all possible choices.
9110 * configure.ac (srv_xmltarget): Remove.
9111 (srv_xmlfiles): Do not add "target.xml".
9112 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9113 checks for supplementary target information.
9114 * configure: Regenerate.
9115 * Makefile.in (XML_TARGET): Remove.
9116 (target.xml): Remove rule.
9117 (clean): Do not clean up target.xml.
9118 (.PRECIOUS): Do not mention target.xml.
9119
9120 * target.h (struct target_ops): Remove arch_string member.
9121 * linux-low.c (linux_arch_string): Remove.
9122 (linux_target_ops): Remove arch_string initializer.
9123 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9124 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9125 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9126 * spu-low.c (spu_arch_string): Remove.
9127 (spu_target_ops): Remove arch_string initializer.
9128 * win32-low.c (win32_arch_string): Remove.
9129 (win32_target_ops): Remove arch_string initializer.
9130 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9131 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9132 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9133
ee1a7ae4
UW
91342008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9135
9136 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9137 by collect_ptrace_register and supply_ptrace_register hooks.
9138 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9139 instead of checking for the_low_target.left_pad_xfer.
9140 (usr_store_inferior_registers): Use collect_ptrace_register callback
9141 instead of checking for the_low_target.left_pad_xfer.
9142
9143 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9144 (s390_supply_ptrace_register): Likewise.
9145 (s390_fill_gregset): Call s390_collect_ptrace_register.
9146 (the_low_target): Update.
9147
9148 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9149 (ppc_supply_ptrace_register): Likewise.
9150 (the_low_target): Update.
9151
9152 * linux-i386-low.c (the_low_target): Update.
9153 * linux-x86-64-low.c (the_low_target): Update.
9154
d61ddec4
UW
91552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9156
9157 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9158 reg-s390.o and reg-s390x.o.
9159
9160 * linux-low.c (new_inferior): New global variable.
9161 (linux_create_inferior, linux_attach): Set it.
9162 (linux_wait_for_process): Call the_low_target.arch_setup after the
9163 target has stopped for the first time.
9164 (initialize_low): Do not call the_low_target.arch_setup.
9165
9166 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9167 (s390_set_pc): Likewise.
9168 (s390_arch_setup): New function.
9169 (the_low_target): Use s390_arch_setup as arch_setup routine.
9170
9171 * regcache.c (realloc_register_cache): New function.
9172 (set_register_cache): Call it for each existing regcache.
9173
d05b4ac3
UW
91742008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9175
9176 * server.h (init_registers): Remove prototype.
9177
9178 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9179 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9180 instead of init_registers ().
9181 * linux-arm-low.c (init_registers_arm): Add prototype.
9182 (init_registers_arm_with_iwmmxt): Likewise.
9183 (the_low_target): Add initializer for arch_setup field.
9184 * linux-cris-low.c (init_registers_cris): Add prototype.
9185 (the_low_target): Add initializer for arch_setup field.
9186 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9187 (the_low_target): Add initializer for arch_setup field.
9188 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9189 (the_low_target): Add initializer for arch_setup field.
9190 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9191 (the_low_target): Add initializer for arch_setup field.
9192 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9193 (the_low_target): Add initializer for arch_setup field.
9194 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9195 (the_low_target): Add initializer for arch_setup field.
9196 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9197 (init_registers_mips64_linux): Likewise.
9198 (the_low_target): Add initializer for arch_setup field.
9199 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9200 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9201 (the_low_target): Add initializer for arch_setup field.
9202 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9203 (init_registers_powerpc_64): Likewise.
9204 (the_low_target): Add initializer for arch_setup field.
9205 * linux-s390-low.c (init_registers_s390): Add prototype.
9206 (init_registers_s390x): Likewise.
9207 (the_low_target): Add initializer for arch_setup field.
9208 * linux-sh-low.c (init_registers_sh): Add prototype.
9209 (the_low_target): Add initializer for arch_setup field.
9210 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9211 (the_low_target): Add initializer for arch_setup field.
9212 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9213 (the_low_target): Add initializer for arch_setup field.
9214
9215 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9216 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9217 instead of init_registers ().
9218 * win32-arm-low.c (init_registers_arm): Add prototype.
9219 (the_low_target): Add initializer for arch_setup field.
9220 * win32-i386-low.c (init_registers_i386): Add prototype.
9221 (the_low_target): Add initializer for arch_setup field.
9222
9223 * spu-low.c (init_registers_spu): Add prototype.
9224 (initialize_low): Call initialie_registers_spu () instead of
9225 initialize_registers ().
9226
fd96d250
PA
92272008-02-19 Pedro Alves <pedro@codesourcery.com>
9228
9229 * server.c (handle_v_requests): When handling the vRun and vAttach
9230 packets, if already debugging a process, don't kill it. Return an
9231 error instead.
9232
d41b6bb4
DJ
92332008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9234
9235 * server.c (handle_query): Correct length check.
9236
5ac588cf
PA
92372008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9238
9239 * win32-low.c (do_initial_child_stuff): Add process handle
9240 parameter. Set current_process_handle and current_process_id from the
9241 parameters. Clear globals.
9242 (win32_create_inferior): Don't set current_process_handle and
9243 current_process_id here. Instead pass them on the call to
9244 do_initial_child_stuff.
9245 (win32_attach): Likewise.
9246 (win32_clear_inferiors): New.
9247 (win32_kill): Don't close the current process handle or the
9248 current thread handle here. Instead call win32_clear_inferiors.
9249 (win32_detach): Don't open a new handle to the process. Call
9250 win32_clear_inferiors.
9251 (win32_join): Don't rely on current_process_handle; open a new
9252 handle using the process id.
9253 (win32_wait): Call win32_clear_inferiors when the inferior process
9254 has exited.
9255
ecd7ecbc
DJ
92562008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9257
9258 * server.c (monitor_show_help): Add "exit".
9259
1525d545
MG
92602008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9261
ecd7ecbc 9262 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9263 (clean): Add reg-xtensa.c.
9264 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9265 * configure.srv (xtensa*-*-linux*) New target.
9266 * linux-xtensa-low.c: New.
9267 * xtensa-xtregs.c: New.
1525d545 9268
59a016f0
PA
92692008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9270
9271 * hostio.c: Don't include errno.h.
9272 (errno_to_fileio_errno): Move to hostio-errno.
9273 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9274 error number outputting to the target->hostio_last_error callback.
9275 (hostio_packet_error): Use FILEIO_EINVAL directly.
9276 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9277 calls to hostio_error.
9278 * hostio-errno.c: New.
9279 * server.h (hostio_last_error_from_errno): Declare.
9280 * target.h (target_ops): Add hostio_last_error member.
9281 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9282 as hostio_last_error handler.
889bf7c5 9283 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9284 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9285 (wince_hostio_last_error): New functions.
9286 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9287 as hostio_last_error handler.
9288 (win32_target_ops) [!_WIN32_WCE]: Register
9289 hostio_last_error_from_errno as hostio_last_error handler.
9290 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9291 (hostio-errno.o): New rule.
9292 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9293 * configure.srv (srv_hostio_err_objs): New variable. Default to
9294 hostio-errno.o.
9295 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9296 * configure: Regenerate.
9297
2d717e4f
DJ
92982008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9299
9300 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9301 (linux_kill, linux_detach): Clean up the process list.
9302 * remote-utils.c (remote_open): Improve port number parsing.
9303 (putpkt_binary, input_interrupt): Only send interrupts if the target
9304 is running.
9305 * server.c (extended_protocol): Make static.
9306 (attached): Define earlier.
9307 (exit_requested, response_needed, program_argv): New variables.
9308 (target_running): New.
9309 (start_inferior): Clear attached here.
9310 (attach_inferior): Set attached here.
9311 (require_running): Define.
9312 (handle_query): Use require_running and target_running. Implement
9313 "monitor exit".
9314 (handle_v_attach, handle_v_run): New.
9315 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9316 (gdbserver_usage): Update.
9317 (main): Redo argument parsing. Handle --debug and --multi. Handle
9318 --attach along with other options or after the port. Save
9319 program_argv. Support no initial program. Resynchronize
9320 communication with GDB after an error. Handle "monitor exit".
9321 Use require_running and target_running. Always allow the extended
9322 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9323 restart in extended mode.
9324 * README: Refer to the GDB manual. Update --attach usage.
9325
7407e2de
AS
93262007-12-20 Andreas Schwab <schwab@suse.de>
9327
9328 * linux-low.c (STACK_SIZE): Define.
9329 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9330 (linux_test_for_tracefork): Likewise.
9331
b65d95c5
DJ
93322007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9333
9334 * linux-low.c (linux_wait_for_event): Update messages. Do not
9335 reinsert auto-delete breakpoints.
9336 * mem-break.c (struct breakpoint): Change return type of handler to
9337 int.
9338 (set_breakpoint_at): Update handler type.
9339 (reinsert_breakpoint_handler): Return 1 instead of calling
9340 delete_breakpoint.
9341 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9342 setting a new one.
9343 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9344 * mem-break.h (set_breakpoint_at): Update handler type.
9345 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9346 * win32-low.c (auto_delete_breakpoint): New.
9347 (get_child_debug_event): Use it.
9348
4e799345
DJ
93492007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9350
9351 * configure.ac: Check for pread and pwrite.
9352 * hostio.c (handle_pread): Fall back to lseek and read.
9353 (handle_pwrite): Fall back to lseek and write.
9354 * config.in, configure: Regenerated.
9355
27524b67
DJ
93562007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9357
9358 * server.c (myresume): Add own_buf argument.
9359 (main): Update calls.
9360
a20d5e98
DJ
93612007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9362
9363 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9364 * remote-utils.c (remote_open): Do not call disable_async_io.
9365 (block_async_io): Delete.
9366 (unblock_async_io): Make static.
9367 (initialize_async_io): New.
9368 * server.c (handle_v_cont): Handle async I/O here.
9369 (myresume): Likewise. Move other common resume tasks here...
9370 (main): ... from here. Call initialize_async_io. Disable async
9371 I/O before the main loop.
9372 * server.h (initialize_async_io): Declare.
9373 (block_async_io, unblock_async_io): Delete prototypes.
9374 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9375
b79d787e
DJ
93762007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9377
9378 * remote-utils.c (readchar): Allow binary data in received messages.
9379
d97903b2
PA
93802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9381
9382 * win32-low.c (attaching): New global.
9383 (win32_create_inferior): Clear the `attaching' global.
9384 (win32_attach): Set the `attaching' global.
9385 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9386 attaching. Only set a breakpoint at the entry point if not
9387 attaching.
9388
311de423
PA
93892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9390
9391 * server.c (main): Don't report dll events on the initial
9392 connection on attaches.
9393
6c2d16d2
PA
93942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9395
9396 * server.c (main): Relax numerical bases supported for the pid of
9397 the --attach command line argument.
9398
5ca906e6
PA
93992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9400
9401 * win32-low.c (win32_attach): Call OpenProcess before
9402 DebugActiveProcess, not after. Add last error output to error
9403 call.
9404
9c6c8194
PA
94052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9406
9407 * win32-low.c (win32_get_thread_context)
9408 (win32_set_thread_context): New functions.
9409 (thread_rec): Use win32_get_thread_context.
9410 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9411 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9412 field.
9413
4d5d1aaa
PA
94142007-12-03 Leo Zayas
9415 Pedro Alves <pedro_alves@portugalmail.pt>
9416
9417 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9418 global variables.
9419 (child_add_thread): Minor cleanup.
9420 (child_continue): Resume artificially suspended threads before
9421 calling ContinueDebugEvent.
9422 (suspend_one_thread): New.
9423 (fake_breakpoint_event): New.
9424 (get_child_debug_event): Change return type to int. Check here if
9425 gdb sent an interrupt request. If a soft interrupt was requested,
9426 fake a breakpoint event. Return 0 if there is no event to handle,
9427 and 1 otherwise.
9428 (win32_wait): Don't check here if gdb sent an interrupt request.
9429 Ensure there is a valid event to handle.
9430 (win32_request_interrupt): Add soft interruption method as last
9431 resort.
9432
c436e841
PA
94332007-12-03 Leo Zayas
9434 Pedro Alves <pedro_alves@portugalmail.pt>
9435
9436 * win32-low.h (win32_thread_info): Add descriptions to the
9437 structure members. Replace `suspend_count' counter by a
9438 `suspended' flag.
9439 * win32-low.c (thread_rec): Update condition of when to get the
9440 context from the inferior. Rely on ContextFlags being set if it
9441 has already been retrieved. Only suspend the inferior thread if
9442 we haven't already. Warn if that fails.
9443 (continue_one_thread): s/suspend_count/suspended/. Only call
9444 ResumeThread once. Warn if that fails.
9445
e7b5fa67
PA
94462007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9447
9448 * win32-low.c (win32_wait): Don't read from the inferior when it
9449 has already exited.
9450
a385171d
PA
94512007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9452
9453 * Makefile.in (win32_low_h): New variable.
9454 (win32-low.o): Add dependency on $(win32_low_h).
9455 (win32-arm-low.o, win32-i386-low.o): New rules.
9456
f80c84b3
DJ
94572007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9458
9459 * hostio.c: Correct copyright year.
9460
a6b151f1
DJ
94612007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9462
9463 * Makefile.in (OBS): Add hostio.o.
9464 (hostio.o): New rule.
9465 * server.h (handle_vFile): Declare.
9466 * hostio.c: New file.
9467 * server.c (handle_v_requests): Take packet_len and new_packet_len
9468 for binary packets. Call handle_vFile.
9469 (main): Update call to handle_v_requests.
9470
f9387fc3
DJ
94712007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9472
9473 * linux-low.c: Include <sched.h>.
9474
51c2684e
DJ
94752007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9476
9477 * linux-low.c (linux_tracefork_grandchild): New.
9478 (linux_tracefork_child): Use clone.
9479 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9480
75f83163
JB
94812007-10-31 Joel Brobecker <brobecker@adacore.com>
9482
9483 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9484
da5898ce
DJ
94852007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9486
9487 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9488
24a09b5f
DJ
94892007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9490
9491 * inferiors.c (change_inferior_id): Delete.
9492 (add_pid_to_list, pull_pid_from_list): New.
9493 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9494 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9495 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9496 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9497 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9498 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9499 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9500 (using_threads): Always set to 1.
9501 (handle_extended_wait): New.
9502 (add_process): Do not set TID.
9503 (linux_create_inferior): Set must_set_ptrace_flags.
9504 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9505 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9506 (linux_thread_alive): Rename TID argument to LWPID.
9507 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9508 (linux_wait_for_event): Do not use TID or check using_threads. Update
9509 call to dead_thread_notify. Call handle_extended_wait.
9510 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9511 (send_sigstop): Delete sigstop_sent.
9512 (wait_for_sigstop): Avoid TID.
9513 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9514 (linux_test_for_tracefork): New.
9515 (linux_lookup_signals): Use thread_db_active and
9516 linux_supports_tracefork_flag.
9517 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9518 * linux-low.h (get_process_thread): Avoid TID.
9519 (struct process_ifo): Move thread_known and tid to the end. Remove
9520 sigstop_sent.
9521 (linux_attach_lwp, thread_db_init): Update prototypes.
9522 * server.h (change_inferior_id): Delete prototype.
9523 (add_pid_to_list, pull_pid_from_list): New prototypes.
9524 * thread-db.c (thread_db_use_events): New.
9525 (find_first_thread): Rename to...
9526 (find_one_thread): ...this. Update callers and messages. Do not
9527 call fatal. Check thread_db_use_events. Do not call
9528 change_inferior_id or new_thread_notify.
9529 (maybe_attach_thread): Update. Do not call new_thread_notify.
9530 (thread_db_init): Set thread_db_use_events. Check use_events.
9531 * utils.c (fatal, warning): Correct message prefix.
9532
30ed0a8f
DJ
95332007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9534
9535 * Makefile.in (clean): Remove new files.
9536 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9537 (powerpc-64.o, powerpc-64.c): New rules.
9538 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9539 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9540 with SPE.
9541 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9542 SPE targets.
9543 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9544 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9545 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9546 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9547 (target_regsets): Add AltiVec and SPE register sets.
9548 * configure.ac: Check for AltiVec and SPE.
9549 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9550 (ppc_fill_vrregset, ppc_store_vrregset): New.
9551 (target_regsets): Add AltiVec register set.
9552 * configure: Regenerated.
9553
fd462a61
DJ
95542007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9555
9556 * linux-low.c (O_LARGEFILE): Define.
9557 (linux_read_memory): Use /proc/PID/mem.
9558 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9559 * configure, config.in: Regenerated.
9560
69f223ed
DJ
95612007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9562
9563 * linux-low.c (linux_wait_for_event): Do not pass signals while
9564 single-stepping.
9565
aec18585
PA
95662007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9567
9568 * win32-low.c (create_process): New.
9569 (win32_create_inferior): Use create_process instead of
9570 CreateProcess. If create_process failed retry appending an ".exe"
9571 suffix. Store the GetLastError result immediatelly after
9572 create_process calls and use it on the call to error.
9573
34d86ddd
PA
95742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9575
9576 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9577
5a0e3bd0
JB
95782007-08-23 Joel Brobecker <brobecker@adacore.com>
9579
9580 * configure.ac: Switch license to GPLv3.
9581
f88c79e6
MS
95822007-08-01 Michael Snyder <msnyder@access-company.com>
9583
9584 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9585
6b3d9b83
PA
95862007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9587
9588 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9589 typedef.
9590 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9591 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9592 CloseToolhelp32Snapshot.
9593 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9594 CloseToolhelp32Snapshot.
9595
c588c53c
MS
95962007-07-27 Michael Snyder <michael.snyder@access-company.com>
9597
9598 * server.c (main): Check for inferior exit before main loop.
9599
aa0403d9
PA
96002007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9601
9602 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9603 instead of on tmp_desc.
9604
255e7678
DJ
96052007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9606 Daniel Jacobowitz <dan@codesourcery.com>
9607
9608 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9609 (add_thread): Minor cleanups.
9610 (clear_inferiors): Move lower in the file. Clear the DLL
9611 list.
9612 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9613 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9614 (xml_escape_text): New.
9615 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9616 for qSupported.
9617 (handle_v_cont): Report errors.
9618 (gdbserver_version): Update.
9619 (main): Correct size of own_buf. Do not report initial DLL events.
9620 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9621 (unloaded_dll, xml_escape_text): New.
9622 * win32-low.c (enum target_waitkind): Update comments.
9623 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9624 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9625 (win32_EnumProcessModules, win32_GetModuleInformation)
9626 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9627 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9628 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9629 (win32_Module32First, win32_Module32Next, load_toolhelp)
9630 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9631 (get_child_debug_event): Handle DLL events.
9632 (win32_wait): Likewise.
9633
0d37add9
DJ
96342007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9635
9636 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9637 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9638
45e2715e
PA
96392007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9640
9641 * win32-low.c (handle_output_debug_string): Ignore event if not
9642 waiting.
9643
c5674cf1
PA
96442007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9645
9646 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9647
2bbe3cc1
DJ
96482007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9649
9650 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9651
ae13219e
DJ
96522007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9653
9654 * inferiors.c (change_inferior_id): Add comment.
9655 * linux-low.c (check_removed_breakpoint): Add an early
9656 prototype. Improve debug output.
9657 (linux_attach): Doc update.
9658 (linux_detach_one_process, linux_detach): Clean up before releasing
9659 each process.
9660 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9661 * linux-low.h (struct process_info): Doc improvement.
9662 * mem-break.c (delete_all_breakpoints): New.
9663 * mem-break.h (delete_all_breakpoints): New prototype.
9664 * thread-db.c (find_first_thread): New.
9665 (thread_db_create_event): Call it instead of
9666 thread_db_find_new_threads. Clean up unused variables.
9667 (maybe_attach_thread): Remove first thread handling.
9668 (thread_db_find_new_threads): Use find_first_thread.
9669 (thread_db_get_tls_address): Likewise.
9670
4105de34
DJ
96712007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9672
9673 * thread-db.c (thread_db_find_new_threads): Add prototype.
9674 (thread_db_create_event): Check for the main thread before adding
9675 a new thread.
9676 (maybe_attach_thread): Only enable event reporting if TID == 0.
9677 (thread_db_get_tls_address): Check for new threads.
9678
2b876972
DJ
96792007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9680
9681 * linux-low.c (linux_create_inferior): Try execv before execvp.
9682 * spu-low.c (spu_create_inferior): Likewise.
9683
7a245884
DJ
96842007-06-13 Mike Frysinger <vapier@gentoo.org>
9685
9686 * linux-low.c (linux_create_inferior): Change execv to execvp.
9687 * spu-low.c (spu_create_inferior): Likewies.
9688
117ce543
DJ
96892007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9690
9691 * Makefile.in (clean): Clean new files instead of deleted ones.
9692 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9693 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9694 rules.
9695 * configure.srv: Specify XML files and new regformats for MIPS and
9696 MIPS64 GNU/Linux.
9697 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9698 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9699 an entry for the restart register.
9700 (mips_cannot_fetch_register, mips_cannot_store_register)
9701 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9702 register names to match the XML descriptions.
9703 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9704 restart register instead of $0.
9705
0e7f50da
UW
97062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9707 Markus Deuling <deuling@de.ibm.com>
9708
9709 * remote-utils.c (decode_xfer_write): New function.
9710 * server.h (decode_xfer_write): Add prototype.
9711 * server.c (handle_query): Add PACKET_LEN argument. Support
9712 qXfer:spu:read and qXfer:spu:write packets.
9713 (main): Pass packet_len to handle_query.
9714 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9715 * target.h (target_ops): Add qxfer_spu.
9716
374c1d38
UW
97172007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9718
9719 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9720 accessing non-seekable spufs files.
9721
bb63802a
UW
97222007-05-16 Markus Deuling <deuling@de.ibm.com>
9723
889bf7c5 9724 * server.c (handle_query): Add reply for qC packet.
bb63802a 9725
7390519e
PA
97262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9727 Leo Zayas <lerele@champenstudios@com>
9728
9729 * server.h (check_remote_input_interrupt_request): New function.
9730 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9731 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9732 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9733 (check_remote_input_interrupt_request): New function.
9734 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9735 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9736 winapi_GenerateConsoleCtrlEvent): New typedefs.
9737 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9738 to 250 ms.
9739 (win32_wait): Check for remote interrupt request
9740 with check_remote_input_interrupt_request.
9741 (win32_request_interrupt): New function.
9742 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9743
34b34921
PA
97442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9745
9746 * win32-low.c (debug_registers_changed,
9747 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9748 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9749 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9750 (thread_rec): Get context using the low target.
9751 (child_add_thread): Call thread_added on the low target,
9752 which does the same thing.
9753 (regptr): Delete.
9754 (do_initial_child_stuff): Remove debug registers references.
9755 Set context using the low target. Resume threads after
9756 setting the contexts.
9757 (child_continue): Remove dead variable. Remove debug
9758 registers references.
9759 (child_fetch_inferior_registers): Go through the low target.
9760 (do_child_store_inferior_registers): Remove.
9761 (child_store_inferior_registers): Go through the low target.
9762 (win32_resume): Remove debug registers references.
9763 Set context using the low target.
9764 (handle_exception): Change return type to void. Don't record
9765 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9766 first chance exception.
889bf7c5 9767 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9768 goto loop. Always return after waiting for debug event.
9769 (win32_wait): Convert to switch statement. Handle spurious
9770 events.
9771
9772 * win32-i386-low.c (debug_registers_changed,
9773 debug_registers_used): New.
9774 (initial_stuff): Rename to ...
9775 (i386_initial_stuff): ... this. Clear debug registers
9776 state variables.
9777 (store_debug_registers): Delete.
9778 (i386_get_thread_context): New.
9779 (load_debug_registers): Delete.
9780 (i386_set_thread_context): New.
9781 (i386_thread_added): New.
9782 (single_step): Rename to ...
9783 (i386_single_step): ... this.
9784 (do_fetch_inferior_registers): Rename to ...
9785 (i386_fetch_inferior_register): ... this.
9786 (i386_store_inferior_register): New.
9787 (the_low_target): Adapt to new interface.
9788
9789 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9790 (arm_get_thread_context): New.
9791 (arm_set_thread_context): New.
9792 (regptr): New.
9793 (do_fetch_inferior_registers): Rename to ...
9794 (arm_fetch_inferior_register): ... this.
9795 (arm_store_inferior_register): New.
9796 (arm_wince_breakpoint): Reimplement as unsigned long.
9797 (arm_wince_breakpoint_len): Define.
9798 (the_low_target): Adapt to new interface.
9799
9800 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9801 load_debug_registers. Add get_thread_context, set_thread_context,
9802 thread_added and store_inferior_register. Rename
9803 fetch_inferior_registers to fetch_inferior_register.
9804 (regptr): Remove declaration.
9805
dd6953e1
PA
98062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9807
9808 * linux-low.c (linux_detach): Change return type to int. Return 0.
9809 * spu-low.c (spu_detach): Likewise.
9810
444d6139
PA
98112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9812
9813 * target.h (target_ops): Change return type of detach to int.
9814 Add join.
9815 (join_inferior): New.
9816 * server.c (main): Don't skip detach support on mingw32.
9817 If the inferior doesn't support detaching return error.
9818 Call join_inferior instead of using waitpid.
9819 * linux-low.c (linux_join): New.
9820 (linux_target_op): Add linux_join.
9821 * spu-low.c (spu_join): New.
9822 (spu_target_ops): Add spu_join.
9823 * win32-low.c (win32_detach): Adapt to new interface.
9824 Reopen current_process_handle before detaching. Issue a child
9825 resume before detaching.
9826 (win32_join): New.
9827 (win32_target_op): Add win32_join.
9828
1d5315fe
PA
98292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9830
9831 * win32-low.c (win32-attach): Fix return value.
9832 * target.h (target_ops): Describe ATTACH return values.
9833
bf914831
PA
98342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9835
9836 * win32-low.c (GETPROCADDRESS): Define.
9837 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9838 (winapi_DebugSetProcessKillOnExit): Likewise.
9839 (win32_create_inferior): Force usage of ansi CreateProcessA.
9840 (win32_attach): Use GETPROCADDRESS.
9841 (win32_detach): Likewise.
9842
f72f3e60
PA
98432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9844
9845 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9846
ed50f18f
PA
98472007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9848
9849 * win32-low.c: Commit leftover changes from 2007-03-29.
9850
0c2ead7e
DJ
98512007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9852
9853 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9854 fields short instead of int. Add explicit padding.
9855 (i387_cache_to_fsave): Remove unnecessary casts.
9856 (i387_fsave_to_cache): Doc fix.
9857 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9858
73725ff3
DJ
98592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9862 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9863
d99f33d8
PA
98642007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9865
9866 * configure.srv (arm*-*-mingw32ce*): Move near the other
9867 arm targets.
9868
68070c10
PA
98692007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9870
2482afc6 9871 * configure.ac: Add errno checking.
68070c10
PA
9872 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9873 sys/file.h and malloc.h.
9874 (AC_CHECK_DECLS): Add perror.
9875 (srv_mingwce): Handle.
2482afc6 9876 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9877 win32-i386-low.o to srv_tgtobj.
9878 (i[34567]86-*-mingw*): Likewise.
9879 (arm*-*-mingw32ce*): Add case.
9880 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9881 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9882 [__MINGW32CE__] (strerror): New function.
9883 [__MINGW32CE__] (errno): Define to GetLastError.
9884 [__MINGW32CE__] (COUNTOF): New macro.
9885 (remote_open): Remove extra close call.
9886 * mem-break.c (delete_breakpoint_at): New function.
9887 * mem-break.h (delete_breakpoint_at): Declare.
9888 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9889 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9890 [USE_WIN32API] (read, write): Add char* casts.
9891 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9892 * server.h: Include wincecompat.h on Windows CE.
9893 [HAVE_ERRNO_H]: Check.
9894 (perror): Declare if not declared.
9895 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9896 (perror_with_name): Remove errno declaration.
9897 * wincecompat.h: New.
9898 * wincecompat.c: New.
9899 * win32-low.h: New.
9900 * win32-arm-low.c: New.
9901 * win32-i386-low.c: New.
9902 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9903 (OUTMSG2): Make it safe.
9904 (_T): New macro.
9905 (COUNTOF): New macro.
9906 (NUM_REGS): Get it from the low target.
9907 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9908 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9909 (thread_rec): Let low target handle debug registers.
9910 (child_add_thread): Likewise.
9911 (child_init_thread_list): Likewise.
9912 (continue_one_thread): Likewise.
9913 (regptr): New.
9914 (do_child_fetch_inferior_registers): Move to ...
9915 * win32-i386-low.c: ... here, and rename to ...
9916 (do_fetch_inferior_registers): ... this.
889bf7c5 9917 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9918 Go through the low target.
9919 (do_child_store_inferior_registers): Use regptr.
9920 (strwinerror): New function.
9921 (win32_create_inferior): Handle Windows CE.
9922 Use strwinerror instead of strerror on Windows error
9923 codes. Add program to the error output.
9924 Don't close the main thread handle on Windows CE.
9925 (win32_attach): Use coredll.dll on Windows CE.
9926 (win32_kill): Close current process and current
9927 thread handles.
9928 (win32_detach): Use coredll.dll on Windows CE.
9929 (win32_resume): Let low target handle debug registers, and
9930 step request.
9931 (handle_exception): Add/Remove initial breakpoint. Avoid
9932 non-existant WSTOPSIG on Windows CE.
9933 (win32_read_inferior_memory): Cast to remove warning.
9934 (win32_arch_string): Go through the low target.
9935 (initialize_low): Call set_breakpoint_data with the low
9936 target's breakpoint.
9937 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9938 FOP_REGNUM, mappings): Move to ...
9939 * win32-i386-low.c: ... here.
9940 * win32-low.c (win32_thread_info): Move to ...
9941 * win32-low.h: ... here.
9942 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9943 win32-arm-low.c and wincecompat.c.
9944 (all:): Add $EXEEXT.
9945 (install-only:): Likewise.
9946 (gdbserver:): Likewise.
9947 (gdbreplay:): Likewise.
9948 * config.in: Regenerate.
9949 * configure: Regenerate.
9950
41093d81
PA
99512007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9952
9953 * win32-low.c: Rename typedef thread_info to
9954 win32_thread_info throughout.
9955
544afa54
PA
99562007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9957
9958 * win32-i386-low.c: Rename to ...
9959 * win32-low.c: ... this.
9960 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9961 * Makefile.in: Likewise.
9962
bce7165d
PA
99632007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9964
9965 * remote-utils.c (monitor_output): Constify msg parameter.
9966 * server.h (monitor_output): Likewise.
9967 * win32-i386-low.c (handle_output_debug_string): New.
9968 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9969 handle_output_debug_string.
9970 (get_child_debug_event): Likewise.
9971
506c7aa0
DJ
99722007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9973
9974 * server.c (main): Correct strtoul check.
9975
42c81e2a
DJ
99762007-03-27 Jon Ringle <jon@ringle.org>
9977
9978 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9979
9453113a
DJ
99802007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9981
9982 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9983
64a69107
DJ
99842007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9985
9986 * terminal.h: Check HAVE_SGTTY_H.
9987
99882007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9989
9990 * remote-utils.c (remote_open): Print out the assigned port number.
9991
c74d0ad8
DJ
99922007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9993
9994 * remote-utils.c (monitor_output): New function.
9995 * server.c (debug_threads): Define here.
9996 (monitor_show_help): New function.
9997 (handle_query): Handle qRcmd.
9998 (main): Do not handle 'd' packet.
9999 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10000 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10001 of debug_threads.
10002
de7c3b4a
PA
100032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10004
10005 * Makefile.in (EXEEXT): New.
10006 (clean): Use $(EXEEXT).
10007
ef57601b
PA
100082007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10009
10010 * target.h (target_ops): Rename send_signal to request_interrupt,
10011 and remove enum target_signal parameter.
10012 * linux-low.c (linux_request_interrupt): Rename from
10013 linux_send_signal, and always send SIGINT.
10014 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10015 and always send SIGINT.
10016 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10017 of send_signal.
10018 (input_interrupt): Likewise.
10019
820f2bda
PA
100202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10021
10022 * server.c (get_features_xml): Check if target implemented
10023 arch_string.
10024 * win32-i386-low.c (win32_arch_string): New.
10025 (win32_target_ops): Add win32_arch_string as arch_string member.
10026
ab39bf24
UW
100272007-02-22 Markus Deuling <deuling@de.ibm.com>
10028
10029 * spu-low.c (spu_arch_string): New.
10030 (spu_target_ops): Add spu_arch_string.
10031
61ff6e04
DJ
100322007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10033
10034 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10035 * configure.ac: Do not check for terminal.h.
10036 * configure, config.in: Regenerated.
10037
fb1e4ffc
DJ
100382007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10039
10040 * Makefile.in (OBS): Add $(XML_BUILTIN).
10041 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10042 (clean): Update.
10043 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10044 (arm-with-iwmmxt.c): New.
10045 * config.in, configure: Regenerate.
10046 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10047 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10048 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10049 (arm*-*-linux*): Add iWMMXt and regset support.
10050 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10051 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10052 (arm_store_wmmxregset, target_regsets): New.
10053 * server.c (get_features_xml): Take annex argument. Check builtin
10054 XML documents.
10055 (handle_query): Handle multiple annexes.
10056
0f48aa01
DJ
100572007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10058
10059 * remote-utils.c [USE_WIN32API] (read, write): Define.
10060 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10061 write.
10062
23181151
DJ
100632007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10064
10065 * linux-i386-low.c (the_low_target): Set arch_string.
10066 * linux-x86-64-low.c (the_low_target): Likewise.
10067 * linux-low.c (linux_arch_string): New.
10068 (linux_target_ops): Add it.
10069 * linux-low.h (struct linux_target_ops): Add arch_string.
10070 * server.c (write_qxfer_response): Use const void * for DATA.
10071 (get_features_xml): New.
10072 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10073 * target.h (struct target_ops): Add arch_string method.
10074
9d606399
DJ
100752007-01-03 Denis Pilat <denis.pilat@st.com>
10076 Daniel Jacobowitz <dan@codesourcery.com>
10077
10078 * linux-low.c (linux_kill): Handle being called with no threads.
10079 * win32-i386-low.c (win32_kill): Likewise.
10080 (get_child_debug_event): Clear current_process_handle.
10081
100822006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10083 Daniel Jacobowitz <dan@codesourcery.com>
10084
10085 * remote-utils.c (remote_open): Check the type of specified
10086 serial port devices before opening them.
10087 * server.c (main): Kill the inferior if an error occurs during
10088 the first remote_open.
10089
a5e13d24
DJ
100902006-12-05 Markus Deuling <deuling@de.ibm.com>
10091
10092 * README: Update supported targets.
10093
186947f7
DJ
100942006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10095
10096 * Makefile.in (clean): Remove reg-mips64.c.
10097 (reg-mips64.c, reg-mips64.o): New rules.
10098 * configure.srv: Handle mips64. Include regset support for mips.
10099 * linux-mips-low.c (union mips_register): New.
10100 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10101 (mips_breakpoint, mips_breakpoint_at): Use int.
10102 (mips_collect_register, mips_supply_register)
10103 (mips_collect_register_32bit, mips_supply_register_32bit)
10104 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10105 (mips_store_fpregset, target_regsets): New.
10106 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10107
a13e2c95
UW
101082006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10109
10110 * configure.srv: Add target "spu*-*-*".
10111 * Makefile.in (clean): Remove reg-spu.c.
10112 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10113 * spu-low.c: New file.
10114
cb7283db
DJ
101152006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * configure.ac: Correct td_thr_tls_get_addr test.
10118 * configure: Regenerated.
10119
89be2091
DJ
101202006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10121
10122 * linux-low.c (linux_wait_for_event): Reformat. Use the
10123 pass_signals array.
10124 * remote-utils.c (decode_address_to_semicolon): New.
10125 * server.c (pass_signals, handle_general_set): New.
10126 (handle_query): Mention QPassSignals for qSupported.
10127 (main): Call handle_general_set.
10128 * server.h (pass_signals, decode_address_to_semicolon): New.
10129
000ef4f0
DJ
101302006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10131
10132 * server.c (handle_query): Correct error handling for read_auxv.
10133
b7149293
UW
101342005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10135
10136 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10137 and srv_linux_thread_db to yes.
10138 * linux-s390-low.c (s390_fill_gregset): New function.
10139 (target_regsets): Define data structure.
10140
dae5f5cf
DJ
101412006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10144 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10145 * config.in, configure: Regenerated.
10146 * inferiors.c (gdb_id_to_thread): New function.
10147 (gdb_id_to_thread_id): Use it.
10148 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10149 * linux-low.h (struct process_info): Add th member.
10150 (thread_db_get_tls_address): New prototype.
10151 * remote-utils.c (decode_address): Make non-static.
10152 * server.c (handle_query): Handle qGetTLSAddr.
10153 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10154 * target.h (struct target_ops): Add get_tls_address.
10155 * thread-db.c (maybe_attach_thread): Save the thread handle.
10156 (thread_db_get_tls_address): New.
10157
32ca6d61
DJ
101582006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10159
10160 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10161 (linux_resume_one_process): Take a siginfo_t *. Update all
10162 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10163 (struct pending_signals): Add a siginfo_t.
10164 (linux_wait_for_process): Always set last_status.
10165 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10166 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10167 * linux-low.h (struct process_info): Add last_status.
10168
5ffff7c1
DJ
101692006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10170
10171 * remote-utils.c (try_rle): New function.
10172 (putpkt_binary): Use it.
10173
8695c747
DJ
101742006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10175
10176 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10177 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10178 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10179 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10180 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10181 point registers.
10182
290fadea
RS
101832006-08-08 Richard Sandiford <richard@codesourcery.com>
10184
10185 * server.c (terminal_fd): New variable.
10186 (old_foreground_pgrp): Likewise.
10187 (restore_old_foreground_pgrp): New function.
10188 (start_inferior): Record the terminal file descriptor in terminal_fd
10189 and its original foreground group in old_foreground_pgrp. Register
10190 restore_old_foreground_pgrp with atexit().
10191
9f2e1e63
DJ
101922006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10193
10194 * server.c (handle_query): Correct qPart to qXfer.
10195
b80864fb
DJ
101962006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * configure.ac: Check for more headers which are missing on
10199 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10200 * configure.srv: Add Cygwin and mingw32.
10201 * remote-utils.c: Don't include headers unconditionally which
10202 are missing on mingw32. Include <winsock.h> for mingw32.
10203 (remote_open): Adjust for mingw32 support. Flush
10204 standard error after writing to it.
10205 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10206 (unblock_async_io, enable_async_io, disable_async_io)
10207 (readchar, getpkt): Update for Winsock support.
10208 (prepare_resume_reply): Expect a protocol signal number.
10209 * server.c: Disable <sys/wait.h> on mingw32.
10210 (start_inferior): Adjust for mingw32 support. Flush
10211 standard error after writing to it.
10212 (attach_inferior): Likewise. Use protocol signal
10213 numbers.
10214 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10215 and names.
10216 * win32-i386-low.c: New file.
10217 * Makefile.in (XM_CLIBS): Set.
10218 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10219 (win32-i386-low.o): New dependency rule.
10220 * linux-low.c (linux_wait): Use target signal numbers.
10221 * target.h (struct target_ops): Doc fix.
10222 * server.h (target_signal_to_name): New prototype.
10223 * gdbreplay.c: Don't include headers unconditionally which
10224 are missing on mingw32. Include <winsock.h> for mingw32.
10225 (remote_close, remote_open): Adjust for Winsock support.
10226 * configure, config.in: Regenerated.
10227
0876f84a
DJ
102282006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10229
10230 * server.c (decode_xfer_read, write_qxfer_response): New.
10231 (handle_query): Take a packet length argument. Handle
10232 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10233 the qSupported response.
10234 (main): Update call to handle_query.
10235
01f9e8fa
DJ
102362006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10239 (putpkt_binary): Renamed from putpkt and adjusted for binary
10240 data.
10241 (putpkt): New wrapper for putpkt_binary.
10242 (readchar): Don't mask off the high bit.
10243 (decode_X_packet): New function.
10244 * server.c (main): Call putpkt_binary if a handler sets the packet
10245 length. Save the length of the incoming packet. Handle 'X'.
10246 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10247
be2a5f71
DJ
102482006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10249
10250 * server.c (handle_query): Handle qSupported.
10251
ea025f5f
DJ
102522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10253
10254 * remote-utils.c (all_symbols_looked_up): New variable.
10255 (look_up_one_symbol): Check it.
10256 * server.h (look_up_one_symbol): New declaration.
10257 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10258
9308fc88
DJ
102592006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10260
10261 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10262 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10263 (PTRACE_GET_THREAD_AREA): Define.
10264 (ps_get_thread_area): New function.
10265
52fb6437
NS
102662006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10267
10268 * configure.srv (m68k*-*-uclinux*): New target.
10269 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10270 (linux_resume_one_process): Remove extraneous cast.
10271 (linux_read_offsets): New.
10272 (linux_target_op): Add linux_read_offsets on mmuless systems.
10273 * server.c (handle_query): Add qOffsets logic.
10274 * target.h (struct target_ops): Add read_offsets.
10275
21b0f40c
DJ
102762006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10279 (PTRACE_GET_THREAD_AREA): Define.
10280 (ps_get_thread_area): New function.
10281 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10282 (linux-x86-64-low.o): Update.
10283
0050a760
DJ
102842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10285
10286 * configure.ac: Remove checks for prfpregset_t.
10287 * gdb_proc_service.h: New file.
10288 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10289 new "gdb_proc_service.h".
10290 * proc-service.c: Likewise.
10291 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10292 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10293 * Makefile.in (gdb_proc_service_h): Updated.
10294 * configure, config.in: Regenerated.
10295
b92a518e
DJ
102962006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10297
10298 * remote-utils.c (prepare_resume_reply): Move declaration
10299 of gdb_id_from_wait to the top of the block.
10300
545587ee
DJ
103012006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * linux-low.c (regsets_store_inferior_registers): Read the regset
10304 from the target before filling it.
10305
9db87ebd
DJ
103062006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10307
10308 * server.c (attach_inferior): Return SIGTRAP for a successful
10309 attach.
10310
dd24457d
DJ
103112006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10312
10313 * Makefile.in (OBS): Add version.o.
10314 (STAGESTUFF): Delete.
10315 (version.o): Add dependencies.
10316 (version.c): Replace rule.
10317 (clean): Remove version.c.
10318 * server.c (gdbserver_version): New.
10319 (gdbserver_usage): Use printf.
10320 (main): Handle --version and --help.
10321 * server.h (version, host_name): Add declarations.
10322
6f0f660e
EZ
103232005-12-23 Eli Zaretskii <eliz@gnu.org>
10324
889bf7c5
PA
10325 * linux-arm-low.c:
10326 * linux-arm-low.c:
10327 * inferiors.c:
10328 * i387-fp.h:
10329 * i387-fp.c:
10330 * gdbreplay.c:
10331 * regcache.c:
10332 * proc-service.c:
10333 * mem-break.h:
10334 * mem-break.c:
10335 * linux-x86-64-low.c:
10336 * linux-sh-low.c:
10337 * linux-s390-low.c:
10338 * linux-ppc64-low.c:
10339 * linux-ppc-low.c:
10340 * linux-mips-low.c:
10341 * linux-m68k-low.c:
10342 * linux-m32r-low.c:
10343 * linux-low.h:
10344 * linux-low.c:
10345 * linux-ia64-low.c:
10346 * linux-i386-low.c:
10347 * linux-crisv32-low.c:
10348 * thread-db.c:
10349 * terminal.h:
10350 * target.h:
10351 * target.c:
10352 * server.h:
10353 * server.c:
10354 * remote-utils.c:
10355 * regcache.h:
10356 * utils.c:
10357 * Makefile.in:
10358 * configure.ac:
6f0f660e
EZ
10359 * gdbserver.1: Add (C) after Copyright. Update the FSF
10360 address.
10361
9d1fb177
DJ
103622005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10363
10364 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10365 (arm_breakpoint_at): Recognize both breakpoints.
10366 (the_low_target): Use the correct breakpoint instruction.
10367
011a70c2
DJ
103682005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10369
10370 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10371 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10372 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10373 (the_low_target): Update.
10374
7fb85e41
AS
103752005-10-25 Andreas Schwab <schwab@suse.de>
10376
10377 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10378
10379 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10380 (ia64_num_regs): Reduce to 462.
10381
3db0444b
DJ
103822005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10383
10384 * acinclude.m4: Correct quoting.
10385 * aclocal.m4: Regenerated.
10386
10387 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10388 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10389 (thread_db_init): Call thread_db_err_str.
10390 * configure.ac: Check for TD_VERSION.
10391 * config.in, configure: Regenerated.
10392
bee0189a
DJ
103932005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10394
10395 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10396
e9d25b98
DJ
103972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10398
10399 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10400 is not available. Define HAVE_PTRACE_GETREGS if it is.
10401 * config.in, configure: Regenerated.
10402 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10403 * linux-i386-low.c, linux-m68k-low.c: Update to use
10404 HAVE_PTRACE_GETREGS.
10405 * linux-low.c (regsets_fetch_inferior_registers)
10406 (regsets_store_inferior_registers): Only return 0 if we processed
10407 GENERAL_REGS.
10408 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10409 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10410
a06660f7
DJ
104112005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10412
10413 * inferiors.c (struct thread_info): Add gdb_id.
10414 (add_thread): Add gdb_id argument.
10415 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10416 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10417 calls to add_thread.
10418 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10419 * server.c (handle_query): Use thread_to_gdb_id.
10420 (handle_v_cont, main): Use gdb_id_to_thread_id.
10421 * server.h (add_thread): Update prototype.
10422 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10423 prototypes.
10424
5a1f5858
DJ
104252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10428 left-padded registers.
10429 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10430 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10431
e122f1f5
SE
104322005-07-01 Steve Ellcey <sje@cup.hp.com>
10433
10434 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10435 * configure: Regenerate.
10436 * config.in: Regenerate.
10437 * server.h (NEED_DECLARATION_STRERROR):
10438 Replace with !HAVE_DECL_STRERROR.
10439
d592fa2f
DJ
104402005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10441
10442 * linux-low.c (linux_wait, linux_send_signal): Don't test
10443 an unsigned long variable for > 0 if it could be MAX_ULONG.
10444 * server.c (myresume): Likewise.
10445 * target.c (set_desired_inferior): Likewise.
10446
ccbd4912
MK
104472005-06-13 Mark Kettenis <kettenis@gnu.org>
10448
10449 * configure.ac: Simplify and improve check for socklen_t.
10450 * configure, config.in: Regenerate.
10451
f450004a
DJ
104522005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * acconfig.h: Remove.
10455 * configure.ac: Add a test for socklen_t. Use three-argument
10456 AC_DEFINE throughout.
10457 * config.in: Regenerated using autoheader 2.59.
10458 * configure: Regenerated.
10459
10460 * gdbreplay.c (socklen_t): Provide a default.
10461 (remote_open): Use socklen_t.
10462 * remote-utils.c (socklen_t): Provide a default.
10463 (remote_open): Use socklen_t.
10464 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10465 unsigned char.
10466
10467 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10468 char for buffers.
10469 * linux-low.c (linux_read_memory, linux_write_memory)
10470 (linux_read_auxv): Likewise.
10471 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10472 (check_mem_write): Likewise.
10473 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10474 Likewise.
10475 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10476 (registers_from_string, register_data): Likewise.
10477 * server.c (handle_query, main): Likewise.
10478 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10479 (decode_M_packet): Likewise.
10480 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10481 * target.h (struct target_ops): Update read_memory, write_memory,
10482 and read_auxv.
10483 (read_inferior_memory, write_inferior_memory): Update.
10484 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10485 to unsigned char *.
10486 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10487 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10488 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10489 linux-s390-low.c, linux-sh-low.c: Update for changes in
10490 read_inferior_memory and the_low_target->breakpoint.
10491
eee84df1
DJ
104922005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10493
10494 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10495 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10496 * configure.srv: Add powerpc64-*-linux*.
10497 * linux-ppc64-low.c: New file.
10498
45b134e5
OF
104992005-05-23 Orjan Friberg <orjanf@axis.com>
10500
10501 * linux-cris-low.c: New file with support for CRIS.
10502 * linux-crisv32-low.c: Ditto for CRISv32.
10503 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10504 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10505 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10506 reg-crisv32.o, and reg-crisv32.c to make rules.
10507 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10508 recognized targets.
10509
48d93c75
UW
105102005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10511
10512 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10513 of sizeof (PTRACE_XFER_TYPE).
10514 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10515
e013ee27
OF
105162005-05-12 Orjan Friberg <orjanf@axis.com>
10517
889bf7c5 10518 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10519 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10520 pointers for hardware watchpoint support.
10521 * linux-low.h (struct linux_target_ops): Ditto.
10522 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10523 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10524 to linux_target_ops.
10525 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10526 reply packet.
10527 * server.c (main): Recognize 'Z' and 'z' packets.
10528
b0ded00b
UW
105292005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10530
10531 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10532 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10533 (the_low_target): Add new members.
10534
8643e2ad
DJ
105352005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10536
10537 * proc-service.c (ps_lgetregs): Search all_processes instead of
10538 all_threads.
10539
fc620387
DJ
105402005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10541
10542 * server.c (start_inferior): Change return type to int.
10543 (attach_inferior): Change sigptr to int *.
10544 (handle_v_cont, handle_v_requests): Change signal to int *.
10545 (main): Change signal to int.
10546
105472005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10548
10549 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10550 * configure.srv: Add m32r*-*-linux*.
10551 * linux-m32r-low.c: New file.
10552
e0e76420
DJ
105532005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10554
10555 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10556
a1928bad
DJ
105572005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10560 Take unsigned long arguments for PIDs.
10561 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10562 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10563 (wait_for_sigstop, linux_resume_one_process)
10564 (regsets_fetch_inferior_registers, linux_send_signal)
10565 (linux_read_auxv): Likewise. Update the types of variables holding
10566 PIDs. Update format string specifiers.
10567 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10568 * remote-utils.c (prepare_resume_reply): Likewise.
10569 * server.c (cont_thread, general_thread, step_thread)
10570 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10571 unsigned long.
10572 (handle_query): Update format specifiers.
10573 (handle_v_cont, main): Use strtoul for thread IDs.
10574 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10575 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10576 (general_thread, step_thread, thread_from_wait)
10577 (old_thread_from_wait): Update.
10578 * target.h (struct thread_resume): Use unsigned long for THREAD.
10579 (struct target_ops): Use unsigned long for arguments to attach and
10580 thread_alive.
10581
dcdb98d2
DJ
105822005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10583
10584 * acinclude.m4: Include bfd/bfd.m4 directly.
10585 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10586 <agriffis@toolchain.org>.
10587 * aclocal.m4, configure: Regenerated.
10588
bec39cab
AC
105892005-01-07 Andrew Cagney <cagney@gnu.org>
10590
10591 * configure.ac: Rename configure.in, require autoconf 2.59.
10592 * configure: Re-generate.
10593
434c4c77
DJ
105942004-12-08 Daniel Jacobowitz <dan@debian.org>
10595
10596 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10597 LIBS when finished.
10598 * aclocal.m4: Regenerated.
10599 * configure: Regenerated.
10600
db1d3e1b
AS
106012004-11-21 Andreas Schwab <schwab@suse.de>
10602
10603 * linux-m68k-low.c (m68k_num_gregs): Define.
10604 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10605 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10606 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10607 (m68k_breakpoint_at): New. Add to the_low_target.
10608
10609 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10610 srv_linux_thread_db to yes.
10611
43360365
JB
106122004-10-20 Joel Brobecker <brobecker@gnat.com>
10613
10614 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10615 (ARCH_SET_FS): Likewise.
10616 (ARCH_GET_FS): Likewise.
10617 (ARCH_GET_GS): Likewise.
10618
fd500816
DJ
106192004-10-16 Daniel Jacobowitz <dan@debian.org>
10620
10621 * linux-i386-low.c (ps_get_thread_area): New.
10622 * linux-x86-64-low.c (ps_get_thread_area): New.
10623 * linux-low.c: Include <sys/syscall.h>.
10624 (linux_kill_one_process): Don't kill the first thread here.
10625 (linux_kill): Kill the first thread here.
10626 (kill_lwp): New function.
10627 (send_sigstop, linux_send_signal): Use it.
10628 * proc-service.c: Clean up #ifdefs.
10629 (fpregset_info): Delete.
10630 (ps_lgetregs): Update and enable implementation.
10631 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10632 implementations.
10633 * remote-utils.c (struct sym_cache, symbol_cache): New.
10634 (input_interrupt): Print a clearer message.
10635 (async_io_enabled): New variable.
10636 (enable_async_io, disable_async_io): Use it. Update comments.
10637 (look_up_one_symbol): Use the symbol cache.
10638 * thread-db.c (thread_db_look_up_symbols): New function.
10639 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10640
f6de3c42
DJ
106412004-10-16 Daniel Jacobowitz <dan@debian.org>
10642
10643 * configure.in: Test for -rdynamic.
10644 * configure: Regenerated.
10645 * Makefile (INTERNAL_LDFLAGS): New.
10646 (gdbserver, gdbreplay): Use it.
10647
2c0fc042
AC
106482004-09-02 Andrew Cagney <cagney@gnu.org>
10649
10650 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10651
075b3282
DJ
106522004-03-23 Daniel Jacobowitz <drow@mvista.com>
10653
10654 * linux-low.c (linux_wait): Clear all_processes list also.
10655
fa6a77dc
DJ
106562004-03-12 Daniel Jacobowitz <drow@mvista.com>
10657
10658 * linux-low.c: Include <errno.h>. Remove extern declaration of
10659 errno.
10660
6d782a97
DJ
106612004-03-12 Daniel Jacobowitz <drow@mvista.com>
10662
10663 * gdbreplay.c, server.h, utils.c: Update copyright years.
10664
3a7fb99b
DJ
106652004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10666
10667 * server.c (main): Print child status or termination signal from
10668 variable 'signal', not 'sig'.
10669
c3e735a6
DJ
106702004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10671
10672 * linux-low.c (linux_read_memory): Change return type to
10673 int. Check for and return error from ptrace().
10674 * target.c (read_inferior_memory): Change return type to int. Pass
10675 back return status from the_target->read_memory().
10676 * target.h (struct target_ops): Adapt *read_memory() prototype.
10677 Update comment.
10678 (read_inferior_memory): Adapt prototype.
10679 * server.c (main): Return an error packet if
10680 read_inferior_memory() returns an error.
10681
a59d1c82
DJ
106822004-03-04 Daniel Jacobowitz <drow@mvista.com>
10683
10684 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10685 Unify with other clean targets.
10686
dc3f8883
DJ
106872004-02-29 Daniel Jacobowitz <drow@mvista.com>
10688
10689 * server.c (handle_v_cont): Call set_desired_inferior.
10690
89a208da
DJ
106912004-02-29 Daniel Jacobowitz <drow@mvista.com>
10692
10693 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10694
62ea82f5
DJ
106952004-02-29 Daniel Jacobowitz <drow@mvista.com>
10696
10697 * linux-low.c (linux_wait): Unblock async I/O.
10698 (linux_resume): Block and enable async I/O.
10699 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10700 * server.h (block_async_io, unblock_async_io): Add prototypes.
10701
6910d122
DJ
107022004-02-29 Daniel Jacobowitz <drow@mvista.com>
10703
10704 * remote-utils.c (remote_open): Print a status notice after
10705 opening a TCP port.
10706 * server.c (attach_inferior): Print a status notice after
10707 attaching.
10708
107092004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10710
10711 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10712
c89dc5d4
DJ
107132004-02-26 Daniel Jacobowitz <drow@mvista.com>
10714
10715 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10716 error packet.
10717 * server.c, target.h: Update copyright years.
10718
4b8dad4a
RM
107192004-02-25 Roland McGrath <roland@redhat.com>
10720
10721 * target.h (struct target_ops): New member `read_auxv'.
10722 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10723 * linux-low.c (linux_read_auxv): New function.
10724 (linux_target_ops): Initialize `read_auxv' member to that.
10725
d7446758
JB
107262004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10727
10728 Committed by Jim Blandy <jimb@redhat.com>.
10729
10730 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10731 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10732 instead of GPR_SIZE to distiguish s390 and s390x targets.
10733
5544ad89
DJ
107342004-01-31 Daniel Jacobowitz <drow@mvista.com>
10735
10736 * linux-low.c: Update copyright year.
10737 (check_removed_breakpoint): Clear pending_is_breakpoint.
10738 (linux_set_resume_request, linux_queue_one_thread)
10739 (resume_status_pending_p): New functions.
10740 (linux_continue_one_thread): Use process->resume.
10741 (linux_resume): Only resume threads if there are no pending events.
10742 * linux-low.h (struct process_info): Add resume request
10743 pointer.
10744
2a68b70e
DJ
107452004-01-30 Daniel Jacobowitz <drow@mvista.com>
10746
10747 * regcache.c (new_register_cache): Clear the allocated register
10748 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10749
64386c31
DJ
107502003-10-13 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * linux-low.c (linux_resume): Take a struct thread_resume *
10753 argument.
10754 (linux_wait): Update call.
10755 (resume_ptr): New static variable.
10756 (linux_continue_one_thread): Renamed from
10757 linux_continue_one_process. Use resume_ptr.
10758 (linux_resume): Use linux_continue_one_thread.
10759 * server.c (handle_v_cont, handle_v_requests): New functions.
10760 (myresume): New function.
10761 (main): Handle 'v' case.
10762 * target.h (struct thread_resume): New type.
10763 (struct target_ops): Change argument of "resume" to struct
10764 thread_resume *.
10765 (myresume): Delete macro.
10766
c938e9b0
L
107672003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10768
10769 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10770 (uninstall): Support DESTDIR.
10771
7f313d07
BC
10772Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10773
10774 * configure.srv: Add xscale*linux copy of arm*linux entry.
10775
3b2fc2ea
DJ
107762003-07-24 Daniel Jacobowitz <drow@mvista.com>
10777
10778 * linux-arm-low.c (arm_reinsert_addr): New function.
10779 (the_low_target): Add arm_reinsert_addr.
10780
1c0a559e
MK
107812003-07-08 Mark Kettenis <kettenis@gnu.org>
10782
10783 * mem-break.c: Remove whitespace at end of file.
10784
43d5792c
DJ
107852003-06-28 Daniel Jacobowitz <drow@mvista.com>
10786
10787 * configure.in: Check whether we need to prototype strerror.
10788 * server.h: Optionally prototype strerror.
10789 * gdbreplay.c (perror_with_name): Use strerror.
10790 * linux-low.c (linux_attach_lwp): Use strerror.
10791 * utils.c (perror_with_name): Use strerror.
10792 * config.in, configure: Regenerated.
10793
c8a86edf
DJ
107942003-06-28 Daniel Jacobowitz <drow@mvista.com>
10795
10796 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10797 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10798
73d37363
DJ
107992003-06-20 Daniel Jacobowitz <drow@mvista.com>
10800
10801 * Makefile.in (SFILES): Update.
10802 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10803 low-sun3.c: Remove files.
10804
6ad8ae5c
DJ
108052003-06-17 Daniel Jacobowitz <drow@mvista.com>
10806
10807 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10808 (linux_detach_one_process, linux_detach): New functions.
10809 (linux_target_ops): Add linux_detach.
10810 * server.c (main): Handle 'D' packet.
10811 * target.h (struct target_ops): Add "detach" member.
10812 (detach_inferior): Define.
10813
1581182a
MK
108142003-06-13 Mark Kettenis <kettenis@gnu.org>
10815
10816 From Kelley Cook <kelleycook@wideopenwest.com>:
10817 * configure.srv: Accept i[34567]86 variants.
10818
e5379b03
DJ
108192003-06-05 Daniel Jacobowitz <drow@mvista.com>
10820
10821 * linux-low.c (linux_wait_for_event): Correct comment typos.
10822 (linux_resume_one_process): Call check_removed_breakpoint.
10823 (linux_send_signal): New function.
10824 (linux_target_ops): Add linux_send_signal.
10825 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10826 of kill.
10827 * target.h (struct target_ops): Add send_signal.
10828
2ff29de4
JB
108292003-05-29 Jim Blandy <jimb@redhat.com>
10830
10831 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10832 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10833 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10834 away part of the register's value.
10835
254787d4
DJ
108362003-03-26 Daniel Jacobowitz <drow@mvista.com>
10837
10838 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10839 (linux_wait_for_event, linux_init_signals): Likewise.
10840
94e10508
DJ
108412003-03-17 Daniel Jacobowitz <drow@mvista.com>
10842
10843 * configure.in: Check for stdlib.h.
10844 * configure: Regenerated.
10845 * config.in: Regenerated.
10846
4c0711e0
DJ
108472003-01-04 Andreas Schwab <schwab@suse.de>
10848
10849 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10850
ef66e766
AC
108512003-01-02 Andrew Cagney <ac131313@redhat.com>
10852
10853 * Makefile.in: Remove obsolete code.
10854
a1358604
DJ
108552002-11-20 Daniel Jacobowitz <drow@mvista.com>
10856
10857 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10858 defined(PT_FPR0_HI).
10859
23ce3b1c
DJ
108602002-11-17 Stuart Hughes <seh@zee2.com>
10861
10862 * linux-arm-low.c (arm_num_regs): Increase.
10863 (arm_regmap): Include status register.
10864
108652002-11-17 Daniel Jacobowitz <drow@mvista.com>
10866
10867 * linux-low.c (register_addr): Remove incorrect -1 check.
10868
a9fa9f7d
DJ
108692002-08-29 Daniel Jacobowitz <drow@mvista.com>
10870
10871 * linux-low.c (linux_create_inferior): Call setpgid. Return
10872 the new PID.
10873 (unstopped_p, linux_signal_pid): Remove.
10874 (linux_target_ops): Remove linux_signal_pid.
10875 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10876 global instead of target method.
10877 * target.h (struct target_ops): Remove signal_pid. Update comment
10878 for create_inferior.
10879 * server.c (signal_pid): New variable.
10880 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10881 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10882 (attach_inferior): Set signal_pid.
10883
17574093
DJ
108842002-08-23 Daniel Jacobowitz <drow@mvista.com>
10885
10886 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10887
108882002-08-20 Jim Blandy <jimb@redhat.com>
10889
10890 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10891 default for this.
10892
108932002-08-01 Andrew Cagney <cagney@redhat.com>
10894
10895 * Makefile.in: Make chill references obsolete.
10896
108972002-07-24 Kevin Buettner <kevinb@redhat.com>
10898
10899 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10900 * configure: Regenerate.
10901 * config.in: Regenerate.
10902
109032002-07-09 David O'Brien <obrien@FreeBSD.org>
10904
10905 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10906 (perror_with_name, remote_close, remote_open, expect, play): Static.
10907
109082002-07-04 Michal Ludvig <mludvig@suse.cz>
10909
4b8dad4a 10910 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10911 byte offsets instead of an array of indexes.
10912 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10913
109142002-06-13 Daniel Jacobowitz <drow@mvista.com>
10915
10916 * regcache.c: Add comment.
10917
109182002-06-11 Daniel Jacobowitz <drow@mvista.com>
10919
10920 * thread-db.c: New file.
10921 * proc-service.c: New file.
10922 * acinclude.m4: New file.
10923 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10924 proc-service.o, and thread-db.o.
10925 (linux-low.o): Add USE_THREAD_DB.
10926 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10927 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10928 * aclocal.m4: Regenerated.
10929 * config.in: Regenerated.
10930 * configure: Regenerated.
10931 * configure.in: Check for proc_service.h, sys/procfs.h,
10932 thread_db.h, and linux/elf.h headrs.
10933 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10934 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10935 Check for -lthread_db and thread support.
10936 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10937 PowerPC, and SuperH.
10938 * i387-fp.c: Constify arguments.
10939 * i387-fp.h: Likewise.
10940 * inferiors.c: (struct thread_info): Renamed from
10941 `struct inferior_info'. Remove PID member. Use generic inferior
10942 list header. All uses updated.
10943 (inferiors, signal_pid): Removed.
10944 (all_threads): New variable.
10945 (get_thread): Define.
10946 (add_inferior_to_list): New function.
10947 (for_each_inferior): New function.
10948 (change_inferior_id): New function.
10949 (add_inferior): Removed.
10950 (remove_inferior): New function.
10951 (add_thread): New function.
10952 (free_one_thread): New function.
10953 (remove_thread): New function.
10954 (clear_inferiors): Use for_each_inferior and free_one_thread.
10955 (find_inferior): New function.
10956 (find_inferior_id): New function.
10957 (inferior_target_data): Update argument type.
10958 (set_inferior_target_data): Likewise.
10959 (inferior_regcache_data): Likewise.
10960 (set_inferior_regcache_data): Likewise.
10961 * linux-low.c (linux_bp_reinsert): Remove.
10962 (all_processes, stopping_threads, using_thrads)
10963 (struct pending_signals, debug_threads, pid_of): New.
10964 (inferior_pid): Replace with macro.
10965 (struct inferior_linux_data): Remove.
10966 (get_stop_pc, add_process): New functions.
10967 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10968 Use add_process and add_thread.
10969 (linux_attach_lwp): New function, based on old linux_attach. Use
10970 add_process and add_thread. Set stop_expected for new threads.
10971 (linux_attach): New function.
10972 (linux_kill_one_process): New function.
10973 (linux_kill): Kill all LWPs.
10974 (linux_thread_alive): Use find_inferior_id.
10975 (check_removed_breakpoints, status_pending_p): New functions.
10976 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10977 Update. Use WNOHANG. Wait for cloned processes also. Update process
10978 struct for the found process.
10979 (linux_wait_for_event): New function.
10980 (linux_wait): Use it. Support LWPs.
10981 (send_sigstop, wait_for_sigstop, stop_all_processes)
10982 (linux_resume_one_process, linux_continue_one_process): New functions.
10983 (linux_resume): Support LWPs.
10984 (REGISTER_RAW_SIZE): Remove.
10985 (fetch_register): Use register_size instead. Call supply_register.
10986 (usr_store_inferior_registers): Likewise. Call collect_register.
10987 Fix recursive case.
10988 (regsets_fetch_inferior_registers): Improve error message.
10989 (regsets_store_inferior_registers): Add debugging.
10990 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10991 (unstopped_p, linux_signal_pid): New functions.
10992 (linux_target_ops): Add linux_signal_pid.
10993 (linux_init_signals): New function.
10994 (initialize_low): Call it. Initialize using_threads.
10995 * regcache.c (inferior_regcache_data): Add valid
10996 flag.
10997 (get_regcache): Fetch registers lazily. Add fetch argument
10998 and update all callers.
10999 (regcache_invalidate_one, regcache_invalidate): New
11000 functions.
11001 (new_register_cache): Renamed from create_register_cache.
11002 Return the new regcache.
11003 (free_register_cache): Change argument to a void *.
11004 (registers_to_string, registers_from_string): Call get_regcache
11005 with fetch flag set.
11006 (register_data): Make static. Pass fetch flag to get_regcache.
11007 (supply_register): Call get_regcache with fetch flag clear.
11008 (collect_register): Call get_regcache with fetch flag set.
11009 (collect_register_as_string): New function.
11010 * regcache.h: Update.
11011 * remote-utils.c (putpkt): Flush after debug output and use
11012 stderr.
11013 Handle input interrupts while waiting for an ACK.
11014 (input_interrupt): Use signal_pid method.
11015 (getpkt): Flush after debug output and use stderr.
11016 (outreg): Use collect_register_as_string.
11017 (new_thread_notify, dead_thread_notify): New functions.
11018 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11019 and general_thread.
11020 (look_up_one_symbol): Flush after debug output.
11021 * server.c (step_thread, server_waiting): New variables.
11022 (start_inferior): Don't use signal_pid. Update call to mywait.
11023 (attach_inferior): Update call to mywait.
11024 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11025 (main): Don't fetch/store registers explicitly. Use
11026 set_desired_inferior. Support proposed ``Hs'' packet. Update
11027 calls to mywait.
11028 * server.h: Update.
11029 (struct inferior_list, struct_inferior_list_entry): New.
11030 * target.c (set_desired_inferior): New.
11031 (write_inferior_memory): Constify.
11032 (mywait): New function.
11033 * target.h: Update.
11034 (struct target_ops): New signal_pid method.
11035 (mywait): Removed macro, added prototype.
11036
11037 * linux-low.h (regset_func): Removed.
11038 (regset_fill_func, regset_store_func): New.
11039 (enum regset_type): New.
11040 (struct regset_info): Add type field. Use new operation types.
11041 (struct linux_target_ops): stop_pc renamed to get_pc.
11042 Add decr_pc_after_break and breakpoint_at.
11043 (get_process, get_thread_proess, get_process_thread)
11044 (strut process_info, all_processes, linux_attach_lwp)
11045 (thread_db_init): New.
11046
11047 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11048 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11049 (the_low_target): Add new members.
11050 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11051 (i386_store_fpxregset): Constify.
11052 (target_regsets): Add new kind identifier.
11053 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11054 (i386_set_pc): Add debugging.
11055 (i386_breakpoint_at): New function.
11056 (the_low_target): Add new members.
11057 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11058 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11059 (mips_breakpoint_at): New.
11060 (the_low_target): Add new members.
11061 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11062 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11063 (the_low_target): Add new members.
11064 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11065 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11066 (the_low_target): Add new members.
11067 * linux-x86-64-low.c (target_regsets): Add new kind
11068 identifier.
11069
110702002-05-15 Daniel Jacobowitz <drow@mvista.com>
11071
11072 From Martin Pool <mbp@samba.org>:
11073 * server.c (gdbserver_usage): New function.
11074 (main): Call it.
11075
110762002-05-14 Daniel Jacobowitz <drow@mvista.com>
11077
11078 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11079 stop_at -> stop_pc.
11080
110812002-05-04 Andrew Cagney <ac131313@redhat.com>
11082
11083 * Makefile.in: Remove obsolete code.
11084
110852002-04-24 Michal Ludvig <mludvig@suse.cz>
11086
11087 * linux-low.c (regsets_fetch_inferior_registers),
11088 (regsets_store_inferior_registers): Removed cast to int from
11089 ptrace() calls.
11090 * regcache.h: Added declaration of struct inferior_info.
11091
110922002-04-20 Daniel Jacobowitz <drow@mvista.com>
11093
11094 * inferiors.c (struct inferior_info): Add regcache_data.
11095 (add_inferior): Call create_register_cache.
11096 (clear_inferiors): Call free_register_cache.
11097 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11098 * regcache.c (struct inferior_regcache_data): New.
11099 (registers): Remove.
11100 (get_regcache): New function.
11101 (create_register_cache, free_register_cache): New functions.
11102 (set_register_cache): Don't initialize the register cache here.
11103 (registers_to_string, registers_from_string, register_data): Call
11104 get_regcache.
11105 * regcache.h: Add prototypes.
11106 * server.h: Likewise.
11107
111082002-04-20 Daniel Jacobowitz <drow@mvista.com>
11109
11110 * mem-break.c: New file.
11111 * mem-break.h: New file.
11112 * Makefile.in: Add mem-break.o rule; update server.h
11113 dependencies.
11114 * inferiors.c (struct inferior_info): Add target_data
11115 member.
11116 (clear_inferiors): Free target_data member if set.
11117 (inferior_target_data, set_inferior_target_data): New functions.
11118 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11119 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11120 * linux-low.c (linux_bp_reinsert): New variable.
11121 (struct inferior_linux_data): New.
11122 (linux_create_inferior): Use set_inferior_target_data.
11123 (linux_attach): Likewise. Call add_inferior.
11124 (linux_wait_for_one_inferior): New function.
11125 (linux_wait): Call it.
11126 (linux_write_memory): Add const.
11127 (initialize_low): Call set_breakpoint_data.
11128 * linux-low.h (struct linux_target_ops): Add breakpoint
11129 handling members.
11130 * server.c (attach_inferior): Remove extra add_inferior
11131 call.
11132 * server.h: Include mem-break.h. Update inferior.c
11133 prototypes.
11134 * target.c (read_inferior_memory)
11135 (write_inferior_memory): New functions.
11136 * target.h (read_inferior_memory)
11137 (write_inferior_memory): Change macros to prototypes.
11138 (struct target_ops): Update comments. Add const to write_memory
11139 definition.
11140
111412002-04-11 Daniel Jacobowitz <drow@mvista.com>
11142
11143 * linux-low.c (usr_store_inferior_registers): Support
11144 registers which are allowed to fail to store.
11145 * linux-low.h (linux_target_ops): Likewise.
11146 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11147 (ppc_cannot_store_register): FPSCR may not be storable.
11148
111492002-04-09 Daniel Jacobowitz <drow@mvista.com>
11150
11151 * server.h: Include <string.h> if HAVE_STRING_H.
11152 * ChangeLog: Correct paths in last ChangeLog entry.
11153
111542002-04-09 Daniel Jacobowitz <drow@mvista.com>
11155
11156 * linux-low.h: Remove obsolete prototypes.
11157 (struct linux_target_ops): New.
11158 (extern the_low_target): New.
11159 * linux-low.c (num_regs, regmap): Remove declarations.
11160 (register_addr): Use the_low_target explicitly.
11161 (fetch_register): Likewise.
11162 (usr_fetch_inferior_registers): Likewise.
11163 (usr_store_inferior_registers): Likewise.
11164 * linux-arm-low.c (num_regs): Remove.
11165 (arm_num_regs): Define.
11166 (arm_regmap): Renamed from regmap, made static.
11167 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11168 made static.
11169 (arm_cannot_store_register): Renamed from cannot_store_register,
11170 made static.
11171 (the_low_target): New.
11172 * linux-i386-low.c (num_regs): Remove.
11173 (i386_num_regs): Define.
11174 (i386_regmap): Renamed from regmap, made static.
11175 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11176 made static.
11177 (i386_cannot_store_register): Renamed from cannot_store_register,
11178 made static.
11179 (the_low_target): New.
11180 * linux-ia64-low.c (num_regs): Remove.
11181 (ia64_num_regs): Define.
11182 (ia64_regmap): Renamed from regmap, made static.
11183 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11184 made static.
11185 (ia64_cannot_store_register): Renamed from cannot_store_register,
11186 made static.
11187 (the_low_target): New.
11188 * linux-m68k-low.c (num_regs): Remove.
11189 (m68k_num_regs): Define.
11190 (m68k_regmap): Renamed from regmap, made static.
11191 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11192 made static.
11193 (m68k_cannot_store_register): Renamed from cannot_store_register,
11194 made static.
11195 (the_low_target): New.
11196 * linux-mips-low.c (num_regs): Remove.
11197 (mips_num_regs): Define.
11198 (mips_regmap): Renamed from regmap, made static.
11199 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11200 made static.
11201 (mips_cannot_store_register): Renamed from cannot_store_register,
11202 made static.
11203 (the_low_target): New.
11204 * linux-ppc-low.c (num_regs): Remove.
11205 (ppc_num_regs): Define.
11206 (ppc_regmap): Renamed from regmap, made static.
11207 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11208 made static.
11209 (ppc_cannot_store_register): Renamed from cannot_store_register,
11210 made static.
11211 (the_low_target): New.
11212 * linux-s390-low.c (num_regs): Remove.
11213 (s390_num_regs): Define.
11214 (s390_regmap): Renamed from regmap, made static.
11215 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11216 made static.
11217 (s390_cannot_store_register): Renamed from cannot_store_register,
11218 made static.
11219 (the_low_target): New.
11220 * linux-sh-low.c (num_regs): Remove.
11221 (sh_num_regs): Define.
11222 (sh_regmap): Renamed from regmap, made static.
11223 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11224 made static.
11225 (sh_cannot_store_register): Renamed from cannot_store_register,
11226 made static.
11227 (the_low_target): New.
11228 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11229 (the_low_target): New.
11230
112312002-04-09 Daniel Jacobowitz <drow@mvista.com>
11232
11233 * Makefile.in: Add stamp-h target.
11234 * configure.in: Create stamp-h.
11235 * configure: Regenerated.
11236
112372002-04-09 Daniel Jacobowitz <drow@mvista.com>
11238
11239 * inferiors.c: New file.
11240 * target.c: New file.
11241 * target.h: New file.
11242 * Makefile.in: Add target.o and inferiors.o. Update
11243 dependencies.
11244 * linux-low.c (inferior_pid): New static variable,
11245 moved from server.c.
11246 (linux_create_inferior): Renamed from create_inferior.
11247 Call add_inferior. Return 0 on success instead of a PID.
11248 (linux_attach): Renamed from myattach.
11249 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11250 (linux_thread_alive): Renamed from mythread_alive.
11251 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11252 child dies.
11253 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11254 (regsets_store_inferior_registers): Correct error message.
11255 Add missing ``return 0''.
11256 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11257 (linux_store_registers): Renamed from store_inferior_registers.
11258 (linux_read_memory): Renamed from read_inferior_memory.
11259 (linux_write_memory): Renamed from write_inferior_memory.
11260 (linux_target_ops): New structure.
11261 (initialize_low): Call set_target_ops ().
11262 * remote-utils.c (unhexify): New function.
11263 (hexify): New function.
11264 (input_interrupt): Send signals to ``signal_pid''.
11265 * server.c (inferior_pid): Remove.
11266 (start_inferior): Update create_inferior call.
11267 (attach_inferior): Call add_inferior.
11268 (handle_query): New function.
11269 (main): Call handle_query for `q' packets.
11270 * server.h: Include "target.h". Remove obsolete prototypes.
11271 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11272
112732002-04-09 Daniel Jacobowitz <drow@mvista.com>
11274
11275 * Makefile.in: Add WARN_CFLAGS. Update configury
11276 dependencies.
11277 * configure.in: Check for <string.h>
11278 * configure: Regenerate.
11279 * config.in: Regenerate.
11280 * gdbreplay.c: Include needed system headers.
11281 (remote_open): Remove strchr prototype.
11282 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11283 * regcache.c (supply_register): Change buf argument to const void *.
11284 (supply_register_by_name): Likewise.
11285 (collect_register): Change buf argument to void *.
11286 (collect_register_by_name): Likewise.
11287 * regcache.h: Add missing prototypes.
11288 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11289 * server.c (handle_query): New function.
11290 (attached): New static variable, moved out of main.
11291 (main): Quiet longjmp clobber warnings.
11292 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11293 * utils.c (error): Remove NORETURN.
11294 (fatal): Likewise.
This page took 2.101662 seconds and 4 git commands to generate.