gdbserver/event-loop.c: type mismatch
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
58c1b36c
PA
12015-07-10 Pedro Alves <palves@redhat.com>
2
3 * event-loop.c (struct callback_event) <data>: Change type to
4 gdb_client_data instance instead of gdb_client_data pointer.
5 (append_callback_event): Adjust.
6
421530db
PL
72015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8
9 * linux-aarch64-low.c: Add comments for each linux_target_ops
10 method. Remove comments already covered in target_ops and
11 linux_target_ops definitions.
12 (the_low_target): Add comments for each unimplemented method.
13
c2d65f38
YQ
142015-07-09 Yao Qi <yao.qi@linaro.org>
15
16 * linux-aarch64-low.c (aarch64_regmap): Remove.
17 (aarch64_usrregs_info): Remove.
18 (regs_info): Set field usrregs to NULL.
19
b20a6524
MM
202015-07-02 Markus Metzger <markus.t.metzger@intel.com>
21
22 * linux-low.c: Include "rsp-low.h"
23 (linux_low_encode_pt_config, linux_low_encode_raw): New.
24 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
25 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
26 (handle_btrace_enable_pt): New.
27 (handle_btrace_general_set): Support "pt".
28 (handle_btrace_conf_general_set): Support "pt:size".
29
96c97461
PL
302015-06-29 Pierre Langlois <pierre.langlois@arm.com>
31
32 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
33 Z_PACKET_SW_BP.
34
37d66942
PL
352015-06-29 Pierre Langlois <pierre.langlois@arm.com>
36
37 * linux-aarch64-low.c: Remove comment about endianness.
38 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
39 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
40 memcmp.
41
dc06243f
GB
422015-06-24 Gary Benson <gbenson@redhat.com>
43
44 * linux-i386-ipa.c (stdint.h): Do not include.
45 * lynx-i386-low.c (stdint.h): Likewise.
46 * lynx-ppc-low.c (stdint.h): Likewise.
47 * mem-break.c (stdint.h): Likewise.
48 * thread-db.c (stdint.h): Likewise.
49 * tracepoint.c (stdint.h): Likewise.
50 * win32-low.c (stdint.h): Likewise.
51
124e13d9
SM
522015-06-18 Simon Marchi <simon.marchi@ericsson.com>
53
54 * server.c (write_qxfer_response): Update call to
55 remote_escape_output.
56
909c2cda
JK
572015-06-15 Aleksandar Ristovski <aristovski@qnx.com
58 Jan Kratochvil <jan.kratochvil@redhat.com>
59
60 Merge multiple hex conversions.
61 * gdbreplay.c (tohex): Rename to 'fromhex'.
62 (logchar): Use fromhex.
63
24c05f46
JK
642015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
65
66 * server.c (handle_qxfer_libraries): Set `version' attribute for
67 <library-list>.
68
14d2069a
GB
692015-06-10 Gary Benson <gbenson@redhat.com>
70
71 * target.h (struct target_ops) <multifs_open>: New field.
72 <multifs_unlink>: Likewise.
73 <multifs_readlink>: Likewise.
74 * linux-low.c (nat/linux-namespaces.h): New include.
75 (linux_target_ops): Initialize the_target->multifs_open,
76 the_target->multifs_unlink and the_target->multifs_readlink.
77 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
78 * hostio.c (hostio_fs_pid): New static variable.
79 (hostio_handle_new_gdb_connection): New function.
80 (handle_setfs): Likewise.
81 (handle_open): Use the_target->multifs_open as appropriate.
82 (handle_unlink): Use the_target->multifs_unlink as appropriate.
83 (handle_readlink): Use the_target->multifs_readlink as
84 appropriate.
85 (handle_vFile): Handle vFile:setfs packets.
86 * server.c (handle_query): Call hostio_handle_new_gdb_connection
87 after target_handle_new_gdb_connection.
88
4b8b5e72
GB
892015-06-10 Gary Benson <gbenson@redhat.com>
90
91 * configure.ac (AC_CHECK_FUNCS): Add setns.
92 * config.in: Regenerate.
93 * configure: Likewise.
94 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
95 (linux-namespaces.o): New rule.
96 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
97
3ac2e371
GB
982015-06-09 Gary Benson <gbenson@redhat.com>
99
100 * hostio.c (handle_open): Process mode argument with
101 fileio_to_host_mode.
102
ca9b78ce
YQ
1032015-06-01 Yao Qi <yao.qi@linaro.org>
104
105 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
106 * linux-x86-low.c: Likewise.
107
bfacd19d
DB
1082015-05-28 Don Breazeal <donb@codesourcery.com>
109
110 * linux-low.c (handle_extended_wait): Initialize
111 thread_info.last_resume_kind for new fork children.
112
452003ef
PA
1132015-05-15 Pedro Alves <palves@redhat.com>
114
115 * target.h (target_handle_new_gdb_connection): Rewrite using if
116 wrapped in do/while.
117
1041a03c
JB
1182015-05-14 Joel Brobecker <brobecker@adacore.com>
119
120 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
121 * configure, config.in: Regenerate.
122 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
123 Declare typedef.
124
c269dbdb
DB
1252015-05-12 Don Breazeal <donb@codesourcery.com>
126
127 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
128 PTRACE_EVENT_VFORK_DONE.
129 (linux_low_ptrace_options, extended_event_reported): Add vfork
130 events.
131 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
132 and "vforkdone" for RSP 'T' Stop Reply Packet.
133 * server.h (report_vfork_events): Declare
134 global variable.
135
3a8a0396
DB
1362015-05-12 Don Breazeal <donb@codesourcery.com>
137
138 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
139 (the_low_target) <new_fork>: Initialize new member.
140 * linux-arm-low.c (arm_new_fork): New function.
141 (the_low_target) <new_fork>: Initialize new member.
142 * linux-low.c (handle_extended_wait): Call new target function
143 new_fork.
144 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
145 * linux-mips-low.c (mips_add_watchpoint): New function
146 extracted from mips_insert_point.
147 (the_low_target) <new_fork>: Initialize new member.
148 (mips_linux_new_fork): New function.
149 (mips_insert_point): Call mips_add_watchpoint.
150 * linux-x86-low.c (x86_linux_new_fork): New function.
151 (the_low_target) <new_fork>: Initialize new member.
152
de0d863e
DB
1532015-05-12 Don Breazeal <donb@codesourcery.com>
154
155 * linux-low.c (handle_extended_wait): Implement return value,
156 rename argument 'event_child' to 'event_lwp', handle
157 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
158 (linux_low_ptrace_options): New function.
159 (linux_low_filter_event): Call linux_low_ptrace_options,
160 use different argument fo linux_enable_event_reporting,
161 use return value from handle_extended_wait.
162 (extended_event_reported): New function.
163 (linux_wait_1): Call extended_event_reported and set
164 status to report fork events.
165 (linux_write_memory): Add pid to debug message.
166 (reset_lwp_ptrace_options_callback): New function.
167 (linux_handle_new_gdb_connection): New function.
168 (linux_target_ops): Initialize new structure member.
169 * linux-low.h (struct lwp_info) <waitstatus>: New member.
170 * lynx-low.c: Initialize new structure member.
171 * remote-utils.c (prepare_resume_reply): Implement stop reason
172 "fork" for "T" stop message.
173 * server.c (handle_query): Call handle_new_gdb_connection.
174 * server.h (report_fork_events): Declare global flag.
175 * target.h (struct target_ops) <handle_new_gdb_connection>:
176 New member.
177 (target_handle_new_gdb_connection): New macro.
178 * win32-low.c: Initialize new structure member.
179
ddcbc397
DB
1802015-05-12 Don Breazeal <donb@codesourcery.com>
181
182 * mem-break.c (APPEND_TO_LIST): Define macro.
183 (clone_agent_expr): New function.
184 (clone_one_breakpoint): New function.
185 (clone_all_breakpoints): New function.
186 * mem-break.h: Declare new functions.
187
89245bc0
DB
1882015-05-12 Don Breazeal <donb@codesourcery.com>
189
190 * linux-low.c (linux_supports_fork_events): New function.
191 (linux_supports_vfork_events): New function.
192 (linux_target_ops): Initialize new structure members.
193 (initialize_low): Call linux_check_ptrace_features.
194 * lynx-low.c (lynx_target_ops): Initialize new structure
195 members.
196 * server.c (report_fork_events, report_vfork_events):
197 New global flags.
198 (handle_query): Add new features to qSupported packet and
199 response.
200 (captured_main): Initialize new global variables.
201 * target.h (struct target_ops) <supports_fork_events>:
202 New member.
203 <supports_vfork_events>: New member.
204 (target_supports_fork_events): New macro.
205 (target_supports_vfork_events): New macro.
206 * win32-low.c (win32_target_ops): Initialize new structure
207 members.
208
835205d0
GB
2092015-05-12 Gary Benson <gbenson@redhat.com>
210
211 * server.c (handle_qxfer_exec_file): Use current process
212 if annex is empty.
213
21e94bd9
SL
2142015-05-08 Sandra Loosemore <sandra@codesourcery.com>
215
216 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
217 Remove HAVE_PTRACE_GETREGS conditionals.
218 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
219 instead of PTRACE_GETREGS and PTRACE_SETREGS.
220
45614f15
YQ
2212015-05-08 Yao Qi <yao.qi@linaro.org>
222
223 * linux-low.c (linux_supports_conditional_breakpoints): New
224 function.
225 (linux_target_ops): Install new target method.
226 * lynx-low.c (lynx_target_ops): Install NULL hook for
227 supports_conditional_breakpoints.
228 * nto-low.c (nto_target_ops): Likewise.
229 * spu-low.c (spu_target_ops): Likewise.
230 * win32-low.c (win32_target_ops): Likewise.
231 * server.c (handle_query): Check
232 target_supports_conditional_breakpoints.
233 * target.h (struct target_ops) <supports_conditional_breakpoints>:
234 New field.
235 (target_supports_conditional_breakpoints): New macro.
236
80ad801e
PA
2372015-05-06 Pedro Alves <palves@redhat.com>
238
239 PR server/18081
240 * server.c (start_inferior): If the process exits, mourn it.
241
819843c7
GB
2422015-04-21 Gary Benson <gbenson@redhat.com>
243
244 * hostio.c (fileio_open_flags_to_host): Factored out to
245 fileio_to_host_openflags in common/fileio.c. Single use
246 updated.
247
a2d5a9d7
MF
2482015-04-17 Max Filippov <jcmvbkbc@gmail.com>
249
250 * linux-xtensa-low.c (xtensa_fill_gregset)
251 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
252 XCHAL_HAVE_LOOP.
253
deb44829
MF
2542015-04-17 Max Filippov <jcmvbkbc@gmail.com>
255
256 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
257 (regs_info): Replace usrregs pointer with NULL.
258
e57f1de3
GB
2592015-04-17 Gary Benson <gbenson@redhat.com>
260
261 * target.h (struct target_ops) <pid_to_exec_file>: New field.
262 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
263 * server.c (handle_qxfer_exec_file): New function.
264 (qxfer_packets): Add exec-file entry.
265 (handle_query): Report qXfer:exec-file:read as supported packet.
266
62828379
RN
2672015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
268
269 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
270
b88bb450
GB
2712015-04-09 Gary Benson <gbenson@redhat.com>
272
273 * hostio-errno.c (errno_to_fileio_error): Remove function.
274 Update caller to use remote_fileio_to_fio_error.
275
c8f4bfdd
YQ
2762015-04-09 Yao Qi <yao.qi@linaro.org>
277
278 * linux-low.c (linux_insert_point): Call
279 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
280 (linux_remove_point): Call remove_memory_breakpoint if type is
281 raw_bkpt_type_sw.
282 * linux-x86-low.c (x86_insert_point): Don't call
283 insert_memory_breakpoint.
284 (x86_remove_point): Don't call remove_memory_breakpoint.
285
41f98f02
PA
2862015-04-01 Pedro Alves <palves@redhat.com>
287 Cleber Rosa <crosa@redhat.com>
288
289 * server.c (gdbserver_usage): Reorganize and extend the usage
290 message.
291
2bf6fb9d
PA
2922015-03-24 Pedro Alves <palves@redhat.com>
293
294 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
295 output. Also dump TRAP_TRACE.
296 (linux_low_filter_event): In debug output, distinguish a
297 resume_stop SIGSTOP from a delayed SIGSTOP.
298
369f6daa
GB
2992015-03-24 Gary Benson <gbenson@redhat.com>
300
301 * linux-x86-low.c (x86_linux_new_thread): Moved to
302 nat/x86-linux.c.
303 (x86_linux_prepare_to_resume): Likewise.
304
8e5d4070
GB
3052015-03-24 Gary Benson <gbenson@redhat.com>
306
307 * Makefile.in (x86-linux-dregs.o): New rule.
308 * configure.srv: Add x86-linux-dregs.o to relevant targets.
309 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
310 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
311 (x86_linux_dr_get): Likewise.
312 (x86_linux_dr_set): Likewise.
313 (update_debug_registers_callback): Likewise.
314 (x86_linux_dr_set_addr): Likewise.
315 (x86_linux_dr_get_addr): Likewise.
316 (x86_linux_dr_set_control): Likewise.
317 (x86_linux_dr_get_control): Likewise.
318 (x86_linux_dr_get_status): Likewise.
319 (x86_linux_update_debug_registers): Likewise.
320
2b95d440
GB
3212015-03-24 Gary Benson <gbenson@redhat.com>
322
323 * linux-x86-low.c (x86_linux_update_debug_registers):
324 New function, factored out from...
325 (x86_linux_prepare_to_resume): ...this.
326
14b0bc68
GB
3272015-03-24 Gary Benson <gbenson@redhat.com>
328
329 * linux-x86-low.c (x86_linux_dr_get): Update comments.
330 (x86_linux_dr_set): Likewise.
331 (update_debug_registers_callback): Likewise.
332 (x86_linux_dr_set_addr): Likewise.
333 (x86_linux_dr_get_addr): Likewise.
334 (x86_linux_dr_set_control): Likewise.
335 (x86_linux_dr_get_control): Likewise.
336 (x86_linux_dr_get_status): Likewise.
337 (x86_linux_prepare_to_resume): Likewise.
338
5dfe6ca8
GB
3392015-03-24 Gary Benson <gbenson@redhat.com>
340
341 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
342 Use perror_with_name. Pass string through gettext.
343 (x86_linux_dr_set): Likewise.
344
d33472ad
GB
3452015-03-24 Gary Benson <gbenson@redhat.com>
346
347 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
348 (x86_linux_dr_set_addr): ...this.
349 (x86_dr_low_get_addr): Rename to...
350 (x86_linux_dr_get_addr): ...this.
351 (x86_dr_low_set_control): Rename to...
352 (x86_linux_dr_set_control): ...this.
353 (x86_dr_low_get_control): Rename to...
354 (x86_linux_dr_get_control): ...this.
355 (x86_dr_low_get_status): Rename to...
356 (x86_linux_dr_get_status): ...this.
357 (x86_dr_low): Update with new function names.
358
4b134ca1
GB
3592015-03-24 Gary Benson <gbenson@redhat.com>
360
361 * Makefile.in (x86-linux.o): New rule.
362 * configure.srv: Add x86-linux.o to relevant targets.
363 * linux-low.c (lwp_set_arch_private_info): New function.
364 (lwp_arch_private_info): Likewise.
365 * linux-x86-low.c: Include nat/x86-linux.h.
366 (arch_lwp_info): Removed structure.
367 (update_debug_registers_callback):
368 Use lwp_set_debug_registers_changed.
369 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
370 and lwp_set_debug_registers_changed.
371 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
372
34c703da
GB
3732015-03-24 Gary Benson <gbenson@redhat.com>
374
375 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
376 * linux-arm-low.c (arm_new_thread): Likewise.
377 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
378 * linux-mips-low.c (mips_linux_new_thread): Likewise.
379 * linux-x86-low.c (x86_linux_new_thread): Likewise.
380 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
381
cff068da
GB
3822015-03-24 Gary Benson <gbenson@redhat.com>
383
384 * linux-low.c (ptid_of_lwp): New function.
385 (lwp_is_stopped): Likewise.
386 (lwp_stop_reason): Likewise.
387 * linux-x86-low.c (update_debug_registers_callback):
388 Use lwp_is_stopped.
389 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
390 lwp_stop_reason.
391
b2f7c7e8
GB
3922015-03-24 Gary Benson <gbenson@redhat.com>
393
394 * linux-low.h (linux_stop_lwp): Remove declaration.
395
6d4ee8c6
GB
3962015-03-24 Gary Benson <gbenson@redhat.com>
397
398 * linux-low.h: Include nat/linux-nat.h.
399 * linux-low.c (iterate_over_lwps_args): New structure.
400 (iterate_over_lwps_filter): New function.
401 (iterate_over_lwps): Likewise.
402 * linux-x86-low.c (update_debug_registers_callback):
403 Update signature to what iterate_over_lwps expects.
404 Remove PID check that iterate_over_lwps now performs.
405 (x86_dr_low_set_addr): Use iterate_over_lwps.
406 (x86_dr_low_set_control): Likewise.
407
70a0bb6b
GB
4082015-03-24 Gary Benson <gbenson@redhat.com>
409
410 * linux-x86-low.c (x86_debug_reg_state): New function.
411 (x86_linux_prepare_to_resume): Use the above.
412
7b669087
GB
4132015-03-24 Gary Benson <gbenson@redhat.com>
414
415 * linux-low.c (current_lwp_ptid): New function.
416 * linux-x86-low.c: Include nat/linux-nat.h.
417 (x86_dr_low_get_addr): Use current_lwp_ptid.
418 (x86_dr_low_get_control): Likewise.
419 (x86_dr_low_get_status): Likewise.
420
eef49a3d
PA
4212015-03-20 Pedro Alves <palves@redhat.com>
422
423 * tracepoint.c (cmd_qtstatus): Make "str" const.
424
b2333d22
PA
4252015-03-20 Pedro Alves <palves@redhat.com>
426
427 * server.c (handle_general_set): Make "req_str" const.
428
23f238d3
PA
4292015-03-19 Pedro Alves <palves@redhat.com>
430
431 * linux-low.c (linux_resume_one_lwp): Rename to ...
432 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
433 instead call perror_with_name.
434 (check_ptrace_stopped_lwp_gone): New function.
435 (linux_resume_one_lwp): Reimplement as wrapper around
436 linux_resume_one_lwp_throw that swallows errors if the LWP is
437 gone.
438
91baf43f
PA
4392015-03-19 Pedro Alves <palves@redhat.com>
440
441 * linux-low.c (count_events_callback, select_event_lwp_callback):
442 No longer check whether the thread has resume_stop as last resume
443 kind.
444
8bf3b159
PA
4452015-03-19 Pedro Alves <palves@redhat.com>
446
447 * linux-low.c (count_events_callback, select_event_lwp_callback):
448 Use the lwp's status_pending_p field, not the thread's.
449
b90fc188
PA
4502015-03-19 Pedro Alves <palves@redhat.com>
451
452 * linux-low.c (select_event_lwp_callback): Update comments to
453 no longer mention SIGTRAP.
454
464b0089
GB
4552015-03-18 Gary Benson <gbenson@redhat.com>
456
457 * server.c (handle_query): Do not report vFile:fstat as supported.
458
aa9e327f
GB
4592015-03-11 Gary Benson <gbenson@redhat.com>
460
461 * hostio.c (sys/types.h): New include.
462 (sys/stat.h): Likewise.
463 (common-remote-fileio.h): Likewise.
464 (handle_fstat): New function.
465 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 466
791c0056
GB
4672015-03-11 Gary Benson <gbenson@redhat.com>
468
469 * configure.ac (AC_CHECK_MEMBERS): Add checks for
470 struct stat.st_blocks and struct stat.st_blksize.
471 * configure: Regenerate.
472 * config.in: Likewise.
473 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
474 (OBS): Add common-remote-fileio.o.
475 (common-remote-fileio.o): New rule.
476
9a9df970
PA
4772015-03-09 Pedro Alves <palves@redhat.com>
478
479 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
480 'struct sockaddr' pointer in 'accept' call.
481
9eb1356e
PA
4822015-03-09 Pedro Alves <palves@redhat.com>
483
484 Revert:
485 2015-03-07 Pedro Alves <palves@redhat.com>
486 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
487 or <winsock2.h> here. Instead include "gdb_socket.h".
488 (remote_open): Use union gdb_sockaddr_u.
489 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
490 or <winsock2.h> here. Instead include "gdb_socket.h".
491 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
492 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
493 or <sys/un.h>.
494 (init_named_socket, gdb_agent_helper_thread): Use union
495 gdb_sockaddr_u.
496
aac331e4
PA
4972015-03-07 Pedro Alves <palves@redhat.com>
498
499 * configure.ac (build_warnings): Move
500 -Wdeclaration-after-statement to the C-specific set.
501 * configure: Regenerate.
502
366c75fc
PA
5032015-03-07 Pedro Alves <palves@redhat.com>
504
505 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
506 or <winsock2.h> here. Instead include "gdb_socket.h".
507 (remote_open): Use union gdb_sockaddr_u.
508 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
509 or <winsock2.h> here. Instead include "gdb_socket.h".
510 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
511 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
512 or <sys/un.h>.
513 (init_named_socket, gdb_agent_helper_thread): Use union
514 gdb_sockaddr_u.
515
492d29ea
PA
5162015-03-07 Pedro Alves <palves@redhat.com>
517
518 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
519 instead.
520
60a191ed
YQ
5212015-03-06 Yao Qi <yao.qi@linaro.org>
522
523 * linux-aarch64-low.c (aarch64_insert_point): Use
524 show_debug_regs as a boolean.
525 (aarch64_remove_point): Likewise.
526
f5771b1d
PA
5272015-03-05 Pedro Alves <palves@redhat.com>
528
529 * lynx-low.c (lynx_target_ops): Install NULL hooks for
530 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
531 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
532 * nto-low.c (nto_target_ops): Likewise.
533 * spu-low.c (spu_target_ops): Likewise.
534 * win32-low.c (win32_target_ops): Likewise.
535
3e572f71
PA
5362015-03-04 Pedro Alves <palves@redhat.com>
537
538 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
539 Decide whether a breakpoint triggered based on the SIGTRAP's
540 siginfo.si_code.
541 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
542 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
543 (linux_low_filter_event): Check for breakpoints before checking
544 watchpoints.
545 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
546 siginfo.si_code.
547 (linux_stopped_by_sw_breakpoint)
548 (linux_supports_stopped_by_sw_breakpoint)
549 (linux_stopped_by_hw_breakpoint)
550 (linux_supports_stopped_by_hw_breakpoint): New functions.
551 (linux_target_ops): Install new target methods.
552
1ec68e26
PA
5532015-03-04 Pedro Alves <palves@redhat.com>
554
555 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
556 * server.c (swbreak_feature, hwbreak_feature): New globals.
557 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
558 (captured_main): Clear swbreak_feature and hwbreak_feature.
559 * server.h (swbreak_feature, hwbreak_feature): Declare.
560 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
561 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
562 supports_stopped_by_hw_breakpoint>: New fields.
563 (target_supports_stopped_by_sw_breakpoint)
564 (target_stopped_by_sw_breakpoint)
565 (target_supports_stopped_by_hw_breakpoint)
566 (target_stopped_by_hw_breakpoint): Declare.
567
15c66dd6
PA
5682015-03-04 Pedro Alves <palves@redhat.com>
569
570 enum lwp_stop_reason -> enum target_stop_reason
571 * linux-low.c (check_stopped_by_breakpoint): Adjust.
572 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
573 (linux_wait_1, stuck_in_jump_pad_callback)
574 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
575 (linux_stopped_by_watchpoint):
576 * linux-low.h (enum lwp_stop_reason): Delete.
577 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
578 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
579
98fc70d6
YQ
5802015-03-04 Yao Qi <yao.qi@linaro.org>
581
582 * Makefile.in (SFILES): Add linux-aarch64-low.c.
583
dd2ac174
GB
5842015-03-03 Gary Benson <gbenson@redhat.com>
585
586 * hostio.c (handle_vFile): Fix prefix lengths.
587
d68e53f4
MM
5882015-03-03 Markus Metzger <markus.t.metzger@intel.com>
589
590 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
591 ptr_bits.
592
bf2d68ab
AA
5932015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
594
595 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
596 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
597 (clean): Add "rm -f" for above C files.
598 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
599 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
600 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
601 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
602 * linux-s390-low.c (HWCAP_S390_VX): New macro.
603 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
604 (init_registers_s390x_vx_linux64)
605 (init_registers_s390x_tevx_linux64)
606 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
607 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
608 declarations.
609 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
610 (s390_store_vxrs_high): New functions.
611 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
612 NT_S390_VXRS_HIGH.
613 (s390_arch_setup): Add logic for selecting one of the new target
614 descriptions. Activate the new vector regsets if applicable.
615 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
616 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
617 and init_registers_s390x_tevx_linux64.
618
c966a859
PA
6192015-03-01 Pedro Alves <palves@redhat.com>
620
621 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
622 parameter.
623
4180215b
PA
6242015-02-27 Pedro Alves <palves@redhat.com>
625
626 * linux-x86-low.c (u_debugreg_offset): New function.
627 (x86_linux_dr_get, x86_linux_dr_set): Use it.
628
749bab01
PA
6292015-02-27 Pedro Alves <palves@redhat.com>
630
631 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
632 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
633 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
634 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
635 (ps_lsetfpregs, ps_getpid)
636 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
637 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
638 (ps_lsetxregs, ps_plog): Declare.
639
3c14e5a3
PA
6402015-02-27 Pedro Alves <palves@redhat.com>
641
642 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
643 IP_AGENT_EXPORT_FUNC.
644 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
645 IP_AGENT_EXPORT_FUNC.
646 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
647 (IP_AGENT_EXPORT): Delete.
648 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
649 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
650 (gdb_trampoline_buffer_error, collecting, gdb_collect)
651 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
652 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
653 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
654 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
655 (traceframe_read_count, traceframe_write_count)
656 (traceframes_created, trace_state_variables, get_raw_reg)
657 (get_trace_state_variable_value, set_trace_state_variable_value)
658 (ust_loaded, helper_thread_id, cmd_buf): Use
659 IPA_SYM_EXPORTED_NAME.
660 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
661 (tracepoints) Use IP_AGENT_EXPORT_VAR.
662 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
663 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
664 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
665 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
666 EXTERN_C_PUSH/EXTERN_C_POP.
667 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
668 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
669 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
670 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
671 (traceframe_write_count, traceframe_read_count)
672 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
673 (about_to_request_buffer_space, get_trace_state_variable_value)
674 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
675 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
676 EXTERN_C_PUSH/EXTERN_C_POP.
677 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
678 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
679 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
680 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
681 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
682 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
683 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
684 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
685 Define.
686 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
687 (IP_AGENT_EXPORT_VAR_DECL): Define.
688 (tracing): Declare.
689 (gdb_agent_get_raw_reg): Declare.
690
fe978cb0
PA
6912015-02-27 Tom Tromey <tromey@redhat.com>
692 Pedro Alves <palves@redhat.com>
693
694 Rename symbols whose names are reserved C++ keywords throughout.
695
3bc3d82a
PA
6962015-02-27 Pedro Alves <palves@redhat.com>
697
698 * Makefile.in (COMPILER): New, get it from autoconf.
699 (CXX): Get from autoconf instead.
700 (COMPILE.pre): Use COMPILER.
701 (CC-LD): Rename to ...
702 (CC_LD): ... this. Use COMPILER.
703 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
704 (CXX_FOR_TARGET): Default to g++ instead of gcc.
705 * acinclude.m4: Include build-with-cxx.m4.
706 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
707 Disable -Werror by default if building in C++ mode.
708 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
709 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
710 the C++ compiler. Save/restore CXXFLAGS too.
711 * configure: Regenerate.
712
07697489
PA
7132015-02-27 Pedro Alves <palves@redhat.com>
714
715 * acinclude.m4: Include libiberty.m4.
716 * configure.ac: Call libiberty_INIT.
717 * config.in, configure: Regenerate.
718
9beb7c4e
PA
7192015-02-26 Pedro Alves <palves@redhat.com>
720
721 * linux-low.c (linux_wait_1): When incrementing the PC past a
722 program breakpoint always use the_low_target.breakpoint_len as
723 increment, rather than the maximum between that and
724 the_low_target.decr_pc_after_break.
725
8090aef2
PA
7262015-02-23 Pedro Alves <palves@redhat.com>
727
728 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
729 thread was doing a step-over; always adjust the PC if
730 we stepped over a permanent breakpoint.
731 (linux_wait_1): If we stepped over breakpoint that was on top of a
732 permanent breakpoint, manually advance the PC past it.
733
bc9540e8
PA
7342015-02-23 Pedro Alves <palves@redhat.com>
735
736 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
737 modes.
738 (x86_fill_gregset, x86_store_gregset): Use it when handling
739 $orig_eax.
740
2db9a427
PA
7412015-02-20 Pedro Alves <palves@redhat.com>
742
743 * thread-db.c: Include "nat/linux-procfs.h".
744 (thread_db_init): Skip listing new threads if the kernel supports
745 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
746
afa8d396
PA
7472015-02-20 Pedro Alves <palves@redhat.com>
748
749 * linux-low.c (status_pending_p_callback): Use ptid_match.
750
c9587f88
AT
7512015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
752
753 PR breakpoints/16812
754 * linux-low.c (wstatus_maybe_breakpoint): Remove.
755 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
756 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
757
b05ec7a5
AT
7582015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
759
760 PR breakpoints/15956
761 * tracepoint.c (cmd_qtinit): Add check for current_thread.
762
d33501a5
MM
7632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
764
765 * linux-low.c (linux_low_btrace_conf): Print size.
766 * server.c (handle_btrace_conf_general_set): New.
767 (hanle_general_set): Call handle_btrace_conf_general_set.
768 (handle_query): Report Qbtrace-conf:bts:size as supported.
769
f4abbc16
MM
7702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
771
772 * linux-low.c (linux_low_enable_btrace): Update parameters.
773 (linux_low_btrace_conf): New.
774 (linux_target_ops)<to_btrace_conf>: Initialize.
775 * server.c (current_btrace_conf): New.
776 (handle_btrace_enable): Rename to ...
777 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
778 to target_enable_btrace. Update comment. Update users.
779 (handle_qxfer_btrace_conf): New.
780 (qxfer_packets): Add btrace-conf entry.
781 (handle_query): Report qXfer:btrace-conf:read as supported packet.
782 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
783 (target_ops)<read_btrace_conf>: New.
784 (target_enable_btrace): Update parameters.
785 (target_read_btrace_conf): New.
786
043c3577
MM
7872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
788
789 * server.c (handle_btrace_general_set): Remove call to
790 target_supports_btrace.
791 (supported_btrace_packets): New.
792 (handle_query): Call supported_btrace_packets.
793 * target.h: include btrace-common.h.
794 (btrace_target_info): Removed.
795 (supports_btrace, target_supports_btrace): Update parameters.
796
734b0e4b
MM
7972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
798
799 * Makefile.in (SFILES): Add common/btrace-common.c.
800 (OBS): Add common/btrace-common.o.
801 (btrace-common.o): Add build rules.
802 * linux-low: Include btrace-common.h.
803 (linux_low_read_btrace): Use struct btrace_data. Call
804 btrace_data_init and btrace_data_fini.
805
d6c146e9
PA
8062015-02-06 Pedro Alves <palves@redhat.com>
807
808 * thread-db.c (find_new_threads_callback): Add debug output.
809
20ba1ce6
PA
8102015-02-04 Pedro Alves <palves@redhat.com>
811
812 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
813 (resume_stopped_resumed_lwps): New function.
814 (linux_wait_for_event_filtered): Use it.
815
8cc73a39
SDJ
8162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
817
818 * Makefile.in (SFILES): Add linux-personality.c.
819 (linux-personality.o): New rule.
820 * configure.srv (srv_linux_obj): Add linux-personality.o to the
821 list of objects to be built.
822 * linux-low.c: Include nat/linux-personality.h.
823 (linux_create_inferior): Remove code to disable address space
824 randomization (moved to ../nat/linux-personality.c). Create
825 cleanup to disable address space randomization.
826
fb23d554
SDJ
8272015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
828
829 * Makefile.in (posix-strerror.o): New rule.
830 (mingw-strerror.o): Likewise.
831 * configure: Regenerated.
832 * configure.ac: Source file ../common/common.host. Initialize new
833 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
834
cdf43629
YQ
8352015-01-14 Yao Qi <yao@codesourcery.com>
836
837 * Makefile.in (SFILES): Add nat/ppc-linux.c.
838 (ppc-linux.o): New rule.
839 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
840 * configure.ac: AC_CHECK_FUNCS(getauxval).
841 * config.in: Re-generated.
842 * configure: Re-generated.
843 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
844 ppc64_64bit_inferior_p
845
514c5338
YQ
8462015-01-14 Yao Qi <yao@codesourcery.com>
847
848 * linux-ppc-low.c: Include "nat/ppc-linux.h".
849 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
850 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
851 (PT_ORIG_R3, PT_TRAP): Likewise.
852 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
853 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
854 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
855
3368c1e5
JB
8562015-01-10 Joel Brobecker <brobecker@adacore.com>
857
858 * i387-fp.c (i387_cache_to_xsave): In look over
859 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
860 zmmh_low_space field by use of zmmh_high_space.
861
582511be
PA
8622015-01-09 Pedro Alves <palves@redhat.com>
863
864 * linux-low.c (step_over_bkpt): Move higher up in the file.
865 (handle_extended_wait): Don't store the stop_pc here.
866 (get_stop_pc): Adjust comments and rename to ...
867 (check_stopped_by_breakpoint): ... this. Record whether the LWP
868 stopped for a software breakpoint or hardware breakpoint.
869 (thread_still_has_status_pending_p): New function.
870 (status_pending_p_callback): Use
871 thread_still_has_status_pending_p. If the event is no longer
872 interesting, resume the LWP.
873 (handle_tracepoints): Add assert.
874 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
875 (wstatus_maybe_breakpoint): New function.
876 (cancel_breakpoint): Delete function.
877 (check_stopped_by_watchpoint): New function, factored out from
878 linux_low_filter_event.
879 (lp_status_maybe_breakpoint): Delete function.
880 (linux_low_filter_event): Remove filter_ptid argument.
881 Leave thread group exits pending here. Store the LWP's stop PC.
882 Always leave events pending.
883 (linux_wait_for_event_filtered): Pull all events out of the
884 kernel, and leave them all pending.
885 (count_events_callback, select_event_lwp_callback): Consider all
886 events.
887 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
888 (select_event_lwp): Only give preference to the stepping LWP in
889 all-stop mode. Adjust comments.
890 (ignore_event): New function.
891 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
892 references to cancel_breakpoints. Adjust to renames. Also give
893 equal priority to all LWPs that have had events in non-stop mode.
894 If reporting a software breakpoint event, unadjust the LWP's PC.
895 (linux_wait): If linux_wait_1 returned an ignored event, retry.
896 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
897 Adjust.
898 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
899 (resume_status_pending_p): Use thread_still_has_status_pending_p.
900 (linux_stopped_by_watchpoint): Adjust.
901 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
902 * linux-low.h (enum lwp_stop_reason): New.
903 (struct lwp_info) <stop_pc>: Adjust comment.
904 <stopped_by_watchpoint>: Delete field.
905 <stop_reason>: New field.
906 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
907 * mem-break.c (software_breakpoint_inserted_here)
908 (hardware_breakpoint_inserted_here): New function.
909 * mem-break.h (software_breakpoint_inserted_here)
910 (hardware_breakpoint_inserted_here): Declare.
911 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
912 (cancel_breakpoints): Delete.
913 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
914 (upload_fast_traceframes): Remove references to
915 cancel_breakpoints.
916
a33e3959
PA
9172015-01-09 Pedro Alves <palves@redhat.com>
918
919 * thread-db.c (find_new_threads_callback): Ignore thread if the
920 kernel thread ID is -1.
921
8784d563
PA
9222015-01-09 Pedro Alves <palves@redhat.com>
923
924 * linux-low.c (linux_attach_fail_reason_string): Move to
925 nat/linux-ptrace.c, and rename.
926 (linux_attach_lwp): Update comment.
927 (attach_proc_task_lwp_callback): New function.
928 (linux_attach): Adjust to rename and use
929 linux_proc_attach_tgid_threads.
930 (linux_attach_fail_reason_string): Delete declaration.
931
76f2b779
JB
9322015-01-01 Joel Brobecker <brobecker@adacore.com>
933
934 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
935 * server.c (gdbserver_version): Likewise.
936
fafcc06a
SDJ
9372014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
938
939 * remote-utils.c: Include ctype.h.
940 (input_interrupt): Explicitly handle the case when the char
941 received is the NUL byte. Improve the printing of non-ASCII
942 characters.
943
beed38b8
JB
9442014-12-16 Joel Brobecker <brobecker@adacore.com>
945
946 * linux-low.c (linux_low_filter_event): Update call to
947 linux_enable_event_reporting following the addition of
948 a new parameter to that function.
949
bf330350
CU
9502014-12-16 Catalin Udma <catalin.udma@freescale.com>
951
952 PR server/17457
953 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
954 (AARCH64_FPCR_REGNO): Likewise.
955 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
956 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
957 (aarch64_store_fpregset): Likewise.
958
5227d625
JB
9592014-12-15 Joel Brobecker <brobecker@adacore.com>
960
961 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
962 Remove FIXME comment about assumption about N.
963
f93b65a0
JB
9642014-12-13 Joel Brobecker <brobecker@adacore.com>
965
966 * configure.ac: If large-file support is disabled in GDBserver,
967 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
968 * configure: Regenerate.
969
e5a9158d
AA
9702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
971
972 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
973 warning upon ENODATA from ptrace.
974 * linux-s390-low.c (s390_store_tdb): New.
975 (s390_regsets): Add regset for NT_S390_TDB.
976
feea5f36
AA
9772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
978
979 * linux-low.c (regsets_store_inferior_registers): Skip regsets
980 without a fill_function.
981 * linux-s390-low.c (s390_fill_last_break): Remove.
982 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
983 (s390_arch_setup): Use regset's size instead of fill_function for
984 loop end condition.
985
098dbe61
AA
9862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
987
988 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
989 the regset's store function when ptrace returned an error.
990 * regcache.c (get_thread_regcache): Invalidate register cache
991 before fetching inferior's registers.
992
28eef672
AA
9932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
994
995 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
996 while-loop as for-loop.
997 (regsets_store_inferior_registers): Likewise.
998
bdca27a2
YQ
9992014-11-28 Yao Qi <yao@codesourcery.com>
1000
1001 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1002 * config.in, configure: Re-generate.
1003 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1004 is defined.
1005
9c232dda
YQ
10062014-11-21 Yao Qi <yao@codesourcery.com>
1007
1008 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1009 (AC_CHECK_HEADERS): Remove malloc.h.
1010 * configure: Re-generated.
1011 * config.in: Re-generated.
1012 * server.h: Don't include alloca.h and malloc.h.
1013 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1014 Don't include malloc.h.
1015
43968415
JB
10162014-11-17 Joel Brobecker <brobecker@adacore.com>
1017
1018 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1019 corresponding ERRNO check in same block.
1020
40e91bc7
PA
10212014-11-12 Pedro Alves <palves@redhat.com>
1022
1023 * server.c (cont_thread): Update comment.
1024 (start_inferior, attach_inferior): No longer clear cont_thread.
1025 (handle_v_cont): No longer set cont_thread.
1026 (captured_main): Clear cont_thread each time a GDB connects.
1027
c2c118cf
PA
10282014-11-12 Pedro Alves <palves@redhat.com>
1029
1030 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1031 thread, and don't resume all threads if the Hc thread has exited.
1032
78708b7c
PA
10332014-11-12 Pedro Alves <palves@redhat.com>
1034
1035 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1036 the process group instead of to a specific LWP.
1037
a2abc7de
PA
10382014-10-15 Pedro Alves <palves@redhat.com>
1039
1040 PR server/17487
1041 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1042 parameter.
1043 (arm_set_thread_context): Delete.
1044 (the_low_target): Adjust.
1045 * win32-i386-low.c (debug_registers_changed)
1046 (debug_registers_used): Delete.
1047 (update_debug_registers_callback): New function.
1048 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1049 needing to update their debug registers.
1050 (win32_get_current_dr): New function.
1051 (x86_dr_low_get_addr, x86_dr_low_get_control)
1052 (x86_dr_low_get_status): Fetch the debug register from the thread
1053 record's context.
1054 (i386_initial_stuff): Adjust.
1055 (i386_get_thread_context): Remove current_event parameter. Don't
1056 clear debug_registers_changed nor copy DR values to
1057 debug_reg_state.
1058 (i386_set_thread_context): Delete.
1059 (i386_prepare_to_resume): New function.
1060 (i386_thread_added): Mark the thread as needing to update irs
1061 debug registers.
1062 (the_low_target): Remove i386_set_thread_context and install
1063 i386_prepare_to_resume.
1064 * win32-low.c (win32_get_thread_context): Adjust.
1065 (win32_set_thread_context): Use SetThreadContext
1066 directly.
1067 (win32_prepare_to_resume): New function.
1068 (win32_require_context): New function, factored out from ...
1069 (thread_rec): ... this.
1070 (continue_one_thread): Call win32_prepare_to_resume on each thread
1071 we're about to continue.
1072 (win32_resume): Call win32_prepare_to_resume on the event thread.
1073 * win32-low.h (struct win32_thread_info)
1074 <debug_registers_changed>: New field.
1075 (struct win32_target_ops): Change prototype of set_thread_context,
1076 delete set_thread_context and add prepare_to_resume.
1077 (win32_require_context): New declaration.
1078
a442d071
GB
10792014-10-08 Gary Benson <gbenson@redhat.com>
1080
1081 * server.h: Do not include common-exceptions.h.
1082
6f1947e8
GB
10832014-10-08 Gary Benson <gbenson@redhat.com>
1084
1085 * server.h: Do not include cleanups.h.
1086
63b434a4
JH
10872014-09-30 James Hogan <james.hogan@imgtec.com>
1088
1089 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1090 mips64-dsp-linux.c.
1091
c4d9ceb6
YQ
10922014-09-23 Yao Qi <yao@codesourcery.com>
1093
1094 * linux-low.c (lp_status_maybe_breakpoint): New function.
1095 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1096 (count_events_callback): Likewise.
1097 (select_event_lwp_callback): Likewise.
1098 (cancel_breakpoints_callback): Likewise.
1099
89a5711c
DB
11002014-09-19 Don Breazeal <donb@codesourcery.com>
1101
1102 * linux-low.c (handle_extended_wait): Call
1103 linux_ptrace_get_extended_event.
1104 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1105 linux_is_extended_waitstatus.
1106
bffc0964
JB
11072014-09-16 Joel Brobecker <brobecker@adacore.com>
1108
1109 * Makefile.in (CPPFLAGS): Define.
1110 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1111 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1112
0bfdf32f
GB
11132014-09-16 Gary Benson <gbenson@redhat.com>
1114
1115 * inferiors.h (current_inferior): Renamed as...
1116 (current_thread): New variable. All uses updated.
1117 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1118 (maybe_move_out_of_jump_pad): Likewise.
1119 (cancel_breakpoint): Likewise.
1120 (linux_low_filter_event): Likewise.
1121 (wait_for_sigstop): Likewise.
1122 (linux_resume_one_lwp): Likewise.
1123 (need_step_over_p): Likewise.
1124 (start_step_over): Likewise.
1125 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1126 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1127 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1128 and save_inferior as saved_thread.
1129 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1130 saved_thread.
1131 (regcache_invalidate_thread): Likewise.
1132 * remote-utils.c (prepare_resume_reply): Likewise.
1133 * thread-db.c (thread_db_get_tls_address): Likewise.
1134 (disable_thread_event_reporting): Likewise.
1135 (remove_thread_event_breakpoints): Likewise.
1136 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1137 as saved_thread.
1138 * target.h (set_desired_inferior): Renamed as...
1139 (set_desired_thread): New declaration. All uses updated.
1140 * server.c (myresume): Updated comment to reference thread instead
1141 of inferior.
1142 (handle_serial_event): Likewise.
1143 (handle_target_event): Likewise.
1144
361c8ade
GB
11452014-09-12 Tom Tromey <tromey@redhat.com>
1146 Gary Benson <gbenson@redhat.com>
1147
1148 * regcache.h: Include common-regcache.h.
1149 (regcache_read_pc): Don't declare.
1150 * regcache.c (get_thread_regcache_for_ptid): New function.
1151
bd9269f7
GB
11522014-09-11 Tom Tromey <tromey@redhat.com>
1153 Gary Benson <gbenson@redhat.com>
1154
1155 * symbol.c: New file.
1156 * Makefile.in (SFILES): Add symbol.c.
1157 (OBS): Add symbol.o.
1158
f8c1d06b
GB
11592014-09-11 Gary Benson <gbenson@redhat.com>
1160
1161 * target.c (target_stop_ptid, target_continue_ptid): New
1162 functions.
1163
721ec300
GB
11642014-09-11 Tom Tromey <tromey@redhat.com>
1165 Gary Benson <gbenson@redhat.com>
1166
1167 * target.h: Include target/target.h.
1168 * target.c (target_read_memory, target_read_uint32)
1169 (target_write_memory): New functions.
1170
c5e92cca
GB
11712014-09-11 Gary Benson <gbenson@redhat.com>
1172
1173 * server.h (debug_hw_points): Don't declare.
1174 * server.c (debug_hw_points): Don't define. Replace all uses
1175 with show_debug_regs.
1176 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1177 all uses with show_debug_regs.
1178
2e4bb98a
EBM
11792014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1180
1181 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1182 endianness into account.
1183 (ppc_supply_ptrace_register): Likewise.
1184
ac740bc7
JH
11852014-09-03 James Hogan <james.hogan@imgtec.com>
1186
1187 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1188 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1189
97ea6506
GB
11902014-09-03 Gary Benson <gbenson@redhat.com>
1191
1192 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1193 ALL_DEBUG_ADDRESS_REGISTERS.
1194
df7e5265
GB
11952014-09-02 Gary Benson <gbenson@redhat.com>
1196
1197 * i386-low.h: Renamed as...
1198 * x86-low.h: New file. All type, function and variable name
1199 prefixes changed from "i386_" to "x86_". All references updated.
1200 * i386-low.c: Renamed as...
1201 * x86-low.c: New file. All type, function and variable name
1202 prefixes changed from "i386_" to "x86_". All references updated.
1203
ed859da7
GB
12042014-09-02 Gary Benson <gbenson@redhat.com>
1205
1206 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1207 (x86_linux_new_thread): Likewise.
1208
860789c7
GB
12092014-08-29 Gary Benson <gbenson@redhat.com>
1210
1211 * server.h (setjmp.h): Do not include.
1212 (toplevel): Do not declare.
1213 (common-exceptions.h): Include.
1214 (cleanups.h): Likewise.
1215 * server.c (toplevel): Do not define.
1216 (exit_code): New static global.
1217 (detach_or_kill_for_exit_cleanup): New function.
1218 (main): New function. Original main renamed to...
1219 (captured_main): New function.
1220 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1221
ff55e1b5
GB
12222014-08-29 Gary Benson <gbenson@redhat.com>
1223
1224 * Makefile.in (SFILES): Add common/common-exceptions.c.
1225 (OBS): Add common-exceptions.o.
1226 (common-exceptions.o): New rule.
1227 * utils.c (prepare_to_throw_exception): New function.
1228
e9bcb658
GB
12292014-08-29 Gary Benson <gbenson@redhat.com>
1230
1231 * config.in: Regenerate.
1232 * configure: Likewise.
1233
e3180625
GB
12342014-08-29 Gary Benson <gbenson@redhat.com>
1235
1236 * Makefile.in (SFILES): Add common/cleanups.c.
1237 (OBS): cleanups.o.
1238 (cleanups.o): New rule.
1239
e3d6ba5d
GB
12402014-08-29 Gary Benson <gbenson@redhat.com>
1241
1242 * utils.c (internal_vwarning): New function.
1243
7096e886
GB
12442014-08-28 Gary Benson <gbenson@redhat.com>
1245
1246 * utils.h (fatal): Remove declaration.
1247 * utils.c (fatal): Remove function.
1248
14ce3192
GB
12492014-08-28 Gary Benson <gbenson@redhat.com>
1250
1251 * tracepoint.c (gdb_agent_init): Replace fatal with
1252 perror_with_name.
1253 (initialize_tracepoint): Likewise.
1254
50278d59
GB
12552014-08-28 Gary Benson <gbenson@redhat.com>
1256
1257 * remote-utils.c (remote_prepare): Replace fatal with error.
1258
aa96c426
GB
12592014-08-28 Gary Benson <gbenson@redhat.com>
1260
1261 * linux-low.c (linux_async): Replace fatal with warning.
1262 Tidy up and return.
1263 (linux_start_non_stop): Return -1 if linux_async failed.
1264
f7160e97
GB
12652014-08-28 Gary Benson <gbenson@redhat.com>
1266
1267 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1268 gdb_assert.
1269 (i386_dr_low_get_addr): Remove vague comment.
1270 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1271 gdb_assert.
1272
38e08fca
GB
12732014-08-28 Gary Benson <gbenson@redhat.com>
1274
1275 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1276 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1277 internal_error.
1278 (linux_resume_one_lwp): Likewise.
1279 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1280 gdb_assert.
1281 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1282 with internal_error.
1283 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1284 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1285 (find_register_by_name): Replace fatal with internal_error.
1286 (find_regno): Likewise.
1287 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1288 * thread-db.c (thread_db_create_event): Likewise.
1289 (thread_db_load_search): Likewise.
1290 (try_thread_db_load_1): Likewise.
1291 * tracepoint.c (get_jump_space_head): Replace fatal with
1292 internal_error.
1293 (claim_trampoline_space): Likewise.
1294 (have_fast_tracepoint_trampoline_buffer): Likewise.
1295 (cmd_qtstart): Likewise.
1296 (stop_tracing): Likewise.
1297 (fast_tracepoint_collecting): Likewise.
1298 (target_malloc): Likewise.
1299 (download_tracepoint): Likewise.
1300 (download_trace_state_variables): Replace check with gdb_assert.
1301 (upload_fast_traceframes): Replace fatal with internal_error.
1302
34abf635
GB
13032014-08-19 Tom Tromey <tromey@redhat.com>
1304 Gary Benson <gbenson@redhat.com>
1305
1306 * Makefile.in (SFILES): Add common/common-debug.c.
1307 (OBS): Add common-debug.o.
1308 (common-debug.o): New rule.
1309 * debug.h (debug_printf): Don't declare.
1310 * debug.c (debug_printf): Renamed and rewritten as...
1311 (debug_vprintf): New function.
1312
f6e94d78
GB
13132014-08-19 Gary Benson <gbenson@redhat.com>
1314
1315 * utils.h: Do not include print-utils.h.
1316
9239eeab
GB
13172014-08-19 Tom Tromey <tromey@redhat.com>
1318 Gary Benson <gbenson@redhat.com>
1319
1320 * server.h: Add static assertion.
1321 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1322
ef87c8bb
GB
13232014-08-19 Tom Tromey <tromey@redhat.com>
1324 Gary Benson <gbenson@redhat.com>
1325
1326 * Makefile.in (SFILES): Add common/errors.c.
1327 (OBS): Add errors.o.
1328 (IPA_OBS): Add errors-ipa.o.
1329 (errors.o): New rule.
1330 (errors-ipa.o): Likewise.
1331 * utils.h (perror_with_name, error, warning): Don't declare.
1332 * utils.c (warning): Renamed and rewritten as...
1333 (vwarning): New function.
1334 (error): Renamed and rewritten as...
1335 (verror): New function.
1336 (internal_error): Renamed and rewritten as...
1337 (internal_verror): New function.
1338
bb974a24
GB
13392014-08-07 Gary Benson <gbenson@redhat.com>
1340
1341 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1342 * configure: Regenerate.
1343 * config.in: Likewise.
1344 * server.h: Do not include errno.h.
1345 * event-loop.c: Likewise.
1346 * hostio-errno.c: Likewise.
1347 * linux-low.c: Likewise.
1348 * remote-utils.c: Likewise.
1349 * spu-low.c: Likewise.
1350 * utils.c: Likewise.
1351 * gdbreplay.c: Unconditionally include errno.h.
1352
6d3d12eb
GB
13532014-08-07 Gary Benson <gbenson@redhat.com>
1354
1355 * server.h: Do not include string.h.
1356 * event-loop.c: Likewise.
1357 * linux-low.c: Likewise.
1358 * regcache.c: Likewise.
1359 * remote-utils.c: Likewise.
1360 * spu-low.c: Likewise.
1361 * utils.c: Likewise.
1362
dccbb609
GB
13632014-08-07 Gary Benson <gbenson@redhat.com>
1364
1365 * server.h: Do not include gdb_assert.h.
1366
e76df0d0
GB
13672014-08-07 Gary Benson <gbenson@redhat.com>
1368
1369 * server.h: Do not include common-utils.h.
1370
4cb9c816
GB
13712014-08-07 Gary Benson <gbenson@redhat.com>
1372
1373 * server.h: Do not include ptid.h.
1374 * notif.h: Likewise.
1375
3995eeee
GB
13762014-08-07 Gary Benson <gbenson@redhat.com>
1377
1378 * server.h: Do not include gdb_locale.h.
1379
cb9f1a9b
GB
13802014-08-07 Gary Benson <gbenson@redhat.com>
1381
1382 * server.h: Do not include gdb/signals.h.
1383 * win32-low.c: Likewise.
1384
a5fceff8
GB
13852014-08-07 Gary Benson <gbenson@redhat.com>
1386
1387 * server.h: Do not include pathmax.h.
1388
b9391142
GB
13892014-08-07 Gary Benson <gbenson@redhat.com>
1390
1391 * server.h: Do not include libiberty.h.
1392 * linux-bfin-low.c: Likewise.
1393
0e443c87
GB
13942014-08-07 Gary Benson <gbenson@redhat.com>
1395
1396 * server.h: Do not include ansidecl.h.
1397
8ebb3f56
GB
13982014-08-07 Gary Benson <gbenson@redhat.com>
1399
1400 * linux-x86-low.c: Do not include stddef.h.
1401 * lynx-ppc-low.c: Likewise.
1402 * tracepoint.c: Likewise.
1403
8980bdf6
GB
14042014-08-07 Gary Benson <gbenson@redhat.com>
1405
1406 * server.h: Do not include stdarg.h.
1407 * nto-low.c: Likewise.
1408
d7096f71
GB
14092014-08-07 Gary Benson <gbenson@redhat.com>
1410
1411 * server.h: Do not include stdlib.h.
1412 * inferiors.c: Likewise.
1413 * linux-low.c: Likewise.
1414 * regcache.c: Likewise.
1415 * spu-low.c: Likewise.
1416 * tracepoint.c: Likewise.
1417 * utils.c: Likewise.
1418
d02f550d
GB
14192014-08-07 Gary Benson <gbenson@redhat.com>
1420
1421 * server.h: Do not include stdio.h.
1422 * linux-low.c: Likewise.
1423 * remote-utils.c: Likewise.
1424 * spu-low.c: Likewise.
1425 * utils.c: Likewise.
1426 * wincecompat.c: Likewise.
1427
87f6c4e3
GB
14282014-08-06 Gary Benson <gbenson@redhat.com>
1429
1430 * regcache.c (init_register_cache): Move conditionals inside if.
1431
7089dca4
GB
14322014-08-06 Gary Benson <gbenson@redhat.com>
1433
1434 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1435
462f517e
GB
14362014-07-31 Gary Benson <gbenson@redhat.com>
1437
1438 * ax.h: Do not include server.h.
1439 * gdbthread.h: Likewise.
1440 * lynx-low.h: Likewise.
1441 * notif.h: Likewise.
1442
976411d6
GB
14432014-07-30 Gary Benson <gbenson@redhat.com>
1444
1445 * server.h: Include common-defs.h.
1446 Do not include config.h or build-gnulib-gdbserver/config.h.
1447
d41f6d8e
GB
14482014-07-30 Gary Benson <gbenson@redhat.com>
1449
1450 * hostio-errno.c: Move server.h to top of includes list.
1451 * inferiors.c: Likewise.
1452 * linux-x86-low.c: Likewise.
1453 * notif.c: Include server.h.
1454
314c6a35
TT
14552014-07-24 Tom Tromey <tromey@redhat.com>
1456 Gary Benson <gbenson@redhat.com>
1457
1458 * server.h (CORE_ADDR): Now unsigned.
1459
69ff6be5
PA
14602014-07-16 Pedro Alves <palves@redhat.com>
1461
1462 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1463
ce9e3fe7
PA
14642014-07-15 Pedro Alves <palves@redhat.com>
1465
1466 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1467 copy.
1468
e76126e8
PA
14692014-07-11 Pedro Alves <palves@redhat.com>
1470
1471 * linux-low.c (kill_wait_lwp): New function, based on
1472 kill_one_lwp_callback, but use my_waitpid directly.
1473 (kill_one_lwp_callback, linux_kill): Use it.
1474
8e9db26e
PA
14752014-06-23 Pedro Alves <palves@redhat.com>
1476
1477 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1478 before setting DR0..DR3.
1479
698b3e08
GB
14802014-06-20 Gary Benson <gbenson@redhat.com>
1481
1482 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1483 * configure: Regenerated.
1484 * config.in: Likewise.
1485
125f8a3d
GB
14862014-06-20 Gary Benson <gbenson@redhat.com>
1487
1488 * Makefile.in (SFILES): Update locations for files moved
1489 from common to nat.
1490 (object file files): Reordered.
1491
42995dbd
GB
14922014-06-20 Gary Benson <gbenson@redhat.com>
1493
1494 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1495 (i386_dr_low_set_addr): Likewise.
1496 (i386_dr_low_get_addr): Likewise.
1497 (i386_dr_low_can_set_control): Likewise.
1498 (i386_dr_low_set_control): Likewise.
1499 (i386_dr_low_get_control): Likewise.
1500 (i386_dr_low_get_status): Likewise.
1501 (i386_get_debug_register_length): Likewise.
1502 * linux-x86-low.c (i386_dr_low_set_addr):
1503 Changed signature. Made static.
1504 (i386_dr_low_get_addr): Likewise.
1505 (i386_dr_low_set_control): Likewise.
1506 (i386_dr_low_get_control): Likewise.
1507 (i386_dr_low_get_status): Likewise.
1508 (i386_dr_low): New global variable.
1509 * win32-i386-low.c (i386_dr_low_set_addr):
1510 Changed signature. Made static.
1511 (i386_dr_low_get_addr): Likewise.
1512 (i386_dr_low_set_control): Likewise.
1513 (i386_dr_low_get_control): Likewise.
1514 (i386_dr_low_get_status): Likewise.
1515 (i386_dr_low): New global variable.
1516
e1d2394b
MS
15172014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1518
1519 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1520 * Makefile.in (AR, AR_FLAGS): Define.
1521 * configure: Regenerate.
1522
3a8ee006
GB
15232014-06-19 Gary Benson <gbenson@redhat.com>
1524
1525 * Makefile.in (i386-dregs.o): New rule.
1526 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1527 * i386-low.c (target.h): Remove include.
1528 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1529 (DR_CONTROL_SHIFT): Likewise.
1530 (DR_CONTROL_SIZE): Likewise.
1531 (DR_RW_EXECUTE): Likewise.
1532 (DR_RW_WRITE): Likewise.
1533 (DR_RW_READ): Likewise.
1534 (DR_RW_IORW): Likewise.
1535 (DR_LEN_1): Likewise.
1536 (DR_LEN_2): Likewise.
1537 (DR_LEN_4): Likewise.
1538 (DR_LEN_8): Likewise.
1539 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1540 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1541 (DR_ENABLE_SIZE): Likewise.
1542 (DR_LOCAL_SLOWDOWN): Likewise.
1543 (DR_GLOBAL_SLOWDOWN): Likewise.
1544 (DR_CONTROL_RESERVED): Likewise.
1545 (I386_DR_CONTROL_MASK): Likewise.
1546 (I386_DR_VACANT): Likewise.
1547 (I386_DR_LOCAL_ENABLE): Likewise.
1548 (I386_DR_GLOBAL_ENABLE): Likewise.
1549 (I386_DR_DISABLE): Likewise.
1550 (I386_DR_SET_RW_LEN): Likewise.
1551 (I386_DR_GET_RW_LEN): Likewise.
1552 (I386_DR_WATCH_HIT): Likewise.
1553 (i386_wp_op_t): Likewise.
1554 (i386_show_dr): Likewise.
1555 (i386_length_and_rw_bits): Likewise.
1556 (i386_insert_aligned_watchpoint): Likewise.
1557 (i386_remove_aligned_watchpoint): Likewise.
1558 (i386_handle_nonaligned_watchpoint): Likewise.
1559 i386_update_inferior_debug_regs(): Likewise.
1560 (i386_dr_insert_watchpoint): Likewise.
1561 (i386_dr_remove_watchpoint): Likewise.
1562 (i386_dr_region_ok_for_watchpoint): Likewise.
1563 (i386_dr_stopped_data_address): Likewise.
1564 (i386_dr_stopped_by_watchpoint): Likewise.
1565
8f26655c
GB
15662014-06-19 Gary Benson <gbenson@redhat.com>
1567
1568 * i386-low.c (i386_dr_show): Renamed to
1569 i386_show_dr and made static. All uses updated.
1570 (i386_dr_length_and_rw_bits): Renamed to
1571 i386_length_and_rw_bits and made static.
1572 All uses updated.
1573 (i386_dr_insert_aligned_watchpoint): Renamed to
1574 i386_insert_aligned_watchpoint and made static.
1575 All uses updated.
1576 (i386_dr_remove_aligned_watchpoint): Renamed to
1577 i386_remove_aligned_watchpoint and made static.
1578 All uses updated.
1579 (i386_dr_update_inferior_debug_regs): Renamed to
1580 i386_update_inferior_debug_regs and made static.
1581 All uses updated.
1582
b9228891
GB
15832014-06-18 Gary Benson <gbenson@redhat.com>
1584
5171def3
GB
1585 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1586 (i386_dr_low_can_set_control): Likewise.
1587 (i386_get_debug_register_length): Likewise.
1588 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1589 (i386_dr_low_can_set_control): Likewise.
1590 (i386_get_debug_register_length): Likewise.
1591
15922014-06-17 Gary Benson <gbenson@redhat.com>
1593
b9228891
GB
1594 * i386-low.h (i386-dregs.h): New include.
1595 (DR_FIRSTADDR): Now in i386-dregs.h.
1596 (DR_LASTADDR): Likewise.
1597 (DR_NADDR): Likewise.
1598 (DR_STATUS): Likewise.
1599 (DR_CONTROL): Likewise.
1600 (i386_debug_reg_state): Likewise.
1601 (i386_dr_insert_watchpoint): Likewise.
1602 (i386_dr_remove_watchpoint): Likewise.
1603 (i386_dr_region_ok_for_watchpoint): Likewise.
1604 (i386_dr_stopped_data_address): Likewise.
1605 (i386_dr_stopped_by_watchpoint): Likewise.
1606 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1607
4be83cc2
GB
16082014-06-18 Gary Benson <gbenson@redhat.com>
1609
1610 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1611 i386_dr_insert_watchpoint.
1612 (i386_low_remove_watchpoint): Renamed to
1613 i386_dr_remove_watchpoint.
1614 (i386_low_region_ok_for_watchpoint): Renamed to
1615 i386_dr_region_ok_for_watchpoint.
1616 (i386_low_stopped_data_address): Renamed to
1617 i386_dr_stopped_data_address.
1618 (i386_low_stopped_by_watchpoint): Renamed to
1619 i386_dr_stopped_by_watchpoint.
1620 * i386-low.c (i386_show_dr): Renamed to
1621 i386_dr_show and made nonstatic. All uses updated.
1622 (i386_length_and_rw_bits): Renamed to
1623 i386_dr_length_and_rw_bits and made nonstatic.
1624 All uses updated.
1625 (i386_insert_aligned_watchpoint): Renamed to
1626 i386_dr_insert_aligned_watchpoint and made nonstatic.
1627 All uses updated.
1628 (i386_remove_aligned_watchpoint): Renamed to
1629 i386_dr_remove_aligned_watchpoint and made nonstatic.
1630 All uses updated.
1631 (i386_update_inferior_debug_regs): Renamed to
1632 i386_dr_update_inferior_debug_regs and made nonstatic.
1633 All uses updated.
1634 (i386_low_insert_watchpoint): Renamed to
1635 i386_dr_insert_watchpoint. All uses updated.
1636 (i386_low_remove_watchpoint): Renamed to
1637 i386_dr_remove_watchpoint. All uses updated.
1638 (i386_low_region_ok_for_watchpoint): Renamed to
1639 i386_dr_region_ok_for_watchpoint. All uses updated.
1640 (i386_low_stopped_data_address): Renamed to
1641 i386_dr_stopped_data_address. All uses updated.
1642 (i386_low_stopped_by_watchpoint): Renamed to
1643 i386_dr_stopped_by_watchpoint. All uses updated.
1644
131aa0d4
GB
16452014-06-18 Gary Benson <gbenson@redhat.com>
1646
1647 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1648 (i386_dr_low_can_set_control): Likewise.
1649 (i386_insert_aligned_watchpoint): New check.
1650
d9305f7f
GB
16512014-06-18 Gary Benson <gbenson@redhat.com>
1652
1653 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1654 Renamed to state.
1655
e927c9fc
GB
16562014-06-18 Gary Benson <gbenson@redhat.com>
1657
1658 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1659 instead of fatal and error.
1660 (i386_handle_nonaligned_watchpoint): Likewise.
1661
1b6d4134
GB
16622014-06-18 Gary Benson <gbenson@redhat.com>
1663
1664 * i386-low.c (i386_get_debug_register_length): New macro.
1665 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1666 (i386_show_dr): Use debug_printf instead of fprintf. Use
1667 phex to format values.
1668
6e62758f
GB
16692014-06-18 Gary Benson <gbenson@redhat.com>
1670
1671 * i386-low.h: Comment changes.
1672 * i386-low.c: Likewise.
1673
fc6e2f03
GB
16742014-06-18 Gary Benson <gbenson@redhat.com>
1675
1676 * i386-low.c: Whitespace changes.
1677
f9d1eeed
TT
16782014-06-12 Tom Tromey <tromey@redhat.com>
1679
1680 * utils.c (freeargv): Remove.
1681
0b04e523
TT
16822014-06-12 Tom Tromey <tromey@redhat.com>
1683
1684 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1685 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1686 (parse_debug_format_options): Likewise.
1687 (gdbserver_usage): Likewise.
1688 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1689 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1690 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1691 against libiberty.
1692 ($(LIBGNU)): Depend on libiberty.
1693 (all-lib): Recurse into all subdirs.
1694 (install-only): Invoke "install" target in subdirs.
1695 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1696 targets.
1697 * configure: Rebuild.
1698 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1699 for vasprintf, vsnprintf, or gettimeofday.
1700 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1701 srv_tgtobj.
1702
270c9937
JB
17032014-06-05 Joel Brobecker <brobecker@adacore.com>
1704
1705 * development.sh: Delete.
1706 * Makefile.in (config.status): Adjust dependency on development.sh.
1707 * configure.ac: Adjust development.sh source call.
1708 * configure: Regenerate.
1709
0a261ed8
PA
17102014-06-02 Pedro Alves <palves@redhat.com>
1711
1712 * ax.c (gdb_free_agent_expr): New function.
1713 * ax.h (gdb_free_agent_expr): New declaration.
1714 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1715 list.
1716 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1717 static.
1718 (clear_breakpoint_conditions_and_commands): New function.
1719 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1720 (clear_breakpoint_conditions_and_commands): New declaration.
1721
e9dae05e
RR
17222014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1723
1724 * linux-aarch64-low.c (asm/ptrace.h): Include.
1725
5876f503
JK
17262014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1727
1728 Fix TLS access for -static -pthread.
1729 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1730 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1731 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1732
802e8e6d
PA
17332014-05-20 Pedro Alves <palves@redhat.com>
1734
1735 * linux-aarch64-low.c (aarch64_insert_point)
1736 (aarch64_remove_point): No longer check whether the type is
1737 supported here. Adjust to new interface.
1738 (the_low_target): Install aarch64_supports_z_point_type as
1739 supports_z_point_type method.
1740 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1741 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1742 instead of a Z packet char. Adjust.
1743 (arm_supports_z_point_type): New function.
1744 (arm_insert_point, arm_remove_point): Adjust to new interface.
1745 (the_low_target): Install arm_supports_z_point_type.
1746 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1747 (cris_insert_point, cris_remove_point): Adjust to new interface.
1748 Don't check whether the type is supported here.
1749 (the_low_target): Install cris_supports_z_point_type.
1750 * linux-low.c (linux_supports_z_point_type): New function.
1751 (linux_insert_point, linux_remove_point): Adjust to new interface.
1752 * linux-low.h (struct linux_target_ops) <insert_point,
1753 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1754 raw_breakpoint pointer parameter.
1755 <supports_z_point_type>: New method.
1756 * linux-mips-low.c (mips_supports_z_point_type): New function.
1757 (mips_insert_point, mips_remove_point): Adjust to new interface.
1758 Use mips_supports_z_point_type.
1759 (the_low_target): Install mips_supports_z_point_type.
1760 * linux-ppc-low.c (the_low_target): Install NULL as
1761 supports_z_point_type method.
1762 * linux-s390-low.c (the_low_target): Install NULL as
1763 supports_z_point_type method.
1764 * linux-sparc-low.c (the_low_target): Install NULL as
1765 supports_z_point_type method.
1766 * linux-x86-low.c (x86_supports_z_point_type): New function.
1767 (x86_insert_point): Adjust to new insert_point interface. Use
1768 insert_memory_breakpoint. Adjust to new
1769 i386_low_insert_watchpoint interface.
1770 (x86_remove_point): Adjust to remove_point interface. Use
1771 remove_memory_breakpoint. Adjust to new
1772 i386_low_remove_watchpoint interface.
1773 (the_low_target): Install x86_supports_z_point_type.
1774 * lynx-low.c (lynx_target_ops): Install NULL as
1775 supports_z_point_type callback.
1776 * nto-low.c (nto_supports_z_point_type): New.
1777 (nto_insert_point, nto_remove_point): Adjust to new interface.
1778 (nto_target_ops): Install nto_supports_z_point_type.
1779 * mem-break.c: Adjust intro comment.
1780 (struct raw_breakpoint) <raw_type, size>: New fields.
1781 <inserted>: Update comment.
1782 <shlib_disabled>: Delete field.
1783 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1784 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1785 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1786 (raw_bkpt_type_to_target_hw_bp_type): New function.
1787 (find_enabled_raw_code_breakpoint_at): New function.
1788 (find_raw_breakpoint_at): New type and size parameters. Use them.
1789 (insert_memory_breakpoint): New function, based off
1790 set_raw_breakpoint_at.
1791 (remove_memory_breakpoint): New function.
1792 (set_raw_breakpoint_at): Reimplement.
1793 (set_breakpoint): New, based on set_breakpoint_at.
1794 (set_breakpoint_at): Reimplement.
1795 (delete_raw_breakpoint): Go through the_target->remove_point
1796 instead of assuming memory breakpoints.
1797 (find_gdb_breakpoint_at): Delete.
1798 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1799 (find_gdb_breakpoint): New function.
1800 (set_gdb_breakpoint_at): Delete.
1801 (z_type_supported): New function.
1802 (set_gdb_breakpoint_1): New function, loosely based off
1803 set_gdb_breakpoint_at.
1804 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1805 (delete_gdb_breakpoint_at): Delete.
1806 (delete_gdb_breakpoint_1): New function, loosely based off
1807 delete_gdb_breakpoint_at.
1808 (delete_gdb_breakpoint): New function.
1809 (clear_gdb_breakpoint_conditions): Rename to ...
1810 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1811 breakpoint.
1812 (add_condition_to_breakpoint): Make static.
1813 (add_breakpoint_condition): Take a struct breakpoint pointer
1814 instead of an address. Adjust.
1815 (gdb_condition_true_at_breakpoint): Rename to ...
1816 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1817 z_type parameter.
1818 (gdb_condition_true_at_breakpoint): Reimplement.
1819 (add_breakpoint_commands): Take a struct breakpoint pointer
1820 instead of an address. Adjust.
1821 (gdb_no_commands_at_breakpoint): Rename to ...
1822 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1823 parameter. Return true if no breakpoint was found. Change debug
1824 output.
1825 (gdb_no_commands_at_breakpoint): Reimplement.
1826 (run_breakpoint_commands): Rename to ...
1827 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1828 and change return type to boolean.
1829 (run_breakpoint_commands): New function.
1830 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1831 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1832 breakpoint. Go through the_target->remove_point instead of
1833 assuming memory breakpoint.
1834 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1835 software and hardware breakpoints.
1836 (reinsert_raw_breakpoint): Go through the_target->insert_point
1837 instead of assuming memory breakpoint.
1838 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1839 software and hardware breakpoints.
1840 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1841 Check both software and hardware breakpoints.
1842 (validate_inserted_breakpoint): Assert the breakpoint is a
1843 software breakpoint. Set the inserted flag to -1 instead of
1844 setting shlib_disabled.
1845 (delete_disabled_breakpoints): Adjust.
1846 (validate_breakpoints): Only validate software breakpoints.
1847 Adjust to inserted flag change.
1848 (check_mem_read, check_mem_write): Skip breakpoint types other
1849 than software breakpoints. Adjust to inserted flag change.
1850 * mem-break.h (enum raw_bkpt_type): New enum.
1851 (raw_breakpoint, struct process_info): Forward declare.
1852 (Z_packet_to_target_hw_bp_type): Delete declaration.
1853 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1854 (set_gdb_breakpoint, delete_gdb_breakpoint)
1855 (clear_breakpoint_conditions): New declarations.
1856 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1857 (breakpoint_inserted_here): Update comment.
1858 (add_breakpoint_condition, add_breakpoint_commands): Replace
1859 address parameter with a breakpoint pointer parameter.
1860 (gdb_breakpoint_here): Update comment.
1861 (delete_gdb_breakpoint_at): Delete.
1862 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1863 * server.c (process_point_options): Take a struct breakpoint
1864 pointer instead of an address. Adjust.
1865 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1866 delete_gdb_breakpoint.
1867 * spu-low.c (spu_target_ops): Install NULL as
1868 supports_z_point_type method.
1869 * target.h: Include mem-break.h.
1870 (struct target_ops) <prepare_to_access_memory>: Update comment.
1871 <supports_z_point_type>: New field.
1872 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1873 instead of a char. Also take a raw breakpoint pointer.
1874 * win32-arm-low.c (the_low_target): Install NULL as
1875 supports_z_point_type.
1876 * win32-i386-low.c (i386_supports_z_point_type): New function.
1877 (i386_insert_point, i386_remove_point): Adjust to new interface.
1878 (the_low_target): Install i386_supports_z_point_type.
1879 * win32-low.c (win32_supports_z_point_type): New function.
1880 (win32_insert_point, win32_remove_point): Adjust to new interface.
1881 (win32_target_ops): Install win32_supports_z_point_type.
1882 * win32-low.h (struct win32_target_ops):
1883 <supports_z_point_type>: New method.
1884 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1885 instead of a char. Also take a raw breakpoint pointer.
1886
932539e3
PA
18872014-05-20 Pedro Alves <palves@redhat.com>
1888
1889 * mem-break.h: Include break-common.h.
1890 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1891 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1892 (Z_packet_to_target_hw_bp_type): New declaration.
1893 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1894 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1895 (Z_PACKET_ACCESS_WP): Delete macros.
1896 (Z_packet_to_hw_type): Delete function.
1897 * i386-low.h: Don't include break-common.h here.
1898 (Z_packet_to_hw_type): Delete declaration.
1899 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1900 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1901 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1902 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1903 * linux-aarch64-low.c: Don't include break-common.h here.
1904 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1905 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1906 (Z_packet_to_target_hw_bp_type): Delete function.
1907 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1908 function.
1909 (mips_insert_point, mips_remove_point): Use
1910 Z_packet_to_target_hw_bp_type.
1911
4ff0d3d8
PA
19122014-05-20 Pedro Alves <palves@redhat.com>
1913
1914 * linux-aarch64-low.c: Include break-common.h.
1915 (enum target_point_type): Delete.
1916 (Z_packet_to_point_type): Rename to ...
1917 (Z_packet_to_target_hw_bp_type): ... this, and return a
1918 target_hw_bp_type instead.
1919 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1920 instead of an enum target_point_type.
1921 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1922 breakpoint type.
1923 (aarch64_dr_state_insert_one_point)
1924 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1925 (aarch64_handle_aligned_watchpoint)
1926 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1927 Take an enum target_hw_bp_type instead of an enum
1928 target_point_type.
1929 (aarch64_supports_z_point_type): New function.
1930 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1931 use Z_packet_to_target_hw_bp_type.
1932
786dc519
JB
19332014-05-20 Joel Brobecker <brobecker@adacore.com>
1934
1935 * configure.ac: Only use -Werror by default when DEVELOPMENT
1936 is true.
1937 * configure: Regenerate.
1938
9e0aa64f
JK
19392014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1940
1941 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1942 * linux-x86-low.c (X86_64_USER_REGS): New.
1943 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1944
2b577b92
YQ
19452014-04-28 Yao Qi <yao@codesourcery.com>
1946
1947 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1948 name.
1949
94611da2
PA
19502014-04-25 Pedro Alves <palves@redhat.com>
1951
1952 PR server/16255
1953 * linux-low.c (linux_attach_fail_reason_string): New function.
1954 (linux_attach_lwp): Delete.
1955 (linux_attach_lwp_1): Rename to ...
1956 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1957 argument. Remove "initial" parameter. Return int instead of
1958 void. Don't error or warn here.
1959 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1960 failure to attach to the tgid. Call warning when failing to
1961 attach to an lwp.
1962 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1963 argument. Remove "initial" parameter. Return int instead of
1964 void. Don't error or warn here.
1965 (linux_attach_fail_reason_string): New declaration.
1966 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1967 interface change. Use linux_attach_fail_reason_string.
1968
01f9f808
MS
19692014-04-24 Michael Sturm <michael.sturm@mintel.com>
1970 Walfred Tedeschi <walfred.tedeschi@intel.com>
1971
1972 * Makefile.in: Added rules to handle new files
1973 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1974 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1975 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1976 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1977 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1978 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1979 x32-avx512-linux.o.
1980 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1981 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1982 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1983 i386/x32-avx512.xml.
1984 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1985 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1986 i386/x32-avx512-linux.xml.
1987 * i387-fp.c (num_avx512_k_registers): New constant for number
1988 of K registers.
1989 (num_avx512_zmmh_low_registers): New constant for number of
1990 lower ZMM registers (0-15).
1991 (num_avx512_zmmh_high_registers): New constant for number of
1992 higher ZMM registers (16-31).
1993 (num_avx512_ymmh_registers): New contant for number of higher
1994 YMM registers (ymm16-31 added by avx521 on x86_64).
1995 (num_avx512_xmm_registers): New constant for number of higher
1996 XMM registers (xmm16-31 added by AVX512 on x86_64).
1997 (struct i387_xsave): Add space for AVX512 registers.
1998 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1999 Add code to handle AVX512 registers.
2000 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2001 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2002 prototypei from generated file.
2003 (tdesc_amd64_avx512_linux): Likewise.
2004 (init_registers_x32_avx512_linux): Likewise.
2005 (tdesc_x32_avx512_linux): Likewise.
2006 (init_registers_i386_avx512_linux): Likewise.
2007 (tdesc_i386_avx512_linux): Likewise.
2008 (x86_64_regmap): Add AVX512 registers.
2009 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2010 mask.
2011 (initialize_low_arch): Add code to initialize AVX512 registers.
2012
51aa91f9
PA
20132014-04-23 Pedro Alves <palves@redhat.com>
2014
2015 * mem-break.c (find_gdb_breakpoint_at): Make static.
2016 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2017
a4165e94
PA
20182014-04-23 Pedro Alves <palves@redhat.com>
2019
2020 * i386-low.c: Don't include break-common.h here.
2021 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2022 prototype to take target_hw_bp_type as argument instead of a Z
2023 packet char.
2024 * i386-low.h: Include break-common.h here.
2025 (Z_packet_to_hw_type): Declare.
2026 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2027 prototypes.
2028 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2029 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2030 (x86_remove_point): Convert the packet number to a
2031 target_hw_bp_type before calling i386_low_remove_watchpoint.
2032 * win32-i386-low.c (i386_insert_point): Convert the packet number
2033 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2034 (i386_remove_point): Convert the packet number to a
2035 target_hw_bp_type before calling i386_low_remove_watchpoint.
2036
b8acf843
PA
20372014-04-23 Pedro Alves <palves@redhat.com>
2038
2039 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2040
d708bcd1
PA
20412014-04-10 Pedro Alves <palves@redhat.com>
2042
2043 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2044 Check if the condition or command is NULL before checking if the
2045 breakpoint is known. On success, return true.
2046 * mem-break.h (add_breakpoint_condition): Document return.
2047 (add_breakpoint_commands): Add describing comment.
2048 * server.c (skip_to_semicolon): New function.
2049 (process_point_options): Use it.
2050
2eec7d5b
PA
20512014-04-09 Pedro Alves <palves@redhat.com>
2052
2053 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2054 to lwpid_of.
2055
fa96cb38
PA
20562014-02-27 Pedro Alves <palves@redhat.com>
2057
2058 PR 12702
2059 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2060 macros.
2061 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2062 output.
2063 (last_thread_of_process_p): Take a PID argument instead of a
2064 thread pointer.
2065 (linux_wait_for_lwp): Delete.
2066 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2067 functions.
2068 (linux_low_filter_event): New function, party factored out from
2069 linux_wait_for_event.
2070 (linux_wait_for_event): Rename to ...
2071 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2072 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2073 sigsuspend. Check for zombie leaders.
2074 (linux_wait_for_event): Reimplement as wrapper around
2075 linux_wait_for_event_filtered.
2076 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2077 a normal or signal exit is seen, it's the whole process exiting.
2078 (wait_for_sigstop): No longer a for_each_inferior callback.
2079 Rewrite on top of linux_wait_for_event_filtered.
2080 (stop_all_lwps): Call wait_for_sigstop directly.
2081 * server.c (resume, handle_target_event): Handle
2082 TARGET_WAITKIND_NO_RESUMED.
2083
d763de10
JB
20842014-02-26 Joel Brobecker <brobecker@adacore.com>
2085
2086 * win32-low.c (psapi_get_dll_name,
2087 * win32_CreateToolhelp32Snapshot): Delete.
2088 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2089 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2090 Delete.
2091 (handle_load_dll): Add function description.
2092 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2093
850a0f76
JB
20942014-02-26 Joel Brobecker <brobecker@adacore.com>
2095
2096 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2097 Add comment.
2098 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2099 base address when calling win32_add_one_solib.
2100 (handle_load_dll): Delete local variable load_addr.
2101 Remove 0x1000 offset applied to DLL base address when calling
2102 win32_add_one_solib.
2103 (handle_unload_dll): Add comment.
2104
f25b3fc3
JB
21052014-02-26 Joel Brobecker <brobecker@adacore.com>
2106
2107 * win32-low.c (win32_add_all_dlls): Renames
2108 win32_ensure_ntdll_loaded. Rewrite function documentation.
2109 Adjust implementation to always load all DLLs.
2110 Add 0x1000 offset to DLL base address when calling
2111 win32_add_one_solib.
2112 (child_initialization_done): New static global.
2113 (do_initial_child_stuff): Set child_initialization_done to
2114 zero during child initialization, and 1 after. Replace call
2115 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2116 Add comment.
2117 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2118 (handle_unload_dll): Add function documentation.
2119 (get_child_debug_event): Ignore load and unload DLL events
2120 during child initialization.
2121
d86d4aaf
DE
21222014-02-20 Doug Evans <dje@google.com>
2123
3bc32da3 2124 Remove global all_lwps.
d86d4aaf
DE
2125 * inferiors.h (ptid_of): Move here from linux-low.h.
2126 (pid_of, lwpid_of): Ditto.
2127 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2128 parameter is a struct thread_info * now.
2129 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2130 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2131 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2132 directly.
2133 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2134 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2135 * linux-arm-low.c (update_registers_callback): Update, "entry"
2136 parameter is a struct thread_info * now.
2137 Fetch lwpid from current_inferior directly.
2138 (arm_insert_point): Pass &all_threads to find_inferior instead of
2139 &all_lwps.
2140 (arm_remove_point): Ditto.
2141 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2142 (arm_prepare_to_resume): Fetch pid from thread.
2143 (arm_read_description): Fetch lwpid from current_inferior directly.
2144 * linux-low.c (all_lwps): Delete.
2145 (delete_lwp): Delete call to remove_inferior.
2146 (handle_extended_wait): Fetch lwpid from thread.
2147 (add_lwp): Don't set lwp->entry.id. Remove call to
2148 add_inferior_to_list.
2149 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2150 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2151 (kill_one_lwp_callback): Ditto.
2152 (linux_kill): Don't dereference NULL pointer.
2153 Fetch ptid,lwpid from thread.
2154 (get_detach_signal): Fetch ptid from thread.
2155 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2156 Simplify call to regcache_invalidate_thread.
2157 (delete_lwp_callback): Update, "entry" parameter is a
2158 struct thread_info * now. Fetch pid from thread.
2159 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2160 (status_pending_p_callback): Update, "entry" parameter is a
2161 struct thread_info * now. Fetch ptid from thread.
2162 (find_lwp_pid): Update, "entry" parameter is a
2163 struct thread_info * now.
2164 (linux_wait_for_lwp): Fetch pid from thread.
2165 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2166 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2167 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2168 (dequeue_one_deferred_signal): Ditto.
2169 (cancel_breakpoint): Fetch ptid from current_inferior.
2170 (linux_wait_for_event): Pass &all_threads to find_inferior,
2171 not &all_lwps. Fetch ptid, lwpid from thread.
2172 (count_events_callback): Update, "entry" parameter is a
2173 struct thread_info * now.
2174 (select_singlestep_lwp_callback): Ditto.
2175 (select_event_lwp_callback): Ditto.
2176 (cancel_breakpoints_callback): Ditto.
2177 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2178 not &all_lwps.
2179 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2180 (unsuspend_one_lwp): Update, "entry" parameter is a
2181 struct thread_info * now.
2182 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2183 not &all_lwps.
2184 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2185 Fetch lwpid from thread, not lwp.
2186 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2187 Pass &all_threads to find_inferior, not &all_lwps.
2188 (send_sigstop): Fetch lwpid from thread, not lwp.
2189 (send_sigstop_callback): Update, "entry" parameter is a
2190 struct thread_info * now.
2191 (suspend_and_send_sigstop_callback): Ditto.
2192 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2193 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2194 struct thread_info * now.
2195 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2196 from thread, lwp.
2197 (lwp_running): Update, "entry" parameter is a
2198 struct thread_info * now.
2199 (stop_all_lwps): Fetch ptid from thread.
2200 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2201 (linux_resume_one_lwp): Fetch lwpid from thread.
2202 (linux_set_resume_request): Update, "entry" parameter is a
2203 struct thread_info * now. Fetch pid, lwpid from thread.
2204 (resume_status_pending_p): Update, "entry" parameter is a
2205 struct thread_info * now.
2206 (need_step_over_p): Ditto. Fetch lwpid from thread.
2207 (start_step_over): Fetch lwpid from thread.
2208 (linux_resume_one_thread): Update, "entry" parameter is a
2209 struct thread_info * now. Fetch lwpid from thread.
2210 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2211 (proceed_one_lwp): Update, "entry" parameter is a
2212 struct thread_info * now. Fetch lwpid from thread.
2213 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2214 struct thread_info * now.
2215 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2216 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2217 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2218 directly.
2219 (regsets_store_inferior_registers): Ditto.
2220 (fetch_register, store_register): Ditto.
2221 (linux_read_memory, linux_write_memory): Ditto.
2222 (linux_request_interrupt): Ditto.
2223 (linux_read_auxv): Ditto.
2224 (linux_xfer_siginfo): Ditto.
2225 (linux_qxfer_spu): Ditto.
2226 (linux_qxfer_libraries_svr4): Ditto.
2227 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2228 moved to inferiors.h.
2229 (get_lwp): Delete.
2230 (get_thread_lwp): Update.
2231 (struct lwp_info): Delete member "entry". Simplify comment for
2232 member "thread".
2233 (all_lwps): Delete.
2234 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2235 current_inferior directly.
2236 (update_watch_registers_callback): Update, "entry" parameter is a
2237 struct thread_info * now. Fetch pid from thread.
2238 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2239 (mips_insert_point): Fetch lwpid from current_inferior.
2240 Pass &all_threads to find_inferior, not &all_lwps.
2241 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2242 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2243 directly.
2244 (mips_stopped_data_address): Ditto.
2245 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2246 directly.
2247 * linux-tile-low.c (tile_arch_setup): Ditto.
2248 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2249 (update_debug_registers_callback): Update, "entry" parameter is a
2250 struct thread_info * now. Fetch pid from thread.
2251 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2252 Pass &all_threads to find_inferior, not &all_lwps.
2253 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2254 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2255 Pass &all_threads to find_inferior, not &all_lwps.
2256 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2257 (i386_dr_low_get_status): Ditto.
2258 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2259 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2260 (x86_linux_read_description): Ditto.
2261 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2262
3b8361aa
DE
22632014-02-20 Doug Evans <dje@google.com>
2264
2265 * inferiors.c (get_first_inferior): Fix buglet.
2266
f7667f0d
DE
22672014-02-19 Doug Evans <dje@google.com>
2268
2269 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2270 * inferiors.c (add_thread): Change result type to struct thread_info *.
2271 All callers updated.
2272 (add_lwp): Call add_thread here instead of in callers.
2273 All callers updated.
2274 * linux-low.h (get_lwp_thread): Rewrite.
2275 (struct lwp_info): New member "thread".
2276
b3312d80
DE
22772014-02-19 Doug Evans <dje@google.com>
2278
2279 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2280 All callers updated.
2281
ecc6f45c
DE
22822014-02-19 Doug Evans <dje@google.com>
2283
2284 * inferiors.c (add_thread): Fix whitespace.
2285
649ebbca
DE
22862014-02-19 Doug Evans <dje@google.com>
2287
2288 * dll.c (clear_dlls): Replace accessing list implemention details
2289 with API function.
2290 * gdbthread.h (get_first_thread): Declare.
2291 * inferiors.c (for_each_inferior_with_data): New function.
2292 (get_first_thread): New function.
2293 (find_thread_ptid): Simplify.
2294 (get_first_inferior): New function.
2295 (clear_list): Delete.
2296 (one_inferior_p): New function.
2297 (clear_inferior_list): New function.
2298 (clear_inferiors): Update.
2299 * inferiors.h (for_each_inferior_with_data): Declare.
2300 (clear_inferior_list): Declare.
2301 (one_inferior_p): Declare.
2302 (get_first_inferior): Declare.
2303 * linux-low.c (linux_wait_for_event): Replace accessing list
2304 implemention details with API function.
2305 * server.c (target_running): Ditto.
2306 (accumulate_file_name_length): New function.
2307 (emit_dll_description): New function.
2308 (handle_qxfer_libraries): Replace accessing list implemention
2309 details with API function.
2310 (handle_qxfer_threads_worker): New function.
2311 (handle_qxfer_threads_proper): Replace accessing list implemention
2312 details with API function.
2313 (handle_query): Ditto.
2314 (visit_actioned_threads_callback_ftype): New typedef.
2315 (visit_actioned_threads_data): New struct.
2316 (visit_actioned_threads): Rewrite to be find_inferior callback.
2317 (resume): Call find_inferior.
2318 (handle_status): Replace accessing list implemention
2319 details with API function.
2320 (process_serial_event): Replace accessing list implemention details
2321 with API function.
2322 * target.c (set_desired_inferior): Replace accessing list implemention
2323 details with API function.
2324 * tracepoint.c (same_process_p): New function.
2325 (gdb_agent_about_to_close): Replace accessing list implemention
2326 details with API function.
2327 * win32-low.c (child_delete_thread): Replace accessing list
2328 implemention details with API function.
2329 (match_dll_by_basename): New function.
2330 (dll_is_loaded_by_basename): New function.
2331 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2332 details call to dll_is_loaded_by_basename.
2333
80894984
DE
23342014-02-19 Doug Evans <dje@google.com>
2335
2336 * dll.h (struct dll_info): Add comment.
2337 * gdbthread.h (struct thread_info): Add comment.
2338 (current_ptid): Simplify.
2339 * inferiors.c (add_process): Update.
2340 (remove_process): Update.
2341 * inferiors.h (struct process_info): Rename member "head" to "entry".
2342 * linux-low.c (delete_lwp): Update.
2343 (add_lwp): Update.
2344 (last_thread_of_process_p): Update.
2345 (kill_one_lwp_callback, linux_kill): Update.
2346 (status_pending_p_callback): Update.
2347 (wait_for_sigstop): Update. Simplify read of ptid.
2348 (start_step_over): Update.
2349 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2350 (get_lwp_thread): Update.
2351 (struct lwp_info): Rename member "head" to "entry".
2352 * regcache.h (inferior_list_entry): Delete.
2353 * server.c (kill_inferior_callback): Update.
2354 (detach_or_kill_inferior_callback): Update.
2355 (print_started_pid): Update.
2356 (print_attached_pid): Update.
2357 (process_serial_event): Simplify read of ptid.
2358 * thread-db.c (thread_db_create_event): Update.
2359 (thread_db_get_tls_address): Update.
2360 * win32-low.c (current_inferior_ptid): Simplify.
2361
46917d26
TT
23622014-02-19 Tom Tromey <tromey@redhat.com>
2363
2364 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2365 argument.
2366 (target_supports_btrace): Update.
2367
0759a81e
YQ
23682014-02-14 Yao Qi <yao@codesourcery.com>
2369
2370 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2371 (rsp-low-ipa.o): New target.
2372
a7191e8b
TT
23732014-02-12 Tom Tromey <tromey@redhat.com>
2374
2375 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2376 convert_ascii_to_int.
2377 * regcache.c (registers_to_string): Likewise.
2378 * remote-utils.c (decode_M_packet): Likewise.
2379 * server.c (process_serial_event): Likewise.
2380
ff0e980e
TT
23812014-02-12 Tom Tromey <tromey@redhat.com>
2382
2383 * server.c (handle_query, handle_v_run): Use hex2bin, not
2384 unhexify.
2385 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2386
e9371aff
TT
23872014-02-12 Tom Tromey <tromey@redhat.com>
2388
2389 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2390 convert_int_to_ascii.
2391 * regcache.c (registers_to_string, collect_register_as_string):
2392 Likewise.
2393 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2394 Likewise.
2395 * server.c (process_serial_event): Likewise.
2396 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2397 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2398
971dc0b8
TT
23992014-02-12 Tom Tromey <tromey@redhat.com>
2400
2401 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2402 bin2hex, not hexify.
2403 * tracepoint.c (cmd_qtstatus): Likewise.
2404
0a822afb
TT
24052014-02-12 Tom Tromey <tromey@redhat.com>
2406
2407 * remote-utils.c (monitor_output): Pass explicit length to
2408 hexify.
2409
9c3d6531
TT
24102014-02-12 Tom Tromey <tromey@redhat.com>
2411
2412 * tracepoint.c: Include rsp-low.h.
2413 * server.c: Include rsp-low.h.
2414 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2415 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2416 declare.
2417 * remote-utils.c: Include rsp-low.h.
2418 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2419 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2420 (convert_int_to_ascii, convert_ascii_to_int): Move to
2421 common/rsp-low.c.
2422 * regcache.c: Include rsp-low.h.
2423 * ax.c: Include rsp-low.h.
2424 * Makefile.in (SFILES): Add common/rsp-low.c.
2425 (OBS): Add rsp-low.o.
2426 (rsp-low.o): New target.
2427
01fd3ea5
TT
24282014-02-12 Tom Tromey <tromey@redhat.com>
2429
2430 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2431 Include print-utils.h.
2432 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2433 (plongest, thirty_two, phex_nz): Remove.
2434 * Makefile.in (SFILES): Add common/print-utils.c.
2435 (OBS): Add print-utils.o.
2436 (print-utils-ipa.o): New target.
2437 (print-utils.o): New target.
2438 (IPA_OBJS): Add print-utils-ipa.o.
2439
e99dc820
TT
24402014-02-06 Tom Tromey <tromey@redhat.com>
2441
2442 * Makefile.in (SFILES): Fix indentation.
2443
ee1e2d4f
DE
24442014-02-05 Doug Evans <dje@google.com>
2445
2446 * linux-low.c (linux_wait_for_event): Improve comment.
2447 (linux_wait_1): Keep current_inferior in sync with event_child.
2448
f5a02773
DE
24492014-01-22 Doug Evans <dje@google.com>
2450
2451 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2452
87ce2a04
DE
24532014-01-22 Doug Evans <dje@google.com>
2454
2455 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2456 * configure: Regenerate.
2457 * config.in: Regenerate.
2458 * Makefile.in (SFILES): Add debug.c.
2459 (OBS): Add debug.o.
2460 * debug.c: New file.
2461 * debug.h: New file.
2462 * linux-aarch64-low.c (*): Update all debugging printfs to use
2463 debug_printf instead of fprintf.
2464 * linux-arm-low.c (*): Ditto.
2465 * linux-cris-low.c (*): Ditto.
2466 * linux-crisv32-low.c (*): Ditto.
2467 * linux-m32r-low.c (*): Ditto.
2468 * linux-sparc-low.c (*): Ditto.
2469 * linux-x86.c (*): Ditto.
2470 * linux-low.c (*): Ditto.
2471 (linux_wait_1): Add calls to debug_enter, debug_exit.
2472 (linux_wait): Remove redundant debugging printf.
2473 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2474 (linux_resume, unstop_all_lwps): Ditto.
2475 * mem-break.c (*): Update all debugging printfs to use
2476 debug_printf instead of fprintf.
2477 * remote-utils.c (*): Ditto.
2478 * thread-db.c (*): Ditto.
2479 * server.c #include <ctype.h>, "gdb_vecs.h".
2480 (debug_threads): Moved to debug.c.
2481 (*): Update all debugging printfs to use debug_printf instead of
2482 fprintf.
2483 (start_inferior): Replace call to fflush with call to debug_flush.
2484 (monitor_show_help): Mention set debug-format.
2485 (parse_debug_format_options): New function.
2486 (handle_monitor_command): Handle "monitor set debug-format".
2487 (gdbserver_usage): Mention --debug-format.
2488 (main): Parse --debug-format.
2489 * server.h (debug_threads): Declaration moved to debug.h.
2490 #include "debug.h".
2491 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2492 trace_debug_1 that uses debug_printf.
2493 (tracepoint_look_up_symbols): Update all debugging printfs to use
2494 debug_printf instead of fprintf.
2495
e671835b
BS
24962014-01-20 Baruch Siach <baruch@tkos.co.il>
2497
2498 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2499 sys/ptrace.h.
2500
b5737fa9
PA
25012014-01-17 Pedro Alves <palves@redhat.com>
2502
ea38d2a9 2503 PR build/16445
c7faa97a
PA
2504 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2505 defined after including gdb_proc_service.h.
b5737fa9 2506
40ed484e
DE
25072014-01-16 Doug Evans <dje@google.com>
2508
2509 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2510 (match_dll): Use it.
2511
969c39fb
MM
25122014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2513
2514 * target.h (target_ops) <read_btrace>: Change parameters and
2515 return type to allow error reporting.
2516 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2517 trace reading errors on.
2518 * linux-low.c (linux_low_read_btrace): Pass trace reading
2519 errors on.
2520 (linux_low_disable_btrace): New.
2521
ab7f45ba
DE
25222014-01-15 Doug Evans <dje@google.com>
2523
2524 * inferiors.c (thread_id_to_gdb_id): Delete.
2525 * inferiors.h (thread_id_to_gdb_id): Delete.
2526
66af0f44
EZ
25272014-01-13 Eli Zaretskii <eliz@gnu.org>
2528
2529 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2530 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2531 versions.
2532
9939e131
PA
25332014-01-08 Pedro Alves <palves@redhat.com>
2534
2535 * server.c (handle_status): Don't discard previous queued stop
2536 replies or thread's pending status here.
2537 (main) <disconnection>: Do it here instead.
2538
b7ea362b
PA
25392014-01-08 Pedro Alves <palves@redhat.com>
2540
2541 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2542 * server.c (visit_actioned_threads, handle_pending_status): New
2543 function.
2544 (handle_v_cont): Factor out parts to ...
2545 (resume): ... this new function. If in all-stop, and a thread
2546 being resumed has a pending status, report it without actually
2547 resuming.
2548 (myresume): Adjust to use the new 'resume' function.
2549 (clear_pending_status_callback, set_pending_status_callback)
2550 (find_status_pending_thread_callback): New functions.
2551 (handle_status): Handle the case of multiple threads having
2552 interesting statuses to report. Report threads' real last signal
2553 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2554 with an interesting thread to report the status for, instead of
2555 always reporting the status of the first thread.
2556
28498c42
JB
25572014-01-01 Joel Brobecker <brobecker@adacore.com>
2558
2559 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2560 * gdbreplay.c (gdbreplay_version): Likewise.
2561
f45c82da
YZ
25622013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2563
2564 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2565 iov.iov_len with the real length in use.
2566
379a5e2d
JB
25672013-12-13 Joel Brobecker <brobecker@adacore.com>
2568
2569 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2570 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2571 for all targets that use win32-low.c.
2572 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2573 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2574
4210d83e
PA
25752013-12-13 Pedro Alves <palves@redhat.com>
2576
2577 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2578 if equal to TARGET_WAITKIND_LOADED.
2579 * win32-low.c (cached_status): New static global.
2580 (win32_wait): Add declaration.
2581 (do_initial_child_stuff): Flush all initial pending debug events
2582 up to the initial breakpoint.
2583 (win32_wait): If CACHED_STATUS was set, return that instead
2584 of doing a real wait. Remove the code resuming the execution
2585 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2586 during the initial phase. Also remove the code changing
2587 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2588 TARGET_WAITKIND_STOPPED.
2589
e7f0d979
YQ
25902013-12-11 Yao Qi <yao@codesourcery.com>
2591
2592 * notif.c (handle_notif_ack): Return 0 if no notification
2593 matches.
2594
ebcf782c
DE
25952013-11-20 Doug Evans <dje@google.com>
2596
2597 * linux-low.c (linux_set_resume_request): Fix comment.
2598
20ad9378
DE
25992013-11-20 Doug Evans <dje@google.com>
2600
2601 * linux-low.c (resume_status_pending_p): Tweak comment.
2602
a196ebeb
WT
26032013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2604
2605 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2606 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2607 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2608 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2609 (srv_amd64_regobj): Add amd64-mpx.o.
2610 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2611 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2612 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2613 * i387-fp.c (num_pl_bnd_register) Added constant.
2614 (num_pl_bnd_cfg_registers) Added constant.
2615 (struct i387_xsave) Added reserved area and MPX fields.
2616 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2617 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2618 function.
2619 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2620 (init_registers_amd64_mpx_linux): Declare new function.
2621 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2622 (x86_64_regmap): Add MPX registers.
2623 (x86_linux_read_description): Add MPX case.
2624 (initialize_low_arch): Initialize MPX targets.
2625
0080a2f6
TT
26262013-11-18 Tom Tromey <tromey@redhat.com>
2627
2628 * configure: Rebuild.
2629 * configure.ac: Don't check for stdlib.h.
2630 * gdbreplay.c: Unconditionally include stdlib.h.
2631
2978b111
TT
26322013-11-18 Tom Tromey <tromey@redhat.com>
2633
2634 * config.in: Rebuild.
2635 * configure: Rebuild.
2636 * configure.ac: Don't use AC_HEADER_DIRENT.
2637
a3d08894
TT
26382013-11-18 Tom Tromey <tromey@redhat.com>
2639
2640 * server.h: Don't check HAVE_STRING_H.
2641 * gdbreplay.c: Don't check HAVE_STRING_H.
2642 * configure: Rebuild.
2643
0a5dd17d
TT
26442013-11-18 Tom Tromey <tromey@redhat.com>
2645
2646 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2647 LIBGNU.
2648
1bd2f0ba
TT
26492013-11-08 Tom Tromey <tromey@redhat.com>
2650
2651 * configure, config.in: Rebuild.
2652 * configure.ac: Remove unused configury.
2653
3266f10b
TT
26542013-11-08 Tom Tromey <tromey@redhat.com>
2655
2656 * acinclude.m4: Include common.m4, codeset.m4.
2657 * configure, config.in: Rebuild.
2658 * configure.ac: Use GDB_AC_COMMON.
2659
6682d959
AA
26602013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2661
2662 * linux-s390-low.c (HWCAP_S390_TE): New define.
2663 (s390_arch_setup): Consider the TE field in the HWCAP for
2664 determining 'have_regset_tdb'.
2665
fd0a4d76
SDJ
26662013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2667
2668 PR gdb/16014
2669 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2670 call to sizeof.
2671
1a3d890b
PA
26722013-10-02 Pedro Alves <palves@redhat.com>
2673
2674 * server.c (process_serial_event): Don't output "GDBserver
2675 exiting" if GDB is connected through stdio.
2676 * target.c (mywait): Likewise, be silent if GDB is connected
2677 through stdio.
2678
97ad4581
JB
26792013-10-01 Joel Brobecker <brobecker@adacore.com>
2680
2681 * lynx-low.c (lynx_add_threads_after_attach): New function.
2682 (lynx_attach): Remove call to add_thread. Add call to
2683 lynx_add_threads_after_attach instead.
2684
5b4e221c
MF
26852013-09-28 Mike Frysinger <vapier@gentoo.org>
2686
2687 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2688 * config.in, configure: Regenerated.
2689
ee47b2f8
YQ
26902013-09-18 Yao Qi <yao@codesourcery.com>
2691
2692 PR server/15959
2693 * server.c (start_inferior): Clear 'resume_info'.
2694
d6707650 26952013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2696
d6707650
JW
2697 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2698 for each register.
2699
9243dd0e 27002013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2701
9243dd0e
JW
2702 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2703 linux-tile-low.o to srv_tgtobj.
2704
c623a6ef
WN
27052013-09-16 Will Newton <will.newton@linaro.org>
2706
2707 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2708 out regs.
2709
fb71d39e
PA
27102013-09-06 Pedro Alves <palves@redhat.com>
2711
2712 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2713 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2714 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2715 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2716 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2717 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2718
8e7e9910
PA
27192013-09-06 Pedro Alves <palves@redhat.com>
2720
2721 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2722 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2723
7c3a12ca
PA
27242013-09-06 Pedro Alves <palves@redhat.com>
2725
2726 * linux-amd64-ipa.c: Include tracepoint.h.
2727 * linux-i386-ipa.c: Include tracepoint.h.
2728
8eb3d7b6
RW
27292013-09-06 Ricard Wanderlof <ricardw@axis.com>
2730
2731 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2732 (ps_get_thread_area): New function.
2733
eddddb9d
RW
27342013-09-06 Ricard Wanderlof <ricardw@axis.com>
2735
2736 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2737 (initialize_low_arch): Call init_registers_crisv32 rather than
2738 init_register_crisv32.
2739
533b0600
PA
27402013-09-05 Pedro Alves <palves@redhat.com>
2741
2742 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2743 to ...
2744 * hostio.h: ... this new file.
2745 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2746 win32-low.c: Include hostio.h.
2747
0ce3d3b5
PA
27482013-09-05 Pedro Alves <palves@redhat.com>
2749
2750 * server.h (gdb_client_data, handler_func, callback_handler_func)
2751 (delete_file_handler, add_file_handler, append_callback_event)
2752 (delete_callback_event, start_event_loop, initialize_event_loop):
2753 Move to event-loop.h and include it.
2754 * event-loop.h: New file.
2755
799cdc37
PA
27562013-09-05 Pedro Alves <palves@redhat.com>
2757
2758 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2759 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2760 (loaded_dll, unloaded_dll): Move to ...
2761 * dll.h: ... this new file.
2762 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2763
6a6bbd9d
PA
27642013-09-05 Pedro Alves <palves@redhat.com>
2765
2766 * server.h (current_process, get_thread_process, all_processes)
2767 (add_inferior_to_list, for_each_inferior, current_inferior)
2768 (remove_inferior, add_process, remove_process, find_process_pid)
2769 (have_started_inferiors_p, have_attached_inferiors_p)
2770 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2771 (clear_inferiors, find_inferior, find_inferior_id)
2772 (inferior_target_data, set_inferior_target_data)
2773 (inferior_regcache_data, set_inferior_regcache_data): Move to
2774 inferiors.h, and include it.
2775 * inferiors.h: New file.
2776
f699aaba
PA
27772013-09-05 Pedro Alves <palves@redhat.com>
2778
2779 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2780 Move ...
2781 * ax.h: ... here.
2782
c144c7a0
PA
27832013-09-05 Pedro Alves <palves@redhat.com>
2784
2785 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2786 tracepoint.h.
2787 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2788 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2789 (handle_tracepoint_general_set, handle_tracepoint_query)
2790 (tracepoint_finished_step, tracepoint_was_hit)
2791 (release_while_stepping_state_list, current_traceframe)
2792 (in_readonly_region, traceframe_read_mem)
2793 (fetch_traceframe_registers, traceframe_read_sdata)
2794 (traceframe_read_info, struct fast_tpoint_collect_status)
2795 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2796 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2797 (supply_fast_tracepoint_registers)
2798 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2799 (ipa_tdesc, claim_trampoline_space)
2800 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2801 (agent_mem_read, agent_get_trace_state_variable_value)
2802 (agent_set_trace_state_variable_value, agent_tsv_read)
2803 (agent_mem_read_string, get_raw_reg_func_addr)
2804 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2805 * tracepoint.h: ... this new file.
2806
ff42e6ab
PA
28072013-09-05 Pedro Alves <palves@redhat.com>
2808
2809 * server.h (perror_with_name, error, fatal, warning, paddress)
2810 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2811 include it.
2812 * utils.h: New file.
2813
541af0f4
PA
28142013-09-05 Pedro Alves <palves@redhat.com>
2815
2816 * server.h (remote_debug, noack_mode, transport_is_reliable)
2817 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2818 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2819 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2820 (write_enn, initialize_async_io, enable_async_io)
2821 (disable_async_io, check_remote_input_interrupt_request)
2822 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2823 (dead_thread_notify, prepare_resume_reply)
2824 (decode_address_to_semicolon, decode_address, decode_m_packet)
2825 (decode_M_packet, decode_X_packet, decode_xfer_write)
2826 (decode_search_memory_packet, unhexify, hexify)
2827 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2828 (look_up_one_symbol, relocate_instruction)
2829 (monitor_output): Move to remote-utils.h, and include it.
2830 * remote-utils.h: New file.
2831
eebdf26b
PA
28322013-09-05 Pedro Alves <palves@redhat.com>
2833
2834 * server.h (_): Delete.
2835
3aafd2ff
PA
28362013-09-02 Pedro Alves <palves@redhat.com>
2837
2838 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2839 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2840 allocated.
2841 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2842
cee83bcb
PM
28432013-09-02 Pierre Muller <muller@sourceware.org>
2844
2845 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2846 or WriteProcessMemory complete successfully and handle
2847 ERROR_PARTIAL_COPY error.
2848
9a13b2fa
PA
28492013-09-02 Pedro Alves <palves@redhat.com>
2850
2851 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2852 error instead of EIO.
2853
602e3198
JK
28542013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2855
2856 PR server/15604
2857 * linux-low.c: Include filestuff.h.
2858 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2859 * lynx-low.c: Include filestuff.h.
2860 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2861 * server.c: Include filestuff.h.
2862 (main): Call notice_open_fds.
2863 * spu-low.c: Include filestuff.h.
2864 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2865
96d7229d
LM
28662013-08-22 Luis Machado <lgustavo@codesourcery.com>
2867
2868 * Makefile.in: Explain why ../target and ../nat are not
2869 listed as include file search paths.
2870 (linux-waitpid.o): New object file rule.
2871 * configure.srv (srv_native_linux_obj): New variable.
2872 Replace all occurrences of linux native object files with
2873 $srv_native_linux_obj.
2874 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2875 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2876 (linux_enable_event_reporting): Remove declaration.
2877 (my_waitpid): Moved to common/linux-waitpid.c.
2878 (linux_wait_for_event): Pass ptid when calling
2879 linux_enable_event_reporting.
2880 (linux_supports_tracefork_flag): Remove.
2881 (linux_enable_event_reporting): Likewise.
2882 (linux_tracefork_grandchild): Remove.
2883 (STACK_SIZE): Moved to common/linux-ptrace.c.
2884 (linux_tracefork_child): Remove.
2885 (linux_test_for_tracefork): Remove.
2886 (linux_look_up_symbols): Call linux_supports_traceclone.
2887 (initialize_low): Remove call to linux_test_for_tracefork.
2888 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2889 common/linux-ptrace.h.
2890 (PTRACE_TYPE_ARG4): Likewise.
2891 Include linux-ptrace.h.
2892
32940073
PA
28932013-08-21 Pedro Alves <palves@redhat.com>
2894
2895 * config.in: Renegerate.
2896
33b60d58 28972013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2898
33b60d58
LM
2899 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2900 (SFILES): Remove $(srcdir)/common/target-common.c and
2901 add $(srcdir)/target/waitstatus.c.
2902 (OBS): Remove target-common.o and add waitstatus.o.
2903 (server_h): Remove $(srcdir)/../common/target-common.h and
2904 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2905 and $(srcdir)/../target/waitstatus.h.
2906 (target-common.o): Remove.
2907 (waitstatus.o): New target object file.
2908 * target.h: Do not include target-common.h and
2909 include target/resume.h, target/wait.h and
2910 target/waitstatus.h.
2911
b8e1b30e
LM
29122013-08-13 Luis Machado <lgustavo@codesourcery.com>
2913
2914 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2915 to PTRACE_TYPE_ARG3.
2916 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2917 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2918 PTRACE_TYPE_ARG4.
2919 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2920 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2921
7a60ad40
YQ
29222013-07-27 Jie Zhang <jie@codesourcery.com>
2923 Daniel Jacobowitz <dan@codesourcery.com>
2924 Yao Qi <yao@codesourcery.com>
2925
2926 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2927 (mips-linux-watch.o): New rule.
2928 (mips_linux_watch_h): New variable.
2929 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2930 srv_tgtobj.
2931 * linux-mips-low.c: Include mips-linux-watch.h.
2932 (struct arch_process_info, struct arch_lwp_info): New.
2933 (update_watch_registers_callback): New function.
2934 (mips_linux_new_process, mips_linux_new_thread) New functions.
2935 (mips_linux_prepare_to_resume, mips_insert_point): New
2936 functions.
2937 (mips_remove_point, mips_stopped_by_watchpoint): New
2938 functions.
2939 (rsp_bp_type_to_target_hw_bp_type): New function.
2940 (mips_stopped_data_address): New function.
2941 (the_low_target): Add watchpoint support functions.
2942
de6f69ad
YQ
29432013-07-27 Yao Qi <yao@codesourcery.com>
2944
2945 * i386-low.c: Include break-common.h.
2946 (enum target_hw_bp_type): Remove.
2947
3360c0bf
LM
29482013-07-24 Luis Machado <lgustavo@codesourcery.com>
2949
2950 * Makefile.in (SFILES): /common/target-common.c.
2951 (OBS): Add target-common.o.
2952 (server_h): Add $(srcdir)/../common/target-common.h.
2953 (target-common.o): New target.
2954 * server.c (queue_stop_reply_callback): Free
2955 status string after use.
2956 * target.c (target_waitstatus_to_string): Remove.
2957 * target.h: Include target-common.h.
2958 (resume_kind): Likewise.
2959 (target_waitkind): Likewise.
2960 (target_waitstatus): Likewise.
2961 (TARGET_WNOHANG): Likewise.
2962
bd885420
YQ
29632013-07-04 Yao Qi <yao@codesourcery.com>
2964
2965 * Makefile.in (host_alias): Use @host_noncanonical@.
2966 (target_alias): Use @target_noncanonical@.
2967 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2968 ACX_NONCANONICAL_HOST.
2969 * configure: Regenerated.
2970
2971 Revert:
2972 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2973
2974 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2975 * configure: Rebuild.
2976 * Makefile.in (version_host, version_target): Get from configure.
2977 (version.c): Use $(version_host) and $(version_target).
2978
17ef446e
PA
29792013-07-03 Pedro Alves <palves@redhat.com>
2980
2981 * Makefile.in (config.status): Depend on development.sh.
2982 * acinclude.m4: Include libmcheck.m4.
2983 * configure: Regenerate.
2984
7a9a7487
MG
29852013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2986
2987 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2988 attribute inside the parentheses.
2989 (winapi_DebugSetProcessKillOnExit): Ditto.
2990 (winapi_DebugBreakProcess): Ditto.
2991 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2992
49b64de6
MG
29932013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2994
2995 * notif.h (notif_event): Add a dummy member to avoid compiler
2996 errors.
2997
d5749ee7
PA
29982013-07-01 Pedro Alves <palves@redhat.com>
2999
3000 * hostio.c (HOSTIO_PATH_MAX): Define.
3001 (require_filename, handle_open, handle_unlink, handle_readlink):
3002 Use it.
3003
d8d2a3ee
PA
30042013-07-01 Pedro Alves <palves@redhat.com>
3005
3006 * server.h: Include "pathmax.h".
3007 * linux-low.c: Don't include sys/param.h.
3008 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3009 MAXPATHLEN.
3010 * win32-low.c: Don't include sys/param.h.
3011 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3012
bc7dea8d
PA
30132013-07-01 Pedro Alves <palves@redhat.com>
3014
3015 * event-loop.c: Don't check HAVE_UNISTD_H before including
3016 <unistd.h>.
3017 * gdbreplay.c: Likewise.
3018 * remote-utils.c: Likewise.
3019 * server.c: Likewise.
3020 * configure.ac: Don't check for unistd.h.
3021 * configure: Regenerate.
3022
d6c2da54
TT
30232013-06-28 Tom Tromey <tromey@redhat.com>
3024
3025 * Makefile.in (version.c): Use version.in, not
3026 common/version.in.
3027
257b6bec
MG
30282013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3029
3030 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3031 * configure: Rebuild.
3032 * Makefile.in (version_host, version_target): Get from configure.
3033 (version.c): Use $(version_host) and $(version_target).
3034
86ebe149
DK
30352013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3036
3037 Fix trace-status to output user name without trailing colon.
3038 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3039
f30aa5af
DK
30402013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3041
3042 Fix trace-status to output proper start-time and stop-time.
3043 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3044 output start time and stop time in hex as gdb expects.
3045
28a93511
YQ
30462013-06-26 Pedro Alves <pedro@codesourcery.com>
3047
3048 * tracepoint.c (build_traceframe_info_xml): Output trace state
3049 variables present in the trace buffer.
3050
01208463
TT
30512013-06-24 Tom Tromey <tromey@redhat.com>
3052
3053 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3054 create-version.sh.
3055 (version.o): Remove.
3056 * gdbreplay.c: Include version.h.
3057 (version, host_name): Don't declare.
3058 * server.h: Include version.h.
3059 (version, host_name): Don't declare.
3060
760256f9
PA
30612013-06-12 Pedro Alves <palves@redhat.com>
3062
3063 * linux-x86-low.c (linux_is_elf64): Delete global.
3064 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3065 with local linux_pid_exe_is_elf_64_file use.
3066
030031ee
PA
30672013-06-11 Pedro Alves <palves@redhat.com>
3068
3069 * linux-low.c (regset_disabled, disable_regset): New functions.
3070 (regsets_fetch_inferior_registers)
3071 (regsets_store_inferior_registers): Use them.
3072 (initialize_regsets_info); Don't allocate the disabled_regsets
3073 array here.
3074 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3075 comment.
3076
5da6eb0a
PA
30772013-06-11 Pedro Alves <palves@redhat.com>
3078
3079 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3080 xmalloc.
3081
7e5aaa09
PA
30822013-06-11 Pedro Alves <palves@redhat.com>
3083
3084 * linux-x86-low.c (initialize_low_arch): Call
3085 init_registers_x32_avx_linux.
3086
d878444c
JK
30872013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3088
3089 Fix compatibility with Android Bionic.
3090 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3091 it is not empty.
3092
3aee8918
PA
30932013-06-07 Pedro Alves <palves@redhat.com>
3094
5f2b57b5 3095 PR server/14823
3aee8918
PA
3096 * Makefile.in (OBS): Add tdesc.o.
3097 (IPA_OBJS): Add tdesc-ipa.o.
3098 (tdesc-ipa.o): New rule.
3099 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3100 interface.
3101 * linux-low.c (new_inferior): Delete.
3102 (disabled_regsets, num_regsets): Delete.
3103 (linux_add_process): Adjust to set the new per-process
3104 new_inferior flag.
3105 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3106 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3107 was a stop. When calling arch_setup, switch the current inferior
3108 to the thread that got an event.
3109 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3110 (regsets_fetch_inferior_registers)
3111 (regsets_store_inferior_registers): New regsets_info parameter.
3112 Adjust to use it.
3113 (linux_register_in_regsets): New regs_info parameter. Adjust to
3114 use it.
3115 (register_addr, fetch_register, store_register): New usrregs_info
3116 parameter. Adjust to use it.
3117 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3118 parameter regs_info. Adjust to use it.
3119 (linux_fetch_registers): Get the current inferior's regs_info, and
3120 adjust to use it.
3121 (linux_store_registers): Ditto.
3122 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3123 (initialize_low): Don't initialize the target_regsets here. Call
3124 initialize_low_arch.
3125 * linux-low.h (target_regsets): Delete declaration.
3126 (struct regsets_info): New.
3127 (struct usrregs_info): New.
3128 (struct regs_info): New.
3129 (struct process_info_private) <new_inferior>: New field.
3130 (struct linux_target_ops): Delete the num_regs, regmap, and
3131 regset_bitmap fields. New field regs_info.
3132 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3133 * i387-fp.c (num_xmm_registers): Delete.
3134 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3135 calls to new interface.
3136 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3137 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3138 Infer the number of xmm registers from the regcache's target
3139 description.
3140 * i387-fp.h (num_xmm_registers): Delete.
3141 * inferiors.c (add_thread): Don't install the thread's regcache
3142 here.
3143 * proc-service.c (gregset_info): Fetch the current inferior's
3144 regs_info. Adjust to use it.
3145 * regcache.c: Include tdesc.h.
3146 (register_bytes, reg_defs, num_registers)
3147 (gdbserver_expedite_regs): Delete.
3148 (get_thread_regcache): If the thread doesn't have a regcache yet,
3149 create one, instead of aborting gdbserver.
3150 (regcache_invalidate_one): Rename to ...
3151 (regcache_invalidate_thread): ... this.
3152 (regcache_invalidate_one): New.
3153 (regcache_invalidate): Only invalidate registers of the current
3154 process.
3155 (init_register_cache): Add target_desc parameter, and use it.
3156 (new_register_cache): Ditto. Assert the target description has a
3157 non zero registers_size.
3158 (regcache_cpy): Add assertions. Adjust.
3159 (realloc_register_cache, set_register_cache): Delete.
3160 (registers_to_string, registers_from_string): Adjust.
3161 (find_register_by_name, find_regno, find_register_by_number)
3162 (register_cache_size): Add target_desc parameter, and use it.
3163 (free_register_cache_thread, free_register_cache_thread_one)
3164 (regcache_release, register_cache_size): New.
3165 (register_size): Add target_desc parameter, and use it.
3166 (register_data, supply_register, supply_register_zeroed)
3167 (supply_regblock, supply_register_by_name, collect_register)
3168 (collect_register_as_string, collect_register_by_name): Adjust.
3169 * regcache.h (struct target_desc): Forward declare.
3170 (struct regcache) <tdesc>: New field.
3171 (init_register_cache, new_register_cache): Add target_desc
3172 parameter.
3173 (regcache_invalidate_thread): Declare.
3174 (regcache_invalidate_one): Delete declaration.
3175 (regcache_release): Declare.
3176 (find_register_by_number, register_cache_size, register_size)
3177 (find_regno): Add target_desc parameter.
3178 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3179 declarations.
3180 * remote-utils.c: Include tdesc.h.
3181 (outreg, prepare_resume_reply): Adjust.
3182 * server.c: Include tdesc.h.
3183 (gdbserver_xmltarget): Delete declaration.
3184 (get_features_xml, process_serial_event): Adjust.
3185 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3186 declare.
3187 (struct process_info) <tdesc>: New field.
3188 (ipa_tdesc): Declare.
3189 * tdesc.c: New file.
3190 * tdesc.h: New file.
3191 * tracepoint.c: Include tdesc.h.
3192 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3193 (get_context_regcache): Adjust to pass ipa_tdesc down.
3194 (do_action_at_tracepoint): Adjust to get the register cache size
3195 from the context regcache's description.
3196 (traceframe_walk_blocks): Adjust to get the register cache size
3197 from the current trace frame's description.
3198 (traceframe_get_pc): Adjust to get current trace frame's
3199 description and pass it down.
3200 (gdb_collect): Adjust to get the register cache size from the
3201 IPA's description.
3202 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3203 (gdbserver_xmltarget): Delete.
3204 (initialize_low_tracepoint): Set the ipa's target description.
3205 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3206 (initialize_low_tracepoint): Set the ipa's target description.
3207 * linux-x86-low.c: Include tdesc.h.
3208 [__x86_64__] (is_64bit_tdesc): New.
3209 (ps_get_thread_area, x86_get_thread_area): Use it.
3210 (i386_cannot_store_register): Rename to ...
3211 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3212 (i386_cannot_fetch_register): Rename to ...
3213 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3214 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3215 to new interface.
3216 (target_regsets): Rename to ...
3217 (x86_regsets): ... this.
3218 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3219 interface.
3220 (x86_siginfo_fixup): Use is_64bit_tdesc.
3221 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3222 (tdesc_x32_avx_linux, tdesc_x32_linux)
3223 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3224 Declare.
3225 (x86_linux_update_xmltarget): Delete.
3226 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3227 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3228 (AMD64_LINUX_USER64_CS): New.
3229 (x86_linux_read_description): New, based on
3230 x86_linux_update_xmltarget.
3231 (same_process_callback): New.
3232 (x86_arch_setup_process_callback): New.
3233 (x86_linux_update_xmltarget): New.
3234 (x86_regsets_info): New.
3235 (amd64_linux_regs_info): New.
3236 (i386_linux_usrregs_info): New.
3237 (i386_linux_regs_info): New.
3238 (x86_linux_regs_info): New.
3239 (x86_arch_setup): Reimplement.
3240 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3241 (x86_emit_ops): Ditto.
3242 (the_low_target): Adjust. Install x86_linux_regs_info,
3243 x86_cannot_fetch_register, and x86_cannot_store_register.
3244 (initialize_low_arch): New.
3245 * linux-ia64-low.c (tdesc_ia64): Declare.
3246 (ia64_fetch_register): Adjust.
3247 (ia64_usrregs_info, regs_info): New globals.
3248 (ia64_regs_info): New function.
3249 (the_low_target): Adjust.
3250 (initialize_low_arch): New function.
3251 * linux-sparc-low.c (tdesc_sparc64): Declare.
3252 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3253 Adjust.
3254 (sparc_arch_setup): New function.
3255 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3256 (the_low_target): Adjust.
3257 (initialize_low_arch): New function.
3258 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3259 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3260 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3261 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3262 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3263 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3264 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3265 (tdesc_powerpc_isa205_vsx64l): Declare.
3266 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3267 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3268 (ppc_set_pc, ppc_get_hwcap): Adjust.
3269 (ppc_usrregs_info): Forward declare.
3270 (!__powerpc64__) ppc_regmap_adjusted: New global.
3271 (ppc_arch_setup): Adjust to the current process'es target
3272 description.
3273 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3274 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3275 (ppc_store_evrregset): Adjust.
3276 (target_regsets): Rename to ...
3277 (ppc_regsets): ... this, and make static.
3278 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3279 (ppc_regs_info): New function.
3280 (the_low_target): Adjust.
3281 (initialize_low_arch): New function.
3282 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3283 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3284 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3285 (tdesc_s390x_linux64v2): Declare.
3286 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3287 (s390_fill_gregset, s390_store_last_break): Adjust.
3288 (target_regsets): Rename to ...
3289 (s390_regsets): ... this, and make static.
3290 (s390_get_pc, s390_set_pc): Adjust.
3291 (s390_get_hwcap): New target_desc parameter, and use it.
3292 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3293 (s390_arch_setup): Adjust to set the current process'es target
3294 description. Don't adjust the regmap.
3295 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3296 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3297 (regs_info_3264): New globals.
3298 (s390_regs_info): New function.
3299 (the_low_target): Adjust.
3300 (initialize_low_arch): New function.
3301 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3302 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3303 [__mips64] (init_registers_mips_linux)
3304 (init_registers_mips_dsp_linux): Delete defines.
3305 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3306 (have_dsp): New global.
3307 (mips_read_description): New, based on mips_arch_setup.
3308 (mips_arch_setup): Reimplement.
3309 (get_usrregs_info): New function.
3310 (mips_cannot_fetch_register, mips_cannot_store_register)
3311 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3312 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3313 (target_regsets): Rename to ...
3314 (mips_regsets): ... this, and make static.
3315 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3316 (dsp_regs_info, regs_info): New globals.
3317 (mips_regs_info): New function.
3318 (the_low_target): Adjust.
3319 (initialize_low_arch): New function.
3320 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3321 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3322 Declare.
3323 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3324 (arm_read_description): New, with bits factored from
3325 arm_arch_setup.
3326 (arm_arch_setup): Reimplement.
3327 (target_regsets): Rename to ...
3328 (arm_regsets): ... this, and make static.
3329 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3330 (arm_regs_info): New function.
3331 (the_low_target): Adjust.
3332 (initialize_low_arch): New function.
3333 * linux-m68k-low.c (tdesc_m68k): Declare.
3334 (target_regsets): Rename to ...
3335 (m68k_regsets): ... this, and make static.
3336 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3337 (m68k_regs_info): New function.
3338 (m68k_arch_setup): New function.
3339 (the_low_target): Adjust.
3340 (initialize_low_arch): New function.
3341 * linux-sh-low.c (tdesc_sharch): Declare.
3342 (target_regsets): Rename to ...
3343 (sh_regsets): ... this, and make static.
3344 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3345 (sh_regs_info, sh_arch_setup): New functions.
3346 (the_low_target): Adjust.
3347 (initialize_low_arch): New function.
3348 * linux-bfin-low.c (tdesc_bfin): Declare.
3349 (bfin_arch_setup): New function.
3350 (bfin_usrregs_info, regs_info): New globals.
3351 (bfin_regs_info): New function.
3352 (the_low_target): Adjust.
3353 (initialize_low_arch): New function.
3354 * linux-cris-low.c (tdesc_cris): Declare.
3355 (cris_arch_setup): New function.
3356 (cris_usrregs_info, regs_info): New globals.
3357 (cris_regs_info): New function.
3358 (the_low_target): Adjust.
3359 (initialize_low_arch): New function.
3360 * linux-cris-low.c (tdesc_crisv32): Declare.
3361 (cris_arch_setup): New function.
3362 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3363 (cris_regs_info): New function.
3364 (the_low_target): Adjust.
3365 (initialize_low_arch): New function.
3366 * linux-m32r-low.c (tdesc_m32r): Declare.
3367 (m32r_arch_setup): New function.
3368 (m32r_usrregs_info, regs_info): New globals.
3369 (m32r_regs_info): Adjust.
3370 (initialize_low_arch): New function.
3371 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3372 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3373 (tic6x_usrregs_info): Forward declare.
3374 (tic6x_read_description): New function, based on ...
3375 (tic6x_arch_setup): ... this. Reimplement.
3376 (target_regsets): Rename to ...
3377 (tic6x_regsets): ... this, and make static.
3378 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3379 (tic6x_regs_info): New function.
3380 (the_low_target): Adjust.
3381 (initialize_low_arch): New function.
3382 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3383 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3384 (target_regsets): Rename to ...
3385 (xtensa_regsets): ... this, and make static.
3386 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3387 globals.
3388 (xtensa_arch_setup, xtensa_regs_info): New functions.
3389 (the_low_target): Adjust.
3390 (initialize_low_arch): New function.
3391 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3392 (nios2_arch_setup): Set the current process'es tdesc.
3393 (target_regsets): Rename to ...
3394 (nios2_regsets): ... this.
3395 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3396 (nios2_regs_info): New function.
3397 (the_low_target): Adjust.
3398 (initialize_low_arch): New function.
a261b8f5
PA
3399 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3400 (aarch64_arch_setup): Set the current process'es tdesc.
3401 (target_regsets): Rename to ...
3402 (aarch64_regsets): ... this.
3403 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3404 (aarch64_regs_info): New function.
3405 (the_low_target): Adjust.
3406 (initialize_low_arch): New function.
3aee8918
PA
3407 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3408 globals.
3409 (target_regsets): Rename to ...
3410 (tile_regsets): ... this.
3411 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3412 (tile_regs_info): New function.
3413 (tile_arch_setup): Set the current process'es tdesc.
3414 (the_low_target): Adjust.
3415 (initialize_low_arch): New function.
3416 * spu-low.c (tdesc_spu): Declare.
3417 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3418 * win32-arm-low.c (tdesc_arm): Declare.
3419 (arm_arch_setup): New function.
3420 (the_low_target): Install arm_arch_setup instead of
3421 init_registers_arm.
3422 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3423 (init_windows_x86): Rename to ...
3424 (i386_arch_setup): ... this. Set `win32_tdesc'.
3425 (the_low_target): Adjust.
3426 * win32-low.c (win32_tdesc): New global.
3427 (child_add_thread): Don't create the thread cache here.
3428 (do_initial_child_stuff): Set the new process'es tdesc.
3429 * win32-low.h (struct target_desc): Forward declare.
3430 (win32_tdesc): Declare.
3431 * lynx-i386-low.c (tdesc_i386): Declare global.
3432 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3433 * lynx-low.c (lynx_tdesc): New global.
3434 (lynx_add_process): Set the new process'es tdesc.
3435 * lynx-low.h (struct target_desc): Forward declare.
3436 (lynx_tdesc): Declare global.
3437 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3438 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3439 * nto-low.c (nto_tdesc): New global.
3440 (do_attach): Set the new process'es tdesc.
3441 * nto-low.h (struct target_desc): Forward declare.
3442 (nto_tdesc): Declare.
3443 * nto-x86-low.c (tdesc_i386): Declare.
3444 (nto_x86_arch_setup): Set `nto_tdesc'.
3445
b1fbec62
GB
34462013-06-04 Gary Benson <gbenson@redhat.com>
3447
3448 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3449 to qSupported response when appropriate.
3450 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3451 with nonzero-length annex.
3452 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3453 arguments supplied in annex.
3454
d1ec4ce7
DE
34552013-05-31 Doug Evans <dje@google.com>
3456
ac44adcb 3457 PR server/15594
d1ec4ce7
DE
3458 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3459 64 bits in 64-cross-32 environment.
3460
9b25f2d3
PA
34612013-05-28 Pedro Alves <palves@redhat.com>
3462
3463 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3464 (aarch64-without-fpu.c): Delete rule.
3465 * configure.srv (aarch64*-*-linux*): Remove references to
3466 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3467 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3468 declaration.
3469
6740dc9c
PA
34702013-05-24 Pedro Alves <palves@redhat.com>
3471
3472 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3473 instead of strchr/decode_address. Error if the range isn't split
3474 with a ','. Don't assume there's be a ':' in the action.
3475
c2d6af84
PA
34762013-05-23 Yao Qi <yao@codesourcery.com>
3477 Pedro Alves <palves@redhat.com>
3478
3479 * linux-low.c (lwp_in_step_range): New function.
3480 (linux_wait_1): If the thread was range stepping and stopped
3481 outside the stepping range, report the stop to GDB. Otherwise,
3482 continue stepping. Add range stepping debug output.
3483 (linux_set_resume_request): Copy the step range from the resume
3484 request to the lwp.
3485 (linux_supports_range_stepping): New.
3486 (linux_target_ops) <supports_range_stepping>: Set to
3487 linux_supports_range_stepping.
3488 * linux-low.h (struct linux_target_ops)
3489 <supports_range_stepping>: New field.
3490 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3491 * linux-x86-low.c (x86_supports_range_stepping): New.
3492 (the_low_target) <supports_range_stepping>: Set to
3493 x86_supports_range_stepping.
3494 * server.c (handle_v_cont): Handle 'r' action.
3495 (handle_v_requests): Append ";r" if the target supports range
3496 stepping.
3497 * target.h (struct thread_resume) <step_range_start,
3498 step_range_end>: New fields.
3499 (struct target_ops) <supports_range_stepping>:
3500 New field.
3501 (target_supports_range_stepping): New macro.
3502
58794e1a
JB
35032013-05-17 Joel Brobecker <brobecker@adacore.com>
3504
3505 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3506 confusion in comment.
3507
d631c5a7
JB
35082013-05-17 Joel Brobecker <brobecker@adacore.com>
3509
3510 * lynx-low.c (struct process_info_private): New type.
3511 (lynx_add_process): New function.
3512 (lynx_create_inferior, lynx_attach): Replace calls to
3513 add_process by calls to lynx_add_process.
3514 (lynx_resume): If PTID is null, then try using
3515 current_process()->private->last_wait_event_ptid.
3516 Add comments.
3517 (lynx_clear_inferiors): Delete. The contents of that function
3518 has been inlined in lynx_mourn;
3519 (lynx_wait_1): Save the ptid in the process's private data.
3520 (lynx_mourn): Free the process' private data. Replace call
3521 to lynx_clear_inferiors by call to clear_inferiors.
3522
96f7a20f
YQ
35232013-05-17 Yao Qi <yao@codesourcery.com>
3524
3525 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3526 the right place.
3527
db0dfaa0
LM
35282013-05-16 Luis Machado <lgustavo@codesourcery.com>
3529
3530 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3531 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3532 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3533 PT_TEXT_END_ADDR guards. Update comments.
3534 (linux_target_op) <read_offsets>: Conditionally define to
3535 linux_read_offsets if the target is UCLIBC and if it defines
3536 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3537
68f5f838
SL
35382013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3539 Andrew Jenner <andrew@codesourcery.com>
3540
3541 * Makefile.in (SFILES): Add linux-nios2-low.c.
3542 (clean): Add action to delete nios2-linux.c.
3543 (nios2-linux.c): New rule.
3544 * configure.srv: Add nios2*-*-linux*.
3545 * linux-nios2-low.c: New.
3546
1ebff1fd
HAQ
35472013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3548
3549 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3550
f6150862
HZ
35512013-04-25 Hui Zhu <hui@codesourcery.com>
3552
3553 PR gdb/15186
f6150862
HZ
3554 * ax.c (ax_printf): Add fflush.
3555
614c279d
TT
35562013-04-22 Tom Tromey <tromey@redhat.com>
3557
3558 * Makefile.in (SFILES): Add filestuff.c.
3559 (OBS): Add filestuff.o.
3560 (filestuff.o): New target.
3561 * config.in, configure: Rebuild.
3562 * configure.ac: Check for fdwalk, pipe2.
3563
7d4e5717
PA
35642013-04-17 Pedro Alves <palves@redhat.com>
3565
3566 * configure.ac (USE_THREAD_DB): Delete variable.
3567 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3568 Don't AC_SUBST USE_THREAD_DB.
3569 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3570 * config.in, configure: Regenerate.
3571
d5c93e41
PA
35722013-04-16 Pedro Alves <palves@redhat.com>
3573
3574 * linux-low.h (struct lwp_info) <thread_known>: Move under
3575 the USE_THREAD_DB #ifdef.
3576
04f5fe89
PA
35772013-04-16 Pedro Alves <palves@redhat.com>
3578
3579 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3580 (linux-low.o): Delete rule.
3581 * linux-low.h: Always include "gdb_thread_db.h" instead of
3582 conditionally including thread_db.h.
3583 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3584 HAVE_THREAD_DB_H.
3585
480b27bf
JK
35862013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3587
3588 * Makefile.in (install-only): Fix make install regression.
3589
43662968
JK
35902013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3591
3592 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3593 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3594 installation.
3595 * gdbserver.1: Remove.
3596
3e74e146
PA
35972013-03-22 Pedro Alves <palves@redhat.com>
3598
3599 * linux-low.c (handle_extended_wait): Don't call
3600 linux_enable_event_reporting.
3601
a8347a2a
TT
36022013-03-15 Tony Theodore <tonyt@logyst.com>
3603
3604 PR build/9098:
3605 * Makefile.in (SHELL): Use @SHELL@.
3606
eeb56fa7
SDJ
36072013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3608
3609 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3610 compiler warning.
3611
4fa7e2ff
JB
36122013-03-13 Joel Brobecker <brobecker@adacore.com>
3613
3614 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3615 Remove extraneous NULL element.
3616
8ddb1965
YQ
36172013-03-13 Yao Qi <yao@codesourcery.com>
3618
3619 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3620 'V' block in trace frame.
3621
9accd112
MM
36222013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3623
3624 * target.h (struct target_ops): Add btrace ops.
3625 (target_supports_btrace): New macro.
3626 (target_enable_btrace): New macro.
3627 (target_disable_btrace): New macro.
3628 (target_read_btrace): New macro.
3629 * gdbthread.h (struct thread_info): Add btrace field.
3630 * server.c: Include btrace-common.h.
3631 (handle_btrace_general_set): New function.
3632 (handle_btrace_enable): New function.
3633 (handle_btrace_disable): New function.
3634 (handle_general_set): Call handle_btrace_general_set.
3635 (handle_qxfer_btrace): New function.
3636 (struct qxfer qxfer_packets[]): Add btrace entry.
3637 * inferiors.c (remove_thread): Disable btrace.
3638 * linux-low: Include linux-btrace.h.
3639 (linux_low_enable_btrace): New function.
3640 (linux_low_read_btrace): New function.
3641 (linux_target_ops): Add btrace ops.
3642 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3643 Add srv_linux_btrace=yes.
3644 (x86_64-*-linux*): Add linux-btrace.o.
3645 Add srv_linux_btrace=yes.
3646 * configure.ac: Define HAVE_LINUX_BTRACE.
3647 * config.in: Regenerated.
3648 * configure: Regenerated.
3649
5cc22e4c
MM
36502013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3651
3652 * server.c (handle_qxfer): Preserve error message if -3 is
3653 returned.
3654 (qxfer): Document the -3 return value.
3655
7c97f91e
MM
36562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3657
3658 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3659 (linux_btrace_h): New variable.
3660 (linux-btrace.o): New rule.
3661
be9a119c 36622013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3663 Hafiz Abid Qadeer <abidh@codesourcery.com>
3664
3665 * tracepoint.c (trace_buffer_size): New global.
3666 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3667 (init_trace_buffer): Change to one-argument function. Allocate
3668 trace buffer memory.
3669 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3670 handle QTBuffer:size packet.
3671 (cmd_bigqtbuffer_size): New function.
3672 (initialize_tracepoint): Call init_trace_buffer with
3673 DEFAULT_TRACE_BUFFER_SIZE.
3674 * server.c (handle_query): Add QTBuffer:size in the
3675 supported packets.
3676
e64f7499
YQ
36772013-03-07 Yao Qi <yao@codesourcery.com>
3678
3679 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3680 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3681 of -1.
3682 (cmd_qtsp): Adjust condition. Do post increment.
3683 Set cur_action and cur_step_action back to 0.
3684
f0ae6fc3
PA
36852013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3686
3687 PR server/15236
3688 * linux-low.c (linux_write_memory): Return early success if LEN is
3689 zero.
3690
b5b0b0af
CV
36912013-03-05 Corinna Vinschen <vinschen@redhat.de>
3692
334ad4a8 3693 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3694
589bc927
TT
36952013-02-28 Tom Tromey <tromey@redhat.com>
3696
3697 * configure.ac: Invoke AC_SYS_LARGEFILE.
3698 * configure, config.in: Rebuild.
3699
dfe07582
CV
37002013-02-28 Corinna Vinschen <vinschen@redhat.com>
3701
3702 * win32-low.c: Throughout, fix format strings and casts of
3703 printf-like functions to avoid type related warnings on all
3704 platforms.
3705 (get_child_debug_event): Print dwDebugEventCode as hex since
3706 that's how it's usually documented.
3707
736cd585
YQ
37082013-02-28 Yao Qi <yao@codesourcery.com>
3709
3710 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3711 pulongest.
3712
e1f58301
JW
37132013-02-27 Jiong Wang <jiwang@tilera.com>
3714
3715 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3716 (reg-tilegx32.c): New rule.
3717 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3718 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3719 different register info initializer according to elf class.
3720 (init_registers_tilgx32): New function. The tilegx32 register info
3721 initializer.
3722 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3723 (tile_store_gregset): Likewise.
3724
d171ca78
YQ
37252013-02-27 Yao Qi <yao@codesourcery.com>
3726
3727 * server.c (process_point_options): Print debug message when
3728 debug_threads is true.
3729
282bbdf3
YQ
37302013-02-26 Yao Qi <yao@codesourcery.com>
3731
3732 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3733
aca22551
PA
37342013-02-19 Pedro Alves <palves@redhat.com>
3735 Kai Tietz <ktietz@redhat.com>
3736
3737 PR gdb/15161
3738
3739 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3740 instead of strtoul to extract address from packet.
3741 (process_serial_event) <'z'>: Likewise.
3742
4f3cee1c
YQ
37432013-02-18 Yao Qi <yao@codesourcery.com>
3744
3745 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3746
8e1d55a3
PA
37472013-02-14 Pedro Alves <palves@redhat.com>
3748
3749 Plug memory leak.
3750
3751 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3752 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3753
458820da
PA
37542013-02-14 Pedro Alves <palves@redhat.com>
3755
3756 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3757
baea0dae
PA
37582013-02-14 Pedro Alves <palves@redhat.com>
3759
3760 * tracepoint.c (save_string): Delete.
3761 (add_tracepoint_action): Use savestring instead of save_string.
3762
0b1afbb3
PA
37632013-02-12 Pedro Alves <palves@redhat.com>
3764
3765 * linux-xtensa-low.c: Ditto.
3766 * xtensa-xtregs.c: Ditto.
3767
8a4ac37e
PA
37682013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3769
3770 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3771 thread_db.
3772
148de6bb
MS
37732013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3774
3775 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3776 aarch64_num_wp_regs and aarch64_num_bp_regs to
3777 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3778
55fac6e0
MS
37792013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3780
3781 * linux-aarch64-low.c (ps_get_thread_area): Replace
3782 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3783
176eb98c
MS
37842013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3785 Marcus Shawcroft <marcus.shawcroft@arm.com>
3786 Nigel Stephens <nigel.stephens@arm.com>
3787 Yufeng Zhang <yufeng.zhang@arm.com>
3788
3789 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3790 (aarch64.c, aarch64-without-fpu.c): New targets.
3791 * configure.srv (aarch64*-*-linux*): New.
3792 * linux-aarch64-low.c: New file.
3793
56f7af9c
MS
37942013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3795
43aaf8b6 3796 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3797 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3798 (dequeue_one_deferred_signal, linux_resume_one_thread)
3799 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3800 (linux_tracefork_grandchild, linux_test_for_tracefork)
3801 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3802 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3803 where the argument is 0.
3804
60f662b0
YQ
38052013-01-25 Yao Qi <yao@codesourcery.com>
3806
3807 * event-loop.c: Include "queue.h".
3808 (gdb_event_p): New typedef.
3809 (struct gdb_event) <next_event>: Remove.
3810 (event_queue): Change to QUEUE(gdb_event_p).
3811 (async_queue_event): Remove.
3812 (gdb_event_xfree): New.
3813 (initialize_event_loop): New.
3814 (process_event): Use API from QUEUE.
3815 (wait_for_event): Likewise.
3816 * server.c (main): Call initialize_event_loop.
3817 * server.h (initialize_event_loop): Declare.
3818
5ae4861a
YQ
38192013-01-18 Yao Qi <yao@codesourcery.com>
3820
3821 * ax.h (struct eval_agent_expr_context): New.
3822 (gdb_eval_agent_expr): Update declaration.
3823 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3824 TFRAME. Add new argument CTX.
3825 * server.h (struct eval_agent_expr_context): Declare.
3826 (agent_mem_read, agent_tsv_read): Update declaration.
3827 (agent_mem_read_string): Likewise.
3828 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3829 (add_traceframe_block): Add new argument TPOINT.
3830 Increase TPOINT->traceframe_usage.
3831 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3832 eval_tracepoint_agent_expr.
3833 (condition_true_at_tracepoint): Likewise.
3834 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3835 (agent_mem_read_string, agent_tsv_read): Likewise.
3836
85e00e85
YQ
38372013-01-16 Yao Qi <yao@codesourcery.com>
3838
3839 * linux-low.c (linux_resume_one_lwp): Don't check
3840 'lwp->bp_reinsert != 0'.
3841
4039cf45
JB
38422013-01-07 Joel Brobecker <brobecker@adacore.com>
3843 Pedro Alves <palves@redhat.com>
3844
3845 * lynx-low.c (ptrace_request_to_str): Define a temporary
3846 macro and use it to simplify this function's implementation.
3847
9044dee2
JB
38482013-01-07 Joel Brobecker <brobecker@adacore.com>
3849
3850 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3851 sets errno.
3852
e6352c8f
JB
38532013-01-07 Joel Brobecker <brobecker@adacore.com>
3854
3855 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3856
50681a27
JB
38572013-01-07 Joel Brobecker <brobecker@adacore.com>
3858
3859 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3860
3f6e77ef
JB
38612013-01-07 Joel Brobecker <brobecker@adacore.com>
3862
3863 * lynx-low.c (lynx_resume): Use the resume_info parameter
3864 to determine the ptid for the lynx_ptrace call, unless
3865 it is equal to minus_one_ptid, in which case we use the
3866 ptid of the current_inferior.
3867 (lynx_wait_1): After having received a thread create/exit
3868 event, resume the inferior's execution using the signaling
3869 thread's ptid, rather than the old ptid.
3870
7fda33ae
JB
38712013-01-07 Joel Brobecker <brobecker@adacore.com>
3872
3873 * lynx-low.c (lynx_resume): Delete variable ret.
3874
b9786c74
JB
38752013-01-01 Joel Brobecker <brobecker@adacore.com>
3876
3877 * gdbreplay.c (gdbreplay_version): Update copyright year.
3878 * server.c (gdbserver_version): Likewise.
3879
8b93d60f
JB
38802012-12-17 Joel Brobecker <brobecker@adacore.com>
3881
3882 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3883 new thread.
3884
037335a7
JB
38852012-12-17 Joel Brobecker <brobecker@adacore.com>
3886
3887 * lynx-low.c (ptrace_request_to_str): Add handling for
3888 PTRACE_GETTRACESIG.
3889
52d4cbd8
JB
38902012-12-17 Joel Brobecker <brobecker@adacore.com>
3891
3892 * lynx-low.c (lynx_attach): Delete variable new_process.
3893
ab8f6ca9
JB
38942012-12-17 Joel Brobecker <brobecker@adacore.com>
3895
3896 * lynx-low.c (lynx_create_inferior): Delete variable
3897 new_process.
3898
78cbc024
JB
38992012-12-17 Joel Brobecker <brobecker@adacore.com>
3900
3901 * lynx-low.c (ptrace_request_to_str): Do not handle
3902 PTRACE_GETTHREADLIST if this macro does not exist.
3903
14a00470
YQ
39042012-12-15 Yao Qi <yao@codesourcery.com>
3905
3906 * Makefile.in (OBS): Add notif.o.
3907 * notif.c, notif.h: New.
3908 * server.c: Include "notif.h".
3909 (struct vstop_notif) <next>: Remove.
3910 <base>: New field.
3911 (queue_stop_reply): Update.
3912 (push_event, send_next_stop_reply): Remove.
3913 (discard_queued_stop_replies): Update.
3914 (notif_stop): New variable.
3915 (handle_v_stopped): Remove.
3916 (handle_v_requests): Don't call handle_v_stopped. Call
3917 handle_ack_notif instead.
3918 (queue_stop_reply_callback): Call notif_event_enque instead
3919 of queue_stop_reply.
3920 (handle_status): Don't call send_next_stop_reply, call
3921 notif_write_event instead.
3922 (kill_inferior_callback): Likewise.
3923 (detach_or_kill_inferior_callback): Likewise.
3924 (main): Call initialize_notif.
3925 (process_serial_event): Call QUEUE_is_empty.
3926 (handle_target_event): Call notif_push instead of push event.
3927 * server.h (push_event): Remove declaration.
3928
61c125b9
TT
39292012-12-10 Tom Tromey <tromey@redhat.com>
3930
3931 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3932 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3933 macros.
3934 (.c.o): Rewrite.
3935 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3936 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3937 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3938 (amd64-linux-ipa.o, ax.o): Rewrite.
3939 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3940 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3941 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3942 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3943 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3944 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3945 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3946 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3947 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3948 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3949 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3950 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3951 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3952 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3953 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3954 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3955 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3956 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3957 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3958 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3959 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3960 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3961 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3962 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3963 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3964 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3965 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3966 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3967 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3968 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3969 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3970 (reg-tilegx.o): Remove.
3971 (all_object_files): New macro.
3972 Include .deps files.
3973 * aclocal.m4, configure: Rebuild.
3974 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3975 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3976 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3977
e90e9ad9
TT
39782012-12-05 Tom Tromey <tromey@redhat.com>
3979
3980 PR gdb/14917:
3981 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3982
02d403bf 39832012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3984
3985 * configure.ac: Check for linux/perf_event.h.
3986 * config.in: Regenerated.
3987 * configure: Regenerated.
3988
0270a750
PA
39892012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3990
3991 * hostio.c (handle_readlink): Decrease buffer size
3992 parameter passed to readlink by one byte.
3993
8c29b58e
YQ
39942012-11-26 Yao Qi <yao@codesourcery.com>
3995
3996 * configure.ac (build_warnings): Append '-Wempty-body'.
3997 * configure: Regenerated.
3998 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3999 body.
4000
8bdce1ff
PM
40012012-11-15 Pierre Muller <muller@sourceware.org>
4002
4003 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4004 * config.in: Regenerate.
4005 * configure: Regenerate.
4006 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4007 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4008 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4009 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4010 header.
4011 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4012 instead of <sys/wait.h> header.
4013 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4014
02d403bf 40152012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4016
4017 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4018 (various make rules): Remove -DGDBSERVER
4019
fbd5db48
YQ
40202012-11-09 Yao Qi <yao@codesourcery.com>
4021
4022 * spu-low.c (current_ptid): Move it to ..
4023 * gdbthread.h: ... here. New.
4024 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4025 * server.c (myresume, process_serial_event): Likewise.
4026 * thread-db.c (thread_db_find_new_threads): Likewise.
4027 * tracepoint.c (run_inferior_command): Likewise.
4028
b3dc46ff
AB
40292012-10-01 Andrew Burgess <aburgess@broadcom.com>
4030
4031 * server.c (handle_search_memory_1): Include access length in
4032 warning message.
4033
07c04788
HPN
40342012-09-05 Michael Brandt <michael.brandt@axis.com>
4035
4036 * linux-crisv32-low.c: Fix compile errors.
4037
918d227b
YQ
40382012-09-04 Yao Qi <yao@codesourcery.com>
4039
4040 * tracepoint.c (cmd_qtsv): Adjust debug message.
4041 Don't check CUR_TPOINT.
4042
18c1b81a
YQ
40432012-08-28 Yao Qi <yao@codesourcery.com>
4044
4045 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4046 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4047 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4048 Remove declarations of xmalloc, xreallloc, xstrdup and
4049 freeargv.
4050 * Makefile.in (libiberty_h): New.
4051 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4052 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4053
dc82f37b
YQ
40542012-08-23 Yao Qi <yao@codesourcery.com>
4055
4056 * server.h: Remove declaration of 'xsnprintf'.
4057
406b1477
KS
40582012-08-22 Keith Seitz <keiths@redhat.com>
4059
4060 * server.h: Include build-gnulib-gbserver/config.h.
4061 * gdbreplay.c: Likewise.
4062
e6712ff1
DE
40632012-08-08 Doug Evans <dje@google.com>
4064
4065 * Makefile.in (SFILES): Add gdb_vecs.c.
4066 (OBS): Add gdb_vecs.o.
4067 (gdb_vecs_h, host_defs_h): New variables.
4068 (thread-db.o): Add $(gdb_vecs_h) dependency.
4069 (gdb_vecs.o): New rule.
4070 * thread-db.c: #include "gdb_vecs.h".
4071 (thread_db_load_search): Use a vector to iterate over path elements.
4072 Handle text appearing after "$pdir".
4073
4074 * configure.ac: Add check for strstr.
4075 * config.in: Regenerate.
4076 * configure: Regenerate.
4077
7c3270ae
UW
40782012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4079
4080 * hostio.c (handle_pread): If pread fails, fall back to attempting
4081 lseek/read.
4082 (handle_pwrite): Likewise for pwrite.
4083
b62e2b27
UW
40842012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4085
4086 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4087 between unsupported TYPE and unimplementable ADDR/LEN combination.
4088 (arm_insert_point): Act on new return value.
4089
78a99e91
PA
40902012-07-31 Pedro Alves <palves@redhat.com>
4091
4092 * server.c (process_point_options): Only skip tokens if we find
4093 one that is unrecognized. Don't treat 'X' specially while
4094 skipping unrecognized tokens.
4095
fcf303ab
UW
40962012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4097
4098 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4099 to 4-byte-align HW breakpoint addresses for Thumb.
4100
7255706c
YQ
41012012-07-27 Yao Qi <yao@codesourcery.com>
4102
4103 PR remote/14161.
4104
4105 * server.h: Declare gdb_agent_about_to_close.
4106 * target.c (kill_inferior): Include "agent.h".
4107 New. Send command 'kill'.
4108 * target.h (kill_inferior): Removed macro.
4109 * tracepoint.c (gdb_agent_about_to_close): New.
4110 (gdb_agent_helper_thread): Handle command 'close'.
4111 Wait endlessly until the inferior stops.
4112 Install gdb_agent_remove_socket to atexit hook.
4113 (agent_socket_name): New static variable.
4114 (gdb_agent_socket_init): Replace local variable 'name' with
4115 'agent_socket_name'.
4116 (gdb_agent_remove_socket): New.
4117
5a3f286f
YQ
41182012-07-27 Yao Qi <yao@codesourcery.com>
4119
4120 * server.c (process_point_options): Stop at 'X' when parsing.
4121
961bd387
ME
41222012-07-19 Michael Eager <eager@eagercon.com>
4123
a261b8f5 4124 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4125 to hw_execute.
4126 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4127 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4128 hardware breakpoint.
4129
aa7c7447
JK
41302012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4131
4132 * gdbserver/linux-low.c (initialize_low): Call
4133 linux_ptrace_init_warnings.
4134
7f216e7c
DE
41352012-07-02 Doug Evans <dje@google.com>
4136
4137 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4138 pointer to int.
4139
d3ce09f5
SS
41402012-07-02 Stan Shebs <stan@codesourcery.com>
4141
4142 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4143 (ax.o): Add it to build rule.
4144 (ax-ipa.o): Ditto.
4145 (OBS): Add format.o.
4146 (IPA_OBS): Add format.o.
4147 * server.c (handle_query): Claim support for breakpoint commands.
4148 (process_point_options): Add command case.
4149 (process_serial_event): Leave running if there are printfs in
4150 effect.
4151 * mem-break.h (any_persistent_commands): Declare.
4152 (add_breakpoint_commands): Declare.
4153 (gdb_no_commands_at_breakpoint): Declare.
4154 (run_breakpoint_commands): Declare.
4155 * mem-break.c (struct point_command_list): New struct.
4156 (struct breakpoint): New field command_list.
4157 (any_persistent_commands): New function.
4158 (add_commands_to_breakpoint): New function.
4159 (add_breakpoint_commands): New function.
4160 (gdb_no_commands_at_breakpoint): New function.
4161 (run_breakpoint_commands): New function.
4162 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4163 locally.
4164 * ax.c: Include format.h.
4165 (ax_printf): New function.
4166 (gdb_eval_agent_expr): Add printf opcode.
4167
2f8f6aed
YQ
41682012-06-13 Yao Qi <yao@codesourcery.com>
4169
4170 * server.c (start_inferior): Remove duplicated writes to fields
4171 'last_resume_kind' and 'last_status' of 'current_inferior'.
4172
0c9070b3
YQ
41732012-06-12 Yao Qi <yao@codesourcery.com>
4174 Pedro Alves <palves@redhat.com>
4175
4176 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4177 comment.
4178 * server.c (handle_v_cont): Extend comment.
4179
c52daf70
YQ
41802012-06-11 Yao Qi <yao@codesourcery.com>
4181
4182 * linux-low.c (linux_attach): Add 'static'.
4183
d38bbb0a
YQ
41842012-06-06 Yao Qi <yao@codesourcery.com>
4185
4186 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4187
89dc0afd
JK
41882012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4189
4190 Fix gcc -flto compilation warning.
4191 * server.c (main): Make variable multi_mode and attach volatile.
4192
75f62ce7
TJB
41932012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4194
4195 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4196 if the platform doesn't know about it.
4197
65f479b6
PA
41982012-05-30 Jeff Kenton <jkenton@tilera.com>
4199
4200 * Makefile.in (SFILES): Add linux-tile-low.c.
4201 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4202 * configure.srv: Handle tilegx-*-linux*.
4203 * linux-tile-low.c: New file.
4204
0c5bf5a9
JK
42052012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4206
4207 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4208
a493e3e2
PA
42092012-05-24 Pedro Alves <palves@redhat.com>
4210
4211 PR gdb/7205
4212
43aaf8b6 4213 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4214
2ea28649
PA
42152012-05-24 Pedro Alves <palves@redhat.com>
4216
4217 PR gdb/7205
4218
4219 Replace target_signal with gdb_signal throughout.
4220
8d409d16
MR
42212012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4222
4223 * linux-low.c (linux_store_registers): Avoid the copying sequence
4224 when no data has been retrieved by ptrace.
4225
23512c01
MGD
42262012-05-22 Will Deacon <will.deacon@arm.com>
4227
4228 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4229 Include asm/ptrace.h.
4230 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4231 already defined.
4232
4934b29e
MR
42332012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4234
4235 * linux-low.c (linux_store_registers): Don't re-retrieve data
4236 with ptrace that has already been obtained from /proc. Always
4237 copy any data retrieved with ptrace to the buffer supplied.
4238
bde24c0a
PA
42392012-05-11 Yao Qi <yao@codesourcery.com>
4240 Pedro Alves <palves@redhat.com>
4241
4242 * linux-low.c (enum stopping_threads_kind): New.
4243 (stopping_threads): Change type to `enum stopping_threads_kind'.
4244 (handle_extended_wait): If stopping and suspending threads, leave
4245 the new_lwp suspended too.
4246 (linux_wait_for_event): Adjust.
4247 (stop_all_lwps): Set `stopping_threads' to
4248 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4249 whether we're suspending threads or just stopping them. Assert no
4250 recursion happens.
4251
623b6bdf
YQ
42522012-04-29 Yao Qi <yao@codesourcery.com>
4253
4254 * server.h: Move some code to ...
4255 * gdbthread.h: ... here. New.
4256 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4257 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4258 (nto-low.o, win32-low.o): Likewise.
4259 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4260 * regcache.c, remote-utils.c, server.c: Likewise.
4261 * target.c, tracepoint.c, win32-low.c: Likewise.
4262
f15f9948
TJB
42632012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4264
4265 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4266 (PTRACE_ARG4_TYPE): Likewise.
4267 (PTRACE_XFER_TYPE): Likewise.
4268 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4269 ptrace to PTRACE_ARG3_TYPE.
4270 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4271 (PTRACE_ARG4_TYPE): Likewise.
4272 (PTRACE_XFER_TYPE): Likewise.
4273 (linux_detach_one_lwp): Cast fourth argument of
4274 ptrace to long then PTRACE_ARG4_TYPE.
4275 (regsets_fetch_inferior_registers): Cast third argument of
4276 ptrace to long then PTRACE_ARG3_TYPE.
4277 (regsets_store_inferior_registers): Likewise.
4278
38ea300a
PA
42792012-04-20 Pedro Alves <palves@redhat.com>
4280
4281 * configure: Regenerate.
4282
c971b7fa
PA
42832012-04-19 Pedro Alves <palves@redhat.com>
4284
43aaf8b6 4285 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4286 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4287 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4288 (all, install-only, uninstall, clean-info, all-lib, clean): No
4289 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4290 (maintainer-clean realclean distclean): Use subdir_do.
4291 (subdir_do): New.
4292 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4293 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4294 * acinclude.m4: Include acx_configure_dir.m4.
4295 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4296 calls. Call AC_PROG_RANLIB. Configure gnulib using
4297 ACX_CONFIGURE_DIR.
4298 (GNULIB): New.
4299 (GNULIB_STDINT_H): Adjust.
4300 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4301 * gdbreplay.c: Include build-gnulib/config.h.
4302 * server.h: Likewise.
4303 * aclocal.m4: Regenerate.
4304 * config.in: Regenerate.
4305 * configure: Regenerate.
c971b7fa 4306
809277f8
PA
43072012-04-19 Pedro Alves <palves@redhat.com>
4308
4309 * Makefile.in (LIBGNU, INCGNU): Adjust.
4310 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4311 (all, install-only, uninstall, clean-info, all-lib, clean)
4312 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4313 * configure.ac: Adjust AC_OUTPUT output.
4314 * aclocal.m4: Regenerate.
4315 * configure: Regenerate.
4316
fd9bb8b8
PA
43172012-04-19 Pedro Alves <palves@redhat.com>
4318
4319 * Makefile.in (generated_files): New.
4320 (server_h): Remove the explicit dependency on config.h, and depend
4321 on $generated_files.
4322
1c298c66
PA
43232012-04-19 Pedro Alves <palves@redhat.com>
4324
4325 * Makefile.in (INCGNU): Add -Ignulib.
4326
57c4b50b
PA
43272012-04-19 Pedro Alves <palves@redhat.com>
4328
4329 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4330 (INCGNU): ... this, and spell out -I here.
4331 (GNULIB_LIB): Rename to ...
4332 (LIBGNU): ... this.
4333 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4334
1030e047
PA
43352012-04-19 Pedro Alves <palves@redhat.com>
4336
4337 * config.in: Regenerate.
4338
447d4319
PA
43392012-04-19 Pedro Alves <palves@redhat.com>
4340
4341 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4342 * server.h (memmem): Remove declaration.
4343 * config.in: Regenerate.
4344 * configure: Regenerate.
4345
aad9eab9
YQ
43462012-04-19 Yao Qi <yao@codesourcery.com>
4347
4348 * Makefile.in (SFILES): Add common/vec.c.
4349 (OBS): Add vec.o.
4350 (vec.o): New rule.
4351
3e10640f
YQ
43522012-04-19 Yao Qi <yao@codesourcery.com>
4353
4354 * remote-utils.c (prepare_resume_reply): Replace with macro
4355 target_core_of_thread.
4356 * server.c (handle_qxfer_threads_proper): Likewise.
4357 * target.h (traget_core_of_thread): New macro.
4358
71622373
PA
43592012-04-18 Pedro Alves <palves@redhat.com>
4360
4361 * aclocal.m4: Regenerate.
4362 * configure: Regenerate.
4363
80d26939
YQ
43642012-04-16 Yao Qi <yao@codesourcery.com>
4365
4366 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4367 duplicated on address.
4368
42476b70
YQ
43692012-04-16 Yao Qi <yao@codesourcery.com>
4370
4371 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4372 (struct tracepoint_action_ops) <send>: New field.
4373 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4374 (agent_expr_send, x_tracepoint_action_send): New.
4375 (l_tracepoint_action_send): New.
4376 (cmd_qtdp): Download and install tracepoint
4377 according to `use_agent'.
4378 (run_inferior_command): Add one more parameter `len'.
4379 Update callers.
4380 (tracepoint_send_agent): New.
4381 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4382
7bc83639
YQ
43832012-04-16 Yao Qi <yao@codesourcery.com>
4384
4385 * tracepoint.c (download_tracepoints): Moved to ...
4386 (cmd_qtstart): ... here.
4387
5f18041e
YQ
43882012-04-14 Yao Qi <yao@codesourcery.com>
4389
4390 * tracepoint.c: Include inttypes.h.
4391 (struct collect_memory_action): Use sized types.
4392 (struct tracepoint): Likewise.
4393 (cmd_qtdp, stop_tracing): Update print specifiers.
4394 (cmd_qtp, response_tracepoint): Likewise.
4395 (collect_data_at_tracepoint): Likewise.
4396 (collect_data_at_step): Likewise.
4397
55a8c076
YQ
43982012-04-14 Yao Qi <yao@codesourcery.com>
4399
4400 Import gnulib module inttypes.
4401 * aclocal.m4, config.in, configure: Regenerated.
4402
dc750257
YQ
44032012-04-14 Yao Qi <yao@codesourcery.com>
4404
4405 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4406 Makefile and config.status at last.
4407
0ab5faf9
YQ
44082012-04-13 Yao Qi <yao@codesourcery.com>
4409
4410 * tracepoint.c: Include stdint.h unconditionally.
4411
18f5fd81
TJB
44122012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4413
4414 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4415 on BFD_HAVE_SYS_PROCFS_TYPE.
4416 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4417 * configure: Regenerate.
4418 * config.in: Likewise.
4419
4d47af5c
L
44202012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4421
4422 * Makefile.in (clean): Also remove x32.c x32-linux.c
4423 x32-avx.c x32-avx-linux.c.
4424 (x32.o): New target.
4425 (x32.c): Likewise.
4426 (x32-linux.o): Likewise.
4427 (x32-linux.c): Likewise.
4428 (x32-avx.o): Likewise.
4429 (x32-avx.c): Likewise.
4430 (x32-avx-linux.o): Likewise.
4431 (x32-avx-linux.c): Likewise.
4432
4433 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4434 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4435 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4436 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4437 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4438 i386/x32-avx-linux.xml.
4439
4440 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4441 (init_registers_x32_avx_linux): Likwise.
4442 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4443 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4444
ecedbe58
PA
44452012-04-13 Pedro Alves <palves@redhat.com>
4446
4447 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4448 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4449 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4450 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4451 the sub-make.
4452
c92b5177
L
44532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4454
4455 * linux-x86-low.c (compat_x32_clock_t): New.
4456 (compat_x32_siginfo_t): Likewise.
4457 (compat_x32_siginfo_from_siginfo): Likewise.
4458 (siginfo_from_compat_x32_siginfo): Likewise.
4459 (linux_is_elf64): Likewise.
4460 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4461 and siginfo_from_compat_x32_siginfo for x32.
4462 (x86_arch_setup): Set linux_is_elf64.
4463
214d508e
L
44642012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4465
4466 PR gdb/13969
4467 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4468 e_machine field.
4469 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4470 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4471 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4472 compatible with process.
4473
c9a1864a
YQ
44742012-04-12 Yao Qi <yao@codesourcery.com>
4475
4476 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4477 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4478 (install-only, install-info, clean): Handle sub dir gnulib.
4479 (all-lib, am--refresh): New targets.
4480 (memmem.o): Remove target.
4481 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4482 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4483 (AC_REPLACE_FUNCS): Remove memmem.
4484 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4485 (AC_OUTPUT): Generate Makefile in gnulib/.
4486 * aclocal.m4, config.in, configure: Regenerated.
4487
367ba2c2
MR
44882012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4489
4490 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4491
9d236627
PA
44922012-04-05 Pedro Alves <palves@redhat.com>
4493
4494 -Werror=strict-aliasing
4495
4496 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4497 pointer.
4498
111217b3
PA
44992012-04-04 Pedro Alves <palves@redhat.com>
4500
4501 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4502 (sparc_store_gregset_from_stack, sparc_store_gregset)
4503 (sparc_breakpoint_at): Fix formatting.
4504
8365dcf5
TJB
45052012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4506
4507 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4508 are available.
4509 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4510 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4511 * config.in: Regenerate.
4512 * configure: Likewise.
4513
689cc2ae
PA
45142012-03-29 Pedro Alves <palves@redhat.com>
4515
4516 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4517 Correct ptrace arguments.
4518
c14dfd32
PA
45192012-03-28 Pedro Alves <palves@redhat.com>
4520
4521 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4522 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4523 (IA64_FR1_REGNUM): New defines.
4524 (ia64_fetch_register): New.
4525 (the_low_target): Install it.
4526 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4527 field.
4528 * linux-low.c (linux_fetch_registers): Try the
4529 the_low_target.fetch_register hook first.
4530
4531 * linux-arm-low.c (the_low_target): Adjust.
4532 * linux-bfin-low.c (the_low_target): Adjust.
4533 * linux-cris-low.c (the_low_target): Adjust.
4534 * linux-crisv32-low.c (the_low_target): Adjust.
4535 * linux-m32r-low.c (the_low_target): Adjust.
4536 * linux-m68k-low.c (the_low_target): Adjust.
4537 * linux-mips-low.c (the_low_target): Adjust.
4538 * linux-ppc-low.c (the_low_target): Adjust.
4539 * linux-s390-low.c (the_low_target): Adjust.
4540 * linux-sh-low.c (the_low_target): Adjust.
4541 * linux-sparc-low.c (the_low_target): Adjust.
4542 * linux-tic6x-low.c (the_low_target): Adjust.
4543 * linux-x86-low.c (the_low_target): Adjust.
4544 * linux-xtensa-low.c (the_low_target): Adjust.
4545
63c88e13
PA
45462012-03-26 Pedro Alves <palves@redhat.com>
4547
4548 * server.c (handle_qxfer_libraries): Don't bail early if
4549 the_target->qxfer_libraries_svr4 is not NULL.
4550
fb723180
PA
45512012-03-26 Pedro Alves <palves@redhat.com>
4552
4553 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4554
0afae3cf
PA
45552012-03-23 Pedro Alves <palves@redhat.com>
4556
4557 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4558 "library-list-svr4" element's start tag when the the DSO list is
4559 empty.
4560
485f1ee4
PA
45612012-03-23 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4564 a variable whose type size is the same as the inferior's pointer
4565 size.
4566
a5362b9a
TS
45672012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4568
4569 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4570 struct siginfo.
4571 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4572 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4573 * linux-low.h: Include <signal.h>.
4574 (struct siginfo): Remove forward declaration.
4575 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4576 struct siginfo.
4577
d226c142
MF
45782012-03-21 Mike Frysinger <vapier@gentoo.org>
4579
4580 * .gitignore: Ignore more files.
4581
122f36ef
PA
45822012-03-19 Pedro Alves <palves@redhat.com>
4583 Jan Kratochvil <jan.kratochvil@redhat.com>
4584
4585 * server.c (cont_thread, general_thread): Add describing comments.
4586 (start_inferior): Clear `cont_thread'.
4587 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4588 of a process.
4589
fc3e5175
YQ
45902012-03-15 Yao Qi <yao@codesourcery.com>
4591
4592 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4593 handling to ...
4594 (cmd_qtdp): ... here.
4595
8d0d92cd
YQ
45962012-03-15 Yao Qi <yao@codesourcery.com>
4597
4598 * tracepoint.c (struct tracepoint_action_ops): New.
4599 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4600 (m_tracepoint_action_download): New.
4601 (r_tracepoint_action_download): New.
4602 (x_tracepoint_action_download): New.
4603 (l_tracepoint_action_download): New.
4604 (add_tracepoint_action): Install `action->ops' according type.
4605 (download_tracepoint_1): Move code `download' function pointer
4606 of various tracepoint_action_ops.
4607
87b0bb13
JK
46082012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4609
4610 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4611 linux_ptrace_attach_warnings.
4612
5f572dec
JK
46132012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4614
4615 * Makefile.in (linux-ptrace.o): New.
4616 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4617 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4618 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4619 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4620 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4621 of these targets.
4622 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4623
f4647387
YQ
46242012-03-08 Yao Qi <yao@codesourcery.com>
4625 Pedro Alves <palves@redhat.com>
4626
4627 Fix PR server/13392.
4628 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4629 offset of JMP insn.
4630 * tracepoint.c (remove_tracepoint): New.
4631 (cmd_qtdp): Call remove_tracepoint when failed to install.
4632
9b224c5e
PA
46332012-03-07 Pedro Alves <palves@redhat.com>
4634
4635 * linux-low.c (get_detach_signal): New.
4636 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4637 Pass on pending signals to PTRACE_DETACH. Check the result of the
4638 ptrace call.
4639 * server.c (program_signals, program_signals_p): New.
4640 (handle_general_set): Handle QProgramSignals.
4641 * server.h (program_signals, program_signals_p): Declare.
4642
e237a7e2
JK
46432012-03-05 Pedro Alves <palves@redhat.com>
4644 Jan Kratochvil <jan.kratochvil@redhat.com>
4645
4646 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4647 New comment why.
4648
5808517f
YQ
46492012-03-03 Yao Qi <yao@codesourcery.com>
4650
4651 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4652 agent_look_up_symbols.
4653
58b4daa5
YQ
46542012-03-03 Yao Qi <yao@codesourcery.com>
4655
4656 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4657 (linux-x86-low.o): Likewise.
4658 * server.h: Remove in_process_agent_loaded.
4659 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4660 common/agent.c.
4661 Update callers.
4662
8ffcbaaf
YQ
46632012-03-03 Yao Qi <yao@codesourcery.com>
4664
4665 * tracepoint.c (gdb_agent_capability): New global.
4666 (in_process_agent_loaded_ust): Renamed to
4667 `in_process_agent_supports_ust'.
4668 Update callers.
4669 (in_process_agent_supports_ust): Call agent_capability_check.
4670 (clear_installed_tracepoints): Assert that agent supports
4671 agent.
4672
d1feda86
YQ
46732012-03-03 Yao Qi <yao@codesourcery.com>
4674
4675 * linux-low.c (linux_supports_agent): New.
4676 (linux_target_ops): Initialize field `supports_agent' with
4677 linux_supports_agent.
4678 * target.h (struct target_ops) <supports_agent>: New.
4679 (target_supports_agent): New macro.
4680 * server.c (handle_general_set): Handle packet 'QAgent'.
4681 (handle_query): Send `QAgent+'.
4682 * Makefile.in (server.o): Depends on agent.h.
4683
2fa291ac
YQ
46842012-03-03 Yao Qi <yao@codesourcery.com>
4685
4686 * Makefile.in (OBS): Add agent.o.
4687 Add new rule for agent.o.
4688 Track dependence of tracepoint.c on agent.h.
4689 * tracepoint.c (run_inferior_command_1):
4690 (run_inferior_command): Call agent_run_command.
4691 (gdb_ust_connect_sync_socket): Deleted. Move it to
4692 common/agent.c.
4693 (resume_thread, stop_thread): Likewise.
4694 (gdb_ust_socket_init): Renamed to ...
4695 (gdb_agent_socket_init): ... New.
4696 (gdb_ust_thread): Renamed to ...
4697 (gdb_agent_helper_thread): ... New.
4698 (gdb_ust_init): Move some code to ...
4699 (gdb_agent_init): ... here. New.
4700 [HAVE_UST]: Call gdb_ust_init.
4701 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4702 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4703 * config.in, configure: Regenerated.
4704
05044653
PA
47052012-03-02 Pedro Alves <palves@redhat.com>
4706
4707 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4708 * linux-low.c (struct simple_pid_list): New.
4709 (stopped_pids): New a struct simple_pid_list pointer.
4710 (add_to_pid_list, pull_pid_from_list): New.
4711 (handle_extended_wait): Don't assume the first signal new children
4712 report is SIGSTOP. Adjust call to pull_pid_from_list.
4713 (linux_wait_for_lwp): Adjust.
4714
8d00225b
YQ
47152012-03-02 Yao Qi <yao@codesourcery.com>
4716
4717 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4718 debug log.
4719
19560ba5
YQ
47202012-03-02 Yao Qi <yao@codesourcery.com>
4721
4722 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4723 `stop_pc' and `tpoint'. Update caller.
4724
1faeff08
MR
47252012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4726
4727 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4728 * linux-low.c (use_linux_regsets): New macro.
4729 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4730 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4731 (linux_register_in_regsets): New function.
4732 (usr_fetch_inferior_registers): Skip registers covered by
4733 regsets.
4734 (usr_store_inferior_registers): Likewise.
4735 (usr_fetch_inferior_registers): New macro.
4736 (usr_store_inferior_registers): Likewise.
4737 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4738 (linux_store_registers): Likewise.
4739 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4740 prototype.
4741 (init_registers_mips64_dsp_linux): Likewise.
4742 (init_registers_mips_linux): New macro.
4743 (init_registers_mips_dsp_linux): Likewise.
4744 (mips_dsp_num_regs): Likewise.
4745 (DSP_BASE, DSP_CONTROL): New fallback macros.
4746 (mips_base_regs): New macro.
4747 (mips_regmap): Use it. Fix the size.
4748 (mips_dsp_regmap): New variable.
4749 (mips_dsp_regset_bitmap): Likewise.
4750 (mips_arch_setup): New function.
4751 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4752 than mips_regmap.
4753 (mips_cannot_store_register): Likewise.
4754 (the_low_target): Update .arch_setup, .num_regs and .regmap
4755 initializers. Add .regset_bitmap initializer.
4756 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4757 initializer.
4758 * linux-bfin-low.c (the_low_target): Likewise.
4759 * linux-cris-low.c (the_low_target): Likewise.
4760 * linux-crisv32-low.c (the_low_target): Likewise.
4761 * linux-ia64-low.c (the_low_target): Likewise.
4762 * linux-m32r-low.c (the_low_target): Likewise.
4763 * linux-m68k-low.c (the_low_target): Likewise.
4764 * linux-ppc-low.c (the_low_target): Likewise.
4765 * linux-s390-low.c (the_low_target): Likewise.
4766 * linux-sh-low.c (the_low_target): Likewise.
4767 * linux-sparc-low.c (the_low_target): Likewise.
4768 * linux-tic6x-low.c (the_low_target): Likewise.
4769 * linux-x86-low.c (the_low_target): Likewise.
4770 * linux-xtensa-low.c (the_low_target): Likewise.
4771 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4772 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4773 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4774 srv_xmlfiles.
4775 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4776 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4777
c03e6ccc
YQ
47782012-02-29 Yao Qi <yao@codesourcery.com>
4779 Pedro Alves <palves@redhat.com>
4780
4781 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4782 `step_over_finished' is true.
4783
644cebc9
PA
47842012-02-27 Pedro Alves <palves@redhat.com>
4785
4786 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4787 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4788
c14d7ab2
PA
47892012-02-27 Pedro Alves <palves@redhat.com>
4790
4791 PR server/9684
4792 * linux-low.c (pid_is_stopped): New.
4793 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4794
412c89dd
LM
47952012-02-25 Luis Machado <lgustavo@codesourcery.com>
4796
4797 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4798 of conditions.
4799
b745defe
MR
48002012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4801
4802 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4803
9f3a5c85
LM
48042012-02-24 Luis Machado <lgustavo@codesourcery>
4805
4806 * server.c (handle_query): Advertise support for target-side
4807 breakpoint condition evaluation.
4808 (process_point_options): New function.
4809 (process_serial_event): When inserting a breakpoint, check for
4810 a target-side condition that should be evaluated.
4811
4812 * mem-break.c: Include regcache.h and ax.h.
4813 (point_cond_list_t): New data structure.
4814 (breakpoint) <cond_list>: New field.
4815 (find_gdb_breakpoint_at): Make non-static.
4816 (delete_gdb_breakpoint_at): Clear any target-side
4817 conditions.
4818 (clear_gdb_breakpoint_conditions): New function.
4819 (add_condition_to_breakpoint): Likewise.
4820 (add_breakpoint_condition): Likewise.
4821 (gdb_condition_true_at_breakpoint): Likewise.
4822 (gdb_breakpoint_here): Return result directly instead
4823 of going through a local variable.
4824
4825 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4826 (clear_gdb_breakpoint_conditions): Likewise.
4827 (add_breakpoint_condition): Likewise.
4828 (gdb_condition_true_at_breakpoint): Likewise.
4829
4830 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4831 (need_step_over_p): Take target-side breakpoint condition into
4832 consideration.
4833
5e1dc496
LM
48342012-02-24 Luis Machado <lgustavo@codesourcery>
4835
4836 * server.h: Include tracepoint.h.
4837 (agent_mem_read, agent_get_trace_state_variable_value,
4838 agent_set_trace_state_variable_value,
4839 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4840 get_set_tsv_func_addr): New prototypes.
4841
4842 * ax.h: New include file.
4843 * ax.c: New source file.
4844
4845 * tracepoint.c: Include ax.h.
4846 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4847 agent_expr, eval_result_type): Move to ax.h.
4848 (parse_agent_expr): Rename to ...
4849 (gdb_parse_agent_expr): ... this, make it non-static and move
4850 to ax.h.
4851 (unparse_agent_expr) Rename to ...
4852 (gdb_unparse_agent_expr): ... this, make it non-static and move
4853 to ax.h.
4854 (eval_agent_expr): Rename to ...
4855 (eval_tracepoint_agent_expr): ... this.
4856 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4857 forward declarations.
4858 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4859 (agent_get_trace_state_variable_value): New function.
4860 (agent_set_trace_state_variable_value): New function.
4861 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4862 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4863 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4864 (condition_true_at_tracepoint): Likewise.
4865 (parse_agent_expr): Rename to ...
4866 (gdb_parse_agent_expr): ... this and move to ax.c.
4867 (unparse_agent_expr): Rename to ...
4868 (gdb_unparse_agent_expr): ... this and move to ax.c.
4869 (gdb_agent_op_name): Move to ax.c.
4870 (eval_agent_expr): Rename to ...
4871 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4872 and move to ax.c.
4873 (eval_tracepoint_agent_expr): New function.
4874 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4875 non-static.
5e1dc496
LM
4876 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4877 ax.c.
4878 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4879 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4880 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4881 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4882 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4883 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4884 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4885 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4886 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4887 (compile_bytecodes): Remove forward declaration.
4888 (is_goto_target): Move to ax.c.
4889 (compile_bytecodes): Move to ax.c and call
4890 agent_get_trace_state_variable_value (...) and
4891 agent_set_trace_state_variable_value (...).
4892
4893 * Makefile.in: Update ax.c and IPA dependencies.
4894
277e4e52
PA
48952012-02-24 Pedro Alves <palves@redhat.com>
4896
4897 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4898 (cmd_bigqtbuffer_circular): ... this. Only handle
4899 'QTBuffer:circular:'.
4900 (handle_tracepoint_general_set): Adjust.
4901
bf4c19f7
YQ
49022012-02-16 Yao Qi <yao@codesourcery.com>
4903
4904 * inferiors.c: Move code to ...
4905 * dll.c: .... here. New.
4906 * server.h: Declare clear_dlls.
4907 * Makefile.in (SFILES): Add dll.c.
4908 (OBS): Add dll.o
4909 (dll.o): New rule.
4910
d73f2619
YQ
49112012-02-11 Yao Qi <yao@codesourcery.com>
4912
4913 * server.c: (handle_monitor_command): Add a new parameter
4914 `own_buf'.
4915 (handle_query): Update caller.
4916
f8255c2a
JB
49172012-02-09 Joel Brobecker <brobecker@adacore.com>
4918
4919 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4920 * configure, config.in: Regenerate.
4921 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4922 is not defined.
4923
da84f473
PA
49242012-02-02 Pedro Alves <palves@redhat.com>
4925
4926 Try SIGKILL first, then PTRACE_KILL.
4927 * linux-low.c (linux_kill_one_lwp): New.
4928 (linux_kill_one_lwp): Rename to ...
4929 (kill_one_lwp_callback): ... this. Use the new
4930 linux_kill_one_lwp.
4931
e886a173
PA
49322012-02-02 Pedro Alves <palves@redhat.com>
4933
4934 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4935 inferior.
4936
be07f1a2
PA
49372012-01-27 Pedro Alves <palves@redhat.com>
4938
4939 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4940 (elf_64_file_p): Make static.
4941 (linux_pid_exe_is_elf_64_file): New.
4942 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4943 Delete declarations.
4944 (linux_pid_exe_is_elf_64_file): Declare.
4945 * linux-x86-low.c (x86_arch_setup): Use
4946 linux_pid_exe_is_elf_64_file.
4947
d8301ad1
JK
49482012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4949
4950 * linux-low.c (linux_wait_for_event_1): Rename to ...
4951 (linux_wait_for_event): ... here and merge it with former
4952 linux_wait_for_event - new variable wait_ptid, use it.
4953 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4954
01b17894
PA
49552012-01-23 Pedro Alves <palves@redhat.com>
4956
4957 * server.c (main): Avoid yet another case of infinite loop while
4958 detaching/killing after a longjmp.
4959
e825046f
JK
49602012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4961
4962 Code cleanup.
4963 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4964
b9e7b9c3
UW
49652012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4966
4967 * hostio.c (handle_readlink): New function.
4968 (handle_vFile): Call it to handle "vFile:readlink" packets.
4969
901f9912
UW
49702012-01-20 Pedro Alves <palves@redhat.com>
4971 Ulrich Weigand <ulrich.weigand@linaro.org>
4972
4973 * server.c (handle_v_requests): Only support vAttach and vRun to
4974 start multiple processes when in extended protocol mode.
4975
fc1ab1a0
PA
49762012-01-17 Pedro Alves <palves@redhat.com>
4977
4978 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4979 memalign plus mprotect to allocate the scratch buffer.
4980
7d5d4e98
PA
49812012-01-13 Pedro Alves <palves@redhat.com>
4982
4983 * server.c (attach_inferior): Clear `cont_thread'.
4984
f128d5e9
PA
49852012-01-13 Pedro Alves <palves@redhat.com>
4986
4987 * server.c (main): Avoid infinite loop while detaching/killing
4988 after a longjmp.
4989
06db92f0
DE
49902012-01-09 Doug Evans <dje@google.com>
4991
4992 * server.c (start_inferior): Set last_ptid in --wrapper case.
4993
32d92999
YQ
49942012-01-06 Yao Qi <yao@codesourcery.com>
4995
4996 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4997 defined.
4998 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4999
5e0a92a9
YQ
50002012-01-04 Yao Qi <yao@codesourcery.com>
5001
5002 * tracepoint.c (cmd_qtdp): Print debug message
5003 for static tracepoint.
5004
ae639e8c
YQ
50052012-01-04 Yao Qi <yao@codesourcery.com>
5006
5007 * tracepoint.c (trace_vdebug): Differentiate debug message
5008 between gdbserver and IPA.
5009
f72429c5
YQ
50102012-01-03 Yao Qi <yao@codesourcery.com>
5011
5012 * tracepoint.c (tracepoint_was_hit): Don't collect for
5013 static tracepoint.
5014
12c3e59c
JB
50152012-01-02 Joel Brobecker <brobecker@adacore.com>
5016
5017 * terminal.h: Reformat copyright header.
5018
67827812
JB
50192012-01-02 Joel Brobecker <brobecker@adacore.com>
5020
5021 * server.c (gdbserver_version): Update copyright year.
5022 * gdbreplay.c (gdbreplay_version): Likewise.
5023
3e52c33d
JK
50242011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5025
5026 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5027
5028 Revert:
5029 2011-12-18 Hui Zhu <teawater@gmail.com>
5030 * linux-low.c (linux_create_inferior): Save return value to ret.
5031
66f1260e
HZ
50322011-12-18 Hui Zhu <teawater@gmail.com>
5033
5034 * linux-low.c (linux_create_inferior): Save return value to ret.
5035
e77616d7
DE
50362011-12-16 Doug Evans <dje@google.com>
5037
e7b06c57
DE
5038 * linux-low.c (linux_create_inferior): If stdio connection,
5039 redirect stdin from /dev/null, stdout to stderr.
5040 * remote-utils.c (remote_is_stdio): New static global.
5041 (remote_connection_is_stdio): New function.
5042 (remote_prepare): Handle stdio connection.
5043 (remote_open): Ditto.
5044 (remote_close): Don't close stdin for stdio connections.
5045 (read_prim,write_prim): New functions. Replace all calls to
5046 read/write to these.
5047 * server.c (main): Watch for "-" argument. Move call to
5048 remote_prepare before start_inferior.
5049 * server.h (STDIO_CONNECTION_NAME): New macro.
5050 (remote_connection_is_stdio): Declare.
5051
e77616d7
DE
5052 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5053 in debugging output.
5054
82067193
YQ
50552011-12-15 Yao Qi <yao@codesourcery.com>
5056
5057 * tracepoint.c: Include sys/syscall.h.
5058 (gdb_ust_thread): Remove preprocessor conditional.
5059
82bfbe7e
PA
50602011-12-14 Pedro Alves <pedro@codesourcery.com>
5061
5062 * linux-low.c (linux_detach_one_lwp): Call
5063 the_low_target.prepare_to_resume before detaching.
5064
712c6575
YQ
50652011-12-14 Yao Qi <yao@codesourcery.com>
5066
5067 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5068 of write.
5069
d54d1edf
YQ
50702011-12-14 Yao Qi <yao@codesourcery.com>
5071
5072 * i386-low.c (i386_low_stopped_data_address): Initialize local
5073 variable `control'.
5074
6210a125
PA
50752011-12-13 Pedro Alves <pedro@codesourcery.com>
5076
5077 PR remote/13492
5078
5079 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5080 DR_CONTROL unless necessary. Extend comments.
5081 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5082 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5083
2ece8244
YQ
50842011-12-13 Yao Qi <yao@codesourcery.com>
5085
5086 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5087 macros.
5088 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5089
784867a5
JK
50902011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5091
5092 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5093 Print new debug message for such case.
5094
6bf36717
JK
50952011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5096
5097 Fix overlapping memcpy.
5098 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5099 the read_inferior_memory transfer.
5100 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5101 write_inferior_memory transfer.
5102 (set_fast_tracepoint_jump): New variable buf. Use it for the
5103 read_inferior_memory and write_inferior_memory transfers.
5104 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5105 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5106 Use it for the write_inferior_memory transfer.
5107 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5108 buffers.
5109
50275556
MR
51102011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5111
5112 * linux-low.c (fetch_register, store_register): Make code
5113 consistent, fix formatting.
5114
7325beb4
MR
51152011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5116
5117 * linux-low.c (usr_store_inferior_registers): Factor out code
5118 to handle individual registers into...
5119 (store_register): ... this new function.
5120
c642a434
UW
51212011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5122
5123 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5124 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5125 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5126 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5127 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5128 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5129 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5130 (srv_xmlfiles): Add new XML files.
5131
5132 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5133 and <sys/uio.h>.
5134 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5135 (init_registers_s390_linux32v1): Add prototype.
5136 (init_registers_s390_linux32v2): Likewise.
5137 (init_registers_s390_linux64v1): Likewise.
5138 (init_registers_s390_linux64v2): Likewise.
5139 (init_registers_s390x_linux64v1): Likewise.
5140 (init_registers_s390x_linux64v2): Likewise.
5141 (s390_num_regs): Increment to 52.
5142 (s390_regmap): Add orig_r2 register.
5143 (s390_num_regs_3264): Increment to 68.
5144 (s390_regmap_3264): Add orig_r2 register.
5145 (s390_collect_ptrace_register): Handle orig_r2 register.
5146 (s390_supply_ptrace_register): Likewise.
5147 (s390_fill_last_break): New function.
5148 (s390_store_last_break): Likewise.
5149 (s390_fill_system_call): New function.
5150 (s390_store_system_call): Likewise.
5151 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5152 register sets.
5153 (s390_check_regset): New function.
5154 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5155 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5156 Update target_regsets for available register sets.
5157
2268b414
JK
51582011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5159 Jan Kratochvil <jan.kratochvil@redhat.com>
5160
5161 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5162 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5163 New.
5164 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5165 * linux-low.h (struct process_info_private): New member r_debug.
5166 * server.c (handle_qxfer_libraries): Call
5167 the_target->qxfer_libraries_svr4.
5168 (handle_qxfer_libraries_svr4): New function.
5169 (qxfer_packets): New entry "libraries-svr4".
5170 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5171 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5172 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5173 PACKET_qXfer_libraries_svr4.
5174
d6db1fab
UW
51752011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5176
5177 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5178 PSW address/mask between 8-byte and 16-byte formats.
5179 (s390_supply_ptrace_register): Likewise.
5180 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5181 basic addressing mode bit.
5182
242f5f1c
SS
51832011-11-24 Stan Shebs <stan@codesourcery.com>
5184
5185 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5186
f196051f
SS
51872011-11-17 Stan Shebs <stan@codesourcery.com>
5188
5189 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5190 (tracing_start_time): New global.
5191 (tracing_stop_time): New global.
5192 (tracing_user_name): New global.
5193 (tracing_notes): New global.
5194 (tracing_stop_note): New global.
5195 (cmd_qtstart): Set traceframe_usage, start_time.
5196 (stop_tracing): Set stop_time.
5197 (cmd_qtstatus): Report additional status.
5198 (cmd_qtp): New function.
5199 (handle_tracepoint_query): Call it.
5200 (cmd_qtnotes): New function.
5201 (handle_tracepoint_general_set): Call it.
5202 (get_timestamp): Rename from tsv_get_timestamp.
5203
405f8e94
SS
52042011-11-14 Stan Shebs <stan@codesourcery.com>
5205 Kwok Cheung Yeung <kcy@codesourcery.com>
5206
5207 * linux-x86-low.c (small_jump_insn): New.
5208 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5209 trampoline and error message, build a trampoline and issue a small
5210 jump instruction to it.
5211 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5212 trampoline and error message.
5213 (x86_get_min_fast_tracepoint_insn_len): New.
5214 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5215 * linux-low.h (struct linux_target_ops): Add arguments to
5216 install_fast_tracepoint_jump_pad operation, add new operation.
5217 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5218 arguments.
5219 (linux_get_min_fast_tracepoint_insn_len): New function.
5220 (linux_target_op): Add new operation.
5221 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5222 (gdb_trampoline_buffer_end): Ditto.
5223 (gdb_trampoline_buffer_error): Ditto.
5224 (struct ipa_sym_addresses): Add fields for new IPA variables.
5225 (symbol_list): Add entries for new IPA variables.
5226 (struct tracepoint): Add fields to hold the address range of the
5227 trampoline used by the tracepoint.
5228 (trampoline_buffer_head): New static variable.
5229 (trampoline_buffer_tail): Ditto.
5230 (claim_trampoline_space): New function.
5231 (have_fast_tracepoint_trampoline_buffer): New function.
5232 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5233 structure.
5234 (install_fast_tracepoint): Ditto, also add error buffer argument.
5235 (cmd_qtminftpilen): New function.
5236 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5237 (fast_tracepoint_from_trampoline_address): New function.
5238 (fast_tracepoint_collecting): Handle trampoline as part of jump
5239 pad space.
5240 (set_trampoline_buffer_space): New function.
5241 (initialize_tracepoint): Initialize new IPA variables.
5242 * target.h (struct target_ops): Add arguments to
5243 install_fast_tracepoint_jump_pad operation, add new
5244 get_min_fast_tracepoint_insn_len operation.
5245 (target_get_min_fast_tracepoint_insn_len): New.
5246 (install_fast_tracepoint_jump_pad): Add arguments.
5247 * server.h (IPA_BUFSIZ): Define.
5248 * linux-i386-ipa.c: Include extra header files.
5249 (initialize_fast_tracepoint_trampoline_buffer): New function.
5250 (initialize_low_tracepoint): Call it.
5251 * server.h (set_trampoline_buffer_space): Declare.
5252 (claim_trampoline_space): Ditto.
5253 (have_fast_tracepoint_trampoline_buffer): Ditto.
5254
1e4d1764
YQ
52552011-11-14 Yao Qi <yao@codesourcery.com>
5256
5257 * server.c (handle_query): Handle InstallInTrace for qSupported.
5258 * tracepoint.c (add_tracepoint): Sort list.
5259 (install_tracepoint, download_tracepoint): New.
5260 (cmd_qtdp): Call them to install and download tracepoints.
5261 (sort_tracepoints): Removed.
5262 (cmd_qtstart): Update.
5263
5c73ff4e
YQ
52642011-11-14 Yao Qi <yao@codesourcery.com>
5265
5266 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5267 * mem-break.h: Declare.
5268 * tracepoint.c (cmd_qtstart): Move some code to ...
5269 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5270 New.
5271 (download_tracepoints): Move some code to ...
5272 (download_tracepoint_1): ... here. New.
5273
86a30030
YQ
52742011-11-08 Yao Qi <yao@codesourcery.com>
5275
5276 * remote-utils.c (relocate_instruction): A comment fix.
5277
8d26e50c
JB
52782011-11-07 Joel Brobecker <brobecker@adacore.com>
5279
5280 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5281 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5282 dr_status_mirror and dr_control_mirror from debug_reg_state.
5283 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5284 (i386_initial_stuff): Remove use of deleted globals.
5285 (i386_get_thread_context, i386_set_thread_context,
5286 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5287 from debug_reg_state.
5288
a59306a3
YQ
52892011-11-05 Yao Qi <yao@codesourcery.com>
5290
5291 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5292 address as TPOINT's.
5293
3065dfb6
SS
52942011-11-02 Stan Shebs <stan@codesourcery.com>
5295
5296 * tracepoint.c (agent_mem_read_string): New function.
5297 (eval_agent_expr): Call it for tracenz.
5298 * server.c (handle_query): Report support for tracenz.
5299
fd0d8c7c
YQ
53002011-11-02 Yao Qi <yao@codesourcery.com>
5301
5302 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5303
609086b1
YQ
53042011-11-02 Yao Qi <yao@codesourcery.com>
5305
5306 * target.h: Fix a typo in comment.
5307
b9fd1791
PA
53082011-10-31 Pedro Alves <pedro@codesourcery.com>
5309
5310 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5311 clobber the breakpoints' shadows with fast tracepoint jumps.
5312 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5313 * target.c (write_inferior_memory): Also pass MYADDR down to
5314 check_mem_write.
5315
03583c20
UW
53162011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5317
5318 * configure.ac: Check support for personality routine.
5319 * configure: Regenerate.
5320 * config.in: Likewise.
5321 * linux-low.c: Include <sys/personality.h>.
5322 Define ADDR_NO_RANDOMIZE if necessary.
5323 (linux_create_inferior): Disable address space randomization when
5324 forking inferior, if requested.
5325 (linux_supports_disable_randomization): New function.
5326 (linux_target_ops): Install it.
5327 * server.h (disable_randomization): Declare.
5328 * server.c (disable_randomization): New global variable.
5329 (handle_general_set): Handle QDisableRandomization.
5330 (handle_query): Likewise for qSupported.
5331 (main): Support --disable-randomization and --no-disable-randomization
5332 command line arguments.
5333 * target.h (struct target_ops): Add supports_disable_randomization.
5334 (target_supports_disable_randomization): New macro.
5335
723b724b
MF
53362011-09-29 Mike Frysinger <vapier@gentoo.org>
5337
5338 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5339 ifdef check.
5340 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5341 [!PT_GETDSBT] (target_loadmap): New definition.
5342 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5343 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5344 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5345 and PT_GETDSBT to LINUX_LOADMAP.
5346 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5347 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5348
55329a5c 53492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5350
5351 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5352 (arm_linux_hwbp_cap): New static variable.
5353 (arm_linux_get_hwbp_cap): Replace by ...
5354 (arm_linux_init_hwbp_cap): ... this new function.
5355 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5356 (arm_linux_get_hw_watchpoint_count): Likewise.
5357 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5358 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5359 (arm_prepare_to_resume): Use perror_with_name instead of error.
5360
55329a5c 53612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5362
5363 * linux-arm-low.c: Include <signal.h>.
5364 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5365 (struct arm_linux_hwbp_cap): New data type.
5366 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5367 (struct arm_linux_hw_breakpoint): New data type.
5368 (MAX_BPTS, MAX_WPTS): Define.
5369 (struct arch_process_info, struct arch_lwp_info): New data types.
5370 (arm_linux_get_hwbp_cap): New function.
5371 (arm_linux_get_hw_breakpoint_count): Likewise.
5372 (arm_linux_get_hw_watchpoint_count): Likewise.
5373 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5374 (arm_hwbp_control_initialize): Likewise.
5375 (arm_hwbp_control_is_enabled): Likewise.
5376 (arm_hwbp_control_is_initialized): Likewise.
5377 (arm_hwbp_control_disable): Likewise.
5378 (arm_linux_hw_breakpoint_equal): Likewise.
5379 (arm_linux_hw_point_initialize): Likewise.
5380 (struct update_registers_data): New data structure.
5381 (update_registers_callback: New function.
5382 (arm_insert_point): Likewise.
5383 (arm_remove_point): Likewise.
5384 (arm_stopped_by_watchpoint): Likewise.
5385 (arm_stopped_data_address): Likewise.
5386 (arm_new_process): Likewise.
5387 (arm_new_thread): Likewise.
5388 (arm_prepare_to_resume): Likewise.
5389 (the_low_target): Register arm_insert_point, arm_remove_point,
5390 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5391 arm_new_thread, and arm_prepare_to_resume.
5392
6b9801d4
SS
53932011-09-15 Stan Shebs <stan@codesourcery.com>
5394
5395 * server.h (struct emit_ops): Add compare-goto fields.
5396 * tracepoint.c (gdb_agent_op_sizes): New table.
5397 (emit_eq_goto): New function.
5398 (emit_ne_goto): New function.
5399 (emit_lt_goto): New function.
5400 (emit_le_goto): New function.
5401 (emit_gt_goto): New function.
5402 (emit_ge_goto): New function.
5403 (is_goto_target): New function.
5404 (compile_bytecodes): Recognize special cases of compare-goto
5405 combinations and call specialized emitters for them.
5406 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5407 (amd64_emit_ne_goto): New function.
5408 (amd64_emit_lt_goto): New function.
5409 (amd64_emit_le_goto): New function.
5410 (amd64_emit_gt_goto): New function.
5411 (amd64_emit_ge_goto): New function.
5412 (amd64_emit_ops): Add the new functions.
5413 (i386_emit_eq_goto): New function.
5414 (i386_emit_ne_goto): New function.
5415 (i386_emit_lt_goto): New function.
5416 (i386_emit_le_goto): New function.
5417 (i386_emit_gt_goto): New function.
5418 (i386_emit_ge_goto): New function.
5419 (i386_emit_ops): Add the new functions.
5420
bf15cbda
SS
54212011-09-08 Stan Shebs <stan@codesourcery.com>
5422
5423 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5424 (i386_emit_epilogue): Restore %ebx.
5425
943ca1dd
JZ
54262011-08-31 Jie Zhang <jzhang918@gmail.com>
5427
5428 * server.c (step_thread): Remove definition.
5429 (process_serial_event): Don't handle Hs.
5430 * server.h (step_thread): Remove declaration.
5431 * target.c (set_desired_inferior): Remove use of step_thread.
5432
e3deef73
LM
54332011-08-24 Luis Machado <lgustavo@codesourcery.com>
5434
5435 * linux-low.c: Include linux-procfs.h.
5436 (linux_attach_lwp_1): Update comments.
5437 (linux_attach): Scan for existing threads when attaching to a
5438 process that is the tgid.
5439 * Makefile.in: Update dependencies.
5440
13da1c97
LM
54412011-08-24 Luis Machado <lgustavo@codesourcery.com>
5442
5443 * configure.srv: Add linux-procfs.o dependencies.
5444
881127c9
YQ
54452011-08-14 Yao Qi <yao@codesourcery.com>
5446
5447 * target.h (struct target_ops): Fix indent.
5448 * win32-low.c (win32_target_ops): Fix comment.
5449
58dbd541
YQ
54502011-08-14 Andrew Jenner <andrew@codesourcery.com>
5451 Yao Qi <yao@codesourcery.com>
5452
5453 * Makefile.in (clean): Remove tic6x-*.c files.
5454 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5455 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5456 (tic6x-c64xp-linux.c): Likewise.
5457 * configure.srv: Add support for tic6x-*-uclinux.
5458 * linux-tic6x-low.c: New.
5459 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5460
78d85199
YQ
54612011-08-14 Andrew Stubbs <ams@codesourcery.com>
5462 Yao Qi <yao@codesourcery.com>
5463
5464 * target.h (struct target_ops): Add read_loadmap.
5465 * linux-low.c (struct target_loadseg): New type.
5466 (struct target_loadmap): New type.
5467 (linux_read_loadmap): New function.
5468 (linux_target_ops): Add linux_read_loadmap.
5469 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5470 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5471 to NULL.
78d85199 5472
a959a88d
EZ
54732011-08-05 Eli Zaretskii <eliz@gnu.org>
5474
5475 * win32-low.c: Include <stdint.h>.
5476
1ced966e
PA
54772011-07-22 Pedro Alves <pedro@codesourcery.com>
5478
5479 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5480 to the inferior here.
5481 (i386_remove_aligned_watchpoint): Ditto.
5482 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5483 fit part of the watchpoint in the debug registers.
5484 (i386_update_inferior_debug_regs): New.
5485 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5486 registers, and only update the inferior on success.
5487 (i386_low_remove_watchpoint): Ditto.
5488
d26e3629
KY
54892011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5490
5491 * linux-low.c (compare_ints, unique, list_threads, show_process,
5492 linux_core_of_thread): Delete.
5493 (linux_target_ops): Change linux_core_of_thread to
5494 linux_common_core_of_thread.
5495 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5496 * utils.c (malloc_failure): Change type of argument.
5497 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5498 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5499 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5500 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5501 (IPA_OBJS): Add common-utils-ipa.o.
5502 (ptid_h, linux_osdata_h): New macros.
5503 (server_h): Add common/common-utils.h, common/xml-utils.h,
5504 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5505 common/ptid.h.
5506 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5507 ptid.o, buffer.o): New rules.
5508 (linux-low.o): Add common/linux-osdata.h as a dependency.
5509 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5510 * configure.ac: Add AC_HEADER_DIRENT check.
5511 * config.in: Regenerate.
5512 * configure: Regenerate.
5513 * remote-utils.c (xml_escape_text): Delete.
5514 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5515 buffer_xml_printf): Move to common/buffer.c.
5516 * server.c (main): Remove call to initialize_inferiors.
5517 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5518 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5519 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5520 internal_error, gdb_assert, gdb_assert_fail): Delete.
5521 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5522 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5523 common/buffer.h.
5524 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5525 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5526 initialize_inferiors): Delete.
5527
2275a1a7
PA
55282011-07-20 Pedro Alves <pedro@codesourcery.com>
5529
5530 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5531 symbol error.
5532
0a5b1e09
PA
55332011-05-31 Pedro Alves <pedro@codesourcery.com>
5534
5535 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5536 assertion.
5537 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5538
6938fd34
YQ
55392011-05-26 Yao Qi <yao@codesourcery.com>
5540
5541 * Makefile.in (thread-db.o): Track dependence to
5542 common/gdb_thread_db.h.
5543 * thread-db.c: include gdb_thread_db.h from right place.
5544
b481f9e0
TT
55452011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5546
5547 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5548 __FILE__ and __LINE__ to internal_error.
5549
98a5dd13
DE
55502011-05-13 Doug Evans <dje@google.com>
5551
5552 * thread-db.c (try_thread_db_load_from_sdir): New function.
5553 (try_thread_db_load_from_dir): New function.
5554 (thread_db_load_search): Handle $sdir, ignore $pdir.
5555 Remove trying of system directories if search of
5556 libthread-db-search-path fails, that is now done via $sdir.
5557
d248b706
KY
55582011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5559
5560 * server.c (handle_query): Add EnableDisableTracepoints to the list
5561 of supported features.
43aaf8b6 5562 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5563 tracepoints.
43aaf8b6
PA
5564 (cmd_qtenable_disable): New.
5565 (cmd_qtstart): Install tracepoints even if disabled.
5566 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5567 receiving a QTEnable or QTDisable packet.
5568 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5569 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5570 tracepoints.
5571 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5572
84e578fb
DE
55732011-05-10 Doug Evans <dje@google.com>
5574
5575 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5576
71f55dd8
DE
55772011-05-04 Doug Evans <dje@google.com>
5578
5579 * linux-low.c (linux_join): Skip process lookup.
5580 * spu-low.c (spu_join): Ditto.
5581 * server.c (join_inferiors_callback): Delete.
5582 (process_serial_event): For 'D' packet (detach) call join_inferior
5583 directly.
5584
4d393d60
JM
55852011-05-04 Joseph Myers <joseph@codesourcery.com>
5586
5587 * README: Don't mention xscale*-*-linux*.
5588 * configure.srv (xscale*-*-linux*): Don't handle target.
5589
b00ad6ff
NF
55902011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5591
5592 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5593 casting pointers.
5594 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5595 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5596 (i386_emit_void_call_2): Likewise.
5597
af96c192
YQ
55982011-04-26 Yao Qi <yao@codesourcery.com>
5599
43aaf8b6
PA
5600 * linux-low.c: Move common macros to linux-ptrace.h.
5601 Include linux-ptrace.h.
af96c192
YQ
5602 * Makefile.in (linux_ptrace_h): New.
5603 (linux-low.o): Depends on linux-ptrace.h.
5604
03f2bd59
JK
56052011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5606
5607 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5608 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5609 (remote_prepare): New function with most of the TCP code from ...
5610 (remote_open): ... here. Detect PORT here unconditionally. Move also
5611 setting transport_is_reliable.
5612 * server.c (run_once): New variable.
5613 (gdbserver_usage): Document it.
5614 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5615 the first run if RUN_ONCE.
5616 * server.h (run_once, remote_prepare): New declarations.
5617
7a9dd1b2
TT
56182011-04-19 Tom Tromey <tromey@redhat.com>
5619
5620 * win32-low.c (handle_load_dll): Remove duplicate "the".
5621
81239425
PM
56222011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5623
5624 Remove support for old Cygwin 1.5 versions.
5625 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5626 function to avoid warning.
5627 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5628 warning.
5629
9e0627f1
PM
56302011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5631
5632 * gdbserver/server.h (Macro _): Define it if not available.
5633
588eebee
MS
56342011-03-14 Michael Snyder <msnyder@vmware.com>
5635
348af9f7 5636 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5637
43f70d4c
JB
56382011-03-10 Joel Brobecker <brobecker@adacore.com>
5639
5640 * Makefile.in (maintainer-clean realclean distclean): Remove
5641 "make ... subdir_do" command.
5642
348af9f7
MS
56432011-03-10 Michael Snyder <msnyder@vmware.com>
5644
5645 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5646
5647 * server.c (handle_v_run): Free alloced buffer on early return.
5648
e637a4f5
YQ
56492011-03-09 Yao Qi <yao@codesourcery.com>
5650
5651 Revert:
5652 2011-03-04 Yao Qi <yao@codesourcery.com>
5653
5654 * Makefile.in: Remove GNU make feature --directory.
5655
5656 2011-03-05 Yao Qi <yao@codesourcery.com>
5657
5658 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5659 (subdir_do): New make target. Copied from gdb/Makefile.
5660 (maintainer-clean, realclean, distclean, clean): Call corresponding
5661 make targets in common/Makefile.
5662
5663 2011-02-11 Yao Qi <yao@codesourcery.com>
5664
5665 * configure.ac: Call AC_PROG_RANLIB.
5666 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5667 * configure: Regenerate.
5668
e6edda56
JK
56692011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5670
5671 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5672
e5141119
JB
56732011-03-06 Yao Qi <yao@codesourcery.com>
5674
5675 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5676
64794aa4
JB
56772011-03-05 Yao Qi <yao@codesourcery.com>
5678
5679 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5680 (subdir_do): New make target. Copied from gdb/Makefile.
5681 (maintainer-clean, realclean, distclean, clean): Call corresponding
5682 make targets in common/Makefile.
5683
7a762829
YQ
56842011-03-04 Yao Qi <yao@codesourcery.com>
5685
5686 * Makefile.in: Remove GNU make feature --directory.
5687
348af9f7
MS
56882011-03-04 Michael Snyder <msnyder@vmware.com>
5689
5690 * server.c (queue_stop_reply): Call xmalloc not malloc.
5691
56922011-03-02 Michael Snyder <msnyder@vmware.com>
5693
5694 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5695
9f72fee2
MS
56962011-02-28 Michael Snyder <msnyder@vmware.com>
5697
588eebee
MS
5698 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5699 (cmd_qtframe): Ditto.
5700 (cmd_qtbuffer): Ditto.
5701 (cmd_bigqtbuffer): Ditto.
5702
9f72fee2
MS
5703 * utils.c (decimal2str): Initialize 'width' to nine, then
5704 don't mess with it.
5705
8040bd49
UW
57062011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5707
5708 * hostio.c (require_data): Free *data, not data.
5709
7e52cbd0
JK
57102011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5711
5712 * hostio.c (require_data): Use free, not xfree.
5713
9130f83e
MS
57142011-02-27 Michael Snyder <msnyder@vmware.com>
5715
4b812f4e
MS
5716 * server.c (handle_query): Discard unused value.
5717
9130f83e
MS
5718 * hostio.c (require_data): Free malloc memory before returning
5719 error.
5720
69d37113
MS
57212011-02-26 Michael Snyder <msnyder@vmware.com>
5722
5723 * linux-low.c (list_threads): Call closedir for dirent.
5724
35f5825a
MS
57252011-02-27 Michael Snyder <msnyder@vmware.com>
5726
2a589cef
MS
5727 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5728 a case statement falls through.
5729
0adea5f7
MS
5730 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5731
35f5825a
MS
5732 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5733 in comparison.
5734
238f1c74
MS
57352011-02-26 Michael Snyder <msnyder@vmware.com>
5736
5737 * utils.c (decimal2str): Eliminate dead code and dead param.
5738 (pulongest): Drop dead param from call to decimal2str.
5739 (plongest): Ditto.
5740
633ff500
JB
57412011-02-24 Joel Brobecker <brobecker@adacore.com>
5742
5743 Revert the following patch (not approved yet):
5744 2011-02-21 Hui Zhu <teawater@gmail.com>
5745 * tracepoint.c (tp_printf): New function.
5746 (eval_agent_expr): Handle gdb_agent_op_printf.
5747
f9c6ff72
HZ
57482011-02-21 Hui Zhu <teawater@gmail.com>
5749
5750 * tracepoint.c (tp_printf): New function.
5751 (eval_agent_expr): Handle gdb_agent_op_printf.
5752
94d5e490
TT
57532011-02-18 Tom Tromey <tromey@redhat.com>
5754
5755 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5756 (tracepoint.o): Likewise.
5757 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5758 (gdb_agent_op_names): Likewise.
5759
c7f96d2b
TT
57602011-02-18 Tom Tromey <tromey@redhat.com>
5761
5762 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5763 gdb_agent_op_rot>: New constants.
5764 (gdb_agent_op_names): Add pick and roll.
5765 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5766 cases.
5767
0feedb2c
JK
57682011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5769
5770 * aclocal.m4: Regenerated with aclocal-1.11.1.
5771
b3b9301e
PA
57722011-02-14 Pedro Alves <pedro@codesourcery.com>
5773
5774 * server.c (handle_qxfer_traceframe_info): New.
5775 (qxfer_packets): Register "traceframe-info".
5776 (handle_query): Report support for qXfer:traceframe-info:read+.
5777 * tracepoint.c (match_blocktype): New.
5778 (traceframe_find_block_type): Rename to ...
5779 (traceframe_walk_blocks): ... this. Add callback filter argument,
5780 and use it.
5781 (traceframe_find_block_type): New, reimplemented on top of
5782 traceframe_walk_blocks.
5783 (build_traceframe_info_xml): New.
5784 (traceframe_read_info): New.
5785 * server.h (traceframe_read_info): Declare.
5786
4f3e6fb7
YQ
57872011-02-11 Yao Qi <yao@codesourcery.com>
5788
5789 * configure.ac: Call AC_PROG_RANLIB.
5790 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5791 * configure: Regenerate.
5792
764880b7
PA
57932011-02-07 Pedro Alves <pedro@codesourcery.com>
5794
5795 * server.c (gdb_read_memory): Change return semantics to allow
5796 partial transfers.
5797 (handle_search_memory_1): Adjust.
5798 (process_serial_event) <'m' packet>: Handle partial transfers.
5799 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5800
1c79eb8a
PA
58012011-01-28 Pedro Alves <pedro@codesourcery.com>
5802
5803 * regcache.c (init_register_cache): Initialize
5804 regcache->register_status.
5805 (free_register_cache): Release regcache->register_status.
5806 (regcache_cpy): Copy register_status.
5807 (registers_to_string): Print 'x's for unavailable registers.
5808 (supply_register): Mark the register's status valid or
5809 unavailable, depending on whether a buffer was passed in or not.
5810 (supply_register_zeroed): New.
5811 (supply_regblock): Mark the registers' status valid or
5812 unavailable, depending on whether a buffer was passed in or not.
5813 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5814 (struct regcache): New `register_status' field.
5815 (supply_register_zeroed): Declare.
5816 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5817 supply_register_zeroed, rather than passing a NULL buffer to
5818 supply_register.
5819 * tracepoint.c (fetch_traceframe_registers): Update comment.
5820
85724a0e
PA
58212011-01-28 Pedro Alves <pedro@codesourcery.com>
5822
5823 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5824 buffer explicit.
5825
d08aafef
PA
58262011-01-25 Pedro Alves <pedro@codesourcery.com>
5827
5828 * server.h (decode_xfer_write): Change prototype.
5829 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5830 and don't extract the annex here.
5831 * server.c (decode_xfer_read): Remove `annex' parameter,
5832 and don't extract the annex here.
5833 (decode_xfer): New.
5834 (struct qxfer): New.
5835 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5836 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5837 (handle_qxfer_statictrace): New functions, abstracted out from
5838 handle_query, and made to use the struct qxfer interface.
5839 (handle_threads_qxfer_proper): Rename to ...
5840 (handle_qxfer_threads_proper): ... this.
5841 (handle_threads_qxfer): Rename to ...
5842 (handle_qxfer_threads): ... this. Adjust.
5843 (qxfer_packets): New array.
5844 (handle_qxfer): New function.
5845 (handle_query): Use handle_qxfer.
5846
493e2a69
MS
58472011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5848
5849 * gdbreplay.c: Shorten lines of >= 80 columns.
5850 * linux-low.c: Ditto.
5851 * linux-ppc-low.c: Ditto.
5852 * linux-s390-low.c: Ditto.
5853 * linux-sparc-low.c: Ditto.
5854 * linux-x86-low.c: Ditto.
5855 * linux-xtensa-low.c: Ditto.
5856 * mem-break.c: Ditto.
5857 * nto-low.c: Ditto.
5858 * regcache.h: Ditto.
5859 * remote-utils.c: Ditto.
5860 * server.c: Ditto.
5861 * server.h: Ditto.
5862 * thread-db.c: Ditto.
5863 * tracepoint.c: Ditto.
5864 * utils.c: Ditto.
5865 * win32-low.h: Ditto.
5866
44944448
JB
58672011-01-05 Joel Brobecker <brobecker@adacore.com>
5868
5869 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5870 update.
5871
71ce852c
JB
58722011-01-01 Joel Brobecker <brobecker@adacore.com>
5873
5874 * server.c (gdbserver_version): Update copyright year in version
5875 output.
5876 * gdbreplay.c (gdbreplay_version): Ditto.
5877
eb826dc6
MF
58782010-12-29 Jie Zhang <jie.zhang@analog.com>
5879
5880 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5881 * linux-bfin-low.c: New file.
5882 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5883 PT_DATA_ADDR for BFIN targets.
5884 * Makefile.in (SFILES): Add linux-bfin-low.c.
5885 (clean): Remove reg-bfin.c.
5886 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5887 * README: Mention supported Blackfin targets.
5888
39ab222a
MF
58892010-12-23 Mike Frysinger <vapier@gentoo.org>
5890
5891 * .gitignore: New file.
5892
a1f2ce7d
MF
58932010-11-16 Mike Frysinger <vapier@gentoo.org>
5894
5895 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5896
f474844c
JZ
58972010-10-22 Jie Zhang <jie@codesourcery.com>
5898
5899 * Makefile.in: Add FLAGS_TO_PASS variable.
5900 (install): Remove dependency of install-only and recursively
5901 invoke make for install-only.
5902
f1048712
DE
59032010-10-04 Doug Evans <dje@google.com>
5904
5905 * Makefile.in (uninstall): Use $(DESTDIR).
5906
b53a1623
PA
59072010-09-24 Pedro Alves <pedro@codesourcery.com>
5908
e6ee044d
PA
5909 PR gdb/11842
5910
b53a1623
PA
5911 * linux-x86-low.c (compat_siginfo_from_siginfo)
5912 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5913 si_code is < 0. Check for si_code == SI_TIMER before checking for
5914 si_code < 0.
5915
fa1bd1e4
JB
59162010-09-13 Joel Brobecker <brobecker@adacore.com>
5917
5918 * lynx-i386-low.c: New file.
5919 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5920
47fac8f8
JB
59212010-09-13 Joel Brobecker <brobecker@adacore.com>
5922
5923 * lynx-low.c (ptrace_request_to_str): Remove handling for
5924 request values that have been removed in LynxOS 5.x.
5925
1adfc54d
JB
59262010-09-13 Joel Brobecker <brobecker@adacore.com>
5927
5928 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5929 <ptrace.h>
5930
c2a66c29
NS
59312010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5932
5933 * configure.ac: Add --enable-inprocess-agent option.
5934 * configure: Rebuilt.
5935
32fcada3
YQ
59362010-09-06 Yao Qi <yao@codesourcery.com>
5937
5938 * linux-low.c (linux_kill): Remove unused variable.
5939 (linux_stabilize_threads): Likewise.
5940 * server.c (start_inferior): Likewise.
5941 (queue_stop_reply_callback): Likewise.
5942 * tracepoint.c (do_action_at_tracepoint): Likewise.
5943
0cccb683
YQ
59442010-09-06 Yao Qi <yao@codesourcery.com>
5945
5946 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5947 on return.
5948
423ec54c
JK
59492010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5950
5951 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5952
12ac6819
PA
59532010-09-06 Pedro Alves <pedro@codesourcery.com>
5954
5955 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5956 "$(IPA_DEPFILES)".
5957
8ed54b31
JB
59582010-09-01 Joel Brobecker <brobecker@adacore.com>
5959
5960 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5961 gdbserver/lynx-ppc-low.c: New files.
5962 * Makefile.in (lynx_low_h): New variable.
5963 (lynx-low.o, lynx-ppc-low.o): New rules.
5964 * configure.ac: On LynxOS, link with -lnetinet.
5965 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5966 * configure: regenerate.
5967
bb0116a4
JB
59682010-09-01 Joel Brobecker <brobecker@adacore.com>
5969
5970 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5971 * configure.ac: Add check for vasprintf and vsnprintf.
5972 * configure, config.in: Regenerate.
5973 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5974
a778ab81 59752010-09-01 Joel Brobecker <brobecker@adacore.com>
5976
5977 * gdbreplay.c: Move include of alloca.h up, next to include of
5978 malloc.h.
5979 * server.h: Add include of malloc.h.
5980 * mem-break.c: Remove include of malloc.h.
5981 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5982
8b034a19 59832010-09-01 Joel Brobecker <brobecker@adacore.com>
5984
5985 * Makefile.in (memmem.o): Build with -Wno-error.
5986
59872010-09-01 Joel Brobecker <brobecker@adacore.com>
5988
5989 * utils.c (xsnprintf): Make non-static.
5990 * server.h: Add xsnprintf declaration.
5991 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5992 replace calls to snprintf by calls to xsnprintf throughout.
5993
59942010-09-01 Joel Brobecker <brobecker@adacore.com>
5995
5996 * configure.ac: Add configure check for alloca.
5997 * configure, config.in: Regenerate.
5998 * server.h: Include alloca.h if it exists.
5999 * gdbreplay.c: Include alloca.h if it exists.
6000
1a981360
PA
60012010-08-28 Pedro Alves <pedro@codesourcery.com>
6002
6003 * linux-low.c (__SIGRTMIN): Define if not already defined.
6004 (linux_create_inferior): Check for __ANDROID__ rather than
6005 __SIGRTMIN.
6006 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6007 are already deferred.
6008 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6009 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6010 stopped and already has a pending signal to report.
6011 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6012 a pending signal to report or is moving out of a jump pad.
6013 (linux_init_signals): Check for __ANDROID__ rather than
6014 __SIGRTMIN.
6015
b4d51a55
PA
60162010-08-28 Pedro Alves <pedro@codesourcery.com>
6017
6018 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6019 debug_threads check. Avoid a linear search when not doing debug
6020 output.
6021
ec48365d
PA
60222010-08-27 Pedro Alves <pedro@codesourcery.com>
6023
6024 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6025 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6026 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6027 (process_event): Change local fd's type to gdb_fildes_t.
6028 (create_file_handler): Adjust prototype.
6029 (delete_file_handler): Adjust prototype.
6030 (handle_file_event): Adjust prototype. Use pfildes.
6031 (create_file_event): Adjsut prototype.
6032 * remote-utils.c (remote_desc, listen_desc): Change type to
6033 gdb_fildes_t.
6034 * server.h: New gdb_fildes_t typedef.
6035 [USE_WIN32API]: Include winsock2.h.
6036 (delete_file_handler, add_file_handler): Adjust prototypes.
6037 (pfildes): Declare.
6038 * utils.c (pfildes): New.
6039
854d88f0
PA
60402010-08-27 Pedro Alves <pedro@codesourcery.com>
6041
6042 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6043 * configure: Regenerate.
6044
0146f85b
PA
60452010-08-27 Pedro Alves <pedro@codesourcery.com>
6046
6047 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6048 (linux_done_accessing_memory): ... this.
6049 (linux_target_ops): Adjust.
6050 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6051 * nto-low.c (nto_target_ops): Adjust comment.
6052 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6053 * spu-low.c (spu_target_ops): Adjust comment.
6054 * target.h (target_ops): Rename unprepare_to_access_memory field
6055 to done_accessing_memory.
6056 (unprepare_to_access_memory): Rename to ...
6057 (done_accessing_memory): ... this.
6058
90d74c30
PA
60592010-08-26 Pedro Alves <pedro@codesourcery.com>
6060
6061 * linux-low.c (linux_prepare_to_access_memory): New.
6062 (linux_unprepare_to_access_memory): New.
6063 (linux_target_ops): Install them.
6064 * server.c (read_memory): Rename to ...
6065 (gdb_read_memory): ... this. Use
6066 prepare_to_access_memory/prepare_to_access_memory.
6067 (write_memory): Rename to ...
6068 (gdb_write_memory): ... this. Use
6069 prepare_to_access_memory/prepare_to_access_memory.
6070 (handle_search_memory_1): Adjust.
6071 (process_serial_event): Adjust.
6072 * target.h (struct target_ops): New fields
6073 prepare_to_access_memory and unprepare_to_access_memory.
6074 (prepare_to_access_memory, unprepare_to_access_memory): New.
6075 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6076 prepare_to_access_memory/prepare_to_access_memory.
6077 * nto-low.c (nto_target_ops): Adjust.
6078 * spu-low.c (spu_target_ops): Adjust.
6079 * win32-low.c (win32_target_ops): Adjust.
6080
fd467969
PA
60812010-08-26 Pedro Alves <pedro@codesourcery.com>
6082
6083 * Makefile.in (WARN_CFLAGS): Get it from configure.
6084 (WERROR_CFLAGS): New.
6085 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6086 * configure.ac: Introduce --enable-werror, which adds -Werror to
6087 the compiler command line. Enabled by default. Disable with
6088 --disable-werror. Add -Wdeclaration-after-statement
6089 Wpointer-arith and -Wformat-nonliteral to warning flags.
6090 * configure: Regenerate.
6091
331e2f5f
PA
60922010-08-26 Pedro Alves <pedro@codesourcery.com>
6093
6094 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6095
e581f2b4
PA
60962010-08-26 Pedro Alves <pedro@codesourcery.com>
6097
6098 * gdbreplay.c (remote_error): New.
6099 (gdbchar): New.
6100 (expect): Use gdbchar. Check for error reading from GDB.
6101 Clarify sync error output.
6102 (play): Check for errors writing to GDB.
6103 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6104 * remote-utils.c (getpkt): Check for errors writing to the remote
6105 descriptor.
6106
3c11dd79
PA
61072010-08-25 Pedro Alves <pedro@codesourcery.com>
6108
6109 * linux-low.c (linux_wait_1): Move non-debugging code out of
6110 `debug_threads' control.
6111
d20a8ad9
PA
61122010-08-25 Pedro Alves <pedro@codesourcery.com>
6113
6114 * linux-low.c (linux_wait_1): Don't set last_status here.
6115 * server.c (push_event, queue_stop_reply_callback): Assert we're
6116 not pushing a TARGET_WAITKIND_IGNORE event.
6117 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6118 (myresume, handle_target_event): Set the thread's last_resume_kind
6119 and last_status from the target returned status.
6120
964e4306
PA
61212010-08-25 Pedro Alves <pedro@codesourcery.com>
6122
6123 PR threads/10729
6124
6125 * linux-x86-low.c (update_debug_registers_callback): New.
6126 (i386_dr_low_set_addr): Use it.
6127 (i386_dr_low_get_addr): New.
6128 (i386_dr_low_set_control): Use update_debug_registers_callback.
6129 (i386_dr_low_get_control): New.
6130 (i386_dr_low_get_status): Adjust.
6131 * linux-low.c (linux_stop_lwp): New.
6132 * linux-low.h (linux_stop_lwp): Declare.
6133
6134 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6135 argument instead of a i386_debug_reg_state.
6136 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6137 a i386_debug_reg_state.
6138 (i386_insert_aligned_watchpoint): Adjust.
6139 (i386_remove_aligned_watchpoint): Adjust.
6140 (i386_low_stopped_data_address): Read the debug registers from the
6141 inferior instead of from the mirrors.
6142 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6143 (i386_dr_low_get_addr): Declare.
6144 (i386_dr_low_get_control): Declare.
6145 (i386_dr_low_get_status): Change prototype.
6146
6147 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6148 (i386_dr_low_get_addr): New.
6149 (i386_dr_low_get_control): New.
6150 (i386_dr_low_get_status): Adjust prototype. Return
6151 dr_status_mirror.
6152 (i386_initial_stuff): Clear dr_status_mirror and
6153 dr_control_mirror.
6154 (i386_get_thread_context): Adjust.
6155 (i386_set_thread_context): Adjust.
6156 (i386_thread_added): Adjust.
6157
5f21a75b
PA
61582010-08-24 Pedro Alves <pedro@codesourcery.com>
6159
6160 * linux-low.h (linux_thread_area): Delete declaration.
6161
3e4c1235
TS
61622010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6163
6164 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6165 after its termination.
6166
1971b033
PA
61672010-08-09 Pedro Alves <pedro@codesourcery.com>
6168
6169 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6170 (gdb_wants_all_stopped): Delete.
6171 (linux_wait_1): Don't call them.
6172 * server.c (handle_v_cont): Tag all threads as want-stopped.
6173 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6174 stopped as "client-wants-stopped".
6175
310444ac
PA
61762010-07-31 Pedro Alves <pedro@codesourcery.com>
6177
6178 * Makefile.in (signals_h): New.
6179 (server_h): Depend on it.
6180 (server.o): Don't depend on $(signals_def).
6181 (signals.o): Depend on $(signals_def).
6182
a19cae16
JK
61832010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6184
6185 * Makefile.in (signals_def): New.
6186 (server_h): Append include/gdb/signals.h and signals_def.
6187 (server.o): Append signals_def.
6188
30d50328
JK
61892010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6190
6191 * server.c (handle_target_event): Use target_signal_to_host for
6192 resume_info.sig initialization.
6193 * target.h (struct thread_resume) <sig>: New comment.
6194
5c3216e2
OS
61952010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6196
c6f46ca0
OS
6197 * server.c (handle_query): strcpy() the returned string from paddress()
6198 instead of sprintf().
5c3216e2
OS
6199 * utils.c (paddress): Return phex_nz().
6200
6bd31874
JB
62012010-07-07 Joel Brobecker <brobecker@adacore.com>
6202
6203 * server.c (handle_v_cont): Call mourn_inferior if process
6204 just exited.
6205 (myresume): Likewise.
6206
0fb4aa4b
PA
62072010-07-01 Pedro Alves <pedro@codesourcery.com>
6208
6209 Static tracepoints, and integration with UST.
6210
6211 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6212 * mem-break.c (uninsert_all_breakpoints)
6213 (reinsert_all_breakpoints): New.
6214 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6215 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6216 (gdb_agent_ust_loaded, helper_thread_id)
6217 (gdb_agent_helper_thread_id): New macros.
6218 (struct ipa_sym_addresses): Add addr_ust_loaded,
6219 addr_helper_thread_id, addr_cmd_buf.
6220 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6221 (in_process_agent_loaded_ust): New.
6222 (write_e_ust_not_loaded): New.
6223 (maybe_write_ipa_ust_not_loaded): New.
6224 (struct collect_static_trace_data_action): New.
6225 (enum tracepoint_type) <static_tracepoint>: New.
6226 (struct tracepoint) <handle>: Mention static tracepoints.
6227 (struct static_tracepoint_ctx): New.
6228 (CMD_BUF_SIZE): New.
6229 (add_tracepoint_action): Handle static tracepoint actions.
6230 (unprobe_marker_at): New.
6231 (clear_installed_tracepoints): Handle static tracepoints.
6232 (cmd_qtdp): Handle static tracepoints.
6233 (probe_marker_at): New.
6234 (cmd_qtstart): Handle static tracepoints.
6235 (response_tracepoint): Handle static tracepoints.
6236 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6237 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6238 (get_context_regcache): Handle static tracepoints.
6239 (do_action_at_tracepoint): Handle static tracepoint actions.
6240 (traceframe_find_block_type): Handle static trace data blocks.
6241 (traceframe_read_sdata): New.
6242 (download_tracepoints): Download static tracepoint actions.
6243 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6244 (GDB_PROBE_NAME): New.
6245 (ust_ops): New.
6246 (GET_UST_SYM): New.
6247 (USTF): New.
6248 (dlsym_ust): New.
6249 (ust_marker_to_static_tracepoint): New.
6250 (gdb_probe): New.
6251 (collect_ust_data_at_tracepoint): New.
6252 (gdb_ust_probe): New.
6253 (UNIX_PATH_MAX, SOCK_DIR): New.
6254 (gdb_ust_connect_sync_socket): New.
6255 (resume_thread, stop_thread): New.
6256 (run_inferior_command): New.
6257 (init_named_socket): New.
6258 (gdb_ust_socket_init): New.
6259 (cstr_to_hexstr): New.
6260 (next_st): New.
6261 (first_marker, next_marker): New.
6262 (response_ust_marker): New.
6263 (cmd_qtfstm, cmd_qtsstm): New.
6264 (unprobe_marker_at, probe_marker_at): New.
6265 (cmd_qtstmat, gdb_ust_thread): New.
6266 (gdb_ust_init): New.
6267 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6268 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6269 (ST_REGENTRY): New.
6270 (x86_64_st_collect_regmap): New.
6271 (X86_64_NUM_ST_COLLECT_GREGS): New.
6272 (AMD64_RIP_REGNUM): New.
6273 (supply_static_tracepoint_registers): New.
6274 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6275 (ST_REGENTRY): New.
6276 (i386_st_collect_regmap): New.
6277 (i386_NUM_ST_COLLECT_GREGS): New.
6278 (supply_static_tracepoint_registers): New.
6279 * server.c (handle_query): Handle qXfer:statictrace:read.
6280 <qSupported>: Report support for StaticTracepoints, and
6281 qXfer:statictrace:read features.
6282 * server.h (traceframe_read_sdata)
6283 (supply_static_tracepoint_registers): Declare.
6284 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6285 (unpack_varlen_hex): Include in IPA build.
6286 * Makefile.in (ustlibs, ustinc): New.
6287 (IPA_OBJS): Add remote-utils-ipa.o.
6288 ($(IPA_LIB)): Link -ldl and -lpthread.
6289 (UST_CFLAGS): New.
6290 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6291 * config.in, configure: Regenerate.
6292
9e4344e5
PA
62932010-06-20 Ian Lance Taylor <iant@google.com>
6294 Pedro Alves <pedro@codesourcery.com>
6295
6296 * linux-x86-low.c (always_true): Delete.
6297 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6298 trying to fool the compiler with always_true.
6299
c6beb2cb
PA
63002010-06-20 Pedro Alves <pedro@codesourcery.com>
6301
6302 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6303 conditions in gdbserver.
6304
d2ed6730
UW
63052010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6306
6307 * spu-low.c (spu_read_memory): Wrap around local store limit.
6308 (spu_write_memory): Likewise.
6309
4e29fb54
PA
63102010-06-15 Pedro Alves <pedro@codesourcery.com>
6311
6312 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6313 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6314 LONGEST uses.
6315 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6316 uses.
6317 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6318 uses with LONGEST uses.
6319
6a271cae
PA
63202010-06-14 Stan Shebs <stan@codesourcery.com>
6321 Pedro Alves <pedro@codesourcery.com>
6322
6323 Bytecode compiler.
6324
6325 * linux-x86-low.c: Include limits.h.
6326 (add_insns): New.
6327 (always_true): New.
6328 (EMIT_ASM): New.
6329 (EMIT_ASM32): New.
6330 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6331 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6332 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6333 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6334 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6335 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6336 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6337 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6338 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6339 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6340 (amd64_emit_void_call_2): New.
6341 (amd64_emit_ops): New.
6342 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6343 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6344 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6345 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6346 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6347 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6348 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6349 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6350 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6351 (i386_emit_stack_adjust, i386_emit_int_call_1)
6352 (i386_emit_void_call_2): New.
6353 (i386_emit_ops): New.
6354 (x86_emit_ops): New.
6355 (the_low_target): Install x86_emit_ops.
6356 * server.h (struct emit_ops): New.
6357 (get_raw_reg_func_addr): Declare.
6358 (current_insn_ptr, emit_error): Declare.
6359 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6360 (set_trace_state_variable_value): New defines.
6361 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6362 addr_get_trace_state_variable_value and
6363 addr_set_trace_state_variable_value.
6364 (symbol_list): New fields for get_raw_reg,
6365 get_trace_state_variable_value and set_trace_state_variable_value.
6366 (condfn): New typedef.
6367 (struct tracepoint): New field `compiled_cond'.
6368 (do_action_at_tracepoint): Clear compiled_cond.
6369 (get_trace_state_variable_value, set_trace_state_variable_value):
6370 Export in the IPA.
6371 (condition_true_at_tracepoint): If there's a compiled condition,
6372 run that.
6373 (current_insn_ptr, emit_error): New globals.
6374 (struct bytecode_address): New.
6375 (get_raw_reg_func_addr): New.
6376 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6377 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6378 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6379 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6380 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6381 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6382 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6383 (compile_tracepoint_condition, compile_bytecodes): New.
6384 * target.h (emit_ops): Forward declare.
6385 (struct target_ops): New field emit_ops.
6386 (target_emit_ops): New.
6387 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6388 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6389 * linux-low.c (linux_emit_ops): New.
6390 (linux_target_ops): Install it.
6391 * linux-low.h (struct linux_target_ops): New field emit_ops.
6392
92b72907
UW
63932010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6394
6395 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6396 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6397
fa593d66
PA
63982010-06-01 Pedro Alves <pedro@codesourcery.com>
6399 Stan Shebs <stan@codesourcery.com>
6400
6401 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6402 (all): Depend on $(extra_libraries).
6403 (install-only): Install the IPA.
6404 (IPA_OBJS, IPA_LIB): New.
6405 (clean): Remove the IPA lib.
6406 (IPAGENT_CFLAGS): New.
6407 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6408 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6409 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6410 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6411 * configure.ac: Check for atomic builtins support in the compiler.
6412 (IPA_DEPFILES, extra_libraries): Define.
6413 * configure.srv (ipa_obj): Add description.
6414 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6415 (i[34567]86-*-linux*): Set ipa_obj.
6416 (x86_64-*-linux*): Set ipa_obj.
6417 * linux-low.c (stabilizing_threads): New.
6418 (supports_fast_tracepoints): New.
6419 (linux_detach): Stabilize threads before detaching.
6420 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6421 the lwp is either not stabilizing, or is moving out of a jump pad.
6422 (linux_fast_tracepoint_collecting): New.
6423 (maybe_move_out_of_jump_pad): New.
6424 (enqueue_one_deferred_signal): New.
6425 (dequeue_one_deferred_signal): New.
6426 (linux_wait_for_event_1): If moving out of a jump pad, defer
6427 pending signals to later.
6428 (linux_stabilize_threads): New.
6429 (linux_wait_1): Check if threads need moving out of jump pads, and
6430 do it if so.
6431 (stuck_in_jump_pad_callback): New.
6432 (move_out_of_jump_pad_callback): New.
6433 (lwp_running): New.
6434 (linux_resume_one_lwp): Handle moving out of jump pads.
6435 (linux_set_resume_request): Dequeue deferred signals.
6436 (need_step_over_p): Also step over fast tracepoint jumps.
6437 (start_step_over): Also uninsert fast tracepoint jumps.
6438 (finish_step_over): Also reinsert fast tracepoint jumps.
6439 (linux_install_fast_tracepoint_jump): New.
6440 (linux_target_ops): Install linux_stabilize_threads and
6441 linux_install_fast_tracepoint_jump_pad.
6442 * linux-low.h (linux_target_ops) <get_thread_area,
6443 install_fast_tracepoint_jump_pad>: New fields.
6444 (struct lwp_info) <collecting_fast_tracepoint,
6445 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6446 (linux_get_thread_area): Declare.
6447 * linux-x86-low.c (jump_insn): New.
6448 (x86_get_thread_area): New.
6449 (append_insns): New.
6450 (push_opcode): New.
6451 (amd64_install_fast_tracepoint_jump_pad): New.
6452 (i386_install_fast_tracepoint_jump_pad): New.
6453 (x86_install_fast_tracepoint_jump_pad): New.
6454 (the_low_target): Install x86_get_thread_area and
6455 x86_install_fast_tracepoint_jump_pad.
6456 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6457 (struct fast_tracepoint_jump): New.
6458 (fast_tracepoint_jump_insn): New.
6459 (fast_tracepoint_jump_shadow): New.
6460 (find_fast_tracepoint_jump_at): New.
6461 (fast_tracepoint_jump_here): New.
6462 (delete_fast_tracepoint_jump): New.
6463 (set_fast_tracepoint_jump): New.
6464 (uninsert_fast_tracepoint_jumps_at): New.
6465 (reinsert_fast_tracepoint_jumps_at): New.
6466 (set_breakpoint_at): Use write_inferior_memory.
6467 (uninsert_raw_breakpoint): Use write_inferior_memory.
6468 (check_mem_read): Mask out fast tracepoint jumps.
6469 (check_mem_write): Mask out fast tracepoint jumps.
6470 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6471 (set_fast_tracepoint_jump): Declare.
6472 (delete_fast_tracepoint_jump)
6473 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6474 (reinsert_fast_tracepoint_jumps_at): Declare.
6475 * regcache.c: Don't compile many functions when building the
6476 in-process agent library.
6477 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6478 the register buffer in the heap.
6479 (free_register_cache): If the register buffer isn't owned by the
6480 regcache, don't free it.
6481 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6482 pre-existing register caches.
6483 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6484 type.
6485 (convert_ascii_to_int): : Constify `from' parameter type.
6486 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6487 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6488 the needed buffer in-place.
6489 (relocate_instruction): New.
6490 * server.c (handle_query) <qSymbols>: If the target supports
6491 tracepoints, give it a chance of looking up symbols. Report
6492 support for fast tracepoints.
6493 (handle_status): Stabilize threads.
6494 (process_serial_event): Adjust.
6495 * server.h (struct fast_tracepoint_jump): Forward declare.
6496 (struct process_info) <fast_tracepoint_jumps>: New field.
6497 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6498 (decode_X_packet, decode_M_packet): Adjust.
6499 (relocate_instruction): Declare.
6500 (in_process_agent_loaded): Declare.
6501 (tracepoint_look_up_symbols): Declare.
6502 (struct fast_tpoint_collect_status): Declare.
6503 (fast_tracepoint_collecting): Declare.
6504 (force_unlock_trace_buffer): Declare.
6505 (handle_tracepoint_bkpts): Declare.
6506 (initialize_low_tracepoint)
6507 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6508 * target.h (struct target_ops) <stabilize_threads,
6509 install_fast_tracepoint_jump_pad>: New fields.
6510 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6511 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6512 [HAVE_STDINT_H]: Include stdint.h.
6513 (trace_debug_1): Rename to ...
6514 (trace_vdebug): ... this.
6515 (trace_debug): Rename to ...
6516 (trace_debug_1): ... this. Add `level' parameter.
6517 (trace_debug): New.
6518 (ATTR_USED, ATTR_NOINLINE): New.
6519 (IP_AGENT_EXPORT): New.
6520 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6521 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6522 (about_to_request_buffer_space, trace_buffer_is_full)
6523 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6524 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6525 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6526 (traceframe_write_count, traceframes_created)
6527 (trace_state_variables)
6528 New renaming defines.
6529 (struct ipa_sym_addresses): New.
6530 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6531 (symbol_list): New.
6532 (ipa_sym_addrs): New.
6533 (all_tracepoint_symbols_looked_up): New.
6534 (in_process_agent_loaded): New.
6535 (write_e_ipa_not_loaded): New.
6536 (maybe_write_ipa_not_loaded): New.
6537 (tracepoint_look_up_symbols): New.
6538 (debug_threads) [IN_PROCESS_AGENT]: New.
6539 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6540 (UNKNOWN_SIDE_EFFECTS): New.
6541 (stop_tracing): New.
6542 (flush_trace_buffer): New.
6543 (stop_tracing_bkpt): New.
6544 (flush_trace_buffer_bkpt): New.
6545 (read_inferior_integer): New.
6546 (read_inferior_uinteger): New.
6547 (read_inferior_data_pointer): New.
6548 (write_inferior_data_pointer): New.
6549 (write_inferior_integer): New.
6550 (write_inferior_uinteger): New.
6551 (struct collect_static_trace_data_action): Delete.
6552 (enum tracepoint_type): New.
6553 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6554 <actions_str, step_actions, step_actions_str>: Only include in
6555 GDBserver.
fa593d66
PA
6556 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6557 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6558 (tracepoints): Use IP_AGENT_EXPORT.
6559 (last_tracepoint): Don't include in the IPA.
6560 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6561 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6562 (alloced_trace_state_variables): New.
6563 (trace_state_variables): Use IP_AGENT_EXPORT.
6564 (traceframe_t): Delete unused variable.
6565 (circular_trace_buffer): Don't include in the IPA.
6566 (trace_buffer_start): Delete.
6567 (struct trace_buffer_control): New.
6568 (trace_buffer_free): Delete.
6569 (struct ipa_trace_buffer_control): New.
6570 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6571 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6572 New.
6573 (trace_buffer_ctrl): New.
6574 (TRACE_BUFFER_CTRL_CURR): New.
6575 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6576 Reimplement as macros.
6577 (trace_buffer_wrap): Delete.
6578 (traceframe_write_count, traceframe_read_count)
6579 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6580 (struct tracepoint_hit_ctx) <type>: New field.
6581 (struct fast_tracepoint_ctx): New.
6582 (memory_barrier): New.
6583 (cmpxchg): New.
6584 (record_tracepoint_error): Update atomically in the IPA.
6585 (clear_inferior_trace_buffer): New.
6586 (about_to_request_buffer_space): New.
6587 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6588 updating the same buffer.
6589 (add_tracepoint): Default the tracepoint's type to trap
6590 tracepoint, and orig_size to -1.
6591 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6592 internal variables.
6593 (create_trace_state_variable): New parameter `gdb'. Handle it.
6594 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6595 (cmd_qtdp): Handle fast tracepoints.
6596 (cmd_qtdv): Adjust.
6597 (max_jump_pad_size): New.
6598 (gdb_jump_pad_head): New.
6599 (get_jump_space_head): New.
6600 (claim_jump_space): New.
6601 (sort_tracepoints): New.
6602 (MAX_JUMP_SIZE): New.
6603 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6604 IPA.
6605 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6606 support. Upload fast traceframes, and delete internal IPA
6607 breakpoints.
6608 (stop_tracing_handler): New.
6609 (flush_trace_buffer_handler): New.
6610 (cmd_qtstop): Upload fast tracepoints.
6611 (response_tracepoint): Handle fast tracepoints.
6612 (tracepoint_finished_step): Upload fast traceframes. Set the
6613 tracepoint hit context's tracepoint type.
6614 (handle_tracepoint_bkpts): New.
6615 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6616 type. Add comment about fast tracepoints.
6617 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6618 non-existing action_str field.
6619 (get_context_regcache): Handle fast tracepoints.
6620 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6621 to the regcache.
6622 (fast_tracepoint_from_jump_pad_address): New.
6623 (fast_tracepoint_from_ipa_tpoint_address): New.
6624 (collecting_t): New.
6625 (force_unlock_trace_buffer): New.
6626 (fast_tracepoint_collecting): New.
6627 (collecting): New.
6628 (gdb_collect): New.
6629 (write_inferior_data_ptr): New.
6630 (target_tp_heap): New.
6631 (target_malloc): New.
6632 (download_agent_expr): New.
6633 (UALIGN): New.
6634 (download_tracepoints): New.
6635 (download_trace_state_variables): New.
6636 (upload_fast_traceframes): New.
6637 (IPA_FIRST_TRACEFRAME): New.
6638 (IPA_NEXT_TRACEFRAME_1): New.
6639 (IPA_NEXT_TRACEFRAME): New.
6640 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6641 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6642 (gdb_jump_pad_buffer_end): New.
6643 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6644 (initialize_tracepoint): Adjust.
6645 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6646 buffer. Initialize the low module.
6647 * utils.c (PREFIX, TOOLNAME): New.
6648 (malloc_failure): Use PREFIX.
6649 (error): In the IPA, an error causes an exit.
6650 (fatal, warning): Use PREFIX.
6651 (internal_error): Use TOOLNAME.
6652 (NUMCELLS): Increase to 10.
6653 * configure, config.in: Regenerate.
6654
d149dd1d
PA
66552010-06-01 Pedro Alves <pedro@codesourcery.com>
6656
6657 * server.c (handle_query) <qSupported>: Do two passes over the
6658 qSupported string to avoid nesting strtok.
6659
f6528abd
JK
66602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6661
6662 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6663 (CDEPS): New.
6664 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6665 -Wl,--dynamic-list.
6666 * configure: Regenerate.
6667 * proc-service.list: New.
6668
ca2a87a0
JK
66692010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6670
6671 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6672 New comment.
6673
363a6e9f
OS
66742010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6675
6676 * gdbreplay.c (remote_open): Check error return from socket() call by
6677 its equality to -1 not by it being negative.
6678 * remote-utils.c (remote_open): Likewise.
6679
d23b6cb1
PA
66802010-05-23 Pedro Alves <pedro@codesourcery.com>
6681
6682 * config.h: Regenerate.
6683
28d3cf85
MK
66842010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6685
6686 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6687 doesn't provide PTRACE_GET_THREAD_AREA.
6688
fea36a59
MK
66892010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6690
6691 * linux-m68k-low.c: Include <asm/ptrace.h>
6692 (ps_get_thread_area): Implement.
6693
24b066ba
DE
66942010-05-03 Doug Evans <dje@google.com>
6695
6696 * event-loop.c (struct callback_event): New struct.
6697 (callback_list): New global.
6698 (append_callback_event, delete_callback_event): New functions.
6699 (process_callback): New function.
6700 (start_event_loop): Call it.
6701 * remote-utils.c (NOT_SCHEDULED): Define.
6702 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6703 moved out of readchar.
6704 (readchar): Rewrite. Call reschedule before returning.
6705 (reset_readchar): New function.
6706 (remote_close): Call it.
6707 (process_remaining, reschedule): New functions.
6708 * server.h (callback_handler_func): New typedef.
6709 (append_callback_event, delete_callback_event): Declare.
6710
9836d6ea
PA
67112010-05-03 Pedro Alves <pedro@codesourcery.com>
6712
6713 * proc-service.c (ps_pglobal_lookup): Use
6714 thread_db_look_up_one_symbol.
6715 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6716 parameter. Use it instead of all_symbols_looked_up.
6717 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6718 field.
6719 (all_symbols_looked_up): Don't declare.
6720 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6721 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6722 field.
6723 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6724 Set all_symbols_looked_up here.
6725 (thread_db_look_up_one_symbol): New.
6726 (thread_db_get_tls_address): Adjust.
6727 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6728 thread_db object on the heap, and tentatively set it in the
6729 process structure.
6730 (thread_db_init): Don't set all_symbols_looked_up here.
6731 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6732
7984d532
PA
67332010-05-03 Pedro Alves <pedro@codesourcery.com>
6734
6735 * linux-low.c (linux_kill, linux_detach): Adjust.
6736 (status_pending_p_callback): Remove redundant statement. Check
6737 for !TARGET_WAITIKIND_IGNORE, instead of
6738 TARGET_WAITKIND_STOPPED.
6739 (handle_tracepoints): Make sure LWP is locked. Adjust.
6740 (linux_wait_for_event_1): Adjust.
6741 (linux_cancel_breakpoints): New.
6742 (unsuspend_one_lwp): New.
6743 (unsuspend_all_lwps): New.
6744 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6745 (send_sigstop_callback): Change return type to int, add new
6746 `except' parameter and handle it.
6747 (suspend_and_send_sigstop_callback): New.
6748 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6749 pass them down. If SUSPEND, also increment the lwp's suspend
6750 count.
6751 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6752 (need_step_over_p): Don't consider suspended LWPs.
6753 (start_step_over): Adjust.
6754 (proceed_one_lwp): Change return type to int, add new `except'
6755 parameter and handle it.
6756 (unsuspend_and_proceed_one_lwp): New.
6757 (proceed_all_lwps): Use find_inferior instead of
6758 for_each_inferior.
6759 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6760 also decrement the suspend count of LWPs. Pass `except' down,
6761 instead of hacking its suspend count.
6762 (linux_pause_all): Add `freeze' parameter. Adjust.
6763 (linux_unpause_all): New.
6764 (linux_target_ops): Install linux_unpause_all.
6765 * server.c (handle_status): Adjust.
6766 * target.h (struct target_ops): New fields `unpause_all' and
6767 `cancel_breakpoints'. Add new parameter to `pause_all'.
6768 (pause_all): Add new `freeze' parameter.
6769 (unpause_all): New.
6770 (cancel_breakpoints): New.
6771 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6772 cancel breakpoints.
6773 (cmd_qtstart): Pause threads.
6774 (stop_tracing): Pause threads, and cancel breakpoints.
6775 * win32-low.c (win32_target_ops): Adjust.
6776
e471f25b
PA
67772010-05-03 Pedro Alves <pedro@codesourcery.com>
6778
6779 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6780 the inferior right away from here...
6781 (linux_wait_1): ... to here, and adjust to check the thread's
6782 last_resume_kind instead of the lwp's step or stop_expected flags.
6783
1915ef4f
PA
67842010-05-02 Pedro Alves <pedro@codesourcery.com>
6785
6786 * README: Use consistent `GDB' and `GDBserver' spellings.
6787
f9e39928
PA
67882010-05-02 Pedro Alves <pedro@codesourcery.com>
6789
6790 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6791 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6792 (linux_detach_one_lwp): Assume the lwp is stopped.
6793 (any_thread_of): Delete.
6794 (linux_detach): Stop all lwps here. Don't blindly delete all
6795 breakpoints.
6796 (delete_lwp_callback): New.
6797 (linux_mourn): Delete all lwps of the process that is gone.
6798 (linux_wait_1): Don't delete the last lwp of the process here.
6799 * mem-break.h (mark_breakpoints_out): Declare.
6800 * mem-break.c (mark_breakpoints_out): New.
6801 (free_all_breakpoints): Use it.
6802 * server.c (handle_target_event): If the process is gone, mark
6803 breakpoints out.
6804 * thread-db.c (struct thread_db) <create_bp>: New field.
6805 (thread_db_enable_reporting): Fix prototype. Store a thread event
6806 breakpoint reference in the thread_db struct.
6807 (thread_db_load_search): Clear the thread_db object.
6808 (try_thread_db_load_1): Ditto.
6809 (switch_to_process): New.
6810 (disable_thread_event_reporting): Use it.
6811 (remove_thread_event_breakpoints): New.
6812 (thread_db_detach, thread_db_mourn): Use it.
6813
1e7fc18c
PA
68142010-05-01 Pedro Alves <pedro@codesourcery.com>
6815
6816 * linux-low.c (linux_enable_event_reporting): New.
6817 (linux_wait_for_event_1, handle_extended_wait): Use it.
6818
02fc4de7
PA
68192010-04-30 Pedro Alves <pedro@codesourcery.com>
6820
6821 * linux-low.c (linux_kill_one_lwp, linux_kill)
6822 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6823 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6824 SIGSTOP even if the LWP is stopped.
6825 (send_sigstop_callback): New.
6826 (stop_all_lwps): Use send_sigstop_callback instead.
6827 (linux_resume_one_thread): Adjust.
6828 (proceed_one_lwp): Still proceed an LWP that the client has
6829 requested to stop, if we haven't reported it as stopped yet. Make
6830 sure that LWPs the client want stopped, have a pending SIGSTOP.
6831
bc3b5632
DE
68322010-04-26 Doug Evans <dje@google.com>
6833
ae1ada35
DE
6834 * server.c (handle_general_set): Make static.
6835
bc3b5632
DE
6836 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6837 Print received char after testing for error/eof instead of before.
6838 (input_interrupt): Tweak comment.
6839
65730243
DE
68402010-04-23 Doug Evans <dje@google.com>
6841
6842 * server.c (start_inferior): Print inferior argv if --debug.
6843
a8ae7dc0
AR
68442010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6845
6846 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6847 * nto-x86-low.c: Include server.h
6848
1c07cc19
PM
68492010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6850
6851 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6852 be consistent with other sources of this directory.
6853 (init_registers_amd64): Correct name of source file of this function
6854 in the comment.
6855
e0a61e09
PM
68562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6857
6858 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6859 64-bit executables.
6860
54709339
PM
68612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6862
6863 * win32-i386-low.c: Add 64-bit support.
6864 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6865 (init_registers_amd64): Declare.
6866 (mappings): Add 64-bit version of array.
6867 (init_windows_x86): New function.
6868 (the_low_target): Change init_arch field to init_windows_x86.
6869
e8f0053d
PM
68702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6871
6872 * win32-low.c: Adapt to support also 64-bit architecture.
6873 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6874 (get_image_name): Use SIZE_T type for local variable `done'.
6875 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6876 (toolhelp_get_dll_name): Idem.
6877 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6878 Use uintptr_t typecast to avoid warning.
6879 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6880 (handle_exception): Use phex_nz to avoid warning.
6881 (win32_wait): Remove unused local variable `process'.
6882
c481e77e
PM
68832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6884
6885 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6886 `amd64-avx.o'.
6887
12ea4b69
PM
68882010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6889
6890 * configure.ac: Use `ws2_32' library for srv_mingw.
6891 * configure: Regenerate.
6892 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6893 * remote-utils.c: Likewise.
6894
f6d1620c
L
68952010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6896
6897 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6898 if __x86_64__ is defined.
6899
8e642873
PM
69002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6901
6902 * configure: Regenerate.
6903
711e434b
PM
69042010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6905
6906 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6907 * target.h (target_ops): New get_tib_address field.
6908 * win32-low.h (win32_thread_info): Add thread_local_base field.
6909 * win32-low.c (child_add_thread): Add tlb argument.
6910 Set thread_local_base field to TLB.
6911 (get_child_debug_event): Adapt to child_add_thread change.
6912 (win32_get_tib_address): New function.
6913 (win32_target_ops): Set get_tib_address field to
6914 win32_get_tib_address.
6915 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6916
505106cd
PA
69172010-04-12 Pedro Alves <pedro@codesourcery.com>
6918
505106cd
PA
6919 * linux-low.c (linux_mourn): Also remove the process.
6920 * server.c (handle_target_event): Don't remove the process here.
6921 * nto-low.c (nto_mourn): New.
6922 (nto_target_ops): Install it.
6923 * spu-low.c (spu_mourn): New.
6924 (spu_target_ops): Install it.
6925 * win32-low.c (win32_mourn): New.
6926 (win32_target_ops): Install it.
6927
e8470a06
PA
69282010-04-12 Pedro Alves <pedro@codesourcery.com>
6929
6930 * server.h (buffer_xml_printf): Remove redundant `;'.
6931
45ba0d02
PA
69322010-04-12 Pedro Alves <pedro@codesourcery.com>
6933
6934 * regcache.c (set_register_cache): Invalidate regcaches before
6935 changing the register cache layout.
6936 (regcache_invalidate_one): Allow a NULL regcache.
6937 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6938 regcaches before changing the register cache layout or the target
6939 regsets.
6940
59e04013
L
69412010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6942
6943 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6944 variable warning on Linux/x86-64.
6945
8336d594
PA
69462010-04-11 Pedro Alves <pedro@codesourcery.com>
6947
6948 GDBserver disconnected tracing support.
6949
6950 * linux-low.c (linux_remove_process): Delete.
6951 (add_lwp): Don't set last_resume_kind here.
6952 (linux_kill): Use `mourn'.
6953 (linux_detach): Use `thread_db_detach', and `mourn'.
6954 (linux_mourn): New.
6955 (linux_attach_lwp_1): Adjust comment.
6956 (linux_attach): last_resume_kind moved the thread_info; adjust.
6957 (status_pending_p_callback): Adjust.
6958 (linux_wait_for_event_1): Adjust.
6959 (count_events_callback, select_singlestep_lwp_callback)
6960 (select_event_lwp_callback, cancel_breakpoints_callback)
6961 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6962 (proceed_one_lwp): Adjust.
6963 (linux_async): Add debug output.
6964 (linux_thread_stopped): New.
6965 (linux_pause_all): New.
6966 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6967 linux_pause_all.
6968 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6969 (thread_db_free): Delete declaration.
6970 (thread_db_detach, thread_db_mourn): Declare.
6971 * thread-db.c (thread_db_init): Use thread_db_mourn.
6972 (thread_db_free): Delete, split in two.
6973 (disable_thread_event_reporting): New.
6974 (thread_db_detach): New.
6975 (thread_db_mourn): New.
6976
6977 * server.h (struct thread_info) <last_resume_kind>: New field.
6978 <attached>: Add comment.
6979 <gdb_detached>: New field.
6980 (handler_func): Change return type to int.
6981 (handle_serial_event, handle_target_event): Ditto.
6982 (gdb_connected): Declare.
6983 (tracing): Delete.
6984 (disconnected_tracing): Declare.
6985 (stop_tracing): Declare.
6986
6987 * server.c (handle_query) <qSupported>: Report support for
6988 disconnected tracing.
6989 (queue_stop_reply_callback): Account for running threads.
6990 (gdb_wants_thread_stopped): New.
6991 (gdb_wants_all_threads_stopped): New.
6992 (gdb_reattached_process): New.
6993 (handle_status): Clear the `gdb_detached' flag of all processes.
6994 In all-stop, stop all threads.
6995 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6996 (process_serial_event): If the remote connection breaks, or if an
6997 exit was forced with "monitor exit", force an event loop exit.
6998 Handle disconnected tracing on detach.
6999 (handle_serial_event): Adjust.
7000 (handle_target_event): If GDB isn't connected, forward events back
7001 to the inferior, unless the last process exited, in which case,
7002 exit gdbserver. Adjust interface.
7003
7004 * remote-utils.c (remote_open): Don't block in accept. Instead
7005 register an event loop source on the listen socket file
7006 descriptor. Refactor bits into ...
7007 (listen_desc): ... this new global.
7008 (gdb_connected): ... this new function.
7009 (enable_async_notification): ... this new function.
7010 (handle_accept_event): ... this new function.
7011 (remote_close): Clear remote_desc.
7012
7013 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7014
7015 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7016 New fields.
7017 (mourn_inferior): Define.
7018 (target_process_qsupported): Avoid the dangling else problem.
7019 (thread_stopped): Define.
7020 (pause_all): Define.
7021 (target_waitstatus_to_string): Declare.
7022 * target.c (target_waitstatus_to_string): New.
7023
7024 * tracepoint.c (tracing): Make extern.
7025 (disconnected_tracing): New.
7026 (stop_tracing): Make extern. Handle tracing stops due to GDB
7027 disconnecting.
7028 (cmd_qtdisconnected): New.
7029 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7030 (handle_tracepoint_general_set): Handle QTDisconnected.
7031
7032 * event-loop.c (event_handler_func): Change return type to int.
7033 (process_event): Bail out if the event handler wants the event
7034 loop to stop.
7035 (handle_file_event): Ditto.
7036 (start_event_loop): Bail out if the event handler wants the event
7037 loop to stop.
7038
7039 * nto-low.c (nto_target_ops): Adjust.
7040 * spu-low.c (spu_wait): Don't remove the process here.
7041 (spu_target_ops): Adjust.
7042 * win32-low.c (win32_wait): Don't remove the process here.
7043 (win32_target_ops): Adjust.
7044
5d267c4c
PA
70452010-04-11 Pedro Alves <pedro@codesourcery.com>
7046
7047 * regcache.c (realloc_register_cache): Invalidate inferior's
7048 regcache before recreating it.
7049
623ccd72
PA
70502010-04-09 Pedro Alves <pedro@codesourcery.com>
7051
7052 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7053
219f2f23
PA
70542010-04-09 Stan Shebs <stan@codesourcery.com>
7055 Pedro Alves <pedro@codesourcery.com>
7056
7057 * server.h (LONGEST): New.
7058 (struct thread_info) <while_stepping>: New field.
7059 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7060 Declare.
7061 (initialize_tracepoint, handle_tracepoint_general_set)
7062 (handle_tracepoint_query, tracepoint_finished_step)
7063 (tracepoint_was_hit, release_while_stepping_state_list):
7064 (current_traceframe): Declare.
7065 * server.c (handle_general_set): Handle tracepoint packets.
7066 (read_memory): New.
7067 (write_memory): New.
7068 (handle_search_memory_1): Use read_memory.
7069 (handle_query): Report support for conditional tracepoints, trace
7070 state variables, and tracepoint sources. Handle tracepoint
7071 queries.
7072 (main): Initialize the tracepoints module.
7073 (process_serial_event): Handle traceframe reads/writes.
7074
7075 * linux-low.c (handle_tracepoints): New.
7076 (linux_wait_1): Call it.
7077 (linux_resume_one_lwp): Handle while-stepping.
7078 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7079 (linux_target_ops): Install them.
7080 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7081 New field.
7082 * linux-x86-low.c (x86_supports_tracepoints): New.
7083 (the_low_target). Install it.
7084
7085 * mem-break.h (delete_breakpoint): Declare.
7086 * mem-break.c (delete_breakpoint): Make external.
7087
7088 * target.h (struct target_ops): Add `supports_tracepoints',
7089 `read_pc', and `write_pc' fields.
7090 (target_supports_tracepoints): Define.
7091 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7092 (phex_nz): New.
7093
7094 * regcache.h (struct regcache) <registers_owned>: New field.
7095 (init_register_cache, regcache_cpy): Declare.
7096 (regcache_read_pc, regcache_write_pc): Declare.
7097 (register_cache_size): Declare.
7098 (supply_regblock): Declare.
7099 * regcache.c (init_register_cache): New.
7100 (new_register_cache): Use it.
7101 (regcache_cpy): New.
7102 (register_cache_size): New.
7103 (supply_regblock): New.
7104 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7105
219f2f23
PA
7106 * tracepoint.c: New.
7107
7108 * Makefile.in (OBS): Add tracepoint.o.
7109 (tracepoint.o): New rule.
7110
3a13a53b
L
71112010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7112
7113 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7114 (i386-mmx.o): New.
7115 (i386-mmx.c): Likewise.
7116 (i386-mmx-linux.o): Likewise.
7117 (i386-mmx-linux.c): Likewise.
7118
7119 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7120 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7121 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7122 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7123
7124 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7125 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7126 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7127
1570b33e
L
71282010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7129
7130 * Makefile.in (clean): Updated.
7131 (i386-avx.o): New.
7132 (i386-avx.c): Likewise.
7133 (i386-avx-linux.o): Likewise.
7134 (i386-avx-linux.c): Likewise.
7135 (amd64-avx.o): Likewise.
7136 (amd64-avx.c): Likewise.
7137 (amd64-avx-linux.o): Likewise.
7138 (amd64-avx-linux.c): Likewise.
7139
7140 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7141 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7142 (srv_amd64_regobj): Add amd64-avx.o.
7143 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7144 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7145 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7146 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7147 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7148 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7149 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7150
7151 * i387-fp.c: Include "i386-xstate.h".
7152 (i387_xsave): New.
7153 (i387_cache_to_xsave): Likewise.
7154 (i387_xsave_to_cache): Likewise.
7155 (x86_xcr0): Likewise.
7156
7157 * i387-fp.h (i387_cache_to_xsave): Likewise.
7158 (i387_xsave_to_cache): Likewise.
7159 (x86_xcr0): Likewise.
7160
7161 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7162 * linux-crisv32-low.c (target_regsets): Likewise.
7163 * linux-m68k-low.c (target_regsets): Likewise.
7164 * linux-mips-low.c (target_regsets): Likewise.
7165 * linux-ppc-low.c (target_regsets): Likewise.
7166 * linux-s390-low.c (target_regsets): Likewise.
7167 * linux-sh-low.c (target_regsets): Likewise.
7168 * linux-sparc-low.c (target_regsets): Likewise.
7169 * linux-xtensa-low.c (target_regsets): Likewise.
7170
7171 * linux-low.c: Include <sys/uio.h>.
7172 (regsets_fetch_inferior_registers): Support nt_type.
7173 (regsets_store_inferior_registers): Likewise.
7174 (linux_process_qsupported): New.
7175 (linux_target_ops): Add linux_process_qsupported.
7176
7177 * linux-low.h (regset_info): Add nt_type.
7178 (linux_target_ops): Add process_qsupported.
7179
7180 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7181 and <sys/uio.h>.
7182 (init_registers_i386_avx_linux): New.
7183 (init_registers_amd64_avx_linux): Likewise.
7184 (xmltarget_i386_linux_no_xml): Likewise.
7185 (xmltarget_amd64_linux_no_xml): Likewise.
7186 (PTRACE_GETREGSET): Likewise.
7187 (PTRACE_SETREGSET): Likewise.
7188 (x86_fill_xstateregset): Likewise.
7189 (x86_store_xstateregset): Likewise.
7190 (use_xml): Likewise.
7191 (x86_linux_update_xmltarget): Likewise.
7192 (x86_linux_process_qsupported): Likewise.
7193 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7194 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7195 init_registers_i386_linux here. Call
7196 x86_linux_update_xmltarget.
7197 (the_low_target): Add x86_linux_process_qsupported.
7198
7199 * server.c (handle_query): Call target_process_qsupported.
7200
7201 * target.h (target_ops): Add process_qsupported.
7202 (target_process_qsupported): New.
7203
fc7238bb
PA
72042010-04-03 Pedro Alves <pedro@codesourcery.com>
7205
7206 * inferiors.c (add_thread): Set last_status kind to
7207 TARGET_WAITKIND_IGNORE.
7208 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7209 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7210 (linux_wait_1): Move `thread' local definition to block that uses
7211 it. Don't NULL initialize `event_child'.
7212 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7213 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7214 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7215
bdabb078
PA
72162010-04-01 Pedro Alves <pedro@codesourcery.com>
7217
7218 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7219 an extended waitstatus, or by a watchpoint.
7220 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7221 thread was stepping or has been stopped by a watchpoint.
7222
d3bbe7a0
PA
72232010-04-01 Pedro Alves <pedro@codesourcery.com>
7224
7225 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7226 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7227 of another, then delete the previous, and validate all
7228 breakpoints.
7229 (validate_inserted_breakpoint): New.
7230 (delete_disabled_breakpoints): New.
7231 (validate_breakpoints): New.
7232 (check_mem_read): Validate breakpoints before trusting their
7233 shadow. Delete disabled breakpoints.
7234 (check_mem_write): Validate breakpoints before trusting they
7235 should be inserted. Delete disabled breakpoints.
7236 * mem-break.h (validate_breakpoints):
7237 * server.c (handle_query): Validate breakpoints when we see a
7238 qSymbol query.
7239
8b07ae33
PA
72402010-04-01 Pedro Alves <pedro@codesourcery.com>
7241
7242 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7243 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7244 if we could tell there's a GDB breakpoint at stop_pc.
7245 (need_step_over_p): Don't do a step over if we find a GDB
7246 breakpoint at the resume PC.
7247
7248 * mem-break.c (struct raw_breakpoint): New.
7249 (enum bkpt_type): New type `gdb_breakpoint'.
7250 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7251 fields. New field `raw'.
7252 (find_raw_breakpoint_at): New.
7253 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7254 breakpoint instead.
7255 (set_breakpoint_at): Adjust.
7256 (delete_raw_breakpoint): New.
7257 (release_breakpoint): New.
7258 (delete_breakpoint): Rename to...
7259 (delete_breakpoint_1): ... this. Add proc parameter. Use
7260 release_breakpoint. Return ENOENT.
7261 (delete_breakpoint): Reimplement.
7262 (find_breakpoint_at): Delete.
7263 (find_gdb_breakpoint_at): New.
7264 (delete_breakpoint_at): Delete.
7265 (set_gdb_breakpoint_at): New.
7266 (delete_gdb_breakpoint_at): New.
7267 (gdb_breakpoint_here): New.
7268 (set_reinsert_breakpoint): Use release_breakpoint.
7269 (uninsert_breakpoint): Rename to ...
7270 (uninsert_raw_breakpoint): ... this.
7271 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7272 (reinsert_raw_breakpoint): Change parameter type to
7273 raw_breakpoint.
7274 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7275 instead.
7276 (check_breakpoints): Adjust. Use release_breakpoint.
7277 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7278 (breakpoint_inserted_here): Ditto.
7279 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7280 Don't trust the breakpoint's shadow if it is not inserted.
7281 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7282 (delete_all_breakpoints): Adjust.
7283 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7284 use delete_breakpoint_1.
7285
7286 * mem-break.h (breakpoints_supported): Delete declaration.
7287 (set_gdb_breakpoint_at): Declare.
7288 (gdb_breakpoint_here): Declare.
7289 (delete_breakpoint_at): Delete.
7290 (delete_gdb_breakpoint_at): Declare.
7291
7292 * server.h (struct raw_breakpoint): Forward declare.
7293 (struct process_info): New field `raw_breakpoints'.
7294
7295 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7296 breakpoints.
7297
6bf5e0ba
PA
72982010-03-24 Pedro Alves <pedro@codesourcery.com>
7299
7300 * linux-low.c (status_pending_p_callback): Fix comment.
7301 (linux_wait_for_event_1): Move most of the internal breakpoint
7302 handling from here...
7303 (linux_wait_1): ... to here.
7304 (count_events_callback): New.
7305 (select_singlestep_lwp_callback): New.
7306 (select_event_lwp_callback): New.
7307 (cancel_breakpoints_callback): New.
7308 (select_event_lwp): New.
7309 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7310 priority to all LWPs that have had events that should be reported
7311 to the client. Cancel breakpoints when about to reporting the
7312 event to the client, not while stopping lwps. No longer cancel
7313 finished single-steps here.
7314 (cancel_finished_single_step): Delete.
7315 (cancel_finished_single_steps): Delete.
7316
414a389f
PA
73172010-03-24 Pedro Alves <pedro@codesourcery.com>
7318
7319 * mem-break.c (enum bkpt_type): New.
7320 (struct breakpoint): New field `type'.
7321 (set_breakpoint_at): Change return type to struct breakpoint
7322 pointer. Set type to `other_breakpoint' by default.
7323 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7324 in the breakpoint list.
7325 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7326 (reinsert_breakpoint): Rename to ...
7327 (reinsert_raw_breakpoint): ... this.
7328 (reinsert_breakpoints_at): Adjust.
7329 * mem-break.h (struct breakpoint): Declare.
7330 (set_breakpoint_at): Change return type to struct breakpoint
7331 pointer.
7332
2280c721
PA
73332010-03-24 Pedro Alves <pedro@codesourcery.com>
7334
7335 * server.c (handle_query): Assign, not compare.
7336
d50171e4
PA
73372010-03-24 Pedro Alves <pedro@codesourcery.com>
7338
7339 Teach linux gdbserver to step-over-breakpoints.
7340
7341 * linux-low.c (can_hardware_single_step): New.
7342 (supports_breakpoints): New.
7343 (handle_extended_wait): If stopping threads, read the stop pc of
7344 the new cloned LWP.
7345 (get_pc): New.
7346 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7347 low target doesn't support retrieving the PC.
7348 (add_lwp): Set last_resume_kind to resume_continue.
7349 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7350 (linux_attach): Don't clear stop_expected. Set the lwp's
7351 last_resume_kind to resume_stop.
7352 (linux_detach_one_lwp): Don't check for removed breakpoints.
7353 (check_removed_breakpoint): Delete.
7354 (status_pending_p): Rename to ...
7355 (status_pending_p_callback): ... this. Don't check for removed
7356 breakpoints. Don't consider threads that are stopped from GDB's
7357 perspective.
7358 (linux_wait_for_lwp): Always read the stop_pc here.
7359 (cancel_breakpoint): New.
7360 (step_over_bkpt): New global.
7361 (linux_wait_for_event_1): Implement stepping over breakpoints.
7362 (gdb_wants_lwp_stopped): New.
7363 (gdb_wants_all_stopped): New.
7364 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7365 single-step traps here. Store the thread's last reported target
7366 wait status.
7367 (send_sigstop): Don't clear stop_expected. Always set it,
7368 instead.
7369 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7370 (cancel_finished_single_step): New.
7371 (cancel_finished_single_steps): New.
7372 (wait_for_sigstop): Don't cancel finished single-step traps here.
7373 (linux_resume_one_lwp): Don't check for removed breakpoints.
7374 Don't set `step' on non-hardware step archs.
7375 (linux_set_resume_request): Ignore resume_stop requests if already
7376 stopping or stopped. Set the lwp's last_resume_kind.
7377 (resume_status_pending_p): Don't check for removed breakpoints.
7378 (need_step_over_p): New.
7379 (start_step_over): New.
7380 (finish_step_over): New.
7381 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7382 requests. Clear the thread's last reported target waitstatus.
7383 Don't use the `suspended' flag. Don't consider pending breakpoints.
7384 (linux_resume): Start a step-over if necessary.
7385 (proceed_one_lwp): New.
7386 (proceed_all_lwps): New.
7387 (unstop_all_lwps): New.
7388 * linux-low.h (struct lwp_info): Rewrite comment for the
7389 `suspended' flag. Add the `stop_pc' field. Delete the
7390 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7391 Add `'last_resume_kind' and `need_step_over' fields.
7392 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7393 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7394 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7395 (set_raw_breakpoint_at): New.
7396 (set_breakpoint_at): Rewrite to use it.
7397 (reinsert_breakpoint_handler): Delete.
7398 (set_reinsert_breakpoint): New.
7399 (reinsert_breakpoint_by_bp): Delete.
7400 (delete_reinsert_breakpoints): New.
7401 (uninsert_breakpoint): Rewrite.
7402 (uninsert_breakpoints_at): New.
7403 (reinsert_breakpoint): Rewrite.
7404 (reinsert_breakpoints_at): New.
7405 (check_breakpoints): Rewrite.
7406 (breakpoint_here): New.
7407 (breakpoint_inserted_here): New.
7408 (check_mem_read): Adjust.
7409 * mem-break.h (breakpoints_supported, breakpoint_here)
7410 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7411 (reinsert_breakpoint_by_bp): Delete declaration.
7412 (delete_reinsert_breakpoints): Declare.
7413 (reinsert_breakpoint): Delete declaration.
7414 (reinsert_breakpoints_at): Declare.
7415 (uninsert_breakpoint): Delete declaration.
7416 (uninsert_breakpoints_at): Declare.
7417 (check_breakpoints): Adjust prototype.
7418 * server.h: Adjust include order.
7419 (struct thread_info): Declare here. Add a `last_status' field.
7420
30ba68cb
MS
74212010-03-23 Michael Snyder <msnyder@vmware.com>
7422
7423 * server.c (crc32): New function.
7424 (handle_query): Add handling for 'qCRC:' request.
7425
b9a881c2
PA
74262010-03-23 Pedro Alves <pedro@codesourcery.com>
7427
7428 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7429 lwp had been stopped by a watchpoint.
7430
e92d13d5
PA
74312010-03-16 Pedro Alves <pedro@codesourcery.com>
7432
7433 * server.h (internal_error): Declare.
7434 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7435 * utils.c (internal_error): New function.
7436
64daa791
AS
74372010-03-15 Andreas Schwab <schwab@redhat.com>
7438
7439 * configure.srv: Fix typo setting srv_regobj.
7440
f52cd8cd
PA
74412010-03-15 Pedro Alves <pedro@codesourcery.com>
7442
7443 * linux-low.c (fetch_register): Avoid passing a non string literal
7444 format to `error'.
7445 (usr_store_inferior_registers): Ditto.
7446
93ae6fdc
PA
74472010-03-14 Pedro Alves <pedro@codesourcery.com>
7448
7449 * linux-low.c (linux_write_memory): Bail out early if peeking
7450 memory failed.
7451
c3adc08c
PA
74522010-03-14 Pedro Alves <pedro@codesourcery.com>
7453
7454 * linux-low.h (struct lwp_info): New fields
7455 `stopped_by_watchpoint' and `stopped_data_address'.
7456 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7457 here, and cache them in the lwp object.
7458 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7459 directly.
7460 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7461 field.
7462 (linux_stopped_by_watchpoint): Rewrite.
7463 (linux_stopped_data_address): Rewrite.
7464
bce522a2
PA
74652010-03-06 Simo Melenius <simo.melenius@iki.fi>
7466
7467 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7468 switching the current inferior, not before.
7469
90884b2b
L
74702010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7471
7472 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7473 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7474 i386-linux.c and amd64-linux.c.
7475 (reg-i386.o): Removed.
7476 (reg-i386.c): Likewise.
7477 (reg-i386-linux.o): Likewise.
7478 (reg-i386-linux.c): Likewise.
7479 (reg-x86-64.o): Likewise.
7480 (reg-x86-64.c): Likewise.
7481 (reg-x86-64-linux.o): Likewise.
7482 (reg-x86-64-linux.c): Likewise.
7483 (i386.o): New.
7484 (i386.c): Likewise.
7485 (i386-linux.o): Likewise.
7486 (i386-linux.c): Likewise.
7487 (amd64.o): Likewise.
7488 (amd64.c): Likewise.
7489 (amd64-linux.o): Likewise.
7490 (amd64-linux.c): Likewise.
7491
7492 * configure.srv (srv_i386_regobj): New.
7493 (srv_i386_linux_regobj): Likewise.
7494 (srv_amd64_regobj): Likewise.
7495 (srv_amd64_linux_regobj): Likewise.
7496 (srv_i386_32bit_xmlfiles): Likewise.
7497 (srv_i386_64bit_xmlfiles): Likewise.
7498 (srv_i386_xmlfiles): Likewise.
7499 (srv_amd64_xmlfiles): Likewise.
7500 (srv_i386_linux_xmlfiles): Likewise.
7501 (srv_amd64_linux_xmlfiles): Likewise.
7502 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7503 srv_xmlfiles to $srv_i386_xmlfiles.
7504 (i[34567]86-*-mingw32ce*): Likewise.
7505 (i[34567]86-*-mingw*): Likewise.
7506 (i[34567]86-*-nto*): Likewise.
7507 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7508 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7509 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7510 (x86_64-*-linux*): Likewise.
7511
7512 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7513 (init_registers_amd64_linux): New.
7514 (x86_arch_setup): Replace init_registers_x86_64_linux with
7515 init_registers_amd64_linux.
7516
193f13e6
MK
75172010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7518
7519 * configure.ac: Check for libdl. If it is not available link against
7520 static libthread_db.
7521 * configure: Regenerate.
7522
85d721b8
PA
75232010-02-22 Pedro Alves <pedro@codesourcery.com>
7524
7525 PR9605
7526
7527 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7528 handing a read watchpoint.
7529 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7530
6076632b
DE
75312010-02-12 Doug Evans <dje@google.com>
7532
7533 * linux-low.c (linux_supports_tracefork_flag): Document.
7534 (linux_look_up_symbols): Add comment.
7535
3327ccf7
L
75362010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7537
7538 * regcache.c (supply_register): Clear regcache if buf is NULL.
7539
0718675c 75402010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7541 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7542
7543 * inferiors.c (find_inferior): Add function documentation.
7544 (unloaded_dll): Handle the case where the unloaded dll has not
7545 been previously registered in the dll list.
7546
177321bd
DJ
75472010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7548
7549 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7550 (thumb2_breakpoint): New.
7551 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7552
2b009048
DJ
75532010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7554
7555 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7556 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7557 breakpoints.
7558
3be029c7
PA
75592010-01-21 Pedro Alves <pedro@codesourcery.com>
7560
7561 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7562
18f5de3b
JK
75632010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7564
7565 * linux-s390-low.c (s390_collect_ptrace_register)
7566 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7567
3743bb4f
DE
75682010-01-21 Doug Evans <dje@google.com>
7569
14ce3065
DE
7570 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7571 (PTRACE_ARG4_TYPE): New macro.
7572 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7573 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7574 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7575 (usr_store_inferior_registers): Ditto.
7576 (linux_read_memory, linux_write_memory): Ditto.
7577 (linux_test_for_tracefork): Ditto.
7578
3743bb4f
DE
7579 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7580 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7581
8b315be5
PA
75822010-01-21 Pedro Alves <pedro@codesourcery.com>
7583
7584 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7585 target.
7586
85492558
PA
75872010-01-21 Pedro Alves <pedro@codesourcery.com>
7588
7589 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7590 prototype to take a regcache. Adjust.
7591
442ea881
PA
75922010-01-20 Pedro Alves <pedro@codesourcery.com>
7593
7594 * regcache.h (struct thread_info): Forward declare.
7595 (struct regcache): New.
7596 (new_register_cache): Adjust prototype.
7597 (get_thread_regcache): Declare.
7598 (free_register_cache): Adjust prototype.
7599 (registers_to_string, registers_from_string): Ditto.
7600 (supply_register, supply_register_by_name, collect_register)
7601 (collect_register_as_string, collect_register_by_name): Ditto.
7602 * regcache.c (struct inferior_regcache_data): Delete.
7603 (get_regcache): Rename to ...
7604 (get_thread_regcache): ... this. Adjust. Switch inferior before
7605 fetching registers.
7606 (regcache_invalidate_one): Adjust.
7607 (regcache_invalidate): Fix prototype.
7608 (new_register_cache): Return the new register cache.
7609 (free_register_cache): Change prototype.
7610 (realloc_register_cache): Adjust.
7611 (registers_to_string): Change prototype to take a regcache. Adjust.
7612 (registers_from_string): Ditto.
7613 (register_data): Ditto.
7614 (supply_register): Ditto.
7615 (supply_register_by_name): Ditto.
7616 (collect_register): Ditto.
7617 (collect_register_as_string): Ditto.
7618 (collect_register_by_name): Ditto.
7619 * server.c (process_serial_event): Adjust.
7620 * linux-low.h (regset_fill_func, regset_store_func): Change
7621 prototype.
7622 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7623 Change prototype.
7624 * linux-low.c (get_stop_pc): Adjust.
7625 (check_removed_breakpoint): Adjust.
7626 (linux_wait_for_event): Adjust.
7627 (linux_resume_one_lwp): Adjust.
7628 (fetch_register): Add regcache parameter. Adjust.
7629 (usr_store_inferior_registers): Ditto.
7630 (regsets_fetch_inferior_registers): Ditto.
7631 (regsets_store_inferior_registers): Ditto.
7632 (linux_fetch_registers, linux_store_registers): Ditto.
7633 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7634 regcache. Adjust.
43aaf8b6
PA
7635 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7636 Ditto.
442ea881
PA
7637 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7638 prototype to take a regcache.
7639 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7640 * remote-utils.c (convert_ascii_to_int, outreg)
7641 (prepare_resume_reply): Change prototype to take a regcache.
7642 Adjust.
7643 * target.h (struct target_ops) <fetch_registers, store_registers>:
7644 Change prototype to take a regcache.
7645 (fetch_inferior_registers, store_inferior_registers): Change
7646 prototype to take a regcache. Adjust.
7647 * proc-service.c (ps_lgetregs): Adjust.
7648 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7649 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7650 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7651 take a regcache. Adjust.
7652 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7653 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7654 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7655 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7656 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7657 (cris_cannot_fetch_register):
7658 (cris_breakpoint_at): Change prototype to take a regcache.
7659 Adjust.
7660 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7661 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7662 to take a regcache. Adjust.
7663 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7664 Adjust.
7665 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7666 take a regcache. Adjust.
7667 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7668 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7669 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7670 * linux-mips-low.c (mips_get_pc):
7671 (mips_set_pc): Change prototype to take a regcache. Adjust.
7672 (mips_reinsert_addr): Adjust.
7673 (mips_collect_register): Change prototype to take a regcache.
7674 Adjust.
7675 (mips_supply_register):
7676 (mips_collect_register_32bit, mips_supply_register_32bit)
7677 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7678 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7679 * linux-ppc-low.c (ppc_supply_ptrace_register)
7680 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7681 (parse_spufs_run): Adjust.
7682 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7683 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7684 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7685 take a regcache. Adjust.
7686 * linux-s390-low.c (s390_collect_ptrace_register)
7687 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7688 (s390_set_pc): Change prototype to take a regcache. Adjust.
7689 (s390_arch_setup): Adjust.
7690 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7691 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7692 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7693 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7694 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7695 regcache. Adjust.
7696 (sparc_breakpoint_at): Adjust.
7697 * linux-xtensa-low.c (xtensa_fill_gregset):
7698 (xtensa_store_gregset):
7699 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7700 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7701 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7702 prototype to take a regcache. Adjust.
7703 * win32-arm-low.c (arm_fetch_inferior_register)
7704 (arm_store_inferior_register): Change prototype to take a
7705 regcache. Adjust.
7706 * win32-i386-low.c (i386_fetch_inferior_register)
7707 (i386_store_inferior_register): Change prototype to take a
7708 regcache. Adjust.
7709 * win32-low.c (child_fetch_inferior_registers)
7710 (child_store_inferior_registers): Change prototype to take a
7711 regcache. Adjust.
7712 (win32_wait): Adjust.
7713 (win32_fetch_inferior_registers): Change prototype to take a
7714 regcache. Adjust.
7715 (win32_store_inferior_registers): Adjust.
7716 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7717 store_inferior_register>: Change prototype to take a regcache.
7718
60c3d7b0
DE
77192010-01-20 Doug Evans <dje@google.com>
7720
7721 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7722 #ifdef.
7723 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7724 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7725
dc146f7c
VP
77262010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7727
7728 * linux-low.c (linux_core_of_thread): New.
7729 (compare_ints, show_process, list_threads): New.
7730 (linux_qxfer_osdata): Report threads and cores.
7731 (linux_target_op): Register linux_core_of_thread.
7732 * remote-utils.c (prepare_resume_reply): Report the core.
7733 (buffer_xml_printf): Support %d specifier.
7734 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7735 New.
7736 (handle_query): Handle qXfer:threads. Announce availability
7737 thereof.
7738 * target.h (struct target_ops): New field core_of_thread.
7739
7803799a
UW
77402010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7741
7742 * Makefile.in (clean): Remove new generated files.
7743 (reg-s390.o, reg-s390.c): Remove rules.
7744 (reg-s390x.o, reg-s390x.c): Likewise.
7745 (s390-linux32.o, s390-linux32.c): Add rules.
7746 (s390-linux64.o, s390-linux64.c): Likewise.
7747 (s390x-linux64.o, s390x-linux64.c): Likewise.
7748 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7749 * linux-s390-low.c: Include <elf.h>.
7750 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7751 (init_registers_s390): Remove prototype.
7752 (init_registers_s390x): Likewise.
7753 (init_registers_s390_linux32): Add prototype.
7754 (init_registers_s390_linux64): Likewise.
7755 (init_registers_s390x_linux64): Likewise.
7756 (s390_num_regs_3264): New define.
7757 (s390_regmap_3264): New global variable.
7758 (s390_cannot_fetch_register): Remove obsolete check.
7759 (s390_cannot_store_register): Likewise.
7760 (s390_collect_ptrace_register): Handle upper/lower register halves.
7761 (s390_supply_ptrace_register): Likewise.
7762 (s390_fill_gregset): Update to register number changes.
7763 (s390_get_hwcap): New routine.
7764 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7765 Install appropriate regmap and register set.
7766
6e7ffa39
JB
77672010-01-01 Joel Brobecker <brobecker@adacore.com>
7768
7769 * server.c (gdbserver_version): Update copyright year to 2010.
7770 * gdbreplay.c (gdbreplay_version): Likewise.
7771
957f3f49
DE
77722009-12-28 Doug Evans <dje@google.com>
7773
7774 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7775 elf/external.h. Include <elf.h> instead but only if necessary.
7776
ca5c370d
PA
77772009-12-28 Pedro Alves <pedro@codesourcery.com>
7778
7779 * linux-low.c (linux_remove_process): Remove `detaching'
7780 parameter. Don't release/detach from thread_db here.
7781 (linux_kill): Release/detach from thread_db here, ...
7782 (linux_detach): ... and here, before actually detaching.
7783 (linux_wait_1): ... and here, when a process exits.
7784 * thread-db.c (any_thread_of): New.
7785 (thread_db_free): Switch the current inferior to a thread of the
7786 passed in process.
7787
4ee62156
DE
77882009-12-21 Doug Evans <dje@google.com>
7789
d90e6a88
DE
7790 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7791
c5f62d5f
DE
7792 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7793 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7794 warning ifndef __NR_tkill. Move setting of errno there too.
7795 Delete unnecessary resetting of errno after syscall.
7796 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7797
10e86dd7
DE
7798 * configure.ac: Check for dladdr.
7799 * config.in: Regenerate.
7800 * configure: Regenerate.
7801 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7802 (try_thread_db_load): Update.
7803
4ee62156
DE
7804 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7805
00f515da
DE
78062009-12-18 Doug Evans <dje@google.com>
7807
e9464885
DE
7808 * event-loop.c: Include unistd.h if it exists.
7809
07d4f67e
DE
7810 * linux-low.c (my_waitpid): Move definition away from being in
7811 between linux_tracefork_child/linux_test_for_tracefork.
7812
00f515da
DE
7813 * gdb_proc_service.h (psaddr_t): Fix type.
7814 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7815 signature to match glibc.
7816
1de1badb
DE
78172009-12-16 Doug Evans <dje@google.com>
7818
7819 * linux-low.c (linux_read_memory): Fix argument to read.
7820
aeeb81d1
PA
78212009-11-26 Pedro Alves <pedro@codesourcery.com>
7822
7823 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7824 events, don't leave current_inferior pointing at null.
7825
10357975
PA
78262009-11-26 Pedro Alves <pedro@codesourcery.com>
7827
7828 * win32-low.c (LOG): Delete.
7829 (OUTMSG): Output to stderr.
7830 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7831 on compile time LOG macro.
7832 (win32_wait): Fix debug output.
7833
cf6e3471
PA
78342009-11-26 Pedro Alves <pedro@codesourcery.com>
7835
7836 * win32-low.c (win32_add_one_solib): If the dll name is
7837 "ntdll.dll", prepend the system directory to the dll path.
7838
0c85e18e
MK
78392009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7840
7841 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7842
9ac544ce 78432009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7844 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7845
7846 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7847 * configure.ac: Check for __mcoldfire__ and set
7848 gdb_cv_m68k_is_coldfire.
7849 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7850 reg-cf.o and reg-m68k.o.
7851 * configure: Regenerated.
7852
fd7dd3e6
PA
78532009-11-16 Pedro Alves <pedro@codesourcery.com>
7854
7855 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7856 Pass it to thread_db_free.
7857 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7858 proper `detaching' argument to linux_remove_process.
7859 * linux-low.h (thread_db_free): Add `detaching' parameter.
7860 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7861 to thread_db_free.
7862 (thread_db_free): Add `detaching' parameter. Only
7863 call td_ta_clear_event if detaching from process.
7864
75aa492e
MK
78652009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7866
7867 * thread-db.c (thread_db_free): Fix typo.
7868
21e1bee4
PP
78692009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7870
7871 PR gdb/10838
7872 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7873
8838b45e
NS
78742009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7875
7876 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7877 with an i686 compiler.
7878 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7879 needed.
7880 * configure: Rebuilt.
7881
8a35fb51
SL
78822009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7883
7884 PR gdb/10783
7885
7886 * server.c (handle_search_memory_1): Correct read_addr initialization
7887 in loop for searching subsequent chunks.
7888
96f15937
PP
78892009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7890
7891 * configure.ac: New --with-libthread-db option.
7892 * thread-db.c: Allow direct dependence on libthread_db.
7893 (thread_db_free): Adjust.
7894 * config.in: Regenerate.
7895 * configure: Likewise.
889bf7c5 7896
5f7d1694
PP
78972009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7898
7899 PR gdb/10757
7900 * thread-db.c (attach_thread): New function.
7901 (maybe_attach_thread): Return success/failure.
7902 (find_new_threads_callback): Adjust.
889bf7c5
PA
7903 (thread_db_find_new_threads): Loop until no new threads.
7904
88e3b899
PA
79052009-10-13 Pedro Alves <pedro@codesourcery.com>
7906
7907 * proc-service.c (ps_lgetregs): Formatting.
7908
cdbfd419
PP
79092009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7910
7911 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7912 * configure.ac: Adjust.
7913 * linux-low.h (struct process_info_private): Move members to struct
7914 thread_db.
7915 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7916 * linux-low.c (linux_remove_process): Adjust.
7917 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7918 * server.c (handle_query): Move code ...
7919 (handle_monitor_command): ... here. New function.
7920 * target.h (struct target_ops): New member.
7921 * thread-db.c (struct thread_db): New.
7922 (libthread_db_search_path): New variable.
7923 (thread_db_create_event, thread_db_enable_reporting)
7924 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7925 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7926 (try_thread_db_load_1, dladdr_to_soname): New functions.
7927 (try_thread_db_load, thread_db_load_search): New functions.
7928 (thread_db_init): Search for libthread_db.
7929 (thread_db_free): New function.
7930 (thread_db_handle_monitor_command): Likewise.
7931 * config.in: Regenerate.
7932 * configure: Regenerate.
889bf7c5 7933
4168d2d6
UW
79342009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7935
7936 * spu-low.c (spu_kill): Wait for inferior to terminate.
7937 Call clear_inferiors.
7938 (spu_detach): Call clear_inferiors.
7939
81ecdfbb
RW
79402009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7941
7942 * aclocal.m4: Regenerate.
7943 * config.in: Likewise.
7944 * configure: Likewise.
7945
0b9ff2c0
UW
79462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7947
7948 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7949 (parse_spufs_run): New function.
7950 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7951 (ppc_breakpoint_at): Handle SPU breakpoints.
7952
efcbbd14
UW
79532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7954
7955 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7956 (SPUFS_MAGIC): Define.
7957 (spu_enumerate_spu_ids): New function.
7958 (linux_qxfer_spu): New function.
7959 (linux_target_ops): Install linux_qxfer_spu.
7960
f4d9bade
UW
79612009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7962
7963 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7964 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7965 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7966 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7967 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7968 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7969 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7970 (init_registers_powerpc_cell32l): Add prototype.
7971 (init_registers_powerpc_cell64l): Likewise.
7972 (ppc_arch_setup): Detect Cell/B.E. architecture.
7973
96e946ca
RW
79742009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7975
7976 * Makefile.in (datarootdir): New variable.
7977
58d6951d
DJ
79782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7979
7980 * linux-low.c (linux_write_memory): Update debugging output.
7981 * Makefile.in (clean): Add new descriptions.
7982 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7983 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7984 * configure.srv: Add new files for arm*-*-linux*.
7985 * linux-arm-low.c: Add new declarations.
7986 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7987 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7988 (HWCAP_VFPv3D16): New.
7989 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7990 instead of __IWMMXT__.
7991 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7992 (arm_arch_setup): New.
7993 (target_regsets): Remove #ifdef. Add VFP regset.
7994 (the_low_target): Use arm_arch_setup.
7995
12b42a12
DJ
79962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7997
7998 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7999 the main thread again.
8000
ac8c974e
AR
80012009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8002
8003 Adding Neutrino gdbserver.
8004 * configure: Regenerated.
8005 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8006 * configure.srv (i[34567]86-*-nto*): New target.
8007 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8008 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8009 (nto_comctrl) [__QNX__]: New function.
8010 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8011
4424e0c3 80122009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8013
8014 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8015 srv_tgtobj.
8016
912cf4ba
PA
80172009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8018 Pedro Alves <pedro@codesourcery.com>
8019
8020 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8021 don't support CONTEXT_EXTENDED_REGISTERS.
8022 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8023 (the_low_target): Install them.
8024 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8025 failing with ERROR_PIPE_NOT_CONNECTED.
8026
aa5ca48f
DE
80272009-06-30 Doug Evans <dje@google.com>
8028 Pierre Muller <muller@ics.u-strasbg.fr>
8029
8030 Add h/w watchpoint support to x86-linux, win32-i386.
8031 * Makefile.in (SFILES): Add i386-low.c
8032 (i386_low_h): Define.
8033 (i386-low.o): Add dependencies.
8034 (linux-x86-low.o): Add i386-low.h dependency.
8035 (win32-i386-low.o): Ditto.
8036 * i386-low.c: New file.
8037 * i386-low.h: New file.
8038 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8039 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8040 * linux-low.c (linux_add_process): Initialize arch_private.
8041 (linux_remove_process): Free arch_private.
8042 (add_lwp): Initialize arch_private.
8043 (delete_lwp): Free arch_private.
8044 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8045 provided.
8046 * linux-low.h (process_info_private): New member arch_private.
8047 (lwp_info): New member arch_private.
8048 (linux_target_ops): New members new_process, new_thread,
8049 prepare_to_resume.
8050 (ptid_of): New macro.
8051 * linux-x86-low.c: Include stddef.h, i386-low.h.
8052 (arch_process_info): New struct.
8053 (arch_lwp_info): New struct.
8054 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8055 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8056 (i386_dr_low_get_status): New function.
8057 (x86_insert_point, x86_remove_point): New functions.
8058 (x86_stopped_by_watchpoint): New function.
8059 (x86_stopped_data_address): New function.
8060 (x86_linux_new_process, x86_linux_new_thread): New functions.
8061 (x86_linux_prepare_to_resume): New function.
8062 (the_low_target): Add entries for insert_point, remove_point,
8063 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8064 prepare_to_resume.
8065 * server.c (debug_hw_points): New global.
8066 (monitor_show_help): Document set debug-hw-points.
8067 (handle_query): Process "set debug-hw-points".
8068 * server.h (debug_hw_points): Declare.
8069 (paddress): Declare.
8070 * utils.c (NUMCELLS, CELLSIZE): New macros.
8071 (get_sell, xsnprintf, paddress): New functions.
8072 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8073 remove_point, stopped_by_watchpoint, stopped_data_address.
8074 * win32-i386-low.c: Include i386-low.h.
8075 (debug_reg_state): Replaces dr.
8076 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8077 (i386_dr_low_get_status): New function.
8078 (i386_insert_point, i386_remove_point): New functions.
8079 (i386_stopped_by_watchpoint): New function.
8080 (i386_stopped_data_address): New function.
8081 (i386_initial_stuff): Update.
8082 (get_thread_context,set_thread_context,i386_thread_added): Update.
8083 (the_low_target): Add entries for insert_point,
8084 remove_point, stopped_by_watchpoint, stopped_data_address.
8085 * win32-low.c (win32_insert_watchpoint): New function.
8086 (win32_remove_watchpoint): New function.
8087 (win32_stopped_by_watchpoint): New function.
8088 (win32_stopped_data_address): New function.
8089 (win32_target_ops): Add entries for insert_watchpoint,
8090 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8091 * win32-low.h (win32_target_ops): New members insert_point,
8092 remove_point, stopped_by_watchpoint, stopped_data_address.
8093
d993e290
PA
80942009-06-25 Pedro Alves <pedro@codesourcery.com>
8095
8096 * server.c (process_serial_event): Re-return unsupported, not
8097 error, if the type isn't recognized. Re-allow supporting only
8098 insert or remove packets. Also call require_running for
8099 breakpoints. Add missing break statement to default case. Tidy.
8100 * target.h (struct target_ops): Rename insert_watchpoint to
8101 insert_point, and remove_watchpoint to remove_point.
8102
8103 * linux-low.h (struct linux_target_ops): Likewise.
8104 * linux-low.c (linux_insert_watchpoint): Rename to ...
8105 (linux_insert_point): ... this. Adjust.
8106 (linux_remove_watchpoint): Rename to ...
8107 (linux_remove_point): ... this. Adjust.
8108 (linux_target_ops): Adjust.
8109 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8110 (cris_insert_point): ... this.
8111 (cris_remove_watchpoint): Rename to ...
8112 (cris_remove_point): ... this.
8113 (the_low_target): Adjust.
8114
0f54c268
PM
81152009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8116
8117 * server.c (handle_v_kill): Pass signal_pid to
8118 kill_inferior if multi_process is zero.
8119
c6314022
AR
81202009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8121
8122 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8123 * target.h (target_ops): Comment for *_watchpoint to make it clear
8124 the functions can get types '0' and '1'.
8125
4463ce24
AR
81262009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8127
8128 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8129 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8130 * regcache.c (get_regcache): Likewise.
8131 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8132 * win32-low.c (child_fetch_inferior_registers): Remove check for
8133 regno 0.
8134
cf8fd78b
PA
81352009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8136 Pedro Alves <pedro@codesourcery.com>
8137
8138 * target.h (struct target_ops) <supports_multi_process>: New
8139 callback.
8140 (target_supports_multi_process): New.
8141 * server.c (handle_query): Even if GDB reports support, only
8142 enable multi-process if the target also supports it. Report
8143 multi-process support only if the target backend supports it.
8144 * linux-low.c (linux_supports_multi_process): New function.
8145 (linux_target_ops): Install it as target_supports_multi_process
8146 callback.
8147
47c0c975
DE
81482009-05-24 Doug Evans <dje@google.com>
8149
e09875d4
DE
8150 Global renaming of find_thread_pid to find_thread_ptid.
8151 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8152 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8153 All callers updated.
8154
e27d73f6
DE
8155 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8156 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8157 directly.
8158
47c0c975
DE
8159 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8160 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8161 (linux_resume_one_lwp): Ditto.
8162
2acc282a
DE
81632009-05-23 Doug Evans <dje@google.com>
8164
8165 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8166 from struct inferior_list_entry * to struct lwp_info *.
8167 All callers updated.
8168
9f1036c1
DE
81692009-05-13 Doug Evans <dje@google.com>
8170
8171 * linux-x86-low.c: Don't include assert.h.
8172 (x86_siginfo_fixup): Use fatal, not assert.
8173 (x86_arch_setup): Fix comment.
8174
d0722149
DE
81752009-05-12 Doug Evans <dje@google.com>
8176
8177 Biarch support for i386/amd64 gdbserver.
8178 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8179 Add linux-x86-low.c.
8180 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8181 (linux-x86-low.o): Add.
8182 * linux-x86-64-low.c: Delete.
8183 * linux-i386-low.c: Delete.
8184 * linux-x86-low.c: New file.
8185 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8186 linux-x86-low.o.
8187 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8188 linux-x86-low.o.
8189 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8190 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8191 (linux_child_pid_to_exec_file): New function.
8192 (elf_64_header_p, elf_64_file_p): New functions.
8193 (siginfo_fixup): New function.
8194 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8195 give target a chance to convert layout.
8196 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8197 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8198
fdeb2a12
DE
81992009-05-07 Doug Evans <dje@google.com>
8200
8201 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8202 (regsets_store_inferior_registers): Ditto.
8203
a6dbe5df
PA
82042009-05-06 Pedro Alves <pedro@codesourcery.com>
8205
8206 PR server/10048
8207
8208 * linux-low.c (must_set_ptrace_flags): Delete.
8209 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8210 of the global.
8211 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8212 `lwp->must_set_ptrace_flags' instead.
ba42693b 8213 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8214 (linux_wait_1): ... not here.
8215
5091eb23
DE
82162009-04-30 Doug Evans <dje@google.com>
8217
9f767825
DE
8218 * inferiors.c (started_inferior_callback): New function.
8219 (attached_inferior_callback): New function.
8220 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8221 * server.c (print_started_pid, print_attached_pid): New functions.
8222 (detach_or_kill_for_exit): New function.
8223 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8224 * server.h (have_started_inferiors_p): Declare.
8225 (have_attached_inferiors_p): Declare.
8226
5091eb23
DE
8227 * inferiors.c (remove_process): Fix memory leak, free process.
8228 * linux-low.c (linux_remove_process): New function.
8229 (linux_kill): Call it instead of remove_process.
8230 (linux_detach, linux_wait_1): Ditto.
8231
155c8968
PA
82322009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8233
8234 * configure.srv: Add x86 Windows CE target.
8235
7fe519cb
UW
82362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8237
8238 * inferiors.c (get_thread_process): Make global.
8239 * server.h (get_thread_process): Add prototype.
8240 * thread-db.c (find_one_thread): Use get_thread_process
8241 instead of current_process.
8242 (thread_db_get_tls_address): Do not crash if called when
8243 thread layer is not yet initialized.
8244
5472f405
UW
82452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8246
8247 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8248 * spu-low.c (current_tid): Rename to ...
8249 (current_ptid): ... this.
8250 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8251 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8252 ptid_get_lwp (current_ptid) instead of current_tid.
8253 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8254 instead of current_tid. Use find_process_pid to verify pid
8255 argument is valid. Pass proper argument to remove_process.
8256 (spu_thread_alive): Compare current_ptid instead of current_tid.
8257 (spu_resume): Likewise.
8258
55ac2b99
PA
82592009-04-02 Pedro Alves <pedro@codesourcery.com>
8260
8261 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8262 variable.
8263
95954743
PA
82642009-04-01 Pedro Alves <pedro@codesourcery.com>
8265
8266 Implement the multiprocess extensions, and add linux multiprocess
8267 support.
8268
8269 * server.h (ULONGEST): Declare.
8270 (struct ptid, ptid_t): New.
8271 (minus_one_ptid, null_ptid): Declare.
8272 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8273 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8274 (struct inferior_list_entry): Change `id' type from unsigned from
8275 to ptid_t.
8276 (struct sym_cache, struct breakpoint, struct
8277 process_info_private): Forward declare.
8278 (struct process_info): Declare.
8279 (current_process): Declare.
8280 (all_processes): Declare.
8281 (initialize_inferiors): Declare.
8282 (add_thread): Adjust to use ptid_t.
8283 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8284 (add_process, remove_process, find_thread_pid): Declare.
8285 (find_inferior_id): Adjust to use ptid_t.
8286 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8287 (multi_process): Declare.
8288 (push_event): Adjust to use ptid_t.
8289 (read_ptid, write_ptid): Declare.
8290 (prepare_resume_reply): Adjust to use ptid_t.
8291 (clear_symbol_cache): Declare.
8292 * inferiors.c (all_processes): New.
8293 (null_ptid, minus_one_ptid): New.
8294 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8295 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8296 (add_thread): Change unsigned long to ptid. Remove gdb_id
8297 parameter. Adjust.
8298 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8299 (gdb_id_to_thread): Rename to ...
8300 (find_thread_pid): ... this. Change unsigned long to ptid.
8301 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8302 (loaded_dll, pull_pid_from_list): Adjust.
8303 (add_process, remove_process, find_process_pid)
8304 (get_thread_process, current_process, initialize_inferiors): New.
8305 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8306 (struct target_waitstatus) <related_pid>: Ditto.
8307 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8308 return type to int.
8309 (struct target_ops) <join>: Add `pid' argument.
8310 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8311 (struct target_ops) <wait>: Add `ptid' field. Change return type
8312 to ptid.
8313 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8314 (mywait): Add `ptid' argument. Change return type to ptid_t.
8315 (target_pid_to_str): Declare.
8316 * target.c (set_desired_inferior): Adjust to use ptids.
8317 (mywait): Add new `ptid' argument. Adjust.
8318 (target_pid_to_str): New.
8319 * mem-break.h (free_all_breakpoints): Declare.
8320 * mem-break.c (breakpoints): Delelete.
8321 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8322 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8323 to use per-process breakpoint list.
8324 (free_all_breakpoints): New.
8325 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8326 (symbol_cache, all_symbols_looked_up): Delete.
8327 (hexchars): New.
8328 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8329 read_ptid): New.
8330 (prepare_resume_reply): Change ptid argument's type from unsigned
8331 long to ptid_t. Adjust. Implement W;process and X;process.
8332 (free_sym_cache, clear_symbol_cache): New.
8333 (look_up_one_symbol): Adjust to per-process symbol cache. *
8334 * server.c (cont_thread, general_thread, step_thread): Change type
8335 to ptid_t.
8336 (attached): Delete.
8337 (multi_process): New.
8338 (last_ptid): Change type to ptid_t.
8339 (struct vstop_notif) <ptid>: Change type to ptid_t.
8340 (queue_stop_reply, push_event): Change `ptid' argument's type to
8341 ptid_t.
8342 (discard_queued_stop_replies): Add `pid' argument.
8343 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8344 changes. Don't reference the `attached' global.
8345 (attach_inferior): Adjust to mywait interface changes.
8346 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8347 features. Handle and report "multiprocess+". Handle
8348 "qAttached:PID".
8349 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8350 changes.
8351 (handle_v_kill): New.
8352 (handle_v_stopped): Adjust to use target_pid_to_str.
8353 (handle_v_requests): Allow multiple attaches and runs when
8354 multiprocess extensions are in effect. Handle "vKill".
8355 (myresume): Adjust to use ptids.
8356 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8357 (handle_status): Adjust to discard_queued_stop_replies interface
8358 change.
8359 (first_thread_of, kill_inferior_callback)
8360 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8361 (main): Call initialize_inferiors. Adjust to use ptids, killing
8362 and detaching from all inferiors. Handle multiprocess packet
8363 variants.
8364 * linux-low.h: Include gdb_proc_service.h.
8365 (struct process_info_private): New.
8366 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8367 <lwpid_of>: Use ptid_get_lwp.
8368 (get_lwp_thread): Adjust.
8369 (struct lwp_info): Add `dead' member.
8370 (find_lwp_pid): Declare.
8371 * linux-low.c (thread_db_active): Delete.
8372 (new_inferior): Adjust comment.
8373 (inferior_pid): Delete.
8374 (linux_add_process): New.
8375 (handle_extended_wait): Adjust.
8376 (add_lwp): Change unsigned long to ptid.
8377 (linux_create_inferior): Add process to processes table. Adjust
8378 to use ptids. Don't set new_inferior here.
8379 (linux_attach_lwp): Rename to ...
8380 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8381 it. Adjust to use ptids.
8382 (linux_attach_lwp): New.
8383 (linux_attach): Add process to processes table. Don't set
8384 new_inferior here.
8385 (struct counter): New.
8386 (second_thread_of_pid_p, last_thread_of_process_p): New.
8387 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8388 multiple processes.
8389 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8390 processes. Remove process from process table.
8391 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8392 to multiple processes.
8393 (any_thread_of): New.
8394 (linux_detach): Add `pid' argument, and handle it. Remove process
8395 from processes table.
8396 (linux_join): Add `pid' argument. Handle it.
8397 (linux_thread_alive): Change unsighed long argument to ptid_t.
8398 Consider dead lwps as not being alive.
8399 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8400 threads we're not interested in.
8401 (same_lwp, find_lwp_pid): New.
8402 (linux_wait_for_lwp): Change `pid' argument's type from int to
8403 ptid_t. Adjust.
8404 (linux_wait_for_event): Rename to ...
8405 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8406 from int to ptid_t. Adjust.
8407 (linux_wait_for_event): New.
8408 (linux_wait_1): Add `ptid' argument. Change return type to
8409 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8410 that exit from the process table.
8411 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8412 Adjust.
8413 (mark_lwp_dead): New.
8414 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8415 stopping all threads, mark its main lwp as dead.
8416 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8417 ptids.
8418 (fetch_register, usr_store_inferior_registers)
8419 (regsets_fetch_inferior_registers)
8420 (regsets_store_inferior_registers, linux_read_memory)
8421 (linux_write_memory): Inline `inferior_pid'.
8422 (linux_look_up_symbols): Adjust to use per-process
8423 `thread_db_active'.
8424 (linux_request_interrupt): Adjust to use ptids.
8425 (linux_read_auxv): Inline `inferior_pid'.
8426 (initialize_low): Don't reference thread_db_active.
8427 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8428 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8429 (ps_getpid): Return the pid of the current inferior.
8430 * thread-db.c (proc_handle, thread_agent): Delete.
8431 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8432 per-process data.
8433 (find_one_thread): Change argument type to ptid_t. Adjust to
8434 per-process data.
8435 (maybe_attach_thread): Adjust to per-process data and ptids.
8436 (thread_db_find_new_threads): Ditto.
8437 (thread_db_init): Ditto.
8438 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8439 processes table. Adjust to use ptids.
8440 (spu_kill, spu_detach): Adjust interface. Remove process from
8441 processes table.
8442 (spu_join, spu_thread_alive): Adjust interface.
8443 (spu_wait): Adjust interface. Remove process from processes
8444 table. Adjust to use ptids.
8445 * win32-low.c (current_inferior_tid): Delete.
8446 (current_inferior_ptid): New.
8447 (debug_event_ptid): New.
8448 (thread_rec): Take a ptid. Adjust.
8449 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8450 (child_delete_thread): Ditto.
8451 (do_initial_child_stuff): Add `attached' argument. Add process to
8452 processes table.
8453 (child_fetch_inferior_registers, child_store_inferior_registers):
8454 Adjust.
8455 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8456 (win32_attach): Pass 1 to do_initial_child_stuff.
8457 (win32_kill): Adjust interface. Remove process from processes
8458 table.
8459 (win32_detach): Ditto.
8460 (win32_join): Adjust interface.
8461 (win32_thread_alive): Take a ptid.
8462 (win32_resume): Adjust to use ptids.
8463 (get_child_debug_event): Ditto.
8464 (win32_wait): Adjust interface. Remove exiting process from
8465 processes table.
8466
bd99dc85
PA
84672009-04-01 Pedro Alves <pedro@codesourcery.com>
8468
8469 Non-stop mode support.
8470
8471 * server.h (non_stop): Declare.
8472 (gdb_client_data, handler_func): Declare.
8473 (delete_file_handler, add_file_handler, start_event_loop):
8474 Declare.
8475 (handle_serial_event, handle_target_event, push_event)
8476 (putpkt_notif): Declare.
8477 * target.h (enum resume_kind): New.
8478 (struct thread_resume): Replace `step' field by `kind' field.
8479 (TARGET_WNOHANG): Define.
8480 (struct target_ops) <wait>: Add `options' argument.
8481 <supports_non_stop, async, start_non_stop>: New fields.
8482 (target_supports_non_stop, target_async): New.
8483 (start_non_stop): Declare.
8484 (mywait): Add `options' argument.
8485 * target.c (mywait): Add `options' argument. Print child exit
8486 notifications here.
8487 (start_non_stop): New.
8488 * server.c (non_stop, own_buf, mem_buf): New globals.
8489 (struct vstop_notif): New.
8490 (notif_queue): New global.
8491 (queue_stop_reply, push_event, discard_queued_stop_replies)
8492 (send_next_stop_reply): New.
8493 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8494 interface changes.
8495 (attach_inferior): In non-stop mode, don't wait for the target
8496 here.
8497 (handle_general_set): Handle QNonStop.
8498 (handle_query): When handling qC, return the current general
8499 thread, instead of the first thread of the list.
8500 (handle_query): If the backend supports non-stop mode, include
8501 QNonStop+ in the qSupported query response.
8502 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8503 and non-stop mode.
8504 (handle_v_attach, handle_v_run): Handle non-stop mode.
8505 (handle_v_stopped): New.
8506 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8507 (myresume): Adjust to use resume_kind. Handle non-stop.
8508 (queue_stop_reply_callback): New.
8509 (handle_status): Handle non-stop mode.
8510 (main): Clear non_stop flag on reconnection. Use the event-loop.
8511 Refactor serial protocol handling from here ...
8512 (process_serial_event): ... to this new function. When GDB
8513 selects any thread, select one here. In non-stop mode, wait until
8514 GDB acks all pending events before exiting.
8515 (handle_serial_event, handle_target_event): New.
8516 * remote-utils.c (remote_open): Install remote_desc in the event
8517 loop.
8518 (remote_close): Remove remote_desc from the event loop.
8519 (putpkt_binary): Rename to...
8520 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8521 (putpkt_binary): New as wrapper around putpkt_binary_1.
8522 (putpkt_notif): New.
8523 (prepare_resume_reply): In non-stop mode, don't change the
8524 general_thread.
8525 * event-loop.c: New.
8526 * Makefile.in (OBJ): Add event-loop.o.
8527 (event-loop.o): New rule.
8528
8529 * linux-low.h (pid_of): Moved here.
8530 (lwpid_of): New.
8531 (get_lwp_thread): Use lwpid_of.
8532 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8533 * linux-low.c (pid_of): Delete.
8534 (inferior_pid): Use lwpid_of.
8535 (linux_event_pipe): New.
8536 (target_is_async_p): New.
8537 (delete_lwp): New.
8538 (handle_extended_wait): Use lwpid_of.
8539 (add_lwp): Don't set lwpid field.
8540 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8541 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8542 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8543 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8544 first. Adjust to linux_wait_for_event interface changes. Use
8545 lwpid_of.
8546 (linux_detach): Don't delete the main lwp here.
8547 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8548 (status_pending_p): Don't consider explicitly suspended lwps.
8549 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8550 pointer. Add OPTIONS argument. Change return type to int. Use
8551 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8552 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8553 pointer. Add status pointer argument. Return a pid instead of a
8554 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8555 changes. In non-stop mode, don't switch to a random thread.
8556 (linux_wait): Rename to...
8557 (linux_wait_1): ... this. Add target_options argument, and handle
8558 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8559 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8560 clean exit and signal exit code. Don't stop all threads in
8561 non-stop mode. In all-stop mode, only stop all threads when
8562 reporting a stop to GDB. Handle explicit thread stop requests.
8563 (async_file_flush, async_file_mark): New.
8564 (linux_wait): New.
8565 (send_sigstop): Use lwpid_of.
8566 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8567 interface changes. In non-stop mode, don't switch to a random
8568 thread.
8569 (linux_resume_one_lwp): Use lwpid_of.
8570 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8571 (linux_resume_one_thread): ... this. Handle resume_stop. In
8572 non-stop mode, don't look for pending flag in all threads.
8573 (resume_status_pending_p): Don't consider explicitly suspended
8574 threads.
8575 (my_waitpid): Reimplement. Emulate __WALL.
8576 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8577 Use lwpid_of.
8578 (sigchld_handler, linux_supports_non_stop, linux_async)
8579 (linux_start_non_stop): New.
8580 (linux_target_ops): Register linux_supports_non_stop, linux_async
8581 and linux_start_non_stop.
8582 (initialize_low): Install SIGCHLD handler.
8583 * thread-db.c (thread_db_create_event, find_one_thread)
8584 (thread_db_get_tls_address): Use lwpid_of.
8585 * win32-low.c (win32_detach): Adjust to use resume_kind.
8586 (win32_wait): Add `options' argument.
8587 * spu-low.c (spu_resume): Adjust to use resume_kind.
8588 (spu_wait): Add `options' argument.
8589
5b1c542e
PA
85902009-04-01 Pedro Alves <pedro@codesourcery.com>
8591
8592 Decouple target code from remote protocol.
8593
8594 * target.h (enum target_waitkind): New.
8595 (struct target_waitstatus): New.
8596 (struct target_ops) <wait>: Return an unsigned long. Take a
8597 target_waitstatus pointer instead of a char pointer.
8598 (mywait): Likewise.
8599 * target.c (mywait): Change prototype to return an unsigned long.
8600 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8601 * server.h (thread_from_wait, old_thread_from_wait): Delete
8602 declarations.
8603 (prepare_resume_reply): Change prototype to take a
8604 target_waitstatus.
8605 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8606 (last_status, last_ptid): New.
8607 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8608 pid instead of a signal.
8609 (attach_inferior): Remove "status" and "signal" parameters.
8610 Adjust.
8611 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8612 not as an address.
8613 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8614 (handle_v_requests, myresume): Remove "status" and "signal"
8615 parameters. Adjust.
8616 (handle_status): New.
8617 (main): Delete local `status'. Adjust.
8618 * remote-utils.c: Include target.h.
8619 (prepare_resume_reply): Change prototype to take a
8620 target_waitstatus. Adjust.
8621
8622 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8623 interface.
8624 * spu-low.c (spu_wait): Adjust.
8625 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8626 Delete.
8627 (win32_wait): Adjust.
8628
2bd7c093
PA
86292009-04-01 Pedro Alves <pedro@codesourcery.com>
8630
8631 * target.h (struct thread_resume): Delete leave_stopped member.
8632 (struct target_ops): Add a `n' argument to the `resume' callback.
8633 * server.c (start_inferior): Adjust.
8634 (handle_v_cont, myresume): Adjust.
8635 * linux-low.c (check_removed_breakpoint): Adjust to resume
8636 interface change, and to removed leave_stopped field.
8637 (resume_ptr): Delete.
8638 (struct thread_resume_array): New.
8639 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8640 resume interface change.
8641 (linux_continue_one_thread, linux_queue_one_thread)
8642 (resume_status_pending_p): Check if the resume field is NULL
8643 instead of checking the leave_stopped member.
8644 (linux_resume): Adjust to the target resume interface change.
8645 * spu-low.c (spu_resume): Adjust to the target resume interface
8646 change.
8647 * win32-low.c (win32_detach, win32_resume): Ditto.
8648
c35fafde
PA
86492009-04-01 Pedro Alves <pedro@codesourcery.com>
8650
8651 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8652 flag.
8653 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8654 pending.
8655 (linux_continue_one_thread): Only preserve the stepping flag if
8656 there's a pending breakpoint.
8657
0a59d50b
PA
86582009-03-31 Pedro Alves <pedro@codesourcery.com>
8659
8660 * server.c (main): After the inferior having exited, call
8661 remote_close before exiting gdbserver.
8662
f04c6d38
TJB
86632009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8664
8665 Fix size of FPSCR in Power 7 processors.
8666 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8667 (PPC_FEATURE_HAS_DFP): New #define.
8668 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8669 size of the FPSCR.
8670
78e5cee6
PA
86712009-03-23 Pedro Alves <pedro@codesourcery.com>
8672
8673 * server.c (handle_query) Whitespace and formatting.
8674
1b3f6016
PA
86752009-03-22 Pedro Alves <pedro@codesourcery.com>
8676
8677 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8678 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8679 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8680 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8681 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8682 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8683 Makefile.in, configure.ac: Fix whitespace throughout.
8684 * configure: Regenerate.
8685
a07b2135
PA
86862009-03-22 Pedro Alves <pedro@codesourcery.com>
8687
8688 * inferiors.c (find_inferior): Make it safe for the callback
8689 function to delete the currently iterated inferior.
8690
67cc2626
PA
86912009-03-22 Pedro Alves <pedro@codesourcery.com>
8692
8693 * Makefile.in (linuw_low_h): Move higher.
8694 (thread-db.o): Depend on $(linux_low_h).
8695
54a0b537
PA
86962009-03-17 Pedro Alves <pedro@codesourcery.com>
8697
8698 Rename "process" to "lwp" throughout.
8699
8700 * linux-low.c (all_processes): Rename to...
8701 (all_lwps): ... this.
8702 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8703 (add_process): Rename to ...
8704 (add_lwp): ... this. Adjust.
8705 (linux_create_inferior): Adjust.
8706 (linux_attach_lwp): Adjust.
8707 (linux_attach): Adjust.
8708 (linux_kill_one_process): Rename to ...
8709 (linux_kill_one_lwp): ... this. Adjust.
8710 (linux_kill): Adjust.
8711 (linux_detach_one_process): Rename to ...
8712 (linux_detach_one_lwp): ... this. Adjust.
8713 (linux_detach): Adjust.
8714 (check_removed_breakpoint): Adjust.
8715 (status_pending_p): Adjust.
8716 (linux_wait_for_process): Rename to ...
8717 (linux_wait_for_lwp): ... this. Adjust.
8718 (linux_wait_for_event): Adjust.
8719 (send_sigstop): Adjust.
8720 (wait_for_sigstop): Adjust.
8721 (stop_all_processes): Rename to ...
8722 (stop_all_lwps): ... this.
8723 (linux_resume_one_process): Rename to ...
8724 (linux_resume_one_lwp): ... this. Adjust.
8725 (linux_set_resume_request, linux_continue_one_thread)
8726 (linux_queue_one_thread, resume_status_pending_p)
8727 (usr_store_inferior_registers, regsets_store_inferior_registers)
8728 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8729 Adjust.
8730 * linux-low.h (get_process): Rename to ...
8731 (get_lwp): ... this. Adjust.
8732 (get_thread_process): Rename to ...
8733 (get_thread_lwp): ... this. Adjust.
8734 (get_process_thread): Rename to ...
8735 (get_lwp_thread): ... this. Adjust.
8736 (struct process_info): Rename to ...
8737 (struct lwp_info): ... this.
8738 (all_processes): Rename to ...
8739 (all_lwps): ... this.
8740 * proc-service.c (ps_lgetregs): Adjust.
8741 * thread-db.c (thread_db_create_event, find_one_thread)
8742 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8743
0b16c5cf
PA
87442009-03-14 Pedro Alves <pedro@codesourcery.com>
8745
8746 * server.c (handle_query): Handle "qAttached".
8747
32de4b9d
NS
87482009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8749
8750 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8751 GPLv3, update license URL.
8752
2aecd87f
DE
87532009-03-01 Doug Evans <dje@google.com>
8754
93efd302 8755 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8756 (server_h): Add gdb_signals.h.
8757 (signals.o): Update.
8758 * server.h (target_signal_from_host,target_signal_to_host_p)
8759 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8760
86b1f9c5
PM
87612009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8762
8763 * remote-utils.c (getpkt): Also generate remote-debug
8764 information if noack_mode is set.
8765
4aa995e1
PA
87662009-02-06 Pedro Alves <pedro@codesourcery.com>
8767
8768 * server.c (handle_query): Report qXfer:siginfo:read and
8769 qXfer:siginfo:write as supported and handle them.
8770 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8771 * linux-low.c (linux_xfer_siginfo): New.
8772 (linux_target_ops): Set it.
8773
62709adf
PA
87742009-01-26 Pedro Alves <pedro@codesourcery.com>
8775
8776 * server.c (gdbserver_usage): Mention --remote-debug.
8777 (main): Accept '--remote-debug' switch.
8778
aef93bd7
DE
87792009-01-18 Doug Evans <dje@google.com>
8780
8781 * regcache.c (new_register_cache): No need to check result of xcalloc.
8782 * server.c (handle_search_memory): Back out calls to xmalloc,
8783 result is checked and error is returned to user upon failure.
8784 (handle_query): Ditto. Add more checks for result of malloc.
8785 (handle_v_cont): Check result of malloc, report error back to
8786 user upon failure.
8787 (handle_v_run): Ditto. Call freeargv.
8788 * server.h (freeargv): Declare.
8789 * utils.c (freeargv): New fn.
8790
54363045
DE
87912009-01-15 Doug Evans <dje@google.com>
8792
f626972c
DE
8793 * gdbreplay.c (perror_with_name): Make arg const char *.
8794 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8795 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8796 * utils.c (perror_with_name): Make arg const char *.
54363045 8797
18aae699
PA
87982009-01-14 Pedro Alves <pedro@codesourcery.com>
8799
8800 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8801 when handling a EXIT_PROCESS_DEBUG_EVENT.
8802
ff703abe
JB
88032009-01-06 Joel Brobecker <brobecker@adacore.com>
8804
8805 * gdbreplay.c (gdbreplay_version): Update copyright year.
8806 * server.c (gdbserver_version): Likewise.
8807
f21cc1a2 88082009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8809
8810 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8811 (handle_extended_wait): Improve comment.
0e21c1ec 8812
bca929d3
DE
88132008-12-13 Doug Evans <dje@google.com>
8814
8815 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8816 * server.h (ATTR_MALLOC): New macro.
8817 (xmalloc,xcalloc,xstrdup): Declare.
8818 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8819 * inferiors.c: Ditto.
8820 * linux-low.c: Ditto.
8821 * mem-break.c: Ditto.
8822 * regcache.c: Ditto.
8823 * remote-utils.c: Ditto.
8824 * server.c: Ditto.
8825 * target.c: Ditto.
8826 * win32-low.c: Ditto.
8827
97438e3f
DE
88282008-12-12 Doug Evans <dje@google.com>
8829
896c7fbb
DE
8830 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8831 in debugging printf.
8832
97438e3f
DE
8833 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8834
e3b886f8
DE
88352008-12-09 Doug Evans <dje@google.com>
8836
8837 * linux-low.h (struct process_info): Delete member tid, unused.
8838 * thread-db.c (find_one_thread): Update.
8839 (maybe_attach_thread): Update.
8840
07e059b5
VP
88412008-12-02 Pedro Alves <pedro@codesourcery.com>
8842
889bf7c5
PA
8843 * target.h (struct target_ops): Add qxfer_osdata member.
8844 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8845 and dirent.h.
8846 (linux_qxfer_osdata): New functions.
8847 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8848 callback.
8849 * server.c (handle_query): Handle "qXfer:osdata:read:".
8850 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8851 (buffer_xml_printf): New functions.
8852 * server.h (struct buffer): New.
8853 (buffer_grow_str, buffer_grow_str0): New macros.
8854 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8855 (buffer_xml_printf): Declare.
07e059b5 8856
4cab47ab
DE
88572008-11-24 Doug Evans <dje@google.com>
8858
8859 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8860
f142445f
DJ
88612008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8862
8863 * server.c (handle_v_run): Always use the supplied argument list.
8864
d0107bb6 88652008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8866
d0107bb6
BW
8867 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8868 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8869
2c4ad781
TJB
88702008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8871
8872 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8873 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8874 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8875 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8876 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8877 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8878 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8879 XML target descriptions.
8880 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8881 when inferior is running on an ISA 2.05 or later processor. Add
8882 special case to return offset for full 64-bit slot of FPSCR when
8883 in 32-bits.
8884
dfb64f85
DJ
88852008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8886
8887 * Makefile.in (SFILES, clean): Added sparc64 files.
8888 (reg-sparc64.o, reg-sparc64.c): New.
8889 * configure.srv (sparc*-*-linux*): New configuration.
8890 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8891 syscall arguments for SPARC.
8892 (regsets_store_inferior_registers): Likewise.
8893 * linux-sparc-low.c: New file.
8894
66b6e1dd
DE
88952008-10-21 Doug Evans <dje@google.com>
8896
8897 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8898 (READLINE_DIR,READLINE_DEP): Delete.
8899 (INTERNAL_CFLAGS): Update.
8900 (LINTFLAGS): Update.
8901
9b710a42
PA
89022008-10-10 Pedro Alves <pedro@codesourcery.com>
8903
8904 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8905 whole argv from the last run, not just argv[0].
8906
5822d809
PA
89072008-09-08 Pedro Alves <pedro@codesourcery.com>
8908
8909 * regcache.c (new_register_cache): Return NULL if the register
8910 cache size isn't known yet.
8911 (free_register_cache): Avoid dereferencing a NULL regcache.
8912
74aac56f
DJ
89132008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8914
8915 * configure.srv: Merge MIPS and MIPS64.
8916
400b20f5
MR
89172008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8918
8919 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8920
677c5bb1
LM
89212008-08-18 Luis Machado <luisgpm@br.ibm.com>
8922
8923 * Makefile.in: Add required vsx dependencies.
8924
8925 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8926 Declare init_registers_powerpc_vsx32l.
8927 Declare init_registers_powerpc_vsx64l.
8928 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8929 (ppc_arch_setup): Check for VSX in hwcap.
8930 (ppc_fill_vsxregset): New function.
8931 (ppc_store_vsxregset): New function.
8932 Add new VSX entry in regset_info target_regsets.
8933
8934 * configure.srv: Add new VSX dependencies.
8935
a6f3e723
SL
89362008-08-12 Pedro Alves <pedro@codesourcery.com>
8937
8938 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8939 (remote_open): Set or clear transport_is_reliable.
8940 (putpkt_binary): Don't expect acks in noack mode.
8941 (getpkt): Don't send ack/nac in noack mode.
8942 * server.c (handle_general_set): Handle QStartNoAckMode.
8943 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8944 qSupported.
8945 (main): Reset noack_mode on every connection.
8946 * server.h (noack_mode): Declare.
8947
a417dc56
RW
89482008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8949
8950 * Makefile.in (GDBREPLAY_OBS): New variable.
8951 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8952
3221518c
UW
89532008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8954 Daniel Jacobowitz <dan@codesourcery.com>
8955
8956 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8957 (usr_store_inferior_registers): Likewise.
8958 (regsets_store_inferior_registers): Likewise.
8959
ec56be1b
PA
89602008-07-31 Rolf Jansen <rj@surtec.com>
8961 Pedro Alves <pedro@codesourcery.com>
8962
8963 * configure.ac: Check for memmem declaration.
8964 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8965 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8966 (disable_packet_qfThreadInfo): Unconditionally compile.
8967 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8968 * configure, config.in: Regenerate.
8969
2fe5e3ff
DE
89702008-07-28 Doug Kwan <dougkwan@google.com>
8971
8972 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8973 (linux_write_memory): Remove declaration of errno.
8974
836acd6d
UW
89752008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8976
8977 * linux-low.c (handle_extended_wait): Do not use "status"
8978 variable uninitialized.
8979
aeba519e
PA
89802008-07-07 Pedro Alves <pedro@codesourcery.com>
8981
8982 * server.c (handle_v_attach): Inhibit reporting dll changes.
8983
db42f210
PA
89842008-06-27 Pedro Alves <pedro@codesourcery.com>
8985
8986 * remote-utils.c (prepare_resume_reply): If requested, don't
8987 output "thread:TID" in the T stop reply.
8988
8989 * server.c (disable_packet_vCont, disable_packet_Tthread)
8990 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8991 (handle_query): If requested, disable support for qC, qfThreadInfo
8992 and qsThreadInfo.
8993 (handle_v_requests): If requested, disable support for vCont.
8994 (gdbserver_show_disableable): New.
8995 (main): Handle --disable-packet and --disable-packet=LIST.
8996
8997 * server.h (disable_packet_vCont, disable_packet_Tthread)
8998 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8999
8e4c5421
CD
90002008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9001
9002 * server.c (gdbserver_usage): Mention --version.
9003
6e23a804
DJ
90042008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9005
9006 * Makefile.in (gdbreplay.o): New rule.
9007
90aa6a40
JM
90082008-06-06 Joseph Myers <joseph@codesourcery.com>
9009
9010 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9011 message, not gdbserver.
9012
c16158bc 90132008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9014 Nathan Sidwell <nathan@codesourcery.com>
9015 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9016
9017 * acinclude.m4: Include ../../config/acx.m4.
9018 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9019 * configure, config.in: Regenerate.
9020 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9021 * server.c (gdbserver_version): Print PKGVERSION.
9022 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9023 (main): Adjust gdbserver_usage calls.
9024 * gdbreplay.c (version, host_name): Add declarations.
9025 (gdbreplay_version, gdbreplay_usage): New.
9026 (main): Accept --version and --help options.
9027
aeb75bf5
DJ
90282008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9029
9030 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9031 (arm_breakpoint_at): Handle Thumb.
9032 (the_low_target): Add comment.
9033
76b233dd
UW
90342008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9035
9036 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9037
08388c79
DE
90382008-05-09 Doug Evans <dje@google.com>
9039
a3c83fae
DE
9040 * server.h (decode_search_memory_packet): Declare.
9041 * remote-utils.c (decode_search_memory_packet): New fn.
9042 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9043 (handle_search_memory): New fn.
9044 (handle_query): Process qSearch:memory packets.
9045
bb9c3d36
UW
90462008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9047
9048 * regcache.c (registers_length): Remove.
9049 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9050 full register packet.
9051 * regcache.h (registers_length): Remove prototype.
9052 * server.h (PBUFSIZ): Define to 16384.
9053
7284e1be
UW
90542008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9055
9056 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9057 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9058 powerpc-64l.o, and powerpc-altivec64l.o.
9059 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9060 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9061 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9062 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9063 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9064 to srv_xmlfiles.
9065
9066 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9067 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9068 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9069 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9070 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9071 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9072 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9073 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9074 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9075 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9076 (clean): Update.
9077
9078 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9079 (init_registers_powerpc_32l): ... this new prototype.
9080 (init_registers_powerpc_32): Remove, replace by ...
9081 (init_registers_powerpc_altivec32l): ... this new prototype.
9082 (init_registers_powerpc_e500): Remove, replace by ...
9083 (init_registers_powerpc_e500l): ... this new prototype.
9084 (init_registers_ppc64): Remove, replace by ...
9085 (init_registers_powerpc_64l): ... this new prototype.
9086 (init_registers_powerpc_64): Remove, replace by ...
9087 (init_registers_powerpc_altivec64l): ... this new prototype.
9088 (ppc_num_regs): Set to 73.
9089 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9090 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9091 (ppc_cannot_store_register): Handle orig_r3 and trap.
9092 (ppc_arch_setup): Update init_registers_... calls.
9093 (ppc_fill_gregset): Handle orig_r3 and trap.
9094
9095 * inferiors.c (clear_inferiors): Reset current_inferior.
9096
fdc59709
PB
90972008-04-23 Paolo Bonzini <bonzini@gnu.org>
9098
889bf7c5
PA
9099 * acinclude.m4: Add override.m4.
9100 * configure: Regenerate.
fdc59709 9101
c9b2f845
UW
91022008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9103
9104 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9105 initial call to init_register_ppc64.
9106
550512b8
UW
91072008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9108
43aaf8b6
PA
9109 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9110 single powerpc*-*-linux* case.
550512b8
UW
9111 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9112
b6430ec3
UW
91132008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9114
9115 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9116 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9117 from reg_xmlfiles.
9118 * linux-ppc-low.c: Include <elf.h>.
9119 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9120 (ppc_hwcap): New global variable.
9121 (ppc_regmap): Remove __SPE__ #ifdef sections.
9122 (ppc_regmap_e500): New global variable.
9123 (ppc_cannot_store_register): Update __SPE__ special case.
9124 (ppc_get_hwcap): New function.
9125 (ppc_arch_setup): Use it to determine whether inferior supports
9126 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9127 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9128 Do not access registers if target does not support AltiVec.
9129 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9130 Do not access registers if target does not support SPE.
9131 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9132
52fa2412
UW
91332008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9134
9135 * linux-low.c (disabled_regsets, num_regsets): New.
9136 (use_regsets_p): Delete.
9137 (linux_wait_for_process): Clear disabled_regsets.
9138 (regsets_fetch_inferior_registers): Check and set it.
9139 (regsets_store_inferior_registers): Likewise.
9140 (linux_fetch_registers, linux_store_registers): Do not use
9141 use_regsets_p.
9142 (initialize_low): Allocate disabled_regsets.
9143
e28b3332
DJ
91442008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9145
9146 * Makefile.in (LIBOBJS): New.
9147 (OBS): Use LIBOBJS.
9148 (memmem.o): New rule.
9149 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9150 * configure: Regenerated.
9151
4536995d
UW
91522008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9153
9154 * server.c (handle_query): Never return "unsupported" for
9155 qXfer:features:read queries.
9156
221c031f
UW
91572008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9158
9159 * server.c (get_features_xml): Fix inverted condition.
9160 (handle_query): Always support qXfer:feature:read.
9161
ccd213ac
DJ
91622008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9163
9164 * server.c (wrapper_argv): New.
9165 (start_inferior): Handle wrapper_argv. If set, expect an extra
9166 trap.
9167 (gdbserver_usage): Document --wrapper.
9168 (main): Parse --wrapper.
9169
6fe305f7
UW
91702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9171
9172 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9173 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9174 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9175 (ppc_set_pc): Likewise.
9176 (ppc_arch_setup): New function.
9177 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9178 of collect_register.
889bf7c5 9179 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9180
5b0a002e
UW
91812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9182
9183 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9184 instead of linux-ppc64-low.o.
9185 * linux-ppc64-low.c: Remove file.
9186 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9187 (linux-ppc64-low.o): Remove rule.
9188
9189 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9190 (init_registers_powerpc_64): Likewise.
9191 (ppc_regmap): Conditionally define depending on __powerpc64__.
9192 (ppc_cannot_store_register): Do not special-case "fpscr" when
9193 compiled on __powerpc64__.
9194 (ppc_collect_ptrace_register): New function.
9195 (ppc_supply_ptrace_register): New function.
9196 (ppc_breakpoint): Change type to "unsigned int".
9197 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9198 (the_low_target): Conditionally provide initializers for the
889bf7c5 9199 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9200 collect_ptrace_register and supply_ptrace_register members.
9201
9b4b61c8
UW
92022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9203
9204 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9205 * server.c (gdbserver_xmltarget): Define.
9206 (get_features_xml): Use it to replace "target.xml" and arch_string.
9207
9208 * configure.srv: Remove srv_xmltarget. Add XML files that were
9209 mentioned there to srv_xmlfiles instead. Remove conditional tests
9210 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9211 srv_xmlfiles and srv_regobj to include all possible choices.
9212 * configure.ac (srv_xmltarget): Remove.
9213 (srv_xmlfiles): Do not add "target.xml".
9214 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9215 checks for supplementary target information.
9216 * configure: Regenerate.
9217 * Makefile.in (XML_TARGET): Remove.
9218 (target.xml): Remove rule.
9219 (clean): Do not clean up target.xml.
9220 (.PRECIOUS): Do not mention target.xml.
9221
9222 * target.h (struct target_ops): Remove arch_string member.
9223 * linux-low.c (linux_arch_string): Remove.
9224 (linux_target_ops): Remove arch_string initializer.
9225 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9226 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9227 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9228 * spu-low.c (spu_arch_string): Remove.
9229 (spu_target_ops): Remove arch_string initializer.
9230 * win32-low.c (win32_arch_string): Remove.
9231 (win32_target_ops): Remove arch_string initializer.
9232 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9233 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9234 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9235
ee1a7ae4
UW
92362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9237
9238 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9239 by collect_ptrace_register and supply_ptrace_register hooks.
9240 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9241 instead of checking for the_low_target.left_pad_xfer.
9242 (usr_store_inferior_registers): Use collect_ptrace_register callback
9243 instead of checking for the_low_target.left_pad_xfer.
9244
9245 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9246 (s390_supply_ptrace_register): Likewise.
9247 (s390_fill_gregset): Call s390_collect_ptrace_register.
9248 (the_low_target): Update.
9249
9250 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9251 (ppc_supply_ptrace_register): Likewise.
9252 (the_low_target): Update.
9253
9254 * linux-i386-low.c (the_low_target): Update.
9255 * linux-x86-64-low.c (the_low_target): Update.
9256
d61ddec4
UW
92572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9258
9259 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9260 reg-s390.o and reg-s390x.o.
9261
9262 * linux-low.c (new_inferior): New global variable.
9263 (linux_create_inferior, linux_attach): Set it.
9264 (linux_wait_for_process): Call the_low_target.arch_setup after the
9265 target has stopped for the first time.
9266 (initialize_low): Do not call the_low_target.arch_setup.
9267
9268 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9269 (s390_set_pc): Likewise.
9270 (s390_arch_setup): New function.
9271 (the_low_target): Use s390_arch_setup as arch_setup routine.
9272
9273 * regcache.c (realloc_register_cache): New function.
9274 (set_register_cache): Call it for each existing regcache.
9275
d05b4ac3
UW
92762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9277
9278 * server.h (init_registers): Remove prototype.
9279
9280 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9281 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9282 instead of init_registers ().
9283 * linux-arm-low.c (init_registers_arm): Add prototype.
9284 (init_registers_arm_with_iwmmxt): Likewise.
9285 (the_low_target): Add initializer for arch_setup field.
9286 * linux-cris-low.c (init_registers_cris): Add prototype.
9287 (the_low_target): Add initializer for arch_setup field.
9288 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9289 (the_low_target): Add initializer for arch_setup field.
9290 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9291 (the_low_target): Add initializer for arch_setup field.
9292 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9293 (the_low_target): Add initializer for arch_setup field.
9294 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9295 (the_low_target): Add initializer for arch_setup field.
9296 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9297 (the_low_target): Add initializer for arch_setup field.
9298 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9299 (init_registers_mips64_linux): Likewise.
9300 (the_low_target): Add initializer for arch_setup field.
9301 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9302 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9303 (the_low_target): Add initializer for arch_setup field.
9304 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9305 (init_registers_powerpc_64): Likewise.
9306 (the_low_target): Add initializer for arch_setup field.
9307 * linux-s390-low.c (init_registers_s390): Add prototype.
9308 (init_registers_s390x): Likewise.
9309 (the_low_target): Add initializer for arch_setup field.
9310 * linux-sh-low.c (init_registers_sh): Add prototype.
9311 (the_low_target): Add initializer for arch_setup field.
9312 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9313 (the_low_target): Add initializer for arch_setup field.
9314 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9315 (the_low_target): Add initializer for arch_setup field.
9316
9317 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9318 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9319 instead of init_registers ().
9320 * win32-arm-low.c (init_registers_arm): Add prototype.
9321 (the_low_target): Add initializer for arch_setup field.
9322 * win32-i386-low.c (init_registers_i386): Add prototype.
9323 (the_low_target): Add initializer for arch_setup field.
9324
9325 * spu-low.c (init_registers_spu): Add prototype.
9326 (initialize_low): Call initialie_registers_spu () instead of
9327 initialize_registers ().
9328
fd96d250
PA
93292008-02-19 Pedro Alves <pedro@codesourcery.com>
9330
9331 * server.c (handle_v_requests): When handling the vRun and vAttach
9332 packets, if already debugging a process, don't kill it. Return an
9333 error instead.
9334
d41b6bb4
DJ
93352008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9336
9337 * server.c (handle_query): Correct length check.
9338
5ac588cf
PA
93392008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9340
9341 * win32-low.c (do_initial_child_stuff): Add process handle
9342 parameter. Set current_process_handle and current_process_id from the
9343 parameters. Clear globals.
9344 (win32_create_inferior): Don't set current_process_handle and
9345 current_process_id here. Instead pass them on the call to
9346 do_initial_child_stuff.
9347 (win32_attach): Likewise.
9348 (win32_clear_inferiors): New.
9349 (win32_kill): Don't close the current process handle or the
9350 current thread handle here. Instead call win32_clear_inferiors.
9351 (win32_detach): Don't open a new handle to the process. Call
9352 win32_clear_inferiors.
9353 (win32_join): Don't rely on current_process_handle; open a new
9354 handle using the process id.
9355 (win32_wait): Call win32_clear_inferiors when the inferior process
9356 has exited.
9357
ecd7ecbc
DJ
93582008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9359
9360 * server.c (monitor_show_help): Add "exit".
9361
1525d545
MG
93622008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9363
ecd7ecbc 9364 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9365 (clean): Add reg-xtensa.c.
9366 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9367 * configure.srv (xtensa*-*-linux*) New target.
9368 * linux-xtensa-low.c: New.
9369 * xtensa-xtregs.c: New.
1525d545 9370
59a016f0
PA
93712008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9372
9373 * hostio.c: Don't include errno.h.
9374 (errno_to_fileio_errno): Move to hostio-errno.
9375 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9376 error number outputting to the target->hostio_last_error callback.
9377 (hostio_packet_error): Use FILEIO_EINVAL directly.
9378 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9379 calls to hostio_error.
9380 * hostio-errno.c: New.
9381 * server.h (hostio_last_error_from_errno): Declare.
9382 * target.h (target_ops): Add hostio_last_error member.
9383 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9384 as hostio_last_error handler.
889bf7c5 9385 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9386 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9387 (wince_hostio_last_error): New functions.
9388 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9389 as hostio_last_error handler.
9390 (win32_target_ops) [!_WIN32_WCE]: Register
9391 hostio_last_error_from_errno as hostio_last_error handler.
9392 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9393 (hostio-errno.o): New rule.
9394 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9395 * configure.srv (srv_hostio_err_objs): New variable. Default to
9396 hostio-errno.o.
9397 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9398 * configure: Regenerate.
9399
2d717e4f
DJ
94002008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9401
9402 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9403 (linux_kill, linux_detach): Clean up the process list.
9404 * remote-utils.c (remote_open): Improve port number parsing.
9405 (putpkt_binary, input_interrupt): Only send interrupts if the target
9406 is running.
9407 * server.c (extended_protocol): Make static.
9408 (attached): Define earlier.
9409 (exit_requested, response_needed, program_argv): New variables.
9410 (target_running): New.
9411 (start_inferior): Clear attached here.
9412 (attach_inferior): Set attached here.
9413 (require_running): Define.
9414 (handle_query): Use require_running and target_running. Implement
9415 "monitor exit".
9416 (handle_v_attach, handle_v_run): New.
9417 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9418 (gdbserver_usage): Update.
9419 (main): Redo argument parsing. Handle --debug and --multi. Handle
9420 --attach along with other options or after the port. Save
9421 program_argv. Support no initial program. Resynchronize
9422 communication with GDB after an error. Handle "monitor exit".
9423 Use require_running and target_running. Always allow the extended
9424 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9425 restart in extended mode.
9426 * README: Refer to the GDB manual. Update --attach usage.
9427
7407e2de
AS
94282007-12-20 Andreas Schwab <schwab@suse.de>
9429
9430 * linux-low.c (STACK_SIZE): Define.
9431 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9432 (linux_test_for_tracefork): Likewise.
9433
b65d95c5
DJ
94342007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9435
9436 * linux-low.c (linux_wait_for_event): Update messages. Do not
9437 reinsert auto-delete breakpoints.
9438 * mem-break.c (struct breakpoint): Change return type of handler to
9439 int.
9440 (set_breakpoint_at): Update handler type.
9441 (reinsert_breakpoint_handler): Return 1 instead of calling
9442 delete_breakpoint.
9443 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9444 setting a new one.
9445 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9446 * mem-break.h (set_breakpoint_at): Update handler type.
9447 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9448 * win32-low.c (auto_delete_breakpoint): New.
9449 (get_child_debug_event): Use it.
9450
4e799345
DJ
94512007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9452
9453 * configure.ac: Check for pread and pwrite.
9454 * hostio.c (handle_pread): Fall back to lseek and read.
9455 (handle_pwrite): Fall back to lseek and write.
9456 * config.in, configure: Regenerated.
9457
27524b67
DJ
94582007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9459
9460 * server.c (myresume): Add own_buf argument.
9461 (main): Update calls.
9462
a20d5e98
DJ
94632007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9464
9465 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9466 * remote-utils.c (remote_open): Do not call disable_async_io.
9467 (block_async_io): Delete.
9468 (unblock_async_io): Make static.
9469 (initialize_async_io): New.
9470 * server.c (handle_v_cont): Handle async I/O here.
9471 (myresume): Likewise. Move other common resume tasks here...
9472 (main): ... from here. Call initialize_async_io. Disable async
9473 I/O before the main loop.
9474 * server.h (initialize_async_io): Declare.
9475 (block_async_io, unblock_async_io): Delete prototypes.
9476 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9477
b79d787e
DJ
94782007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9479
9480 * remote-utils.c (readchar): Allow binary data in received messages.
9481
d97903b2
PA
94822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9483
9484 * win32-low.c (attaching): New global.
9485 (win32_create_inferior): Clear the `attaching' global.
9486 (win32_attach): Set the `attaching' global.
9487 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9488 attaching. Only set a breakpoint at the entry point if not
9489 attaching.
9490
311de423
PA
94912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9492
9493 * server.c (main): Don't report dll events on the initial
9494 connection on attaches.
9495
6c2d16d2
PA
94962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9497
9498 * server.c (main): Relax numerical bases supported for the pid of
9499 the --attach command line argument.
9500
5ca906e6
PA
95012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9502
9503 * win32-low.c (win32_attach): Call OpenProcess before
9504 DebugActiveProcess, not after. Add last error output to error
9505 call.
9506
9c6c8194
PA
95072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9508
9509 * win32-low.c (win32_get_thread_context)
9510 (win32_set_thread_context): New functions.
9511 (thread_rec): Use win32_get_thread_context.
9512 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9513 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9514 field.
9515
4d5d1aaa
PA
95162007-12-03 Leo Zayas
9517 Pedro Alves <pedro_alves@portugalmail.pt>
9518
9519 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9520 global variables.
9521 (child_add_thread): Minor cleanup.
9522 (child_continue): Resume artificially suspended threads before
9523 calling ContinueDebugEvent.
9524 (suspend_one_thread): New.
9525 (fake_breakpoint_event): New.
9526 (get_child_debug_event): Change return type to int. Check here if
9527 gdb sent an interrupt request. If a soft interrupt was requested,
9528 fake a breakpoint event. Return 0 if there is no event to handle,
9529 and 1 otherwise.
9530 (win32_wait): Don't check here if gdb sent an interrupt request.
9531 Ensure there is a valid event to handle.
9532 (win32_request_interrupt): Add soft interruption method as last
9533 resort.
9534
c436e841
PA
95352007-12-03 Leo Zayas
9536 Pedro Alves <pedro_alves@portugalmail.pt>
9537
9538 * win32-low.h (win32_thread_info): Add descriptions to the
9539 structure members. Replace `suspend_count' counter by a
9540 `suspended' flag.
9541 * win32-low.c (thread_rec): Update condition of when to get the
9542 context from the inferior. Rely on ContextFlags being set if it
9543 has already been retrieved. Only suspend the inferior thread if
9544 we haven't already. Warn if that fails.
9545 (continue_one_thread): s/suspend_count/suspended/. Only call
9546 ResumeThread once. Warn if that fails.
9547
e7b5fa67
PA
95482007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9549
9550 * win32-low.c (win32_wait): Don't read from the inferior when it
9551 has already exited.
9552
a385171d
PA
95532007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9554
9555 * Makefile.in (win32_low_h): New variable.
9556 (win32-low.o): Add dependency on $(win32_low_h).
9557 (win32-arm-low.o, win32-i386-low.o): New rules.
9558
f80c84b3
DJ
95592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9560
9561 * hostio.c: Correct copyright year.
9562
a6b151f1
DJ
95632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9564
9565 * Makefile.in (OBS): Add hostio.o.
9566 (hostio.o): New rule.
9567 * server.h (handle_vFile): Declare.
9568 * hostio.c: New file.
9569 * server.c (handle_v_requests): Take packet_len and new_packet_len
9570 for binary packets. Call handle_vFile.
9571 (main): Update call to handle_v_requests.
9572
f9387fc3
DJ
95732007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9574
9575 * linux-low.c: Include <sched.h>.
9576
51c2684e
DJ
95772007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9578
9579 * linux-low.c (linux_tracefork_grandchild): New.
9580 (linux_tracefork_child): Use clone.
9581 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9582
75f83163
JB
95832007-10-31 Joel Brobecker <brobecker@adacore.com>
9584
9585 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9586
da5898ce
DJ
95872007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9588
9589 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9590
24a09b5f
DJ
95912007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9592
9593 * inferiors.c (change_inferior_id): Delete.
9594 (add_pid_to_list, pull_pid_from_list): New.
9595 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9596 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9597 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9598 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9599 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9600 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9601 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9602 (using_threads): Always set to 1.
9603 (handle_extended_wait): New.
9604 (add_process): Do not set TID.
9605 (linux_create_inferior): Set must_set_ptrace_flags.
9606 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9607 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9608 (linux_thread_alive): Rename TID argument to LWPID.
9609 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9610 (linux_wait_for_event): Do not use TID or check using_threads. Update
9611 call to dead_thread_notify. Call handle_extended_wait.
9612 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9613 (send_sigstop): Delete sigstop_sent.
9614 (wait_for_sigstop): Avoid TID.
9615 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9616 (linux_test_for_tracefork): New.
9617 (linux_lookup_signals): Use thread_db_active and
9618 linux_supports_tracefork_flag.
9619 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9620 * linux-low.h (get_process_thread): Avoid TID.
9621 (struct process_ifo): Move thread_known and tid to the end. Remove
9622 sigstop_sent.
9623 (linux_attach_lwp, thread_db_init): Update prototypes.
9624 * server.h (change_inferior_id): Delete prototype.
9625 (add_pid_to_list, pull_pid_from_list): New prototypes.
9626 * thread-db.c (thread_db_use_events): New.
9627 (find_first_thread): Rename to...
9628 (find_one_thread): ...this. Update callers and messages. Do not
9629 call fatal. Check thread_db_use_events. Do not call
9630 change_inferior_id or new_thread_notify.
9631 (maybe_attach_thread): Update. Do not call new_thread_notify.
9632 (thread_db_init): Set thread_db_use_events. Check use_events.
9633 * utils.c (fatal, warning): Correct message prefix.
9634
30ed0a8f
DJ
96352007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9636
9637 * Makefile.in (clean): Remove new files.
9638 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9639 (powerpc-64.o, powerpc-64.c): New rules.
9640 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9641 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9642 with SPE.
9643 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9644 SPE targets.
9645 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9646 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9647 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9648 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9649 (target_regsets): Add AltiVec and SPE register sets.
9650 * configure.ac: Check for AltiVec and SPE.
9651 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9652 (ppc_fill_vrregset, ppc_store_vrregset): New.
9653 (target_regsets): Add AltiVec register set.
9654 * configure: Regenerated.
9655
fd462a61
DJ
96562007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9657
9658 * linux-low.c (O_LARGEFILE): Define.
9659 (linux_read_memory): Use /proc/PID/mem.
9660 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9661 * configure, config.in: Regenerated.
9662
69f223ed
DJ
96632007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * linux-low.c (linux_wait_for_event): Do not pass signals while
9666 single-stepping.
9667
aec18585
PA
96682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9669
9670 * win32-low.c (create_process): New.
9671 (win32_create_inferior): Use create_process instead of
9672 CreateProcess. If create_process failed retry appending an ".exe"
9673 suffix. Store the GetLastError result immediatelly after
9674 create_process calls and use it on the call to error.
9675
34d86ddd
PA
96762007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9677
9678 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9679
5a0e3bd0
JB
96802007-08-23 Joel Brobecker <brobecker@adacore.com>
9681
9682 * configure.ac: Switch license to GPLv3.
9683
f88c79e6
MS
96842007-08-01 Michael Snyder <msnyder@access-company.com>
9685
9686 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9687
6b3d9b83
PA
96882007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9689
9690 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9691 typedef.
9692 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9693 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9694 CloseToolhelp32Snapshot.
9695 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9696 CloseToolhelp32Snapshot.
9697
c588c53c
MS
96982007-07-27 Michael Snyder <michael.snyder@access-company.com>
9699
9700 * server.c (main): Check for inferior exit before main loop.
9701
aa0403d9
PA
97022007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9703
9704 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9705 instead of on tmp_desc.
9706
255e7678
DJ
97072007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9708 Daniel Jacobowitz <dan@codesourcery.com>
9709
9710 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9711 (add_thread): Minor cleanups.
9712 (clear_inferiors): Move lower in the file. Clear the DLL
9713 list.
9714 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9715 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9716 (xml_escape_text): New.
9717 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9718 for qSupported.
9719 (handle_v_cont): Report errors.
9720 (gdbserver_version): Update.
9721 (main): Correct size of own_buf. Do not report initial DLL events.
9722 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9723 (unloaded_dll, xml_escape_text): New.
9724 * win32-low.c (enum target_waitkind): Update comments.
9725 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9726 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9727 (win32_EnumProcessModules, win32_GetModuleInformation)
9728 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9729 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9730 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9731 (win32_Module32First, win32_Module32Next, load_toolhelp)
9732 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9733 (get_child_debug_event): Handle DLL events.
9734 (win32_wait): Likewise.
9735
0d37add9
DJ
97362007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9737
9738 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9739 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9740
45e2715e
PA
97412007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9742
9743 * win32-low.c (handle_output_debug_string): Ignore event if not
9744 waiting.
9745
c5674cf1
PA
97462007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9747
9748 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9749
2bbe3cc1
DJ
97502007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9751
9752 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9753
ae13219e
DJ
97542007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9755
9756 * inferiors.c (change_inferior_id): Add comment.
9757 * linux-low.c (check_removed_breakpoint): Add an early
9758 prototype. Improve debug output.
9759 (linux_attach): Doc update.
9760 (linux_detach_one_process, linux_detach): Clean up before releasing
9761 each process.
9762 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9763 * linux-low.h (struct process_info): Doc improvement.
9764 * mem-break.c (delete_all_breakpoints): New.
9765 * mem-break.h (delete_all_breakpoints): New prototype.
9766 * thread-db.c (find_first_thread): New.
9767 (thread_db_create_event): Call it instead of
9768 thread_db_find_new_threads. Clean up unused variables.
9769 (maybe_attach_thread): Remove first thread handling.
9770 (thread_db_find_new_threads): Use find_first_thread.
9771 (thread_db_get_tls_address): Likewise.
9772
4105de34
DJ
97732007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9774
9775 * thread-db.c (thread_db_find_new_threads): Add prototype.
9776 (thread_db_create_event): Check for the main thread before adding
9777 a new thread.
9778 (maybe_attach_thread): Only enable event reporting if TID == 0.
9779 (thread_db_get_tls_address): Check for new threads.
9780
2b876972
DJ
97812007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9782
9783 * linux-low.c (linux_create_inferior): Try execv before execvp.
9784 * spu-low.c (spu_create_inferior): Likewise.
9785
7a245884
DJ
97862007-06-13 Mike Frysinger <vapier@gentoo.org>
9787
9788 * linux-low.c (linux_create_inferior): Change execv to execvp.
9789 * spu-low.c (spu_create_inferior): Likewies.
9790
117ce543
DJ
97912007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9792
9793 * Makefile.in (clean): Clean new files instead of deleted ones.
9794 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9795 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9796 rules.
9797 * configure.srv: Specify XML files and new regformats for MIPS and
9798 MIPS64 GNU/Linux.
9799 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9800 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9801 an entry for the restart register.
9802 (mips_cannot_fetch_register, mips_cannot_store_register)
9803 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9804 register names to match the XML descriptions.
9805 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9806 restart register instead of $0.
9807
0e7f50da
UW
98082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9809 Markus Deuling <deuling@de.ibm.com>
9810
9811 * remote-utils.c (decode_xfer_write): New function.
9812 * server.h (decode_xfer_write): Add prototype.
9813 * server.c (handle_query): Add PACKET_LEN argument. Support
9814 qXfer:spu:read and qXfer:spu:write packets.
9815 (main): Pass packet_len to handle_query.
9816 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9817 * target.h (target_ops): Add qxfer_spu.
9818
374c1d38
UW
98192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9820
9821 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9822 accessing non-seekable spufs files.
9823
bb63802a
UW
98242007-05-16 Markus Deuling <deuling@de.ibm.com>
9825
889bf7c5 9826 * server.c (handle_query): Add reply for qC packet.
bb63802a 9827
7390519e
PA
98282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9829 Leo Zayas <lerele@champenstudios@com>
9830
9831 * server.h (check_remote_input_interrupt_request): New function.
9832 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9833 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9834 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9835 (check_remote_input_interrupt_request): New function.
9836 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9837 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9838 winapi_GenerateConsoleCtrlEvent): New typedefs.
9839 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9840 to 250 ms.
9841 (win32_wait): Check for remote interrupt request
9842 with check_remote_input_interrupt_request.
9843 (win32_request_interrupt): New function.
9844 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9845
34b34921
PA
98462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9847
9848 * win32-low.c (debug_registers_changed,
9849 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9850 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9851 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9852 (thread_rec): Get context using the low target.
9853 (child_add_thread): Call thread_added on the low target,
9854 which does the same thing.
9855 (regptr): Delete.
9856 (do_initial_child_stuff): Remove debug registers references.
9857 Set context using the low target. Resume threads after
9858 setting the contexts.
9859 (child_continue): Remove dead variable. Remove debug
9860 registers references.
9861 (child_fetch_inferior_registers): Go through the low target.
9862 (do_child_store_inferior_registers): Remove.
9863 (child_store_inferior_registers): Go through the low target.
9864 (win32_resume): Remove debug registers references.
9865 Set context using the low target.
9866 (handle_exception): Change return type to void. Don't record
9867 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9868 first chance exception.
889bf7c5 9869 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9870 goto loop. Always return after waiting for debug event.
9871 (win32_wait): Convert to switch statement. Handle spurious
9872 events.
9873
9874 * win32-i386-low.c (debug_registers_changed,
9875 debug_registers_used): New.
9876 (initial_stuff): Rename to ...
9877 (i386_initial_stuff): ... this. Clear debug registers
9878 state variables.
9879 (store_debug_registers): Delete.
9880 (i386_get_thread_context): New.
9881 (load_debug_registers): Delete.
9882 (i386_set_thread_context): New.
9883 (i386_thread_added): New.
9884 (single_step): Rename to ...
9885 (i386_single_step): ... this.
9886 (do_fetch_inferior_registers): Rename to ...
9887 (i386_fetch_inferior_register): ... this.
9888 (i386_store_inferior_register): New.
9889 (the_low_target): Adapt to new interface.
9890
9891 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9892 (arm_get_thread_context): New.
9893 (arm_set_thread_context): New.
9894 (regptr): New.
9895 (do_fetch_inferior_registers): Rename to ...
9896 (arm_fetch_inferior_register): ... this.
9897 (arm_store_inferior_register): New.
9898 (arm_wince_breakpoint): Reimplement as unsigned long.
9899 (arm_wince_breakpoint_len): Define.
9900 (the_low_target): Adapt to new interface.
9901
9902 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9903 load_debug_registers. Add get_thread_context, set_thread_context,
9904 thread_added and store_inferior_register. Rename
9905 fetch_inferior_registers to fetch_inferior_register.
9906 (regptr): Remove declaration.
9907
dd6953e1
PA
99082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9909
9910 * linux-low.c (linux_detach): Change return type to int. Return 0.
9911 * spu-low.c (spu_detach): Likewise.
9912
444d6139
PA
99132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9914
9915 * target.h (target_ops): Change return type of detach to int.
9916 Add join.
9917 (join_inferior): New.
9918 * server.c (main): Don't skip detach support on mingw32.
9919 If the inferior doesn't support detaching return error.
9920 Call join_inferior instead of using waitpid.
9921 * linux-low.c (linux_join): New.
9922 (linux_target_op): Add linux_join.
9923 * spu-low.c (spu_join): New.
9924 (spu_target_ops): Add spu_join.
9925 * win32-low.c (win32_detach): Adapt to new interface.
9926 Reopen current_process_handle before detaching. Issue a child
9927 resume before detaching.
9928 (win32_join): New.
9929 (win32_target_op): Add win32_join.
9930
1d5315fe
PA
99312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9932
9933 * win32-low.c (win32-attach): Fix return value.
9934 * target.h (target_ops): Describe ATTACH return values.
9935
bf914831
PA
99362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9937
9938 * win32-low.c (GETPROCADDRESS): Define.
9939 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9940 (winapi_DebugSetProcessKillOnExit): Likewise.
9941 (win32_create_inferior): Force usage of ansi CreateProcessA.
9942 (win32_attach): Use GETPROCADDRESS.
9943 (win32_detach): Likewise.
9944
f72f3e60
PA
99452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9946
9947 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9948
ed50f18f
PA
99492007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9950
9951 * win32-low.c: Commit leftover changes from 2007-03-29.
9952
0c2ead7e
DJ
99532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9954
9955 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9956 fields short instead of int. Add explicit padding.
9957 (i387_cache_to_fsave): Remove unnecessary casts.
9958 (i387_fsave_to_cache): Doc fix.
9959 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9960
73725ff3
DJ
99612007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9962
9963 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9964 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9965
d99f33d8
PA
99662007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9967
9968 * configure.srv (arm*-*-mingw32ce*): Move near the other
9969 arm targets.
9970
68070c10
PA
99712007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9972
2482afc6 9973 * configure.ac: Add errno checking.
68070c10
PA
9974 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9975 sys/file.h and malloc.h.
9976 (AC_CHECK_DECLS): Add perror.
9977 (srv_mingwce): Handle.
2482afc6 9978 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9979 win32-i386-low.o to srv_tgtobj.
9980 (i[34567]86-*-mingw*): Likewise.
9981 (arm*-*-mingw32ce*): Add case.
9982 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9983 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9984 [__MINGW32CE__] (strerror): New function.
9985 [__MINGW32CE__] (errno): Define to GetLastError.
9986 [__MINGW32CE__] (COUNTOF): New macro.
9987 (remote_open): Remove extra close call.
9988 * mem-break.c (delete_breakpoint_at): New function.
9989 * mem-break.h (delete_breakpoint_at): Declare.
9990 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9991 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9992 [USE_WIN32API] (read, write): Add char* casts.
9993 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9994 * server.h: Include wincecompat.h on Windows CE.
9995 [HAVE_ERRNO_H]: Check.
9996 (perror): Declare if not declared.
9997 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9998 (perror_with_name): Remove errno declaration.
9999 * wincecompat.h: New.
10000 * wincecompat.c: New.
10001 * win32-low.h: New.
10002 * win32-arm-low.c: New.
10003 * win32-i386-low.c: New.
10004 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10005 (OUTMSG2): Make it safe.
10006 (_T): New macro.
10007 (COUNTOF): New macro.
10008 (NUM_REGS): Get it from the low target.
10009 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10010 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10011 (thread_rec): Let low target handle debug registers.
10012 (child_add_thread): Likewise.
10013 (child_init_thread_list): Likewise.
10014 (continue_one_thread): Likewise.
10015 (regptr): New.
10016 (do_child_fetch_inferior_registers): Move to ...
10017 * win32-i386-low.c: ... here, and rename to ...
10018 (do_fetch_inferior_registers): ... this.
889bf7c5 10019 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10020 Go through the low target.
10021 (do_child_store_inferior_registers): Use regptr.
10022 (strwinerror): New function.
10023 (win32_create_inferior): Handle Windows CE.
10024 Use strwinerror instead of strerror on Windows error
10025 codes. Add program to the error output.
10026 Don't close the main thread handle on Windows CE.
10027 (win32_attach): Use coredll.dll on Windows CE.
10028 (win32_kill): Close current process and current
10029 thread handles.
10030 (win32_detach): Use coredll.dll on Windows CE.
10031 (win32_resume): Let low target handle debug registers, and
10032 step request.
10033 (handle_exception): Add/Remove initial breakpoint. Avoid
10034 non-existant WSTOPSIG on Windows CE.
10035 (win32_read_inferior_memory): Cast to remove warning.
10036 (win32_arch_string): Go through the low target.
10037 (initialize_low): Call set_breakpoint_data with the low
10038 target's breakpoint.
10039 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10040 FOP_REGNUM, mappings): Move to ...
10041 * win32-i386-low.c: ... here.
10042 * win32-low.c (win32_thread_info): Move to ...
10043 * win32-low.h: ... here.
10044 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10045 win32-arm-low.c and wincecompat.c.
10046 (all:): Add $EXEEXT.
10047 (install-only:): Likewise.
10048 (gdbserver:): Likewise.
10049 (gdbreplay:): Likewise.
10050 * config.in: Regenerate.
10051 * configure: Regenerate.
10052
41093d81
PA
100532007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10054
10055 * win32-low.c: Rename typedef thread_info to
10056 win32_thread_info throughout.
10057
544afa54
PA
100582007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10059
10060 * win32-i386-low.c: Rename to ...
10061 * win32-low.c: ... this.
10062 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10063 * Makefile.in: Likewise.
10064
bce7165d
PA
100652007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10066
10067 * remote-utils.c (monitor_output): Constify msg parameter.
10068 * server.h (monitor_output): Likewise.
10069 * win32-i386-low.c (handle_output_debug_string): New.
10070 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10071 handle_output_debug_string.
10072 (get_child_debug_event): Likewise.
10073
506c7aa0
DJ
100742007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10075
10076 * server.c (main): Correct strtoul check.
10077
42c81e2a
DJ
100782007-03-27 Jon Ringle <jon@ringle.org>
10079
10080 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10081
9453113a
DJ
100822007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10083
10084 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10085
64a69107
DJ
100862007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10087
10088 * terminal.h: Check HAVE_SGTTY_H.
10089
100902007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10091
10092 * remote-utils.c (remote_open): Print out the assigned port number.
10093
c74d0ad8
DJ
100942007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10095
10096 * remote-utils.c (monitor_output): New function.
10097 * server.c (debug_threads): Define here.
10098 (monitor_show_help): New function.
10099 (handle_query): Handle qRcmd.
10100 (main): Do not handle 'd' packet.
10101 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10102 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10103 of debug_threads.
10104
de7c3b4a
PA
101052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10106
10107 * Makefile.in (EXEEXT): New.
10108 (clean): Use $(EXEEXT).
10109
ef57601b
PA
101102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10111
10112 * target.h (target_ops): Rename send_signal to request_interrupt,
10113 and remove enum target_signal parameter.
10114 * linux-low.c (linux_request_interrupt): Rename from
10115 linux_send_signal, and always send SIGINT.
10116 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10117 and always send SIGINT.
10118 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10119 of send_signal.
10120 (input_interrupt): Likewise.
10121
820f2bda
PA
101222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10123
10124 * server.c (get_features_xml): Check if target implemented
10125 arch_string.
10126 * win32-i386-low.c (win32_arch_string): New.
10127 (win32_target_ops): Add win32_arch_string as arch_string member.
10128
ab39bf24
UW
101292007-02-22 Markus Deuling <deuling@de.ibm.com>
10130
10131 * spu-low.c (spu_arch_string): New.
10132 (spu_target_ops): Add spu_arch_string.
10133
61ff6e04
DJ
101342007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10135
10136 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10137 * configure.ac: Do not check for terminal.h.
10138 * configure, config.in: Regenerated.
10139
fb1e4ffc
DJ
101402007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * Makefile.in (OBS): Add $(XML_BUILTIN).
10143 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10144 (clean): Update.
10145 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10146 (arm-with-iwmmxt.c): New.
10147 * config.in, configure: Regenerate.
10148 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10149 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10150 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10151 (arm*-*-linux*): Add iWMMXt and regset support.
10152 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10153 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10154 (arm_store_wmmxregset, target_regsets): New.
10155 * server.c (get_features_xml): Take annex argument. Check builtin
10156 XML documents.
10157 (handle_query): Handle multiple annexes.
10158
0f48aa01
DJ
101592007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * remote-utils.c [USE_WIN32API] (read, write): Define.
10162 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10163 write.
10164
23181151
DJ
101652007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10166
10167 * linux-i386-low.c (the_low_target): Set arch_string.
10168 * linux-x86-64-low.c (the_low_target): Likewise.
10169 * linux-low.c (linux_arch_string): New.
10170 (linux_target_ops): Add it.
10171 * linux-low.h (struct linux_target_ops): Add arch_string.
10172 * server.c (write_qxfer_response): Use const void * for DATA.
10173 (get_features_xml): New.
10174 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10175 * target.h (struct target_ops): Add arch_string method.
10176
9d606399
DJ
101772007-01-03 Denis Pilat <denis.pilat@st.com>
10178 Daniel Jacobowitz <dan@codesourcery.com>
10179
10180 * linux-low.c (linux_kill): Handle being called with no threads.
10181 * win32-i386-low.c (win32_kill): Likewise.
10182 (get_child_debug_event): Clear current_process_handle.
10183
101842006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10185 Daniel Jacobowitz <dan@codesourcery.com>
10186
10187 * remote-utils.c (remote_open): Check the type of specified
10188 serial port devices before opening them.
10189 * server.c (main): Kill the inferior if an error occurs during
10190 the first remote_open.
10191
a5e13d24
DJ
101922006-12-05 Markus Deuling <deuling@de.ibm.com>
10193
10194 * README: Update supported targets.
10195
186947f7
DJ
101962006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10197
10198 * Makefile.in (clean): Remove reg-mips64.c.
10199 (reg-mips64.c, reg-mips64.o): New rules.
10200 * configure.srv: Handle mips64. Include regset support for mips.
10201 * linux-mips-low.c (union mips_register): New.
10202 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10203 (mips_breakpoint, mips_breakpoint_at): Use int.
10204 (mips_collect_register, mips_supply_register)
10205 (mips_collect_register_32bit, mips_supply_register_32bit)
10206 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10207 (mips_store_fpregset, target_regsets): New.
10208 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10209
a13e2c95
UW
102102006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10211
10212 * configure.srv: Add target "spu*-*-*".
10213 * Makefile.in (clean): Remove reg-spu.c.
10214 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10215 * spu-low.c: New file.
10216
cb7283db
DJ
102172006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10218
10219 * configure.ac: Correct td_thr_tls_get_addr test.
10220 * configure: Regenerated.
10221
89be2091
DJ
102222006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * linux-low.c (linux_wait_for_event): Reformat. Use the
10225 pass_signals array.
10226 * remote-utils.c (decode_address_to_semicolon): New.
10227 * server.c (pass_signals, handle_general_set): New.
10228 (handle_query): Mention QPassSignals for qSupported.
10229 (main): Call handle_general_set.
10230 * server.h (pass_signals, decode_address_to_semicolon): New.
10231
000ef4f0
DJ
102322006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10233
10234 * server.c (handle_query): Correct error handling for read_auxv.
10235
b7149293
UW
102362005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10237
10238 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10239 and srv_linux_thread_db to yes.
10240 * linux-s390-low.c (s390_fill_gregset): New function.
10241 (target_regsets): Define data structure.
10242
dae5f5cf
DJ
102432006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10246 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10247 * config.in, configure: Regenerated.
10248 * inferiors.c (gdb_id_to_thread): New function.
10249 (gdb_id_to_thread_id): Use it.
10250 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10251 * linux-low.h (struct process_info): Add th member.
10252 (thread_db_get_tls_address): New prototype.
10253 * remote-utils.c (decode_address): Make non-static.
10254 * server.c (handle_query): Handle qGetTLSAddr.
10255 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10256 * target.h (struct target_ops): Add get_tls_address.
10257 * thread-db.c (maybe_attach_thread): Save the thread handle.
10258 (thread_db_get_tls_address): New.
10259
32ca6d61
DJ
102602006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10261
10262 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10263 (linux_resume_one_process): Take a siginfo_t *. Update all
10264 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10265 (struct pending_signals): Add a siginfo_t.
10266 (linux_wait_for_process): Always set last_status.
10267 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10268 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10269 * linux-low.h (struct process_info): Add last_status.
10270
5ffff7c1
DJ
102712006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10272
10273 * remote-utils.c (try_rle): New function.
10274 (putpkt_binary): Use it.
10275
8695c747
DJ
102762006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10277
10278 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10279 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10280 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10281 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10282 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10283 point registers.
10284
290fadea
RS
102852006-08-08 Richard Sandiford <richard@codesourcery.com>
10286
10287 * server.c (terminal_fd): New variable.
10288 (old_foreground_pgrp): Likewise.
10289 (restore_old_foreground_pgrp): New function.
10290 (start_inferior): Record the terminal file descriptor in terminal_fd
10291 and its original foreground group in old_foreground_pgrp. Register
10292 restore_old_foreground_pgrp with atexit().
10293
9f2e1e63
DJ
102942006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10295
10296 * server.c (handle_query): Correct qPart to qXfer.
10297
b80864fb
DJ
102982006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10299
10300 * configure.ac: Check for more headers which are missing on
10301 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10302 * configure.srv: Add Cygwin and mingw32.
10303 * remote-utils.c: Don't include headers unconditionally which
10304 are missing on mingw32. Include <winsock.h> for mingw32.
10305 (remote_open): Adjust for mingw32 support. Flush
10306 standard error after writing to it.
10307 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10308 (unblock_async_io, enable_async_io, disable_async_io)
10309 (readchar, getpkt): Update for Winsock support.
10310 (prepare_resume_reply): Expect a protocol signal number.
10311 * server.c: Disable <sys/wait.h> on mingw32.
10312 (start_inferior): Adjust for mingw32 support. Flush
10313 standard error after writing to it.
10314 (attach_inferior): Likewise. Use protocol signal
10315 numbers.
10316 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10317 and names.
10318 * win32-i386-low.c: New file.
10319 * Makefile.in (XM_CLIBS): Set.
10320 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10321 (win32-i386-low.o): New dependency rule.
10322 * linux-low.c (linux_wait): Use target signal numbers.
10323 * target.h (struct target_ops): Doc fix.
10324 * server.h (target_signal_to_name): New prototype.
10325 * gdbreplay.c: Don't include headers unconditionally which
10326 are missing on mingw32. Include <winsock.h> for mingw32.
10327 (remote_close, remote_open): Adjust for Winsock support.
10328 * configure, config.in: Regenerated.
10329
0876f84a
DJ
103302006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10331
10332 * server.c (decode_xfer_read, write_qxfer_response): New.
10333 (handle_query): Take a packet length argument. Handle
10334 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10335 the qSupported response.
10336 (main): Update call to handle_query.
10337
01f9e8fa
DJ
103382006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10339
10340 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10341 (putpkt_binary): Renamed from putpkt and adjusted for binary
10342 data.
10343 (putpkt): New wrapper for putpkt_binary.
10344 (readchar): Don't mask off the high bit.
10345 (decode_X_packet): New function.
10346 * server.c (main): Call putpkt_binary if a handler sets the packet
10347 length. Save the length of the incoming packet. Handle 'X'.
10348 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10349
be2a5f71
DJ
103502006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10351
10352 * server.c (handle_query): Handle qSupported.
10353
ea025f5f
DJ
103542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10355
10356 * remote-utils.c (all_symbols_looked_up): New variable.
10357 (look_up_one_symbol): Check it.
10358 * server.h (look_up_one_symbol): New declaration.
10359 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10360
9308fc88
DJ
103612006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10362
10363 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10364 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10365 (PTRACE_GET_THREAD_AREA): Define.
10366 (ps_get_thread_area): New function.
10367
52fb6437
NS
103682006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10369
10370 * configure.srv (m68k*-*-uclinux*): New target.
10371 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10372 (linux_resume_one_process): Remove extraneous cast.
10373 (linux_read_offsets): New.
10374 (linux_target_op): Add linux_read_offsets on mmuless systems.
10375 * server.c (handle_query): Add qOffsets logic.
10376 * target.h (struct target_ops): Add read_offsets.
10377
21b0f40c
DJ
103782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10379
10380 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10381 (PTRACE_GET_THREAD_AREA): Define.
10382 (ps_get_thread_area): New function.
10383 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10384 (linux-x86-64-low.o): Update.
10385
0050a760
DJ
103862006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10387
10388 * configure.ac: Remove checks for prfpregset_t.
10389 * gdb_proc_service.h: New file.
10390 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10391 new "gdb_proc_service.h".
10392 * proc-service.c: Likewise.
10393 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10394 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10395 * Makefile.in (gdb_proc_service_h): Updated.
10396 * configure, config.in: Regenerated.
10397
b92a518e
DJ
103982006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10399
10400 * remote-utils.c (prepare_resume_reply): Move declaration
10401 of gdb_id_from_wait to the top of the block.
10402
545587ee
DJ
104032006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10404
10405 * linux-low.c (regsets_store_inferior_registers): Read the regset
10406 from the target before filling it.
10407
9db87ebd
DJ
104082006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10409
10410 * server.c (attach_inferior): Return SIGTRAP for a successful
10411 attach.
10412
dd24457d
DJ
104132006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10414
10415 * Makefile.in (OBS): Add version.o.
10416 (STAGESTUFF): Delete.
10417 (version.o): Add dependencies.
10418 (version.c): Replace rule.
10419 (clean): Remove version.c.
10420 * server.c (gdbserver_version): New.
10421 (gdbserver_usage): Use printf.
10422 (main): Handle --version and --help.
10423 * server.h (version, host_name): Add declarations.
10424
6f0f660e
EZ
104252005-12-23 Eli Zaretskii <eliz@gnu.org>
10426
889bf7c5
PA
10427 * linux-arm-low.c:
10428 * linux-arm-low.c:
10429 * inferiors.c:
10430 * i387-fp.h:
10431 * i387-fp.c:
10432 * gdbreplay.c:
10433 * regcache.c:
10434 * proc-service.c:
10435 * mem-break.h:
10436 * mem-break.c:
10437 * linux-x86-64-low.c:
10438 * linux-sh-low.c:
10439 * linux-s390-low.c:
10440 * linux-ppc64-low.c:
10441 * linux-ppc-low.c:
10442 * linux-mips-low.c:
10443 * linux-m68k-low.c:
10444 * linux-m32r-low.c:
10445 * linux-low.h:
10446 * linux-low.c:
10447 * linux-ia64-low.c:
10448 * linux-i386-low.c:
10449 * linux-crisv32-low.c:
10450 * thread-db.c:
10451 * terminal.h:
10452 * target.h:
10453 * target.c:
10454 * server.h:
10455 * server.c:
10456 * remote-utils.c:
10457 * regcache.h:
10458 * utils.c:
10459 * Makefile.in:
10460 * configure.ac:
6f0f660e
EZ
10461 * gdbserver.1: Add (C) after Copyright. Update the FSF
10462 address.
10463
9d1fb177
DJ
104642005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10465
10466 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10467 (arm_breakpoint_at): Recognize both breakpoints.
10468 (the_low_target): Use the correct breakpoint instruction.
10469
011a70c2
DJ
104702005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10471
10472 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10473 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10474 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10475 (the_low_target): Update.
10476
7fb85e41
AS
104772005-10-25 Andreas Schwab <schwab@suse.de>
10478
10479 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10480
10481 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10482 (ia64_num_regs): Reduce to 462.
10483
3db0444b
DJ
104842005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10485
10486 * acinclude.m4: Correct quoting.
10487 * aclocal.m4: Regenerated.
10488
10489 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10490 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10491 (thread_db_init): Call thread_db_err_str.
10492 * configure.ac: Check for TD_VERSION.
10493 * config.in, configure: Regenerated.
10494
bee0189a
DJ
104952005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10496
10497 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10498
e9d25b98
DJ
104992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10500
10501 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10502 is not available. Define HAVE_PTRACE_GETREGS if it is.
10503 * config.in, configure: Regenerated.
10504 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10505 * linux-i386-low.c, linux-m68k-low.c: Update to use
10506 HAVE_PTRACE_GETREGS.
10507 * linux-low.c (regsets_fetch_inferior_registers)
10508 (regsets_store_inferior_registers): Only return 0 if we processed
10509 GENERAL_REGS.
10510 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10511 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10512
a06660f7
DJ
105132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10514
10515 * inferiors.c (struct thread_info): Add gdb_id.
10516 (add_thread): Add gdb_id argument.
10517 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10518 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10519 calls to add_thread.
10520 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10521 * server.c (handle_query): Use thread_to_gdb_id.
10522 (handle_v_cont, main): Use gdb_id_to_thread_id.
10523 * server.h (add_thread): Update prototype.
10524 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10525 prototypes.
10526
5a1f5858
DJ
105272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10528
10529 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10530 left-padded registers.
10531 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10532 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10533
e122f1f5
SE
105342005-07-01 Steve Ellcey <sje@cup.hp.com>
10535
10536 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10537 * configure: Regenerate.
10538 * config.in: Regenerate.
10539 * server.h (NEED_DECLARATION_STRERROR):
10540 Replace with !HAVE_DECL_STRERROR.
10541
d592fa2f
DJ
105422005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10543
10544 * linux-low.c (linux_wait, linux_send_signal): Don't test
10545 an unsigned long variable for > 0 if it could be MAX_ULONG.
10546 * server.c (myresume): Likewise.
10547 * target.c (set_desired_inferior): Likewise.
10548
ccbd4912
MK
105492005-06-13 Mark Kettenis <kettenis@gnu.org>
10550
10551 * configure.ac: Simplify and improve check for socklen_t.
10552 * configure, config.in: Regenerate.
10553
f450004a
DJ
105542005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * acconfig.h: Remove.
10557 * configure.ac: Add a test for socklen_t. Use three-argument
10558 AC_DEFINE throughout.
10559 * config.in: Regenerated using autoheader 2.59.
10560 * configure: Regenerated.
10561
10562 * gdbreplay.c (socklen_t): Provide a default.
10563 (remote_open): Use socklen_t.
10564 * remote-utils.c (socklen_t): Provide a default.
10565 (remote_open): Use socklen_t.
10566 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10567 unsigned char.
10568
10569 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10570 char for buffers.
10571 * linux-low.c (linux_read_memory, linux_write_memory)
10572 (linux_read_auxv): Likewise.
10573 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10574 (check_mem_write): Likewise.
10575 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10576 Likewise.
10577 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10578 (registers_from_string, register_data): Likewise.
10579 * server.c (handle_query, main): Likewise.
10580 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10581 (decode_M_packet): Likewise.
10582 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10583 * target.h (struct target_ops): Update read_memory, write_memory,
10584 and read_auxv.
10585 (read_inferior_memory, write_inferior_memory): Update.
10586 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10587 to unsigned char *.
10588 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10589 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10590 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10591 linux-s390-low.c, linux-sh-low.c: Update for changes in
10592 read_inferior_memory and the_low_target->breakpoint.
10593
eee84df1
DJ
105942005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10595
10596 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10597 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10598 * configure.srv: Add powerpc64-*-linux*.
10599 * linux-ppc64-low.c: New file.
10600
45b134e5
OF
106012005-05-23 Orjan Friberg <orjanf@axis.com>
10602
10603 * linux-cris-low.c: New file with support for CRIS.
10604 * linux-crisv32-low.c: Ditto for CRISv32.
10605 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10606 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10607 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10608 reg-crisv32.o, and reg-crisv32.c to make rules.
10609 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10610 recognized targets.
10611
48d93c75
UW
106122005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10613
10614 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10615 of sizeof (PTRACE_XFER_TYPE).
10616 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10617
e013ee27
OF
106182005-05-12 Orjan Friberg <orjanf@axis.com>
10619
889bf7c5 10620 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10621 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10622 pointers for hardware watchpoint support.
10623 * linux-low.h (struct linux_target_ops): Ditto.
10624 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10625 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10626 to linux_target_ops.
10627 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10628 reply packet.
10629 * server.c (main): Recognize 'Z' and 'z' packets.
10630
b0ded00b
UW
106312005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10632
10633 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10634 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10635 (the_low_target): Add new members.
10636
8643e2ad
DJ
106372005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10638
10639 * proc-service.c (ps_lgetregs): Search all_processes instead of
10640 all_threads.
10641
fc620387
DJ
106422005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10643
10644 * server.c (start_inferior): Change return type to int.
10645 (attach_inferior): Change sigptr to int *.
10646 (handle_v_cont, handle_v_requests): Change signal to int *.
10647 (main): Change signal to int.
10648
106492005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10650
10651 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10652 * configure.srv: Add m32r*-*-linux*.
10653 * linux-m32r-low.c: New file.
10654
e0e76420
DJ
106552005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10656
10657 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10658
a1928bad
DJ
106592005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10660
10661 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10662 Take unsigned long arguments for PIDs.
10663 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10664 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10665 (wait_for_sigstop, linux_resume_one_process)
10666 (regsets_fetch_inferior_registers, linux_send_signal)
10667 (linux_read_auxv): Likewise. Update the types of variables holding
10668 PIDs. Update format string specifiers.
10669 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10670 * remote-utils.c (prepare_resume_reply): Likewise.
10671 * server.c (cont_thread, general_thread, step_thread)
10672 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10673 unsigned long.
10674 (handle_query): Update format specifiers.
10675 (handle_v_cont, main): Use strtoul for thread IDs.
10676 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10677 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10678 (general_thread, step_thread, thread_from_wait)
10679 (old_thread_from_wait): Update.
10680 * target.h (struct thread_resume): Use unsigned long for THREAD.
10681 (struct target_ops): Use unsigned long for arguments to attach and
10682 thread_alive.
10683
dcdb98d2
DJ
106842005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10685
10686 * acinclude.m4: Include bfd/bfd.m4 directly.
10687 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10688 <agriffis@toolchain.org>.
10689 * aclocal.m4, configure: Regenerated.
10690
bec39cab
AC
106912005-01-07 Andrew Cagney <cagney@gnu.org>
10692
10693 * configure.ac: Rename configure.in, require autoconf 2.59.
10694 * configure: Re-generate.
10695
434c4c77
DJ
106962004-12-08 Daniel Jacobowitz <dan@debian.org>
10697
10698 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10699 LIBS when finished.
10700 * aclocal.m4: Regenerated.
10701 * configure: Regenerated.
10702
db1d3e1b
AS
107032004-11-21 Andreas Schwab <schwab@suse.de>
10704
10705 * linux-m68k-low.c (m68k_num_gregs): Define.
10706 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10707 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10708 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10709 (m68k_breakpoint_at): New. Add to the_low_target.
10710
10711 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10712 srv_linux_thread_db to yes.
10713
43360365
JB
107142004-10-20 Joel Brobecker <brobecker@gnat.com>
10715
10716 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10717 (ARCH_SET_FS): Likewise.
10718 (ARCH_GET_FS): Likewise.
10719 (ARCH_GET_GS): Likewise.
10720
fd500816
DJ
107212004-10-16 Daniel Jacobowitz <dan@debian.org>
10722
10723 * linux-i386-low.c (ps_get_thread_area): New.
10724 * linux-x86-64-low.c (ps_get_thread_area): New.
10725 * linux-low.c: Include <sys/syscall.h>.
10726 (linux_kill_one_process): Don't kill the first thread here.
10727 (linux_kill): Kill the first thread here.
10728 (kill_lwp): New function.
10729 (send_sigstop, linux_send_signal): Use it.
10730 * proc-service.c: Clean up #ifdefs.
10731 (fpregset_info): Delete.
10732 (ps_lgetregs): Update and enable implementation.
10733 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10734 implementations.
10735 * remote-utils.c (struct sym_cache, symbol_cache): New.
10736 (input_interrupt): Print a clearer message.
10737 (async_io_enabled): New variable.
10738 (enable_async_io, disable_async_io): Use it. Update comments.
10739 (look_up_one_symbol): Use the symbol cache.
10740 * thread-db.c (thread_db_look_up_symbols): New function.
10741 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10742
f6de3c42
DJ
107432004-10-16 Daniel Jacobowitz <dan@debian.org>
10744
10745 * configure.in: Test for -rdynamic.
10746 * configure: Regenerated.
10747 * Makefile (INTERNAL_LDFLAGS): New.
10748 (gdbserver, gdbreplay): Use it.
10749
2c0fc042
AC
107502004-09-02 Andrew Cagney <cagney@gnu.org>
10751
10752 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10753
075b3282
DJ
107542004-03-23 Daniel Jacobowitz <drow@mvista.com>
10755
10756 * linux-low.c (linux_wait): Clear all_processes list also.
10757
fa6a77dc
DJ
107582004-03-12 Daniel Jacobowitz <drow@mvista.com>
10759
10760 * linux-low.c: Include <errno.h>. Remove extern declaration of
10761 errno.
10762
6d782a97
DJ
107632004-03-12 Daniel Jacobowitz <drow@mvista.com>
10764
10765 * gdbreplay.c, server.h, utils.c: Update copyright years.
10766
3a7fb99b
DJ
107672004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10768
10769 * server.c (main): Print child status or termination signal from
10770 variable 'signal', not 'sig'.
10771
c3e735a6
DJ
107722004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10773
10774 * linux-low.c (linux_read_memory): Change return type to
10775 int. Check for and return error from ptrace().
10776 * target.c (read_inferior_memory): Change return type to int. Pass
10777 back return status from the_target->read_memory().
10778 * target.h (struct target_ops): Adapt *read_memory() prototype.
10779 Update comment.
10780 (read_inferior_memory): Adapt prototype.
10781 * server.c (main): Return an error packet if
10782 read_inferior_memory() returns an error.
10783
a59d1c82
DJ
107842004-03-04 Daniel Jacobowitz <drow@mvista.com>
10785
10786 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10787 Unify with other clean targets.
10788
dc3f8883
DJ
107892004-02-29 Daniel Jacobowitz <drow@mvista.com>
10790
10791 * server.c (handle_v_cont): Call set_desired_inferior.
10792
89a208da
DJ
107932004-02-29 Daniel Jacobowitz <drow@mvista.com>
10794
10795 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10796
62ea82f5
DJ
107972004-02-29 Daniel Jacobowitz <drow@mvista.com>
10798
10799 * linux-low.c (linux_wait): Unblock async I/O.
10800 (linux_resume): Block and enable async I/O.
10801 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10802 * server.h (block_async_io, unblock_async_io): Add prototypes.
10803
6910d122
DJ
108042004-02-29 Daniel Jacobowitz <drow@mvista.com>
10805
10806 * remote-utils.c (remote_open): Print a status notice after
10807 opening a TCP port.
10808 * server.c (attach_inferior): Print a status notice after
10809 attaching.
10810
108112004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10812
10813 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10814
c89dc5d4
DJ
108152004-02-26 Daniel Jacobowitz <drow@mvista.com>
10816
10817 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10818 error packet.
10819 * server.c, target.h: Update copyright years.
10820
4b8dad4a
RM
108212004-02-25 Roland McGrath <roland@redhat.com>
10822
10823 * target.h (struct target_ops): New member `read_auxv'.
10824 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10825 * linux-low.c (linux_read_auxv): New function.
10826 (linux_target_ops): Initialize `read_auxv' member to that.
10827
d7446758
JB
108282004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10829
10830 Committed by Jim Blandy <jimb@redhat.com>.
10831
10832 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10833 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10834 instead of GPR_SIZE to distiguish s390 and s390x targets.
10835
5544ad89
DJ
108362004-01-31 Daniel Jacobowitz <drow@mvista.com>
10837
10838 * linux-low.c: Update copyright year.
10839 (check_removed_breakpoint): Clear pending_is_breakpoint.
10840 (linux_set_resume_request, linux_queue_one_thread)
10841 (resume_status_pending_p): New functions.
10842 (linux_continue_one_thread): Use process->resume.
10843 (linux_resume): Only resume threads if there are no pending events.
10844 * linux-low.h (struct process_info): Add resume request
10845 pointer.
10846
2a68b70e
DJ
108472004-01-30 Daniel Jacobowitz <drow@mvista.com>
10848
10849 * regcache.c (new_register_cache): Clear the allocated register
10850 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10851
64386c31
DJ
108522003-10-13 Daniel Jacobowitz <drow@mvista.com>
10853
10854 * linux-low.c (linux_resume): Take a struct thread_resume *
10855 argument.
10856 (linux_wait): Update call.
10857 (resume_ptr): New static variable.
10858 (linux_continue_one_thread): Renamed from
10859 linux_continue_one_process. Use resume_ptr.
10860 (linux_resume): Use linux_continue_one_thread.
10861 * server.c (handle_v_cont, handle_v_requests): New functions.
10862 (myresume): New function.
10863 (main): Handle 'v' case.
10864 * target.h (struct thread_resume): New type.
10865 (struct target_ops): Change argument of "resume" to struct
10866 thread_resume *.
10867 (myresume): Delete macro.
10868
c938e9b0
L
108692003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10870
10871 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10872 (uninstall): Support DESTDIR.
10873
7f313d07
BC
10874Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10875
10876 * configure.srv: Add xscale*linux copy of arm*linux entry.
10877
3b2fc2ea
DJ
108782003-07-24 Daniel Jacobowitz <drow@mvista.com>
10879
10880 * linux-arm-low.c (arm_reinsert_addr): New function.
10881 (the_low_target): Add arm_reinsert_addr.
10882
1c0a559e
MK
108832003-07-08 Mark Kettenis <kettenis@gnu.org>
10884
10885 * mem-break.c: Remove whitespace at end of file.
10886
43d5792c
DJ
108872003-06-28 Daniel Jacobowitz <drow@mvista.com>
10888
10889 * configure.in: Check whether we need to prototype strerror.
10890 * server.h: Optionally prototype strerror.
10891 * gdbreplay.c (perror_with_name): Use strerror.
10892 * linux-low.c (linux_attach_lwp): Use strerror.
10893 * utils.c (perror_with_name): Use strerror.
10894 * config.in, configure: Regenerated.
10895
c8a86edf
DJ
108962003-06-28 Daniel Jacobowitz <drow@mvista.com>
10897
10898 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10899 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10900
73d37363
DJ
109012003-06-20 Daniel Jacobowitz <drow@mvista.com>
10902
10903 * Makefile.in (SFILES): Update.
10904 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10905 low-sun3.c: Remove files.
10906
6ad8ae5c
DJ
109072003-06-17 Daniel Jacobowitz <drow@mvista.com>
10908
10909 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10910 (linux_detach_one_process, linux_detach): New functions.
10911 (linux_target_ops): Add linux_detach.
10912 * server.c (main): Handle 'D' packet.
10913 * target.h (struct target_ops): Add "detach" member.
10914 (detach_inferior): Define.
10915
1581182a
MK
109162003-06-13 Mark Kettenis <kettenis@gnu.org>
10917
10918 From Kelley Cook <kelleycook@wideopenwest.com>:
10919 * configure.srv: Accept i[34567]86 variants.
10920
e5379b03
DJ
109212003-06-05 Daniel Jacobowitz <drow@mvista.com>
10922
10923 * linux-low.c (linux_wait_for_event): Correct comment typos.
10924 (linux_resume_one_process): Call check_removed_breakpoint.
10925 (linux_send_signal): New function.
10926 (linux_target_ops): Add linux_send_signal.
10927 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10928 of kill.
10929 * target.h (struct target_ops): Add send_signal.
10930
2ff29de4
JB
109312003-05-29 Jim Blandy <jimb@redhat.com>
10932
10933 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10934 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10935 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10936 away part of the register's value.
10937
254787d4
DJ
109382003-03-26 Daniel Jacobowitz <drow@mvista.com>
10939
10940 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10941 (linux_wait_for_event, linux_init_signals): Likewise.
10942
94e10508
DJ
109432003-03-17 Daniel Jacobowitz <drow@mvista.com>
10944
10945 * configure.in: Check for stdlib.h.
10946 * configure: Regenerated.
10947 * config.in: Regenerated.
10948
4c0711e0
DJ
109492003-01-04 Andreas Schwab <schwab@suse.de>
10950
10951 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10952
ef66e766
AC
109532003-01-02 Andrew Cagney <ac131313@redhat.com>
10954
10955 * Makefile.in: Remove obsolete code.
10956
a1358604
DJ
109572002-11-20 Daniel Jacobowitz <drow@mvista.com>
10958
10959 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10960 defined(PT_FPR0_HI).
10961
23ce3b1c
DJ
109622002-11-17 Stuart Hughes <seh@zee2.com>
10963
10964 * linux-arm-low.c (arm_num_regs): Increase.
10965 (arm_regmap): Include status register.
10966
109672002-11-17 Daniel Jacobowitz <drow@mvista.com>
10968
10969 * linux-low.c (register_addr): Remove incorrect -1 check.
10970
a9fa9f7d
DJ
109712002-08-29 Daniel Jacobowitz <drow@mvista.com>
10972
10973 * linux-low.c (linux_create_inferior): Call setpgid. Return
10974 the new PID.
10975 (unstopped_p, linux_signal_pid): Remove.
10976 (linux_target_ops): Remove linux_signal_pid.
10977 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10978 global instead of target method.
10979 * target.h (struct target_ops): Remove signal_pid. Update comment
10980 for create_inferior.
10981 * server.c (signal_pid): New variable.
10982 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10983 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10984 (attach_inferior): Set signal_pid.
10985
17574093
DJ
109862002-08-23 Daniel Jacobowitz <drow@mvista.com>
10987
10988 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10989
109902002-08-20 Jim Blandy <jimb@redhat.com>
10991
10992 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10993 default for this.
10994
109952002-08-01 Andrew Cagney <cagney@redhat.com>
10996
10997 * Makefile.in: Make chill references obsolete.
10998
109992002-07-24 Kevin Buettner <kevinb@redhat.com>
11000
11001 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11002 * configure: Regenerate.
11003 * config.in: Regenerate.
11004
110052002-07-09 David O'Brien <obrien@FreeBSD.org>
11006
11007 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11008 (perror_with_name, remote_close, remote_open, expect, play): Static.
11009
110102002-07-04 Michal Ludvig <mludvig@suse.cz>
11011
4b8dad4a 11012 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11013 byte offsets instead of an array of indexes.
11014 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11015
110162002-06-13 Daniel Jacobowitz <drow@mvista.com>
11017
11018 * regcache.c: Add comment.
11019
110202002-06-11 Daniel Jacobowitz <drow@mvista.com>
11021
11022 * thread-db.c: New file.
11023 * proc-service.c: New file.
11024 * acinclude.m4: New file.
11025 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11026 proc-service.o, and thread-db.o.
11027 (linux-low.o): Add USE_THREAD_DB.
11028 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11029 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11030 * aclocal.m4: Regenerated.
11031 * config.in: Regenerated.
11032 * configure: Regenerated.
11033 * configure.in: Check for proc_service.h, sys/procfs.h,
11034 thread_db.h, and linux/elf.h headrs.
11035 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11036 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11037 Check for -lthread_db and thread support.
11038 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11039 PowerPC, and SuperH.
11040 * i387-fp.c: Constify arguments.
11041 * i387-fp.h: Likewise.
11042 * inferiors.c: (struct thread_info): Renamed from
11043 `struct inferior_info'. Remove PID member. Use generic inferior
11044 list header. All uses updated.
11045 (inferiors, signal_pid): Removed.
11046 (all_threads): New variable.
11047 (get_thread): Define.
11048 (add_inferior_to_list): New function.
11049 (for_each_inferior): New function.
11050 (change_inferior_id): New function.
11051 (add_inferior): Removed.
11052 (remove_inferior): New function.
11053 (add_thread): New function.
11054 (free_one_thread): New function.
11055 (remove_thread): New function.
11056 (clear_inferiors): Use for_each_inferior and free_one_thread.
11057 (find_inferior): New function.
11058 (find_inferior_id): New function.
11059 (inferior_target_data): Update argument type.
11060 (set_inferior_target_data): Likewise.
11061 (inferior_regcache_data): Likewise.
11062 (set_inferior_regcache_data): Likewise.
11063 * linux-low.c (linux_bp_reinsert): Remove.
11064 (all_processes, stopping_threads, using_thrads)
11065 (struct pending_signals, debug_threads, pid_of): New.
11066 (inferior_pid): Replace with macro.
11067 (struct inferior_linux_data): Remove.
11068 (get_stop_pc, add_process): New functions.
11069 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11070 Use add_process and add_thread.
11071 (linux_attach_lwp): New function, based on old linux_attach. Use
11072 add_process and add_thread. Set stop_expected for new threads.
11073 (linux_attach): New function.
11074 (linux_kill_one_process): New function.
11075 (linux_kill): Kill all LWPs.
11076 (linux_thread_alive): Use find_inferior_id.
11077 (check_removed_breakpoints, status_pending_p): New functions.
11078 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11079 Update. Use WNOHANG. Wait for cloned processes also. Update process
11080 struct for the found process.
11081 (linux_wait_for_event): New function.
11082 (linux_wait): Use it. Support LWPs.
11083 (send_sigstop, wait_for_sigstop, stop_all_processes)
11084 (linux_resume_one_process, linux_continue_one_process): New functions.
11085 (linux_resume): Support LWPs.
11086 (REGISTER_RAW_SIZE): Remove.
11087 (fetch_register): Use register_size instead. Call supply_register.
11088 (usr_store_inferior_registers): Likewise. Call collect_register.
11089 Fix recursive case.
11090 (regsets_fetch_inferior_registers): Improve error message.
11091 (regsets_store_inferior_registers): Add debugging.
11092 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11093 (unstopped_p, linux_signal_pid): New functions.
11094 (linux_target_ops): Add linux_signal_pid.
11095 (linux_init_signals): New function.
11096 (initialize_low): Call it. Initialize using_threads.
11097 * regcache.c (inferior_regcache_data): Add valid
11098 flag.
11099 (get_regcache): Fetch registers lazily. Add fetch argument
11100 and update all callers.
11101 (regcache_invalidate_one, regcache_invalidate): New
11102 functions.
11103 (new_register_cache): Renamed from create_register_cache.
11104 Return the new regcache.
11105 (free_register_cache): Change argument to a void *.
11106 (registers_to_string, registers_from_string): Call get_regcache
11107 with fetch flag set.
11108 (register_data): Make static. Pass fetch flag to get_regcache.
11109 (supply_register): Call get_regcache with fetch flag clear.
11110 (collect_register): Call get_regcache with fetch flag set.
11111 (collect_register_as_string): New function.
11112 * regcache.h: Update.
11113 * remote-utils.c (putpkt): Flush after debug output and use
11114 stderr.
11115 Handle input interrupts while waiting for an ACK.
11116 (input_interrupt): Use signal_pid method.
11117 (getpkt): Flush after debug output and use stderr.
11118 (outreg): Use collect_register_as_string.
11119 (new_thread_notify, dead_thread_notify): New functions.
11120 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11121 and general_thread.
11122 (look_up_one_symbol): Flush after debug output.
11123 * server.c (step_thread, server_waiting): New variables.
11124 (start_inferior): Don't use signal_pid. Update call to mywait.
11125 (attach_inferior): Update call to mywait.
11126 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11127 (main): Don't fetch/store registers explicitly. Use
11128 set_desired_inferior. Support proposed ``Hs'' packet. Update
11129 calls to mywait.
11130 * server.h: Update.
11131 (struct inferior_list, struct_inferior_list_entry): New.
11132 * target.c (set_desired_inferior): New.
11133 (write_inferior_memory): Constify.
11134 (mywait): New function.
11135 * target.h: Update.
11136 (struct target_ops): New signal_pid method.
11137 (mywait): Removed macro, added prototype.
11138
11139 * linux-low.h (regset_func): Removed.
11140 (regset_fill_func, regset_store_func): New.
11141 (enum regset_type): New.
11142 (struct regset_info): Add type field. Use new operation types.
11143 (struct linux_target_ops): stop_pc renamed to get_pc.
11144 Add decr_pc_after_break and breakpoint_at.
11145 (get_process, get_thread_proess, get_process_thread)
11146 (strut process_info, all_processes, linux_attach_lwp)
11147 (thread_db_init): New.
11148
11149 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11150 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11151 (the_low_target): Add new members.
11152 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11153 (i386_store_fpxregset): Constify.
11154 (target_regsets): Add new kind identifier.
11155 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11156 (i386_set_pc): Add debugging.
11157 (i386_breakpoint_at): New function.
11158 (the_low_target): Add new members.
11159 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11160 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11161 (mips_breakpoint_at): New.
11162 (the_low_target): Add new members.
11163 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11164 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11165 (the_low_target): Add new members.
11166 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11167 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11168 (the_low_target): Add new members.
11169 * linux-x86-64-low.c (target_regsets): Add new kind
11170 identifier.
11171
111722002-05-15 Daniel Jacobowitz <drow@mvista.com>
11173
11174 From Martin Pool <mbp@samba.org>:
11175 * server.c (gdbserver_usage): New function.
11176 (main): Call it.
11177
111782002-05-14 Daniel Jacobowitz <drow@mvista.com>
11179
11180 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11181 stop_at -> stop_pc.
11182
111832002-05-04 Andrew Cagney <ac131313@redhat.com>
11184
11185 * Makefile.in: Remove obsolete code.
11186
111872002-04-24 Michal Ludvig <mludvig@suse.cz>
11188
11189 * linux-low.c (regsets_fetch_inferior_registers),
11190 (regsets_store_inferior_registers): Removed cast to int from
11191 ptrace() calls.
11192 * regcache.h: Added declaration of struct inferior_info.
11193
111942002-04-20 Daniel Jacobowitz <drow@mvista.com>
11195
11196 * inferiors.c (struct inferior_info): Add regcache_data.
11197 (add_inferior): Call create_register_cache.
11198 (clear_inferiors): Call free_register_cache.
11199 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11200 * regcache.c (struct inferior_regcache_data): New.
11201 (registers): Remove.
11202 (get_regcache): New function.
11203 (create_register_cache, free_register_cache): New functions.
11204 (set_register_cache): Don't initialize the register cache here.
11205 (registers_to_string, registers_from_string, register_data): Call
11206 get_regcache.
11207 * regcache.h: Add prototypes.
11208 * server.h: Likewise.
11209
112102002-04-20 Daniel Jacobowitz <drow@mvista.com>
11211
11212 * mem-break.c: New file.
11213 * mem-break.h: New file.
11214 * Makefile.in: Add mem-break.o rule; update server.h
11215 dependencies.
11216 * inferiors.c (struct inferior_info): Add target_data
11217 member.
11218 (clear_inferiors): Free target_data member if set.
11219 (inferior_target_data, set_inferior_target_data): New functions.
11220 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11221 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11222 * linux-low.c (linux_bp_reinsert): New variable.
11223 (struct inferior_linux_data): New.
11224 (linux_create_inferior): Use set_inferior_target_data.
11225 (linux_attach): Likewise. Call add_inferior.
11226 (linux_wait_for_one_inferior): New function.
11227 (linux_wait): Call it.
11228 (linux_write_memory): Add const.
11229 (initialize_low): Call set_breakpoint_data.
11230 * linux-low.h (struct linux_target_ops): Add breakpoint
11231 handling members.
11232 * server.c (attach_inferior): Remove extra add_inferior
11233 call.
11234 * server.h: Include mem-break.h. Update inferior.c
11235 prototypes.
11236 * target.c (read_inferior_memory)
11237 (write_inferior_memory): New functions.
11238 * target.h (read_inferior_memory)
11239 (write_inferior_memory): Change macros to prototypes.
11240 (struct target_ops): Update comments. Add const to write_memory
11241 definition.
11242
112432002-04-11 Daniel Jacobowitz <drow@mvista.com>
11244
11245 * linux-low.c (usr_store_inferior_registers): Support
11246 registers which are allowed to fail to store.
11247 * linux-low.h (linux_target_ops): Likewise.
11248 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11249 (ppc_cannot_store_register): FPSCR may not be storable.
11250
112512002-04-09 Daniel Jacobowitz <drow@mvista.com>
11252
11253 * server.h: Include <string.h> if HAVE_STRING_H.
11254 * ChangeLog: Correct paths in last ChangeLog entry.
11255
112562002-04-09 Daniel Jacobowitz <drow@mvista.com>
11257
11258 * linux-low.h: Remove obsolete prototypes.
11259 (struct linux_target_ops): New.
11260 (extern the_low_target): New.
11261 * linux-low.c (num_regs, regmap): Remove declarations.
11262 (register_addr): Use the_low_target explicitly.
11263 (fetch_register): Likewise.
11264 (usr_fetch_inferior_registers): Likewise.
11265 (usr_store_inferior_registers): Likewise.
11266 * linux-arm-low.c (num_regs): Remove.
11267 (arm_num_regs): Define.
11268 (arm_regmap): Renamed from regmap, made static.
11269 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11270 made static.
11271 (arm_cannot_store_register): Renamed from cannot_store_register,
11272 made static.
11273 (the_low_target): New.
11274 * linux-i386-low.c (num_regs): Remove.
11275 (i386_num_regs): Define.
11276 (i386_regmap): Renamed from regmap, made static.
11277 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11278 made static.
11279 (i386_cannot_store_register): Renamed from cannot_store_register,
11280 made static.
11281 (the_low_target): New.
11282 * linux-ia64-low.c (num_regs): Remove.
11283 (ia64_num_regs): Define.
11284 (ia64_regmap): Renamed from regmap, made static.
11285 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11286 made static.
11287 (ia64_cannot_store_register): Renamed from cannot_store_register,
11288 made static.
11289 (the_low_target): New.
11290 * linux-m68k-low.c (num_regs): Remove.
11291 (m68k_num_regs): Define.
11292 (m68k_regmap): Renamed from regmap, made static.
11293 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11294 made static.
11295 (m68k_cannot_store_register): Renamed from cannot_store_register,
11296 made static.
11297 (the_low_target): New.
11298 * linux-mips-low.c (num_regs): Remove.
11299 (mips_num_regs): Define.
11300 (mips_regmap): Renamed from regmap, made static.
11301 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11302 made static.
11303 (mips_cannot_store_register): Renamed from cannot_store_register,
11304 made static.
11305 (the_low_target): New.
11306 * linux-ppc-low.c (num_regs): Remove.
11307 (ppc_num_regs): Define.
11308 (ppc_regmap): Renamed from regmap, made static.
11309 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11310 made static.
11311 (ppc_cannot_store_register): Renamed from cannot_store_register,
11312 made static.
11313 (the_low_target): New.
11314 * linux-s390-low.c (num_regs): Remove.
11315 (s390_num_regs): Define.
11316 (s390_regmap): Renamed from regmap, made static.
11317 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11318 made static.
11319 (s390_cannot_store_register): Renamed from cannot_store_register,
11320 made static.
11321 (the_low_target): New.
11322 * linux-sh-low.c (num_regs): Remove.
11323 (sh_num_regs): Define.
11324 (sh_regmap): Renamed from regmap, made static.
11325 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11326 made static.
11327 (sh_cannot_store_register): Renamed from cannot_store_register,
11328 made static.
11329 (the_low_target): New.
11330 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11331 (the_low_target): New.
11332
113332002-04-09 Daniel Jacobowitz <drow@mvista.com>
11334
11335 * Makefile.in: Add stamp-h target.
11336 * configure.in: Create stamp-h.
11337 * configure: Regenerated.
11338
113392002-04-09 Daniel Jacobowitz <drow@mvista.com>
11340
11341 * inferiors.c: New file.
11342 * target.c: New file.
11343 * target.h: New file.
11344 * Makefile.in: Add target.o and inferiors.o. Update
11345 dependencies.
11346 * linux-low.c (inferior_pid): New static variable,
11347 moved from server.c.
11348 (linux_create_inferior): Renamed from create_inferior.
11349 Call add_inferior. Return 0 on success instead of a PID.
11350 (linux_attach): Renamed from myattach.
11351 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11352 (linux_thread_alive): Renamed from mythread_alive.
11353 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11354 child dies.
11355 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11356 (regsets_store_inferior_registers): Correct error message.
11357 Add missing ``return 0''.
11358 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11359 (linux_store_registers): Renamed from store_inferior_registers.
11360 (linux_read_memory): Renamed from read_inferior_memory.
11361 (linux_write_memory): Renamed from write_inferior_memory.
11362 (linux_target_ops): New structure.
11363 (initialize_low): Call set_target_ops ().
11364 * remote-utils.c (unhexify): New function.
11365 (hexify): New function.
11366 (input_interrupt): Send signals to ``signal_pid''.
11367 * server.c (inferior_pid): Remove.
11368 (start_inferior): Update create_inferior call.
11369 (attach_inferior): Call add_inferior.
11370 (handle_query): New function.
11371 (main): Call handle_query for `q' packets.
11372 * server.h: Include "target.h". Remove obsolete prototypes.
11373 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11374
113752002-04-09 Daniel Jacobowitz <drow@mvista.com>
11376
11377 * Makefile.in: Add WARN_CFLAGS. Update configury
11378 dependencies.
11379 * configure.in: Check for <string.h>
11380 * configure: Regenerate.
11381 * config.in: Regenerate.
11382 * gdbreplay.c: Include needed system headers.
11383 (remote_open): Remove strchr prototype.
11384 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11385 * regcache.c (supply_register): Change buf argument to const void *.
11386 (supply_register_by_name): Likewise.
11387 (collect_register): Change buf argument to void *.
11388 (collect_register_by_name): Likewise.
11389 * regcache.h: Add missing prototypes.
11390 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11391 * server.c (handle_query): New function.
11392 (attached): New static variable, moved out of main.
11393 (main): Quiet longjmp clobber warnings.
11394 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11395 * utils.c (error): Remove NORETURN.
11396 (fatal): Likewise.
This page took 1.48844 seconds and 4 git commands to generate.